Commit Graph
87 Commits
Author SHA1 Message Date
Xubin RenandTenable Research 219dd13fd8 fix(webui): enforce workspace authority across queued inputs
Keep workspace changes at the authenticated owner boundary. Queue follow-up inputs separately when their tool scope differs from the active run.

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 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 cb3ba45317 refactor: remove legacy history and proxy migrations (#6518) 2026-10-29 18:28: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 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 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
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 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 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 6b90e400e4 refactor(tools): streamline built-in tool descriptions (#6201)
* refactor(tools): streamline built-in tool descriptions

* refactor(tools): retain actionable schema details
2026-10-14 10:34:07 +08:00
Xubin Ren a27f294f52 perf(agent): trim workspace access context without changing scope 2026-10-11 17:06:39 +08:00
Xubin Ren da02daaa1d test(agent): guard workspace context prompt prefixes 2026-10-11 17:06:39 +08:00
Xubin Ren 1d69f630d7 fix(agent): provide current workspace access before model requests 2026-10-11 17:06:39 +08:00
Xubin Ren d7d4b97df3 test(my): handle escaped Windows paths in inspection output 2026-10-11 17:06:39 +08:00
Xubin Ren e79a0099f6 fix(my): report current workspace access in self-inspection 2026-10-11 17:06:39 +08:00
chengyongru f04ed1c2eb test: align test names with current assertions (#6130)
* test: align test names with current assertions

* test: align suite names and explicit configuration cases
2026-10-10 11:49:32 +08:00
chengyongru 6ff96f2a8f feat(subagent): add session-owned task messaging and cancellation (#5985)
let's go!
2026-10-05 05:16:33 +08:00
chengyongru 4904305450 refactor(session): decouple history tools from WebUI replay (#6017)
* refactor(session): decouple history tools from WebUI replay

* test(oauth): make callback expiry independent of thread scheduling
2026-10-03 17:43:55 +08:00
chengyongru 66f5f2df15 fix(my): scope subagent snapshots to the current session (#5976)
* fix(my): scope subagent snapshots to the current session

* test(my): reuse runtime fixture in session isolation checks
2026-09-29 17:44:37 +08:00
chengyongru b7abbcd70b fix(agent): require subagent consolidator at construction 2026-09-29 15:28:05 +08:00
chengyongru 6eccc2859a test: consolidate repetitive cases across the suite 2026-09-25 14:28:21 +08:00
chengyongru c406024b59 test: consolidate redundant compaction and tool tests 2026-09-25 14:28:21 +08:00
chengyongru 0983762fe5 refactor(webui): remove legacy message projection (#5823)
* refactor(webui): defer oversized replay traces as events

* fix(webui): type deferred trace index set

* refactor(webui): remove legacy message projection

* fix(webui): type event protocol boundaries

* test(webui): assert canonical thread events
2026-09-20 16:48:13 +08:00
Xubin Ren 8c4eb2c807 fix(session): bound retained history search results across pages
Discard raw replay pages after filtering, retaining only the requested latest matches while counting pages for stable global message indexes. Cover raw-page release and durable-source precedence across index rebuilds and restart.
2026-09-15 14:11:59 +08:00
beemines 151173c8ba fix(session): search older pages of persisted conversation history 2026-09-15 14:11:59 +08:00
chengyongru 192e2e90dc refactor(events): unify scoped runtime notifications across clients (#5670)
* refactor(events): unify scoped runtime notifications across clients

* style(tests): sort auto-compaction event imports

* refactor(events): scope connections and remove retry callback plumbing

* docs: remove runtime notification design write-up

* refactor(bus): route operation events through the message bus

* fix(channels): isolate outbound sends by destination

* style(events): group shared notification imports

* refactor(events): converge runtime and hook delivery on MessageBus

* test(events): migrate fixtures to unified message bus
2026-09-06 02:11:19 +08:00
chengyongru 3495281282 test: remove obsolete nonexistence checks 2026-09-05 23:58:38 +08:00
chengyongru 6cd7063682 refactor(agent): defer transcript assembly to runner (#5608)
* refactor(agent): defer transcript assembly to runner

Keep persisted history and the fresh turn as explicit inputs until the Runner assembles the provider transcript. Preserve ContextBuilder and direct AgentRunner compatibility while making the save boundary structural.

Refs NAN-81.

* fix(providers): preserve mixed adjacent user content
2026-08-31 00:06:15 +08:00
chengyongru e73cce706c refactor(agent): extract tool execution boundary (#5569)
* refactor(agent): extract tool execution boundary

* test(agent): use extracted tool execution boundary
2026-08-28 13:52:03 +08:00
chengyongru b9e7c7f6fe fix: queue concurrent subagents (#5566)
* fix: queue concurrent subagents

* chore: keep spawn schema concise
2026-08-27 17:53:28 +08:00
chengyongru a618e80887 refactor(agent): reduce loop runner parameter plumbing 2026-08-26 17:50:52 +08:00
chengyongru c62aec0175 fix(session): reject read_session match-all patterns 2026-08-26 16:58:29 +08:00
bingqilinweimaotai 23dc344b8d fix: allow unfiltered read_session calls 2026-08-26 16:58:29 +08:00
chengyongru 9d34fc5af2 refactor(agent): remove loop iteration state (#5549)
* refactor(agent): remove loop iteration state

* docs(my): remove stale iteration guidance
2026-08-26 15:57:47 +08:00
chengyongru 4f6c0aedfa refactor(agent): make run usage explicit (#5546)
* refactor(agent): make run usage explicit

* fix(api): capture usage per run
2026-08-26 15:18:53 +08:00
chengyongru e308f7fdd4 test(agent): remove obsolete blocking drain case 2026-08-25 17:56:16 +08:00
chengyongru 66d9328a00 fix(agent): defer subagent wait until turn exit 2026-08-25 17:56:16 +08:00
chengyongru 9895c23cb5 refactor(providers): define typed usage contract 2026-08-25 01:04:25 +08:00
chengyongru 9e046815bc fix(webui): assign readable session handles 2026-08-19 01:15:56 +08:00
chengyongru 251a1ccd40 refactor: simplify cross-session messaging 2026-08-19 01:15:56 +08:00
chengyongru 0e184965e8 feat(webui): add lightweight session messaging via mentions 2026-08-19 01:15:56 +08:00
Xubin Ren 79d51be71f feat(tui): integrate with Herdr host 2026-08-17 20:56:10 +08:00
chengyongru 19997d20bb refactor: move MCP lifecycle out of AgentLoop (#5343) 2026-08-12 17:51:04 +08:00
chengyongru 85a452e5c7 refactor(agent): replace reflective runtime state access (#5319) 2026-08-10 16:44:26 +08:00
chengyongru a5bc3bfbb9 fix(webui): complete temporary chat mode 2026-08-08 23:20:59 +08:00
Xubin Ren c9a6145878 feat(webui): add temporary chat mode 2026-08-08 23:20:59 +08:00