dsh-plugin-guide 0.3.26 → 0.3.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-es.md +30 -11
- package/README-hi.md +30 -11
- package/README-pt.md +30 -11
- package/README-zh.md +32 -11
- package/README.md +36 -16
- package/SKILL.md +4 -3
- package/dist/dsh-plugin-dev.js +17 -8
- package/guide/family-toolchain.md +260 -0
- package/guide/links.md +3 -2
- package/guide/migration-0.2.md +64 -8
- package/guide/plugin-dev-guide.md +8 -6
- package/guide/quick-reference.es.md +3 -2
- package/guide/quick-reference.hi.md +4 -3
- package/guide/quick-reference.md +6 -5
- package/guide/quick-reference.pt.md +4 -3
- package/guide/quick-reference.zh-CN.md +6 -5
- package/guide/release-engineering.md +4 -2
- package/guide/release-engineering.zh-CN.md +4 -2
- package/guide/unfixed-issues.md +7 -0
- package/guide/version-matrix.md +309 -0
- package/guide/when-to-retire-a-plugin.md +5 -5
- package/guide/when-to-retire-a-plugin.zh-CN.md +5 -5
- package/package.json +4 -3
- package/references/community-ecosystem.md +2 -1
- package/references/dev-resource-landscape.md +294 -0
- package/references/official-docs/AGENTS.md +4 -5
- package/references/official-docs/SNAPSHOT.md +3 -3
- package/references/official-docs/THIRD_PARTY_NOTICES.md +2 -1
- package/references/official-docs/docs/AGENTS.md +1 -1
- package/references/official-docs/docs/architecture.i18n.yaml +14 -14
- package/references/official-docs/docs/architecture.md +11 -12
- package/references/official-docs/docs/architecture.zh.md +11 -12
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +48 -23
- package/references/official-docs/docs/capability-seams.zh.md +48 -23
- package/references/official-docs/docs/cli-help.i18n.yaml +34 -0
- package/references/official-docs/docs/cli-help.md +203 -0
- package/references/official-docs/docs/cli-help.zh.md +205 -0
- package/references/official-docs/docs/config-catalog.md +305 -145
- package/references/official-docs/docs/config-catalog.zh.md +305 -145
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +6 -6
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +7 -5
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +7 -5
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +6 -6
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +11 -9
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +11 -9
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +4 -4
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +5 -5
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +5 -5
- package/references/official-docs/docs/defensive-patterns.i18n.yaml +2 -2
- package/references/official-docs/docs/defensive-patterns.md +1 -1
- package/references/official-docs/docs/defensive-patterns.zh.md +1 -1
- package/references/official-docs/docs/development.i18n.yaml +6 -6
- package/references/official-docs/docs/development.md +4 -2
- package/references/official-docs/docs/development.zh.md +4 -2
- package/references/official-docs/docs/event-producer-consumer.md +33 -33
- package/references/official-docs/docs/event-producer-consumer.zh.md +33 -33
- package/references/official-docs/docs/experimental-persistence-catalog.i18n.yaml +10 -0
- package/references/official-docs/docs/experimental-persistence-catalog.md +17 -0
- package/references/official-docs/docs/experimental-persistence-catalog.zh.md +17 -0
- package/references/official-docs/docs/module-graph.md +202 -131
- package/references/official-docs/docs/module-graph.zh.md +202 -131
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +185 -158
- package/references/official-docs/docs/persistence-catalog.md +213 -112
- package/references/official-docs/docs/persistence-catalog.zh.md +213 -112
- package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.schema.json +76 -0
- package/references/official-docs/docs/persistence-changes/2026-09-13-working-directory.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +4 -4
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.md +2 -2
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +2 -2
- package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.schema.json +290 -0
- package/references/official-docs/docs/persistence-changes/2026-09-19-external-subagent-catalog.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.schema.json +457 -0
- package/references/official-docs/docs/persistence-changes/2026-10-05-ptc-operation-metadata.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.md +60 -0
- package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.schema.json +11474 -0
- package/references/official-docs/docs/persistence-changes/2026-10-05-working-directory-attribution.zh.md +60 -0
- package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.schema.json +2990 -0
- package/references/official-docs/docs/persistence-changes/2026-10-07-title-reasoning-effort.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/README.i18n.yaml +4 -4
- package/references/official-docs/docs/persistence-changes/README.md +12 -10
- package/references/official-docs/docs/persistence-changes/README.zh.md +12 -10
- package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/historical-formats/README.md +1 -1
- package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +1 -1
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.md +50 -50
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +50 -50
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.md +14 -14
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +14 -14
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.md +3 -3
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +3 -3
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.md +10 -10
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +10 -10
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.md +3 -3
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +3 -3
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.md +13 -13
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +13 -13
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +63 -63
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +63 -63
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +54 -54
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +54 -54
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +7 -7
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +7 -7
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +27 -27
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +27 -27
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +4 -4
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +4 -4
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +27 -27
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +27 -27
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +7 -7
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +7 -7
- package/references/official-docs/docs/persistence-schema.json +2084 -1827
- package/references/official-docs/docs/session-format-status.i18n.yaml +6 -6
- package/references/official-docs/docs/session-format-status.md +6 -6
- package/references/official-docs/docs/session-format-status.zh.md +6 -6
- package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/README.md +4 -1
- package/references/official-docs/docs/subsystems/README.zh.md +4 -1
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +7 -7
- package/references/official-docs/docs/subsystems/agent-team.md +10 -10
- package/references/official-docs/docs/subsystems/agent-team.zh.md +10 -10
- package/references/official-docs/docs/subsystems/boot.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/boot.md +4 -4
- package/references/official-docs/docs/subsystems/boot.zh.md +4 -4
- package/references/official-docs/docs/subsystems/claude-code-mods.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/claude-code-mods.md +1 -1
- package/references/official-docs/docs/subsystems/claude-code-mods.zh.md +1 -1
- package/references/official-docs/docs/subsystems/jobs.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/jobs.md +2 -3
- package/references/official-docs/docs/subsystems/jobs.zh.md +2 -3
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +4 -4
- package/references/official-docs/docs/subsystems/llm-streaming.md +41 -14
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +41 -14
- package/references/official-docs/docs/subsystems/persistence.md +2 -0
- package/references/official-docs/docs/subsystems/persistence.zh.md +2 -0
- package/references/official-docs/docs/subsystems/plan.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/plan.md +1 -1
- package/references/official-docs/docs/subsystems/plan.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-query.md +2 -0
- package/references/official-docs/docs/subsystems/session-query.zh.md +2 -0
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +6 -6
- package/references/official-docs/docs/subsystems/session-title.md +14 -5
- package/references/official-docs/docs/subsystems/session-title.zh.md +14 -5
- package/references/official-docs/docs/subsystems/session.i18n.yaml +3 -0
- package/references/official-docs/docs/subsystems/session.md +48 -5
- package/references/official-docs/docs/subsystems/session.zh.md +48 -5
- package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/skills.md +2 -2
- package/references/official-docs/docs/subsystems/skills.zh.md +2 -2
- package/references/official-docs/docs/subsystems/slots.md +10 -8
- package/references/official-docs/docs/subsystems/slots.zh.md +10 -8
- package/references/official-docs/docs/subsystems/ssh.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/ssh.md +22 -11
- package/references/official-docs/docs/subsystems/ssh.zh.md +22 -11
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +24 -27
- package/references/official-docs/docs/subsystems/subagent.md +165 -229
- package/references/official-docs/docs/subsystems/subagent.zh.md +167 -233
- package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/system-prompt.md +32 -2
- package/references/official-docs/docs/subsystems/system-prompt.zh.md +32 -2
- package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/tools.md +3 -3
- package/references/official-docs/docs/subsystems/tools.zh.md +3 -3
- package/references/official-docs/docs/subsystems/translation.i18n.yaml +19 -0
- package/references/official-docs/docs/subsystems/translation.md +103 -0
- package/references/official-docs/docs/subsystems/translation.zh.md +103 -0
- package/references/official-docs/docs/subsystems/web-server.i18n.yaml +8 -8
- package/references/official-docs/docs/subsystems/web-server.md +43 -8
- package/references/official-docs/docs/subsystems/web-server.zh.md +43 -8
- package/references/official-docs/docs/subsystems/webhook.md +1 -1
- package/references/official-docs/docs/subsystems/webhook.zh.md +1 -1
- package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/workflow.md +1 -1
- package/references/official-docs/docs/subsystems/workflow.zh.md +1 -1
- package/references/official-docs/docs/subsystems/working-directory.i18n.yaml +13 -0
- package/references/official-docs/docs/subsystems/working-directory.md +64 -0
- package/references/official-docs/docs/subsystems/working-directory.zh.md +64 -0
- package/references/official-docs/docs/subsystems/workspace.md +2 -2
- package/references/official-docs/docs/subsystems/workspace.zh.md +2 -2
- package/references/official-docs/docs/subsystems/worktrees.i18n.yaml +13 -0
- package/references/official-docs/docs/subsystems/worktrees.md +76 -0
- package/references/official-docs/docs/subsystems/worktrees.zh.md +76 -0
- package/references/official-docs/docs/testing.i18n.yaml +2 -2
- package/references/official-docs/docs/testing.md +1 -1
- package/references/official-docs/docs/testing.zh.md +1 -1
- package/references/official-docs/docs/tool-catalog.i18n.yaml +57 -45
- package/references/official-docs/docs/tool-catalog.md +95 -41
- package/references/official-docs/docs/tool-catalog.zh.md +99 -45
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/bundled-python-tests/guide.zh.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.md +17 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/deepseek-model-discovery/guide.zh.md +17 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/desktop-test-auth-popup/guide.zh.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.md +28 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/experimental-package-composition/guide.zh.md +28 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.md +20 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/instruction-home-override/guide.zh.md +20 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.md +17 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/mock-messages-events/guide.zh.md +17 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.md +31 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/native-subagent-bundle-tools/guide.zh.md +31 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.md +20 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/new-session-generations/guide.zh.md +20 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.md +20 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.zh.md +20 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-optional-resources/guide.zh.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.md +21 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/python-ptc-sandbox/guide.zh.md +21 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-adapters/guide.zh.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.md +20 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/session-title-provider-strategy/guide.zh.md +20 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.md +19 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/ssh-helper-launch/guide.zh.md +19 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.md +59 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/subagent-activations/guide.zh.md +59 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +21 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +21 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/terminal-command-labels/guide.zh.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.md +21 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/tool-presentation-mode/guide.zh.md +21 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.md +36 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/web-listener-trust-config/guide.zh.md +36 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md +25 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.zh.md +25 -0
- package/references/official-docs/docs/user/guide/github-review.i18n.yaml +4 -4
- package/references/official-docs/docs/user/guide/github-review.md +7 -10
- package/references/official-docs/docs/user/guide/github-review.zh.md +7 -10
- package/references/official-docs/docs/user/guide/public-deployments.i18n.yaml +8 -8
- package/references/official-docs/docs/user/guide/public-deployments.md +9 -5
- package/references/official-docs/docs/user/guide/public-deployments.zh.md +9 -5
- package/references/official-docs/packages/README.md +4 -6
- package/references/official-docs/website-docs.ts +1 -0
- package/references/official-plugin-dev-skill.md +2 -2
- package/references/sources.md +1 -1
- package/scripts/build-llms-full.mjs +8 -0
- package/scripts/verify-kit.ps1 +8 -1
- package/templates/js/README-es.md +1 -1
- package/templates/js/README-hi.md +1 -1
- package/templates/js/README-pt.md +1 -1
- package/templates/js/README-zh.md +1 -1
- package/templates/js/README.md +1 -1
- package/templates/ts/README-es.md +1 -1
- package/templates/ts/README-hi.md +1 -1
- package/templates/ts/README-pt.md +1 -1
- package/templates/ts/README-zh.md +1 -1
- package/templates/ts/README.md +1 -1
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Subagents
|
|
2
2
|
|
|
3
3
|
English | [中文](subagent.zh.md)
|
|
4
4
|
|
|
5
|
-
The
|
|
5
|
+
The unified activation API manages local conversations and external executions.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Capabilities and activation requests
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Every backend uses startActivation. Capability flags validate request options; prepareContinuable selects local Agent creation, while start selects one external execution. The model-facing tool uses parent delivery. Workflow and code mode consumers can await caller results without injecting another parent message. Historical children with unavailable descriptors remain discoverable as `mode: 'unknown'` without granting continuation capabilities; the [package README](../../packages/subagent/subagent/README.md) defines catalog persistence.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Two kinds of capability, discovered two ways
|
|
14
|
-
|
|
15
|
-
A provider advertises its **start-time** features on a static descriptor the service checks BEFORE a one-shot run exists; a request that needs one the provider lacks is rejected loud (`SubagentError('UNSUPPORTED_CAPABILITY')`), never accepted-then-ignored. Those flags describe only the one-shot [`start()`](#the-provider-contract-subagentprovider) path, where the provider composes the child. **Continuable** children are composed by the continuation manager itself, so they are gated by one optional method whose presence IS the capability, with TS narrowing as the discovery mechanism: [`SubagentProvider.prepareContinuable`](#the-provider-contract-subagentprovider).
|
|
11
|
+
Optional `request.cwd` selects the child's initial directory; relative paths resolve against the parent's current effective directory. Omitting it captures that directory at admission. Local child Sessions retain the parent's original project, and cold resume retains their logged directory state.
|
|
16
12
|
|
|
17
13
|
```ts type-equiv
|
|
18
14
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* {@link SubagentProvider.start} path, where the provider composes the child;
|
|
24
|
-
* continuable children are composed by the continuation manager itself and are
|
|
25
|
-
* gated by {@link SubagentProvider.prepareContinuable} instead. Each flag
|
|
26
|
-
* corresponds one-to-one to a {@link SubagentStartRequest} option: `depthLimit`
|
|
27
|
-
* to `maxDepth`; the other names match.
|
|
15
|
+
* Start-time options supported by a registered backend. The manager checks
|
|
16
|
+
* every requested option before preparing a local child or starting an external
|
|
17
|
+
* execution. depthLimit controls maxDepth; the remaining flag names match
|
|
18
|
+
* SubagentStartRequest fields.
|
|
28
19
|
*/
|
|
29
20
|
interface SubagentCapabilities {
|
|
30
21
|
readonly agentOptions: boolean
|
|
@@ -35,27 +26,57 @@ interface SubagentCapabilities {
|
|
|
35
26
|
}
|
|
36
27
|
```
|
|
37
28
|
|
|
38
|
-
|
|
29
|
+
```ts type-equiv
|
|
30
|
+
/** One managed child execution and its result delivery policy. */
|
|
31
|
+
interface SubagentActivationSpec {
|
|
32
|
+
/** Registered backend to use. */
|
|
33
|
+
readonly provider: string
|
|
34
|
+
/** Short task label retained in cataloged child membership. */
|
|
35
|
+
readonly label: string
|
|
36
|
+
/** Optional reserved identity for a local child; external backends allocate their own ids. */
|
|
37
|
+
readonly childId?: SessionId
|
|
38
|
+
/** Task, parent, and backend-supported execution options. */
|
|
39
|
+
readonly request: Omit<SubagentStartRequest, 'label' | 'signal'>
|
|
40
|
+
/** Cancellation before publication; callers own later cancellation through dispose. */
|
|
41
|
+
readonly signal: AbortSignal
|
|
42
|
+
/** Parent delivery notifies the model; caller delivery only returns the result. Local children always enter the parent catalog. */
|
|
43
|
+
readonly delivery: 'parent' | 'caller'
|
|
44
|
+
}
|
|
45
|
+
```
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
```ts type-equiv
|
|
48
|
+
/** A managed execution; disposal addresses this exact activation, never a later resume. */
|
|
49
|
+
interface SubagentActivation {
|
|
50
|
+
/** Stable identity of the child. */
|
|
51
|
+
readonly childId: SessionId
|
|
52
|
+
/** Accepted inbox message, when the backend has a local inbox. */
|
|
53
|
+
readonly messageId?: MessageId
|
|
54
|
+
/**
|
|
55
|
+
* Execution result after teardown settles and notifications are sent; capture failures reject.
|
|
56
|
+
* Teardown failures are reported by dispose() without replacing a captured result.
|
|
57
|
+
*/
|
|
58
|
+
readonly result: Promise<SubagentResult>
|
|
59
|
+
/** Stop and release this activation and its owned descendants; rejects on teardown failure. */
|
|
60
|
+
dispose(): Promise<void>
|
|
61
|
+
}
|
|
62
|
+
```
|
|
41
63
|
|
|
42
64
|
```ts type-equiv
|
|
43
65
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* and resolves the durable descriptor before dispatching to
|
|
48
|
-
* {@link SubagentProvider.start}.
|
|
66
|
+
* Task and optional capabilities supplied to a backend. startActivation carries
|
|
67
|
+
* these fields in request while owning its label, cancellation, and delivery
|
|
68
|
+
* policy separately.
|
|
49
69
|
*/
|
|
50
70
|
interface SubagentStartRequest {
|
|
71
|
+
/** Initial child directory; relative paths resolve against the parent's current directory. Omitted inherits that directory at start. */
|
|
72
|
+
readonly cwd?: string
|
|
51
73
|
/** Optional short display label persisted with a session-backed child. */
|
|
52
74
|
readonly label?: string
|
|
53
75
|
/** Content delivered as the child's user message. */
|
|
54
76
|
readonly prompt: ContentBlock[]
|
|
55
77
|
/**
|
|
56
|
-
* The spawning agent.
|
|
57
|
-
*
|
|
58
|
-
* and only when no deployment `cwd` override is configured.
|
|
78
|
+
* The spawning agent. Its effective directory supplies the default cwd;
|
|
79
|
+
* in-process children retain its origin, lineage, and delegation depth.
|
|
59
80
|
*/
|
|
60
81
|
readonly parent: Agent
|
|
61
82
|
/**
|
|
@@ -106,72 +127,64 @@ interface SubagentStartRequest {
|
|
|
106
127
|
}
|
|
107
128
|
```
|
|
108
129
|
|
|
109
|
-
`signal` is the single cancellation channel before and after readiness. The [subagent composition-controls Agent Note](../../.agents/notes/implemented/feature/2026-07-12-subagent-persona-tool-filter-and-depth.md) owns the persona, live global-tool filter, absolute-depth, and visibility-not-authority rationale.
|
|
110
|
-
|
|
111
|
-
The caller-facing request does not carry catalog format details or continuation state. `SubagentRuntime.start()` resolves the detached one-shot descriptor after capability checks, then passes this provider-facing request to the selected transport; a continuable child never reaches `SubagentProvider.start()`:
|
|
112
|
-
|
|
113
130
|
```ts type-equiv
|
|
114
|
-
/**
|
|
115
|
-
* Provider-facing one-shot request after {@link SubagentRuntime.start} resolves
|
|
116
|
-
* the durable child descriptor.
|
|
117
|
-
*/
|
|
131
|
+
/** Provider-facing request with an absolute directory selected before startup. */
|
|
118
132
|
interface ResolvedSubagentStartRequest extends SubagentStartRequest {
|
|
119
|
-
/**
|
|
120
|
-
readonly
|
|
133
|
+
/** Absolute child directory captured from the parent or explicit request. */
|
|
134
|
+
readonly cwd: string
|
|
121
135
|
}
|
|
122
136
|
```
|
|
123
137
|
|
|
124
|
-
##
|
|
138
|
+
## Local children and activations
|
|
125
139
|
|
|
126
|
-
A
|
|
140
|
+
A local child has a durable Session and at most one live activation. The manager reserves identity and capacity, prepares the child through its backend, and owns input admission, cold resume, and child-first disposal. The activation result settles after resource release and completion notification. Disposal reports cleanup failure separately without replacing a captured result. Structured capture closes input for that activation; a later cold resume does not inherit the output schema.
|
|
127
141
|
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
142
|
+
```ts type-equiv
|
|
143
|
+
/**
|
|
144
|
+
* What the continuation manager asks a provider for while materializing one
|
|
145
|
+
* continuable child's FIRST activation. The manager has already reserved the
|
|
146
|
+
* durable child identity and owns every later operation, so this request
|
|
147
|
+
* carries only what distinguishes a fresh child from one seeded with parent
|
|
148
|
+
* history.
|
|
149
|
+
*/
|
|
150
|
+
interface ContinuableCreateRequest {
|
|
151
|
+
/** Absolute initial directory captured before provider preparation. */
|
|
152
|
+
readonly cwd: string
|
|
153
|
+
/** The reserved durable child session id, for provider diagnostics. */
|
|
154
|
+
readonly sessionId: SessionId
|
|
155
|
+
/** The delegating parent agent whose history a seeding provider reads. */
|
|
156
|
+
readonly parent: Agent
|
|
157
|
+
/**
|
|
158
|
+
* Caller cancellation, which owns preparation only until the manager accepts
|
|
159
|
+
* the initial prompt into the child's inbox.
|
|
160
|
+
*/
|
|
161
|
+
readonly signal: AbortSignal
|
|
162
|
+
}
|
|
134
163
|
```
|
|
135
164
|
|
|
136
|
-
`SubagentRuntime.startContinuable()` reserves the stable child id, snapshots the versioned `subagent/descriptor` payload, asks the named provider for its detached `ContinuableCreateSpec`, creates the child Agent through a private activation-owner scope, establishes any continuable-parent ownership, and submits the initial prompt. It resolves with `{ childId, messageId }` when inbox acceptance yields the message id — without waiting for the turn to start or for the message to enter the Session log. Every failure before that acceptance rejects with neither id, disposing any created handle and rolling back the Activation and parent ownership.
|
|
137
|
-
|
|
138
|
-
`SubagentRuntime.sendMessage()` is the sole model-authored message operation. It accepts the exact live sender plus a target id, permits only a direct parent or direct continuable child, derives sender attribution itself, and routes a direct-child target by Activation residency:
|
|
139
|
-
|
|
140
|
-
| Target Activation state | `sendMessage` |
|
|
141
|
-
|---|---|
|
|
142
|
-
| `running` | steer the nearest step in the same Activation |
|
|
143
|
-
| `waiting` | wake and steer the same Activation |
|
|
144
|
-
| no Activation | cold-resume a new Activation, then steer it |
|
|
145
|
-
|
|
146
|
-
`running` means the Agent has an active driver or maintenance task; `waiting` means no Agent activity is active but its Inbox is nonempty or it owns at least one child Activation that has not completed disposal; `settled` means no Agent activity is active, the Inbox is empty, and every owned child is disposed, at which point the manager disposes the [`AgentHandle`](core.md#creation-and-ownership) and removes the Activation. The manager derives these internal conditions from `Agent.whenIdle()`, `Agent.inbox.hasPending`, the owned-child set, and an Activation generation that invalidates stale observations, rather than maintaining a second execution state machine. After the final Session flush, the child-lock decision uses the synchronous task entry of `Agent.runMaintenance()` to claim the idle phase and close admission in the same JavaScript turn. This conservative rule does not distinguish delivery modes: context parked by `Agent.inject()` can keep an idle Activation and its live ancestors resident until a waking delivery claims it, a queue mutation removes it, or manager teardown discards it.
|
|
147
|
-
|
|
148
|
-
The Agent inbox is the only queue. Every Agent message uses `Agent.steer()`: an idle target starts a turn, while a running target claims it at the nearest step boundary. The browser `subagent.prompt` Remote separately carries `delivery: 'queue' | 'steer'` through the same internal admission path; Queue opens a later FIFO turn, while Steer retains the Agent loop's best-effort nearest-step behavior and the message's human source. Successful delivery returns the accepted `MessageId`; the existing `agent/inbox/inserted`, `agent/inbox/claimed`, and `agent/inbox/discarded` events remain the message-lifecycle observations, and the continuation layer defines no second queue.
|
|
149
|
-
|
|
150
|
-
Authority comes from the exact live sender. Parent-to-child delivery requires the target's `SessionHeader.parentSession` to name the sender; child-to-parent delivery requires the sender's resident Activation to name the target. Siblings, ancestors beyond one edge, self-targets, stale Agent objects, and one-shot children are rejected. Each accepted message is framed as `Agent <sender-id> sent a message:` and records `AgentMessageSource`; the source records the sender but grants no authority.
|
|
151
|
-
|
|
152
|
-
For `startContinuable()`, `sendMessage()`, and browser prompt delivery, the caller signal owns lookup, materialization, and admission only until inbox acceptance. Afterwards the manager owns the Activation independently: later caller cancellation neither cancels the accepted turn nor disposes the child. The public subagent service exposes no caller-selected Agent-message scheduling; browser human Queue and Steer remain internal adapter choices.
|
|
153
|
-
|
|
154
|
-
Live queue occurrence mutation remains in the Session domain. `session.updateQueue` admits ordinary Edit, Remove, and QueueDock Steer for a live subagent-owned Agent only when its current projected identity is continuable and its descriptor sequence is in that child's own non-seed suffix. The identity projection folds descriptors last-wins so a child descriptor supersedes descriptors retained from fork lineage; the own-suffix sequence check prevents a seed-only ancestor identity from authorizing mutation. One-shot, missing, unknown, corrupt, or cold children remain rejected, and queue mutation never cold-resumes a child. The target Session id is the human authority for these mutations, including pending `nextStep` steering or injected context. Steer requires a queued `MessageId` and an Agent that reports running when the command begins; cancellation after admission uses the Agent's accepted waking `nextTurn` fallback. Edit rewrites content under the same `MessageId`, and both Edit and Steer complete their Inbox work synchronously, so settlement observes only the final state. `agent/inbox/claimed` and `agent/inbox/discarded` wake the watcher to re-read whether any pending occurrence remains; this lets direct Agent delivery resume parked work and lets removing the last parked occurrence settle an idle child. The [human inbox-control reference](../../packages/api/session-controller/README.md) owns these semantics.
|
|
155
|
-
|
|
156
|
-
`SubagentRuntime.interrupt(targetSessionId, authority)` is the one public stop: it authorizes synchronously, issues `Agent.cancel(cause, { keepInbox: true })` on the live target, and returns without awaiting quiescence. The Activation, its unclaimed pending inbox work, and published descendants are untouched; work already claimed into the interrupted turn is not requeued. Once the interrupted driver is idle, a waking send resumes the parked FIFO queue. An absent target — unknown, one-shot, or already settled — and a manager-less composition are accepted no-ops. For a live target, a mismatched parent address or caller outside its live ancestry rejects with `UNAUTHORIZED`; stale ancestor objects and self-targeting ancestor requests reject before target lookup.
|
|
157
|
-
|
|
158
165
|
```ts type-equiv
|
|
159
166
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
167
|
+
* A provider's detached contribution to one continuable child's creation. This
|
|
168
|
+
* is DATA, never a capability: it carries no Agent, `AgentHandle`, prompt
|
|
169
|
+
* delivery, result, disposal, or resume operation, because the continuation
|
|
170
|
+
* manager owns the child's whole lifecycle after preparation.
|
|
163
171
|
*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
172
|
+
interface ContinuableCreateSpec {
|
|
173
|
+
/**
|
|
174
|
+
* Completed-turn prefix of the parent's log to seed the child session with,
|
|
175
|
+
* or absent for a fresh child. Same durable contract as
|
|
176
|
+
* `CreateAgentOptions.seed`: contiguous from seq 0, lossless JSON, balanced.
|
|
177
|
+
*/
|
|
178
|
+
readonly seed?: readonly SessionEvent[]
|
|
179
|
+
}
|
|
167
180
|
```
|
|
168
181
|
|
|
169
|
-
|
|
182
|
+
## Messages and interruption
|
|
170
183
|
|
|
171
|
-
|
|
184
|
+
sendMessage authorizes the exact live sender and permits only adjacent local agents. Running children receive steering input; absent continuable children resume from persistence. External executions reject follow-ups. Both local and external executions automatically report their final text, structured result, diagnostic, and status in the parent settlement notice. Local children can also send messages through send_message. caller delivery suppresses settlement notices. drainDescendants and drainChildren await owned work teardown for local and external activations.
|
|
172
185
|
|
|
173
186
|
```ts type-equiv
|
|
174
|
-
/** Durable attribution for one model-authored message between
|
|
187
|
+
/** Durable attribution for one model-authored message between Agents. */
|
|
175
188
|
interface AgentMessageSource {
|
|
176
189
|
readonly kind: 'agent-message'
|
|
177
190
|
/** A message another agent addressed to this one (`relay` context form). */
|
|
@@ -181,26 +194,6 @@ interface AgentMessageSource {
|
|
|
181
194
|
}
|
|
182
195
|
```
|
|
183
196
|
|
|
184
|
-
```ts type-equiv
|
|
185
|
-
/** Options for one model-authored message between adjacent Agents. */
|
|
186
|
-
interface SubagentSendMessageOptions {
|
|
187
|
-
/** Caller cancellation, owning the operation only until inbox acceptance. */
|
|
188
|
-
readonly signal: AbortSignal
|
|
189
|
-
}
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
```ts type-equiv
|
|
193
|
-
/** Identities returned once a continuable child accepted its initial prompt. */
|
|
194
|
-
interface ContinuableStart {
|
|
195
|
-
/** The durable child session id, stable across activations. */
|
|
196
|
-
readonly childId: SessionId
|
|
197
|
-
/** The accepted initial prompt's inbox message id. */
|
|
198
|
-
readonly messageId: MessageId
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
When a resident Activation settles, the manager delivers one notice to the child's durable direct parent describing how that epoch ended and carrying the nonempty text blocks from its final assistant output, or `It left no closing message.` when none remain. That delivery is unconditional for every child whose id a caller received, happens before the ownership release that would let the parent be judged settled, and reaches a resident parent through the same waking Agent delivery as an Agent message. A parent whose own lineage is already tearing down receives it without a wake, because waking an idle Agent starts a turn rather than queueing work. Its source has a distinct kind so a transcript never presents a runtime account as something the child wrote.
|
|
203
|
-
|
|
204
197
|
```ts type-equiv
|
|
205
198
|
/**
|
|
206
199
|
* Durable attribution for the runtime's own account of a continuable child
|
|
@@ -220,72 +213,32 @@ interface SubagentSettledMessageSource {
|
|
|
220
213
|
}
|
|
221
214
|
```
|
|
222
215
|
|
|
223
|
-
The provider participates only in preparing the initial creation spec, where `spawn` and `fork` differ. Its returned spec carries only detached provider-specific creation inputs — the optional parent-history seed — and no Agent, `AgentHandle`, prompt delivery, result, disposal, or resume operation. Cold resume does not dispatch through a provider at all: the manager folds the generic descriptor, calls `ctx.agents.resume()` through the same activation-owner scope, and submits the waiting turn.
|
|
224
|
-
|
|
225
216
|
```ts type-equiv
|
|
226
|
-
/**
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
* durable child identity and owns every later operation, so this request
|
|
230
|
-
* carries only what distinguishes a fresh child from one seeded with parent
|
|
231
|
-
* history.
|
|
232
|
-
*/
|
|
233
|
-
interface ContinuableCreateRequest {
|
|
234
|
-
/** The reserved durable child session id, for provider diagnostics. */
|
|
235
|
-
readonly sessionId: SessionId
|
|
236
|
-
/** The delegating parent agent whose history a seeding provider reads. */
|
|
237
|
-
readonly parent: Agent
|
|
238
|
-
/**
|
|
239
|
-
* Caller cancellation, which owns preparation only until the manager accepts
|
|
240
|
-
* the initial prompt into the child's inbox.
|
|
241
|
-
*/
|
|
217
|
+
/** Options for one model-authored message between adjacent Agents. */
|
|
218
|
+
interface SubagentSendMessageOptions {
|
|
219
|
+
/** Caller cancellation, owning the operation only until inbox acceptance. */
|
|
242
220
|
readonly signal: AbortSignal
|
|
243
221
|
}
|
|
244
222
|
```
|
|
245
223
|
|
|
246
224
|
```ts type-equiv
|
|
247
225
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
* manager owns the child's whole lifecycle after preparation.
|
|
226
|
+
* Authority under which one interrupt request is admitted. `user` carries the
|
|
227
|
+
* durable direct-parent address a human client presented; `ancestor` carries
|
|
228
|
+
* the exact live Agent object whose recorded lineage must contain the caller.
|
|
252
229
|
*/
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
* or absent for a fresh child. Same durable contract as
|
|
257
|
-
* `CreateAgentOptions.seed`: contiguous from seq 0, lossless JSON, balanced.
|
|
258
|
-
*/
|
|
259
|
-
readonly seed?: readonly SessionEvent[]
|
|
260
|
-
}
|
|
230
|
+
type SubagentInterruptAuthority =
|
|
231
|
+
| { readonly kind: 'user'; readonly parentSessionId: SessionId }
|
|
232
|
+
| { readonly kind: 'ancestor'; readonly agent: Agent }
|
|
261
233
|
```
|
|
262
234
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
A local one-shot provider appends the descriptor inside the child's initial turn before its first request. The continuation manager appends the descriptor after any provider-supplied lineage and before the initial prompt is admitted; `Session.inheritedEventCount` remains the fork-lineage boundary: resume-time descriptor authority reads the child's own suffix, while the identity projection folds `subagent/descriptor` last-wins so the child's own descriptor overrides a fork-seeded ancestor's. The event is log-only: no `surfaceOp`, never in model history, and retained across compaction by the append-only log. Malformed current-version descriptors are corrupt; unsupported versions cannot be classified by this runtime.
|
|
266
|
-
|
|
267
|
-
## Durable enumeration: `listChildren()`, `listDescendants()`, and their entries
|
|
268
|
-
|
|
269
|
-
The model-facing `list_agents` adapter reports current activity as `running` or `inactive`. These values do not describe task completion or guarantee that `send_message` will succeed.
|
|
270
|
-
|
|
271
|
-
`SubagentRuntime.listChildren(parentSessionId, signal?)` reads the parent's `subagentCatalog` view through a live-preferred Session observation and releases that observation on success or failure. It returns direct-child entries in parent event order without reading child logs or enumerating the Session corpus. Query failures propagate; a missing catalog projection fails explicitly. Browser rows derive membership from the shared projection store and add activity from Session status; the control stream pushes complete catalog updates. `listDescendants()` recursively reads those catalogs and derives `hasChildren` from each child catalog. [The parent-catalog Agent Note](../../.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.md) owns creation, fork isolation, ordering, and persistence costs.
|
|
272
|
-
|
|
273
|
-
`SubagentRuntime.listDescendants(rootSessionId)` recursively calls the same catalog reader in stable pre-order, preserving each parent's event order. One-shot and unknown-mode entries remain traversal nodes; unknown modes produce `unsupported` diagnostics. An unreadable child catalog produces `corrupt` or `unavailable` and stops only that branch. Root read failures, missing services or projections, and cancellation reject the listing. Each reachable catalog is observed once and released before the next read; repeated ids and cycles are skipped. Sessions absent from reachable catalogs are not discovered, including ordinary Session forks and any subagents below those forks. Each row carries its catalog parent and root-relative depth:
|
|
274
|
-
|
|
275
|
-
```ts type-equiv
|
|
276
|
-
/** One catalog descendant with its direct parent and edge distance from the requested root. */
|
|
277
|
-
type SubagentDescendantListEntry = SubagentListEntry & {
|
|
278
|
-
/** Parent whose catalog contains this child. */
|
|
279
|
-
readonly parentId: SessionId
|
|
280
|
-
/** Edge distance from the requested root; direct children are `1`. */
|
|
281
|
-
readonly depth: number
|
|
282
|
-
}
|
|
283
|
-
```
|
|
235
|
+
## Durable enumeration
|
|
284
236
|
|
|
237
|
+
`listChildren` reads the parent-owned catalog of all local children and parent-delivery external children. Caller-delivery external executions leave membership and result collection to their caller; local workflow children remain discoverable after completion. External entries carry `mode: 'external'` and cannot open a child Session or accept follow-ups. Catalog entries record membership at creation without execution status. `list_agents` exposes direct continuable children with `running` or `inactive` activity; see the [control tool](../../packages/subagent/tool-subagent-control/README.md#list_agents).
|
|
285
238
|
|
|
286
|
-
##
|
|
239
|
+
## Results and backend handles
|
|
287
240
|
|
|
288
|
-
|
|
241
|
+
SubagentResult is available to program consumers. The activation registry retains the external backend handle until disposal completes. A cleanup failure does not replace a captured execution result: the activation result and parent notice retain it, while dispose rejects and the live subagent/end event reports error. Backend-owned diagnostics must satisfy the safe-detail requirements below.
|
|
289
242
|
|
|
290
243
|
```ts type-equiv
|
|
291
244
|
/**
|
|
@@ -320,8 +273,6 @@ interface SubagentResult {
|
|
|
320
273
|
}
|
|
321
274
|
```
|
|
322
275
|
|
|
323
|
-
`SubagentStopReason` is a [merge-extensible derived union](core.md#the-map--derived-union-pattern) — a backend may add variants, so consumers branch on the known cases and treat an unknown terminal reason as a failure:
|
|
324
|
-
|
|
325
276
|
```ts type-equiv
|
|
326
277
|
/**
|
|
327
278
|
* Why a subagent run ended. Merge-extensible (a backend may add variants);
|
|
@@ -343,33 +294,17 @@ interface SubagentStopReasonMap {
|
|
|
343
294
|
}
|
|
344
295
|
```
|
|
345
296
|
|
|
346
|
-
## A one-shot run: `SubagentRun`
|
|
347
|
-
|
|
348
|
-
`SubagentRun` is the consumer-owned handle for a published one-shot child — one disposable foreground delegation with one result, never a durable child handle. Prompt submission, turn work, and infrastructure faults after publication belong to `result`. Consumers await that result and always dispose the run to reach quiescence. Child failures resolve with a non-completed stop reason; only unrepresentable infrastructure faults reject. A run has no steering and no resume: continuable conversations have no run at all, because the continuation manager holds their `AgentHandle` directly and orders every turn through the child's own inbox.
|
|
349
|
-
|
|
350
297
|
```ts type-equiv
|
|
351
298
|
/**
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
* continuation manager holds their `AgentHandle` directly and orders every
|
|
358
|
-
* turn through the child's own inbox.
|
|
299
|
+
* Backend execution handle owned directly by the activation registry.
|
|
300
|
+
* A result may become available before resource release; the manager always
|
|
301
|
+
* disposes the handle and awaits cleanup. Backend startup failures clean up
|
|
302
|
+
* partial resources before rejecting, while accepted execution failures settle
|
|
303
|
+
* through result.
|
|
359
304
|
*/
|
|
360
305
|
interface SubagentRun {
|
|
361
|
-
/**
|
|
362
|
-
* Parent-scoped run id. For a local run, this MUST equal the published child
|
|
363
|
-
* session id, whose `parentSession` records `request.parent.session.id`; a
|
|
364
|
-
* remote provider mints an id unique in the parent namespace.
|
|
365
|
-
*/
|
|
306
|
+
/** Provider-minted id, unique across all parents, providers, and local Sessions in this runtime. */
|
|
366
307
|
readonly id: SessionId
|
|
367
|
-
/**
|
|
368
|
-
* The exact published in-process child, or `undefined` for a remote run.
|
|
369
|
-
* When present, its id is {@link id}; the provider retains no ownership
|
|
370
|
-
* implication beyond the run's ordinary {@link dispose} contract.
|
|
371
|
-
*/
|
|
372
|
-
readonly localAgent: Agent | undefined
|
|
373
308
|
/**
|
|
374
309
|
* Resolves with the child's terminal {@link SubagentResult} when the run
|
|
375
310
|
* settles. Does NOT reject on a child-level failure — a model/transport
|
|
@@ -386,11 +321,9 @@ interface SubagentRun {
|
|
|
386
321
|
}
|
|
387
322
|
```
|
|
388
323
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
## The provider contract: `SubagentProvider`
|
|
324
|
+
## The provider contract: SubagentProvider
|
|
392
325
|
|
|
393
|
-
|
|
326
|
+
`SubagentManager` owns startup, message admission, and execution lifetimes. Spawn and Fork contribute detached creation inputs for local Agents. Codex, Claude Code, ACP, and DSH SDK contribute one execution handle; they do not gain multiple turns. Each activation is an execution record that directly retains its AgentHandle or SubagentRun. External completion follows the handle’s result promise; inbox and idle admission belong only to local execution. Both paths share admission, capacity, parent ownership, cancellation, and disposal. The [package reference](../../packages/subagent/subagent/README.md) describes composition and deployment requirements.
|
|
394
327
|
|
|
395
328
|
```ts type-equiv
|
|
396
329
|
/**
|
|
@@ -413,31 +346,28 @@ interface SubagentProvider {
|
|
|
413
346
|
*/
|
|
414
347
|
readonly inheritsParentContext: boolean
|
|
415
348
|
/**
|
|
416
|
-
* Optional static provider-owned provider/model route for
|
|
349
|
+
* Optional static provider-owned provider/model route for child Agent
|
|
417
350
|
* options. Consumers merge tool/model overrides over these values before
|
|
418
351
|
* preflight; providers whose route derives from the parent omit it. The value
|
|
419
352
|
* is detached immutable data and requires `agentOptions` support.
|
|
420
353
|
*/
|
|
421
354
|
readonly agentRouteDefaults?: Readonly<{ provider: string; model: string }>
|
|
422
355
|
/**
|
|
423
|
-
* Establish
|
|
356
|
+
* Establish one external execution and return its owned handle.
|
|
424
357
|
* The service has already validated that every requested start-time
|
|
425
|
-
* capability is supported
|
|
426
|
-
*
|
|
427
|
-
* initial turn. Before fulfillment, the provider owns setup and cleans any
|
|
428
|
-
* unpublished partial resources before rejecting. Ownership transfers on
|
|
358
|
+
* capability is supported. Before fulfillment, the provider owns setup and
|
|
359
|
+
* cleans any unpublished partial resources before rejecting. Ownership transfers on
|
|
429
360
|
* fulfillment; subsequent turn or infrastructure failure settles through
|
|
430
361
|
* the returned run. Distinct starts may overlap; cancellation, failure,
|
|
431
362
|
* result settlement, and disposal remain independent for each run.
|
|
432
363
|
*/
|
|
433
|
-
start(request: ResolvedSubagentStartRequest): Promise<SubagentRun>
|
|
364
|
+
start?(request: ResolvedSubagentStartRequest): Promise<SubagentRun>
|
|
434
365
|
/**
|
|
435
366
|
* OPTIONAL (continuable-creation capability): contribute the detached
|
|
436
367
|
* creation inputs that distinguish this provider's continuable children —
|
|
437
368
|
* only whether the child session is seeded with parent history. Method
|
|
438
|
-
* presence
|
|
439
|
-
*
|
|
440
|
-
* ordinary one-shot delegations.
|
|
369
|
+
* presence selects local activation execution. Providers without it execute
|
|
370
|
+
* through start and do not accept subsequent messages.
|
|
441
371
|
*
|
|
442
372
|
* This is the provider's ONLY participation in a continuable child. The
|
|
443
373
|
* continuation manager owns identity reservation, composition, Agent
|
|
@@ -450,18 +380,25 @@ interface SubagentProvider {
|
|
|
450
380
|
}
|
|
451
381
|
```
|
|
452
382
|
|
|
453
|
-
|
|
383
|
+
## Durable enumeration: `listChildren()`, `listDescendants()`, and their entries
|
|
454
384
|
|
|
455
|
-
|
|
385
|
+
The model-facing `list_agents` adapter reports current activity as `running` or `inactive`. These values do not describe task completion or guarantee that `send_message` will succeed.
|
|
456
386
|
|
|
457
|
-
|
|
387
|
+
`SubagentRuntime.listChildren(parentSessionId, signal?)` reads the parent's `subagentCatalog` view through a live-preferred Session observation and releases that observation on success or failure. It returns direct-child entries in parent event order without reading child logs or enumerating the Session corpus. Query failures propagate; a missing catalog projection fails explicitly. Browser rows derive membership from the shared projection store and add activity from Session status; the control stream pushes complete catalog updates. `listDescendants()` recursively reads those catalogs and derives `hasChildren` from each child catalog. [The parent-catalog Agent Note](../../.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.md) owns creation, fork isolation, ordering, and persistence costs.
|
|
388
|
+
|
|
389
|
+
`SubagentRuntime.listDescendants(rootSessionId)` recursively calls the same catalog reader in stable pre-order, preserving each parent's event order. External entries are leaves without local Sessions. One-shot and unknown-mode entries remain traversal nodes; unknown modes produce `unsupported` diagnostics. An unreadable child catalog produces `corrupt` or `unavailable` and stops only that branch. Root read failures, missing services or projections, and cancellation reject the listing. Each reachable catalog is observed once and released before the next read; repeated ids and cycles are skipped. Sessions absent from reachable catalogs are not discovered, including ordinary Session forks and any subagents below those forks. Each row carries its catalog parent and root-relative depth:
|
|
458
390
|
|
|
459
|
-
|
|
391
|
+
```ts type-equiv
|
|
392
|
+
/** One catalog descendant with its direct parent and edge distance from the requested root. */
|
|
393
|
+
type SubagentDescendantListEntry = SubagentListEntry & {
|
|
394
|
+
/** Parent whose catalog contains this child. */
|
|
395
|
+
readonly parentId: SessionId
|
|
396
|
+
/** Edge distance from the requested root; direct children are `1`. */
|
|
397
|
+
readonly depth: number
|
|
398
|
+
}
|
|
399
|
+
```
|
|
460
400
|
|
|
461
|
-
- **Delegation depth** is durable `SessionHeader.delegationDepth` plus the merge-extensible runtime field `AgentOptions.subagentDepth`; absence means top-level depth zero, and the greater present value is authoritative. The seam owns both fields — the loop neither sets nor reads them — so an in-process child persists parent depth + 1, cold resume cannot lower it, and every start rejects a derived depth outside the safe-integer domain or above a defined absolute `request.maxDepth` cap.
|
|
462
|
-
- **Fork seeding** uses [`CreateAgentOptions.seed`](core.md#creation-and-ownership) (a `SessionEvent[]` prefix threaded through `AgentLoop.createAgent` → `ctx.sessions.prepare({ seed })`, the same primitive `ctx.agents.resume()` uses). The fork backend passes a *balanced completed-turn prefix* of the parent's log — the parent's events up to and including its last `turn/end` — so the seed is contiguous-from-0 and contains only balanced turns (the in-flight, unbalanced turn is excluded).
|
|
463
401
|
|
|
464
|
-
`SubagentCatalogEntry` describes a direct child with complete or unknown-mode discovery information; `SubagentCatalogState` is the host-only projection state. `listChildren()` owns a live-preferred parent observation without opening child logs. Browser consumers read `subagentCatalog` through the shared Session projection store and combine membership with Session-list activity. `SubagentCatalogRow` belongs to recursive catalog listing. [The parent-catalog decision](../../.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.md) owns the persistent facts and read semantics.
|
|
465
402
|
|
|
466
403
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
467
404
|
|
|
@@ -491,7 +428,7 @@ Source: [`packages/subagent/tool-subagent/src/model-selection-settings.ts`](../.
|
|
|
491
428
|
|
|
492
429
|
### `ctx.subagents` — `SubagentRuntime`
|
|
493
430
|
|
|
494
|
-
Named provider registry with
|
|
431
|
+
Named provider registry with managed activations, durable discovery, and local child messaging.
|
|
495
432
|
|
|
496
433
|
```ts cordis-catalog
|
|
497
434
|
/**
|
|
@@ -502,15 +439,26 @@ Named provider registry with one-shot runs, durable discovery, and continuable-c
|
|
|
502
439
|
resolveMaxDepth(configured?: number | 'provider-managed'): number | undefined
|
|
503
440
|
|
|
504
441
|
/**
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
442
|
+
* Start a local child under its reserved identity.
|
|
443
|
+
* @param spec - local task, reserved child id, and result recipient.
|
|
444
|
+
* @returns activation with its accepted initial message id.
|
|
445
|
+
*/
|
|
446
|
+
startActivation(spec: SubagentActivationSpec & { readonly childId: SessionId }): Promise<SubagentActivation & { readonly messageId: MessageId }>
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Start a local or external child.
|
|
450
|
+
* @param spec - task, backend, and result recipient.
|
|
451
|
+
* @returns activation with a message id only for local children.
|
|
452
|
+
*/
|
|
453
|
+
startActivation(spec: SubagentActivationSpec): Promise<SubagentActivation>
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Join progressing descendants without cancelling them. Idle descendants whose
|
|
457
|
+
* inboxes require a later wake stay resident and do not delay host completion.
|
|
458
|
+
* @param parent - the exact parent whose descendant work is observed.
|
|
459
|
+
* @returns whether work was joined; hosts recheck parent idle after true.
|
|
512
460
|
*/
|
|
513
|
-
async
|
|
461
|
+
async waitForChildren(parent: Agent): Promise<boolean>
|
|
514
462
|
|
|
515
463
|
/**
|
|
516
464
|
* Steer one model-authored message to the sender's direct parent or direct
|
|
@@ -529,13 +477,13 @@ async startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart>
|
|
|
529
477
|
async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions, ): Promise<MessageId>
|
|
530
478
|
|
|
531
479
|
/**
|
|
532
|
-
* Interrupt one live
|
|
480
|
+
* Interrupt one live child's current execution under a human parent
|
|
533
481
|
* address or an exact live ancestor Agent. Fire-and-return: the cancel
|
|
534
482
|
* signal is issued before this returns, but the target may keep running
|
|
535
483
|
* until it observes the signal. Unclaimed pending inbox work, the Activation,
|
|
536
484
|
* and published descendants are preserved; claimed work is not requeued.
|
|
537
|
-
* Once the interrupted
|
|
538
|
-
* queue.
|
|
485
|
+
* Once the interrupted Agent is idle, a waking send resumes the parked FIFO
|
|
486
|
+
* queue. External backends stop their single execution. An absent target
|
|
539
487
|
* is an accepted no-op, as is a manager-less composition, which cannot own a
|
|
540
488
|
* live Activation.
|
|
541
489
|
* @param targetSessionId - the durable child session id to interrupt.
|
|
@@ -546,28 +494,28 @@ async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[],
|
|
|
546
494
|
interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void
|
|
547
495
|
|
|
548
496
|
/**
|
|
549
|
-
* Close
|
|
497
|
+
* Close subagent admission below exact live parent Agents, stop only their
|
|
550
498
|
* visible descendant Activations synchronously, then await admitted scoped
|
|
551
499
|
* materializations and release those forests child-first. The scoped cutoff
|
|
552
500
|
* lasts until each exact parent leaves the registry; unrelated parent trees
|
|
553
501
|
* remain live.
|
|
554
502
|
* @param parents - exact host-owned parent Agents entering teardown.
|
|
555
|
-
* @returns once every retained descendant
|
|
503
|
+
* @returns once every retained descendant activation released its execution handle.
|
|
556
504
|
* @throws an aggregate error after all branches settle when any failed.
|
|
557
505
|
*/
|
|
558
|
-
async
|
|
506
|
+
async drainDescendants(parents: readonly Agent[]): Promise<void>
|
|
559
507
|
|
|
560
508
|
/**
|
|
561
|
-
* Release selected resident
|
|
509
|
+
* Release selected resident direct children of one exact live
|
|
562
510
|
* parent. Other children of the same parent remain admitted and resident.
|
|
563
511
|
* Absent targets and a manager-less composition are accepted no-ops.
|
|
564
512
|
* @param parent - exact live direct parent authorizing the selected release.
|
|
565
513
|
* @param childIds - durable direct-child ids to release when resident.
|
|
566
|
-
* @returns once every selected
|
|
514
|
+
* @returns once every selected activation released its execution handle.
|
|
567
515
|
* @throws {SubagentError} `UNAUTHORIZED` when a resident target belongs to a
|
|
568
516
|
* different parent or the supplied parent identity is stale.
|
|
569
517
|
*/
|
|
570
|
-
async
|
|
518
|
+
async drainChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>
|
|
571
519
|
|
|
572
520
|
/**
|
|
573
521
|
* Read the parent's durable direct-child catalog without loading or resuming an Agent.
|
|
@@ -583,7 +531,8 @@ listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<Subagent
|
|
|
583
531
|
/**
|
|
584
532
|
* Recursively list reachable parent catalogs in stable pre-order, preserving
|
|
585
533
|
* each catalog's event order. Each row carries its catalog parent and depth;
|
|
586
|
-
* one-shot and unknown-mode children remain
|
|
534
|
+
* external children are leaves; one-shot and unknown-mode children remain
|
|
535
|
+
* traversal nodes. Unknown modes
|
|
587
536
|
* produce unsupported diagnostics. Unreadable child catalogs produce corrupt
|
|
588
537
|
* or unavailable diagnostics and stop only that branch. Root read failures,
|
|
589
538
|
* missing services or projections, and cancellation reject the whole listing.
|
|
@@ -636,7 +585,8 @@ listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<Subagen
|
|
|
636
585
|
/**
|
|
637
586
|
* Register a provider under its name. Registration is effect-scoped and HMR
|
|
638
587
|
* safe; removing a provider blocks new starts but does not revoke runs that
|
|
639
|
-
* were already returned to their holders.
|
|
588
|
+
* were already returned to their holders. Providers without either execution
|
|
589
|
+
* method are rejected with UNSUPPORTED_CAPABILITY before registration.
|
|
640
590
|
* @param provider - the trusted provider implementation.
|
|
641
591
|
* @returns the exact Cordis effect disposer.
|
|
642
592
|
*/
|
|
@@ -654,20 +604,6 @@ getProvider(name: string): SubagentProvider | undefined
|
|
|
654
604
|
* @returns the registered names.
|
|
655
605
|
*/
|
|
656
606
|
list(): string[]
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* Establish a published child on the named provider. Capability and semantic
|
|
660
|
-
* checks run before delegation. Provider ownership lasts until its promise
|
|
661
|
-
* fulfills; a rejection therefore has no run for the caller to dispose and
|
|
662
|
-
* emits no run lifecycle events. Post-publication turn and infrastructure
|
|
663
|
-
* failures settle through the returned run.
|
|
664
|
-
* A catalog append failure disposes the run and handles its result rejection;
|
|
665
|
-
* the caller receives the catalog error even if disposal also fails.
|
|
666
|
-
* @param name - the provider to use.
|
|
667
|
-
* @param request - child label, prompt, parent, signal, and optional capabilities.
|
|
668
|
-
* @returns the published holder-owned run.
|
|
669
|
-
*/
|
|
670
|
-
async start(name: string, request: SubagentStartRequest): Promise<SubagentRun>
|
|
671
607
|
```
|
|
672
608
|
|
|
673
609
|
Types: [Agent](core.md) · [ContentBlock](llm-streaming.md) · [MessageId](llm-streaming.md) · [SessionId](core.md)
|