Commit Graph
4993 Commits
Author SHA1 Message Date
chengyongru 1f8e49c70a fix(webui): align provider parameter row typography 2026-10-19 21:30:37 +08:00
chengyongru 125d9221d0 fix(webui): merge consecutive waiting messages (#6309)
* fix(webui): merge consecutive waiting messages

* fix(webui): retain legacy draft session targets on refresh
2026-10-19 21:06:46 +08:00
chengyongru 8778c69774 test(webui): await rendered canonical reconciliation 2026-10-19 17:42:04 +08:00
chengyongru f57018aa7f feat(webui): render Mermaid diagrams with Pele (#6302)
* feat(webui): render Mermaid diagrams with Pele

* fix(webui): reserve diagram replacement capacity

* fix(webui): prebundle lazy diagram worker dependencies

* fix(webui): account diagram capacity by encoded size

* fix(webui): use shared hover hints for diagram actions

* docs(webui): focus diagram guide on usage
2026-10-19 17:16:20 +08:00
chengyongru 0f3b47bc3a fix(webui): isolate transcript replay from live observers (#6306)
* fix(webui): isolate transcript replay from live observers

* docs(webui): shorten chat subscription ownership notes
2026-10-19 17:13:12 +08:00
chengyongru dca49c258a fix(tools): refine DeepSeek search credentials and query validation
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.
2026-10-19 16:50:17 +08:00
moran e5b469ebd4 feat(tools): add DeepSeek Search as a web_search provider
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.
2026-10-19 16:50:17 +08:00
chengyongru 5d886fbb20 fix(webui): show route-aligned skeletons from first paint (#6303) 2026-10-19 15:57:32 +08:00
chengyongru af68da3280 perf(webui): reuse versioned history navigation snapshots 2026-10-19 13:45:04 +08:00
chengyongru 103840171b fix(docker): preserve explicit config selectors during bootstrap
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.
2026-10-19 13:02:26 +08:00
chengyongru b079522fa1 style(api): keep model setup error on one line 2026-10-19 13:02:26 +08:00
chengyongru 3ab8082118 test(docker): read persisted configuration as UTF-8 on Windows 2026-10-19 13:02:26 +08:00
chengyongru de8fbc3ad2 fix(api): keep unconfigured services running and preserve Docker onboarding 2026-10-19 13:02:26 +08:00
chengyongru e20737a509 fix(docker): validate and atomically save first-boot configuration 2026-10-19 13:02:26 +08:00
LuckVd ef2cd0c8c7 Activate the api profile in the compose privilege-boundary check
The boundary assertion materializes gateway, api and cli from the merged
compose config; with nanobot-api now under the api profile it must opt in
explicitly or the lookup raises KeyError.
2026-10-19 13:02:26 +08:00
LuckVd ddd22a26f8 Bootstrap a working Docker Compose config on first boot so the WebUI works out of the box
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
2026-10-19 13:02:26 +08:00
chengyongru 53e0edf709 fix(session): prevent consumed follow-ups from replaying after restart (#6299)
* fix(session): atomically acknowledge consumed follow-ups

* refactor(webui): drop legacy follow-up replay compatibility
2026-10-19 11:31:19 +08:00
chengyongru 743d40bbba fix(webui): restore symmetry of the settings gear (#6298)
* fix(webui): restore symmetry of the settings gear

Fixes NAN-276

* fix(webui): keep settings hub out of hover rotation
2026-10-19 10:43:23 +08:00
chengyongru d8714fe664 fix(webui): keep unbranded app initials readable 2026-10-19 10:13:26 +08:00
chengyongru 1832255995 docs: make user guidance easier to follow 2026-10-19 10:11:45 +08:00
Xubin Ren b702ac633f test(gateway): publish child claim markers atomically 2026-10-18 22:11:14 +08:00
fhgffy a3ead61580 fix(cron): preserve schedules edited during execution 2026-10-18 22:11:14 +08:00
Xubin Ren 59bfdc895b test(cron): cover repeated restart and overdue interval behavior 2026-10-18 21:44:59 +08:00
DDT 6dd3788e05 fix(cron): keep pending interval runs across gateway restarts
Every-interval jobs had their next run recomputed from now on startup,
and register_system_job reset the Dream/heartbeat state on each boot.
A gateway restarted more often than the interval therefore never ran
the job. Keep a persisted next run while it is still pending and at
most one interval away.
2026-10-18 21:44:59 +08:00
pei711 6670dd72da fix(mcp): discover all resource and prompt pages 2026-10-18 21:32:42 +08:00
pei711 a377a8e0d3 fix(mcp): honor optional server tool capabilities 2026-10-18 21:18:54 +08:00
wkd 68e9b1cc3a fix(mcp): prevent credential leakage in discovery error logs 2026-10-18 20:52:31 +08:00
Xubin Ren 5d99f909a7 test(cli): identify Windows handoff stages on timeout 2026-10-18 20:36:33 +08:00
KennySimpson 23bf1b87cd fix: use JSON equality for enum validation 2026-10-18 20:36:33 +08:00
Shoaib 9fe061a537 fix(tools): accept integral JSON numbers for integer parameters
JSON Schema accepts numbers such as 3.0 as integers, but Python decodes
that representation as float. Tool calls with valid integral arguments
were therefore rejected before execution, including nullable and union
integer schemas.

Share the integer check across schema validation and union matching, then
convert integral floats to int before calling the tool. Keep fractional
values, booleans, and non-finite numbers outside the integer type.

Add schema and registry regressions for integral JSON numbers.

Validation: 144 tool-validation tests; Ruff; BasedPyright;
import-boundary checks; git diff --check.
2026-10-18 20:22:33 +08:00
pei711 5fd79c25fa fix(providers): preserve first SSE event after UTF-8 BOM 2026-10-18 20:10:51 +08:00
Xubin Ren d0a1423ccf fix(agent): retain skipped inline reasoning separators 2026-10-18 19:57:34 +08:00
yixi ning ed8143f7d0 fix(agent): preserve separators in streamed inline reasoning 2026-10-18 19:57:34 +08:00
Xubin Ren a389633b9c fix(email): preserve case-colliding attachment files 2026-10-18 19:44:48 +08:00
fhgffy 38c92558ca fix(email): preserve attachments with colliding filenames 2026-10-18 19:44:48 +08:00
Jin Long ba406fc624 fix(session): preserve Unicode separators during JSONL migration 2026-10-18 19:30:29 +08:00
chengyongru 0a8b18fa58 fix(deepseek): align model capabilities with the official API (#6283)
* 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
2026-10-18 19:17:05 +08:00
fhgffy aef8127aff fix(email): exclude attached messages from body extraction 2026-10-18 19:11:29 +08:00
Xubin Ren 271bda1d81 fix(napcat): simplify unknown-size handling and check download cap 2026-10-18 18:56:28 +08:00
Lengshuang 17684ca5c4 fix(napcat): keep a message whose image declares a non-numeric size
Napcat reports an image segment's file_size as a string that is not
always numeric, so int() raises ValueError. The upfront size guard only
caught TypeError and KeyError, the ValueError escaped _download_image
into _on_message, and the whole inbound message was dropped — text
included — with only a background-handler warning left behind.

Handle ValueError as the guard already handles a missing size: skip the
upfront check and let the streamed download enforce max_image_bytes.
Log it, since a declared size we cannot read is worth knowing about.
2026-10-18 18:56:28 +08:00
Xubin Ren 90fcb7f903 test(agent): close session input fixtures and share shutdown diagnostics 2026-10-18 18:33:24 +08:00
Xubin Ren 2756c6bb78 test(agent): capture native shutdown timeout stacks 2026-10-18 18:33:24 +08:00
Xubin Ren 3d25912510 fix(telegram): preserve fence syntax across message chunks 2026-10-18 18:33:24 +08:00
Xubin Ren b3fba7c78f test(telegram): verify fenced code at outbound send boundary 2026-10-18 18:33:24 +08:00
HuiandClaude Opus 5.5 7f64efbb95 fix(telegram): render tilde and longer code fences as code
The Markdown-to-HTML converter only protected ``` blocks, and closed a
block at the first ``` it met. A ~~~ block was formatted as prose ("#
setup" turned bold, __init__ into <b>init</b>), and a ```` block showing a
``` example rendered as an empty <pre> followed by leaked, re-formatted
text.

Protect fenced blocks line by line first: open on ``` or ~~~, close on a
run of the same character at least as long. One-line ```code``` and
unclosed fences keep the previous regex handling. The streaming preview
strips fences through the same helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 18:33:24 +08:00
Xubin Ren df6158ec18 test(telegram): cover plain and fragment media URLs 2026-10-18 17:38:49 +08:00
Gianfranco DemarcoandCursor 9214390f9d fix(telegram): detect remote media types with queries
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 17:38:49 +08:00
Xubin Ren 6baf7178a8 fix(webui): cancel stale history reads on local navigation 2026-10-18 17:13:18 +08:00
Xubin Ren 27ef6fe24f fix(webui): center prompt navigation in the complete chat frame 2026-10-18 17:13:18 +08:00
Xubin Ren f230409b5a fix(webui): navigate from history to unsaved live prompts 2026-10-18 17:13:18 +08:00