dsh-plugin-guide 0.3.10 → 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/README-es.md +13 -3
- package/README-hi.md +13 -3
- package/README-pt.md +13 -3
- package/README-zh.md +13 -3
- package/README.md +12 -3
- package/SKILL.md +1 -1
- package/guide/links.md +1 -0
- package/guide/unfixed-issues.md +111 -0
- 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
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# MCP
|
|
2
|
+
|
|
3
|
+
[English](mcp.md) | 中文
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
模型上下文协议(Model Context Protocol,MCP)让模型使用外部服务器提供的工具。每个已配置服务器都会提供普通 Harness 工具,支持取消、权限检查、结果记录和受支持的图像输出。调用方作用域中配置了服务器时,共享工具负责发现和读取资源,服务器指令则加入已记录的系统提示词。官方 SDK 协商现代或受支持的旧版协议。本参考页介绍 MCP 包组的职责、作用域和组合选择;服务器配置由[客户端 README](../../packages/mcp/mcp-client/README.zh.md) 维护。
|
|
8
|
+
|
|
9
|
+
## 目录
|
|
10
|
+
|
|
11
|
+
- [配置](#configuration)
|
|
12
|
+
- [职责与作用域](#responsibilities-and-scope)
|
|
13
|
+
- [协议与结果](#protocol-and-results)
|
|
14
|
+
- [资源与指令](#resources-and-instructions)
|
|
15
|
+
- [资源提供方类型](#resource-provider-types)
|
|
16
|
+
- [限制](#limits)
|
|
17
|
+
- [延伸阅读](#further-reading)
|
|
18
|
+
|
|
19
|
+
-----
|
|
20
|
+
|
|
21
|
+
<a id="configuration"></a>
|
|
22
|
+
## 配置
|
|
23
|
+
|
|
24
|
+
MCP 服务器需要主动配置。在目标 Cordis 作用域中,为每台服务器配置一个 `@deepseek-ai/dsh-mcp-client` 条目。每个随附 profile 都提供[工具注册表](tools.zh.md),并统一挂载共享资源服务一次;用户只需配置客户端条目。调用方没有可见的已配置服务器时,在 native 或 PTC 模式下都不会获得 MCP 提示词文本或工具。
|
|
25
|
+
|
|
26
|
+
| 选择 | 配置维护位置 |
|
|
27
|
+
|---|---|
|
|
28
|
+
| 服务器身份、本地进程或 HTTP 端点、凭据和进程环境 | [客户端配置](../../packages/mcp/mcp-client/README.zh.md#use-this-package) |
|
|
29
|
+
| 工具与资源请求超时、启动失败策略和重连 | [客户端配置](../../packages/mcp/mcp-client/README.zh.md#use-this-package) |
|
|
30
|
+
| 资源发现与读取 | 随附 profile 已包含 [MCP 资源服务](../../packages/mcp/mcp-resources/README.zh.md#use-this-package);该服务没有配置字段 |
|
|
31
|
+
| 服务器指令大小限制 | 客户端 `maxInstructionBytes`;组合提供[系统提示词装配](system-prompt.zh.md) |
|
|
32
|
+
| 权限决策和受支持的图像输出 | [工具执行](tools.zh.md)和[附件](attachment.zh.md) |
|
|
33
|
+
|
|
34
|
+
协议协商遵循 SDK 支持的修订版;产品没有强制指定协议修订版的设置。[配置目录](../config-catalog.zh.md#deepseek-aidsh-mcp-client) 列出客户端接受的字段和默认值。
|
|
35
|
+
|
|
36
|
+
-----
|
|
37
|
+
|
|
38
|
+
<a id="responsibilities-and-scope"></a>
|
|
39
|
+
## 职责与作用域
|
|
40
|
+
|
|
41
|
+
客户端是每服务器一个的连接插件,也是 Harness 工具注册表的消费者。它不发布共享的 `ctx.mcp` 服务。外部服务器实现 MCP 操作;SDK 拥有协议交换;客户端将发现的工具适配到 Harness 执行过程。
|
|
42
|
+
|
|
43
|
+
`mcp-resources` 拥有共享资源工具,并在调用方作用域中选择提供方。每个 MCP 客户端通过自己的连接提供资源操作。作用域中的首个提供方启用本地共享工具,移除最后一个提供方时移除这些工具;继承的提供方仍然可见。服务独立于任何单一客户端拥有这些工具注册。只要可见的客户端条目保持激活,连接失败就不会移除共享资源工具。
|
|
44
|
+
|
|
45
|
+
配置的 `serverName` 在注册作用域内标识服务器。同一作用域中的两个条目不能占用相同名称;不同 Agent 作用域可以复用该名称。公开工具名包含配置的服务器名称,因此不同服务器的同名工具仍可区分。注册副作用拥有名称和已发现工具;插件释放时关闭连接并移除其贡献。
|
|
46
|
+
|
|
47
|
+
[原生 Cua Driver 提供方](../../packages/experimental/computer-use-cua-driver-native/README.zh.md) 复用客户端导出的结果适配器,无需打开 MCP 连接。桌面提供方选择属于[计算机使用子系统](computer-use.zh.md)。
|
|
48
|
+
|
|
49
|
+
-----
|
|
50
|
+
|
|
51
|
+
<a id="protocol-and-results"></a>
|
|
52
|
+
## 协议与结果
|
|
53
|
+
|
|
54
|
+
stdio 和 Streamable HTTP 都使用官方 SDK 的协商、发现、协议校验和取消机制。工具列表变化通过旧版通知或现代订阅触发发现。刷新失败时保留上一代工具;连接恢复遵循[客户端生命周期](../../packages/mcp/mcp-client/README.zh.md#use-this-package)。
|
|
55
|
+
|
|
56
|
+
结果适配器为程序化调用方保留规范 MCP JSON,并准备普通工具内容。受支持的图像使用附件系统;不受支持的富内容产生明确的文本诊断。工具注册表仍决定策略失败和结果替换。[工具契约](tools.zh.md) 维护记录和最终呈现规则;[客户端结果参考](../../packages/mcp/mcp-client/README.zh.md#use-this-package) 维护 MCP 特有的投影细节。
|
|
57
|
+
|
|
58
|
+
-----
|
|
59
|
+
|
|
60
|
+
<a id="resources-and-instructions"></a>
|
|
61
|
+
## 资源与指令
|
|
62
|
+
|
|
63
|
+
资源调用必须显式指定配置的服务器名称。系统提示词组装服务可用时,资源服务从派发所用的同一注册表列出调用方可见的名称,包括没有工具或指令的服务器。共享注册表在分发前,于调用 Agent 的作用域中解析该名称;不可用的服务器会在发出网络请求前失败。发现和读取均按需执行,也支持只提供资源而不提供工具的服务器。[资源包](../../packages/mcp/mcp-resources/README.zh.md) 维护分页和内容渲染规则;其生成的工具 schema 位于[工具目录](../tool-catalog.zh.md#deepseek-aidsh-mcp-resources)。
|
|
64
|
+
|
|
65
|
+
资源提供方仍由连接拥有。作用域释放时移除注册;MCP 客户端控制取消和恢复。规范结果为程序化调用方保留完整 JSON,文本投影则以描述替换二进制 blob。返回的文本进入普通工具历史;服务器连接本身不会触发内容读取。
|
|
66
|
+
|
|
67
|
+
组合包含系统提示词装配时,客户端将非空白的服务器指令发布为带服务器归属的作用域章节。指令保持字面文本,并在发布前通过配置的大小限制。替换连接仅在发现成功后发布指令;缺少指令时不添加章节。[系统提示词子系统](system-prompt.zh.md) 维护装配与记录规则。
|
|
68
|
+
|
|
69
|
+
-----
|
|
70
|
+
|
|
71
|
+
<a id="resource-provider-types"></a>
|
|
72
|
+
## 资源提供方类型
|
|
73
|
+
|
|
74
|
+
连接提供方接收一个操作与原始工具执行对象,其中包含调用方和取消信号。
|
|
75
|
+
|
|
76
|
+
```ts type-equiv
|
|
77
|
+
/** One supported resource operation, with server-owned cursors and URIs. */
|
|
78
|
+
type McpResourceRequest =
|
|
79
|
+
| { method: 'resources/list' | 'resources/templates/list'; cursor?: string }
|
|
80
|
+
| { method: 'resources/read'; uri: string }
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```ts type-equiv
|
|
84
|
+
/** One configured server's resource access, owned by its MCP connection plugin. */
|
|
85
|
+
interface McpResourceProvider {
|
|
86
|
+
/**
|
|
87
|
+
* Run an operation against one live connection generation.
|
|
88
|
+
* @param request - MCP resource method and parameters.
|
|
89
|
+
* @param exec - caller identity and cancellation for this invocation.
|
|
90
|
+
* @returns the protocol result as lossless JSON.
|
|
91
|
+
*/
|
|
92
|
+
request(request: McpResourceRequest, exec: ToolExecution): Promise<JsonValue>
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
-----
|
|
97
|
+
|
|
98
|
+
<a id="limits"></a>
|
|
99
|
+
## 限制
|
|
100
|
+
|
|
101
|
+
不支持 MCP 提示词模板、人工输入征询、基于任务的执行和资源订阅。资源工具需要调用方可见的已配置服务器;二进制资源保留为程序化数据,模型接收其文本描述。没有工具能力的服务器以空工具集连接。连接和发现超时遵循 SDK;客户端没有对应的独立设置。
|
|
102
|
+
|
|
103
|
+
-----
|
|
104
|
+
|
|
105
|
+
<a id="further-reading"></a>
|
|
106
|
+
## 延伸阅读
|
|
107
|
+
|
|
108
|
+
- [MCP 包组](../../packages/mcp/README.zh.md) — 包入口。
|
|
109
|
+
- [MCP 资源](../../packages/mcp/mcp-resources/README.zh.md) — 共享工具与资源提供方语义。
|
|
110
|
+
- [资源可见性决策](../../.agents/notes/implemented/feature/2026-09-13-mcp-resources-in-profiles.zh.md) — profile 统一挂载及由已配置服务器决定的可见性。
|
|
111
|
+
- [第三方记忆服务器](../user/guide/mcp-memory.zh.md) — 产品配置指南。
|
|
112
|
+
- [协议协商决策](../../.agents/notes/implemented/feature/2026-09-12-mcp-sdk-protocol-negotiation.zh.md) — SDK 职责与兼容性决策。
|
|
113
|
+
|
|
114
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
115
|
+
|
|
116
|
+
<a id="cordis-surface"></a>
|
|
117
|
+
|
|
118
|
+
## Cordis API
|
|
119
|
+
|
|
120
|
+
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).
|
|
121
|
+
|
|
122
|
+
<a id="ctxmcpresources--mcpresourceruntime"></a>
|
|
123
|
+
|
|
124
|
+
### `ctx.mcpResources` — `McpResourceRuntime`
|
|
125
|
+
|
|
126
|
+
Scoped resource access plus three tools shared by configured MCP servers.
|
|
127
|
+
|
|
128
|
+
```ts cordis-catalog
|
|
129
|
+
/**
|
|
130
|
+
* Register one server and expose resource tools while that scope has providers.
|
|
131
|
+
* @param server - configured server name, unique in this scope.
|
|
132
|
+
* @param provider - connection-owned resource operations.
|
|
133
|
+
* @returns the effect disposer for this exact registration.
|
|
134
|
+
*/
|
|
135
|
+
register(server: string, provider: McpResourceProvider): () => void
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Source: [`packages/mcp/mcp-resources/src/index.ts`](../../packages/mcp/mcp-resources/src/index.ts)
|
|
139
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write docs/subsystems/office-to-pdf.md
|
|
5
|
+
office-to-pdf.md: 65f46ded856e81f9bcd7890c11c82f0a22f769c4
|
|
6
|
+
office-to-pdf.zh.md: df46af01d78241bbc88f6b85a83c47551faf4bfe
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Office to PDF
|
|
2
|
+
|
|
3
|
+
English | [中文](office-to-pdf.zh.md)
|
|
4
|
+
|
|
5
|
+
The [document package family](../../packages/document/README.md) converts Office files to PDFs on the Node Host. Consumers authorize source reads and own presentation; the shared provider owns conversion, bounded admission, and transient PDF reuse. This subsystem creates no model-facing tool or Session event.
|
|
6
|
+
|
|
7
|
+
## Ownership
|
|
8
|
+
|
|
9
|
+
| Owner | Responsibility |
|
|
10
|
+
|---|---|
|
|
11
|
+
| [office-to-pdf](../../packages/document/office-to-pdf/README.md) | `ctx.officeToPdf`: shared LibreOffice conversion, bounded admission, and PDF caching |
|
|
12
|
+
| [Web bundle](../../packages/bundle/web-app/README.md) | One configurable conversion provider shared by Host consumers |
|
|
13
|
+
| [Office preview Client](../../packages/client/ui-sidebar-documentpreview/README.md#office-preview) | Office extension selection, PDF reuse, and missing-font notices |
|
|
14
|
+
|
|
15
|
+
## Requests and results
|
|
16
|
+
|
|
17
|
+
[`OfficeToPdfRequest`](../../packages/document/office-to-pdf/src/types.ts) contains an already-authorized source key/version, optional stat size, a deferred `read(signal, maxBytes)` callback, foreground/background priority, and a `OfficeExtension`: `doc`, `docx`, `xls`, `xlsx`, `ppt`, or `pptx`. `OfficeToPdf.convert(request, signal?)` returns one complete PDF result. Cancellation follows the caller and provider lifetimes; validation, output, and engine failures reject with a classified `OfficeToPdfError`.
|
|
18
|
+
|
|
19
|
+
`OfficeToPdfPriority` is `foreground` for requested preview/QA and `background` for speculation. `OfficeSourceKey` brands the caller-owned authorized source locator. `OfficeToPdfGeneration` brands a provider lifetime, and `OfficeToPdfKey` brands its content identity; neither opaque value is parsed by consumers.
|
|
20
|
+
|
|
21
|
+
| Result field | Meaning |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `pdf` | Caller-owned `Uint8Array` containing the complete PDF |
|
|
24
|
+
| `missingFonts` | Requested document font families unavailable to this conversion |
|
|
25
|
+
| `cacheKey` | Opaque converter generation plus extension/source-content identity |
|
|
26
|
+
| `generation` | Provider lifetime; replacement invalidates cached PDF reuse |
|
|
27
|
+
|
|
28
|
+
The provider admits the deferred read before allocating source bytes, shares conversions by content identity, and removes its private scratch directory before returning. Returned PDF bytes remain valid after provider disposal. Source and PDF bytes do not enter Session storage. Consumers can use [Workspace Files](../../packages/api/workspace-files/README.md) for authorized bounded reads.
|
|
29
|
+
|
|
30
|
+
## Preview reads
|
|
31
|
+
|
|
32
|
+
`RenderedDocumentBytes` extends the workspace byte response with `missingFonts` and `generation`; the original source identity accompanies the converted PDF.
|
|
33
|
+
|
|
34
|
+
The `officeToPdf.render` Remote method checks source authorization and versions through the Session's [Workspace Files](../../packages/api/workspace-files/README.md) service. After conversion admission, `fs.readBytes` supplies raw input within the reserved byte capacity; Office input limits govern this read. The response carries base64 PDF bytes with the source absolute path and freshness version. Source access failures pass through; size and engine failures expose a classified reason without diagnostics. Conversion does not activate an Agent or append events.
|
|
35
|
+
|
|
36
|
+
The `api/remotes` assembly mounts the conversion service's generated Remote descriptor. The shared Document Preview package registers Office formats with complete-byte loading and its existing PDF.js Worker. Each preview read rechecks renderer generation, source authorization, and version before sharing an in-flight conversion or cached PDF. Connection resets and plugin disposal cancel requests and clear cached bytes. Missing services show localized configuration guidance.
|
|
37
|
+
|
|
38
|
+
## Engine selection and limits
|
|
39
|
+
|
|
40
|
+
The external [`@deepseek-ai/libreoffice-kit`](https://github.com/deepseek-harness/libreoffice-kit) Node API selects its precompiled engines. The kit has an independent version and release workflow, defined by the [release ownership decision](../../.agents/notes/implemented/architecture/2026-09-14-independent-libreoffice-kit.md). Application builds install the published npm packages. Application packaging requires the target’s declared native engine, or Node WASM when the kit declares no native engine for that target. The [platform engine decision](../../.agents/notes/implemented/architecture/2026-09-15-platform-office-engines.md) defines installation and packaging. Invalid metadata, missing required assets, and conversion errors reject without switching engines. Conversion uses disk input and output paths on the Host, with no browser conversion engine or font RPC.
|
|
41
|
+
|
|
42
|
+
The [Host provider configuration](../../packages/document/office-to-pdf/README.md#use-this-package) owns concurrency, deadlines, input/output limits, archive limits, image resolution, and font access. Native/WASM implementation and asset distribution belong to the kit workspace. System LibreOffice discovery, runtime engine downloads, persistent PDF caching, and model-facing rendering are outside this provider.
|
|
43
|
+
|
|
44
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
45
|
+
|
|
46
|
+
<a id="cordis-surface"></a>
|
|
47
|
+
|
|
48
|
+
## Cordis API
|
|
49
|
+
|
|
50
|
+
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).
|
|
51
|
+
|
|
52
|
+
<a id="ctxofficetopdf--officetopdf"></a>
|
|
53
|
+
|
|
54
|
+
### `ctx.officeToPdf` — `OfficeToPdf`
|
|
55
|
+
|
|
56
|
+
A provider lifetime owns all converters, queued calls, and temporary files.
|
|
57
|
+
|
|
58
|
+
```ts cordis-catalog
|
|
59
|
+
/**
|
|
60
|
+
* Convert Office bytes without modifying the source or writing Session events.
|
|
61
|
+
* @param request - authorized metadata and deferred bounded source read.
|
|
62
|
+
* @param signal - caller cancellation; provider disposal also stops active work.
|
|
63
|
+
* @returns caller-owned PDF bytes after conversion and scratch cleanup settle; canceled readers reject independently.
|
|
64
|
+
* @throws {OfficeToPdfError} Invalid input, unusable output, or engine failure; cancellation rejects with its reason.
|
|
65
|
+
*/
|
|
66
|
+
convert(request: OfficeToPdfRequest, signal?: AbortSignal): Promise<OfficeToPdfResult>
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Read and convert one Office file using the Session's ordinary filesystem authorization.
|
|
70
|
+
* @param workspaceFileScope - Session header lookup shared with workspaceFiles.
|
|
71
|
+
* @param path - absolute or workspace-relative Office path.
|
|
72
|
+
* @param priority - foreground preview or speculative background work.
|
|
73
|
+
* @param signal - Remote cancellation; disposal also cancels outstanding reads and conversions.
|
|
74
|
+
* @returns complete base64 PDF with original source identity and missing font families.
|
|
75
|
+
*/
|
|
76
|
+
@Remote async render( workspaceFileScope: WorkspaceFileScope, path: string, priority: OfficeToPdfPriority, signal: AbortSignal, ): Promise<RenderedDocumentBytes>
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Read the current rendering generation before reusing a Client PDF.
|
|
80
|
+
* @param signal - Remote caller cancellation.
|
|
81
|
+
* @returns provider lifetime, replaced with rendering, font, or engine configuration.
|
|
82
|
+
*/
|
|
83
|
+
@Remote('generation') getGeneration(signal: AbortSignal): OfficeToPdfGeneration
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Source: [`packages/document/office-to-pdf/src/index.ts`](../../packages/document/office-to-pdf/src/index.ts)
|
|
87
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Office 转 PDF
|
|
2
|
+
|
|
3
|
+
[English](office-to-pdf.md) | 中文
|
|
4
|
+
|
|
5
|
+
[document 包族](../../packages/document/README.zh.md) 在 Node 宿主上将 Office 文件转换为 PDF。消费者负责源文件读取授权与展示;共享提供方负责转换、有界准入和临时 PDF 复用。此子系统不创建面向模型的工具或 Session 事件。
|
|
6
|
+
|
|
7
|
+
## 所有权
|
|
8
|
+
|
|
9
|
+
| 所有者 | 职责 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| [office-to-pdf](../../packages/document/office-to-pdf/README.zh.md) | `ctx.officeToPdf`:共享 LibreOffice 转换、有界准入和 PDF 缓存 |
|
|
12
|
+
| [Web bundle](../../packages/bundle/web-app/README.zh.md) | 由宿主消费者共享的单个可配置转换提供方 |
|
|
13
|
+
| [Office 预览 Client](../../packages/client/ui-sidebar-documentpreview/README.zh.md#office-preview) | Office 扩展名选择、PDF 复用和缺失字体提示 |
|
|
14
|
+
|
|
15
|
+
## 请求和结果
|
|
16
|
+
|
|
17
|
+
[`OfficeToPdfRequest`](../../packages/document/office-to-pdf/src/types.ts)包含已授权的源键与版本、可选 stat 大小、延迟的 `read(signal, maxBytes)` 回调、前台或后台优先级以及 `OfficeExtension`:`doc`、`docx`、`xls`、`xlsx`、`ppt` 或 `pptx`。`OfficeToPdf.convert(request, signal?)` 返回一个完整 PDF 结果。取消遵循调用方和提供方生命周期;校验、输出和引擎失败以分类的 `OfficeToPdfError` 拒绝。
|
|
18
|
+
|
|
19
|
+
`OfficeToPdfPriority` 对请求的预览或 QA 使用 `foreground`,对推测工作使用 `background`。`OfficeSourceKey` 为调用方拥有的已授权源定位符增加品牌类型。`OfficeToPdfGeneration` 表示提供方生命周期,`OfficeToPdfKey` 表示其内容身份;消费者不解析这两种不透明值。
|
|
20
|
+
|
|
21
|
+
| 结果字段 | 含义 |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `pdf` | 调用方拥有的 `Uint8Array`,包含完整 PDF |
|
|
24
|
+
| `missingFonts` | 本次转换无法使用的文档请求字体名称 |
|
|
25
|
+
| `cacheKey` | 不透明的转换 generation 加扩展名与源内容身份 |
|
|
26
|
+
| `generation` | 提供方生命周期;替换后缓存 PDF 不再可复用 |
|
|
27
|
+
|
|
28
|
+
提供方先准入延迟读取,再分配源文件字节;按内容身份共享转换,并在返回前删除私有临时目录。返回的 PDF 字节在提供方释放后仍有效。源文件和 PDF 字节不会进入 Session 存储。消费者可通过[工作区文件](../../packages/api/workspace-files/README.zh.md)执行已授权的有界读取。
|
|
29
|
+
|
|
30
|
+
## 预览读取
|
|
31
|
+
|
|
32
|
+
`RenderedDocumentBytes` 在工作区字节响应上增加 `missingFonts` 和 `generation`;转换后的 PDF 附带原始源文件身份。
|
|
33
|
+
|
|
34
|
+
`officeToPdf.render` Remote 方法通过 Session 的[工作区文件](../../packages/api/workspace-files/README.zh.md)服务检查源文件授权与版本。取得转换容量后,`fs.readBytes` 在预留字节容量内提供原始输入;该读取受 Office 输入上限约束。响应携带 base64 PDF 字节、源文件绝对路径与新鲜度版本。源访问失败直接传递;大小和引擎失败只暴露分类原因,不含诊断信息。转换不激活 Agent 或追加事件。
|
|
35
|
+
|
|
36
|
+
`api/remotes` 挂载转换服务生成的 Remote 描述符。共享文档预览包使用完整字节加载和现有 PDF.js Worker 注册 Office 格式。每次预览读取都会重新检查渲染 generation、源文件授权和版本,再共享进行中的转换或缓存 PDF。连接重置和插件卸载会取消请求并清空缓存字节。缺少服务时显示本地化配置引导。
|
|
37
|
+
|
|
38
|
+
## 引擎选择和限制
|
|
39
|
+
|
|
40
|
+
外部 [`@deepseek-ai/libreoffice-kit`](https://github.com/deepseek-harness/libreoffice-kit) Node API 选择其预编译引擎。kit 独立维护版本和发布流程,具体归属由[发布归属决策](../../.agents/notes/implemented/architecture/2026-09-14-independent-libreoffice-kit.zh.md)定义。应用构建时安装已发布的 npm 包。应用打包要求目标已声明的原生引擎;kit 未为该目标声明原生引擎时使用 Node WASM。[平台引擎决策](../../.agents/notes/implemented/architecture/2026-09-15-platform-office-engines.zh.md)定义安装和打包规则。元数据无效、必需资源缺失和转换错误都会拒绝请求,不切换引擎。转换在 Host 使用磁盘输入输出路径,不使用浏览器转换引擎或字体 RPC。
|
|
41
|
+
|
|
42
|
+
[Host 提供方配置](../../packages/document/office-to-pdf/README.zh.md#use-this-package)负责并发、期限、输入输出上限、归档上限、图像分辨率和字体访问。原生/WASM 实现和资产分发属于 kit 工作区。系统 LibreOffice 探测、运行时引擎下载、持久 PDF 缓存和面向模型的渲染不属于此提供方。
|
|
43
|
+
|
|
44
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
45
|
+
|
|
46
|
+
<a id="cordis-surface"></a>
|
|
47
|
+
|
|
48
|
+
## Cordis API
|
|
49
|
+
|
|
50
|
+
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).
|
|
51
|
+
|
|
52
|
+
<a id="ctxofficetopdf--officetopdf"></a>
|
|
53
|
+
|
|
54
|
+
### `ctx.officeToPdf` — `OfficeToPdf`
|
|
55
|
+
|
|
56
|
+
A provider lifetime owns all converters, queued calls, and temporary files.
|
|
57
|
+
|
|
58
|
+
```ts cordis-catalog
|
|
59
|
+
/**
|
|
60
|
+
* Convert Office bytes without modifying the source or writing Session events.
|
|
61
|
+
* @param request - authorized metadata and deferred bounded source read.
|
|
62
|
+
* @param signal - caller cancellation; provider disposal also stops active work.
|
|
63
|
+
* @returns caller-owned PDF bytes after conversion and scratch cleanup settle; canceled readers reject independently.
|
|
64
|
+
* @throws {OfficeToPdfError} Invalid input, unusable output, or engine failure; cancellation rejects with its reason.
|
|
65
|
+
*/
|
|
66
|
+
convert(request: OfficeToPdfRequest, signal?: AbortSignal): Promise<OfficeToPdfResult>
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Read and convert one Office file using the Session's ordinary filesystem authorization.
|
|
70
|
+
* @param workspaceFileScope - Session header lookup shared with workspaceFiles.
|
|
71
|
+
* @param path - absolute or workspace-relative Office path.
|
|
72
|
+
* @param priority - foreground preview or speculative background work.
|
|
73
|
+
* @param signal - Remote cancellation; disposal also cancels outstanding reads and conversions.
|
|
74
|
+
* @returns complete base64 PDF with original source identity and missing font families.
|
|
75
|
+
*/
|
|
76
|
+
@Remote async render( workspaceFileScope: WorkspaceFileScope, path: string, priority: OfficeToPdfPriority, signal: AbortSignal, ): Promise<RenderedDocumentBytes>
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Read the current rendering generation before reusing a Client PDF.
|
|
80
|
+
* @param signal - Remote caller cancellation.
|
|
81
|
+
* @returns provider lifetime, replaced with rendering, font, or engine configuration.
|
|
82
|
+
*/
|
|
83
|
+
@Remote('generation') getGeneration(signal: AbortSignal): OfficeToPdfGeneration
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Source: [`packages/document/office-to-pdf/src/index.ts`](../../packages/document/office-to-pdf/src/index.ts)
|
|
87
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -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/permission-presets.md
|
|
5
|
-
permission-presets.md:
|
|
6
|
-
permission-presets.zh.md:
|
|
5
|
+
permission-presets.md: 3414678e1e2cba600cd81fd1cfa4b8f3df1aa839
|
|
6
|
+
permission-presets.zh.md: e3e2d5bc99432f5af2473e904b085b2484e49226
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](permission-presets.zh.md)
|
|
4
4
|
|
|
5
|
-
The permission-preset layer of [dsh-permission-presets](../../packages/interaction/permission-presets) (`ctx.permissionPresets`, `PermissionPresetService`) bundles the two independent enforcement knobs — [sandbox mode](sandbox.md) (`sandbox/mode`) and [approval policy](approval.md) (`approval/policy`) — into named presets a client offers as one Permissions selector.
|
|
5
|
+
The permission-preset layer of [dsh-permission-presets](../../packages/interaction/permission-presets) (`ctx.permissionPresets`, `PermissionPresetService`) bundles the two independent enforcement knobs — [sandbox mode](sandbox.md) (`sandbox/mode`) and [approval policy](approval.md) (`approval/policy`) — into named presets a client offers as one Permissions selector. The configured table owns future-session defaults, while the fixed `registerAuto(admit)` hook lets the [Auto review](../../packages/experimental/auto-review/README.md) integration publish its current-session-only option for one effect lifetime. The layer is optional and owns no execution policy: prompt narration and replay keep reading their knob folds, while Auto review owns the additional enforcement. The [package README](../../packages/interaction/permission-presets/README.md) owns composition status and limitations; the [sandbox switching design](../../.agents/notes/implemented/feature/2026-07-06-sandbox.md) owns the original knob rationale.
|
|
6
6
|
|
|
7
7
|
Source: [`packages/interaction/permission-presets/src/index.ts`](../../packages/interaction/permission-presets/src/index.ts)
|
|
8
8
|
|
|
9
9
|
## The preset table
|
|
10
10
|
|
|
11
|
-
A preset
|
|
11
|
+
A preset maps one stable key to a sandbox/approval bundle plus optional client presentation. The default configured table ships `workspace-write` (`workspace-write` + `ask`) and `danger-full-access` (`danger-full-access` + `never`); `custom` and `auto` are reserved and cannot be configured.
|
|
12
12
|
|
|
13
13
|
```ts type-equiv
|
|
14
14
|
/** One preset's sandbox/approval bundle and optional client presentation. */
|
|
@@ -30,7 +30,8 @@ interface Config {
|
|
|
30
30
|
/**
|
|
31
31
|
* The preset table: name → knob bundle. Defaults to `workspace-write`
|
|
32
32
|
* (workspace-write + ask) and `danger-full-access` (danger-full-access +
|
|
33
|
-
* never). The
|
|
33
|
+
* never). The names `custom` and `auto` are reserved for derived state and
|
|
34
|
+
* the Auto review integration respectively.
|
|
34
35
|
*/
|
|
35
36
|
presets?: Record<string, PresetSpec>
|
|
36
37
|
/**
|
|
@@ -41,18 +42,24 @@ interface Config {
|
|
|
41
42
|
}
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
The service requires a confining `ctx.shell` executor and `ctx.approval`, and misconfiguration fails at plugin load:
|
|
45
|
+
The service requires a confining `ctx.shell` executor and `ctx.approval`, and misconfiguration fails at plugin load: configured entries named `custom` or `auto` throw, and composing over a bash executor that does not confine (no `sandboxMode` capability fact) throws because presets bundle a sandbox mode.
|
|
46
|
+
|
|
47
|
+
## Fixed current-session Auto registration
|
|
48
|
+
|
|
49
|
+
The Auto integration calls `registerAuto(admit)` for its effect lifetime. This service fixes the `auto` identity and its `danger-full-access` plus `never` bundle; the shipped client locale dictionaries own Auto's label and description, while configured preset presentation remains Host-owned. Callers cannot publish another preset through a generic contribution API. Auto appears after configured presets, never enters the `permission.defaultPreset` settings schema, and disappears when the effect is disposed. The synchronous `admit` callback runs before Auto selection mutates the Session and before a stored Auto Session publishes, so a missing or closing integration does not rewrite the durable identity.
|
|
50
|
+
|
|
51
|
+
Registering or removing Auto emits the payload-free `permission-presets/catalog-changed` notification. Process consumers subscribe before calling `catalog()`, then re-read the complete selectable catalog after each notification. The `permissions` Session projection contains only `currentValue`, so catalog changes append no Session event, publish no Session projection frame, and leave the Session sequence unchanged.
|
|
45
52
|
|
|
46
53
|
## Current preset and the derived `custom`
|
|
47
54
|
|
|
48
|
-
`current(session)` derives the effective preset from the
|
|
55
|
+
`current(session)` derives the effective preset from the required `permissions` projection. The unit folds the session's sandbox mode, approval policy, and recorded selection; values absent within that state fall back to the executor's configured mode and the approval service config, then `ask`. A missing projection key fails explicitly. The service prefers a still-matching selection, then the first matching configured entry, and otherwise returns `CUSTOM_PRESET` (`'custom'`). `custom` is derived-only: clients may display it as the current value, but it is never a switch target or an event payload.
|
|
49
56
|
|
|
50
|
-
`names` lists
|
|
57
|
+
`names` lists configured presets in declaration order followed by Auto while its integration is live. `catalog()` returns those selectable entries as one process-level snapshot. `optionOf(name)` builds an available entry (its label falls back to the key) or the derived `custom` presentation, and throws for any other name. Clients join the catalog with the Session projection; `custom` may label the current value but never becomes a catalog entry.
|
|
51
58
|
|
|
52
59
|
```ts type-equiv
|
|
53
|
-
/**
|
|
60
|
+
/** Presentation for an available preset or the derived `custom` current value. */
|
|
54
61
|
interface PresetOption {
|
|
55
|
-
/** Stable option value:
|
|
62
|
+
/** Stable option value: a configured preset key, live `auto`, or derived `custom`. */
|
|
56
63
|
value: string
|
|
57
64
|
/** The display label. */
|
|
58
65
|
name: string
|
|
@@ -63,9 +70,9 @@ interface PresetOption {
|
|
|
63
70
|
|
|
64
71
|
## Switching and the `permission/preset` event
|
|
65
72
|
|
|
66
|
-
`set(session, name)` resolves the preset (unknown names throw), appends a log-only `permission/preset` event unless `name` is already the effective preset, then writes each knob through its own setter — `setSandboxMode` from [dsh-sandbox-policy](../../packages/sandbox/sandbox-policy) and `setApprovalPolicy` from [dsh-user-approval](../../packages/interaction/user-approval) — only when that knob's effective value changes. The selection event precedes the knob events in the same turn, and re-selecting the effective preset appends nothing.
|
|
73
|
+
`set(session, name)` resolves the preset (unknown names throw), runs Auto admission when applicable, appends a log-only `permission/preset` event unless `name` is already the effective preset, then writes each knob through its own setter — `setSandboxMode` from [dsh-sandbox-policy](../../packages/sandbox/sandbox-policy) and `setApprovalPolicy` from [dsh-user-approval](../../packages/interaction/user-approval) — only when that knob's effective value changes. The selection event precedes the knob events in the same turn, and re-selecting the effective preset appends nothing.
|
|
67
74
|
|
|
68
|
-
`permission/preset` is durable, log-only user intent: it stays out of the model transcript (the knob events own the model-visible consequences through their consumers), and it exists so `current()` can preserve
|
|
75
|
+
`permission/preset` is durable, log-only user intent: it stays out of the model transcript (the knob events own the model-visible consequences through their consumers), and it exists so `current()` can preserve which preset the user chose when two presets share a bundle. The `permissions` projection folds that selection with both knob events and retains the `session/end-seed` boundary used to distinguish a restored empty seed from a fresh session; replay needs no catch-up state or raw-log rescan. A restored `auto` selection requires the live Auto registration before Agent publication. The complete event declaration is in the [persistence log event catalog](../persistence-catalog.md); the method signatures are in the generated [service catalog](#ctxpermissionpresets--permissionpresetservice).
|
|
69
76
|
|
|
70
77
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
71
78
|
|
|
@@ -79,40 +86,47 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
79
86
|
|
|
80
87
|
### `ctx.permissionPresets` — `PermissionPresetService`
|
|
81
88
|
|
|
82
|
-
Owns the deployment's permission presets and their write path. Requires a confining `ctx.shell` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.
|
|
89
|
+
Owns the deployment's configured permission presets, the fixed Auto integration hook, and their write path. Requires a confining `ctx.shell` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.
|
|
83
90
|
|
|
84
91
|
```ts cordis-catalog
|
|
92
|
+
/**
|
|
93
|
+
* Read the complete process-level catalog exposed to current-session UI.
|
|
94
|
+
* @returns every currently selectable preset in contribution order.
|
|
95
|
+
*/
|
|
96
|
+
@Remote('catalog') catalog(): PermissionCatalog
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Publish the fixed current-session Auto preset for the calling
|
|
100
|
+
* integration's effect lifetime.
|
|
101
|
+
* @param admit - synchronous gate run before live Auto selection or restore.
|
|
102
|
+
* @returns the async effect disposer that removes Auto.
|
|
103
|
+
*/
|
|
104
|
+
registerAuto(admit: () => void): () => Promise<void>
|
|
105
|
+
|
|
85
106
|
/**
|
|
86
107
|
* Resolve the preset matching the effective knob values. A still-matching
|
|
87
|
-
* last selection wins shared-bundle ties; otherwise the first
|
|
88
|
-
* wins
|
|
108
|
+
* last selection wins shared-bundle ties; otherwise the first configured
|
|
109
|
+
* match wins. Returns
|
|
110
|
+
* {@link CUSTOM_PRESET} when no available preset matches.
|
|
89
111
|
* @param session - the session whose knob state is read.
|
|
90
112
|
* @returns the effective preset name, or `custom` when nothing matches.
|
|
91
113
|
*/
|
|
92
114
|
current(session: Session): string
|
|
93
115
|
|
|
94
116
|
/**
|
|
95
|
-
*
|
|
96
|
-
* option in declaration order, `custom` appended exactly while derived.
|
|
97
|
-
* @param state - the folded knob overrides.
|
|
98
|
-
* @returns the `permissions` projection payload.
|
|
99
|
-
*/
|
|
100
|
-
selectFor(state: KnobState): PermissionSelect
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Resolve a preset's knob bundle.
|
|
117
|
+
* Resolve an available preset's knob bundle.
|
|
104
118
|
* @param name - the preset name to resolve.
|
|
105
119
|
* @returns the configured bundle.
|
|
106
|
-
* @throws when `name` is
|
|
120
|
+
* @throws when `name` is neither configured nor the currently live Auto preset.
|
|
107
121
|
*/
|
|
108
122
|
resolve(name: string): PresetSpec
|
|
109
123
|
|
|
110
124
|
/**
|
|
111
|
-
* Build the client option for
|
|
112
|
-
* missing label falls back to the
|
|
113
|
-
* @param name - a
|
|
125
|
+
* Build the client option for an available preset or {@link CUSTOM_PRESET}.
|
|
126
|
+
* A missing label falls back to the preset key.
|
|
127
|
+
* @param name - a configured preset key, live `auto`, or `custom`.
|
|
114
128
|
* @returns the option a client renders.
|
|
115
|
-
* @throws when `name` is neither a
|
|
129
|
+
* @throws when `name` is neither a configured preset, live `auto`, nor `custom`.
|
|
116
130
|
*/
|
|
117
131
|
optionOf(name: string): PresetOption
|
|
118
132
|
|
|
@@ -128,4 +142,25 @@ set(session: Session, name: string): void
|
|
|
128
142
|
Types: [Session](session.md)
|
|
129
143
|
|
|
130
144
|
Source: [`packages/interaction/permission-presets/src/index.ts`](../../packages/interaction/permission-presets/src/index.ts)
|
|
145
|
+
|
|
146
|
+
<a id="permission-presets-events"></a>
|
|
147
|
+
|
|
148
|
+
### `permission-presets/*` events
|
|
149
|
+
|
|
150
|
+
<a id="permission-presetscatalog-changed--emit"></a>
|
|
151
|
+
|
|
152
|
+
#### `permission-presets/catalog-changed` — emit
|
|
153
|
+
|
|
154
|
+
The selectable process catalog changed. Payload-free by design: consumers subscribe first, then re-read the complete catalog.
|
|
155
|
+
|
|
156
|
+
```ts cordis-catalog
|
|
157
|
+
/**
|
|
158
|
+
* The selectable process catalog changed. Payload-free by design:
|
|
159
|
+
* consumers subscribe first, then re-read the complete catalog.
|
|
160
|
+
* @mode emit
|
|
161
|
+
*/
|
|
162
|
+
'permission-presets/catalog-changed'(): void
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Source: [`packages/interaction/permission-presets/src/types.ts`](../../packages/interaction/permission-presets/src/types.ts)
|
|
131
166
|
<!-- END GENERATED cordis-surface -->
|