2893 Commits

Author SHA1 Message Date
04cb
a779e7c29e fix(providers): use max_completion_tokens for gpt-5/o-series on flagless specs (#4261) 2026-06-10 14:47:10 +08:00
yu-xin-c
fd9fc38f41 fix(tools): keep apply_patch additions line-separated 2026-06-10 14:47:01 +08:00
Xubin Ren
1b5f5b94d5 fix(webui): use tabler fork icon 2026-06-10 04:26:06 +08:00
Xubin Ren
ea791f605c fix(webui): restore fork action icon 2026-06-10 04:26:06 +08:00
Xubin Ren
fd947a1fd8 fix(webui): normalize action tooltips 2026-06-10 04:26:06 +08:00
Xubin Ren
1432094bb5 refactor(webui): isolate fork websocket handler 2026-06-10 04:26:06 +08:00
Xubin Ren
916525f94a refactor(webui): shrink fork implementation 2026-06-10 04:26:06 +08:00
Xubin Ren
1f926e3769 refactor(webui): isolate chat fork creation 2026-06-10 04:26:06 +08:00
Xubin Ren
26a58282d4 feat(webui): show forked history boundary 2026-06-10 04:26:06 +08:00
Xubin Ren
73d4b1cb2f feat(webui): persist fork boundary metadata 2026-06-10 04:26:06 +08:00
Bayern4ever-dot
03bca4c0a9 feat(webui): add assistant reply fork-from-here 2026-06-10 04:26:06 +08:00
chengyongru
4a58b83acc
docs: make onboarding friendlier for beginners (#4177)
* docs: make onboarding friendlier for beginners

* docs: build clearer documentation paths

Maintainer edit: turn the onboarding follow-up into a layered docs structure for first-time setup, provider selection, troubleshooting, CLI reference, and source-level architecture. This keeps quick start focused while giving advanced users precise reference paths.

* docs: render architecture flow with mermaid

Maintainer edit: replace the ASCII architecture sketch with a GitHub-rendered Mermaid flowchart so the core runtime path is easier to scan in the PR and README docs.

* docs: recommend model presets for model config

Maintainer edit: make named modelPresets the primary model configuration path and expand fallback preset examples so string fallbacks are clearly preset names, not raw model IDs.

* docs: document api base urls and langfuse setup

Maintainer edit: explain when users need apiBase/base URL in quick start and provider docs, and add Langfuse tracing setup with troubleshooting links.

* docs: use python module pip consistently

Maintainer edit: keep install commands tied to the active Python interpreter by using python -m pip in the Azure optional dependency notes too.

* docs: add non-technical getting started path

Maintainer edit: add a wizard-first guide for users without terminal or JSON background, including a text TUI menu example and links from the main docs entrypoints.

* docs: avoid hard-wrapped prose in user docs

Maintainer edit: unwrap ordinary prose across user-facing documentation while preserving markdown structure, code blocks, tables, lists, and prompt/template files.

* docs: keep desktop list continuations nested

Maintainer edit: preserve list nesting after unwrapping prose in the desktop WebUI sync guide.

* docs: add one-command installer

Maintainer edit: add auditable macOS/Linux and Windows install scripts that install nanobot-ai and start the onboarding wizard, then document the commands in the main onboarding entrypoints.

* docs: add installer dry run mode

Maintainer edit: add --dry-run to the one-command installer scripts so users can preview Python detection, install source, pip command, and wizard behavior without changing their environment.

* docs: clean installer error output

Maintainer edit: make PowerShell installer failures print a concise Error: message instead of Write-Error call-site details.

* docs: add provider setup cookbook

Maintainer edit: add pasteable provider recipes for common hosted, local, fallback, runtime switching, and Langfuse setups, then link the cookbook from onboarding and troubleshooting entrypoints.

* docs: address review feedback

* docs: clarify reader paths

* docs: explain terminal basics for beginners

* docs: clarify wizard navigation

* docs: avoid duplicate onboarding steps

* docs: add setup status check

* docs: explain status output

* docs: remove provider recommendation wording

* docs: explain status diagnostics

* docs: reduce hard-wrapped guidance

* docs: migrate config examples to presets

* docs: clarify python command fallbacks

* docs: improve installer failure recovery

* docs: expand install troubleshooting

* docs: cover installer download failures

* docs: put stable install paths first

* docs: add bundled webui quick path

* docs: clarify provider-neutral setup

* docs: clarify gateway setup for chat surfaces

* docs: improve docs navigation paths

* docs: add configuration quick jump

* docs: clarify provider secret variables

* chore: request PR review acknowledgement

Empty commit: please read the PR review comments and reply on the PR to confirm that you have received them.

This commit intentionally changes no files; it exists only to notify the remote Codex run so it can end its active goal.

* docs: add README start here guide

* docs: avoid provider recommendation wording

* docs: guide next steps after first reply

* docs: explain merging JSON snippets

* docs: add CLI command chooser

* docs: add configuration task map

* docs: add deployment readiness guide

* docs: simplify WebUI entry paths

* docs: add provider recipe chooser

* docs: fix provider factual references

Update OpenRouter and LongCat model examples, align Bedrock guidance, and make fallback snippets schema-valid.

Also correct group policy wording and image-generation provider lists to match the current code.

* fix: keep PowerShell installer from closing caller shell

* docs: mention self-guided configuration
2026-06-10 00:36:22 +08:00
chengyongru
56ce18167e docs: clarify email post-action expunge fallback
maintainer edit: clarify that postActionExpunge only allows the broad EXPUNGE fallback when UID-scoped expunge is unavailable or fails.
2026-06-09 14:50:59 +08:00
Flávio Veloso Soares
0580c186c1 test(email): update tests for postActionExpunge option 2026-06-09 14:50:59 +08:00
Flávio Veloso Soares
6de8d7f52e feat(email): add postActionExpunge option to gate broad IMAP expunge 2026-06-09 14:50:59 +08:00
Flávio Veloso Soares
1d683f0f18 style(email): fix import order via ruff 2026-06-09 14:50:59 +08:00
Flávio Veloso Soares
b96ed1b7c6 docs(email): clarify _fetch_new_messages return docstring 2026-06-09 14:50:59 +08:00
Flávio Veloso Soares
4369eb20fc feat(email): support IMAP MOVE and UID expunge fallbacks 2026-06-09 14:50:59 +08:00
Flávio Veloso Soares
ec5460d23e feat(email): add configurable post-action handling 2026-06-09 14:50:59 +08:00
Flávio Veloso Soares
85ab55aeee refactor(email): extract IMAP session helper 2026-06-09 14:50:59 +08:00
chengyongru
5bd4a83e85 fix(webui): render TeX math delimiters 2026-06-09 14:50:49 +08:00
chengyongru
0a396aa6e2
Improve tool call validation strictness (#4190)
* Improve tool call validation strictness

Reject near-miss tool names without executing suggested tools. Require object-shaped tool parameters while preserving only lossless JSON wire-shape normalization.

* Tighten tool call argument validation

* Simplify tool argument validation tests

* Improve tool name suggestions

* Simplify tool suggestion helpers

* Limit tool suggestions to canonical matches

* Allow repair only for tool history replay

* Clarify non-object tool argument errors

* Inline replay tool argument normalization

* Track only successful tool executions

* Reject JSON null tool arguments
2026-06-09 14:50:40 +08:00
comadreja
f3eb2aa08b feat(transcription): add AssemblyAI as transcription provider
Add AssemblyAI as a third transcription provider option alongside
OpenAI and Groq. AssemblyAI offers better accuracy for certain
audio types (distant voices, noisy environments) and serves as a
reliable fallback when other providers struggle.

Changes:
- Add AssemblyAITranscriptionProvider class in providers/transcription.py
- Add 'assemblyai' option in base channel's transcribe_audio()
- Per-channel configuration via transcriptionProvider in config

Usage:
  Set transcriptionProvider: 'assemblyai' and provide an AssemblyAI
  API key via transcriptionApiKey in the channel config.
2026-06-09 05:33:18 +08:00
Xubin Ren
f183b37542 test(webui): cover Xiaomi MIMO provider alias 2026-06-09 04:29:09 +08:00
NanoBot
c20ecc52d7 feat(transcription): add Xiaomi MiMo ASR provider (mimo-v2.5-asr)
Add support for Xiaomi MiMo ASR as a third transcription backend alongside
Groq and OpenAI Whisper. Xiaomi ASR uses the /v1/chat/completions endpoint
with base64-encoded audio input, rather than the standard Whisper multipart
upload format.

Co-Authored-By:连 <lian@tangping.homes>
2026-06-09 04:29:09 +08:00
Xubin Ren
552ec18a3c test(webui): cover OpenRouter provider brand 2026-06-09 04:01:37 +08:00
Ilia Breitburg
0eb3010e40 feat(transcription): configurable STT model + OpenRouter provider
Add a `transcriptionModel` channel setting and an OpenRouter transcription
backend so voice messages can be transcribed through OpenRouter's
speech-to-text endpoint (e.g. nvidia/parakeet-tdt-0.6b-v3, openai/whisper-1),
alongside the existing Groq/OpenAI Whisper providers.

- schema: add channels.transcriptionModel (None = provider default)
- providers/transcription: extract a shared POST/retry skeleton; add a
  JSON+base64 OpenRouterTranscriptionProvider; make the STT model a
  constructor param on all providers instead of hardcoding it
- channels: route transcriptionProvider="openrouter" and thread the model
  through the manager to each channel
- docs + tests

Only dedicated STT models work on OpenRouter's transcription endpoint;
chat LLMs (e.g. google/gemini-3.5-flash) are rejected there.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 04:01:37 +08:00
axelray-dev
28f3a20d64 feat(providers): add extra_query config for OpenAI-compatible providers
Adds ProviderConfig.extra_query, threaded into AsyncOpenAI(default_query)
so that Azure-style gateways requiring query params like api-version can
be configured without URL hacks.

Also updates provider_signature to track extra_query changes so per-turn
refresh rebuilds the provider when the value changes.

Addresses the extra_query portion of #4204. The max_completion_tokens
model-awareness enhancement is intentionally left separate.
2026-06-09 03:18:14 +08:00
Xubin Ren
9c81280300
feat(transcription): add shared voice input support (#4232)
* feat(webui): add voice transcription input

* feat(webui): render ANSI output in code blocks

* refactor(webui): isolate voice recorder logic

* refactor(transcription): keep websocket ingress thin

* refactor(transcription): resolve channel audio settings on demand

* style(webui): neutralize voice waveform color

* feat(webui): add voice input tooltip

* feat(webui): add voice input keyboard shortcut

* fix(webui): distinguish voice shortcut platforms

* fix(webui): place voice button after model selector

* refactor(webui): share voice hold recording helpers

* fix(desktop): allow microphone voice input

* fix(webui): stabilize token usage month labels

* feat(webui): show voice input on settings overview

* fix(webui): label voice capability as recognition

* fix(webui): align capability overview status

* refactor(webui): isolate transcription socket handling

* fix(webui): soften silent voice waveform

* refactor(audio): clarify transcription service location

* docs(transcription): clarify audio and provider boundaries

* fix(exec): reduce session output polling flake
2026-06-09 01:08:49 +08:00
chengyongru
06d454a225 test: cover MCP redirect guard wiring
Maintainer edit: make the unsafe redirect regression go through connect_mcp_servers so both SSE and streamable HTTP prove that the request hook is attached to the MCP clients before redirects are followed.
2026-06-08 16:03:57 +08:00
chengyongru
a73924f77e docs: document MCP SSRF allowlist behavior
Maintainer edit: explain that HTTP/SSE MCP now uses the shared SSRF guard before connecting and before following redirects, so local or private HTTP MCP endpoints require an explicit tools.ssrfWhitelist entry.
2026-06-08 16:03:57 +08:00
Stellar鱼
ed0aeb1ea9 fix(mcp): reject unsafe HTTP URLs before probe 2026-06-08 16:03:57 +08:00
chengyongru
6e6470daa0 docs: remove nightly branch guidance 2026-06-08 16:03:24 +08:00
chengyongru
8fe0149c65 refactor(webui): simplify token usage heatmap 2026-06-08 16:02:12 +08:00
chengyongru
7510918610 fix(webui): align token usage heatmap 2026-06-08 16:02:12 +08:00
chengyongru
631fdb4a46 test: cover empty reasoning_content history preservation
maintainer edit: add SDK-object and tool-call history regressions so the empty-string reasoning_content fix is covered across both parse branches and the sanitized request path.
2026-06-08 01:08:27 +08:00
michaelxer
05de864f5b fix: preserve empty-string reasoning_content instead of coercing to None
Custom providers (e.g. DeepSeek) may return reasoning_content as an
empty string "" to explicitly indicate no reasoning occurred. The
previous truthiness checks (, ) treated "" as falsy
and converted it to None, which caused the field to be dropped from
the message history entirely. Providers that require reasoning_content
on all assistant messages then rejected subsequent requests.

Replace truthiness checks with identity checks () so that
empty-string reasoning_content is preserved as-is. The streaming path
is unchanged since an empty join genuinely means no chunks received.

Fixes #4105
2026-06-08 01:08:27 +08:00
dvp
4f5f965f09
fix(whatsapp): handle LID group mentions (#2663)
Co-authored-by: Xubin Ren <52506698+Re-bin@users.noreply.github.com>
2026-06-07 18:02:39 +08:00
comadreja
eec59c05de feat(bridge): WhatsApp forwarded message detection, startup guard, and contact handling
Three improvements to the WhatsApp Baileys bridge:

1. Forwarded message detection: Extracts contextInfo.isForwarded from
   all message types (text, image, video, audio, document) and passes
   it as isForwarded in the InboundMessage. Allows the agent to
   distinguish forwarded content from direct messages — useful for
   different handling (e.g., transcribe-only vs execute as instruction).

2. Startup timestamp guard: Records the timestamp when the bridge
   starts and drops any messages with messageTimestamp older than
   startup time. Prevents replaying message history on reconnect,
   which caused duplicate processing and stale command execution.

3. Contact message handling: Adds support for contactMessage and
   contactsArrayMessage types, extracting displayName and vcard
   data instead of silently dropping shared contacts.

Changes:
- Add isForwarded field to InboundMessage interface
- Add startupTimestamp guard in message processing loop
- Add contactMessage/contactsArrayMessage extraction
- Extract contextInfo.isForwarded from all media message types
2026-06-06 12:25:24 -05:00
Xubin Ren
ab9f49970d
feat(desktop): polish desktop shell and shared WebUI surfaces (#4195)
* feat(desktop): add native host scaffold

* feat(webui): track turns and usage in gateway

* feat(webui): polish desktop chat experience

* feat(apps): add ArcGIS and Joplin logos

* feat(desktop): polish shell and shared surfaces

* fix(webui): avoid preview chips for glob references

* test: align CI expectations for token fallback

* feat(webui): preview prompt rail entries

* feat(webui): add prompt navigator drawer

* style(webui): refine prompt navigator placement

* style(webui): align prompt navigator with header actions

* style(webui): simplify prompt navigator header

* refactor(webui): clean thread resource refresh

* feat(desktop): add native reply notifications

* fix(webui): preserve desktop restart and replay state

* fix(desktop): harden gateway proxy startup

* fix(web): fall back when readability is unavailable

* fix(desktop): hide window instead of closing on macos

* fix(webui): unify desktop header actions

* fix(webui): simplify prompt history rows

* fix(desktop): log notification delivery failures

* chore(desktop): clean source package artifacts

* fix(cron): support one-time relative reminders

* fix(webui): reveal scroll button in place

* Revert "fix(cron): support one-time relative reminders"

This reverts commit 4c4661da120a3c7283e0768412bae48604e7390b.

* refactor(webui): extract token usage heatmap

* docs(desktop): clarify contributor guides

---------

Co-authored-by: chengyongru <2755839590@qq.com>
2026-06-06 19:49:33 +08:00
Xubin Ren
a1b9577224 test(image): cover dropping null OpenAI image params 2026-06-06 19:35:46 +08:00
04cb
a4cf0f9514 fix(providers): allow dropping default OpenAI image params via null extraBody (#4167) 2026-06-06 19:35:46 +08:00
Xubin Ren
73353785a0 docs(sdk): document Nanobot teardown 2026-06-06 15:35:28 +08:00
axelray-dev
57fa37dcfe fix(sdk): close MCP connections from Nanobot facade
The SDK opened MCP connections through AgentLoop.process_direct but
never called close_mcp, leaving stdio MCP generators to be finalized
during asyncio shutdown from a different task, producing a RuntimeError
about exiting a cancel scope in a different task.

Add aclose() that delegates to AgentLoop.close_mcp (which already
drains background tasks and closes MCP stacks), plus __aenter__ and
__aexit__ so the SDK works as an async context manager.

Fixes #4211
2026-06-06 15:35:28 +08:00
Xubin Ren
6a0368b32f fix(telegram): route /skill command 2026-06-05 18:48:51 +08:00
Xubin Ren
935a37182d docs(command): document /skill command 2026-06-05 18:48:51 +08:00
EndeavourYuan
6b6be20f32 feat(command): add /skill slash command to list enabled skills
- Register /skill in BUILTIN_COMMAND_SPECS with wrench icon
- Add cmd_skill handler that lists skill names and descriptions
- Disabled skills are excluded from the output
- Add 6 tests covering empty list, names/descriptions, disabled
  filtering, fallback description, markdown output, and router
  registration
2026-06-05 18:48:51 +08:00
chengyongru
710d00a179 fix(webui): persist user messages for refresh 2026-06-05 16:13:51 +08:00
chengyongru
3da68ac7fe Fix pairing for Weixin and Telegram DMs 2026-06-05 16:13:31 +08:00
chengyongru
d435cb0b21 fix: harden custom image provider compatibility
Maintainer edit: preserve provider-specific size hints for custom image generation endpoints while keeping the default 1K mapping compatible. Clarify the custom provider contract in docs and cover response_format/size overrides in tests.
2026-06-05 15:56:03 +08:00