Commit Graph
3452 Commits
Author SHA1 Message Date
Dudu-0223 431fb4b035 feat(subagent): add explicit child reports 2026-08-02 12:51:10 +08:00
imccyu a1b3bebb61 fix(subagent): scope drains and soften final flush 2026-08-02 12:51:10 +08:00
imccyu 5ef5feb01a fix(web): reconcile rebased subagent contracts 2026-08-02 12:51:09 +08:00
Dudu-0223 f0ab04273d fix(web): deduplicate subagent navigation 2026-08-02 12:51:09 +08:00
Dudu-0223 a27492507d feat(web): add subagent conversation transport 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 03d95d0d84 fix(subagent): keep one-shot labels optional 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 2e5c439ecf fix(subagent): decouple child listing runtime 2026-08-02 12:51:09 +08:00
Dudu-0223 13631134aa fix: address codex review round 2
- listChildren() checks its cancellation signal before starting the corpus
  trace and immediately after it resolves, so a pre-aborted or trace-time
  abort fails CANCELLED instead of returning a successful empty result.
- Corrected the persistence-repair claims: session query resolves persisted
  candidates through the non-mutating inspect() read, so listing is
  storage-read-only and a torn child tail is surfaced (shorter valid prefix)
  rather than repaired; the Agent Note, README, and JSDoc now state that,
  and the zh pair is re-recorded.
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 8bbae77ae6 docs: regenerate module graph; drop unused devDep 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
Dudu-0223 f4a65a34e6 cleanup(subagent): hide manager-wide continuation drain 2026-08-02 12:51:08 +08:00
Dudu-0223 191c8cd640 fix(acp): scope connection-owned continuation drain 2026-08-02 12:51:08 +08:00
Dudu-0223 a91b20f6be fix(subagent): close continuation lifecycle gaps 2026-08-02 12:51:08 +08:00
Dudu-0223 853f4d5cfb refactor(subagent): drop host-user authority and split lifecycle publication
Remove the host-user continuation capability and the public residency query,
then separate the seam's public event payloads from its internal lifecycle
control interfaces.

`followup()` now takes the exact live direct parent `Agent` instead of a
`SubagentAuthority` union. No production adapter ever supplied user authority,
so the `UserAuthorityGrant` brand token existed only to stop a forged
discriminant from bypassing the direct-parent check — deleting the branch
retires the token, its mint method, and that attack surface together.

Narrowing `parent` from `Agent | undefined` to `Agent` removes three special
cases, including the path where a parentless epoch dispatched its lifecycle
events unscoped. Scoped-versus-global dispatch is now decided by the event, not
by whether a caller happened to have a parent.

`activationState()` had no caller; `ActivationState`, `ActivationObserver`, and
`ContinuationHost` are package-private.

New `src/lifecycle.ts` owns the contained emitter, the one-shot run observer,
and the Activation observer, while `SubagentRunInfo`/`SubagentRunEndInfo` move
to `src/types.ts` beside the other consumer-facing contracts. Those payloads are
public API — dsh-jsonrpc, hooks-claude, and the package invariant all consume
them — whereas the observer is a contract between two in-package collaborators,
so they no longer share a home merely for both being lifecycle-shaped. The
service keeps ownership of the scope carrier: `scopeTarget()` composes the
service's own context filter, so a narrowed stand-in would silently change
scope filtering.

Also drops now-unused dsh-tasks-local and dsh-tool-tasks dev dependencies, and
corrects the README claim that a pre-residency failure emits a terminal edge —
that path only ever rethrew.
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 c485b6136d fix(subagent): address codex review round 1
All five findings were real:

- The terminal lifecycle edge derived its stop reason from teardown success, so a
  child that errored, hit its token ceiling, or was cancelled reported as
  completed once its checkpoint and disposal succeeded. It now reads the child's
  own last message turn/end, which is authoritative.
- Live delivery never rechecked the caller signal after authorization yielded, so
  an abort that won before acceptance still enqueued the message and returned an
  id. Admission now re-checks at the boundary that owns the decision.
- Drain flushed before cancelling, letting a running turn keep appending events
  the checkpoint could not cover and letting model work continue through a slow
  flush. It now cancels to quiescence first.
- subagent/end fired after AgentHandle.dispose() unregistered the child, so the
  hooks bridge could not resolve it for the child's cwd and scope. The edge now
  publishes while the child is still registered.
- activationState() read Agent.status alone, which stays idle between an accepted
  waking send and the microtask that admits it, so a synchronous inbox observer
  could see settled with a queued turn. Residency now also counts messages this
  manager admitted but has not seen leave the inbox.
2026-08-02 12:51:08 +08:00
Dudu-0223 19d034169e docs: regenerate the config catalog source line
The ACP bridge's new structural teardown type shifts its Config declaration.
2026-08-02 12:51:08 +08:00
Dudu-0223 bc504195df test(subagent): close continuable coverage and drop unreachable guards
Restores the one-shot settleRun coverage in its own file beside the helper,
covers fork's seed contribution, the post-transfer rollback, the descriptor
model route on cold resume, manager-unload drain, and a failing teardown branch.

Removes three redundant checks the surrounding contracts already own: the
duplicate-Activation and live-id pre-checks (AgentRegistry.enter is the
authoritative collision boundary) and a rollback lifecycle edge that could never
publish because the epoch had no start edge.
2026-08-02 12:51:08 +08:00
Dudu-0223 ae6976cbbd docs(subagent): regenerate catalogs for the activation-based seam
Adds the new continuable types to the cordis-catalog type-link map and
regenerates the cordis api/service/event catalogs, tool catalog, config
catalog, and doc graphs.
2026-08-02 12:51:08 +08:00
Dudu-0223 4e7a5f19cf docs(subagent): rewrite the subagent data-structure doc for activations
wip: Chinese pair and remaining generated catalogs follow.
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 264bc41a13 fix(subagent): preserve ordinary start requests 2026-08-02 04:34:17 +08:00
Tianyi Cui f14121a4c2 refactor(subagent): narrow continuation interface 2026-08-02 04:34:17 +08:00
Dudu-0223 644bf00b86 fix(subagent): cancel pending live delivery 2026-08-02 04:34:17 +08:00
Dudu-0223 fea31a012d fix(subagent): persist descriptor before admission 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-0223 efc47b6a76 fix(subagent): require durability participant 2026-08-02 04:34:16 +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 189502e4ac fix(subagent): preserve follow-up provenance 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 71570d7bec fix: address codex review round 1
- Strict steer now rejects the two windows where an acknowledged
  message would be silently dropped: the closed-turn durability-flush
  window (status still running, loop strands drained steering) and a
  committed structured capture (terminal turn-stop discards late
  steering). Seam JSDoc, catalog doc, README, and the Agent Note
  bilingual pair state the tightened contract; new keyless tests pin
  both rejections.
- Continuable background delegation now fails loud when the advertised
  send_message tool is not registered, instead of starting a durable
  child the model cannot continue. The acp-agent example already loads
  the control tool; the tool-catalog boot recipe is unaffected because
  capability wording is harvested at mount.
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 9a07380c23 adopt native GitHub stack workflow 2026-08-02 03:17:42 +08:00
Tianyi Cui b6284c8467 fix(review): audit prepared-wrapper activation and pin generated shapes
ds-review-bot round 1 on the DSH-home integration:
- generated wrappers now inject the services their manifest needs (skills/
  tools beside loader), and loadPreparedRepository rejects a wrapper fiber
  that settles anything but ACTIVE — a composition missing a required
  service fails the repository transaction instead of committing an ACTIVE
  row over a silently PENDING child (critical finding)
- the github: source ref segment excludes '#', so 'a#b' refs fail at the
  config parser with the promised syntax instead of inside pnpm
- watchPersonalPatches re-reads the include's non-patch options per refresh
  instead of a registration-time snapshot
- the TUI smoke's cache-seeded wrapper is produced by the real
  prepareDshPlugin (cache LAYOUT stays a deliberate external pin)
- new Loader integration test drives a live repositories update through
  entry.update: generation swap, old skills removed, failed candidate
  rolled back to the previous generation
2026-08-02 01:29:04 +08:00
Tianyi Cui 2448496803 feat: configure repository plugins from DSH home 2026-08-02 01:29:04 +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 fa7051a9d1 feat: add static repository plugin format 2026-08-02 01:25:02 +08:00
Tianyi Cui 195f7fa9af fix(cordis): make config reload transactional 2026-08-02 01:25:01 +08:00
Tianyi Cui 0758839b00 Merge fix/web-agent-runtime-context into fix/web-gui-feedback-loop 2026-08-01 22:15:36 +08:00
Turtle 20e51abd4e feat: rename experimental-meta/-upgrade to meta/upgrade behind --experimental gate 2026-07-31 23:37:53 +08:00
Tianyi Cui e1c6fc3db4 Merge pull request #1032 from deepseek-harness/xtr/trajectory-timeline-polish
fix(trajectory): polish timeline timing and layering
2026-07-31 20:25:08 +08:00
Turtle 60a0bcd358 feat(cli): mark meta and upgrade commands experimental 2026-07-31 20:16:19 +08:00
_Kerman dd98d15b1d Merge remote-tracking branch 'github/master' into xtr/trajectory-timeline-polish
# Conflicts:
#	packages/client/ui-trajectory/src/client/timeline.ts
#	packages/client/ui-trajectory/tests/views.spec.tsx
2026-07-31 20:01:16 +08:00
Tianyi Cui d64b032311 Merge pull request #1082 from deepseek-harness/worktree/fix-web-duplicate-folder-names-20260731
fix(workspace): allow same-basename folders in Web
2026-07-31 19:37:38 +08:00