Commit Graph

892 Commits

Author SHA1 Message Date
Re-bin
a818fff8fa chore: trim verbose docstrings 2026-02-24 13:47:17 +00:00
Re-bin
a54b0853f0 Merge PR #1071: refactor(web): resolve api_key via property instead of inline 2026-02-24 13:42:35 +00:00
Re-bin
4b9ffea3fc merge origin/main into pr-1071, adopt @property api_key pattern 2026-02-24 13:41:49 +00:00
nanobot-agent
81b669b36e fix(slack): post-process slackify_markdown output to catch leftover artifacts
The slackify_markdown library (markdown-it) fails to convert **bold** when
the closing ** is immediately followed by non-space text (e.g. **Status:**OK).
This is a very common LLM output pattern that results in raw ** showing up
in Slack messages.

Add _fixup_mrkdwn() post-processor that:
- Converts leftover **bold** → *bold* (Slack mrkdwn)
- Converts leftover ## headers → *bold* (safety net)
- Fixes over-escaped & in bare URLs
- Protects code fences and inline code from being mangled

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-24 12:44:17 +00:00
nanobot-agent
8686f060d9 fix(slack): add post-processing to fix mrkdwn conversion edge cases
The slackify_markdown library misses several patterns that LLMs commonly
produce, causing raw Markdown symbols (**bold**, ##headers) to appear
in Slack messages.

Add _fixup_mrkdwn() post-processor that:
- Converts leftover **bold** patterns (e.g. **Status:**OK where closing
  ** is adjacent to non-space chars)
- Fixes &amp; over-escaping in bare URLs
- Protects code blocks from false-positive fixups

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-24 12:43:21 +00:00
aiguozhi123456
07ae82583b fix: pass path_append from config to ExecTool 2026-02-24 12:31:18 +00:00
Re-bin
0e4dba8d19 Merge PR #1062: fix(mcp): disable httpx default timeout for HTTP transport 2026-02-24 12:15:33 +00:00
Re-bin
e080902d61 Merge remote-tracking branch 'origin/main' into pr-1062 2026-02-24 12:14:00 +00:00
aiguozhi123456
7be278517e fix(exec): use empty default and os.pathsep for cross-platform 2026-02-24 12:13:52 +00:00
Re-bin
f828a1d5d1 fix(gateway): show actual heartbeat interval in startup log 2026-02-24 12:09:19 +00:00
Re-bin
e4888d39f7 Merge PR #1077: fix(email): auto_reply_enabled should not block proactive sends 2026-02-24 12:08:13 +00:00
Re-bin
c6b933df4a Merge remote-tracking branch 'origin/main' into pr-1077 2026-02-24 11:38:38 +00:00
Re-bin
f514ba02e9 Merge PR #1090: feat(feishu): extract and download images from post messages 2026-02-24 11:32:04 +00:00
Re-bin
04218276ab Merge remote-tracking branch 'origin/main' into pr-1090 2026-02-24 11:31:40 +00:00
Re-bin
cd5a8ac03d Merge PR #1061: fix(memory): handle JSON-string tool call arguments from providers 2026-02-24 11:23:10 +00:00
Re-bin
d546cbac6e style(memory): use loguru {} formatting in warning 2026-02-24 11:23:10 +00:00
Re-bin
b9eb9d4963 Merge remote-tracking branch 'origin/main' into pr-1061 2026-02-24 11:22:01 +00:00
Re-bin
abd35b1295 Merge PR #1098: fix(web): resolve API key on each call + improve error message 2026-02-24 11:18:33 +00:00
Re-bin
cda3a02f68 style(web): inline api key resolution, remove unnecessary method 2026-02-24 11:18:33 +00:00
Re-bin
fdf24e8fd2 Merge branch 'main' into pr-1098 2026-02-24 11:14:37 +00:00
Xubin Ren
8d1eec114a Merge PR #1102 to replace HEARTBEAT_OK token with virtual tool-call decision
fix(heartbeat): replace HEARTBEAT_OK token with virtual tool-call decision
2026-02-24 19:07:55 +08:00
Re-bin
ec55f77912 fix(heartbeat): replace HEARTBEAT_OK token with virtual tool-call decision 2026-02-24 11:04:56 +00:00
coldxiangyu
ef57225974 fix(web): resolve API key on each call + improve error message
- Defer Brave API key resolution to execute() time instead of __init__,
  so env var or config changes take effect without gateway restart
- Improve error message to reference actual config path
  (tools.web.search.apiKey) instead of only mentioning env var

Fixes #1069 (issues 1 and 2 of 3)
2026-02-24 18:19:47 +08:00
xzq.xu
4f8033627e feat(feishu): support images in post (rich text) messages
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-24 13:42:07 +08:00
aiguozhi123456
abcce1e1db feat(exec): add path_append config to extend PATH for subprocess 2026-02-24 03:18:23 +00:00
chengyongru
91e13d91ac fix(email): allow proactive sends when autoReplyEnabled is false
Previously, `autoReplyEnabled=false` would block ALL email sends,
including proactive emails triggered from other channels (e.g., asking
nanobot on Feishu to send an email).

Now `autoReplyEnabled` only controls automatic replies to incoming
emails, not proactive sends. This allows users to disable auto-replies
while still being able to ask nanobot to send emails on demand.

Changes:
- Check if recipient is in `_last_subject_by_chat` to determine if
  it's a reply
- Only skip sending when it's a reply AND auto_reply_enabled is false
- Add test for proactive send with auto_reply_enabled=false
- Update existing test to verify reply behavior
2026-02-24 04:27:14 +08:00
haosenwang1018
8de2f8d588 fix: preserve reasoning_content in message sanitization for thinking models
_sanitize_messages strips all non-standard keys from messages, including
reasoning_content. Thinking-enabled models like Moonshot Kimi k2.5
require reasoning_content to be present in assistant tool call messages
when thinking mode is on, causing a BadRequestError (#1014).

Add reasoning_content to _ALLOWED_MSG_KEYS so it passes through
sanitization when present.

Fixes #1014
2026-02-24 04:21:55 +08:00
haosenwang1018
eeaad6e0c2 fix: resolve API key at call time so config changes take effect without restart
Previously, WebSearchTool cached the API key in __init__, so keys added
to config.json or env vars after gateway startup were never picked up.
This caused a confusing 'BRAVE_API_KEY not configured' error even after
the key was correctly set (issue #1069).

Changes:
- Store the init-time key separately, resolve via property at each call
- Improve error message to guide users toward the correct fix

Closes #1069
2026-02-24 04:06:22 +08:00
Re-bin
30361c9307 refactor: replace cron usage docs in TOOLS.md with reference to cron skill 2026-02-23 18:28:09 +00:00
dulltackle
f8dc6fafa9 **fix(mcp): Remove default timeout for HTTP transport to avoid tool timeout conflicts**
Always provide an explicit httpx client to prevent MCP HTTP transport from inheriting httpx's default 5-second timeout, thereby avoiding conflicts with the upper layer tool's timeout settings.
2026-02-24 01:26:56 +08:00
alairjt
3eeac4e8f8 Fix: handle non-string tool call arguments in memory consolidation
Fixes #1042. When the LLM returns tool call arguments as a dict or
JSON string instead of parsed values, memory consolidation would fail
with "TypeError: data must be str, not dict".

Changes:
- Add type guard in MemoryStore.consolidate() to parse string arguments
  and reject unexpected types gracefully
- Add regression tests covering dict args, string args, and edge cases
2026-02-23 13:59:49 -03:00
Re-bin
2f573e591b fix(session): get_history uses last_consolidated cursor, aligns to user turn 2026-02-23 16:57:08 +00:00
Re-bin
35e3f7ed26 fix(templates): tighten AGENTS.md tool call guidelines to reduce hallucinations 2026-02-23 14:10:43 +00:00
Re-bin
c76a8d2e83 Merge PR #1029: fix: break Discord typing loop on persistent HTTP failure 2026-02-23 14:06:36 +00:00
Re-bin
3c2cc3a71c Merge remote-tracking branch 'origin/main' into pr-1029 2026-02-23 14:01:43 +00:00
Re-bin
f4b3bbd87c Merge PR #1039: fix(heartbeat): make start idempotent and add tests 2026-02-23 13:59:47 +00:00
Re-bin
eae6059889 fix: remove extra blank line 2026-02-23 13:59:47 +00:00
Re-bin
6f4d1c2cdc merge origin/main into pr-1039, adopt HEARTBEAT_OK in-check and on_notify 2026-02-23 13:57:28 +00:00
Xubin Ren
54e350a496 Merge PR #1054 to deliver agent response to user and fix HEARTBEAT_OK detection
fix(heartbeat): deliver agent response to user and fix HEARTBEAT_OK detection
2026-02-23 21:52:08 +08:00
Re-bin
7671239902 fix(heartbeat): suppress progress messages and deliver agent response to user 2026-02-23 13:45:09 +00:00
Re-bin
2c09f23c02 Merge PR #1048: feat(slack): isolate session context per thread 2026-02-23 13:10:55 +00:00
Re-bin
2b983c708d refactor: pass session_key as explicit param instead of via metadata 2026-02-23 13:10:47 +00:00
Re-bin
0be70b05b1 Merge remote-tracking branch 'origin/main' into pr-1048 2026-02-23 13:04:54 +00:00
Re-bin
ea1c4ef025 fix: suppress heartbeat progress messages to external channels 2026-02-23 12:33:29 +00:00
Paul
1f7a81e5ee feat(slack): isolate session context per thread
Each Slack thread now gets its own conversation session instead of
sharing one session per channel. DM sessions are unchanged.

Added as a generic feature to also support if Feishu threads support
is added in the future.
2026-02-23 10:23:55 +00:00
Xubin Ren
b2a1d1208e Merge PR #1046 to improve agent reliability: behavioral constraints, full tool history, error hints
improve agent reliability: behavioral constraints, full tool history, error hints
2026-02-23 17:16:09 +08:00
Re-bin
d9462284e1 improve agent reliability: behavioral constraints, full tool history, error hints 2026-02-23 09:13:08 +00:00
Re-bin
491739223d fix: lower default temperature from 0.7 to 0.1 2026-02-23 08:24:53 +00:00
Xubin Ren
e69ff8ac0e Merge pull request #1043 to move workspace/ to nanobot/templates/ for packaging
refactor: move workspace/ to nanobot/templates/ for packaging
2026-02-23 16:11:44 +08:00
Re-bin
577b3d104a refactor: move workspace/ to nanobot/templates/ for packaging 2026-02-23 08:08:01 +00:00