Commit Graph
786 Commits
Author SHA1 Message Date
robbyczgw-cla 43475ed67c Merge remote-tracking branch 'upstream/main' into feat/status-command
# Conflicts:
#	nanobot/channels/telegram.py
2026-03-14 10:48:12 +00:00
Xubin Ren 61f0923c66 fix(telegram): include restart in help text 2026-03-14 10:45:37 +00:00
chengyongruandXubin Ren a2acacd8f2 fix: add exception handling to prevent agent loop crash 2026-03-14 18:34:22 +08:00
Xubin RenandXubin Ren a1241ee68c fix(mcp): clarify enabledTools filtering semantics
- support both raw and wrapped MCP tool names
- treat [\"*\"] as all tools and [] as no tools
- add warnings, tests, and README docs for enabledTools
2026-03-14 18:33:48 +08:00
lihuaandXubin Ren 40fad91ec2 注册mcp时,支持指定tool 2026-03-14 18:33:48 +08:00
lihuaandXubin Ren 4dde195a28 init 2026-03-14 18:33:48 +08:00
Xubin RenandXubin Ren 411b059dd2 refactor: replace <SILENT_OK> with structured post-run evaluation
- Add nanobot/utils/evaluator.py: lightweight LLM tool-call to decide notify/silent after background task execution
- Remove magic token injection from heartbeat and cron prompts
- Clean session history (no more <SILENT_OK> pollution)
- Add tests for evaluator and updated heartbeat three-phase flow
2026-03-14 17:41:08 +08:00
SJK-pyandXubin Ren e6c1f520ac suppress unnecessary heartbeat notifications
Appends a strict instruction to background task prompts (cron and heartbeat) 
directing the agent to return a `<SILENT_OK>` token if there is nothing 
material to report. Adds conditional logic to intercept this token and 
suppress the outbound message to the user, preventing notification spam 
from autonomous background checks.
2026-03-14 17:41:08 +08:00
SJK-pyandXubin Ren 4990c7478b suppress unnecessary cron notifications
Appends a strict instruction to background task prompts (cron and heartbeat) 
directing the agent to return a `<SILENT_OK>` token if there is nothing 
material to report. Adds conditional logic to intercept this token and 
suppress the outbound message to the user, preventing notification spam 
from autonomous background checks.
2026-03-14 17:41:08 +08:00
Peixian GongandXubin Ren 58fc34d3f4 refactor: use shutil.which() instead of shell=True for npm calls
Replace platform-specific shell=True logic with shutil.which('npm') to
resolve the full path to the npm executable. This is cleaner because:

- No shell=True needed (safer, no shell injection risk)
- No platform-specific branching (sys.platform checks removed)
- Works identically on Windows, macOS, and Linux
- shutil.which() resolves npm.cmd on Windows automatically

The npm path check that already existed in _get_bridge_dir() is now
reused as the resolved path for subprocess calls. The same pattern is
applied to channels_login().
2026-03-14 17:19:01 +08:00
Peixian GongandXubin Ren 805228e91e fix: add shell=True for npm subprocess calls on Windows
On Windows, npm is installed as npm.cmd (a batch script), not a direct
executable. When subprocess.run() is called with a list like
['npm', 'install'] without shell=True, Python's CreateProcess cannot
locate npm.cmd, resulting in:

  FileNotFoundError: [WinError 2] The system cannot find the file specified

This fix adds a sys.platform == 'win32' check before each npm subprocess
call. On Windows, it uses shell=True with a string command so the shell
can resolve npm.cmd. On other platforms, the original list-based call is
preserved unchanged.

Affected locations:
- _get_bridge_dir(): npm install, npm run build
- channels_login(): npm start

No behavioral change on Linux/macOS.
2026-03-14 17:19:01 +08:00
Xubin Ren af65145bc8 fix(qq): add configurable message format and onboard backfill 2026-03-14 08:25:44 +00:00
Xubin RenandXubin Ren dbdb43faff feat: channel plugin architecture with decoupled configs
- Add plugin discovery via Python entry_points (group: nanobot.channels)
- Move 11 channel Config classes from schema.py into their own channel modules
- ChannelsConfig now only keeps send_progress + send_tool_hints (extra=allow)
- Each built-in channel parses dict->Pydantic in __init__, zero internal changes
- All channels implement default_config() for onboard auto-population
- nanobot onboard injects defaults for all discovered channels (built-in + plugins)
- Add nanobot plugins list CLI command
- Add Channel Plugin Guide (docs/CHANNEL_PLUGIN_GUIDE.md)
- Fully backward compatible: existing config.json and sessions work as-is
- 340 tests pass, zero regressions
2026-03-14 16:13:38 +08:00
robbyczgw-cla a628741459 feat: add /status command to show runtime info 2026-03-13 16:36:29 +00:00
Xubin Ren ca5047b602 feat(web): multi-provider web search + Jina Reader fetch 2026-03-13 05:44:16 +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 4b50a7b6c0 Merge branch 'main' into pr-1916 2026-03-13 03:57:09 +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
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
Xubin RenandGitHub 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
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 RenandGitHub 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
chengyongru 127ac39063 fix: catch BaseException in MCP connection to handle CancelledError 2026-03-13 10:23:15 +08: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 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 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
HuangMinlongandGitHub 9e9051229e Integrate Langsmith for conversation tracking
Added support for Langsmith API key to enable conversation viewing.
2026-03-12 14:34:32 +08: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
Re-bin bd1ce8f144 Simplify feishu group_policy: default to mention, clean up mention detection 2026-03-12 04:45:57 +00:00
Re-bin 94e9b06086 Merge branch 'main' into pr-1768 2026-03-12 04:38:49 +00:00
Re-bin 64aeeceed0 Add /restart command: restart the bot process from any channel 2026-03-12 04:33:51 +00:00
Re-bin 231b02963d Merge branch 'main' into pr-1751
Made-with: Cursor

# Conflicts:
#	nanobot/agent/loop.py
2026-03-12 03:53:59 +00:00
Re-bin 0a0017ff45 fix: raise tool result history limit to 16k and force save_memory in consolidation 2026-03-12 03:08:53 +00:00
Re-bin 35260ca157 fix: raise persisted tool result limit to 16k 2026-03-12 02:50:28 +00:00
John Doe 3f799531cc Add media download functionality 2026-03-12 06:43:59 +07:00
John Doe 1eedee0c40 add reply context extraction for Telegram messages 2026-03-12 06:23:02 +07:00
Re-bin 0d94211a93 enhance: improve filesystem & shell tools with pagination, fallback matching, and smarter output 2026-03-11 16:20:11 +00:00
Re-bin 9d0db072a3 fix: guard quoted home paths in shell tool 2026-03-11 15:43:04 +00:00
Re-bin 85609c99b3 Merge remote-tracking branch 'origin/main' into pr-1827 2026-03-11 15:32:52 +00:00
Re-bin 9fc74bde9a Merge remote-tracking branch 'origin/main' into pr-1874 2026-03-11 15:26:39 +00:00