* feat(attachments): support local files and video attachments
Share gateway inspection and send validation for borrowed local paths while preserving binary uploads, original-file ownership, and existing limits.
Related to NAN-284. Native provider video input remains outside this change.
* test: make cross-platform verification fixtures self-contained
* test(webui): align typed fixtures with runtime contracts
* fix(webui): preserve uploaded video playback during history sync
* test(tui): preserve local attachment drafts across resizes
* perf(attachments): preserve upload caches and release video previews
* docs(webui): keep attachment guidance user-focused
* chore: remove redundant dependency comment
* test(providers): make stream idle renewal timing deterministic
* fix(attachments): keep upload byte limits out of local references
Validate common format/count rules separately from upload byte budgets. Keep local inspection and send-time checks metadata-only, and exclude local references from composer and pending-upload totals. Explain upload size rejections with actual size and maximum in all ten locales. Related to NAN-284.
* fix(attachments): retain image references and draft order
* fix(attachments): close local reference UX and authorization gaps
* fix(attachments): preserve focus during asynchronous path confirmation
* fix(qq): clarify QR binding states and setup actions
* fix(qq): confirm rebinding instead of showing a persistent warning
* fix(qq): make rebind credential warning conditional
* docs(qq): align rebind guide with conditional warning
* ci: scope native acceptance and bind release candidate artifacts
* ci: isolate Windows installers and use portable Git tree fixtures
* test: preserve installer subprocess diagnostics on timeout
Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback.
Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers.
This code integration does not publish packages, enable signing or advance the public update channel.
Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
* refactor(session): persist display history in SQLite
* fix(session): preserve new fork activity timestamps
* test(agent): use SQLite-owned model failure recovery fixture
* test(agent): isolate session slash routing from loop shutdown
Exercise the real inbound dispatcher and await its session worker. Keep response deadlines and behavioral assertions, while leaving full SQLite cleanup to the existing async fixture rather than an unrelated two-second shutdown deadline.
* fix(webui): admit direct deliveries to display history
* docs: clarify session history migration guidance
* fix(webui): retain smoothly revealed history loading headers
* refactor(webui): simplify history loading feedback
* fix(webui): keep retained history headers clear of preceding text
* fix(webui): reclaim completed history loading space
* refactor(webui): group history projection handoff with navigation
* test(webui): synchronize history motion observations
* fix(webui): collapse history completion geometry handoff
Scan the official QQ Bot binding page from Channels → QQ or
`nanobot channels login qq`; the returned AppID and encrypted secret are
decrypted locally, saved to config, and the channel is enabled by the
existing post-connect flow. The WebUI keeps manual entry of AppID and
Secret in Advanced, restores every QQ setup field there, and warns that
scanning again rotates the App Secret and invalidates the previous one.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Reconcile the original notification fix with the integrated main snapshot.
Group notification settings and simplify localized copy and documentation.
Preserve permission opt-out and notification click routing across app transitions.
Suppress late completion notifications for discarded temporary chats and align
notification settings skeletons with the loaded layout.
Require a configured Search API key while preserving explicit ${VAR_NAME} references.
Reject overlong Unicode queries locally instead of silently truncating them.
Keep the shared Settings flow and condense the configuration documentation.
Add a standalone `deepseek` search backend that calls the DeepSeek Search
API (POST https://api.deepseek.com/v1/tools/search), following the
provider layout used by AnySearch (#5607) and Bocha (#4182).
This is a search-only integration. It does not touch the DeepSeek LLM
provider, does not inject a `web_search` tool into model requests, and
does not implement the Fetch endpoint.
- Trim and truncate queries to the API's 128 Unicode-character limit
locally, rejecting whitespace-only queries without a network call.
- Clamp `count` to the API's 1-50 range and always send
`need_content: false` so page bodies stay out of the model context.
- Format results from `summary`, falling back to `snippet` when a summary
is missing or blank, and include `date` when present. Cap each result's
text at 500 characters: live responses reach ~4,500 characters, so ten
uncapped results cost roughly 10k tokens per call.
- Return actionable 401 and 402 messages; retry 408/429/5xx once after
1.0s like the Brave provider; surface `error.message` for other 4xx,
tag-stripped because the upstream body is untrusted. Unexpected
transport errors report the exception type only, with the detail
logged when tool log content is allowed.
- Read the key from `tools.web.search.apiKey` or `DEEPSEEK_API_KEY` and
fall back to DuckDuckGo when neither is set, like other keyed
providers. The key is never logged or echoed in errors.
- Register the provider for the CLI wizard and WebUI settings, and reuse
the bundled DeepSeek brand asset.
Only initialize the Compose default instance when no --config/-c selector is present. Preserve all CLI-supported selector spellings and cover gateway/API startup against selected persisted settings in the Docker smoke test.
A fresh 'docker compose up' started with no config (the entrypoint only
bootstrapped for Render), so every published port was unreachable: the
gateway and WebSocket channel defaulted to a container-local 127.0.0.1
bind, and nanobot-api exited into a restart loop because serve refuses a
non-loopback host without an api_key.
Bootstrap config.json for container runs (NANOBOT_DOCKER_BOOTSTRAP, set
by docker-compose.yml) from a committed docker-config.json with binds
that survive the container boundary, baking the WebUI token and API key
at first boot (env value if provided, generated otherwise, printed to
the log). Move nanobot-api under the 'api' profile since it cannot
serve before a provider is configured. Install curl in the image and
document the new first-boot flow.
Fixes#6165
* fix(deepseek): preserve vision for legacy Flash aliases
* fix(deepseek): expose validated model catalog capabilities
* fix(deepseek): retain explicit off control with live reasoning levels
* docs: clarify provider-specific model guidance
Adds `whatsapp_agent`, an additive channel that connects nanobot to the
official WhatsApp Agent Platform API (https://api.whatsapp.com/agent/v1).
It authenticates with a per-agent API token and long-polls `GET /updates`
instead of linking a device, so it is the officially supported interface
rather than the Neonize linked-device protocol used by the existing
`whatsapp` channel.
The existing `whatsapp` channel is unchanged; both can run at once under
different names.
Design notes:
- The poll cursor, dedup window, and creator identifier live in one
atomically replaced state file. A message id is recorded before it is
handled, so a crash re-reads the batch without answering twice, and the
cursor is only accepted after the batch is processed.
- The first poll omits `offset`, which resolves the head and never replays
up to 30 days of history into an auto-replying agent.
- A changed token resets the cursor, because `next_offset` is only valid
for the agent that issued it.
- Each API method is paced below its own rolling 60-second limit, and
progress/tool-hint messages default to off because they spend the shared
12-per-minute send budget.
- Retries are limited to confirmed non-delivery (`429`, `503`/`131016`).
A `500` or read timeout is ambiguous, so it is not retried unless
`retryAmbiguousSends` is set; a duplicate is worse than a missed reply.
- Inbound media is downloaded through the shared SSRF guard, size-capped,
and verified against the reported digest. Outbound media is validated
before upload.
- Reactions are receive-only, matching the API. The token is never logged
or persisted; state stores only a SHA-256 fingerprint.
Docs compare both WhatsApp channels, including the lack of end-to-end
encryption, country availability, and rate limits.
* feat: trace Codex requests via Langfuse native SDK
Codex has no OpenAI SDK client for Langfuse's usual swap trick, so
log one generation per request through langfuse's native SDK
instead. Tracing failures never affect the returned Codex response.
* docs: note Codex Langfuse tracing support
* fix: trace every Codex request, close every generation
- Move the Langfuse generation inside _send so the compaction
sub-request gets its own trace too, not just the main request.
- Derive traced model/input from the wire body (post extra_body
override, post response-item-ID stripping) instead of the
pre-normalized one.
- Wrap package detection in the same try/except as the SDK call, so
a broken find_spec() can't turn a valid Codex request into an error.
- Make generation finalization idempotent and cancellation-safe via
try/except/else/finally, so update() failures or a cancelled
request no longer leave a generation open.
- Add tests for compaction tracing, update() failures, and
cancellation.
* docs: fix cli-reference.md langfuse plugin row
* fix: don't trace a rejected compaction as success
- Add a validate hook to _send so a transport-successful compaction
reply with no usable item traces as an error, not a success.
- Add regression tests for a find_spec() failure, for the traced
model/input matching the actual wire body (extra_body override,
ID-stripped replayed items), and for the rejected-compaction case.
* fix: convert LLMUsage to dict for Langfuse usage_details
LLMResponse.usage is now the LLMUsage dataclass upstream, not a
plain dict - Langfuse's usage_details param needs the latter.
* fix: satisfy basedpyright strict on compaction items
* fix(providers): normalize Codex Langfuse cache usage
* fix(providers): migrate Langfuse tracing to SDK 4
---------
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>