dsh-plugin-guide 0.3.15 → 0.3.16
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/package.json +1 -1
- package/references/official-docs/AGENTS.md +74 -49
- package/references/official-docs/README.i18n.yaml +2 -2
- package/references/official-docs/README.zh.md +12 -0
- package/references/official-docs/SNAPSHOT.md +4 -4
- package/references/official-docs/THIRD_PARTY_NOTICES.md +86 -30
- package/references/official-docs/docs/AGENTS.md +7 -6
- package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
- package/references/official-docs/docs/agent-lifecycle.md +12 -5
- package/references/official-docs/docs/agent-lifecycle.zh.md +12 -5
- package/references/official-docs/docs/api-gateway.i18n.yaml +2 -2
- package/references/official-docs/docs/api-gateway.md +2 -2
- package/references/official-docs/docs/api-gateway.zh.md +2 -2
- package/references/official-docs/docs/architecture.i18n.yaml +2 -2
- package/references/official-docs/docs/architecture.md +26 -12
- package/references/official-docs/docs/architecture.zh.md +28 -14
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +111 -31
- package/references/official-docs/docs/capability-seams.zh.md +111 -31
- package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/config-catalog.md +674 -202
- package/references/official-docs/docs/config-catalog.zh.md +691 -219
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +6 -0
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +111 -0
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +111 -0
- package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +1 -1
- package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-tool.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +4 -4
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.md +1 -1
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +1 -1
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +1 -1
- package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/extension-cookbook.md +3 -3
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +5 -5
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +6 -0
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +108 -0
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +108 -0
- package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +2 -2
- package/references/official-docs/docs/cordis-api/fiber.md +3 -3
- package/references/official-docs/docs/cordis-api/fiber.zh.md +3 -3
- package/references/official-docs/docs/cordis-api/inherited.md +0 -3
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +2 -2
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.md +2 -2
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +2 -2
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +2 -2
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +14 -15
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +15 -16
- package/references/official-docs/docs/dependency-catalog.json +7312 -0
- package/references/official-docs/docs/development.i18n.yaml +2 -2
- package/references/official-docs/docs/development.md +13 -3
- package/references/official-docs/docs/development.zh.md +16 -6
- package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
- package/references/official-docs/docs/event-producer-consumer.md +50 -39
- package/references/official-docs/docs/event-producer-consumer.zh.md +55 -44
- package/references/official-docs/docs/glossary.i18n.yaml +2 -2
- package/references/official-docs/docs/glossary.md +1 -1
- package/references/official-docs/docs/glossary.zh.md +1 -1
- package/references/official-docs/docs/i18n/README.i18n.yaml +2 -2
- package/references/official-docs/docs/i18n/README.md +8 -3
- package/references/official-docs/docs/i18n/README.zh.md +8 -3
- package/references/official-docs/docs/i18n/style-samples.md +1 -1
- package/references/official-docs/docs/i18n/translation-prompt.md +5 -5
- package/references/official-docs/docs/i18n/translation-rules.zh.md +2 -2
- package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
- package/references/official-docs/docs/module-graph.md +303 -120
- package/references/official-docs/docs/module-graph.zh.md +303 -120
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-catalog.md +5699 -64
- package/references/official-docs/docs/persistence-catalog.zh.md +5708 -73
- package/references/official-docs/docs/persistence-changes/2026-09-11-initial.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/2026-09-11-initial.md +280 -0
- package/references/official-docs/docs/persistence-changes/2026-09-11-initial.schema.json +13557 -0
- package/references/official-docs/docs/persistence-changes/2026-09-11-initial.zh.md +280 -0
- package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
- package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.schema.json +910 -0
- package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
- package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.md +96 -0
- package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.schema.json +8478 -0
- package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
- package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.schema.json +72 -0
- package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/README.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/README.md +74 -0
- package/references/official-docs/docs/persistence-changes/README.zh.md +74 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/README.md +74 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +74 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v0.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v0.md +5105 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v0.schema.json +49308 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v0.zh.md +5105 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v1.md +5107 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v1.schema.json +49411 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v1.zh.md +5107 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v2.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v2.md +5362 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v2.schema.json +56466 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v2.zh.md +5362 -0
- package/references/official-docs/docs/persistence-changes/releases/README.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/README.md +103 -0
- package/references/official-docs/docs/persistence-changes/releases/README.zh.md +103 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.schema.json +39868 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.schema.json +43342 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.schema.json +19452 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.schema.json +5320 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.schema.json +21258 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.schema.json +417 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.schema.json +29672 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.schema.json +48429 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.schema.json +49347 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.schema.json +17642 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.schema.json +38678 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.schema.json +783 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.schema.json +24597 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.schema.json +2132 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.i18n.yaml +6 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.schema.json +5 -0
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
- package/references/official-docs/docs/persistence-changes/releases/manifest.json +162 -0
- package/references/official-docs/docs/persistence-schema.json +61480 -0
- package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
- package/references/official-docs/docs/postmortem/README.md +1 -1
- package/references/official-docs/docs/postmortem/README.zh.md +1 -1
- package/references/official-docs/docs/rescope.i18n.yaml +2 -2
- package/references/official-docs/docs/rescope.md +2 -2
- package/references/official-docs/docs/rescope.zh.md +2 -2
- package/references/official-docs/docs/session-format-status.i18n.yaml +6 -0
- package/references/official-docs/docs/session-format-status.md +49 -0
- package/references/official-docs/docs/session-format-status.zh.md +49 -0
- package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/README.md +12 -3
- package/references/official-docs/docs/subsystems/README.zh.md +23 -14
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/agent-team.md +1 -1
- package/references/official-docs/docs/subsystems/agent-team.zh.md +2 -2
- package/references/official-docs/docs/subsystems/approval.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/approval.md +1 -1
- package/references/official-docs/docs/subsystems/approval.zh.md +1 -1
- package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/attachment.md +17 -7
- package/references/official-docs/docs/subsystems/attachment.zh.md +17 -7
- package/references/official-docs/docs/subsystems/{code-runtime.i18n.yaml → boot.i18n.yaml} +3 -3
- package/references/official-docs/docs/subsystems/boot.md +223 -0
- package/references/official-docs/docs/subsystems/boot.zh.md +223 -0
- package/references/official-docs/docs/subsystems/browser-use.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/browser-use.md +67 -0
- package/references/official-docs/docs/subsystems/browser-use.zh.md +67 -0
- package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/client-modules.md +20 -10
- package/references/official-docs/docs/subsystems/client-modules.zh.md +21 -11
- package/references/official-docs/docs/subsystems/client-resources.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/client-resources.md +92 -0
- package/references/official-docs/docs/subsystems/client-resources.zh.md +92 -0
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/commands.md +4 -0
- package/references/official-docs/docs/subsystems/commands.zh.md +5 -1
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/compaction.md +48 -2
- package/references/official-docs/docs/subsystems/compaction.zh.md +50 -4
- package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/computer-use.md +56 -0
- package/references/official-docs/docs/subsystems/computer-use.zh.md +56 -0
- package/references/official-docs/docs/subsystems/conversation.zh.md +1 -1
- package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/core.md +106 -60
- package/references/official-docs/docs/subsystems/core.zh.md +109 -63
- package/references/official-docs/docs/subsystems/deliverables.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/deliverables.md +178 -0
- package/references/official-docs/docs/subsystems/deliverables.zh.md +178 -0
- package/references/official-docs/docs/subsystems/extensions.zh.md +1 -1
- package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/feedback.md +165 -31
- package/references/official-docs/docs/subsystems/feedback.zh.md +165 -31
- package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/filesystem.md +15 -0
- package/references/official-docs/docs/subsystems/filesystem.zh.md +16 -1
- package/references/official-docs/docs/subsystems/goal.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/goal.md +37 -1
- package/references/official-docs/docs/subsystems/goal.zh.md +38 -2
- package/references/official-docs/docs/subsystems/invariants.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/invariants.md +1 -1
- package/references/official-docs/docs/subsystems/invariants.zh.md +3 -3
- package/references/official-docs/docs/subsystems/jobs.i18n.yaml +1 -1
- package/references/official-docs/docs/subsystems/jobs.md +1 -1
- package/references/official-docs/docs/subsystems/jobs.zh.md +1 -1
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/llm-streaming.md +35 -15
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +37 -17
- package/references/official-docs/docs/subsystems/lsp.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/lsp.md +1 -1
- package/references/official-docs/docs/subsystems/lsp.zh.md +1 -1
- package/references/official-docs/docs/subsystems/mcp.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/mcp.md +139 -0
- package/references/official-docs/docs/subsystems/mcp.zh.md +139 -0
- package/references/official-docs/docs/subsystems/office-to-pdf.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/office-to-pdf.md +87 -0
- package/references/official-docs/docs/subsystems/office-to-pdf.zh.md +87 -0
- package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/permission-presets.md +62 -27
- package/references/official-docs/docs/subsystems/permission-presets.zh.md +62 -27
- package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/persistence.md +36 -15
- package/references/official-docs/docs/subsystems/persistence.zh.md +36 -15
- package/references/official-docs/docs/subsystems/plan.zh.md +2 -2
- package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/ptc-runtime.md +232 -0
- package/references/official-docs/docs/subsystems/ptc-runtime.zh.md +232 -0
- package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/sandbox.md +5 -4
- package/references/official-docs/docs/subsystems/sandbox.zh.md +7 -6
- package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/schedule.md +2 -2
- package/references/official-docs/docs/subsystems/schedule.zh.md +3 -3
- package/references/official-docs/docs/subsystems/scope.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/scope.md +1 -1
- package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-projection.md +1 -1
- package/references/official-docs/docs/subsystems/session-projection.zh.md +2 -2
- package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-reference.md +11 -6
- package/references/official-docs/docs/subsystems/session-reference.zh.md +11 -6
- package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-telemetry.md +22 -6
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +23 -7
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-title.md +5 -5
- package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
- package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session.md +149 -61
- package/references/official-docs/docs/subsystems/session.zh.md +150 -62
- package/references/official-docs/docs/subsystems/shell.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/shell.md +19 -15
- package/references/official-docs/docs/subsystems/shell.zh.md +20 -16
- package/references/official-docs/docs/subsystems/sidebar-right.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/sidebar-right.md +153 -0
- package/references/official-docs/docs/subsystems/sidebar-right.zh.md +153 -0
- package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/skills.md +4 -6
- package/references/official-docs/docs/subsystems/skills.zh.md +4 -6
- package/references/official-docs/docs/subsystems/slots.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/slots.md +52 -38
- package/references/official-docs/docs/subsystems/slots.zh.md +53 -39
- package/references/official-docs/docs/subsystems/spill.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/spill.md +13 -6
- package/references/official-docs/docs/subsystems/spill.zh.md +13 -6
- package/references/official-docs/docs/subsystems/ssh.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/ssh.md +135 -0
- package/references/official-docs/docs/subsystems/ssh.zh.md +135 -0
- package/references/official-docs/docs/subsystems/storage.zh.md +2 -2
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subagent.md +33 -16
- package/references/official-docs/docs/subsystems/subagent.zh.md +32 -15
- package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subprocess.md +41 -44
- package/references/official-docs/docs/subsystems/subprocess.zh.md +41 -44
- package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/system-prompt.md +6 -2
- package/references/official-docs/docs/subsystems/system-prompt.zh.md +7 -3
- package/references/official-docs/docs/subsystems/todo.zh.md +1 -1
- package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/token-meter.md +2 -1
- package/references/official-docs/docs/subsystems/token-meter.zh.md +2 -1
- package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/tools.md +28 -12
- package/references/official-docs/docs/subsystems/tools.zh.md +28 -12
- package/references/official-docs/docs/subsystems/typert.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/typert.md +6 -5
- package/references/official-docs/docs/subsystems/typert.zh.md +6 -5
- package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/user-questions.md +2 -0
- package/references/official-docs/docs/subsystems/user-questions.zh.md +2 -0
- package/references/official-docs/docs/subsystems/web-client.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/web-client.md +5 -5
- package/references/official-docs/docs/subsystems/web-client.zh.md +6 -6
- package/references/official-docs/docs/subsystems/web-server.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/web-server.md +64 -0
- package/references/official-docs/docs/subsystems/web-server.zh.md +65 -1
- package/references/official-docs/docs/subsystems/webhook.i18n.yaml +1 -1
- package/references/official-docs/docs/subsystems/webhook.md +2 -2
- package/references/official-docs/docs/subsystems/workflow.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/workflow.md +8 -8
- package/references/official-docs/docs/subsystems/workflow.zh.md +10 -10
- package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/workspace.md +199 -1
- package/references/official-docs/docs/subsystems/workspace.zh.md +199 -1
- package/references/official-docs/docs/testing.i18n.yaml +2 -2
- package/references/official-docs/docs/testing.md +5 -4
- package/references/official-docs/docs/testing.zh.md +5 -4
- package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-catalog.md +452 -187
- package/references/official-docs/docs/tool-catalog.zh.md +454 -189
- package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-execution-pipeline.md +2 -2
- package/references/official-docs/docs/tool-execution-pipeline.zh.md +2 -2
- package/references/official-docs/docs/user/develop/basic/index.zh.md +1 -1
- package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/basic/publish.md +2 -2
- package/references/official-docs/docs/user/develop/basic/publish.zh.md +5 -5
- package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/framework/index.md +1 -1
- package/references/official-docs/docs/user/develop/framework/index.zh.md +1 -1
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.md +8 -8
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +8 -8
- package/references/official-docs/docs/user/guide/index.zh.md +2 -2
- package/references/official-docs/docs/user/guide/mcp-memory.zh.md +1 -1
- package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/network-proxy.md +1 -1
- package/references/official-docs/docs/user/guide/network-proxy.zh.md +1 -1
- package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/providers.md +12 -8
- package/references/official-docs/docs/user/guide/providers.zh.md +14 -10
- package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/python-sdk.md +59 -23
- package/references/official-docs/docs/user/guide/python-sdk.zh.md +60 -24
- package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
- package/references/official-docs/docs/web-styling.md +2 -1
- package/references/official-docs/docs/web-styling.zh.md +3 -2
- package/references/official-docs/packages/AGENTS.md +1 -1
- package/references/official-docs/packages/README.md +12 -7
- package/references/official-docs/vendor/README.md +15 -11
- package/references/official-docs/website-docs.ts +4 -2
- package/scripts/sync-official-docs.ps1 +5 -5
- package/references/official-docs/docs/subsystems/code-runtime.md +0 -195
- package/references/official-docs/docs/subsystems/code-runtime.zh.md +0 -195
|
@@ -83,6 +83,8 @@ interface SubprocessStdio {
|
|
|
83
83
|
stdin: SubprocessStdinMode
|
|
84
84
|
stdout: SubprocessOutputMode
|
|
85
85
|
stderr: SubprocessOutputMode
|
|
86
|
+
/** Request a separate byte-mode duplex channel; omission creates none. */
|
|
87
|
+
control?: 'pipe'
|
|
86
88
|
}
|
|
87
89
|
```
|
|
88
90
|
|
|
@@ -106,14 +108,15 @@ interface SubprocessSpawnSpec {
|
|
|
106
108
|
stdio: SubprocessStdio
|
|
107
109
|
/**
|
|
108
110
|
* Positive finite grace period in milliseconds, no greater than
|
|
109
|
-
* `MAX_TIMER_DELAY_MS`,
|
|
110
|
-
* and for draining still-open collected pipes after the process exits
|
|
111
|
-
* inherited descriptor held by a
|
|
112
|
-
*
|
|
111
|
+
* `MAX_TIMER_DELAY_MS`, available to the provider's termination procedure
|
|
112
|
+
* and used for draining still-open collected pipes after the process exits
|
|
113
|
+
* (an inherited descriptor held by a survivor cannot hold the outcome open
|
|
114
|
+
* indefinitely). Providers document whether range termination is staged or
|
|
115
|
+
* immediate.
|
|
113
116
|
*/
|
|
114
117
|
graceMs: number
|
|
115
118
|
/**
|
|
116
|
-
* Abort signal — starts the terminate escalation on the
|
|
119
|
+
* Abort signal — starts the terminate escalation on the managed range when
|
|
117
120
|
* it fires. The caller owns deadlines and cause classification; this seam
|
|
118
121
|
* only reacts to the abort.
|
|
119
122
|
*/
|
|
@@ -129,45 +132,44 @@ interface SubprocessSpawnSpec {
|
|
|
129
132
|
}
|
|
130
133
|
```
|
|
131
134
|
|
|
132
|
-
## Handles: streams, readers, and
|
|
135
|
+
## Handles: streams, readers, and managed-range termination
|
|
133
136
|
|
|
134
|
-
A spawn returns a live handle
|
|
137
|
+
A spawn returns a live handle synchronously while target and managed-range identities remain provider-private. Collect-mode readers take whole-stream byte offsets and never consume, so independent readers cannot steal one another's deltas; piped streams belong to the caller. `terminate()` starts the provider's documented procedure, and `waitForExit()` observes the same provider-managed range; staged providers may use `graceMs`, while immediate providers do not delay. Consumers can build their own teardown ladders over those two operations (the ACP backend's stdin-EOF-first `disposeAcpChild` is the template).
|
|
135
138
|
|
|
136
139
|
```ts type-equiv
|
|
137
140
|
/**
|
|
138
|
-
* A live
|
|
141
|
+
* A live subprocess and its provider-managed process range. Collected output
|
|
139
142
|
* remains readable after exit; piped streams belong to the caller.
|
|
140
143
|
*
|
|
141
|
-
* Termination
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* the handle unnoticed.
|
|
144
|
+
* Termination and {@link SubprocessHandle.waitForExit} use the same managed
|
|
145
|
+
* range. Each provider documents the range it can observe and its signalling
|
|
146
|
+
* and observation limits.
|
|
145
147
|
*/
|
|
146
148
|
interface SubprocessHandle {
|
|
147
|
-
/** Process id (tree root); -1 when the spawn itself failed. */
|
|
148
|
-
readonly pid: number
|
|
149
149
|
/** The child's stdin, present iff spawned with `stdin: 'pipe'`. */
|
|
150
150
|
readonly stdin: Writable | undefined
|
|
151
151
|
/** The child's raw stdout, present iff spawned with `stdout: 'pipe'`. */
|
|
152
152
|
readonly stdout: Readable | undefined
|
|
153
153
|
/** The child's raw stderr, present iff spawned with `stderr: 'pipe'`. */
|
|
154
154
|
readonly stderr: Readable | undefined
|
|
155
|
+
/** Separate caller-owned byte channel when requested; native startup failure may leave it absent. */
|
|
156
|
+
readonly control: Duplex | undefined
|
|
155
157
|
/** Offset-based readers for collect-mode streams (also readable after exit). */
|
|
156
158
|
readonly collected: SubprocessCollectedOutputs
|
|
157
|
-
/** Resolves
|
|
159
|
+
/** Resolves with spawned-command exit facts; rejects for spawn or provider failures. */
|
|
158
160
|
readonly done: Promise<SubprocessOutcome>
|
|
159
161
|
/**
|
|
160
|
-
* Begin the
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* and also triggered by the spec's abort signal.
|
|
162
|
+
* Begin the provider's documented termination procedure on the managed range
|
|
163
|
+
* — the seam's only termination verb. Idempotent, a no-op once that range is
|
|
164
|
+
* gone, and also triggered by the spec's abort signal.
|
|
164
165
|
*/
|
|
165
166
|
terminate(): void
|
|
166
167
|
/**
|
|
167
|
-
* Wait until the
|
|
168
|
-
*
|
|
168
|
+
* Wait until the same managed range is empty — not just until the spawned
|
|
169
|
+
* command reports its outcome, so surviving work remains observable.
|
|
169
170
|
* @param signal - optional bound for the wait.
|
|
170
|
-
* @returns `true` when the
|
|
171
|
+
* @returns `true` when the managed range is empty, `false` when the signal aborted first.
|
|
172
|
+
* @throws when the selected provider can no longer observe its managed range.
|
|
171
173
|
*/
|
|
172
174
|
waitForExit(signal?: AbortSignal): Promise<boolean>
|
|
173
175
|
}
|
|
@@ -242,11 +244,15 @@ interface SubprocessOutcome {
|
|
|
242
244
|
|
|
243
245
|
`spawnTerminal(spec)` is the non-pipe process primitive. The provider allocates the controlling terminal and owns UTF-8 text transport, foreground-process-group inspection and signalling, and one awaited TERM-to-KILL operation that reaches quiescence for every session member the provider can still observe; providers document substrate-specific observability limits. The PTY backend remains responsible for prompt detection, readiness inference, scrollback, sandbox policy, and persistent-session ownership; ordinary `spawn()` cannot reconstruct controlling-terminal semantics.
|
|
244
246
|
|
|
245
|
-
The terminal spec fully specifies argv, cwd, environment overrides, dimensions, cleanup grace, and optional allocation cancellation. Its handle exposes `pid`, ordered output, `done`, `write`, `inspectForeground`, `signalForeground`, and awaited `terminate`;
|
|
247
|
+
The terminal spec fully specifies argv, cwd, environment overrides, terminal type, dimensions, cleanup grace, and optional allocation cancellation and shell activity observation. Its handle exposes `pid`, ordered output, `done`, `write`, `resize`, `inspectForeground`, `inspectActivity`, `signalForeground`, and awaited `terminate`; [`SubprocessTerminalSpawnSpec` and `SubprocessTerminalHandle`](../../packages/subprocess/subprocess/src/types.ts) define these fields and operations. `resize(cols, rows)` updates the live PTY dimensions and rejects after process exit.
|
|
248
|
+
|
|
249
|
+
`inspectActivity()` returns `SubprocessTerminalActivity`: `state` is `idle`, `busy` or `unknown`, and `revision` changes with provider-observed activity or input. A terminal request opts into supported shell lifecycle observation with `shellActivity`; provider-specific support and conservative unknown cases are documented by [subprocess-local](../../packages/subprocess/subprocess-local/README.md#running-terminal-sessions).
|
|
250
|
+
|
|
251
|
+
`terminalEnvironment(signal?)` returns `SubprocessTerminalEnvironment`: the execution environment platform (`posix` or `windows`) and optional `defaultShell`. These facts come from the provider rather than the Web server or browser. `resolveExecutable` verifies shell candidates; `SubprocessExecutableNotFoundError` identifies a missing executable, while provider and transport failures remain errors.
|
|
246
252
|
|
|
247
253
|
## Service behavior
|
|
248
254
|
|
|
249
|
-
The abstract [`SubprocessRuntime`](../../packages/subprocess/subprocess/src/index.ts) Service Definition specifies execution-world coordinates, executable lookup, ordinary `spawn`, and `spawnTerminal`. [`LocalSubprocessRuntime`](../../packages/subprocess/subprocess-local/src/index.ts) provides them with
|
|
255
|
+
The abstract [`SubprocessRuntime`](../../packages/subprocess/subprocess/src/index.ts) Service Definition specifies execution-world coordinates, executable lookup, ordinary `spawn`, and `spawnTerminal`. [`LocalSubprocessRuntime`](../../packages/subprocess/subprocess-local/src/index.ts) provides them with platform-selected managed ranges, per-disposition wiring, credential scrubbing, `node-pty`, platform process inspection, and terminate-and-join disposal. See [`dsh-subprocess`](../../packages/subprocess/subprocess/README.md) for the Service Definition contract and [`dsh-subprocess-local`](../../packages/subprocess/subprocess-local/README.md) for local mechanics.
|
|
250
256
|
|
|
251
257
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
252
258
|
|
|
@@ -256,23 +262,6 @@ The abstract [`SubprocessRuntime`](../../packages/subprocess/subprocess/src/inde
|
|
|
256
262
|
|
|
257
263
|
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
258
264
|
|
|
259
|
-
<a id="ctxe2b--e2bruntime"></a>
|
|
260
|
-
|
|
261
|
-
### `ctx.e2b` — `E2BRuntime`
|
|
262
|
-
|
|
263
|
-
Creates one lazily consumable E2B SDK handle and deletes the sandbox at timeout or disposal. Creation begins at plugin construction; adapters await getSandbox before their first operation.
|
|
264
|
-
|
|
265
|
-
```ts cordis-catalog
|
|
266
|
-
/**
|
|
267
|
-
* Return the shared live SDK handle.
|
|
268
|
-
* @returns the created sandbox after the configured cwd exists.
|
|
269
|
-
* @throws when E2B rejects creation or the service is disposing.
|
|
270
|
-
*/
|
|
271
|
-
async getSandbox(): Promise<Sandbox>
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Source: [`packages/e2b/e2b/src/index.ts`](../../packages/e2b/e2b/src/index.ts)
|
|
275
|
-
|
|
276
265
|
<a id="ctxsubprocess--subprocessruntime-abstract-seam"></a>
|
|
277
266
|
|
|
278
267
|
### `ctx.subprocess` — `SubprocessRuntime` (abstract seam)
|
|
@@ -282,9 +271,9 @@ Abstract subprocess service. Subclass, implement spawn, and load the subclass as
|
|
|
282
271
|
Implementations must honor these semantics:
|
|
283
272
|
|
|
284
273
|
- Executable paths belong to one execution world shared with the mounted filesystem provider.
|
|
285
|
-
- spawn returns
|
|
274
|
+
- spawn returns a live handle synchronously. Target identity remains provider-private; `done` resolves with the spawned command's exit facts and may reject for spawn or provider failures.
|
|
286
275
|
- Collect-mode readers are offset-based and non-consuming, so independent readers never consume one another's output; lossy reads report truncation and the spill file holding the complete stream when one exists. Piped streams are handed to the caller raw and never buffered here.
|
|
287
|
-
- SubprocessHandle.terminate (and the spec's abort signal)
|
|
276
|
+
- SubprocessHandle.terminate (and the spec's abort signal) starts the provider's documented procedure against its managed range. SubprocessHandle.waitForExit observes that same range so a consumer-owned teardown ladder can hold each tier on real quiescence; each provider documents its signalling and observability limits.
|
|
288
277
|
- Disposal of the service terminates all still-running managed processes and awaits their exit.
|
|
289
278
|
- spawnTerminal owns terminal allocation, text transport, foreground groups, signalling, and whole-session quiescence behind one awaited termination method; readiness and persistent-shell policy stay in the PTY consumer. Its output stream ends after queued terminal output when the top-level process exits.
|
|
290
279
|
|
|
@@ -302,18 +291,26 @@ Implementations must honor these semantics:
|
|
|
302
291
|
*/
|
|
303
292
|
abstract resolveExecutable( command: string, env?: Readonly<Record<string, string>>, signal?: AbortSignal, ): Promise<string>
|
|
304
293
|
|
|
294
|
+
/**
|
|
295
|
+
* Inspect shell-selection facts in the provider's execution environment.
|
|
296
|
+
* @param signal - cancellation of remote environment inspection.
|
|
297
|
+
* @returns platform and preferred shell; executable lookup and allocation remain separate operations.
|
|
298
|
+
*/
|
|
299
|
+
abstract terminalEnvironment(signal?: AbortSignal): Promise<SubprocessTerminalEnvironment>
|
|
300
|
+
|
|
305
301
|
/**
|
|
306
302
|
* Start one managed child process from a fully-specified spec; this seam
|
|
307
303
|
* applies no defaults.
|
|
308
304
|
* @param spec - argv, directory, stdio dispositions, grace, cancellation, and environment.
|
|
309
305
|
* @returns the live process handle (streams/readers, signalling, outcome promise).
|
|
306
|
+
* @throws synchronously when pre-aborted or when argv, cwd, environment, or grace is invalid before handle creation.
|
|
310
307
|
*/
|
|
311
308
|
abstract spawn(spec: SubprocessSpawnSpec): SubprocessHandle
|
|
312
309
|
|
|
313
310
|
/**
|
|
314
311
|
* Allocate a real terminal and start one owned process session. This is the
|
|
315
312
|
* only non-pipe process primitive: implementations own terminal byte I/O,
|
|
316
|
-
* foreground groups, signals, and
|
|
313
|
+
* foreground groups, signals, and whole-session quiescence.
|
|
317
314
|
* @param spec - fully specified argv, cwd, environment, dimensions, grace, and allocation cancellation.
|
|
318
315
|
* @returns the live terminal handle after allocation succeeds.
|
|
319
316
|
*/
|
|
@@ -83,6 +83,8 @@ interface SubprocessStdio {
|
|
|
83
83
|
stdin: SubprocessStdinMode
|
|
84
84
|
stdout: SubprocessOutputMode
|
|
85
85
|
stderr: SubprocessOutputMode
|
|
86
|
+
/** Request a separate byte-mode duplex channel; omission creates none. */
|
|
87
|
+
control?: 'pipe'
|
|
86
88
|
}
|
|
87
89
|
```
|
|
88
90
|
|
|
@@ -106,14 +108,15 @@ interface SubprocessSpawnSpec {
|
|
|
106
108
|
stdio: SubprocessStdio
|
|
107
109
|
/**
|
|
108
110
|
* Positive finite grace period in milliseconds, no greater than
|
|
109
|
-
* `MAX_TIMER_DELAY_MS`,
|
|
110
|
-
* and for draining still-open collected pipes after the process exits
|
|
111
|
-
* inherited descriptor held by a
|
|
112
|
-
*
|
|
111
|
+
* `MAX_TIMER_DELAY_MS`, available to the provider's termination procedure
|
|
112
|
+
* and used for draining still-open collected pipes after the process exits
|
|
113
|
+
* (an inherited descriptor held by a survivor cannot hold the outcome open
|
|
114
|
+
* indefinitely). Providers document whether range termination is staged or
|
|
115
|
+
* immediate.
|
|
113
116
|
*/
|
|
114
117
|
graceMs: number
|
|
115
118
|
/**
|
|
116
|
-
* Abort signal — starts the terminate escalation on the
|
|
119
|
+
* Abort signal — starts the terminate escalation on the managed range when
|
|
117
120
|
* it fires. The caller owns deadlines and cause classification; this seam
|
|
118
121
|
* only reacts to the abort.
|
|
119
122
|
*/
|
|
@@ -129,45 +132,44 @@ interface SubprocessSpawnSpec {
|
|
|
129
132
|
}
|
|
130
133
|
```
|
|
131
134
|
|
|
132
|
-
##
|
|
135
|
+
## 句柄:流、读取器与 managed-range 终止
|
|
133
136
|
|
|
134
|
-
spawn
|
|
137
|
+
spawn 会同步返回活动句柄,目标与受管范围标识则保留在 provider 内部。收集模式的读取器接受全流字节偏移量且从不消费,因此独立读取器不会抢走彼此的增量;管道化的流归调用方所有。`terminate()` 启动 provider 记录的终止过程,`waitForExit()` 观察同一个 provider-managed range;分阶段 provider 可以使用 `graceMs`,立即终止的 provider 不会等待。消费方可以在这两项操作上构建自己的分级清理流程;ACP 后端先关闭 stdin 的 `disposeAcpChild` 是参考实现。
|
|
135
138
|
|
|
136
139
|
```ts type-equiv
|
|
137
140
|
/**
|
|
138
|
-
* A live
|
|
141
|
+
* A live subprocess and its provider-managed process range. Collected output
|
|
139
142
|
* remains readable after exit; piped streams belong to the caller.
|
|
140
143
|
*
|
|
141
|
-
* Termination
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* the handle unnoticed.
|
|
144
|
+
* Termination and {@link SubprocessHandle.waitForExit} use the same managed
|
|
145
|
+
* range. Each provider documents the range it can observe and its signalling
|
|
146
|
+
* and observation limits.
|
|
145
147
|
*/
|
|
146
148
|
interface SubprocessHandle {
|
|
147
|
-
/** Process id (tree root); -1 when the spawn itself failed. */
|
|
148
|
-
readonly pid: number
|
|
149
149
|
/** The child's stdin, present iff spawned with `stdin: 'pipe'`. */
|
|
150
150
|
readonly stdin: Writable | undefined
|
|
151
151
|
/** The child's raw stdout, present iff spawned with `stdout: 'pipe'`. */
|
|
152
152
|
readonly stdout: Readable | undefined
|
|
153
153
|
/** The child's raw stderr, present iff spawned with `stderr: 'pipe'`. */
|
|
154
154
|
readonly stderr: Readable | undefined
|
|
155
|
+
/** Separate caller-owned byte channel when requested; native startup failure may leave it absent. */
|
|
156
|
+
readonly control: Duplex | undefined
|
|
155
157
|
/** Offset-based readers for collect-mode streams (also readable after exit). */
|
|
156
158
|
readonly collected: SubprocessCollectedOutputs
|
|
157
|
-
/** Resolves
|
|
159
|
+
/** Resolves with spawned-command exit facts; rejects for spawn or provider failures. */
|
|
158
160
|
readonly done: Promise<SubprocessOutcome>
|
|
159
161
|
/**
|
|
160
|
-
* Begin the
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* and also triggered by the spec's abort signal.
|
|
162
|
+
* Begin the provider's documented termination procedure on the managed range
|
|
163
|
+
* — the seam's only termination verb. Idempotent, a no-op once that range is
|
|
164
|
+
* gone, and also triggered by the spec's abort signal.
|
|
164
165
|
*/
|
|
165
166
|
terminate(): void
|
|
166
167
|
/**
|
|
167
|
-
* Wait until the
|
|
168
|
-
*
|
|
168
|
+
* Wait until the same managed range is empty — not just until the spawned
|
|
169
|
+
* command reports its outcome, so surviving work remains observable.
|
|
169
170
|
* @param signal - optional bound for the wait.
|
|
170
|
-
* @returns `true` when the
|
|
171
|
+
* @returns `true` when the managed range is empty, `false` when the signal aborted first.
|
|
172
|
+
* @throws when the selected provider can no longer observe its managed range.
|
|
171
173
|
*/
|
|
172
174
|
waitForExit(signal?: AbortSignal): Promise<boolean>
|
|
173
175
|
}
|
|
@@ -242,11 +244,15 @@ interface SubprocessOutcome {
|
|
|
242
244
|
|
|
243
245
|
`spawnTerminal(spec)` 是非管道进程原语。提供方分配控制终端,并负责 UTF-8 文本传输、前台进程组检查与信号发送,以及一项须等待的 TERM→KILL 操作;该操作会使提供方仍可观察到的每个会话成员完全停稳,提供方则会记录执行基底特有的可观察性限制。PTY 后端仍负责提示符检测、就绪推断、scrollback、沙箱策略和持久会话所有权;普通 `spawn()` 无法重建控制终端语义。
|
|
244
246
|
|
|
245
|
-
终端 spec 完全指定 argv、cwd
|
|
247
|
+
终端 spec 完全指定 argv、cwd、环境覆盖、终端类型、尺寸、清理宽限期与可选的分配取消和 shell 活动观察。其句柄公开 `pid`、有序输出、`done`、`write`、`resize`、`inspectForeground`、`inspectActivity`、`signalForeground` 和须等待的 `terminate`;[`SubprocessTerminalSpawnSpec` 与 `SubprocessTerminalHandle`](../../packages/subprocess/subprocess/src/types.ts) 定义这些字段和操作。`resize(cols, rows)` 更新正在运行的 PTY 尺寸,进程退出后拒绝调用。
|
|
248
|
+
|
|
249
|
+
`inspectActivity()` 返回 `SubprocessTerminalActivity`:`state` 为 `idle`、`busy` 或 `unknown`,`revision` 随 provider 观察到的活动或输入变化。终端请求通过 `shellActivity` 启用受支持的 shell 生命周期观察;各 provider 的支持范围和保守返回 unknown 的情况见 [subprocess-local](../../packages/subprocess/subprocess-local/README.zh.md#running-terminal-sessions)。
|
|
250
|
+
|
|
251
|
+
`terminalEnvironment(signal?)` 返回 `SubprocessTerminalEnvironment`:执行环境平台(`posix` 或 `windows`)与可选的 `defaultShell`。这些事实来自提供方,而非 Web 服务器或浏览器。`resolveExecutable` 验证候选 shell;`SubprocessExecutableNotFoundError` 表示可执行文件不存在,提供方与传输故障仍作为错误报告。
|
|
246
252
|
|
|
247
253
|
## 服务行为
|
|
248
254
|
|
|
249
|
-
抽象的 [`SubprocessRuntime`](../../packages/subprocess/subprocess/src/index.ts) Service Definition 规定执行世界坐标、可执行文件查找、普通 `spawn` 与 `spawnTerminal`。[`LocalSubprocessRuntime`](../../packages/subprocess/subprocess-local/src/index.ts)
|
|
255
|
+
抽象的 [`SubprocessRuntime`](../../packages/subprocess/subprocess/src/index.ts) Service Definition 规定执行世界坐标、可执行文件查找、普通 `spawn` 与 `spawnTerminal`。[`LocalSubprocessRuntime`](../../packages/subprocess/subprocess-local/src/index.ts) 以平台选择的 managed range、按处置方式接线、凭据清除、`node-pty`、平台进程检查,以及先终止再等待退出的资源释放提供这些能力。Service Definition 约定见 [`dsh-subprocess`](../../packages/subprocess/subprocess/README.zh.md),本地机制见 [`dsh-subprocess-local`](../../packages/subprocess/subprocess-local/README.zh.md)。
|
|
250
256
|
|
|
251
257
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
252
258
|
|
|
@@ -256,23 +262,6 @@ interface SubprocessOutcome {
|
|
|
256
262
|
|
|
257
263
|
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
258
264
|
|
|
259
|
-
<a id="ctxe2b--e2bruntime"></a>
|
|
260
|
-
|
|
261
|
-
### `ctx.e2b` — `E2BRuntime`
|
|
262
|
-
|
|
263
|
-
Creates one lazily consumable E2B SDK handle and deletes the sandbox at timeout or disposal. Creation begins at plugin construction; adapters await getSandbox before their first operation.
|
|
264
|
-
|
|
265
|
-
```ts cordis-catalog
|
|
266
|
-
/**
|
|
267
|
-
* Return the shared live SDK handle.
|
|
268
|
-
* @returns the created sandbox after the configured cwd exists.
|
|
269
|
-
* @throws when E2B rejects creation or the service is disposing.
|
|
270
|
-
*/
|
|
271
|
-
async getSandbox(): Promise<Sandbox>
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Source: [`packages/e2b/e2b/src/index.ts`](../../packages/e2b/e2b/src/index.ts)
|
|
275
|
-
|
|
276
265
|
<a id="ctxsubprocess--subprocessruntime-abstract-seam"></a>
|
|
277
266
|
|
|
278
267
|
### `ctx.subprocess` — `SubprocessRuntime` (abstract seam)
|
|
@@ -282,9 +271,9 @@ Abstract subprocess service. Subclass, implement spawn, and load the subclass as
|
|
|
282
271
|
Implementations must honor these semantics:
|
|
283
272
|
|
|
284
273
|
- Executable paths belong to one execution world shared with the mounted filesystem provider.
|
|
285
|
-
- spawn returns
|
|
274
|
+
- spawn returns a live handle synchronously. Target identity remains provider-private; `done` resolves with the spawned command's exit facts and may reject for spawn or provider failures.
|
|
286
275
|
- Collect-mode readers are offset-based and non-consuming, so independent readers never consume one another's output; lossy reads report truncation and the spill file holding the complete stream when one exists. Piped streams are handed to the caller raw and never buffered here.
|
|
287
|
-
- SubprocessHandle.terminate (and the spec's abort signal)
|
|
276
|
+
- SubprocessHandle.terminate (and the spec's abort signal) starts the provider's documented procedure against its managed range. SubprocessHandle.waitForExit observes that same range so a consumer-owned teardown ladder can hold each tier on real quiescence; each provider documents its signalling and observability limits.
|
|
288
277
|
- Disposal of the service terminates all still-running managed processes and awaits their exit.
|
|
289
278
|
- spawnTerminal owns terminal allocation, text transport, foreground groups, signalling, and whole-session quiescence behind one awaited termination method; readiness and persistent-shell policy stay in the PTY consumer. Its output stream ends after queued terminal output when the top-level process exits.
|
|
290
279
|
|
|
@@ -302,18 +291,26 @@ Implementations must honor these semantics:
|
|
|
302
291
|
*/
|
|
303
292
|
abstract resolveExecutable( command: string, env?: Readonly<Record<string, string>>, signal?: AbortSignal, ): Promise<string>
|
|
304
293
|
|
|
294
|
+
/**
|
|
295
|
+
* Inspect shell-selection facts in the provider's execution environment.
|
|
296
|
+
* @param signal - cancellation of remote environment inspection.
|
|
297
|
+
* @returns platform and preferred shell; executable lookup and allocation remain separate operations.
|
|
298
|
+
*/
|
|
299
|
+
abstract terminalEnvironment(signal?: AbortSignal): Promise<SubprocessTerminalEnvironment>
|
|
300
|
+
|
|
305
301
|
/**
|
|
306
302
|
* Start one managed child process from a fully-specified spec; this seam
|
|
307
303
|
* applies no defaults.
|
|
308
304
|
* @param spec - argv, directory, stdio dispositions, grace, cancellation, and environment.
|
|
309
305
|
* @returns the live process handle (streams/readers, signalling, outcome promise).
|
|
306
|
+
* @throws synchronously when pre-aborted or when argv, cwd, environment, or grace is invalid before handle creation.
|
|
310
307
|
*/
|
|
311
308
|
abstract spawn(spec: SubprocessSpawnSpec): SubprocessHandle
|
|
312
309
|
|
|
313
310
|
/**
|
|
314
311
|
* Allocate a real terminal and start one owned process session. This is the
|
|
315
312
|
* only non-pipe process primitive: implementations own terminal byte I/O,
|
|
316
|
-
* foreground groups, signals, and
|
|
313
|
+
* foreground groups, signals, and whole-session quiescence.
|
|
317
314
|
* @param spec - fully specified argv, cwd, environment, dimensions, grace, and allocation cancellation.
|
|
318
315
|
* @returns the live terminal handle after allocation succeeds.
|
|
319
316
|
*/
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/system-prompt.md
|
|
5
|
-
system-prompt.md:
|
|
6
|
-
system-prompt.zh.md:
|
|
5
|
+
system-prompt.md: 898520e8fc88a9fafd8429723fc48bad3b4ba210
|
|
6
|
+
system-prompt.zh.md: 82e557a309a48f546d7c7fa5a8c1097152b4d145
|
|
@@ -39,7 +39,9 @@ interface ToolProviderResult {
|
|
|
39
39
|
|
|
40
40
|
## Prompt sections
|
|
41
41
|
|
|
42
|
-
`
|
|
42
|
+
The exported `PERSONA_PREFIX_SECTION` (`deployment:persona-prefix`) and `PERSONA_SUFFIX_SECTION` (`deployment:persona-suffix`) name the slots shared by global configuration and scoped contributions. Their `PromptSectionOrderName` entries are `DEPLOYMENT_PERSONA_PREFIX` and `DEPLOYMENT_PERSONA_SUFFIX`; the [package README](../../packages/core/system-prompt/README.md#configure-the-prompt) owns their placement and template configuration.
|
|
43
|
+
|
|
44
|
+
`PromptSection` is a readonly same-process registration contract. Its text may be static or resolved from the current assembly context. Sections sort by ascending order and then code-unit name; repository contributors resolve the service-owned named allocation through `getSectionOrder()`. Runtime-context contributors resolve their independent allocation through `getContextOrder()`. One effective `complete` section becomes the sole prompt section after cooperative assembly. agent-loop renders the assembled sections with `renderPrompt` and commits the text as a `system/message` surface node — appended as surface node 0 on the first step, then replaced in place when the rendered text changes or, when the prepared call declares `systemPromptUpdate: 'in-history'`, appended after the cached history for non-empty updates in a continuing series — so the prompt reaches the model as a message of derived history rather than as a request field ([decision](../../.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md); [decision rule](../../packages/core/agent-loop/README.md#understand-the-implementation)).
|
|
43
45
|
|
|
44
46
|
```ts type-equiv
|
|
45
47
|
/** One contributed section of the system prompt (registry input). */
|
|
@@ -54,9 +56,11 @@ interface PromptSection {
|
|
|
54
56
|
/**
|
|
55
57
|
* Static text or a provider evaluated at each assembly with that assembly's
|
|
56
58
|
* {@link AssembleContext}. The text may reference `{{variable}}`s — they are
|
|
57
|
-
* interpolated later, by {@link renderPrompt}.
|
|
59
|
+
* interpolated later, by {@link renderPrompt}, unless `interpolate` is false.
|
|
58
60
|
*/
|
|
59
61
|
readonly text: string | ((context: AssembleContext) => string)
|
|
62
|
+
/** Whether to interpolate prompt variables. Defaults to true; false preserves literal text. */
|
|
63
|
+
readonly interpolate?: boolean
|
|
60
64
|
/**
|
|
61
65
|
* Treat this contribution as the complete system prompt. Assembly still
|
|
62
66
|
* runs the cooperative waterfall so tools, contexts, and variables can be
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](system-prompt.md) | 中文
|
|
4
4
|
|
|
5
|
-
[system-prompt 包](../../packages/core/system-prompt)负责管理提示词贡献者与一次组装调用之间交换的数据。该包的 [README](../../packages/core/system-prompt/README
|
|
5
|
+
[system-prompt 包](../../packages/core/system-prompt)负责管理提示词贡献者与一次组装调用之间交换的数据。该包的 [README](../../packages/core/system-prompt/README.zh.md) 记录注册、排序、作用域与渲染行为;本页记录各插件实现或传递的确切跨包类型。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/core/system-prompt/src/index.ts`](../../packages/core/system-prompt/src/index.ts)。
|
|
8
8
|
|
|
@@ -39,7 +39,9 @@ interface ToolProviderResult {
|
|
|
39
39
|
|
|
40
40
|
## 提示词段落
|
|
41
41
|
|
|
42
|
-
`
|
|
42
|
+
导出的 `PERSONA_PREFIX_SECTION`(`deployment:persona-prefix`)与 `PERSONA_SUFFIX_SECTION`(`deployment:persona-suffix`)为全局配置和带作用域贡献所共享的段落命名。它们对应的 `PromptSectionOrderName` 项为 `DEPLOYMENT_PERSONA_PREFIX` 与 `DEPLOYMENT_PERSONA_SUFFIX`;[包 README](../../packages/core/system-prompt/README.zh.md#configure-the-prompt)规定其位置与模板配置。
|
|
43
|
+
|
|
44
|
+
`PromptSection` 是一份只读的同进程注册约定。其文本可以是静态的,也可以从当前组装上下文动态解析。各段先按 order 升序排列,再按名称的代码单元顺序排列;仓库贡献方通过 `getSectionOrder()` 解析服务持有的具名分配。Runtime-context 贡献方通过 `getContextOrder()` 解析独立分配。协作式组装完成后,一个有效的 `complete` 段会成为唯一的提示词段落。agent loop(智能体循环)用 `renderPrompt` 渲染组装后的各段,并把文本作为 `system/message` surface 节点提交——首个步骤作为 surface 第 0 号节点追加,之后在渲染文本变化时原地替换,或者当已准备调用声明 `systemPromptUpdate: 'in-history'` 时,在序列延续期间把非空更新追加到已缓存历史之后——因此提示词作为派生历史中的消息而不是请求字段到达模型([决策](../../.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.zh.md);[决策规则](../../packages/core/agent-loop/README.zh.md#understand-the-implementation))。
|
|
43
45
|
|
|
44
46
|
```ts type-equiv
|
|
45
47
|
/** One contributed section of the system prompt (registry input). */
|
|
@@ -54,9 +56,11 @@ interface PromptSection {
|
|
|
54
56
|
/**
|
|
55
57
|
* Static text or a provider evaluated at each assembly with that assembly's
|
|
56
58
|
* {@link AssembleContext}. The text may reference `{{variable}}`s — they are
|
|
57
|
-
* interpolated later, by {@link renderPrompt}.
|
|
59
|
+
* interpolated later, by {@link renderPrompt}, unless `interpolate` is false.
|
|
58
60
|
*/
|
|
59
61
|
readonly text: string | ((context: AssembleContext) => string)
|
|
62
|
+
/** Whether to interpolate prompt variables. Defaults to true; false preserves literal text. */
|
|
63
|
+
readonly interpolate?: boolean
|
|
60
64
|
/**
|
|
61
65
|
* Treat this contribution as the complete system prompt. Assembly still
|
|
62
66
|
* runs the cooperative waterfall so tools, contexts, and variables can be
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](todo.md) | 中文
|
|
4
4
|
|
|
5
|
-
本页记录 [`@deepseek-ai/dsh-tool-todo`](../../packages/todo/tool-todo/README
|
|
5
|
+
本页记录 [`@deepseek-ai/dsh-tool-todo`](../../packages/todo/tool-todo/README.zh.md) 拥有的持久 todo 词汇。面向模型的工具会整体替换一个 agent(智能体)会话的列表;该包还拥有事件声明、回放投影和不变量配套插件。工具行为与配置见[包 README](../../packages/todo/tool-todo/README.zh.md)。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/todo/tool-todo/src/types.ts`](../../packages/todo/tool-todo/src/types.ts)
|
|
8
8
|
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/token-meter.md
|
|
5
|
-
token-meter.md:
|
|
6
|
-
token-meter.zh.md:
|
|
5
|
+
token-meter.md: 8accb9cf9f0b97ee7684e327da336a31943ff49e
|
|
6
|
+
token-meter.zh.md: 6c149ec3f225a7012ca8d8d2312835663917b5d2
|
|
@@ -78,7 +78,8 @@ Replay owner for one service-wide estimator and isolated per-session folds.
|
|
|
78
78
|
* usage is reused only when the latest successful call's canonical request
|
|
79
79
|
* envelope matches `requestHeader` and its total is no lower than that
|
|
80
80
|
* call's full route-priced anchor; otherwise the complete envelope and
|
|
81
|
-
* surface are repriced.
|
|
81
|
+
* surface are repriced. The anchor includes all surface nodes immediately
|
|
82
|
+
* before the assistant message, including inputs admitted after step/start.
|
|
82
83
|
*
|
|
83
84
|
* `requestHeader` replaces the latest logged envelope for pressure and node
|
|
84
85
|
* pricing; the node set always describes the current session surface. Every
|
|
@@ -78,7 +78,8 @@ Replay owner for one service-wide estimator and isolated per-session folds.
|
|
|
78
78
|
* usage is reused only when the latest successful call's canonical request
|
|
79
79
|
* envelope matches `requestHeader` and its total is no lower than that
|
|
80
80
|
* call's full route-priced anchor; otherwise the complete envelope and
|
|
81
|
-
* surface are repriced.
|
|
81
|
+
* surface are repriced. The anchor includes all surface nodes immediately
|
|
82
|
+
* before the assistant message, including inputs admitted after step/start.
|
|
82
83
|
*
|
|
83
84
|
* `requestHeader` replaces the latest logged envelope for pressure and node
|
|
84
85
|
* pricing; the node set always describes the current session surface. Every
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/tools.md
|
|
5
|
-
tools.md:
|
|
6
|
-
tools.zh.md:
|
|
5
|
+
tools.md: 396deae037f9026c56102d080b61a3f3fbde7a05
|
|
6
|
+
tools.zh.md: ae39bade0f9bb7c4b0008a0f115d97ed2e033189
|
|
@@ -190,6 +190,8 @@ interface ToolExecutionInput {
|
|
|
190
190
|
*/
|
|
191
191
|
readonly rootCallId?: ToolCallId
|
|
192
192
|
readonly name: string
|
|
193
|
+
/** Binding-time tool schema for a PTC inner call; frozen by its producer and never logged. */
|
|
194
|
+
readonly schema?: ToolSchema
|
|
193
195
|
/** Losslessly JSON-serializable parsed arguments (tools validate their own schema). */
|
|
194
196
|
readonly arguments: unknown
|
|
195
197
|
/** The agent on whose behalf the call runs (set by the agent loop). */
|
|
@@ -252,7 +254,7 @@ type ToolExecutionMode =
|
|
|
252
254
|
| { kind: 'exclusive' }
|
|
253
255
|
```
|
|
254
256
|
|
|
255
|
-
PTC
|
|
257
|
+
PTC bindings freeze their ToolSchema at construction and pass it through the scheduler into `ToolExecution.schema`; it is transient execution metadata. Before policy, each actually started sub-dispatch records only pairing ids, name, and normalized arguments. Neither start nor settle events serialize description, parameters, or schema. The bridge later exposes the settled call to the `tools/ptc-dispatch-log` waterfall, which may change the durable content copy while preserving the program value, model-visible outer result, and structured failure identity:
|
|
256
258
|
|
|
257
259
|
```ts type-equiv
|
|
258
260
|
/**
|
|
@@ -262,14 +264,14 @@ PTC mode's bridge additionally exposes each settled sub-dispatch to the `tools/p
|
|
|
262
264
|
* copy a listener may reshape. `content` is the RENDERED result projection
|
|
263
265
|
* (what a native `tool/result` would carry) — the program itself received
|
|
264
266
|
* the structured `value` (or just the error message on failure); only the
|
|
265
|
-
* `tool/
|
|
267
|
+
* `tool/ptc-dispatch` event's copy changes.
|
|
266
268
|
*/
|
|
267
269
|
interface PtcDispatchLog {
|
|
268
270
|
/** The outer `run_code` execution. */
|
|
269
271
|
readonly exec: ToolExecution
|
|
270
272
|
/** The calling agent (the scope routing key and the spill owner), when the outer call has one. */
|
|
271
273
|
readonly agent?: Agent
|
|
272
|
-
/**
|
|
274
|
+
/** Opaque sub-call id; new calls use `<parent>:ptc:<n>`. */
|
|
273
275
|
readonly subCallId: ToolCallId
|
|
274
276
|
/** The dispatched sub-tool name. */
|
|
275
277
|
readonly name: string
|
|
@@ -367,7 +369,17 @@ interface ToolExecutionFailure {
|
|
|
367
369
|
type ToolExecutionResult = ToolExecutionSuccess | ToolExecutionFailure
|
|
368
370
|
```
|
|
369
371
|
|
|
370
|
-
|
|
372
|
+
```ts type-equiv
|
|
373
|
+
/** Structured error metadata for a failed tool call (alongside the model-facing text). */
|
|
374
|
+
interface ToolErrorInfo {
|
|
375
|
+
name: string
|
|
376
|
+
code: string
|
|
377
|
+
/** Optional raw user-facing detail; durable projections preserve it but model-facing content does not include it. */
|
|
378
|
+
reason?: string
|
|
379
|
+
}
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
The result carries only the outcome. Call identity remains on the immutable `ToolExecution` that accompanies it through every hook and on the durable `tool/call` / `tool/result` session events, so wrappers cannot create a second, disagreeing identity. The canonical `value` is execution-local: the loop persists only `content`, `error`, and `meta`, while `tool/ptc-dispatch` stores the sub-call's rendered `content`, `isError`, and optional structured `error`. Replay reproduces presentation but cannot reconstruct canonical intermediate values. Optional `ToolErrorInfo.reason` retains raw user-facing detail without adding it to model-facing content.
|
|
371
383
|
|
|
372
384
|
On success the registry snapshots and validates the body value, freezes it, and invokes the pure renderer plus the optional top-level-call metadata projector. It separately materializes the durable presentation fields immediately before `tools/result`; an invalid value, renderer/projector failure, or non-JSON presentation becomes a JSON-safe `isError`. The final live observer therefore sees the exact execution-local value beside fields safe for the later durable append.
|
|
373
385
|
|
|
@@ -377,14 +389,17 @@ Each interception waterfall returns a typed **Decision** (the idiom shared with
|
|
|
377
389
|
|
|
378
390
|
```ts type-equiv
|
|
379
391
|
/**
|
|
380
|
-
* Pre-dispatch decision. `allow` runs the call; `deny` materializes
|
|
381
|
-
*
|
|
392
|
+
* Pre-dispatch decision. `allow` runs the call; `deny` materializes its
|
|
393
|
+
* model-facing reason and optional structured error identity; `cancel` selects
|
|
394
|
+
* the canonical cancellation result without presenting a policy denial; `ask`
|
|
395
|
+
* runs only after an approval service returns `allowed-once` and otherwise
|
|
382
396
|
* denies. Input rewriting is excluded because arguments are already logged and
|
|
383
397
|
* presented.
|
|
384
398
|
*/
|
|
385
399
|
type PreToolDecision =
|
|
386
400
|
| { kind: 'allow' }
|
|
387
|
-
| { kind: 'deny'; reason: string }
|
|
401
|
+
| { kind: 'deny'; reason: string; info?: ToolErrorInfo }
|
|
402
|
+
| { kind: 'cancel' }
|
|
388
403
|
| { kind: 'ask'; reason?: string }
|
|
389
404
|
```
|
|
390
405
|
|
|
@@ -399,7 +414,7 @@ type PostToolDecision =
|
|
|
399
414
|
| { kind: 'block'; feedback: ContentBlock[]; additionalContexts?: UserMessage[] }
|
|
400
415
|
```
|
|
401
416
|
|
|
402
|
-
Call `next()` for the default or return a decision to short-circuit. Pre-policy may deny or ask; only `allowed-once` proceeds, while a non-grant, missing approval channel or service, or agent-less request becomes a denial. Guards may still impose a final denial. Arguments cannot be rewritten because history, audit, UI, and execution must agree.
|
|
417
|
+
Call `next()` for the default or return a decision to short-circuit. Pre-policy may deny or ask; only `allowed-once` proceeds, while a non-grant, missing approval channel or service, or agent-less request becomes a denial. A deny may attach structured identity and user-facing detail without changing its model-facing reason. Guards may still impose a final denial. Arguments cannot be rewritten because history, audit, UI, and execution must agree.
|
|
403
418
|
|
|
404
419
|
Post-policy may replace either content or value, never both. Content replacement preserves the canonical value and existing metadata; value replacement is revalidated and recomputes content/metadata; a block removes the value and becomes an `isError` containing corrective feedback. Content replacement is presentation policy, not confidentiality policy: a listener that must hide the programmatic value blocks or replaces it. `tools/result` receives the frozen execution and result after normalization; observers cannot transform them, and observer failures are contained. Unknown and throwing tools both become structured errors (`ToolNotFoundError` maps to `UNKNOWN_TOOL`), so the call fails without ending the turn.
|
|
405
420
|
|
|
@@ -651,11 +666,12 @@ Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index
|
|
|
651
666
|
|
|
652
667
|
#### `tools/pre-execute` — waterfall
|
|
653
668
|
|
|
654
|
-
Allow, deny, or ask before dispatch. `next()` delegates to allow; missing approval support turns `ask` into denial. Async gates must observe `exec.signal`; the registry rechecks cancellation after they settle but never abandons their promise. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's calls.
|
|
669
|
+
Allow, deny, cancel, or ask before dispatch. `next()` delegates to allow; `cancel` selects the canonical pre-dispatch cancellation result, and missing approval support turns `ask` into denial. Async gates must observe `exec.signal`; the registry rechecks cancellation after they settle but never abandons their promise. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's calls.
|
|
655
670
|
|
|
656
671
|
```ts cordis-catalog
|
|
657
672
|
/**
|
|
658
|
-
* Allow, deny, or ask before dispatch. `next()` delegates to allow;
|
|
673
|
+
* Allow, deny, cancel, or ask before dispatch. `next()` delegates to allow;
|
|
674
|
+
* `cancel` selects the canonical pre-dispatch cancellation result, and missing
|
|
659
675
|
* approval support turns `ask` into denial. Async gates must observe
|
|
660
676
|
* `exec.signal`; the registry rechecks cancellation after they settle but
|
|
661
677
|
* never abandons their promise.
|
|
@@ -674,13 +690,13 @@ Source: [`packages/core/tools/src/index.ts`](../../packages/core/tools/src/index
|
|
|
674
690
|
|
|
675
691
|
#### `tools/ptc-dispatch-log` — waterfall
|
|
676
692
|
|
|
677
|
-
Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` sub-dispatch outcome before the bridge appends its `tool/
|
|
693
|
+
Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` sub-dispatch outcome before the bridge appends its `tool/ptc-dispatch` event. `next()` keeps the content unchanged; a listener may return replacement blocks (e.g. the spill policy's preview + locator for an oversized text result). Only the logged copy is affected — the program already received the complete value, and the model sees neither. A throwing listener is contained: the bridge falls back to logging the original settled content. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's dispatches.
|
|
678
694
|
|
|
679
695
|
```ts cordis-catalog
|
|
680
696
|
/**
|
|
681
697
|
* Allow a listener to replace content in the DURABLE LOG COPY of one
|
|
682
698
|
* `run_code` sub-dispatch outcome before the bridge appends its
|
|
683
|
-
* `tool/
|
|
699
|
+
* `tool/ptc-dispatch` event. `next()` keeps the
|
|
684
700
|
* content unchanged; a listener may return replacement blocks (e.g. the
|
|
685
701
|
* spill policy's preview + locator for an oversized text result). Only the
|
|
686
702
|
* logged copy is affected — the program already received the complete
|