deepseek-harness/docs/core-data-structures
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
..
approval.i18n.yaml feat(system-prompt): cache dynamic policy context 2026-07-30 22:09:15 +08:00
approval.md feat(system-prompt): cache dynamic policy context 2026-07-30 22:09:15 +08:00
approval.zh.md feat(system-prompt): cache dynamic policy context 2026-07-30 22:09:15 +08:00
bash.i18n.yaml subprocess: one explicit env channel on the spawn spec 2026-07-27 04:14:51 +08:00
bash.md subprocess: one explicit env channel on the spawn spec 2026-07-27 04:14:51 +08:00
bash.zh.md subprocess: one explicit env channel on the spawn spec 2026-07-27 04:14:51 +08:00
code-runtime.i18n.yaml docs(i18n): refresh core translations for latest master 2026-07-23 19:29:01 +08:00
code-runtime.md Merge branch 'worktree/pr343-retarget-latest-master' into worktree/pr344-retarget-stack 2026-07-23 19:10:25 +08:00
code-runtime.zh.md docs(i18n): refresh core translations for latest master 2026-07-23 19:29:01 +08:00
commands.i18n.yaml docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
commands.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
commands.zh.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
compaction.i18n.yaml Merge latest PR 956 stack base 2026-07-30 17:55:35 +08:00
compaction.md Merge latest PR 956 stack base 2026-07-30 17:55:35 +08:00
compaction.zh.md Merge latest PR 956 stack base 2026-07-30 17:55:35 +08:00
core.i18n.yaml fix(subagent): preserve continuable behavior after rebase 2026-08-02 04:35:23 +08:00
core.md fix(subagent): confirm steering request admission 2026-08-02 04:34:16 +08:00
core.zh.md fix(subagent): preserve continuable behavior after rebase 2026-08-02 04:35:23 +08:00
credentials.i18n.yaml docs: bilingual credentials/settings-consumer documentation, catalogs, and gates 2026-07-29 14:20:06 +08:00
credentials.md docs: bilingual credentials/settings-consumer documentation, catalogs, and gates 2026-07-29 14:20:06 +08:00
credentials.zh.md docs: bilingual credentials/settings-consumer documentation, catalogs, and gates 2026-07-29 14:20:06 +08:00
filesystem.i18n.yaml docs(i18n): refresh core translations for latest master 2026-07-23 19:29:01 +08:00
filesystem.md Merge branch 'worktree/pr343-retarget-latest-master' into worktree/pr344-retarget-stack 2026-07-23 19:10:25 +08:00
filesystem.zh.md docs(i18n): refresh core translations for latest master 2026-07-23 19:29:01 +08:00
goal.i18n.yaml Merge remote-tracking branch 'origin/master' into xtr/agent-loop-message-machine 2026-07-26 16:45:27 +08:00
goal.md Merge remote-tracking branch 'origin/master' into xtr/agent-loop-message-machine 2026-07-26 16:45:27 +08:00
goal.zh.md Merge remote-tracking branch 'origin/master' into xtr/agent-loop-message-machine 2026-07-26 16:45:27 +08:00
llm-streaming.i18n.yaml Merge pinned master into status bar projection 2026-07-31 09:28:52 +08:00
llm-streaming.md Merge pinned master into status bar projection 2026-07-31 09:28:52 +08:00
llm-streaming.zh.md Merge pinned master into status bar projection 2026-07-31 09:28:52 +08:00
lsp.i18n.yaml docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
lsp.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
lsp.zh.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
persistence.i18n.yaml fix(subagent): publish inherited policy facts to telemetry 2026-07-29 00:39:56 +08:00
persistence.md fix(subagent): publish inherited policy facts to telemetry 2026-07-29 00:39:56 +08:00
persistence.zh.md fix(subagent): publish inherited policy facts to telemetry 2026-07-29 00:39:56 +08:00
pty.i18n.yaml docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
pty.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
pty.zh.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
sandbox.i18n.yaml revert(sandbox): withdraw the credential-document read denial 2026-07-30 17:09:42 +08:00
sandbox.md revert(sandbox): withdraw the credential-document read denial 2026-07-30 17:09:42 +08:00
sandbox.zh.md revert(sandbox): withdraw the credential-document read denial 2026-07-30 17:09:42 +08:00
scope.i18n.yaml docs(i18n): normalize core terminology 2026-07-23 18:45:56 +08:00
scope.md Merge refreshed docs/i18n-batch-core into docs/i18n-batch-cds-postmortem 2026-07-22 22:26:24 +08:00
scope.zh.md docs(i18n): normalize core terminology 2026-07-23 18:45:56 +08:00
session-query.i18n.yaml Merge remote-tracking branch 'origin/master' into session-query-tool 2026-07-25 14:17:24 +08:00
session-query.md Merge remote-tracking branch 'origin/master' into session-query-tool 2026-07-25 14:17:24 +08:00
session-query.zh.md Merge remote-tracking branch 'origin/master' into session-query-tool 2026-07-25 14:17:24 +08:00
session-reference.i18n.yaml refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
session-reference.md refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
session-reference.zh.md refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
session-title.i18n.yaml fix(session-title): typed rename rejection, provenance invariant, contract docs 2026-07-29 20:10:42 +08:00
session-title.md fix(session-title): typed rename rejection, provenance invariant, contract docs 2026-07-29 20:10:42 +08:00
session-title.zh.md fix(session-title): typed rename rejection, provenance invariant, contract docs 2026-07-29 20:10:42 +08:00
session.i18n.yaml Merge pinned master into status bar token metrics 2026-07-31 15:41:52 +08:00
session.md Merge pinned master into status bar token metrics 2026-07-31 15:41:52 +08:00
session.zh.md Merge pinned master into status bar token metrics 2026-07-31 15:41:52 +08:00
settings.i18n.yaml feat(settings): detect stale writers with a revision, and announce raw changes 2026-07-30 19:24:21 +08:00
settings.md feat(settings): detect stale writers with a revision, and announce raw changes 2026-07-30 19:24:21 +08:00
settings.zh.md feat(settings): detect stale writers with a revision, and announce raw changes 2026-07-30 19:24:21 +08:00
skills.i18n.yaml Merge remote-tracking branch 'origin/master' into worktree/pr823-retarget-latest-20260729 2026-07-29 23:36:49 +08:00
skills.md Merge remote-tracking branch 'origin/master' into worktree/pr823-retarget-latest-20260729 2026-07-29 23:36:49 +08:00
skills.zh.md Merge remote-tracking branch 'origin/master' into worktree/pr823-retarget-latest-20260729 2026-07-29 23:36:49 +08:00
spill.i18n.yaml docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
spill.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
spill.zh.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
subagent.i18n.yaml refactor(subagent): drop host-user authority and split lifecycle publication 2026-08-02 12:51:08 +08:00
subagent.md refactor(subagent): drop host-user authority and split lifecycle publication 2026-08-02 12:51:08 +08:00
subagent.zh.md refactor(subagent): drop host-user authority and split lifecycle publication 2026-08-02 12:51:08 +08:00
subprocess.i18n.yaml Merge remote-tracking branch 'origin/worktree-process-service-seam' into subprocess-simpl/d-one-env-channel 2026-07-27 11:31:38 +08:00
subprocess.md Merge remote-tracking branch 'origin/worktree-process-service-seam' into subprocess-simpl/d-one-env-channel 2026-07-27 11:31:38 +08:00
subprocess.zh.md Merge remote-tracking branch 'origin/worktree-process-service-seam' into subprocess-simpl/d-one-env-channel 2026-07-27 11:31:38 +08:00
system-prompt.i18n.yaml feat(system-prompt): cache dynamic policy context 2026-07-30 22:09:15 +08:00
system-prompt.md feat(system-prompt): cache dynamic policy context 2026-07-30 22:09:15 +08:00
system-prompt.zh.md feat(system-prompt): cache dynamic policy context 2026-07-30 22:09:15 +08:00
tasks.i18n.yaml docs(tasks): bring the zh side of the tasks pairs along after the master merge 2026-07-26 20:59:05 +08:00
tasks.md Merge remote-tracking branch 'origin/master' into worktree-tasks-service-seam 2026-07-26 20:28:37 +08:00
tasks.zh.md docs(tasks): bring the zh side of the tasks pairs along after the master merge 2026-07-26 20:59:05 +08:00
token-meter.i18n.yaml docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
token-meter.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
token-meter.zh.md docs: translate remaining non-README documentation 2026-07-26 02:33:29 +08:00
tools.i18n.yaml Merge remote-tracking branch 'origin/master' into feat/search-presenter 2026-07-31 14:40:29 +08:00
tools.md Merge remote-tracking branch 'origin/master' into feat/search-presenter 2026-07-31 14:40:29 +08:00
tools.zh.md Merge remote-tracking branch 'origin/master' into feat/search-presenter 2026-07-31 14:40:29 +08:00
user-interaction.i18n.yaml fix(web): keep the plan card to decisions it can actually answer 2026-07-30 19:38:18 +08:00
user-interaction.md fix(web): keep the plan card to decisions it can actually answer 2026-07-30 19:38:18 +08:00
user-interaction.zh.md fix(web): keep the plan card to decisions it can actually answer 2026-07-30 19:38:18 +08:00
web.i18n.yaml docs(i18n): clarify review terminology 2026-07-24 14:21:36 +08:00
web.md Merge refreshed docs/i18n-batch-core into docs/i18n-batch-cds-postmortem 2026-07-22 22:26:24 +08:00
web.zh.md docs(i18n): clarify review terminology 2026-07-24 14:21:36 +08:00
workflow.i18n.yaml docs(i18n): normalize core terminology 2026-07-23 18:45:56 +08:00
workflow.md Merge refreshed docs/i18n-batch-core into docs/i18n-batch-cds-postmortem 2026-07-22 22:26:24 +08:00
workflow.zh.md docs(i18n): normalize core terminology 2026-07-23 18:45:56 +08:00