Commit Graph
736 Commits
Author SHA1 Message Date
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
chengyongru 2a3d29ce73 refactor(webui): centralize outbound delivery (NAN-365) 2026-10-28 22:17:53 +08:00
chengyongruandXiaoyu-hub 4a14faa47e fix(webui): keep saved topics bound to their project (#6509)
* fix(webui): keep saved topics bound to their project

Lock the project as soon as the session exists, independently of loaded history. Validate both explicit updates and message admissions against the persisted directory while retaining same-project permission changes.

Related to #6505.

Co-authored-by: Xiaoyu-hub <17346801517@163.com>

* test(agent): retain goal shutdown failure stacks

Use the existing stop_loop diagnostic without changing the five-second teardown deadline or the goal assertions. The Windows failure on #6509 reached session shutdown but did not capture its worker stacks.

* test(cron): await rearm tick completion instead of disk timing

The Windows run completed the first and last jobs correctly, but rescheduling took over three seconds inside a two-second timeout. Await the original timer task, detect an early exit before callback entry, and preserve job-order, cancellation, persistence and rearming assertions. Keep real disk writes and all parameterized cases.

Also place the goal-shutdown diagnostic import in the existing first-party group.

---------

Co-authored-by: Xiaoyu-hub <17346801517@163.com>
2026-10-28 21:37:23 +08:00
Xubin Ren 4a6ed1a673 test: await busy-session batch completion instead of polling 2026-10-28 16:54:41 +08:00
Xubin Ren e9532d4100 test(release): preserve PTY exit output and await durable admission 2026-10-28 16:54:41 +08:00
chengyongru 32ee2810a1 chore(skills): remove obsolete update-setup skill 2026-10-28 14:37:52 +08:00
chengyongru 219c8bb2bc fix(agent): preserve streamed replies after model failures (#6494)
* fix(agent): preserve streamed replies after model failures

* test(webui): settle lazy imports and async settings saves

* test(agent): synchronize estimation checks at the operation boundary

* docs(webui): explain retained replies after stream failures
2026-10-27 16:22:33 +08:00
chengyongru f23a6d1485 refactor: remove verified unused internals (#6460)
* refactor: remove verified unused internals

* test(linear): synchronize webhook shutdown with writer join
2026-10-26 21:45:36 +08:00
lenin 9650f4fd5b fix(agent): recheck idle expiry after acquiring session lock
Reload settled activity inside the existing session lock before an idle
archive delegates to the consolidator. A fresh turn restarts the idle
interval; manual compaction keeps its existing behavior.

Cover both scheduling orderings and later genuine idleness, and give
existing direct idle-archive fixtures explicit idle preconditions.
2026-10-25 13:18:39 +08:00
Ruiming Zhao 6b930432cb fix: decode nested JSON tool arguments by schema 2026-10-25 13:04:53 +08:00
Zhou c9bd5ebb45 fix: recover oversized pending file reads after compaction 2026-10-25 12:37:34 +08:00
er-s-an f4aacdbec2 fix(agent): don't resume abandoned work after max_iterations 2026-10-24 22:34:11 +08:00
chengyongru 67f6a0d26e perf(sdk): reuse consecutive effective model overrides (#6434)
* perf(sdk): reuse consecutive effective model overrides

* fix(runtime): preserve lazy fallback validation during override reuse
2026-10-24 20:57:06 +08:00
chengyongru ce885fa31e fix(agent): preserve goal continuation lifecycle 2026-10-24 19:25:34 +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 bc5c58d239 feat(webui): distinguish context compaction reasons (NAN-324) (#6389)
* feat(webui): distinguish context compaction reasons (NAN-324)

* fix(webui): describe idle compaction cancellation as interruption

* docs: omit compaction notice details from configuration guide

* fix(i18n): make compaction notices read naturally

* fix(i18n): keep CJK compaction notices concise

* fix(i18n): describe idle compaction as unfinished
2026-10-22 16:13:25 +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 be43d2a5f8 fix(compaction): align native lifecycle and reconcile replay notices
Refs: NAN-326, NAN-327
2026-10-22 14:39:30 +08:00
chengyongru 421bd6b593 fix(agent): finalize stopped turns without checkpoints (NAN-211) 2026-10-22 10:35:04 +08:00
chengyongru d5cf09d738 fix(webui): preserve cross-session provenance at display persistence (#6379)
* fix(session): bind internal input identity before acceptance

* fix(webui): bind cross-session display writes at persistence boundary

* fix(webui): simplify session messages to current-target display writes

* chore: trim redundant session message comments
2026-10-22 01:24:18 +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 76da55994b fix(webui): preserve answer checkpoints and stream order (#6368)
* fix(webui): preserve answer checkpoints and stream order

* fix(stream): close hosted-tool answer segments at the producer
2026-10-21 18:30:52 +08:00
chengyongru b32b1327ce refactor(session): unify model and display history storage (#6336)
* 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
2026-10-21 16:13:59 +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
Xubin Ren 28f6c26946 fix(webui): recover model failures and align chat controls 2026-10-21 02:34:09 +08:00
chengyongru 688976bcb9 fix(agent): skip subagent sessions during idle compaction (#6339)
Refs: NAN-304
2026-10-20 22:26:49 +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
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 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
chengyongru 74942bd190 test: replace false-green checks with behavioral coverage (#6282)
* test: replace false-green checks with behavioral coverage

* test: complete behavior-focused audit coverage
2026-10-18 03:16:25 +08:00
chengyongru 756f6a6fe5 refactor(agent): deduplicate model request preparation 2026-10-18 00:26:19 +08:00
faf1efaf09 fix(consolidation): trigger compaction from reported usage, not just tiktoken estimates (#6260)
Co-authored-by: Muzhen2000 <254800372+Muzhen2000@users.noreply.github.com>
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-10-17 02:47:42 +08:00
chengyongru 8f6a5594fb refactor(session): centralize state ownership in SQLite (#5943)
* fix(session): move persistence off event loop

* refactor(session): isolate async persistence boundary

* refactor(session): keep a single session manager

* refactor(session): use stateless async adapters

* fix(session): serialize local persistence without file-lock contention

* refactor(session): own async persistence and snapshot commits

* refactor(session): narrow persistence changes to async adapters

* refactor(session): remove redundant async forwarding helpers

* fix(command): offload compact session persistence

* fix(session): adapt idle compaction to current main

* fix(webui): offload session metadata persistence

* refactor(session): centralize state ownership in SQLite

* fix(session): skip storage for non-recoverable followups

* test(webui): honor the full gateway event deadline

* perf(session): persist incremental changes and reuse owner snapshots

* test(agent): allow durable worker shutdown in burst test

* fix(gateway): drain session storage on Windows console shutdown

* fix(session): enforce bounded ownership and lifecycle-safe persistence

* fix: reject unresolved home paths and stabilize platform tests

* fix(session): preserve request context compatibility and owner-backed tests

* docs: focus configuration guide on user-facing behavior

* fix(session): adapt goal admission to async ownership after rebase

* fix(session): integrate current gateway and subagent contracts

* fix(session): align rebased workspace admission and async tests

* fix(session): support compatible SQLite schema evolution

* test(agent): use session owner in workspace context regressions

* test: stabilize Windows lifecycle and browser checks

* refactor(session): remove premature JSONL file export

* ci: bound Windows full-suite worker concurrency

* chore: remove session state refactor notes

* fix(session): queue writes and retain worker connections

* perf(webui): read detached metadata for session and task lists

* perf(agent): bound prompt preparation and local token counting

* docs: remove internal session storage guide

* perf(session): skip archived transcripts during idle scans

* fix(session): coordinate turns and isolate legacy session data

Bind WebUI input generations to the execution session and serialize idle
and SDK compaction with turns. Keep turn drafts through preparation so the
latest channel route persists.

Move imported workspace JSONL and checkpoints to durable private backups
before gateway admission, resuming cleanup after interruptions. Remove
committed child sessions when task creation is cancelled.

Validation: focused Python and frontend regressions, Ruff, BasedPyright,
import boundaries, WebUI build, and isolated gateway/browser flows.

* fix(agent): keep cancellation hooks independent of prompt preparation

* fix(session): preserve admission, delivery, and migration contracts

* fix(agent): preserve cancellation settlement after rebase

* fix(session): preserve request attribution through async ownership
2026-10-16 17:28:47 +08:00
chengyongru 33ff520d12 fix: preserve subtask request attribution after restart (#6247)
* fix: preserve request origin across recovery continuations

* fix: bind request origin to each continuation

* fix: capture origin when queuing continuation messages

* chore: remove redundant request context comment

* fix: persist origin for independent system turns
2026-10-16 16:46:39 +08:00
chengyongru f101a24571 refactor(cli): use Questionary for onboarding selection (#6251)
* fix(cli): require compatible terminal prompt dependencies

Require prompt-toolkit 3.0.52 for Windows VT100 input flushing and Questionary 2.1.1 for compatibility with its prompt layout. Keep the existing major-version bounds and Python minimum.

* refactor(cli): use Questionary for onboarding selection

Delegate menu navigation, selection and scrolling to questionary.select. Retain the existing back/cancel contract, palette and position feedback through a thin adapter and exercise real prompt keyboard behavior instead of viewport arithmetic.
2026-10-16 15:34:49 +08:00
chengyongru e4fc8788c4 refactor(providers): remove duplicate chat response parsers 2026-10-16 15:05:56 +08:00
chengyongru 3abcfe70c5 perf(agent): prepare prompts outside the event loop (#6224)
* perf(agent): prepare prompts outside the event loop

* fix(agent): preserve cancellation during run cleanup

* refactor(agent): clarify prompt preparation boundaries

* revert(agent): restore original prompt preparation structure

This reverts commit 484cb96a08bf3a805f5828d5a65316be7decaaa5.
2026-10-16 13:16:13 +08:00
chengyongru 12e869d047 refactor(skills): shorten built-in skill descriptions 2026-10-16 00:15:55 +08:00
chengyongru 32f5cc76a4 fix(agent): trim redundant system prompt context 2026-10-16 00:01:24 +08:00
chengyongru 841d2b880c fix(agent): make tool error guidance neutral (#6227)
* fix(agent): make tool error guidance neutral

* refactor(tools): share tool error guidance
2026-10-15 16:58:39 +08:00
chengyongru c58bfa71bc perf(agent): skip transcript snapshots without run hooks 2026-10-15 10:48:59 +08:00
chengyongru 2ad0da786d fix(session): serialize compaction with active turns 2026-10-15 10:43:02 +08:00
chengyongru af6abde2f4 fix(skills): bind plugin snapshots to approved content (#6225)
* fix(skills): bind plugin snapshots to approved content

* fix(skills): preserve plugin document newline normalization
2026-10-15 09:41:37 +08:00
chengyongru 3a28b9e6ce perf(agent): reuse skill discovery within each prompt 2026-10-15 01:47:06 +08:00