dsh-plugin-guide 0.3.27 → 0.3.30
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 +3 -3
- package/README-hi.md +3 -3
- package/README-pt.md +3 -3
- package/README-zh.md +5 -3
- package/README.md +5 -3
- package/SKILL.md +21 -8
- package/dist/dsh-plugin-dev.js +93 -18
- 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/index.d.ts +32 -0
- package/index.js +24 -9
- package/package.json +19 -11
- 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 +2 -1
- package/scripts/archive-discussions.ps1 +162 -162
- package/scripts/build-llms-full.mjs +8 -0
- package/scripts/check-docs-drift.ps1 +55 -55
- package/scripts/check-ps1-bom.mjs +68 -0
- package/scripts/download-community-articles.ps1 +188 -188
- package/scripts/download-community-repos.ps1 +232 -232
- package/scripts/download-sources.ps1 +195 -195
- package/scripts/gen-topic-snapshot.ps1 +91 -91
- package/scripts/install-skill.ps1 +63 -63
- package/scripts/sync-official-docs.ps1 +138 -138
- package/scripts/verify-artifacts.mjs +26 -0
- package/scripts/verify-kit.ps1 +197 -187
- 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
|
+
# 子代理
|
|
2
2
|
|
|
3
3
|
[English](subagent.md) | 中文
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
统一的 activation API 管理本地会话和外部执行。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 能力与 activation 请求
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
所有后端都使用 startActivation。能力标记校验请求选项;prepareContinuable 选择本地 Agent 创建,start 选择一次外部执行。面向模型的工具采用 parent 回传。Workflow 与 code mode 消费者可以等待 caller 结果,不额外向父代理注入消息。历史子会话的 descriptor 不可用时,以 `mode: 'unknown'` 保持可发现性,但不授予继续执行能力;[包 README](../../packages/subagent/subagent/README.zh.md) 定义目录持久化语义。
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## 两类能力,两种发现方式
|
|
14
|
-
|
|
15
|
-
提供方通过一个静态描述符公布其**启动时**功能,服务会在单次 run 存在之前即行检查;如果请求依赖提供方不具备的功能,会被明确拒绝(`SubagentError('UNSUPPORTED_CAPABILITY')`),绝不会被接受后静默忽略。这些 flag 仅描述单次 [`start()`](#the-provider-contract-subagentprovider) 路径,即由提供方组合子 agent 的路径。**可继续**子 agent 由继续执行管理器自行组合,因此它们由唯一一个可选方法把关,方法存在即为能力,并以 TypeScript 的类型收窄作为发现机制:[`SubagentProvider.prepareContinuable`](#the-provider-contract-subagentprovider)。
|
|
11
|
+
可选的 `request.cwd` 指定子级的初始目录;相对路径以父级当前有效目录为基准解析。省略时,在准入阶段捕获该目录。本地子 Session 保留父级的原始项目,冷恢复保留其日志中的目录状态。
|
|
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` 是就绪前后唯一的取消通道。[subagent 组合控制 Agent Note](../../.agents/notes/implemented/feature/2026-07-12-subagent-persona-tool-filter-and-depth.zh.md)规定 persona、live 全局工具过滤、绝对深度以及「可见性而非权限」的设计理由。
|
|
110
|
-
|
|
111
|
-
面向调用方的请求不携带目录格式细节或继续执行状态。`SubagentRuntime.start()` 会在能力检查后解析分离的一次性描述符,再将以下面向提供方的请求传给所选传输;可继续子 agent 绝不会到达 `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
|
+
## 本地子代理与 activation
|
|
125
139
|
|
|
126
|
-
|
|
140
|
+
本地子代理拥有持久 Session,最多有一个在线 activation。Manager 预留身份和容量,通过后端准备子代理,并管理输入准入、冷恢复以及先子后父的释放顺序。activation 结果在资源释放和完成通知之后结算。释放操作单独报告清理失败,不会覆盖已捕获的结果。结构化结果提交会关闭该 activation 的输入;之后的冷恢复不会继承输出 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()` 会预留稳定的子 agent id,对版本化的 `subagent/descriptor` payload 建立快照,向指定提供方索取其分离的 `ContinuableCreateSpec`,通过私有的 activation-owner 作用域创建子 Agent,建立任何可继续父级的所有权,并提交初始提示词。当收件箱(inbox)准入产出消息 id 时,它以 `{ childId, messageId }` resolve——无需等待轮次开始,也无需等待消息进入会话日志。在该准入之前的任何失败都会以两个 id 都不返回的方式 reject,并 dispose(资源释放)任何已创建的 handle,回滚 Activation 与父级所有权。
|
|
137
|
-
|
|
138
|
-
`SubagentRuntime.sendMessage()` 是唯一由模型编写消息的操作。它接收确切在线 sender 与目标 id,只允许直接 parent 或直接可继续 child,自行推导 sender 来源信息,并根据目标 child 的 Activation 驻留状态路由:
|
|
139
|
-
|
|
140
|
-
| 目标 Activation 状态 | `sendMessage` |
|
|
141
|
-
|---|---|
|
|
142
|
-
| `running` | 在同一 Activation 中 steer 最近的 step |
|
|
143
|
-
| `waiting` | 唤醒并 steer 同一 Activation |
|
|
144
|
-
| 无 Activation | 冷恢复新的 Activation,然后 steer |
|
|
145
|
-
|
|
146
|
-
`running` 表示 Agent 拥有活跃的 driver 或 maintenance 任务;`waiting` 表示没有活跃的 Agent 工作,但其 Inbox 非空或仍拥有至少一个尚未完成 dispose 的子 Activation;`settled` 表示没有活跃的 Agent 工作、Inbox 为空且其拥有的每个子级都已 dispose,此时管理器会 dispose [`AgentHandle`](core.zh.md#creation-and-ownership) 并移除该 Activation。管理器根据 `Agent.whenIdle()`、`Agent.inbox.hasPending`、其拥有的子级集合,以及让过期观察失效的 Activation generation 推导这些内部条件,而非维护第二套执行状态机。最终 Session flush 之后,child-lock 决策会通过 `Agent.runMaintenance()` 的同步 task 入口占用 idle 阶段,并在同一个 JavaScript turn 内关闭准入。这条保守规则不区分投递模式:`Agent.inject()` 停放的 context 可以让空闲 Activation 及其在线祖先继续驻留,直到唤醒投递将其 claim、queue 变更将其移除,或 manager teardown 将其丢弃。
|
|
147
|
-
|
|
148
|
-
Agent 收件箱是唯一队列。每条 Agent 消息都使用 `Agent.steer()`:空闲目标会启动一个轮次,运行中目标则在最近的 step 边界领取消息。浏览器 `subagent.prompt` Remote 会另行通过同一条内部准入路径携带 `delivery: 'queue' | 'steer'`;Queue 开启后续 FIFO 轮次,Steer 保留 Agent loop 的 best-effort 最近 step 行为以及消息的人类来源。投递成功会返回被接受的 `MessageId`;既有的 `agent/inbox/inserted`、`agent/inbox/claimed` 与 `agent/inbox/discarded` 事件仍是消息生命周期的观测点,继续执行层不定义第二条队列。
|
|
149
|
-
|
|
150
|
-
权限来自确切在线 sender。parent 到 child 的投递要求目标的 `SessionHeader.parentSession` 指向 sender;child 到 parent 的投递要求 sender 的驻留 Activation 指向目标。sibling、相隔多于一条边的 ancestor、self-target、陈旧 Agent 对象与一次性 child 都会被拒绝。每条已接受消息都以 `Agent <sender-id> sent a message:` 作为前缀,并记录 `AgentMessageSource`;来源信息记录 sender,但不授予权限。
|
|
151
|
-
|
|
152
|
-
对于 `startContinuable()`、`sendMessage()` 与浏览器 prompt 投递,调用方 signal 仅在收件箱接受之前掌管查找、物化与准入。此后管理器独立掌管该 Activation:之后的调用方取消既不会取消已接受的轮次,也不会 dispose 子 agent。公开 subagent 服务不暴露由调用方选择的 Agent 消息调度;浏览器人类 Queue 与 Steer 仍是内部适配器选择。
|
|
153
|
-
|
|
154
|
-
在线 queue occurrence 变更属于 Session 域。只有在线 subagent-owned Agent 的当前 projection identity 为 continuable,且其 descriptor 序号位于该 child 自身的非 seed suffix 时,`session.updateQueue` 才会接纳普通 Edit、Remove 与 QueueDock Steer。Identity projection 以 last-wins 方式折叠 descriptor,因此 child descriptor 会覆盖 fork lineage 保留的 descriptor;own-suffix 序号检查会阻止仅来自 seed 的祖先 identity 授权变更。One-shot、缺失、未知、损坏或冷 child 会被拒绝,queue 变更绝不会冷恢复 child。这些变更以目标 Session id 作为人类权限,包括待处理 `nextStep` steering 或注入 context。Steer 要求 queued `MessageId`,且 command 开始时 Agent 必须报告 running;准入后发生取消时,会使用 Agent 已接受的唤醒 `nextTurn` fallback。Edit 会在同一个 `MessageId` 下改写内容,且 Edit 与 Steer 都会同步完成 Inbox 变更,因此 settlement 只会观察最终状态。`agent/inbox/claimed` 与 `agent/inbox/discarded` 都会唤醒 watcher 重新读取是否仍有待处理 occurrence;这样,直接 Agent 投递可以恢复停放工作,而移除最后一个停放 occurrence 可使 idle child 结算。[人类 inbox 控制 参考](../../packages/api/session-controller/README.zh.md)拥有这些语义。
|
|
155
|
-
|
|
156
|
-
`SubagentRuntime.interrupt(targetSessionId, authority)` 是唯一的公开停止操作:它同步完成鉴权,对在线目标发出 `Agent.cancel(cause, { keepInbox: true })`,然后不等待完全停稳即返回。Activation、其尚未领取的待处理 inbox 工作与已发布的后代均不受影响;已被领取进入中断轮次的工作不会重新入队。被中断的 driver 进入 idle 后,一次唤醒发送会恢复被暂停的 FIFO 队列。不存在的目标——未知、一次性或已结算——以及未绑定管理器的组合是被接受的 no-op。对在线目标,错误的 parent 地址或不在其在线祖先链中的调用方会以 `UNAUTHORIZED` 拒绝;陈旧的 ancestor 对象和指向自身的 ancestor 请求会在查找目标前拒绝。
|
|
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
|
+
## 消息与中断
|
|
170
183
|
|
|
171
|
-
|
|
184
|
+
sendMessage 根据确切的在线发送者实例授权,仅允许相邻本地代理通信。运行中的子代理接收引导输入;不在线的可继续子代理从持久化恢复。外部执行拒绝后续消息。本地与外部执行都会通过父级结束通知自动回传最终文本、结构化结果、诊断和状态。本地子代理也可以通过 send_message 发送消息。caller 回传会抑制结束通知。drainDescendants 与 drainChildren 对本地和外部 activation 都等待所属任务清理完成。
|
|
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
|
-
当驻留 Activation 结算时,管理器会向该 child 持久化的直接 parent 投递一条通知,说明该 epoch 如何结束,并携带其最终 assistant 输出中的非空文本块;若没有剩余的非空文本,则携带 `It left no closing message.`。对每个调用方拿到过 id 的 child,这条投递都是无条件的;它发生在会让 parent 被判定为已结算的所有权释放之前,并通过与 Agent 消息相同的唤醒 Agent 投递到达驻留 parent。若 parent 自身所在的谱系已在拆卸中,这条通知会以不唤醒的方式送达,因为唤醒一个 idle Agent 是开启一个轮次,而不是排队等待工作。其来源信息使用一个独立的 kind,因此 transcript(文本记录)绝不会把运行时的记账呈现为 child 自己写下的内容。
|
|
203
|
-
|
|
204
197
|
```ts type-equiv
|
|
205
198
|
/**
|
|
206
199
|
* Durable attribution for the runtime's own account of a continuable child
|
|
@@ -220,74 +213,32 @@ interface SubagentSettledMessageSource {
|
|
|
220
213
|
}
|
|
221
214
|
```
|
|
222
215
|
|
|
223
|
-
提供方只参与准备初始创建 spec,`spawn` 与 `fork` 在此有所不同。其返回的 spec 只携带分离的、提供方专属的创建输入——即可选的父级历史种子——不含 Agent、`AgentHandle`、提示词投递、结果、dispose 或恢复操作。冷恢复根本不经由提供方分发:管理器折叠通用描述符,通过同一个 activation-owner 作用域调用 `ctx.agents.resume()`,并提交等待中的轮次。
|
|
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
|
-
}
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
描述符([descriptor.ts](../../packages/subagent/subagent/src/descriptor.ts) 中的 `SubagentDescriptorData`)是每个由会话支撑的 subagent 所使用、按模式判别的持久化身份。两种模式都携带提供方名称。`one-shot` 描述符可以携带调用方拥有的可选显示 `label`;`continuable` 描述符要求以委派 `description` 作为持久化创建标签,并另外对已解析的子 agent `agentOptions.provider`/`model`/`reasoningEffort` 与可选的 `persona`/`toolFilter` 建立快照,用于冷恢复。它绝不会对可合并扩展的 `AgentOptions` 对象建立快照,因此无关的扩展值不会破坏继续执行,后续新增组合配置输入则是一次有意的版本更改。描述符省略 `subagentDepth`(冷恢复以持久化 header 中的 `delegationDepth` 作为单调下界)和 `outputSchema`(单次运行或 Activation 的结果约定,而非持久化身份)。
|
|
264
|
-
|
|
265
|
-
本地一次性提供方会在子 agent 的初始轮次内、首次请求前追加描述符。继续执行管理器会在任何提供方提供的谱系之后、初始提示词获准之前追加描述符;`Session.inheritedEventCount` 仍是 fork 谱系边界:恢复时的描述符权威读取子 agent 自身的后缀,而身份投影以 last-wins 折叠 `subagent/descriptor`,子 agent 自己的描述符会覆盖 fork seed 中祖先的描述符。该事件只进入日志:不含 `surfaceOp`,绝不进入模型历史,并由仅追加日志跨压缩保留。格式错误的当前版本描述符属于损坏;本运行时无法对不受支持的版本进行分类。
|
|
266
|
-
|
|
267
|
-
## 持久化枚举:`listChildren()`、`listDescendants()` 与其条目
|
|
268
|
-
|
|
269
|
-
模型侧的 `list_agents` 适配器将当前活动表示为 `running` 或 `inactive`。这些值不描述任务完成情况,也不保证 `send_message` 会成功。
|
|
270
|
-
|
|
271
|
-
`SubagentRuntime.listChildren(parentSessionId, signal?)` 通过优先使用在线 Session 的观察读取父会话的 `subagentCatalog` 视图,并在成功或失败时释放观察。它按父会话事件顺序返回直接子级条目,不读取子级日志,也不枚举 Session 语料库。查询失败直接传播;缺少目录投影时显式失败。浏览器条目从共享 projection store 派生成员关系,并从 Session 状态补充活动状态;control stream 推送完整目录更新。`listDescendants()` 递归读取这些目录,并从每个子级目录推导 `hasChildren`。[父目录 Agent Note](../../.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.zh.md) 说明创建、fork 隔离、排序和持久化成本。
|
|
272
|
-
|
|
273
|
-
`SubagentRuntime.listDescendants(rootSessionId)` 以稳定前序递归调用同一目录读取函数,保留每个父级的事件顺序。一次性和未知模式条目仍是遍历节点;未知模式产生 `unsupported` 诊断。无法读取的子级目录产生 `corrupt` 或 `unavailable`,只停止该分支。根读取失败、服务或投影缺失、取消会使整个查询失败。每个可达目录只观察一次,并在下一次读取前释放;重复 id 和循环引用会被跳过。可达目录中不存在的 Session 不会被发现,包括普通 Session fork 及其下的子 agent。每行携带目录中的父级和相对根的深度:
|
|
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
|
-
}
|
|
230
|
+
type SubagentInterruptAuthority =
|
|
231
|
+
| { readonly kind: 'user'; readonly parentSessionId: SessionId }
|
|
232
|
+
| { readonly kind: 'ancestor'; readonly agent: Agent }
|
|
283
233
|
```
|
|
284
234
|
|
|
235
|
+
## 持久枚举
|
|
285
236
|
|
|
286
|
-
|
|
237
|
+
`listChildren` 读取父级拥有的目录,其中包含所有本地子级及 parent 投递的外部子级。caller 投递的外部执行由调用方负责成员关系与结果收集;本地工作流子级在完成后仍可被发现。外部条目携带 `mode: 'external'`,不能打开子 Session 或接受后续消息。目录在创建时记录成员关系,不携带执行状态。`list_agents` 展示可继续的直接子级,其活跃状态为 `running` 或 `inactive`;参见[控制工具](../../packages/subagent/tool-subagent-control/README.zh.md#list_agents)。
|
|
287
238
|
|
|
288
|
-
##
|
|
239
|
+
## 结果与后端句柄
|
|
289
240
|
|
|
290
|
-
|
|
241
|
+
SubagentResult 供程序消费方读取。activation 注册表保留外部后端句柄,直到释放完成。清理失败不会覆盖已捕获的执行结果:activation 结果与父级通知保留该结果,dispose 拒绝,而在线 subagent/end 事件报告 error。后端提供的诊断必须满足下述安全信息要求。
|
|
291
242
|
|
|
292
243
|
```ts type-equiv
|
|
293
244
|
/**
|
|
@@ -322,8 +273,6 @@ interface SubagentResult {
|
|
|
322
273
|
}
|
|
323
274
|
```
|
|
324
275
|
|
|
325
|
-
`SubagentStopReason` 是一个[可合并扩展的派生联合类型](core.zh.md#the-map--derived-union-pattern)——后端可以添加变体,因此消费方应对已知 case 分支处理,将未知的终态原因视为失败:
|
|
326
|
-
|
|
327
276
|
```ts type-equiv
|
|
328
277
|
/**
|
|
329
278
|
* Why a subagent run ended. Merge-extensible (a backend may add variants);
|
|
@@ -345,33 +294,17 @@ interface SubagentStopReasonMap {
|
|
|
345
294
|
}
|
|
346
295
|
```
|
|
347
296
|
|
|
348
|
-
## 单次 run:`SubagentRun`
|
|
349
|
-
|
|
350
|
-
`SubagentRun` 是消费方持有的、指向一个已发布单次子 agent 的句柄——一次可 dispose 的前台委派,只有一个结果,绝不是持久化子 agent handle。发布后的提示词提交、轮次工作与基础设施故障归 `result` 所有。消费方 await 该结果并始终 dispose 该 run,直至完全停稳。子 agent 失败时以非 completed 的 stop reason resolve;只有无法表示的基础设施故障才会 reject。run 没有 steering,也没有恢复:可继续对话根本没有 run,因为继续执行管理器直接持有它们的 `AgentHandle`,并通过子 agent 自己的收件箱为每个轮次排序。
|
|
351
|
-
|
|
352
297
|
```ts type-equiv
|
|
353
298
|
/**
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
* continuation manager holds their `AgentHandle` directly and orders every
|
|
360
|
-
* 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.
|
|
361
304
|
*/
|
|
362
305
|
interface SubagentRun {
|
|
363
|
-
/**
|
|
364
|
-
* Parent-scoped run id. For a local run, this MUST equal the published child
|
|
365
|
-
* session id, whose `parentSession` records `request.parent.session.id`; a
|
|
366
|
-
* remote provider mints an id unique in the parent namespace.
|
|
367
|
-
*/
|
|
306
|
+
/** Provider-minted id, unique across all parents, providers, and local Sessions in this runtime. */
|
|
368
307
|
readonly id: SessionId
|
|
369
|
-
/**
|
|
370
|
-
* The exact published in-process child, or `undefined` for a remote run.
|
|
371
|
-
* When present, its id is {@link id}; the provider retains no ownership
|
|
372
|
-
* implication beyond the run's ordinary {@link dispose} contract.
|
|
373
|
-
*/
|
|
374
|
-
readonly localAgent: Agent | undefined
|
|
375
308
|
/**
|
|
376
309
|
* Resolves with the child's terminal {@link SubagentResult} when the run
|
|
377
310
|
* settles. Does NOT reject on a child-level failure — a model/transport
|
|
@@ -388,13 +321,9 @@ interface SubagentRun {
|
|
|
388
321
|
}
|
|
389
322
|
```
|
|
390
323
|
|
|
391
|
-
|
|
324
|
+
## 提供方约定:SubagentProvider
|
|
392
325
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
## 提供方约定:`SubagentProvider`
|
|
396
|
-
|
|
397
|
-
每个提供方都是一个具名的子 agent 传输层,多个提供方可以共存。服务在 `start()` 之前校验请求的启动时能力,并拒绝在没有 `prepareContinuable` 的提供方上发起可继续 start。`inheritsParentContext` 仅描述对话种子注入(`fork`:true;`spawn` 和 `acp`:false),使消费方能生成准确的面向模型措辞,而不暗示继承了工具、服务或权限。如果某个提供方的一次性路由拥有静态的提供方自有默认值,它会公开可选且不可变的 `agentRouteDefaults`,使 Consumer 能够在预检前以正确基线合并模型与工具覆盖。
|
|
326
|
+
`SubagentManager` 统一管理启动、消息准入与执行生命周期。Spawn 与 Fork 提供用于本地 Agent 的独立创建输入。Codex、Claude Code、ACP 和 DSH SDK 提供一个执行句柄,不增加多轮能力。每条 activation 都是直接持有 AgentHandle 或 SubagentRun 的执行期记录。外部完成由句柄的 result promise 确定;inbox 与空闲准入仅属于本地执行。两条路径共用准入、容量、父子所有权、取消和释放机制。[包参考](../../packages/subagent/subagent/README.zh.md)说明组合与部署要求。
|
|
398
327
|
|
|
399
328
|
```ts type-equiv
|
|
400
329
|
/**
|
|
@@ -417,31 +346,28 @@ interface SubagentProvider {
|
|
|
417
346
|
*/
|
|
418
347
|
readonly inheritsParentContext: boolean
|
|
419
348
|
/**
|
|
420
|
-
* Optional static provider-owned provider/model route for
|
|
349
|
+
* Optional static provider-owned provider/model route for child Agent
|
|
421
350
|
* options. Consumers merge tool/model overrides over these values before
|
|
422
351
|
* preflight; providers whose route derives from the parent omit it. The value
|
|
423
352
|
* is detached immutable data and requires `agentOptions` support.
|
|
424
353
|
*/
|
|
425
354
|
readonly agentRouteDefaults?: Readonly<{ provider: string; model: string }>
|
|
426
355
|
/**
|
|
427
|
-
* Establish
|
|
356
|
+
* Establish one external execution and return its owned handle.
|
|
428
357
|
* The service has already validated that every requested start-time
|
|
429
|
-
* capability is supported
|
|
430
|
-
*
|
|
431
|
-
* initial turn. Before fulfillment, the provider owns setup and cleans any
|
|
432
|
-
* 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
|
|
433
360
|
* fulfillment; subsequent turn or infrastructure failure settles through
|
|
434
361
|
* the returned run. Distinct starts may overlap; cancellation, failure,
|
|
435
362
|
* result settlement, and disposal remain independent for each run.
|
|
436
363
|
*/
|
|
437
|
-
start(request: ResolvedSubagentStartRequest): Promise<SubagentRun>
|
|
364
|
+
start?(request: ResolvedSubagentStartRequest): Promise<SubagentRun>
|
|
438
365
|
/**
|
|
439
366
|
* OPTIONAL (continuable-creation capability): contribute the detached
|
|
440
367
|
* creation inputs that distinguish this provider's continuable children —
|
|
441
368
|
* only whether the child session is seeded with parent history. Method
|
|
442
|
-
* presence
|
|
443
|
-
*
|
|
444
|
-
* ordinary one-shot delegations.
|
|
369
|
+
* presence selects local activation execution. Providers without it execute
|
|
370
|
+
* through start and do not accept subsequent messages.
|
|
445
371
|
*
|
|
446
372
|
* This is the provider's ONLY participation in a continuable child. The
|
|
447
373
|
* continuation manager owns identity reservation, composition, Agent
|
|
@@ -454,18 +380,27 @@ interface SubagentProvider {
|
|
|
454
380
|
}
|
|
455
381
|
```
|
|
456
382
|
|
|
457
|
-
|
|
383
|
+
## 持久化枚举:`listChildren()`、`listDescendants()` 与其条目
|
|
384
|
+
|
|
385
|
+
模型侧的 `list_agents` 适配器将当前活动表示为 `running` 或 `inactive`。这些值不描述任务完成情况,也不保证 `send_message` 会成功。
|
|
386
|
+
|
|
387
|
+
`SubagentRuntime.listChildren(parentSessionId, signal?)` 通过优先使用在线 Session 的观察读取父会话的 `subagentCatalog` 视图,并在成功或失败时释放观察。它按父会话事件顺序返回直接子级条目,不读取子级日志,也不枚举 Session 语料库。查询失败直接传播;缺少目录投影时显式失败。浏览器条目从共享 projection store 派生成员关系,并从 Session 状态补充活动状态;control stream 推送完整目录更新。`listDescendants()` 递归读取这些目录,并从每个子级目录推导 `hasChildren`。[父目录 Agent Note](../../.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.zh.md) 说明创建、fork 隔离、排序和持久化成本。
|
|
458
388
|
|
|
459
|
-
|
|
389
|
+
`SubagentRuntime.listDescendants(rootSessionId)` 以稳定前序递归调用同一目录读取函数,保留每个父级的事件顺序。外部条目是没有本地 Session 的叶节点。一次性和未知模式条目仍是遍历节点;未知模式产生 `unsupported` 诊断。无法读取的子级目录产生 `corrupt` 或 `unavailable`,只停止该分支。根读取失败、服务或投影缺失、取消会使整个查询失败。每个可达目录只观察一次,并在下一次读取前释放;重复 id 和循环引用会被跳过。可达目录中不存在的 Session 不会被发现,包括普通 Session fork 及其下的子 agent。每行携带目录中的父级和相对根的深度:
|
|
460
390
|
|
|
461
|
-
|
|
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
|
+
```
|
|
462
400
|
|
|
463
|
-
- **委派权限**在首次 await 前捕获。Auto 与 Full access 父级在 fresh child 完成 fork seed 和 sandbox/approval override 后,追加捕获的 `permission/preset` 身份。单次与可继续 child 共用此路径;cold resume 只读取 child 日志。Read Only 与 Workspace Write 保留继承的 sandbox override 加 `approval: never`,不匹配预设的组合仍为 `custom`。每个 Auto child 调用都使用既有 `parentSession`、创建 prompt 和经过核验的 human/直接父级消息独立审查。[Auto review 决策](../../.agents/notes/implemented/feature/2026-08-28-auto-review.zh.md)定义 low/medium/high 语义;不增加 委派记录、receipt、Header 字段、descriptor 字段或 Session format。
|
|
464
401
|
|
|
465
|
-
-
|
|
466
|
-
- **Fork 种子注入**使用 [`CreateAgentOptions.seed`](core.zh.md#creation-and-ownership)(一个 `SessionEvent[]` 前缀,经由 `AgentLoop.createAgent` → `ctx.sessions.prepare({ seed })` 传递,与 `ctx.agents.resume()` 使用的原语相同)。fork 后端传入父级日志的一段*平衡的已完成轮次前缀*——父级事件直到并包括其最后一个 `turn/end`——因此种子从 0 连续,且只包含平衡的轮次(进行中的、未平衡的轮次被排除在外)。
|
|
402
|
+
<a id="the-terminal-result-subagentresult"></a>
|
|
467
403
|
|
|
468
|
-
`SubagentCatalogEntry` 描述一条完整或未知模式的直接子级目录记录;`SubagentCatalogState` 是仅 host 使用的 projection state。`listChildren()` 拥有一次 live-preferred 父 Session observation,不打开子级日志。浏览器消费者通过共享 Session projection store 读取 `subagentCatalog`,并将成员关系与 Session 列表活动状态组合。`SubagentCatalogRow` 属于递归目录列表。[父目录决策](../../.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.zh.md) 规定持久事实与读取语义。
|
|
469
404
|
|
|
470
405
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
471
406
|
|
|
@@ -495,7 +430,7 @@ Source: [`packages/subagent/tool-subagent/src/model-selection-settings.ts`](../.
|
|
|
495
430
|
|
|
496
431
|
### `ctx.subagents` — `SubagentRuntime`
|
|
497
432
|
|
|
498
|
-
Named provider registry with
|
|
433
|
+
Named provider registry with managed activations, durable discovery, and local child messaging.
|
|
499
434
|
|
|
500
435
|
```ts cordis-catalog
|
|
501
436
|
/**
|
|
@@ -506,15 +441,26 @@ Named provider registry with one-shot runs, durable discovery, and continuable-c
|
|
|
506
441
|
resolveMaxDepth(configured?: number | 'provider-managed'): number | undefined
|
|
507
442
|
|
|
508
443
|
/**
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
444
|
+
* Start a local child under its reserved identity.
|
|
445
|
+
* @param spec - local task, reserved child id, and result recipient.
|
|
446
|
+
* @returns activation with its accepted initial message id.
|
|
447
|
+
*/
|
|
448
|
+
startActivation(spec: SubagentActivationSpec & { readonly childId: SessionId }): Promise<SubagentActivation & { readonly messageId: MessageId }>
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Start a local or external child.
|
|
452
|
+
* @param spec - task, backend, and result recipient.
|
|
453
|
+
* @returns activation with a message id only for local children.
|
|
454
|
+
*/
|
|
455
|
+
startActivation(spec: SubagentActivationSpec): Promise<SubagentActivation>
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Join progressing descendants without cancelling them. Idle descendants whose
|
|
459
|
+
* inboxes require a later wake stay resident and do not delay host completion.
|
|
460
|
+
* @param parent - the exact parent whose descendant work is observed.
|
|
461
|
+
* @returns whether work was joined; hosts recheck parent idle after true.
|
|
516
462
|
*/
|
|
517
|
-
async
|
|
463
|
+
async waitForChildren(parent: Agent): Promise<boolean>
|
|
518
464
|
|
|
519
465
|
/**
|
|
520
466
|
* Steer one model-authored message to the sender's direct parent or direct
|
|
@@ -533,13 +479,13 @@ async startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart>
|
|
|
533
479
|
async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions, ): Promise<MessageId>
|
|
534
480
|
|
|
535
481
|
/**
|
|
536
|
-
* Interrupt one live
|
|
482
|
+
* Interrupt one live child's current execution under a human parent
|
|
537
483
|
* address or an exact live ancestor Agent. Fire-and-return: the cancel
|
|
538
484
|
* signal is issued before this returns, but the target may keep running
|
|
539
485
|
* until it observes the signal. Unclaimed pending inbox work, the Activation,
|
|
540
486
|
* and published descendants are preserved; claimed work is not requeued.
|
|
541
|
-
* Once the interrupted
|
|
542
|
-
* queue.
|
|
487
|
+
* Once the interrupted Agent is idle, a waking send resumes the parked FIFO
|
|
488
|
+
* queue. External backends stop their single execution. An absent target
|
|
543
489
|
* is an accepted no-op, as is a manager-less composition, which cannot own a
|
|
544
490
|
* live Activation.
|
|
545
491
|
* @param targetSessionId - the durable child session id to interrupt.
|
|
@@ -550,28 +496,28 @@ async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[],
|
|
|
550
496
|
interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void
|
|
551
497
|
|
|
552
498
|
/**
|
|
553
|
-
* Close
|
|
499
|
+
* Close subagent admission below exact live parent Agents, stop only their
|
|
554
500
|
* visible descendant Activations synchronously, then await admitted scoped
|
|
555
501
|
* materializations and release those forests child-first. The scoped cutoff
|
|
556
502
|
* lasts until each exact parent leaves the registry; unrelated parent trees
|
|
557
503
|
* remain live.
|
|
558
504
|
* @param parents - exact host-owned parent Agents entering teardown.
|
|
559
|
-
* @returns once every retained descendant
|
|
505
|
+
* @returns once every retained descendant activation released its execution handle.
|
|
560
506
|
* @throws an aggregate error after all branches settle when any failed.
|
|
561
507
|
*/
|
|
562
|
-
async
|
|
508
|
+
async drainDescendants(parents: readonly Agent[]): Promise<void>
|
|
563
509
|
|
|
564
510
|
/**
|
|
565
|
-
* Release selected resident
|
|
511
|
+
* Release selected resident direct children of one exact live
|
|
566
512
|
* parent. Other children of the same parent remain admitted and resident.
|
|
567
513
|
* Absent targets and a manager-less composition are accepted no-ops.
|
|
568
514
|
* @param parent - exact live direct parent authorizing the selected release.
|
|
569
515
|
* @param childIds - durable direct-child ids to release when resident.
|
|
570
|
-
* @returns once every selected
|
|
516
|
+
* @returns once every selected activation released its execution handle.
|
|
571
517
|
* @throws {SubagentError} `UNAUTHORIZED` when a resident target belongs to a
|
|
572
518
|
* different parent or the supplied parent identity is stale.
|
|
573
519
|
*/
|
|
574
|
-
async
|
|
520
|
+
async drainChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>
|
|
575
521
|
|
|
576
522
|
/**
|
|
577
523
|
* Read the parent's durable direct-child catalog without loading or resuming an Agent.
|
|
@@ -587,7 +533,8 @@ listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<Subagent
|
|
|
587
533
|
/**
|
|
588
534
|
* Recursively list reachable parent catalogs in stable pre-order, preserving
|
|
589
535
|
* each catalog's event order. Each row carries its catalog parent and depth;
|
|
590
|
-
* one-shot and unknown-mode children remain
|
|
536
|
+
* external children are leaves; one-shot and unknown-mode children remain
|
|
537
|
+
* traversal nodes. Unknown modes
|
|
591
538
|
* produce unsupported diagnostics. Unreadable child catalogs produce corrupt
|
|
592
539
|
* or unavailable diagnostics and stop only that branch. Root read failures,
|
|
593
540
|
* missing services or projections, and cancellation reject the whole listing.
|
|
@@ -640,7 +587,8 @@ listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<Subagen
|
|
|
640
587
|
/**
|
|
641
588
|
* Register a provider under its name. Registration is effect-scoped and HMR
|
|
642
589
|
* safe; removing a provider blocks new starts but does not revoke runs that
|
|
643
|
-
* were already returned to their holders.
|
|
590
|
+
* were already returned to their holders. Providers without either execution
|
|
591
|
+
* method are rejected with UNSUPPORTED_CAPABILITY before registration.
|
|
644
592
|
* @param provider - the trusted provider implementation.
|
|
645
593
|
* @returns the exact Cordis effect disposer.
|
|
646
594
|
*/
|
|
@@ -658,20 +606,6 @@ getProvider(name: string): SubagentProvider | undefined
|
|
|
658
606
|
* @returns the registered names.
|
|
659
607
|
*/
|
|
660
608
|
list(): string[]
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* Establish a published child on the named provider. Capability and semantic
|
|
664
|
-
* checks run before delegation. Provider ownership lasts until its promise
|
|
665
|
-
* fulfills; a rejection therefore has no run for the caller to dispose and
|
|
666
|
-
* emits no run lifecycle events. Post-publication turn and infrastructure
|
|
667
|
-
* failures settle through the returned run.
|
|
668
|
-
* A catalog append failure disposes the run and handles its result rejection;
|
|
669
|
-
* the caller receives the catalog error even if disposal also fails.
|
|
670
|
-
* @param name - the provider to use.
|
|
671
|
-
* @param request - child label, prompt, parent, signal, and optional capabilities.
|
|
672
|
-
* @returns the published holder-owned run.
|
|
673
|
-
*/
|
|
674
|
-
async start(name: string, request: SubagentStartRequest): Promise<SubagentRun>
|
|
675
609
|
```
|
|
676
610
|
|
|
677
611
|
Types: [Agent](core.zh.md) · [ContentBlock](llm-streaming.zh.md) · [MessageId](llm-streaming.zh.md) · [SessionId](core.zh.md)
|