Commit Graph
383 Commits
Author SHA1 Message Date
chengyongru 74d070f699 feat(memory): add progressive wiki and drain Dream history (#4477) 2026-11-18 16:28:43 +08:00
chengyongru 5997a714f2 refactor(agent): centralize session execution ownership (#6699) 2026-11-18 13:49:41 +08:00
Xubin Ren ad7ba91701 Batch checked directory access on portable search paths 2026-11-14 22:09:21 +08:00
Xubin Ren 360a85bea5 Keep search lifecycle tests on the scoped traversal 2026-11-14 22:09:21 +08:00
Xubin Ren 5c7ff5b796 Guard file handles and streamline scoped search 2026-11-14 22:09:21 +08:00
Xubin Ren 51884a244e refactor(files): remove redundant edit and snapshot state 2026-11-14 22:09:21 +08:00
Xubin Ren 721cc4e23f refactor(files): reuse native matching and heap primitives 2026-11-14 22:09:21 +08:00
Xubin Ren c11c1a376f perf(search): bound ranked pages and small-file reads 2026-11-14 22:09:21 +08:00
Xubin Ren f61d52439c perf(files): retain only the requested directory prefix 2026-11-14 22:09:21 +08:00
Xubin Ren 150f0dfced refactor(files): simplify patch staging and bounded diff rendering 2026-11-14 22:09:21 +08:00
Xubin Ren 5a234e8328 fix(tools): reject special files before file mutations 2026-11-14 22:09:21 +08:00
Xubin Ren cdb3fd835f perf(tools): recover scoped grep throughput 2026-11-14 22:09:21 +08:00
Xubin Ren 0efe7b2eb4 perf(tools): batch scoped search timestamps by directory 2026-11-14 22:09:21 +08:00
Xubin Ren 66b8c447dc fix(tools): preserve authorized document link search 2026-11-14 22:09:21 +08:00
Xubin Ren d2e03d23a0 refactor(tools): route file operations through scoped execution 2026-11-14 22:09:21 +08:00
Xubin Ren 90d69e7a11 refactor(exec): share the sandbox launch path with settings checks (#6645)
* refactor(exec): share the sandbox launch path with settings checks

* refactor(sandbox): remove duplicate platform and path bookkeeping
2026-11-13 15:29:01 +08:00
Xubin Ren 0f5e56edd4 refactor(execution): share bounded HTTP redirects (#6637) 2026-11-13 14:55:07 +08:00
chengyongruandxiong-wei1 8cce73465b fix(tools): validate arguments with jsonschema without coercion (#6648)
Co-authored-by: xiong-wei1 <2318942410@qq.com>
2026-11-13 13:32:12 +08:00
Xubin Renandchengyongru 8607b6445c refactor(exec): centralize process-tree lifecycle (#6623)
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-11-12 11:44:48 +08:00
Xubin Ren f5e5bd6ea0 feat(webui): guide sandbox launcher recovery from chat 2026-11-08 14:29:46 +08:00
Xubin Ren 16250540d3 fix(sandbox): resolve saved environment paths during validation 2026-11-08 14:29:46 +08:00
Xubin Ren 0984940a21 test(exec): distinguish installed launchers from namespace support 2026-11-08 14:29:46 +08:00
Xubin Ren 5b84b78cac feat(settings): check sandbox launchers and configure protected paths 2026-11-08 14:29:46 +08:00
Xubin Ren f158779c60 test(exec): restrict launcher simulation to Unix 2026-11-08 14:29:46 +08:00
Xubin Ren 7b38d3c814 test(exec): capture nonstandard sandbox launcher behavior 2026-11-08 14:29:46 +08:00
chengyongru 1a89a25abd perf: reduce memory copies across files, sessions, and model requests (#6581) 2026-11-06 17:50:25 +08:00
Xubin Ren 475b045b6f test(ci): remove Docker output and stdin timing races 2026-11-06 09:01:58 +08:00
Xubin Ren ce3aa50e70 test(rg): use native paths for mocked sandbox launchers 2026-11-04 23:33:49 +08:00
Xubin Ren 3a8dc82251 test(shell): use native paths in sandbox platform fixture 2026-11-04 23:33:49 +08:00
Xubin RenandTenable Research 4dd3fbecb6 fix(exec): confine selected shells behind the sandbox launcher
Co-authored-by: Tenable Research <152317477+tenbbughunters@users.noreply.github.com>
2026-11-04 23:33:49 +08:00
chengyongru 8ff04aad2b fix(webui): update usage and tool progress during active turns (#6553)
* fix(webui): stream model status and usage during active turns

* fix(webui): keep live rounds and active-run status consistent

* fix(webui): reuse existing run indicators without extra status text

* fix(webui): preserve live activity and batch durable delivery

Cancel and drain sibling tools when progress notifications fail, retain balanced checkpoints, and keep model telemetry separate from answer provenance.

Group-commit already queued activity at the channel delivery boundary while preserving FIFO, generation ownership, per-envelope admission, and commit-before-fanout semantics. Isolate invalid members without dropping valid neighboring events.

Retain tool detail lazy grouping and cover scheduling, cancellation, persistence, encoding failures, and projection regressions.

* test(webui): separate standard-library imports in batch regression

* test: tighten live execution checks and clarify contracts

* refactor: remove redundant live execution comments

* refactor: settle tool results through one output path
2026-11-04 16:27:24 +08:00
chengyongruandchengyongru 62c2ed4e7e refactor(goal): sustain one ReAct run until the goal closes (#6538)
* refactor(goal): sustain one ReAct run until the goal closes

Keep active goals in the same runner beyond the ordinary iteration limit, with a final answer after successful closure. Remove cross-turn goal handoffs, continuation allowances and rollback bookkeeping while preserving input authorization, recovery, cancellation and terminal lifecycle ownership.

Contributes to NAN-392

Co-authored-by: chengyongru <chengyongru.ai@gmail.com>

* test(goal): consolidate sustained-run regression coverage

Retain lifecycle, history, usage, provider-state privacy and checkpoint cancellation assertions in the existing long-run scenarios. Remove duplicate smoke cases and parameter combinations that do not exercise distinct behavior; keep real Gateway, authorization and generation regressions.
2026-11-03 22:47:00 +08:00
chengyongru 384b763830 fix(runtime): preserve recovery history and prevent unsafe MCP replays (#6537)
* fix(recovery): preserve complete checkpoints and refresh cancellation drafts

Retain earlier tool rounds and consumed follow-ups until the transcript is committed, and classify a fresh session after cancelling active recovery. Keep history and follow-up acknowledgement atomic through the session owner.

* test(recovery): cover completion during cancellation handoff

* fix(gateway): preserve failure exit status after runtime crashes

Report uncaught gateway runtime failures as exit code 1 after the existing cleanup, just like startup failures. Remove the startup-only guard without changing controlled shutdown or supervisor policy.

Reuse lifecycle regression coverage for startup/runtime failure diagnostics and cleanup, and update runtime fault fixtures to expect failure.

Refs: NAN-394

* fix(recovery): make interrupted tool outcomes explicit

* fix(mcp): avoid unsafe replays and retain error states

Recover stale connections before non-replayable tool submissions, and report unknown outcomes without replaying calls after transport loss. Preserve structured error results for resource and prompt wrappers.

NAN-393
NAN-395

* test(recovery): assert unknown outcome guidance

* fix(runtime): revalidate replay contracts and preserve recovery input identity

Bind replay safety to each request session, adopt the rediscovered contract, and stop automatic replay when it loses its safety declaration. Treat cumulative checkpoints as uncommitted deltas rather than deduplicating independent inputs by text, retaining legacy single-batch recovery compatibility.

Extend the existing reconnect and same-text follow-up regressions, and align MCP privacy/proxy fixtures with preflight and explicitly safe replay without relaxing their privacy or routing assertions.

* fix(mcp): report unknown outcomes after submitted tool timeouts

Real HTTP response-loss probing with Codex exposed that the MCP SDK can surface a lost response as a timeout. Preserve preflight timeout semantics, but report possible completed effects after a non-replayable request has started. Never replay or weaken task cancellation.
2026-11-02 17:55:14 +08:00
chengyongruandchengyongru 29d0023fca fix(tools): correct DeepSeek Search rate-limit guidance
Remove stale quota details from the 429 diagnostic and configuration guide. Point users to DeepSeek for current account limits.

Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
2026-10-30 18:19:23 +08:00
chengyongru a4d2430140 refactor: remove redundant comments and docstrings (#6527)
* refactor: remove redundant comments and docstrings

* fix(signal): annotate async context manager as a generator
2026-10-30 13:07:03 +08:00
chengyongru 4e77d9c3f2 fix(retry): prevent replay amplification and isolate backoff (NAN-313) 2026-10-29 11:13:44 +08:00
davidandchengyongru b6d9009bb4 refactor(sessions): discover target handles through search (#6315)
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-10-29 10:38:06 +08:00
chengyongru acc3750c28 refactor(channels): move tool hint rendering out of core (#6498)
* refactor(channels): move tool hint rendering out of core

* test: align progress privacy check with structured tool events
2026-10-29 10:37:29 +08:00
Xubin Ren 30c66c1719 test(release): make native macOS acceptance reproducible 2026-10-28 16:54:41 +08:00
Ruiming Zhao 6b930432cb fix: decode nested JSON tool arguments by schema 2026-10-25 13:04:53 +08:00
chengyongru a8873bb565 fix(web): report ambiguous ddgs failures as unavailable 2026-10-23 11:48:48 +08:00
chengyongru 254f94b068 feat(attachments): support local files and video attachments (#6321)
* 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
2026-10-22 18:32:18 +08:00
chengyongru abfe510ce1 test: remove unreachable cases and strengthen weak assertions 2026-10-22 17:19:20 +08:00
chengyongru 084b6bb394 feat(network): centralize proxy settings and add MCP routing (NAN-315) (#6372)
* feat(network): share proxy settings across features and MCP (NAN-315)

* fix(network): address shared proxy review regressions

* test(network): align rebased OAuth fixtures with runtime admission

* fix(webui): configure shared proxy without leaving connection drafts

* feat(webui): add optional shared proxy authentication editor

* fix(webui): align proxy save tests and loading skeleton
2026-10-22 15:49:27 +08:00
chengyongru 26e1f41a00 fix(exec): yield long-running commands by default (NAN-328) (#6385)
* fix(exec): yield long-running commands by default (NAN-328)

* test(exec): avoid waiting for already observed output

* test(exec): observe hard-timeout cleanup before asserting completion
2026-10-22 13:27:26 +08:00
Xubin Renandchengyongru fbb61a373f feat(update): integrate managed installs and recoverable in-app updates (#6168)
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>
2026-10-21 19:16:56 +08:00
chengyongru f284749d2f ci: reduce Python test overhead and Windows latency (#6357)
* test: merge overlapping semantic contract coverage

Consolidate the six confirmed NAN-310 overlap groups while preserving replay, usage, generation kwargs, archive metadata, inspect fields, and subagent crash/redelivery assertions.

* test: lighten history seeds and layer runner progress rules

* ci: defer test storage setup and record phase timings

Close each listener-owned binary bridge before waiting for its TCP server; retain active upload and undecided-connection regressions. Avoid consuming readiness twice and run the repository import scan once in its static gate. NAN-310.

* test: scope filesystem mocks and observe consumed socket prefixes

* test: publish subprocess readiness files atomically

* ci: isolate external tool discovery and use three Windows workers
2026-10-21 14:47:55 +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
pei711 6670dd72da fix(mcp): discover all resource and prompt pages 2026-10-18 21:32:42 +08:00