Commit Graph

1274 Commits

Author SHA1 Message Date
Huanqi Cao
a79d7c896c fix(tool-bash): mount bash-env in the sandboxed and HMR-safety harnesses; normalize the pwsh-tool-turn fixture line endings for Linux replay 2026-08-02 16:53:29 +08:00
Huanqi Cao
1361e9718e Merge remote-tracking branch 'origin/feat/ripgrep-packaged-binary' into feat/pwsh-tool
# Conflicts:
#	apps/cli/package.json
#	packages/core/tools/tests/gen-tool-catalog.spec.ts
2026-08-02 16:22:24 +08:00
Huanqi Cao
782894ff8c Merge remote-tracking branch 'origin/master' into feat/ripgrep-packaged-binary 2026-08-02 16:18:46 +08:00
Huanqi Cao
64f9e68bd9 test(acp): register and record the keyed pwsh-tool-turn snapshot scenario 2026-08-02 15:31:52 +08:00
Huanqi Cao
96cf8a2fbc chore(compositions): mount bash-env and the pwsh tool in shipped and demo compositions 2026-08-02 14:18:42 +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
Huanqi Cao
7c30ac7fe0 Merge remote-tracking branch 'origin/master' into feat/ripgrep-packaged-binary
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-31-even-out-shipped-tool-rosters.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-31-even-out-shipped-tool-rosters.md
#	.agents/notes/implemented/feature/2026-07-31-even-out-shipped-tool-rosters.zh.md
2026-08-02 12:17:35 +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
4eda48d002 fix: address codex review round 2
- Wire the control service and send_message tool into every shipped
  composition with a resumable provider and background enabled
  (headless-agent, tui-agent, and the SDK helper's subagent feature
  base resources); jsonrpc-agent disables background and is unchanged.
- Resolve the send_message availability check in the CALLER's tool
  scope so a restriction that removes the follow-up tool from one
  agent also blocks that agent's continuable start.
- Control-service disposal now cancels live activations and awaits
  producer settlement instead of stranding them: TaskService keeps
  producer Tasks across a reload, so the disposing service aborts each
  activation-owned controller, resolves its terminal gate (the
  effect-scoped onTaskDone listener is already gone), and awaits done.
  A new test kills a mid-start activation through HMR disposal.
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
Tianyi Cui
0664b25cd9 fix(review): validate skill roots at mount and isolate provider default roots
ds-review-bot round 1 on the repository-plugin runtime:
- a manifest-declared skill root absent or non-directory in the installed
  package now fails the plugin load (skill-local treats a missing root as
  legitimately empty, which silently mounted a skill-less plugin)
- includeDefaultRoots: false no longer inherits $DSH_BUNDLED_SKILL_DIR, so
  isolated repository providers see only their explicit roots
- prepared wrapper baseUrl schema requires the file: scheme, failing hostile
  URLs at the declared validation boundary
- preparedPath reuses format.ts's isOutside; SERVER_NAME_PATTERN is exported
  and pinned equal to dsh-mcp-client's, with the restatement justified (the
  prepare bin keeps a zod-only module graph); the unexplained `as never`
  cast now carries its schemastery rationale
- the import-free wrapper assertion also rejects dynamic import(
- the headless fixture wrapper is regenerated by the real prepareDshPlugin
  and a drift test pins fixture == generator output
- prepareDshPlugin JSDoc states the non-atomic publish repair contract
2026-08-02 01:25:02 +08:00
Tianyi Cui
a0aed8a19f fix(examples): own repository plugin startup order 2026-08-02 01:25:02 +08:00
Tianyi Cui
fa7051a9d1 feat: add static repository plugin format 2026-08-02 01:25:02 +08:00
Tianyi Cui
0a297c39d3 fix(cordis): preserve concurrent loader composition 2026-08-02 01:25:01 +08:00
Tianyi Cui
195f7fa9af fix(cordis): make config reload transactional 2026-08-02 01:25:01 +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
1f8dd72bd9 Merge latest master into manual compaction 2026-07-31 18:28:21 +08:00
Tianyi Cui
ba43750e68 Merge pull request #1070 from deepseek-harness/agent/memory-mcp-examples
feat(examples): add generic MCP memory examples
2026-07-31 18:18:21 +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
ZiyaZhang
dc7f3253f6 fix(examples): keep memory configs provider-owned 2026-07-31 02:34:52 -07:00
ZiyaZhang
07f51593a0 docs(examples): simplify memory onboarding 2026-07-31 02:28:09 -07:00
ZiyaZhang
e2fb026dee docs(examples): clarify reference memory limits 2026-07-31 02:08:35 -07:00
ZiyaZhang
7e929d3d50 feat(examples): add generic memory MCP overlays 2026-07-31 02:00:14 -07: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