Commit Graph

950 Commits

Author SHA1 Message Date
Re-bin
80392d158a Merge PR #1400: fix: add SIGTERM, SIGHUP handling and ignore SIGPIPE 2026-03-05 14:59:03 +00:00
Re-bin
4ba8d137bc Merge remote-tracking branch 'origin/main' into pr-1400 2026-03-05 14:56:18 +00:00
Re-bin
bea0f2a15d Merge PR #1435: feat(gateway): support multiple instances with --workspace and --config options 2026-03-05 14:54:53 +00:00
Re-bin
0343d66224 fix(gateway): remove duplicate load_config() that overwrote custom workspace/config 2026-03-05 14:54:53 +00:00
Re-bin
6d342fe79d Merge remote-tracking branch 'origin/main' into pr-1435 2026-03-05 14:51:13 +00:00
Re-bin
cd0bcc162e docs: update introduction of nanobot 2026-03-05 14:48:57 +00:00
Re-bin
57d8aefc22 docs: update introduction of nanobot 2026-03-05 14:46:03 +00:00
Re-bin
ec7bc33441 Merge PR #1488: feat(mcp): add SSE transport support with auto-detection 2026-03-05 14:44:45 +00:00
Re-bin
b71c1bdca7 fix(mcp): hoist sse/http imports, annotate auto-detection heuristic, restore field comments 2026-03-05 14:44:45 +00:00
Re-bin
2306d4c11c Merge remote-tracking branch 'origin/main' into pr-1488 2026-03-05 14:35:02 +00:00
Re-bin
c0d10cb508 Merge PR #553: feat(discord): add group policy to control group respond behaviour 2026-03-05 14:33:14 +00:00
Re-bin
06fcd2cc3f fix(discord): correct group_policy default to mention and style cleanup 2026-03-05 14:33:14 +00:00
Re-bin
376b7d6d58 Merge remote-tracking branch 'origin/main' into pr-553 2026-03-05 14:28:50 +00:00
Re-bin
bc52ad3dad Merge pull request #1428: feat(custom-provider) session affinity header 2026-03-05 14:27:24 +00:00
Re-bin
fb77176cfd feat(custom-provider): keep instance-level session affinity header for cache locality 2026-03-05 14:25:46 +00:00
Re-bin
a3c68ef140 Merge branch 'main' into pr-1428 2026-03-05 14:12:37 +00:00
Xubin Ren
7b676962ed Merge PR #1568: fix(feishu): isolate lark ws Client event loop from main asyncio loop
fix(feishu): isolate lark ws Client event loop from main asyncio loop
2026-03-05 17:38:57 +08:00
coldxiangyu
97522bfa03 fix(feishu): isolate lark ws Client event loop from main asyncio loop
Commit 0209ad5 moved `import lark_oapi as lark` inside the start()
method (lazy import) to suppress DeprecationWarnings. This had an
unintended side effect: the import now happens after the main asyncio
loop is already running, so lark_oapi's module-level

    loop = asyncio.get_event_loop()

captures the running main loop. When the WebSocket thread then calls
loop.run_until_complete() inside Client.start(), Python raises:

    RuntimeError: This event loop is already running

and the _connect/_disconnect coroutines are never awaited.

Fix: in run_ws(), create a fresh event loop with asyncio.new_event_loop(),
set it as the thread's current loop, and patch lark_oapi.ws.client.loop
to point to this dedicated loop before calling Client.start(). The loop
is closed on thread exit.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-03-05 17:27:17 +08:00
Xubin Ren
fb74281434 Merge PR #1499: fix(qq): add msg_seq to prevent message deduplication error
fix(qq): add msg_seq to prevent message deduplication error
2026-03-05 10:39:45 +08:00
Xubin Ren
2484dc5ea6 Merge PR #1533: fix(tests): resolve failing tests
fix(tests): resolve failing tests
2026-03-05 10:28:39 +08:00
Sergio Sánchez Vallés
d019ff06d2 Merge branch 'main' into fix/test-failures 2026-03-04 20:07:58 +01:00
Sergio Sánchez Vallés
e032faaeff Merge branch 'main' of upstream/main into fix/test-failures 2026-03-04 20:04:00 +01:00
Sergio Sánchez Vallés
0209ad57d9 fix(tests): resolve RequestsDependencyWarning and lark-oapi asyncio/websockets DeprecationWarnings 2026-03-04 19:31:39 +01:00
Xubin Ren
4e9f08cafa Merge PR #1511: fix: add size limit to ReadFileTool to prevent OOM
fix: add size limit to ReadFileTool to prevent OOM
2026-03-05 01:12:40 +08:00
Xubin Ren
fd3b4389d2 Merge PR #1531: fix(feishu): convert audio type to file for API compatibility
fix(feishu): convert audio type to file for API compatibility
2026-03-05 00:38:15 +08:00
Xubin Ren
a156a8ee93 Merge PR #1507: fix: guard validate_params against non-dict input
fix: guard validate_params against non-dict input
2026-03-05 00:36:29 +08:00
Xubin Ren
d9ce3942fa Merge PR #1508: fix: handle invalid ISO datetime in CronTool gracefully
fix: handle invalid ISO datetime in CronTool gracefully
2026-03-05 00:35:16 +08:00
Xubin Ren
522cf89d53 Merge PR #1521: test: fix test failures from refactored cron and context builder
test: fix test failures from refactored cron and context builder
2026-03-05 00:34:01 +08:00
Xubin Ren
a2762351b3 Merge PR #1525: fix(codex): pass reasoning_effort to Codex API
fix(codex): pass reasoning_effort to Codex API
2026-03-05 00:31:09 +08:00
Ben
bdfe7d6449 fix(feishu): convert audio type to file for API compatibility
Feishu's GetMessageResource API only accepts 'image' or 'file' as the
type parameter. When downloading voice messages, nanobot was passing
'audio' which caused the API to reject the request with an error.

This fix converts 'audio' to 'file' in _download_file_sync method
before making the API call, allowing voice messages to be downloaded
and transcribed successfully.

Fixes voice message download failure in Feishu channel.
2026-03-05 00:16:31 +08:00
chengyongru
88d7642c1e test: fix test failures from refactored cron and context builder
- test_context_prompt_cache: Update test to reflect merged runtime
  context and user message (commit ad99d5a merged them into one)
- Remove test_cron_commands.py: cron add CLI command was removed
  in commit c05cb2e (unified scheduling via cron tool)
2026-03-04 17:13:25 +01:00
Sergio Sánchez Vallés
c64fe0afd8 fix(tests): resolve failing tests on main branch
- Unskip matrix logic by adding missing deps (matrix-nio, nh3, mistune)
- Update matrix tests for 'allow_from' default deny security change
- Fix asyncio typing keepalive leak in matrix tests
- Update context prompt cache assert after runtime message merge
- Fix flaky cron service test with mtime sleep
- Remove obsolete test_cron_commands.py testing deleted CLI commands
2026-03-04 16:53:07 +01:00
Daniel Emden
ecdf309404 fix(codex): pass reasoning_effort to Codex API
The OpenAI Codex provider accepts reasoning_effort but silently
discards it. Wire it through as {"reasoning": {"effort": ...}} in
the request body so the config option actually takes effect.
2026-03-04 15:31:56 +01:00
chengyongru
bb8512ca84 test: fix test failures from refactored cron and context builder
- test_context_prompt_cache: Update test to reflect merged runtime
  context and user message (commit ad99d5a merged them into one)
- Remove test_cron_commands.py: cron add CLI command was removed
  in commit c05cb2e (unified scheduling via cron tool)
2026-03-04 20:49:02 +08:00
Kiplangatkorir
ce65f8c11b fix: add size limit to ReadFileTool to prevent OOM
ReadFileTool had no file size check — reading a multi-GB file would
load everything into memory and crash the process. Now:
- Rejects files over ~512KB at the byte level (fast stat check)
- Truncates at 128K chars with a notice if content is too long
- Guides the agent to use exec with head/tail/grep for large files

This matches the protection already in ExecTool (10KB) and
WebFetchTool (50KB).
2026-03-04 11:15:45 +03:00
Kiplangatkorir
edaf7a244a fix: handle invalid ISO datetime in CronTool gracefully
datetime.fromisoformat(at) raises ValueError for malformed strings,
which propagated uncaught and crashed the tool execution. Now catches
ValueError and returns a user-friendly error message instead.
2026-03-04 10:55:17 +03:00
Kiplangatkorir
df8d09f2b6 fix: guard validate_params against non-dict input
When the LLM returns malformed tool arguments (e.g. a list or string
instead of a dict), validate_params would crash with AttributeError
in _validate() when calling val.items(). Now returns a clear
validation error instead of crashing.
2026-03-04 10:53:30 +03:00
Liwx
20bec3bc26 Update qq.py 2026-03-04 14:06:19 +08:00
Liwx
d0a48ed23c Update qq.py 2026-03-04 14:00:40 +08:00
worenidewen
3e83425142 feat(mcp): add SSE transport support with auto-detection 2026-03-04 01:10:19 +08:00
Xubin Ren
1303cc6669 Merge PR #1485: fix: add missed openai dependency
fix: add missed `openai` dependency
2026-03-04 00:14:52 +08:00
cocolato
5f7fb9c75a add missed dependency 2026-03-03 23:40:56 +08:00
Re-bin
c05cb2ef64 refactor(cron): remove CLI cron commands and unify scheduling via cron tool 2026-03-03 05:51:24 +00:00
Re-bin
9a41aace1a Merge PR #1458: prevent cron self-scheduling safely 2026-03-03 05:36:50 +00:00
Re-bin
30803afec0 fix(cron): isolate cron-execution guard with contextvars 2026-03-03 05:36:48 +00:00
Re-bin
ec6430fa0c Merge branch 'main' into pr-1458 2026-03-03 05:18:28 +00:00
Re-bin
caa8acf6d9 Merge PR #1456: merge user messages and harden save_turn multimodal persistence 2026-03-03 05:13:20 +00:00
Re-bin
03b83fb79e fix(agent): skip empty multimodal user entries after runtime-context strip 2026-03-03 05:13:17 +00:00
Nikolas de Hor
da8a4fc68c fix: prevent cron job execution from scheduling new jobs
When a cron job fires, the agent processes the scheduled message and
has access to the cron tool. If the original message resembles a
scheduling instruction (e.g. "remind me in 10 seconds"), the agent
would call cron.add again, creating an infinite feedback loop.

Add a cron-context flag to CronTool that blocks add operations during
cron job execution. The flag is set before process_direct() and cleared
in a finally block to ensure cleanup even on errors.

Fixes #1441
2026-03-03 01:02:33 -03:00
Nikolas de Hor
ad99d5aaa0 fix: merge consecutive user messages into single message
Some LLM providers (Minimax, Dashscope) strictly reject consecutive
messages with the same role. build_messages() was emitting two separate
user messages back-to-back: the runtime context and the actual user
content.

Merge them into a single user message, handling both plain text and
multimodal (image) content. Update _save_turn() to strip the runtime
context prefix from the merged message when persisting to session
history.

Fixes #1414
Fixes #1344
2026-03-03 00:59:58 -03:00