Commit Graph

554 Commits

Author SHA1 Message Date
Darye
523b2982f4 fix: fixed not logging tool uses if a think fragment had them attached.
if a think fragment had a tool attached, the tool use would not log. now it does
2026-02-19 05:22:00 +01:00
chtangwin
124c611426 Fix: Add ensure_ascii=False to WhatsApp send payload
The send() payload contains user message content (msg.content) which
may include non-ASCII characters (e.g. CJK, German umlauts, emoji).

The auth frame and Discord heartbeat/identify payloads are left
unchanged as they only carry ASCII protocol fields.
2026-02-18 18:46:23 -08:00
chtangwin
a2379a08ac Fix: Ensure UTF-8 encoding and ensure_ascii=False for remaining file/JSON operations 2026-02-18 18:37:17 -08:00
chtangwin
c7b5dd9350 Fix: Ensure UTF-8 encoding for all file operations 2026-02-18 18:28:54 -08:00
Nikolas de Hor
464352c664 fix: allow one retry for models that send interim text before tool calls
Some LLM providers (MiniMax, Gemini Flash, GPT-4.1, etc.) send an
initial text-only response like "Let me investigate..." before actually
making tool calls. The agent loop previously broke immediately on any
text response without tool calls, preventing these models from ever
using tools.

Now, when the model responds with text but hasn't used any tools yet,
the loop forwards the text as progress to the user and gives the model
one additional iteration to make tool calls. This is limited to a
single retry to prevent infinite loops.

Closes #705
2026-02-18 21:31:12 -03:00
Nikolas de Hor
33d760d312 fix: handle /help command directly in Telegram, bypassing ACL check
The /help command was routed through _forward_command → _handle_message
→ is_allowed(), which denied access to users not in the allowFrom list.
Since /help is purely informational, it should be accessible to all
users — similar to how /start already works with its own handler.

Add a dedicated _on_help handler that replies directly without going
through the message bus access control.

Closes #687
2026-02-18 21:31:11 -03:00
Nikolas de Hor
107a380e61 fix: prevent duplicate memory consolidation tasks per session
Add a `_consolidating` set to track which sessions have an active
consolidation task. Skip creating a new task if one is already in
progress for the same session key, and clean up the flag when done.

This prevents the excessive API calls reported when messages exceed
the memory_window threshold — previously every single message after
the threshold triggered a new background consolidation.

Closes #751
2026-02-18 21:31:09 -03:00
Clayton Wilson
4367038a95 fix: make cron run command actually execute the agent
Wire up an AgentLoop with an on_job callback in the cron_run CLI
command so the job's message is sent to the agent and the response
is printed. Previously, CronService was created with no on_job
callback, causing _execute_job to skip execution silently and
always report success.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:42:33 -06:00
ruby childs
536ed60a05 Fix safety guard false positive on 'format' in URLs
The deny pattern `\b(format|mkfs|diskpart)\b` incorrectly blocked
commands containing "format" inside URLs (e.g. `curl https://wttr.in?format=3`)
because `\b` fires at the boundary between `?` (non-word) and `f` (word).

Split into two patterns:
- `(?:^|[;&|]\s*)format\b` — only matches `format` as a standalone
  command (start of line or after shell operators)
- `\b(mkfs|diskpart)\b` — kept as-is (unique enough to not false-positive)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 16:39:06 -05:00
Darye
3ac5513004 If given a message_id to telegram provider send, the bot will try to reply to that message 2026-02-18 20:27:48 +01:00
Darye
c865b293a9 feat: enhance message context handling by adding message_id parameter 2026-02-18 20:18:27 +01:00
Your Name
1663517998 feat: Add VolcEngine LLM provider support
- Add VolcEngine ProviderSpec entry in registry.py
- Add volcengine to ProvidersConfig class in schema.py
- Update model providers table in README.md
- Add description about VolcEngine coding plan endpoint
2026-02-19 03:02:16 +08:00
Alexander Minges
4a85cd9a11 fix(cron): add service-layer timezone validation
Adds `_validate_schedule_for_add()` to `CronService.add_job` so that
invalid or misplaced `tz` values are rejected before a job is persisted,
regardless of which caller (CLI, tool, etc.) invoked the service.

Surfaces the resulting `ValueError` in `nanobot cron add` via a
`try/except` so the CLI exits cleanly with a readable error message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 19:33:23 +01:00
dxtime
c5b4331e69 feature: Added custom headers for MCP Auth use. 2026-02-19 01:21:17 +08:00
Xubin Ren
8de36d398f docs: update news about release information 2026-02-18 23:09:55 +08:00
Re-bin
1f1f5b2d27 docs: update v0.1.4 release news 2026-02-18 14:41:13 +00:00
Re-bin
b14d4711c0 release: v0.1.4 2026-02-18 14:31:26 +00:00
Xubin Ren
92d279924f Merge pull request #802 to enable stream intermediate progress
feat: stream intermediate progress to user during tool execution
2026-02-18 22:28:37 +08:00
Re-bin
715b2db24b feat: stream intermediate progress to user during tool execution 2026-02-18 14:23:51 +00:00
Ivan
e44f14379a fix: sanitize messages and ensure 'content' for strict LLM providers
- Strip non-standard keys like 'reasoning_content' before sending to LLM
- Always include 'content' key in assistant messages (required by StepFun)
- Add _sanitize_messages to LiteLLMProvider to prevent 400 BadRequest errors
2026-02-18 11:57:58 +03:00
Re-bin
ce4f00529e Merge PR #713: scope sessions to workspace with migration and tool metadata 2026-02-18 05:16:00 +00:00
Re-bin
27a131830f refine: migrate legacy sessions on load and simplify get_history 2026-02-18 05:09:57 +00:00
Re-bin
5c61f30546 Merge branch 'main' into pr-713 2026-02-18 04:58:59 +00:00
Re-bin
4c577761e2 Merge PR #630: add SiliconFlow provider 2026-02-18 03:53:00 +00:00
Re-bin
80a5a8c983 feat: add siliconflow provider support 2026-02-18 03:52:53 +00:00
Re-bin
df09ba1232 Merge branch 'main' into pr-630 2026-02-18 03:13:00 +00:00
Re-bin
7f8a3dfc0f Merge PR #312: add GitHub Copilot OAuth login and provider status display 2026-02-18 03:09:35 +00:00
Re-bin
d54831a35f feat: add github copilot oauth login and improve provider status display 2026-02-18 03:09:09 +00:00
Re-bin
8f6dd8708f Merge branch 'main' into pr-312 2026-02-18 02:57:11 +00:00
Re-bin
74bec26698 Merge branch 'main' of https://github.com/HKUDS/nanobot 2026-02-18 02:51:16 +00:00
ras_bot
e5e5f02e73 merge: upstream/main into feat/add-siliconflow-provider, resolve schema conflict
- Keep siliconflow in ProvidersConfig
- Keep openai_codex and github_copilot from upstream/main

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-18 10:50:15 +08:00
Re-bin
43590145ee Merge PR #784: configurable Slack thread reply and reaction emoji 2026-02-18 02:48:28 +00:00
Xubin Ren
95fead24e0 Merge pull request #786 to add custom provider with direct openai-compatible support
feat: add custom provider with direct openai-compatible support
2026-02-18 10:40:26 +08:00
Re-bin
e2a0d63909 feat: add custom provider with direct openai-compatible support 2026-02-18 02:39:15 +00:00
Jeroen Evens
16127d49f9 [github] Fix Oauth login 2026-02-17 23:07:04 +01:00
Jeroen Evens
b161fa4f9a [github] Add Github Copilot 2026-02-17 23:07:04 +01:00
Hyudryu
72db01db63 slack: Added replyInThread logic and custom react emoji in config 2026-02-17 13:42:57 -08:00
Xubin Ren
831eb07945 docs: update security guideline 2026-02-18 02:00:30 +08:00
Re-bin
05d06b1eb8 docs: update line count 2026-02-17 17:58:36 +00:00
Re-bin
ed2aa7fe67 Merge PR #765: add Docker Compose support 2026-02-17 17:56:04 +00:00
Re-bin
aad1df5b9b Simplify Docker Compose docs and remove fixed CLI container name 2026-02-17 17:55:48 +00:00
Re-bin
fae573573f Merge branch 'main' into pr-765 2026-02-17 17:50:56 +00:00
Re-bin
090b8fb768 Merge PR #746: enable cron tool in CLI agent mode 2026-02-17 17:49:22 +00:00
Re-bin
7d7d6bcadc Merge branch 'main' into pr-746 2026-02-17 17:46:46 +00:00
Re-bin
711d03e8ac Merge PR #766: use Pydantic alias_generator to fix MCP env key conversion 2026-02-17 17:34:31 +00:00
Re-bin
941c3d9826 style: restore single-line formatting for readability 2026-02-17 17:34:24 +00:00
Simon Guigui
4d4d629928 fix(config): mcpServers env variables should not be converted to snake case 2026-02-17 15:19:21 +01:00
Rajasimman S
c03f2b670b 🐳 feat: add Docker Compose support for easy deployment
Add docker-compose.yml with gateway and CLI services, resource limits,
and comprehensive documentation for Docker Compose usage.
2026-02-17 18:50:03 +05:30
Re-bin
8053193a36 Merge PR #747: add media file sending support for Telegram 2026-02-17 10:38:05 +00:00
Re-bin
5ad9c837df refactor: clean up telegram media sending logic 2026-02-17 10:37:55 +00:00