Commit Graph

1063 Commits

Author SHA1 Message Date
Re-bin
c34e1053f0 fix(qq): disable botpy file log to fix read-only filesystem error 2026-02-28 16:45:06 +00:00
Re-bin
e0a78d78f9 Merge branch 'main' into pr-1346 2026-02-28 16:43:45 +00:00
Xubin Ren
76c3144c7c Merge PR #1347 to streamline subagent prompt
refactor: streamline subagent prompt by reusing ContextBuilder and SkillsLoader
2026-03-01 00:38:44 +08:00
zerone0x
cfe33ff7cd fix(qq): disable botpy file log to fix read-only filesystem error
When nanobot is run as a systemd service with ProtectSystem=strict,
the process cwd defaults to the read-only root filesystem (/). botpy's
default Client configuration includes a TimedRotatingFileHandler that
writes 'botpy.log' to os.getcwd(), which raises [Errno 30] Read-only
file system.

Pass ext_handlers=False when constructing the botpy Client subclass to
suppress the file handler. nanobot already routes all log output through
loguru, so botpy's file handler is redundant.

Fixes #1343

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-28 17:35:07 +01:00
Re-bin
8545d5790e refactor: streamline subagent prompt by reusing ContextBuilder and SkillsLoader 2026-02-28 16:32:50 +00:00
zhangxiaoyu.york
5d829ca575 bugfix: remove client.stop 2026-03-01 00:30:03 +08:00
Re-bin
a422c606d8 Merge PR #1337: feat(dingtalk): send images and media as proper message types 2026-02-28 16:23:44 +00:00
Re-bin
73a708770e refactor: compress DingTalk helpers 2026-02-28 16:23:43 +00:00
zhangxiaoyu.york
b3af59fc8e bugfix: remove client.stop 2026-03-01 00:20:32 +08:00
JK_Lu
977ca725f2 style: unify code formatting and import order
- Remove trailing whitespace and normalize blank lines
- Unify string quotes and line breaks for long lines
- Sort imports alphabetically across modules
2026-02-28 20:55:43 +08:00
siyuan.qsy
cfc55d626a feat(dingtalk): send images as image messages, keep files as attachments 2026-02-28 20:34:23 +08:00
fengxiaohu
52222a9f84 fix(providers): allow reasoning_content in message history for thinking models 2026-02-28 18:46:15 +08:00
Re-bin
bfc2fa88f3 Merge PR #1325: add message deduplication to WhatsApp channel 2026-02-28 08:38:29 +00:00
Re-bin
95ffe47e34 refactor: use OrderedDict for WhatsApp dedup, consistent with Feishu 2026-02-28 08:38:29 +00:00
Re-bin
d8d954ad46 Merge remote-tracking branch 'origin/main' into pr-1325 2026-02-28 08:33:13 +00:00
Xubin Ren
9e546442d2 Merge PR #1326: use WeakValueDictionary for consolidation locks
refactor: use WeakValueDictionary for consolidation locks
2026-02-28 16:31:16 +08:00
Re-bin
8410f859f7 refactor: use WeakValueDictionary for consolidation locks — auto-cleanup, no manual pop 2026-02-28 08:26:55 +00:00
spartan077
c0ad986504 fix: add message deduplication to WhatsApp channel
Prevent infinite loops by tracking processed message IDs in WhatsApp
channel. The bridge may send duplicate messages which caused the bot
to respond repeatedly with the same generic message.

Changes:
- Add _processed_message_ids deque (max 2000) to track seen messages
- Skip processing if message_id was already processed
- Align WhatsApp dedup with other channels (Feishu, Email, Mochat, QQ)

This fixes the issue where WhatsApp gets stuck in a loop sending
identical responses repeatedly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 13:44:22 +05:30
Re-bin
e1832e75b5 Merge PR #1286: fix Windows path regex truncation in ExecTool 2026-02-28 08:09:56 +00:00
Re-bin
b89b5a7e2c refactor: compress _extract_absolute_paths comments 2026-02-28 08:09:56 +00:00
Re-bin
05e0d271fc Merge remote-tracking branch 'origin/main' into pr-1286 2026-02-28 08:07:07 +00:00
Re-bin
b1f0335090 Merge PR #1294: fix tool hint crash when arguments is a list (Kimi K2.5) 2026-02-28 08:06:20 +00:00
Re-bin
89c0f4cae9 refactor: compress tool hint args handling to two lines 2026-02-28 08:06:20 +00:00
Re-bin
90eb90335a Merge remote-tracking branch 'origin/main' into pr-1294 2026-02-28 08:01:04 +00:00
Xubin Ren
08752fab2f Merge PR #1307 to pass msg_id in QQ C2C reply
fix: pass msg_id in QQ C2C reply to avoid proactive message permissio…
2026-02-28 15:54:39 +08:00
Xubin Ren
44e120dd0b Merge PR #1317: modify Feishu bot permissions in README
Modify Feishu bot permissions in README
2026-02-28 15:48:59 +08:00
Re-bin
72b47446eb Merge PR #1323: fix Feishu interactive card content extraction 2026-02-28 07:40:31 +00:00
Re-bin
7bb7b85788 Merge remote-tracking branch 'origin/main' into pr-1323 2026-02-28 07:36:31 +00:00
Re-bin
1bbc5a6f89 Merge PR #1314: prevent session poisoning from null/error LLM responses 2026-02-28 07:35:07 +00:00
Re-bin
0036116e0b fix: filter empty assistant messages in _save_turn instead of patching at send time 2026-02-28 07:35:07 +00:00
Re-bin
069f93f6f5 Merge remote-tracking branch 'origin/main' into pr-1314 2026-02-28 07:29:04 +00:00
阿正
e440aa72c5 fix the interactive message text cannot be extracted 2026-02-28 15:10:35 +08:00
Yan-ke Guo
936e094a7f Modify Feishu bot permissions in README
Updated permissions for Feishu bot setup instructions.
2026-02-28 14:03:36 +08:00
Xubin Ren
32f42df7ef Merge PR #1316 to remove overly broad "codex" keyword from openai_codex provider
fix: remove overly broad "codex" keyword from openai_codex provider
2026-02-28 12:14:30 +08:00
Nikolas de Hor
cc8864dc1f fix: remove overly broad "codex" keyword from openai_codex provider
The bare keyword "codex" causes false positive matches when any model
name happens to contain "codex" (e.g. "gpt-5.3-codex" on a custom
provider).  This incorrectly routes the request through the OAuth-based
OpenAI Codex provider, producing "OAuth credentials not found" errors
even when a valid custom api_key and api_base are configured.

Keep only the explicit "openai-codex" keyword so that auto-detection
requires the canonical prefix.  Users can still set provider: "custom"
to force the custom endpoint, but auto-detection should not collide.

Closes #1311
2026-02-28 01:01:20 -03:00
Nikolas de Hor
66063abb8c fix: prevent session poisoning from null/error LLM responses
When an LLM returns content: null on a plain assistant message (no
tool_calls), the null gets saved to session history and causes
permanent 400 errors on every subsequent request.

- Sanitize None content on plain assistant messages to "(empty)" in
  _sanitize_empty_content(), matching the existing empty-string handling
- Skip persisting error responses (finish_reason="error") to the
  message history in _run_agent_loop(), preventing poison loops

Closes #1303
2026-02-28 00:57:08 -03:00
GabrielWithTina
8842fb2b4d fix: pass msg_id in QQ C2C reply to avoid proactive message permission error
QQ's bot API requires a msg_id (original inbound message ID) to send a
passive reply. Without it the request is treated as a proactive message
and fails with error 40034102 (无权限). The message_id was already stored
in InboundMessage.metadata and forwarded to OutboundMessage, but was never
read in send().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 09:44:28 +08:00
Michael-lhh
11f1880c02 fix: handle list-type tool arguments in _tool_hint
Some models (e.g., Kimi K2.5 via OpenRouter) return tool call arguments
as a list instead of a dict. This caused an AttributeError when trying
to call .values() on the list.

The fix checks if arguments is a list and extracts the first element
before accessing .values().

Made-with: Cursor
2026-02-28 00:18:00 +08:00
Xubin Ren
a4d95fd064 Merge PR #1293 to generate short alphanumeric tool_call_id for Mistral compatibility
fix: generate short alphanumeric tool_call_id for Mistral compatibility
2026-02-28 00:15:52 +08:00
Re-bin
1fe94898f6 fix: generate short alphanumeric tool_call_id for Mistral compatibility 2026-02-27 16:13:26 +00:00
Xubin Ren
ef09add825 Merge PR #1278 to guide llm grep using timestamp
Fix(prompt): guide llm grep using timestamp
2026-02-27 23:42:05 +08:00
fengxiaohu
7229d86bb3 fix(shell): parse full Windows absolute paths in workspace guard 2026-02-27 21:46:46 +08:00
aiguozhi123456
db4185c8b7 Add timestamp format hint for HISTORY.md grep searching 2026-02-27 11:11:42 +00:00
Xubin Ren
e86cfcde22 Merge PR #1200 to update heartbeat tests to match two-phase tool-call architecture
fix: update heartbeat tests to match two-phase tool-call architecture
2026-02-27 18:10:35 +08:00
Re-bin
fdd2c25aed Merge PR #1222: fix runtime context leaking into session history 2026-02-27 10:07:22 +00:00
Re-bin
bc558d0592 refactor: merge user-role branches in _save_turn 2026-02-27 10:07:22 +00:00
Re-bin
6bdb590028 Merge remote-tracking branch 'origin/main' into pr-1222 2026-02-27 09:57:45 +00:00
Re-bin
a6aa5fbd7c Merge PR #1239: register Matrix channel in manager and schema 2026-02-27 09:53:31 +00:00
Re-bin
12f3365103 fix: remove duplicate import, tidy MatrixConfig comments 2026-02-27 09:53:31 +00:00
Re-bin
2d33371366 Merge remote-tracking branch 'origin/main' into pr-1239 2026-02-27 09:51:33 +00:00