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
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[English](permission-presets.md) | 中文
|
|
4
4
|
|
|
5
|
-
[dsh-permission-presets](../../packages/interaction/permission-presets) 的权限预设层(`ctx.permissionPresets`,`PermissionPresetService`)把两个相互独立的强制执行 knob,即[沙箱模式](sandbox.zh.md)(`sandbox/mode`)与[审批策略](approval.zh.md)(`approval/policy
|
|
5
|
+
[dsh-permission-presets](../../packages/interaction/permission-presets) 的权限预设层(`ctx.permissionPresets`,`PermissionPresetService`)把两个相互独立的强制执行 knob,即[沙箱模式](sandbox.zh.md)(`sandbox/mode`)与[审批策略](approval.zh.md)(`approval/policy`),捆绑成具名预设,供客户端作为单个 Permissions 选择器提供。配置表拥有未来会话默认值,而固定的 `registerAuto(admit)` 钩子让 [Auto review](../../packages/experimental/auto-review/README.zh.md) integration 在一个 effect 生命周期内发布仅限当前会话的选项。该层是可选能力,且不拥有执行策略:提示词叙述与回放仍读取各自 knob 的折叠结果,额外强制执行由 Auto review 拥有。[包 README](../../packages/interaction/permission-presets/README.zh.md)负责组合状态与限制;[沙箱切换设计](../../.agents/notes/implemented/feature/2026-07-06-sandbox.zh.md)负责原始旋钮依据。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/interaction/permission-presets/src/index.ts`](../../packages/interaction/permission-presets/src/index.ts)
|
|
8
8
|
|
|
9
9
|
## 预设表
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
预设把一个稳定 key 映射到一组沙箱/审批组合,外加可选的客户端展示信息。默认配置表自带 `workspace-write`(`workspace-write` + `ask`)和 `danger-full-access`(`danger-full-access` + `never`);`custom` 与 `auto` 是保留名称,不能配置。
|
|
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
|
-
该服务要求一个施加隔离的 `ctx.shell` 执行器和 `ctx.approval`,配置错误在插件加载时即失败:名为 `custom`
|
|
45
|
+
该服务要求一个施加隔离的 `ctx.shell` 执行器和 `ctx.approval`,配置错误在插件加载时即失败:名为 `custom` 或 `auto` 的配置条目会抛出异常;在不施加隔离的 bash 执行器(没有 `sandboxMode` 能力事实)之上组合同样抛出异常,因为预设捆绑了一个沙箱模式。
|
|
46
|
+
|
|
47
|
+
## 固定的当前会话 Auto 注册
|
|
48
|
+
|
|
49
|
+
Auto integration 会在自身 effect 生命周期内调用 `registerAuto(admit)`。本服务固定 `auto` 身份以及 `danger-full-access` 加 `never` 的组合;shipped 客户端的 locale 字典拥有 Auto 的 label 与 description,而配置预设的展示信息仍归 Host 所有。调用方不能通过通用 contribution API 发布其他预设。Auto 排列在配置预设之后,绝不会进入 `permission.defaultPreset` 设置 schema,并在 effect dispose 时消失。同步 `admit` 回调会在 Auto 选择修改 Session 前,以及存储的 Auto Session 发布前运行,因此 integration 缺失或正在关闭时不会改写持久身份。
|
|
50
|
+
|
|
51
|
+
注册或移除 Auto 会发出无 payload 的 `permission-presets/catalog-changed` 通知。进程级消费方先订阅,再调用 `catalog()`;每次收到通知后重新读取完整的可选目录。`permissions` Session 投影只包含 `currentValue`,因此目录变化不会追加 Session 事件、发布 Session 投影帧或改变 Session 序列。
|
|
45
52
|
|
|
46
53
|
## 当前预设与派生的 `custom`
|
|
47
54
|
|
|
48
|
-
`current(session)`
|
|
55
|
+
`current(session)` 从必需的 `permissions` 投影派生实际生效的预设。该单元折叠会话的沙箱模式、审批策略和已记录选择;状态内部的缺失值回退到执行器配置的模式与审批服务配置,最后回退到 `ask`。投影 key 缺失时会显式失败。服务优先取仍然匹配的选择,其次取第一个匹配的配置条目,否则返回 `CUSTOM_PRESET`(`'custom'`)。`custom` 只是派生值:客户端可以把它显示为当前值,但它绝不是切换目标,也绝不出现在事件 payload 中。
|
|
49
56
|
|
|
50
|
-
`names`
|
|
57
|
+
`names` 先按声明顺序列出配置预设,再在 Auto integration 存活时列出 Auto。`catalog()` 把这些可选条目作为一份进程级快照返回。`optionOf(name)` 为可用条目(label 回退为该 key)或派生的 `custom` 展示构建选项,传入其他任何名称都会抛出异常。客户端把目录与 Session 投影合并;`custom` 可以标记当前值,但绝不会成为目录条目。
|
|
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
|
## 切换与 `permission/preset` 事件
|
|
65
72
|
|
|
66
|
-
`set(session, name)`
|
|
73
|
+
`set(session, name)` 解析预设(未知名称抛出异常),在适用时运行 Auto 准入,在 `name` 尚不是生效预设时追加一条仅记日志的 `permission/preset` 事件,然后通过各旋钮自己的 setter([dsh-sandbox-policy](../../packages/sandbox/sandbox-policy) 的 `setSandboxMode` 与 [dsh-user-approval](../../packages/interaction/user-approval) 的 `setApprovalPolicy`)写入,且仅当该 knob 的生效值发生变化时才写。同一轮次内,选择事件先于旋钮事件出现;重新选择当前生效的预设则什么都不追加。
|
|
67
74
|
|
|
68
|
-
`permission/preset` 是持久、仅记日志的用户意图:它不进入模型 transcript(文本记录),模型可见的后果由 knob 事件经各自消费方承担;它存在是为了在两个预设共享同一个旋钮组合时,让 `current()` 仍能保住用户选择的究竟是哪一个预设。`permissions` 投影把该选择与两个 knob 事件一同折叠,并保留用于区分空恢复 seed 与新会话的 `session/end-seed`
|
|
75
|
+
`permission/preset` 是持久、仅记日志的用户意图:它不进入模型 transcript(文本记录),模型可见的后果由 knob 事件经各自消费方承担;它存在是为了在两个预设共享同一个旋钮组合时,让 `current()` 仍能保住用户选择的究竟是哪一个预设。`permissions` 投影把该选择与两个 knob 事件一同折叠,并保留用于区分空恢复 seed 与新会话的 `session/end-seed` 边界;回放不需要任何追赶状态或原始日志重扫。恢复的 `auto` 选择在 agent 发布前必须存在 live Auto 注册。完整事件声明见[持久化日志事件目录](../persistence-catalog.zh.md);方法签名见生成的[服务目录](#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.zh.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 -->
|
|
@@ -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/persistence.md
|
|
5
|
-
persistence.md:
|
|
6
|
-
persistence.zh.md:
|
|
5
|
+
persistence.md: 7e18e9bbfec8c7aa81525da33ad3cffa4681ea73
|
|
6
|
+
persistence.zh.md: 8250fb93b20dc33c2df705fd2c7092bc8dea155c
|
|
@@ -8,7 +8,20 @@ The seam is a [capability seam](../../.agents/notes/implemented/architecture/202
|
|
|
8
8
|
|
|
9
9
|
## `SessionHandle` — one open channel onto a stored session
|
|
10
10
|
|
|
11
|
-
Every log read and write flows through a handle, never through id-addressed service methods: the handle is the single door the cross-process write lease guards. One handle type serves both accesses — a mutation on a `read` handle is a runtime `SessionReadOnlyError` rather than a typed split — and in-process single-writer ownership makes a second `open(id, 'write')` reject with `SessionAlreadyOwnedError` while an owner is active.
|
|
11
|
+
Every log read and write flows through a handle, never through id-addressed service methods: the handle is the single door the cross-process write lease guards. A read returns a caller-owned outer slice and the producer-established aliasing state of its event values. One handle type serves both accesses — a mutation on a `read` handle is a runtime `SessionReadOnlyError` rather than a typed split — and in-process single-writer ownership makes a second `open(id, 'write')` reject with `SessionAlreadyOwnedError` while an owner is active.
|
|
12
|
+
|
|
13
|
+
```ts type-equiv
|
|
14
|
+
/** One persistence event slice returned by {@link SessionHandle.read}. */
|
|
15
|
+
interface SessionHandleReadResult {
|
|
16
|
+
/**
|
|
17
|
+
* Whether event values are exclusively owned or shared only after deep
|
|
18
|
+
* freezing. Slicing preserves the producer's state even when no events remain.
|
|
19
|
+
*/
|
|
20
|
+
readonly eventState: SessionSeedEventState
|
|
21
|
+
/** Event values in a caller-owned outer array. */
|
|
22
|
+
readonly events: readonly SessionEvent[]
|
|
23
|
+
}
|
|
24
|
+
```
|
|
12
25
|
|
|
13
26
|
```ts type-equiv
|
|
14
27
|
/**
|
|
@@ -47,9 +60,9 @@ interface SessionHandle extends AsyncDisposable {
|
|
|
47
60
|
* @param length - maximum number of events to return; defaults to the rest
|
|
48
61
|
* of the log. An offset at or past the end returns an empty list.
|
|
49
62
|
* @param options - optional cancellation.
|
|
50
|
-
* @returns the
|
|
63
|
+
* @returns the caller-owned outer slice plus the ownership state of its event values.
|
|
51
64
|
*/
|
|
52
|
-
read(offset?: number, length?: number, options?: SessionHandleReadOptions): Promise<
|
|
65
|
+
read(offset?: number, length?: number, options?: SessionHandleReadOptions): Promise<SessionHandleReadResult>
|
|
53
66
|
|
|
54
67
|
/**
|
|
55
68
|
* Append a contiguous batch continuing the current logical end. The first
|
|
@@ -90,7 +103,7 @@ A created session is observable in this process from the moment `create` resolve
|
|
|
90
103
|
|
|
91
104
|
## The flush checkpoint
|
|
92
105
|
|
|
93
|
-
`session/event` is a *synchronous* notification; the mounted backend routes it by session id into the active write handle's bounded write-behind window without blocking the producer (the backend installs these listeners once, because persistence already enforces one active write handle per id). The first pending event starts a fixed internal batching window, and later events join without resetting its deadline. Expiry starts one durable `append` through the session's write handle; events admitted during that write receive their own deadline and form a follow-up batch. `session/flush` cancels the wait and drains through quiescence, so the loop still uses it as the ordering and error-observation checkpoint before claiming the next ordinary turn. A rejected background write retains its events in order, pauses the automatic path, and is reported through the logger; the next explicit flush retries and rejects loudly to its caller. `session/disposed` performs the same final drain and closes the handle, and `close()` itself drains the routed buffer through the still-open storage, so backend teardown's close sweep loses nothing. The window bounds only intentional batching wait, not event-loop scheduling or backend durability latency
|
|
106
|
+
`session/event` is a *synchronous* notification; the mounted backend routes it by session id into the active write handle's bounded write-behind window without blocking the producer (the backend installs these listeners once, because persistence already enforces one active write handle per id). The first pending event starts a fixed internal batching window, and later events join without resetting its deadline. Expiry starts one durable `append` through the session's write handle; events admitted during that write receive their own deadline and form a follow-up batch. `session/flush` cancels the wait and drains through quiescence, so the loop still uses it as the ordering and error-observation checkpoint before claiming the next ordinary turn. A rejected background write retains its events in order, pauses the automatic path, and is reported through the logger; the next explicit flush retries and rejects loudly to its caller. `session/disposed` performs the same final drain and closes the handle, and `close()` itself drains the routed buffer through the still-open storage, so backend teardown's close sweep loses nothing. The window bounds only intentional batching wait, not event-loop scheduling or backend durability latency.
|
|
94
107
|
|
|
95
108
|
## Crash recovery preserves an interrupted turn
|
|
96
109
|
|
|
@@ -98,7 +111,7 @@ A log crashed mid-turn ends with an open `turn/start` and no `turn/end`. Persist
|
|
|
98
111
|
|
|
99
112
|
Repair therefore writes only under write ownership: a live session's write handle is held by its lifecycle owner, so a concurrent `open(id, 'write')` rejects with `SessionAlreadyOwnedError` instead of racing repair against a live turn. Read-only observers (session-query) balance an interrupted cold log with the same closers in memory only, writing nothing back.
|
|
100
113
|
|
|
101
|
-
Read-only observation is `open(id, 'read')`: the handle serves validated contiguous prefix slices, never a torn tail, and repeated reads on one handle never observe an older state than a prior read. There is no persistence-side prepared-Session cache: session-query owns its cold-read cache, keying one balanced cold Session per id on the `stat().revision` change token and re-reading only when the token changes. The [handle-based persistence Agent Note](../../.agents/notes/implemented/architecture/2026-08-27-handle-based-session-persistence.md) owns this lifecycle; the [Session preparation
|
|
114
|
+
Read-only observation is `open(id, 'read')`: the handle serves validated contiguous prefix slices, never a torn tail, and repeated reads on one handle never observe an older state than a prior read. There is no persistence-side prepared-Session cache: session-query owns its cold-read cache, keying one balanced cold Session per id on the `stat().revision` change token and re-reading only when the token changes. The [handle-based persistence Agent Note](../../.agents/notes/implemented/architecture/2026-08-27-handle-based-session-persistence.md) owns this lifecycle; the archived [Session preparation record](../../.agents/notes/archived/architecture/2026-08-05-session-preparation.md) documents the original publication-boundary `SessionPreparation` decision.
|
|
102
115
|
|
|
103
116
|
## `SessionLocation` — refusal-diagnostics artifact target
|
|
104
117
|
|
|
@@ -173,7 +186,7 @@ interface SessionHeader {
|
|
|
173
186
|
|
|
174
187
|
## Format refusal — logs a build cannot faithfully read
|
|
175
188
|
|
|
176
|
-
A backend refuses a log it cannot faithfully interpret with `SessionFormatUnsupportedError`, distinct from `SessionPersistenceCorruptionError` because nothing is damaged. `stat` and `list` classify the highest canonical generation and translate a supported historical header without reading or mutating its body. `open`
|
|
189
|
+
A backend refuses a log it cannot faithfully interpret with `SessionFormatUnsupportedError`, distinct from `SessionPersistenceCorruptionError` because nothing is damaged. `stat` and `list` classify the highest canonical generation and translate a supported historical header without reading or mutating its body. Historical `open` calls share one per-session migration preparation before returning current logical values and leave every source path, byte, and inode unchanged. The JSONL provider returns a read handle from that in-memory result without publishing; a write open holds its single-writer claim and file lease while it reuses the preparation, exclusively publishes the final current generation, and only then returns the writable handle. A future highest generation refuses even when an older readable generation remains. Current-format restoration retains installed extensions and unknown events carrying `ignorable: true`; historical v0/v1/v2 migration refuses an unknown type even when marked ignorable. The message appends the selected raw log path when the backend keeps one artifact per session. An out-of-tree backend must enforce equivalent current-only handle values and direction-aware refusals at its physical-format entry. The [released-format migration decision](../../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.md) owns the chain and immutable-publication rules.
|
|
177
190
|
|
|
178
191
|
## `CreateSessionOptions` — seeding and metadata
|
|
179
192
|
|
|
@@ -189,7 +202,7 @@ interface CreateSessionOptions {
|
|
|
189
202
|
/** Initial replay or fork history supplied at construction. */
|
|
190
203
|
readonly seed?: readonly SessionEvent[]
|
|
191
204
|
/**
|
|
192
|
-
* Exact fork-inherited prefix length when `meta.isSeeded` is true.
|
|
205
|
+
* Exact fork-inherited prefix length when `meta.isSeeded` is true. The
|
|
193
206
|
* constructor seed is exactly this inherited prefix; the constructor
|
|
194
207
|
* appends the child-owned tagged marker at the cut.
|
|
195
208
|
*/
|
|
@@ -214,29 +227,37 @@ Replay/fork is therefore `ctx.agents.create({ sessionId, seed, meta })` — a fo
|
|
|
214
227
|
|
|
215
228
|
## Preparation and restoration ownership
|
|
216
229
|
|
|
217
|
-
`SessionStore.prepare()` accepts ordinary creation options or
|
|
230
|
+
`SessionStore.prepare()` accepts ordinary creation options or an adoptable seed through `RestoredSessionOptions`. Its `eventState` says whether event values are independently owned or shared only after deep freezing; the producer establishes that state, and slicing does not infer a different state from result length. Restoration validates and adopts those values without another copy or freeze pass. `SessionPreparation` then owns the exact unpublished Session until publication or rollback; disposal is synchronous and idempotent. agent-loop's resume reads this result through the session's write handle and appends independently owned `interruptedTurnClosers` before preparation.
|
|
231
|
+
|
|
232
|
+
```ts type-equiv
|
|
233
|
+
/**
|
|
234
|
+
* Aliasing state of an adoptable Session seed. `shared-frozen` permits deeply
|
|
235
|
+
* frozen aliases plus independently owned unfrozen values in the same seed.
|
|
236
|
+
*/
|
|
237
|
+
type SessionSeedEventState = 'detached' | 'shared-frozen'
|
|
238
|
+
```
|
|
218
239
|
|
|
219
240
|
```ts type-equiv
|
|
220
241
|
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
242
|
+
* Adoptable storage values transferred to {@link SessionStore.prepare}
|
|
243
|
+
* without another copy or freeze pass.
|
|
223
244
|
*/
|
|
224
245
|
interface RestoredSessionOptions {
|
|
225
|
-
/**
|
|
246
|
+
/** Events that are independently owned or already deeply frozen. */
|
|
226
247
|
readonly seed: SessionEvent[]
|
|
227
|
-
/**
|
|
248
|
+
/** Independently owned storage metadata to validate and freeze in place. */
|
|
228
249
|
readonly meta: SessionHeader
|
|
229
250
|
/** Exact number of fork-inherited leading events decoded from storage. */
|
|
230
251
|
readonly inheritedEventCount: SessionLogOffset
|
|
231
|
-
/**
|
|
232
|
-
readonly
|
|
252
|
+
/** Aliasing state carried from the operation that produced the seed. */
|
|
253
|
+
readonly eventState: SessionSeedEventState
|
|
233
254
|
}
|
|
234
255
|
```
|
|
235
256
|
|
|
236
257
|
```ts type-equiv
|
|
237
258
|
/** Inputs accepted while constructing an unpublished Session. */
|
|
238
259
|
type PrepareSessionOptions =
|
|
239
|
-
| (CreateSessionOptions & { readonly
|
|
260
|
+
| (CreateSessionOptions & { readonly eventState?: undefined })
|
|
240
261
|
| RestoredSessionOptions
|
|
241
262
|
```
|
|
242
263
|
|
|
@@ -8,7 +8,20 @@
|
|
|
8
8
|
|
|
9
9
|
## `SessionHandle`——通向已存储会话的一条打开通道
|
|
10
10
|
|
|
11
|
-
每一次日志读写都经由句柄流动,绝不经由按 id
|
|
11
|
+
每一次日志读写都经由句柄流动,绝不经由按 id 寻址的服务方法:句柄是跨进程写租约把守的唯一入口。读取会返回调用方独占的外层 slice,以及由生产者建立的 event value 别名状态。一种句柄类型同时服务两种访问——在 `read` 句柄上执行修改是运行时的 `SessionReadOnlyError`,而非类型层面的拆分——而进程内单写者所有权使得在已有活跃持有者时第二次 `open(id, 'write')` 以 `SessionAlreadyOwnedError` 拒绝。
|
|
12
|
+
|
|
13
|
+
```ts type-equiv
|
|
14
|
+
/** One persistence event slice returned by {@link SessionHandle.read}. */
|
|
15
|
+
interface SessionHandleReadResult {
|
|
16
|
+
/**
|
|
17
|
+
* Whether event values are exclusively owned or shared only after deep
|
|
18
|
+
* freezing. Slicing preserves the producer's state even when no events remain.
|
|
19
|
+
*/
|
|
20
|
+
readonly eventState: SessionSeedEventState
|
|
21
|
+
/** Event values in a caller-owned outer array. */
|
|
22
|
+
readonly events: readonly SessionEvent[]
|
|
23
|
+
}
|
|
24
|
+
```
|
|
12
25
|
|
|
13
26
|
```ts type-equiv
|
|
14
27
|
/**
|
|
@@ -47,9 +60,9 @@ interface SessionHandle extends AsyncDisposable {
|
|
|
47
60
|
* @param length - maximum number of events to return; defaults to the rest
|
|
48
61
|
* of the log. An offset at or past the end returns an empty list.
|
|
49
62
|
* @param options - optional cancellation.
|
|
50
|
-
* @returns the
|
|
63
|
+
* @returns the caller-owned outer slice plus the ownership state of its event values.
|
|
51
64
|
*/
|
|
52
|
-
read(offset?: number, length?: number, options?: SessionHandleReadOptions): Promise<
|
|
65
|
+
read(offset?: number, length?: number, options?: SessionHandleReadOptions): Promise<SessionHandleReadResult>
|
|
53
66
|
|
|
54
67
|
/**
|
|
55
68
|
* Append a contiguous batch continuing the current logical end. The first
|
|
@@ -90,7 +103,7 @@ interface SessionHandle extends AsyncDisposable {
|
|
|
90
103
|
|
|
91
104
|
## flush 检查点
|
|
92
105
|
|
|
93
|
-
`session/event` 是一个*同步*通知;挂载的后端按会话 id 把它路由进活跃写句柄的有界 write-behind 窗口,而不阻塞生产方(后端一次性安装这些监听器,因为持久化已保证每个 id 只有一个活跃写句柄)。第一个待处理事件会开启固定的内部批处理窗口,后续事件会加入但不会重置其截止时间。窗口到期后会通过该会话的写句柄启动一次持久化 `append`;该次写入期间接纳的事件会获得自己的截止时间,并形成后续批次。`session/flush` 会取消等待并排空至完全停稳,因此循环仍将其用作在领取下一个普通轮次之前的顺序与错误观察检查点。后台写入被拒绝时会按序保留对应事件、暂停自动路径,并通过 logger 报告;下一次显式 flush 会重试,并向其调用方响亮地拒绝。`session/disposed` 会执行同样的最终排空并关闭句柄,而 `close()` 本身会经由仍然打开的存储排空已路由的缓冲,因此后端 teardown
|
|
106
|
+
`session/event` 是一个*同步*通知;挂载的后端按会话 id 把它路由进活跃写句柄的有界 write-behind 窗口,而不阻塞生产方(后端一次性安装这些监听器,因为持久化已保证每个 id 只有一个活跃写句柄)。第一个待处理事件会开启固定的内部批处理窗口,后续事件会加入但不会重置其截止时间。窗口到期后会通过该会话的写句柄启动一次持久化 `append`;该次写入期间接纳的事件会获得自己的截止时间,并形成后续批次。`session/flush` 会取消等待并排空至完全停稳,因此循环仍将其用作在领取下一个普通轮次之前的顺序与错误观察检查点。后台写入被拒绝时会按序保留对应事件、暂停自动路径,并通过 logger 报告;下一次显式 flush 会重试,并向其调用方响亮地拒绝。`session/disposed` 会执行同样的最终排空并关闭句柄,而 `close()` 本身会经由仍然打开的存储排空已路由的缓冲,因此后端 teardown 的关闭清扫不丢任何数据。该窗口只限制有意的批处理等待,不限制事件循环调度或后端完成持久化的延迟。
|
|
94
107
|
|
|
95
108
|
## 崩溃恢复保留被中断的轮次
|
|
96
109
|
|
|
@@ -98,7 +111,7 @@ interface SessionHandle extends AsyncDisposable {
|
|
|
98
111
|
|
|
99
112
|
因此修复只在写所有权之下写入:活跃会话的写句柄由其生命周期所有者持有,故并发的 `open(id, 'write')` 会以 `SessionAlreadyOwnedError` 拒绝,而不是让修复与活跃轮次竞速。只读观察方(session-query)仅在内存中用同样的闭合事件配平被中断的冷日志,不回写任何内容。
|
|
100
113
|
|
|
101
|
-
只读观察即 `open(id, 'read')`:句柄提供经过验证的连续前缀切片,绝不返回撕裂尾部,且同一句柄上的重复读取绝不会观察到比先前读取更旧的状态。持久化侧不存在已准备 Session 缓存:session-query 拥有自己的冷读缓存,按 `stat().revision` 变更令牌为每个 id 缓存一个已配平的冷 Session,仅在令牌变化时重新读取。该生命周期由[基于句柄的持久化 Agent Note](../../.agents/notes/implemented/architecture/2026-08-27-handle-based-session-persistence.zh.md)
|
|
114
|
+
只读观察即 `open(id, 'read')`:句柄提供经过验证的连续前缀切片,绝不返回撕裂尾部,且同一句柄上的重复读取绝不会观察到比先前读取更旧的状态。持久化侧不存在已准备 Session 缓存:session-query 拥有自己的冷读缓存,按 `stat().revision` 变更令牌为每个 id 缓存一个已配平的冷 Session,仅在令牌变化时重新读取。该生命周期由[基于句柄的持久化 Agent Note](../../.agents/notes/implemented/architecture/2026-08-27-handle-based-session-persistence.zh.md)定义;已归档的 [Session 准备阶段记录](../../.agents/notes/archived/architecture/2026-08-05-session-preparation.md)记载了发布边界 `SessionPreparation` 最初的决策。
|
|
102
115
|
|
|
103
116
|
## `SessionLocation`——拒绝诊断的产物目标
|
|
104
117
|
|
|
@@ -173,7 +186,7 @@ interface SessionHeader {
|
|
|
173
186
|
|
|
174
187
|
## 格式拒绝:本构建无法可靠读取的日志
|
|
175
188
|
|
|
176
|
-
后端用 `SessionFormatUnsupportedError` 拒绝无法可靠解读的日志,它与 `SessionPersistenceCorruptionError` 区分,因为数据没有损坏。`stat` 与 `list` 会对最高规范 generation 分类,并在不读取或改变正文的前提下转换受支持的历史 header
|
|
189
|
+
后端用 `SessionFormatUnsupportedError` 拒绝无法可靠解读的日志,它与 `SessionPersistenceCorruptionError` 区分,因为数据没有损坏。`stat` 与 `list` 会对最高规范 generation 分类,并在不读取或改变正文的前提下转换受支持的历史 header。历史 `open` 会共享每个 Session 唯一的一次 migration preparation,再返回当前逻辑值,并保持每个源路径、字节与 inode 不变。JSONL provider 直接从该内存结果返回读句柄而不发布;写 open 则在持有单写者 claim 与文件 lease 时复用 preparation、排他发布最终 current generation,随后才返回可写句柄。即使仍有较旧的可读 generation,最高的未来 generation 仍会导致拒绝。当前格式恢复会保留已安装扩展和带 `ignorable: true` 的未知事件;历史 v0/v1/v2 迁移则会拒绝未知类型,即使它带有 ignorable 标记。后端为每个会话保留独立文件时,消息附上选定的原始日志路径。仓库外后端必须在自己的物理格式入口提供等价的仅当前句柄值与方向感知拒绝。[已发布格式迁移决策](../../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.zh.md)负责迁移链与不可变发布规则。
|
|
177
190
|
|
|
178
191
|
## `CreateSessionOptions`:seed 与元数据
|
|
179
192
|
|
|
@@ -189,7 +202,7 @@ interface CreateSessionOptions {
|
|
|
189
202
|
/** Initial replay or fork history supplied at construction. */
|
|
190
203
|
readonly seed?: readonly SessionEvent[]
|
|
191
204
|
/**
|
|
192
|
-
* Exact fork-inherited prefix length when `meta.isSeeded` is true.
|
|
205
|
+
* Exact fork-inherited prefix length when `meta.isSeeded` is true. The
|
|
193
206
|
* constructor seed is exactly this inherited prefix; the constructor
|
|
194
207
|
* appends the child-owned tagged marker at the cut.
|
|
195
208
|
*/
|
|
@@ -214,29 +227,37 @@ interface CreateSessionOptions {
|
|
|
214
227
|
|
|
215
228
|
## 准备与恢复所有权
|
|
216
229
|
|
|
217
|
-
`SessionStore.prepare()` 接收普通创建选项,或通过 `RestoredSessionOptions`
|
|
230
|
+
`SessionStore.prepare()` 接收普通创建选项,或通过 `RestoredSessionOptions` 接收可直接接管的 seed。它的 `eventState` 表明 event value 是独占对象,还是只有深度冻结后的共享对象;生产者负责建立该状态,slice 不会根据结果长度推断其他状态。恢复流程会校验并直接接管这些值,不再复制或冻结。`SessionPreparation` 随后持有该精确的未发布 Session,直至发布或回滚;dispose 是同步且幂等的。agent-loop 的 resume 通过该会话的写句柄读取这份结果,并在准备之前追加独占的 `interruptedTurnClosers`。
|
|
231
|
+
|
|
232
|
+
```ts type-equiv
|
|
233
|
+
/**
|
|
234
|
+
* Aliasing state of an adoptable Session seed. `shared-frozen` permits deeply
|
|
235
|
+
* frozen aliases plus independently owned unfrozen values in the same seed.
|
|
236
|
+
*/
|
|
237
|
+
type SessionSeedEventState = 'detached' | 'shared-frozen'
|
|
238
|
+
```
|
|
218
239
|
|
|
219
240
|
```ts type-equiv
|
|
220
241
|
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
242
|
+
* Adoptable storage values transferred to {@link SessionStore.prepare}
|
|
243
|
+
* without another copy or freeze pass.
|
|
223
244
|
*/
|
|
224
245
|
interface RestoredSessionOptions {
|
|
225
|
-
/**
|
|
246
|
+
/** Events that are independently owned or already deeply frozen. */
|
|
226
247
|
readonly seed: SessionEvent[]
|
|
227
|
-
/**
|
|
248
|
+
/** Independently owned storage metadata to validate and freeze in place. */
|
|
228
249
|
readonly meta: SessionHeader
|
|
229
250
|
/** Exact number of fork-inherited leading events decoded from storage. */
|
|
230
251
|
readonly inheritedEventCount: SessionLogOffset
|
|
231
|
-
/**
|
|
232
|
-
readonly
|
|
252
|
+
/** Aliasing state carried from the operation that produced the seed. */
|
|
253
|
+
readonly eventState: SessionSeedEventState
|
|
233
254
|
}
|
|
234
255
|
```
|
|
235
256
|
|
|
236
257
|
```ts type-equiv
|
|
237
258
|
/** Inputs accepted while constructing an unpublished Session. */
|
|
238
259
|
type PrepareSessionOptions =
|
|
239
|
-
| (CreateSessionOptions & { readonly
|
|
260
|
+
| (CreateSessionOptions & { readonly eventState?: undefined })
|
|
240
261
|
| RestoredSessionOptions
|
|
241
262
|
```
|
|
242
263
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](plan.md) | 中文
|
|
4
4
|
|
|
5
|
-
计划模式是 [dsh-plan-mode](../../packages/plan/plan-mode) 拥有的、记录到日志的逐 agent(智能体)协作状态(`ctx.planMode`,`PlanModeController`):激活期间,每个模型请求都会包含一段部署持有的指引。计划模式是**软性指引**。[沙箱模式](sandbox.zh.md)与[审批策略](approval.zh.md)分别强制限制;两者都不读写计划状态,因此部署需要分别配置它们。该包是可选项,agent loop(智能体循环)不依赖它。它贡献 `plan:policy` 提示词段落,并注册 `exit_plan_mode` 工具和 `/plan` 命令。[设计说明](../../.agents/notes/implemented/simplification/2026-07-22-plan-specific-collaboration-state.zh.md)负责决策依据;[包 README](../../packages/plan/plan-mode/README
|
|
5
|
+
计划模式是 [dsh-plan-mode](../../packages/plan/plan-mode) 拥有的、记录到日志的逐 agent(智能体)协作状态(`ctx.planMode`,`PlanModeController`):激活期间,每个模型请求都会包含一段部署持有的指引。计划模式是**软性指引**。[沙箱模式](sandbox.zh.md)与[审批策略](approval.zh.md)分别强制限制;两者都不读写计划状态,因此部署需要分别配置它们。该包是可选项,agent loop(智能体循环)不依赖它。它贡献 `plan:policy` 提示词段落,并注册 `exit_plan_mode` 工具和 `/plan` 命令。[设计说明](../../.agents/notes/implemented/simplification/2026-07-22-plan-specific-collaboration-state.zh.md)负责决策依据;[包 README](../../packages/plan/plan-mode/README.zh.md)负责模型体验与限制细节。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/plan/plan-mode/src/index.ts`](../../packages/plan/plan-mode/src/index.ts)
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
由于每个会话事件都位于轮次之内,用户选择会保持待生效状态,直到下一个被接受的轮内 pre-step 在派生请求之前追加该选择,无论该 pre-step 位于哪个轮次。选择不会强制续行,因此在某轮最后一个被接受的 pre-step 之后作出的选择会在之后的轮次追加。`set(agent, active)` 记录待生效选择(目标值与已记录或已在等待的状态相同时不做任何事),`get(agent)` 返回 `{ active: boolean; pending?: boolean }`:用于组装当前步骤的已记录状态,以及等待追加的已选状态。
|
|
16
16
|
|
|
17
|
-
agent 运行时,唯一的追加点是前置(prepend)注册的 `agent/pre-step` 监听器。它会观察每个候选请求步骤,包括第 1 轮第 1 步和请求恢复重试;它先调用下游监听器,只在下游接受该步骤后追加。提示词准入发生在轮次开启之前,无法追加 `plan/mode`,因此在提示词处作出的选择由它开启的轮次内第一个被接受的 pre-step 追加。追加失败不能阻塞轮次,且该选择会继续等待之后被接受的轮内 pre-step。追加用户选择时还会记录一条插件来源的 `user/message` 通知,但仅当最后记录的请求头描述的是另一种状态时才记录,因此模型恰好在上下文变化时收到通知,且绝不重复。在某轮最后一个被接受的 pre-step 之后作出的选择只存在于进程内;如果进程在另一个被接受的轮内 pre-step 之前退出,该选择会丢失([README 限制](../../packages/plan/plan-mode/README
|
|
17
|
+
agent 运行时,唯一的追加点是前置(prepend)注册的 `agent/pre-step` 监听器。它会观察每个候选请求步骤,包括第 1 轮第 1 步和请求恢复重试;它先调用下游监听器,只在下游接受该步骤后追加。提示词准入发生在轮次开启之前,无法追加 `plan/mode`,因此在提示词处作出的选择由它开启的轮次内第一个被接受的 pre-step 追加。追加失败不能阻塞轮次,且该选择会继续等待之后被接受的轮内 pre-step。追加用户选择时还会记录一条插件来源的 `user/message` 通知,但仅当最后记录的请求头描述的是另一种状态时才记录,因此模型恰好在上下文变化时收到通知,且绝不重复。在某轮最后一个被接受的 pre-step 之后作出的选择只存在于进程内;如果进程在另一个被接受的轮内 pre-step 之前退出,该选择会丢失([README 限制](../../packages/plan/plan-mode/README.zh.md#known-limitations-and-deferred-work))。
|
|
18
18
|
|
|
19
19
|
## 配置
|
|
20
20
|
|
|
@@ -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/ptc-runtime.md
|
|
5
|
+
ptc-runtime.md: efab5bcefa0aaec50c29c73f981f6a6b717cd087
|
|
6
|
+
ptc-runtime.zh.md: f35c5bd84d79ddaccc40653707d792f5672e73d9
|