Commit Graph

1355 Commits

Author SHA1 Message Date
Tony
da740c871d test 2026-03-13 14:06:22 +08:00
Xubin Ren
65cbd7eb78 docs: update web search configuration instruction 2026-03-13 05:54:51 +00:00
Tony
d286926f6b feat(memory): implement async background consolidation
Implement asynchronous memory consolidation that runs in the background when
sessions are idle, instead of blocking user interactions after each message.

Changes:
- MemoryConsolidator: Add background task management with idle detection
  * Track session activity timestamps
  * Background loop checks idle sessions every 30s
  * Consolidation triggers only when session idle > 60s
- AgentLoop: Integrate background task lifecycle
  * Start consolidation task when loop starts
  * Stop gracefully on shutdown
  * Record activity on each message
- Refactor maybe_consolidate_by_tokens: Keep sync API but schedule async
- Add debug logging for consolidation completion

Benefits:
- Non-blocking: Users no longer wait for consolidation after responses
- Efficient: Only consolidate idle sessions, avoiding redundant work
- Scalable: Background task can process multiple sessions efficiently
- Backward compatible: Existing API unchanged

Tests: 11 new tests covering background task lifecycle, idle detection,
scheduling, and error handling. All passing.

🤖 Generated with Claude Code
2026-03-13 13:52:36 +08:00
Xubin Ren
3040102c02 Merge PR #398: multi-provider web search 2026-03-13 05:44:16 +00:00
Xubin Ren
ca5047b602 feat(web): multi-provider web search + Jina Reader fetch 2026-03-13 05:44:16 +00:00
Xubin Ren
511a335e82 Merge branch 'main' into pr-398 2026-03-13 05:12:10 +00:00
Xubin Ren
04b45e0e5c Merge PR #1920: langsmith integration 2026-03-13 04:54:22 +00:00
Xubin Ren
20b4fb3bff fix: langsmith callback 防覆盖 + 加 optional dep 2026-03-13 04:54:22 +00:00
Xubin Ren
da325e4532 Merge branch 'main' into pr-1920 2026-03-13 04:20:14 +00:00
Xubin Ren
3ee80b000c Merge PR #1949: docs: correct BaiLian dashscope apiBase endpoint
docs: correct BaiLian dashscope apiBase endpoint
2026-03-13 12:18:00 +08:00
Xubin Ren
bd4ec46681 merge: PR #1916 add CI workflow + fix matrix init + test cleanup 2026-03-13 04:05:11 +00:00
Xubin Ren
84b107cf6c fix(ci): upgrade setup-python, add system deps, simplify test assertions 2026-03-13 04:05:08 +00:00
Xubin Ren
4b50a7b6c0 Merge branch 'main' into pr-1916 2026-03-13 03:57:09 +00:00
Xubin Ren
2490af99d4 merge: PR #1810 validate save_memory payload + raw-archive fallback 2026-03-13 03:54:53 +00:00
Xubin Ren
6d3a0ab6c9 fix(memory): validate save_memory payload and raw-archive on repeated failure
- Require both history_entry and memory_update, reject null/empty values
- Fallback to tool_choice=auto when provider rejects forced function call
- After 3 consecutive consolidation failures, raw-archive messages to
  HISTORY.md without LLM summarization to prevent context window overflow
2026-03-13 03:53:50 +00:00
Hua
83826f3904 Add persona and language command localization 2026-03-13 11:32:06 +08:00
Xubin Ren
60c29702cc Merge branch 'main' into pr-1810
# Conflicts:
#	nanobot/agent/memory.py
#	tests/test_memory_consolidation_types.py
2026-03-13 03:29:16 +00:00
Hua
b2584dd2cf Merge remote-tracking branch 'origin/main' 2026-03-13 11:24:46 +08:00
Xubin Ren
62a2e71748 Merge PR #1958: fix(restart): use -m nanobot for Windows compatibility
fix(restart): use -m nanobot for Windows compatibility
2026-03-13 11:19:57 +08:00
Xubin Ren
4f77b9385c fix(memory): fallback to tool_choice=auto when provider rejects forced function call
Some providers (e.g. Dashscope in thinking mode) reject object-style
tool_choice with "does not support being set to required or object".
Retry once with tool_choice="auto" instead of failing silently.

Made-with: Cursor
2026-03-13 03:18:08 +00:00
Xubin Ren
e30d19e94d merge: PR #1919 reorder Hatch build tables in pyproject 2026-03-13 03:07:27 +00:00
Xubin Ren
4f05e30331 Merge remote-tracking branch 'origin/main' into pr-1919 2026-03-13 03:02:17 +00:00
chengyongru
6ad30f12f5 fix(restart): use -m nanobot for Windows compatibility
On Windows, sys.argv[0] may be just "nanobot" without full path when
running from PATH. os.execv() doesn't search PATH, causing restart to
fail with "No such file or directory".

Fix by using `python -m nanobot` instead of relying on sys.argv[0].

Fixes #1937
2026-03-13 11:01:01 +08:00
Xubin Ren
ba045f56d8 Merge PR #1941: fix(qq): restore plain text replies for legacy clients
fix(qq): restore plain text replies for legacy clients
2026-03-13 10:57:58 +08:00
Hua
52097f9836 Merge remote-tracking branch 'origin/main' 2026-03-13 10:57:24 +08:00
Xubin Ren
aab909e936 Merge PR #1953: fix: catch BaseException in MCP connection to handle CancelledError
fix: catch BaseException in MCP connection to handle CancelledError
2026-03-13 10:57:11 +08:00
Xubin Ren
fb9d54da21 docs: update .gitignore to add .docs 2026-03-13 02:41:52 +00:00
chengyongru
127ac39063 fix: catch BaseException in MCP connection to handle CancelledError 2026-03-13 10:23:15 +08:00
Hua
f4018dcce5 Merge remote-tracking branch 'origin/main' 2026-03-13 09:39:01 +08:00
Frank
d48dd00682 docs: correct BaiLian dashscope apiBase endpoint 2026-03-12 18:23:05 -07:00
Frank
a09245e919 fix(qq): restore plain text replies for legacy clients 2026-03-12 12:48:25 -07:00
Re-bin
774452795b fix(memory): use explicit function name in tool_choice for DashScope compatibility 2026-03-12 16:09:24 +00:00
Re-bin
109ae13301 Merge PR #1930: fix async interactive CLI formatting with prompt_toolkit 2026-03-12 15:38:39 +00:00
Re-bin
3fa62e7fda fix: remove duplicate dim/arrow prefix in interactive progress line 2026-03-12 15:38:39 +00:00
Re-bin
48c74a11d4 Merge remote-tracking branch 'origin/main' into pr-1930 2026-03-12 15:28:57 +00:00
Re-bin
ab087ed05f Merge PR #1608: add VolcEngine/BytePlus providers and improve local provider auto-selection 2026-03-12 15:22:15 +00:00
Re-bin
3467a7faa6 fix: improve local provider auto-selection and update docs for VolcEngine/BytePlus 2026-03-12 15:22:15 +00:00
Jiajun Xie
ec6e099393 feat(ci): add GitHub Actions workflow for test directory
- nanobot/channels/matrix.py: Add keyword-only parameters restrict_to_workspace/workspace to MatrixChannel.__init__ and assign them to _restrict_to_workspace/_workspace with proper type conversion and path resolution
- tests/test_commands.py: Add _strip_ansi() function to remove ANSI escape codes, use regex assertions for --workspace/--config parameters to allow 1 or 2 dashes
2026-03-12 21:54:22 +08:00
chengdu121
d51ec7f0e8 fix: preserve interactive CLI formatting for async subagent output 2026-03-12 19:15:04 +08:00
gaoyiman
556cb3e83d feat: add support for Ollama local models in ProvidersConfig 2026-03-12 14:58:03 +08:00
gaoyiman
8865b6848c Merge branch 'main' into feat-volcengine-tuning 2026-03-12 14:56:05 +08:00
Hua
cf3c88014f fix: searxng搜索引擎支持 2026-03-12 14:44:19 +08:00
Hua
4de0bf9c4a Merge remote-tracking branch 'origin/main' 2026-03-12 14:40:14 +08:00
HuangMinlong
9e9051229e Integrate Langsmith for conversation tracking
Added support for Langsmith API key to enable conversation viewing.
2026-03-12 14:34:32 +08:00
lvguangchuan001
8e412b9603 [紧急]修复we_chat在pyproject.toml配置的问题 2026-03-12 14:28:33 +08:00
Re-bin
c38579dc22 Merge PR #1900: telegram reply context and media forwarding 2026-03-12 06:16:57 +00:00
Re-bin
64888b4b09 Simplify reply context extraction, fix slash commands broken by reply injection, attach reply media regardless of caption 2026-03-12 06:16:57 +00:00
Re-bin
869149ef1e Merge branch 'main' into pr-1900 2026-03-12 06:06:26 +00:00
Re-bin
6141b95037 fix: feishu bot mention detection — user_id can be None, not just empty string 2026-03-12 06:00:39 +00:00
Hua
10cd9bf228 Merge remote-tracking branch 'origin/main' 2026-03-12 13:43:37 +08:00