Commit Graph

660 Commits

Author SHA1 Message Date
Huanqi Cao
ffb7d681f4 Merge remote-tracking branch 'origin/master' into feat/ripgrep-packaged-binary 2026-08-02 22:28:21 +08:00
imccyu
53531b9af2 test(snapshot): refresh Cordis steering API fixture 2026-08-02 17:53:07 +08:00
Huanqi Cao
782894ff8c Merge remote-tracking branch 'origin/master' into feat/ripgrep-packaged-binary 2026-08-02 16:18:46 +08:00
Dudu-0223
431fb4b035 feat(subagent): add explicit child reports 2026-08-02 12:51:10 +08:00
imccyu
d950150cdc fix(persistence): preserve subagent session origin 2026-08-02 12:51:09 +08:00
imccyu
b8be3583e0 test(cordis): refresh session origin API snapshot 2026-08-02 12:51:09 +08:00
Dudu-0223
a977ef30ee fix(subagent): preserve published run failures 2026-08-02 12:51:09 +08:00
Dudu-0223
8b0a7a5d8d fix(subagent): close stacked catalog integration gaps 2026-08-02 12:51:09 +08:00
Dudu-0223
a967f5174a test(snapshot): update unlabeled workflow children 2026-08-02 12:51:09 +08:00
Dudu-0223
774ee34b9a feat(subagent): catalog one-shot child sessions 2026-08-02 12:51:09 +08:00
Dudu-0223
4bd98407a9 fix: address codex review round 1
- listChildren() takes an optional AbortSignal and rechecks it after every
  un-signalled session-query await (the cold-resume cooperative-cancellation
  boundary); list_agents forwards exec.signal so the registry's drain of
  started tool bodies cannot block on a slow or large catalog.
- The list_agents description now presents running/complete as a stored-record
  snapshot and defers deliverability to send_message, matching the ownership-
  conflict semantics the service tests pin.
2026-08-02 12:51:09 +08:00
Dudu-0223
4240c7dd7b feat(subagent): durable child catalog and list_agents
Implements the durable-subagent-catalog RFC: SubagentControlService.listChildren()
enumerates a parent's direct continuable children from one sessionQuery trace,
validates each child's sole subagent/descriptor event (now carrying the durable
creation label), and returns one ordered SubagentListEntry[] with per-child
corrupt/unsupported/unavailable diagnostics. The list_agents tool ships as a
separately loadable plugin of dsh-tool-subagent-control requiring sessionQuery
at load; send_message stays usable without it.
2026-08-02 12:51:09 +08:00
imccyu
4d0a24d8ed test(subagent): preserve durability failure after rebase 2026-08-02 12:51:08 +08:00
Dudu-0223
7428cdf41e fix(subagent): address codex review round 3
- Make host-user authority unforgeable. `{ kind: 'user' }` was a bare
  discriminant, so any plugin holding `ctx.subagents` — including
  model-generated cordis_mount code, which the advanced ACP composition ships
  alongside continuable subagents — could construct it and skip the
  direct-parent check for any known child id. It now carries an opaque grant
  that only SubagentService.userAuthority() mints, which composition hands to
  trusted host adapters; a model-facing tool uses parent authority from its own
  execution context.
- Reconcile a delivery discarded inside its own admission window. An enqueue
  listener that cancels fires the discard before followup() returns, so the
  discard listener could not clear an id it had not seen; submit() retained it
  and residency stayed `running` until an explicit drain.
- Recheck the caller signal after materialization. An abort landing between
  publication and inbox acceptance still submitted the prompt and returned both
  ids; it now rolls the child back.
- Stop promising the model transcript access that no shipped continuable config
  mounts. The tools now state only that a background child does not report back.
- Restate the implemented note as shipped state rather than a proposal, so it
  works as current authority.
2026-08-02 12:51:08 +08:00
Dudu-0223
03973cb074 test(acp-agent): refresh header pins for the new subagent tool wording
Every scenario compares its live tool schemas and system prompt against the
shared header pins, so the Task-free subagent and send_message descriptions
change all 14 pin sidecars. The diff is only that wording plus the tools'
output-type shapes.
2026-08-02 12:51:08 +08:00
Dudu-0223
4435616a04 test(acp-agent): rewrite the continuable snapshot for the Task-free surface
The authored transcript drove task_output, which no longer exists for a
continuable child and is not registered in this config, so the scenario hung.
It now demonstrates the RFC criteria directly: a delegation returning only the
durable subagent id, two send_message follow-ups queueing as later FIFO turns on
one inbox, an unknown id failing without delivery, and child-first disposal
despite a failed final durability checkpoint.

The snapshot-only overlay remaps the transcript's placeholder child id onto the
randomly minted live child, since the scripted model cannot know that id.

Also drops probe logging accidentally committed in cf0138258.
2026-08-02 12:51:08 +08:00
Dudu-0223
c8fbc111db fix(acp): drain continuable subagents before disposing top-level agents
A continuable Activation outlives the turn that started it and owns descendant
teardown, so the bridge must drain that forest child-first before releasing the
top-level agents whose runtime the descendants depend on.

Also rewrites the authored continuable snapshot transcript for the Task-free
tool surface; the scenario's keyless replay is still under diagnosis.
2026-08-02 12:51:08 +08:00
Dudu-0223
694b078365 docs(subagent): update package READMEs for the activation lifecycle
Rewrites the service API table, authority-versus-provenance contract, residency
routing, and deferred-work list; scopes the in-process driver README to one-shot
runs; and restates both model-facing tools' outputs, which no longer carry a
task id.
2026-08-02 12:51:08 +08:00
imccyu
bb6e6d6f3b fix(subagent): preserve continuable behavior after rebase 2026-08-02 04:35:23 +08:00
Dudu-0223
fea31a012d fix(subagent): persist descriptor before admission 2026-08-02 04:34:17 +08:00
Dudu-0223
52002791a4 test(acp): stabilize continuable subagent snapshot 2026-08-02 04:34:17 +08:00
Dudu-0223
112e25bb05 refactor(subagent): unify service errors 2026-08-02 04:34:17 +08:00
Dudu
88f913a9ae refactor(subagent): merge continuation control service 2026-08-02 04:34:16 +08:00
Dudu-0223
e1f7eeeb95 fix(subagent): confirm steering request admission 2026-08-02 04:34:16 +08:00
Dudu-0223
1ab3cbf673 fix(subagent): harden continuable persistence 2026-08-02 04:34:16 +08:00
Dudu-0223
bb8ea2be51 fix(subagent): make strict steering atomic 2026-08-02 04:34:15 +08:00
Dudu-0223
99a778d63f feat(subagent): continuable background subagents
Implement the continuable background subagents RFC: a durable child
session with a series of Task-backed activations, each disposing its
run before the Task settles.

- dsh-subagent: rename SubagentRun.sendMessage to strict steer, drop
  run-level resume, add SubagentProvider.resume dispatch via
  SubagentService.resume, the continuation start field, and the
  versioned model-hidden subagent/descriptor session event.
- dsh-subagent-inprocess/-spawn/-fork: publish the control-allocated
  child id, append the descriptor inside the initial turn, implement
  cold resume from the child's own transcript under the live parent
  scope, and strict running-only steer.
- dsh-subagent-control (new): SubagentControlService owning stable
  child ids, descriptor snapshot/fold/authorization, Task-backed
  activation with settle-then-dispose ordering, the process-local
  active-run association, and steer-or-resume sendMessage routing.
- dsh-tool-subagent: background route branches on the provider's
  resume capability (continuable via the control service; one-shot
  task for ACP), returning both child and task ids.
- dsh-tool-subagent-control (new): the globally named send_message
  tool rendering steered/started routes.

Keyless coverage spans Task ownership and disposal ordering, running
delivery, cold follow-up, descriptor rejection and rollback, known-id
reconstruction, kill during lookup, admission races, and a new
subagent-continuable ACP snapshot scenario.
2026-08-02 04:34:15 +08:00
Huanqi Cao
a27ca7b88f test(fs-search): keep the glob-sampling fixture in canonical packed layout
The session-fixture-layout gate requires every session JSONL fixture in
the canonical packed layout (maximal delta runs per kind/block, as
migrate:packed-session-fixtures rewrites); the packChunks: false knob
violated that invariant and failed the snapshot job. Revert the knob and
canonicalize the recorded fixture instead: the live log's
eager-drain-packed rows migrate to the maximal-run layout a burst replay
reproduces, so the fixture stays replay-deterministic and canonical.
2026-08-01 22:34:16 +08:00
Huanqi Cao
d22438e2b1 test(fs-search): re-record the glob-sampling snapshot against the real API
The scenario previously carried an authored fixture; W4 of #1119 review
requires a live transcript. Recording surfaced two composition bugs that
are fixed here alongside it:
- provider ids: the app and the replay catalog both named the old
  'deepseek' provider, which no adapter registers; both now use
  'deepseek-official'
- the live config lacked persistenceCompression: none, so record-mode
  sessions were written zstd-compressed and could not be harvested
  (the snapshot twin already forced plaintext)

Recorded logs also need deterministic replay:
- packChunks: false in both configs — the eager-drain batch boundaries
  that split packed delta runs are timing-dependent, so a packed log of
  a long reasoning stream cannot replay-match its live record
- the fixture's request/header config and request/context are normalized
  to the replay-produced minimal shape (the live adapter logs model
  capabilities llm-replay has no data for), and tool-result path
  separators are canonicalized to '/' for the Linux golden

posixOnly is restored now that the fixture is recorded.
2026-08-01 22:13:06 +08:00
Huanqi Cao
18700f428d feat(fs-search): spawn the packaged ripgrep binary through the subprocess seam
glob/grep now run the @vscode/ripgrep binary via ctx.subprocess with a plain
argv vector: no system rg install, no shell layer, unconditional registration.
The load-time command -v rg probe and the bash-seam coupling are removed;
timeouts ride the cooperative exec.signal plus the seam's terminate
escalation. The fs-glob-sampling ACP snapshot executes the real packaged
binary against an mtime-pinned fixture. Adds the packaged-ripgrep-search
Agent Note, updates the roster-note facts and both shipped-composition e2es,
and regenerates the doc catalogs and third-party notices (surfacing
pre-existing manifest drift plus the new @vscode/ripgrep row; the notices
generator also learns pnpm 11's truncated virtual-store names).
2026-08-01 18:04:38 +08:00
Tianyi Cui
6e26f9fd83 Merge latest master into manual compaction
# Conflicts:
#	apps/cli/README.i18n.yaml
#	docs/architecture.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/compact/compact-basic/README.i18n.yaml
#	packages/pty/pty-local/tests/index.spec.ts
2026-07-31 17:57:11 +08:00
Hypatia May
a23a6bdd15 Merge origin/master into codex/status-bar-token-metrics
Resolve the agent-loop import conflict by retaining both durable request context and runtime policy context. Refresh the combined session fixtures and regenerate documentation catalogs. Mark PDF artifacts as binary so staged whitespace checks do not parse PDF bytes as text.
2026-07-31 16:53:03 +08:00
NI0317
ee404357a4 Merge origin/master into codex/sandbox-policy-context 2026-07-31 15:46:42 +08:00
Tianyi Cui
7906c1032f Merge pinned master into status bar token metrics 2026-07-31 15:41:52 +08:00
Hypatia May
1114a80a45 Merge branch 'fix/web-transcript-projection' into feat/manual-compact-single-lock
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
2026-07-31 15:36:49 +08:00
NI0317
3da219461c Merge origin/master into codex/sandbox-policy-context 2026-07-31 15:03:11 +08:00
Chinesezjc
62275b6cd6 Merge remote-tracking branch 'origin/master' into feat/search-presenter
# Conflicts:
#	docs/config-catalog.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/tools.i18n.yaml
#	docs/core-data-structures/tools.md
#	docs/core-data-structures/tools.zh.md
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/tools/README.i18n.yaml
#	packages/core/tools/README.md
#	packages/core/tools/README.zh.md
#	packages/core/tools/src/index.ts
#	packages/core/tools/src/presentation.ts
#	packages/ui/tui/src/components/transcript.ts
2026-07-31 14:40:29 +08:00
Tianyi Cui
e371311203 Merge latest Web transcript parent into manual compaction
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/client/runtime/README.i18n.yaml
2026-07-31 14:39:20 +08:00
Tianyi Cui
e088cfa59d refactor(sandbox-policy): remove capability family registries 2026-07-31 13:49:41 +08:00
Chinesezjc
17bb02190b fix(fs): regenerate doc graphs and refresh glob-sampling golden after merge
The master merge left docs/event-producer-consumer.md stale (regenerated) and
the master-introduced fs-glob-sampling scenario now carries the search-card
`meta` this branch projects from glob (refreshed golden).
2026-07-31 11:50:10 +08:00
Chinesezjc
df5b09cd6e Merge remote-tracking branch 'origin/master' into feat/search-presenter
# Conflicts:
#	docs/config-catalog.md
#	docs/cookbook/adding-a-tool.i18n.yaml
#	docs/cookbook/adding-a-tool.md
#	docs/cookbook/adding-a-tool.zh.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/tools.i18n.yaml
#	docs/core-data-structures/tools.md
#	docs/core-data-structures/tools.zh.md
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/tools/README.i18n.yaml
#	packages/core/tools/README.md
#	packages/core/tools/README.zh.md
#	packages/core/tools/src/index.ts
#	packages/core/tools/src/presentation.ts
#	packages/fs/tool-fs-search/src/glob.ts
#	packages/fs/tool-fs-search/src/index.ts
#	packages/ui/tui/src/components/transcript.ts
#	packages/ui/tui/tests/tui.spec.ts
2026-07-31 11:31:32 +08:00
NI0317
4e1ccebfff Merge remote-tracking branch 'origin/master' into codex/sandbox-policy-context
# Conflicts:
#	examples/acp-agent/tests/goal-snapshots/goal-session/session.expected.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.1.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.2.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.jsonl
#	examples/acp-agent/tests/snapshots/bash-spill/session.jsonl
#	examples/acp-agent/tests/snapshots/bash-tool-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/both-mode-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/cancel-tool-calls/session.jsonl
#	examples/acp-agent/tests/snapshots/cancel/session.jsonl
#	examples/acp-agent/tests/snapshots/code-mode-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/code-mode-workspace-context/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/empty-response-retry/session.jsonl
#	examples/acp-agent/tests/snapshots/error-finish/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/escalation-rejected/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-edit/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-escalation-approved/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-policy-reject/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-read-window/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-read/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-write-overwrite/session.jsonl
#	examples/acp-agent/tests/snapshots/fs-write/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-invalid-matcher/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-posttool-block/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-posttool-context/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-pretool-ask/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-pretool-deny/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-promptsubmit-context/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-cc-stop-continue/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-codex-invalid-matcher/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-codex-posttool-block/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-codex-posttool-context/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-codex-pretool-block/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-codex-promptsubmit-context/session.jsonl
#	examples/acp-agent/tests/snapshots/hook-codex-stop-continue/session.jsonl
#	examples/acp-agent/tests/snapshots/lsp-definition/session.jsonl
#	examples/acp-agent/tests/snapshots/multi-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/packed-chunks/session.jsonl
#	examples/acp-agent/tests/snapshots/parallel-tool-calls/session.jsonl
#	examples/acp-agent/tests/snapshots/pty-tools/session.jsonl
#	examples/acp-agent/tests/snapshots/repeat-tool-guard/session.jsonl
#	examples/acp-agent/tests/snapshots/session-query-spill/session.jsonl
#	examples/acp-agent/tests/snapshots/session-sandbox-root/session.jsonl
#	examples/acp-agent/tests/snapshots/session-title-after-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/skill-load/session.jsonl
#	examples/acp-agent/tests/snapshots/subagent-depth-two-rejection/session.1.jsonl
#	examples/acp-agent/tests/snapshots/subagent-depth-two-rejection/session.2.jsonl
#	examples/acp-agent/tests/snapshots/subagent-depth-two-rejection/session.jsonl
#	examples/acp-agent/tests/snapshots/subagent-fork/session.1.jsonl
#	examples/acp-agent/tests/snapshots/subagent-fork/session.jsonl
#	examples/acp-agent/tests/snapshots/subagent-mixed/session.1.jsonl
#	examples/acp-agent/tests/snapshots/subagent-mixed/session.2.jsonl
#	examples/acp-agent/tests/snapshots/subagent-mixed/session.jsonl
#	examples/acp-agent/tests/snapshots/subagent-multi/session.1.jsonl
#	examples/acp-agent/tests/snapshots/subagent-multi/session.2.jsonl
#	examples/acp-agent/tests/snapshots/subagent-multi/session.jsonl
#	examples/acp-agent/tests/snapshots/subagent-spawn/session.1.jsonl
#	examples/acp-agent/tests/snapshots/subagent-spawn/session.jsonl
#	examples/acp-agent/tests/snapshots/text-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/todo-write/session.jsonl
#	examples/acp-agent/tests/snapshots/tool-call-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/web-fetch/session.jsonl
#	examples/acp-agent/tests/snapshots/workflow-run/session.1.jsonl
#	examples/acp-agent/tests/snapshots/workflow-run/session.jsonl
#	examples/acp-agent/tests/snapshots/workspace-context/session.jsonl
#	examples/acp-agent/tests/snapshots/workspace-edit/session.jsonl
#	examples/headless-agent/tests/snapshots/pty-tools/session.jsonl
#	examples/headless-agent/tests/snapshots/pty-tools/stream-json.expected.jsonl
#	examples/headless-agent/tests/subagent-inheritance-snapshots/parent-override/child.expected.jsonl
#	examples/headless-agent/tests/subagent-inheritance-snapshots/parent-override/parent.expected.jsonl
#	examples/jsonrpc-agent/tests/snapshots/persistent-tools/notifications.expected.jsonl
#	examples/jsonrpc-agent/tests/snapshots/persistent-tools/session.jsonl
#	packages/core/agent-loop/src/agent.ts
2026-07-31 11:02:45 +08:00
Chinesezjc
c1f990a066 test(acp): refresh cordis-inspect-jsdoc and workspace-context fixtures post-merge
The merge combined ReadResultView (this branch) and WebResultView (master)
into ToolResultView; refresh cordis-inspect-jsdoc for the merged union and
workspace-context for the read window offset now in persisted meta.
2026-07-31 10:45:34 +08:00
Chinesezjc
83fff705da Merge remote-tracking branch 'origin/master' into feat/read-presenter
# Conflicts:
#	docs/config-catalog.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/tools.i18n.yaml
#	docs/core-data-structures/tools.md
#	docs/core-data-structures/tools.zh.md
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/workspace-context/session.jsonl
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/tools/README.i18n.yaml
#	packages/core/tools/README.md
#	packages/core/tools/README.zh.md
#	packages/core/tools/src/index.ts
#	packages/core/tools/src/presentation.ts
#	packages/ui/tui/src/components/transcript.ts
2026-07-31 10:42:07 +08:00
Hypatia May
01e64c6350 Merge finalized Web transcript parent 2026-07-31 09:46:32 +08:00
Hypatia May
00cc600b14 fix(snapshot): canonicalize macOS cwd tokens 2026-07-31 09:45:48 +08:00
Hypatia May
ff8c5600f4 Merge pinned master into status bar projection 2026-07-31 09:28:52 +08:00
Tianyi Cui
464a57d3ca Merge commit 'refs/codex/pr1006/master' into worktree/pr1006-merge-20260731
# Conflicts:
#	docs/architecture.i18n.yaml
#	docs/config-catalog.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/core.i18n.yaml
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/headless-agent/cordis.yml
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/llm/llm-deepseek/README.i18n.yaml
#	packages/llm/llm-deepseek/README.md
#	packages/llm/llm-deepseek/README.zh.md
#	packages/llm/llm-deepseek/src/adapter.ts
#	packages/llm/llm-deepseek/src/index.ts
#	packages/llm/llm-deepseek/tests/adapter.spec.ts
#	packages/llm/llm/README.i18n.yaml
#	packages/llm/llm/README.md
#	packages/llm/llm/README.zh.md
#	packages/subagent/subagent-dsh-sdk/README.i18n.yaml
#	packages/ui/jsonrpc/README.i18n.yaml
2026-07-31 01:55:19 +08:00
Hypatia May
f3963686bd Merge final Web parent into manual compact 2026-07-31 00:38:21 +08:00
NI0317
99aff882dc Merge remote-tracking branch 'origin/master' into codex/sandbox-policy-context
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/web-fetch/session.jsonl
2026-07-31 00:33:13 +08:00