dsh-plugin-guide 0.3.15 → 0.3.17
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 +43 -40
- package/README-hi.md +43 -40
- package/README-pt.md +43 -40
- package/README-zh.md +43 -40
- package/README.md +19 -15
- package/dist/dsh-plugin-dev.js +230 -6
- package/guide/plugin-dev-guide.md +1 -1
- package/guide/release-engineering.md +7 -5
- package/guide/release-engineering.zh-CN.md +7 -5
- package/guide/unfixed-issues.md +4 -2
- package/package.json +5 -4
- 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.md +8 -8
- package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +9 -9
- 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/templates/js/README-es.md +1 -1
- package/templates/js/README-hi.md +1 -1
- package/templates/js/README-pt.md +1 -1
- package/templates/js/README-zh.md +1 -1
- package/templates/js/README.md +1 -1
- package/templates/js/package.json +2 -2
- package/templates/ts/README-es.md +1 -1
- package/templates/ts/README-hi.md +1 -1
- package/templates/ts/README-pt.md +1 -1
- package/templates/ts/README-zh.md +1 -1
- package/templates/ts/README.md +1 -1
- package/templates/ts/package.json +2 -2
- 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,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/cookbook/adding-a-session-format-version.md
|
|
5
|
+
adding-a-session-format-version.md: 6ebc6bd2062acd88dab953bc227bc1046b13f083
|
|
6
|
+
adding-a-session-format-version.zh.md: c66a045303f96c2ef237cf3b1c1dc598e9c8f5f6
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Cookbook: adding a Session log format version
|
|
2
|
+
|
|
3
|
+
English | [中文](adding-a-session-format-version.zh.md)
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
Use this tutorial to introduce the next structural Session log version without rewriting released data. Read the [version and release-status authority](../session-format-status.md) to identify the checkout writer and the latest released format. Let N denote that verified released format and N+1 the target; substitute numeric values for these placeholders in names and metadata. Start with a working contributor checkout and read the [package checklist](adding-a-package.md), [format library](../../packages/session/session-format/README.md), and [released-format decision](../../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.md).
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [1. Choose the version and release base](#choose-the-version)
|
|
12
|
+
- [2. Add an identity edge](#add-an-identity-edge)
|
|
13
|
+
- [3. Implement per-artifact stages and validation](#stages-and-validation)
|
|
14
|
+
- [4. Update current-version consumers](#current-version-consumers)
|
|
15
|
+
- [5. Create snapshot successors](#snapshot-successors)
|
|
16
|
+
- [6. Validate the integrated result](#validate)
|
|
17
|
+
- [Dev Note](#dev-note)
|
|
18
|
+
|
|
19
|
+
<a id="choose-the-version"></a>
|
|
20
|
+
## 1. Choose the version and release base
|
|
21
|
+
|
|
22
|
+
Bump the format for a structural change to headers, event envelopes, core event semantics, or surface reconstruction. Ordinary event additions do not require a bump; follow the [versioning rule](../../.agents/notes/implemented/architecture/2026-08-10-session-log-version-mechanism.md). Distinguish the Session format integer from package release versions, SQLite schema versions, projection-unit versions, and protocol-wrapper versions.
|
|
23
|
+
|
|
24
|
+
Use a shared `release/*` integration base for N+1. The base change adds the writer, codec, catalog wiring, identity migration, and verification. Create each independent child branch from that base and target its PR at the release branch, not another independent child’s branch. Each child adds its structural transformation, validators, consumers, and tests to the same adjacent migration package. Do not allocate extra versions just to represent review order. Merge reviewed children into the release branch through PRs, then validate the combined result before release. Honor release-branch force-push and deletion protections; do not force-sync it.
|
|
25
|
+
|
|
26
|
+
Released codecs and migration semantics remain frozen. Do not amend a released edge to implement a new structural feature. Only the N→N+1 edge may incorporate coordinated changes before N+1 ships; after release, further structural changes need the next adjacent edge.
|
|
27
|
+
|
|
28
|
+
Use disposable, isolated Harness homes for unreleased N+1 integration testing. An interim N+1 file already has the target writer version, so a later edit to N→N+1 will not migrate that file again. Re-run from unchanged historical input in a fresh test home; never repair this by rewriting a committed generation or reusing a real user's home.
|
|
29
|
+
|
|
30
|
+
Before changing the writer, use the [archive command](../persistence-changes/historical-formats/README.md#maintenance) to preserve its complete persistence schema, then add the bilingual format reference under `docs/persistence-changes/historical-formats/vN.*`. Preserve all earlier records. The format coverage check requires every integer below the new writer to have its own document; the current generated catalog covers only the new writer.
|
|
31
|
+
|
|
32
|
+
<a id="add-an-identity-edge"></a>
|
|
33
|
+
## 2. Add an identity edge
|
|
34
|
+
|
|
35
|
+
Follow the package checklist to create a library for N→N+1, not a mounted plugin. An identity body conversion is only an initial wiring scaffold. The [V2-to-V3 specification](../../packages/session/session-format-v2-to-v3/README.md#v2-to-v3-specification) is a fixed example of explicit transformations and preservation rules, not an edge to extend or treat as an identity conversion.
|
|
36
|
+
|
|
37
|
+
Declare `dsh.sessionFormatMigration` with numeric `from: N` and `to: N+1`, an export path, and the exported migration, source codec, target codec, target-header validator, and target restorer. Reuse the source codec exported by the preceding edge package and depend on that package; do not copy or redefine a released codec. Export the target codec and validators from the new package. Add the edge as a direct dependency of the catalog and add the workspace’s TypeScript paths and project references.
|
|
38
|
+
|
|
39
|
+
Set `SESSION_FORMAT_VERSION` in [core Session types](../../packages/core/session/src/types.ts) to N+1 alongside the new edge declarations, then generate the catalog. The command below generates only the declared chain; it does not implement a new version:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
pnpm run gen-session-format-catalog
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The [generator](../../scripts/gen-session-format-catalog.ts) requires exactly one adjacent package for every step from zero to the writer version, matching directory/package names, matching adjacent codec exports, and declared dependencies. It rejects gaps, duplicate or extra edges, unknown metadata members, and a catalog that does not share Session through peer plus development dependencies. Fix the declarations rather than hand-editing `generated.ts`. The catalog is build-static; plugin mounting must not determine historical readability.
|
|
46
|
+
|
|
47
|
+
<a id="stages-and-validation"></a>
|
|
48
|
+
## 3. Implement per-artifact stages and validation
|
|
49
|
+
|
|
50
|
+
Use the [Stage interfaces](../../packages/session/session-format/src/types.ts), not a whole-artifact array-to-array migrator. An immutable `SessionFormatMigration` declaration supplies `migrateHeader`, `validateTargetHeader`, and `createStage`. Every call to `createStage` creates independent state for one source artifact. Keep counters, pending events, and reference maps there; never share a mutable stage across Sessions.
|
|
51
|
+
|
|
52
|
+
Implement `transformEvent(event, context)`, `transformRun(run, context)`, and `finish(context)`. Emit synchronously through `context.emitEvent` or `context.emitRun`; a call can produce zero, one, or many outputs. Let a stage consume codec-owned compact runs directly, or iterate `run.expand()` without materializing an intermediate array. The caller owns scheduling, and the chain finishes upstream stages before downstream stages.
|
|
53
|
+
|
|
54
|
+
Treat the inherited cut as a logical event count, not a physical row count. Expose `headerInheritedEventCount` only when it is known before EOF; `finish` returns the exact target cut. A preceding cardinality-changing edge can make that count unavailable at construction. Derive it from validated seed markers when required, and test seeded multi-hop restoration from each supported historical generation through N+1, not just direct N input. Never substitute zero for an unknown cut.
|
|
55
|
+
|
|
56
|
+
Define the new edge's event admission and transformation rules explicitly. The [V2-to-V3 source audit](../../packages/session/session-format-v2-to-v3/README.md#source-audit) and [alpha V0→V1 rule](../../.agents/notes/implemented/architecture/2026-08-31-alpha-historical-unknown-event-refusal.md) own the policies of those released edges, not the new edge. Do not generalize either to every edge. A change to structure or event positions requires classifying source events, payload members, and references, and explicitly deciding whether opaque data can remain valid. [Equal-version retention](../../.agents/notes/implemented/architecture/2026-08-30-retain-ignorable-external-session-events.md) alone does not prove a structural transformation safe. Validate target semantics and give each newly accepted case a rejecting counterexample; never widen older edges to hide an unsupported transformation.
|
|
57
|
+
|
|
58
|
+
Prove strict restoration through `sessionFormatCatalog.createRestore(header, { recovery: 'strict', validation: 'current' })`, feeding rows in order and calling `finish()`. This exercises physical decoding, the complete chain, and installed current Session validation. Production's recoverable/transformed policy is not a replacement for strict fixture and publication verification. Preserve documented historical validation exceptions rather than claiming stricter source validation than the edge actually performs.
|
|
59
|
+
|
|
60
|
+
<a id="current-version-consumers"></a>
|
|
61
|
+
## 4. Update current-version consumers
|
|
62
|
+
|
|
63
|
+
Trace each current-version consumer, including Session creation/restoration, JSONL filename selection and publication, the catalog's current encoder/restorer, projection-cache generation identity, replay and snapshot normalization, and TypeScript/Python SDK recordings. Use the writer constant where a value means current; keep literal historical versions in released codecs and historical fixtures. Update current documentation and generated references through their owners.
|
|
64
|
+
|
|
65
|
+
Do not bump unrelated versions automatically. A request wrapper's `sessionFormatVersion` identifies its embedded Session generation; its outer schema version has its own meaning. Projection-unit state versions likewise do not replace the cache's Session-generation identity.
|
|
66
|
+
|
|
67
|
+
Verify both read and write paths. Header-only listing must not read bodies or publish. Historical read open may return the migrated in-memory artifact without writing; write open must verify and publish only the final current successor before append. The source path, bytes, and inode stay unchanged. A newer or invalid selected generation must not cause fallback to a predecessor. The [preparation decision](../../.agents/notes/implemented/architecture/2026-09-05-read-only-session-migration-preparation.md) owns publication timing.
|
|
68
|
+
|
|
69
|
+
<a id="snapshot-successors"></a>
|
|
70
|
+
## 5. Create snapshot successors
|
|
71
|
+
|
|
72
|
+
Read [snapshot ownership](../../snapshots/AGENTS.md) and the [snapshot library](../../packages/test-support/session-snapshot/README.md). Select the owning scenario, not an adapter that only references it. After implementing N+1, keep each historical file and generate its successor using the target version’s canonical parent and child filenames. Never rename a predecessor to the target filename or change only its header.
|
|
73
|
+
|
|
74
|
+
For unchanged replay input, use keyless refresh on the owner, then replay without write-back. These SDK commands use `text-turn` and the checkout's writer version. Implement and wire N+1 before using them to generate that version, and select the actual affected owner for a feature:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
pnpm run test:snapshot:refresh snapshots/sdk/sdk.snapshot.ts -t text-turn
|
|
78
|
+
pnpm run test:snapshot snapshots/sdk/sdk.snapshot.ts -t text-turn
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Review the new generation, request sidecars, and protocol output together. Verify every predecessor remains byte-identical and that parent/child roles remain contiguous. Selection uses the numerically highest generation, so update shared references to the owner's selected parent. Do not use the packed-layout migrator as a version upgrader. If the model transcript must change, the scenario owner uses live recording under the [testing policy](../testing.md), with its required provider key.
|
|
82
|
+
|
|
83
|
+
Keep deliberate historical cases explicit through `snapshot.yml`'s `sessionFormat.version` and supported `coverage` names; record and refresh leave their Session fixtures untouched. Update the [corpus policy](../../scripts/session-snapshot-corpus-policy.ts) for the current generation while retaining focused direct-edge, multi-hop, packed-row, retry/failure, and shipped-profile coverage. Check the corpus and both SDK projections; do not mass-refresh unrelated scenarios merely to silence a validation failure.
|
|
84
|
+
|
|
85
|
+
<a id="validate"></a>
|
|
86
|
+
## 6. Validate the integrated result
|
|
87
|
+
|
|
88
|
+
Run from the repository root. These commands check catalog declarations, Stage composition, the released V2→V3 edge, and generation selection. They are a baseline; add focused coverage for the new edge:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
pnpm run verify-session-format-catalog
|
|
92
|
+
pnpm exec vitest run scripts/gen-session-format-catalog.spec.ts packages/session/session-format/tests packages/session/session-format-v2-to-v3/tests packages/session/session-format-catalog/tests
|
|
93
|
+
pnpm run test:snapshot scripts/session-snapshot-corpus.corpus.ts
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
After implementing the new edge, add its actual test path to the focused Vitest run. Add the changed JSONL, replay, projection, and SDK tests selected by the actual diff, plus the built publication-Worker smoke when that path changes. Require successful strict migration, identity preservation for the skeleton, malformed and unknown-required-event refusal, deterministic repeated restores, independent concurrent stage state, seeded multi-hop cuts, unchanged predecessors, and no fallback. Report exact commands and failures, not an inferred full-suite result.
|
|
97
|
+
|
|
98
|
+
Update the [owning Agent Note](../../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.md) rather than adding a redundant decision record. Keep the [release record](../session-format-status.md#updating-the-record) unchanged until publication; after publication, update it with verified release evidence. Audit related active notes for supersession; retain independent rationale and leave archived notes frozen. Update bilingual prose together, re-record each changed pair with the repository tool, then run documentation checks:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
pnpm run verify-translation-pairing --write docs/cookbook/adding-a-session-format-version.md
|
|
102
|
+
pnpm run test:docs
|
|
103
|
+
pnpm run doc-sync
|
|
104
|
+
pnpm run lint
|
|
105
|
+
git diff --check
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
<a id="dev-note"></a>
|
|
109
|
+
## Dev Note
|
|
110
|
+
|
|
111
|
+
None.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# 实操手册:添加 Session 日志格式版本
|
|
2
|
+
|
|
3
|
+
[English](adding-a-session-format-version.md) | 中文
|
|
4
|
+
|
|
5
|
+
## 概述
|
|
6
|
+
|
|
7
|
+
本教程介绍如何添加下一个结构性 Session 日志版本,同时不改写已发布数据。阅读[版本与发布状态真源](../session-format-status.zh.md),确定工作区写入器与最新已发布格式。令 N 表示经核实的已发布格式,N+1 表示目标版本;名称与元数据中的这些占位符须替换为数字。开始前,请准备可用的贡献者工作区,并阅读[包检查清单](adding-a-package.zh.md)、[格式库](../../packages/session/session-format/README.zh.md)和[已发布格式决策](../../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.zh.md)。
|
|
8
|
+
|
|
9
|
+
## 目录
|
|
10
|
+
|
|
11
|
+
- [1. 选择版本与发布基线](#choose-the-version)
|
|
12
|
+
- [2. 添加恒等迁移边](#add-an-identity-edge)
|
|
13
|
+
- [3. 实现每份产物独占的 Stage 与校验](#stages-and-validation)
|
|
14
|
+
- [4. 更新当前版本消费方](#current-version-consumers)
|
|
15
|
+
- [5. 创建快照后继代际](#snapshot-successors)
|
|
16
|
+
- [6. 验证集成结果](#validate)
|
|
17
|
+
- [开发备注](#dev-note)
|
|
18
|
+
|
|
19
|
+
<a id="choose-the-version"></a>
|
|
20
|
+
## 1. 选择版本与发布基线
|
|
21
|
+
|
|
22
|
+
当 header、事件信封、核心事件语义或表面重建发生结构性变更时,提升格式版本。普通事件新增不需要提升版本;遵循[版本规则](../../.agents/notes/implemented/architecture/2026-08-10-session-log-version-mechanism.zh.md)。区分 Session 格式整数与包发布版本、SQLite schema 版本、投影单元版本及协议包装层版本。
|
|
23
|
+
|
|
24
|
+
为 N+1 使用共享的 `release/*` 集成基线。基线变更添加写入器、codec、catalog 接线、恒等迁移与验证。从该基线创建各个独立子分支,并将其 PR(Pull Request)的目标设为发布分支,而非另一个独立子分支。每个子分支在同一个相邻迁移包内添加自身的结构变换、校验器、消费方和测试。不要只为表示评审顺序而分配额外版本。通过 PR 将评审后的子分支合入发布分支,并在发布前验证组合结果。遵守发布分支的强制推送与删除保护;不要强制同步该分支。
|
|
25
|
+
|
|
26
|
+
已发布 codec 和迁移语义保持冻结。不要通过修改已发布迁移边来实现新的结构性功能。只有 N→N+1 迁移边可在 N+1 发布前纳入协同变更;发布后,进一步的结构性变更需要下一条相邻迁移边。
|
|
27
|
+
|
|
28
|
+
未发布 N+1 的集成测试应使用可丢弃、相互隔离的 Harness home。中间版本产生的 N+1 文件已标为目标写入器版本,因此后续对 N→N+1 的修改不会再次迁移该文件。请在全新测试 home 中从未变更的历史输入重新运行;绝不通过改写已提交代际或复用真实用户 home 来修复这个问题。
|
|
29
|
+
|
|
30
|
+
变更写入器之前,使用[归档命令](../persistence-changes/historical-formats/README.zh.md#maintenance)保留其完整持久化 schema,再在 `docs/persistence-changes/historical-formats/vN.*` 下添加双语格式参考。保留所有更早的记录。格式覆盖检查要求低于新写入器的每个整数版本都有独立文档;当前生成的目录只覆盖新写入器。
|
|
31
|
+
|
|
32
|
+
<a id="add-an-identity-edge"></a>
|
|
33
|
+
## 2. 添加恒等迁移边
|
|
34
|
+
|
|
35
|
+
按照包检查清单为 N→N+1 创建库,而非挂载插件。恒等正文转换仅是最初的接线骨架。[V2 到 V3 规范](../../packages/session/session-format-v2-to-v3/README.zh.md#v2-to-v3-specification)是明确转换与保留规则的固定示例,而不是可继续扩展或视为恒等转换的迁移边。
|
|
36
|
+
|
|
37
|
+
在 manifest(元数据清单)中声明 `dsh.sessionFormatMigration`,包含数值 `from: N` 和 `to: N+1`、导出路径,以及导出的迁移、源 codec、目标 codec、目标 header 校验器和目标恢复器。复用前一条迁移边所属包导出的源 codec,并依赖该包;不要复制或重新定义已发布 codec。从新包导出目标 codec 和校验器。将迁移边加入 catalog 的直接依赖,并添加工作区的 TypeScript 路径与项目引用。
|
|
38
|
+
|
|
39
|
+
在添加新迁移边声明的同时,将[核心 Session 类型](../../packages/core/session/src/types.ts)中的 `SESSION_FORMAT_VERSION` 设为 N+1,然后生成 catalog。下面的命令只生成已声明的迁移链;它不会实现新版本:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
pnpm run gen-session-format-catalog
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[生成器](../../scripts/gen-session-format-catalog.ts)要求从零到写入器版本的每一步恰好有一个相邻迁移包,目录与包名匹配、相邻 codec 导出匹配,并声明所需依赖。它拒绝缺口、重复或多余的迁移边、未知元数据成员,以及未通过对等依赖(peer dependency)加开发依赖共享 Session 的 catalog。请修复声明,而非手改 `generated.ts`。Catalog 在构建时静态确定;插件挂载不得决定历史数据是否可读。
|
|
46
|
+
|
|
47
|
+
<a id="stages-and-validation"></a>
|
|
48
|
+
## 3. 实现每份产物独占的 Stage 与校验
|
|
49
|
+
|
|
50
|
+
使用 [Stage 接口](../../packages/session/session-format/src/types.ts),不要使用整份产物的数组到数组迁移器。不可变的 `SessionFormatMigration` 声明提供 `migrateHeader`、`validateTargetHeader` 和 `createStage`。每次调用 `createStage` 都为一份源产物创建独立状态。计数器、待处理事件和引用映射归该状态所有;不同 Session 之间绝不共享可变 Stage。
|
|
51
|
+
|
|
52
|
+
实现 `transformEvent(event, context)`、`transformRun(run, context)` 和 `finish(context)`。通过 `context.emitEvent` 或 `context.emitRun` 同步输出;一次调用可以产生零个、一个或多个输出。让 Stage 直接消费 codec 所有的紧凑 run,或者迭代 `run.expand()`,而不物化中间数组。调用方负责调度,迁移链先结束上游 Stage,再结束下游 Stage。
|
|
53
|
+
|
|
54
|
+
继承截点是逻辑事件数量,不是物理行数。只有在 EOF 前已知时才公开 `headerInheritedEventCount`;`finish` 返回精确的目标截点。前一条改变事件数量的迁移边可能使该数量在构造时不可知。必要时从已校验的种子标记推导它,并测试从每个受支持历史代际到 N+1 的有种子多跳恢复,而非仅测试直接 N 输入。绝不以零替代未知截点。
|
|
55
|
+
|
|
56
|
+
显式定义新迁移边的事件准入与变换规则。[V2 到 V3 源审计](../../packages/session/session-format-v2-to-v3/README.zh.md#source-audit)和 [Alpha V0→V1 规则](../../.agents/notes/implemented/architecture/2026-08-31-alpha-historical-unknown-event-refusal.zh.md)分别负责对应已发布迁移边的策略,而非新迁移边的策略。不要将任一策略推广到所有迁移边。结构或事件位置变化时,必须分类源事件、载荷成员与引用,并显式判断不透明数据能否保持有效。[同版本保留](../../.agents/notes/implemented/architecture/2026-08-30-retain-ignorable-external-session-events.zh.md)本身不能证明结构变换安全。校验目标语义,并为每个新增可接受案例提供一个被拒绝的反例;绝不放宽旧迁移边来掩盖不受支持的转换。
|
|
57
|
+
|
|
58
|
+
通过 `sessionFormatCatalog.createRestore(header, { recovery: 'strict', validation: 'current' })` 验证严格恢复,按顺序传入各行并调用 `finish()`。这会执行物理解码、完整迁移链与已安装当前 Session 校验。生产环境的 recoverable/transformed 策略不能替代 fixture(测试前置数据)和发布验证所需的严格校验。保留已记录的历史校验例外,不要宣称源校验比迁移边实际执行的更严格。
|
|
59
|
+
|
|
60
|
+
<a id="current-version-consumers"></a>
|
|
61
|
+
## 4. 更新当前版本消费方
|
|
62
|
+
|
|
63
|
+
追踪每个当前版本消费方,包括 Session 创建与恢复、JSONL 文件名选择与发布、catalog 的当前编码器与恢复器、投影缓存的代际身份、回放与快照归一化,以及 TypeScript/Python SDK 录制。当值表示当前版本时使用写入器常量;在已发布 codec 和历史 fixture 中保留字面历史版本。通过各自所有者更新当前文档与生成参考。
|
|
64
|
+
|
|
65
|
+
不要自动提升无关版本。请求包装层的 `sessionFormatVersion` 标识嵌入的 Session 代际;外层 schema 版本有自己的含义。投影单元状态版本同样不能替代缓存的 Session 代际身份。
|
|
66
|
+
|
|
67
|
+
验证读取与写入两条路径。仅 header 的列表操作不得读取正文或发布。历史读取打开可以直接返回迁移后的内存产物而不写入;写入打开必须先校验并发布唯一的最终当前后继代际,再允许追加。源路径、字节与 inode 保持不变。所选代际高于当前版本或无效时,不得回退到前代。[准备阶段决策](../../.agents/notes/implemented/architecture/2026-09-05-read-only-session-migration-preparation.zh.md)负责发布时序。
|
|
68
|
+
|
|
69
|
+
<a id="snapshot-successors"></a>
|
|
70
|
+
## 5. 创建快照后继代际
|
|
71
|
+
|
|
72
|
+
阅读[快照所有权](../../snapshots/AGENTS.md)和[快照库](../../packages/test-support/session-snapshot/README.zh.md)。选择拥有数据的场景,而非仅引用它的适配器。实现 N+1 后,保留每份历史文件,并按目标版本的规范父子文件名生成后继文件。绝不将前代重命名为目标文件名,或仅修改其 header。
|
|
73
|
+
|
|
74
|
+
如果回放输入不变,在所有者上执行无密钥 refresh,再执行不写回的 replay。以下 SDK 命令使用 `text-turn` 和工作区的写入器版本。先实现并接入 N+1,才能用它们生成该版本;功能变更应选择实际受影响的所有者:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
pnpm run test:snapshot:refresh snapshots/sdk/sdk.snapshot.ts -t text-turn
|
|
78
|
+
pnpm run test:snapshot snapshots/sdk/sdk.snapshot.ts -t text-turn
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
一起审查新代际、请求伴随文件与协议输出。验证每个前代的字节保持相同,且父子角色连续。选择规则采用数值最高的代际,因此应将共享引用更新为所有者选中的父代际。不要把 packed 布局迁移器当作版本升级器。如果模型 transcript(文本记录)必须变化,由场景所有者按照[测试策略](../testing.zh.md)使用所需提供方密钥进行实时录制。
|
|
82
|
+
|
|
83
|
+
通过 `snapshot.yml` 的 `sessionFormat.version` 与受支持的 `coverage` 名称显式保留历史案例;record 和 refresh 不改动这些 Session fixture。更新[语料策略](../../scripts/session-snapshot-corpus-policy.ts)以采用当前代际,同时保留聚焦的直接迁移边、多跳、packed row、重试/失败及交付 profile 覆盖。检查语料和两个 SDK 投影;不要仅为消除校验失败而批量 refresh 无关场景。
|
|
84
|
+
|
|
85
|
+
<a id="validate"></a>
|
|
86
|
+
## 6. 验证集成结果
|
|
87
|
+
|
|
88
|
+
从仓库根目录运行。以下命令检查 catalog 声明、Stage 组合、已发布的 V2→V3 迁移边与代际选择。它们是基线检查;需为新迁移边添加聚焦覆盖:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
pnpm run verify-session-format-catalog
|
|
92
|
+
pnpm exec vitest run scripts/gen-session-format-catalog.spec.ts packages/session/session-format/tests packages/session/session-format-v2-to-v3/tests packages/session/session-format-catalog/tests
|
|
93
|
+
pnpm run test:snapshot scripts/session-snapshot-corpus.corpus.ts
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
实现新迁移边后,将其实际测试路径加入聚焦的 Vitest 命令。根据实际 diff 添加受影响的 JSONL、回放、投影与 SDK 测试;发布 Worker 路径变化时还需构建产物冒烟测试。要求严格迁移成功、骨架保持恒等、拒绝格式错误与未知必需事件、重复恢复确定、并发 Stage 状态独立、有种子的多跳截点正确、前代不变且无回退。报告确切命令与失败,不要推断整个测试套件的结果。
|
|
97
|
+
|
|
98
|
+
更新[所属 Agent Note](../../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.zh.md),而非添加重复决策记录。发布前保持[发布记录](../session-format-status.zh.md#updating-the-record)不变;发布后,使用已核实的发布证据更新它。审计相关活跃记录的取代关系;保留独立理由,并保持归档记录冻结。一起更新双语正文,通过仓库工具重新记录每个变更的配对,然后运行文档检查:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
pnpm run verify-translation-pairing --write docs/cookbook/adding-a-session-format-version.md
|
|
102
|
+
pnpm run test:docs
|
|
103
|
+
pnpm run doc-sync
|
|
104
|
+
pnpm run lint
|
|
105
|
+
git diff --check
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
<a id="dev-note"></a>
|
|
109
|
+
## 开发备注
|
|
110
|
+
|
|
111
|
+
无。
|
|
@@ -47,22 +47,22 @@ export function apply(ctx: Context, config: Config) {
|
|
|
47
47
|
|
|
48
48
|
## 2. Register the card (browser half)
|
|
49
49
|
|
|
50
|
-
The card registers into `
|
|
50
|
+
The card registers into the `plugins.item` list slot under its namespace and owns everything inside it — chrome, controls, and copy. The list slot takes `id`, `order`, and `label`, and hands the component a `props` object with `view: 'summary' | 'page'` (render the compact summary on the Plugins page and the full form on its own page). It reads and writes through `ctx.settingsScope`, which fences each write with the revision it read:
|
|
51
51
|
|
|
52
52
|
```ts ignore-check
|
|
53
53
|
import type { Context as ClientContext } from '@deepseek-ai/cordis'
|
|
54
|
-
// Type-only: the
|
|
54
|
+
// Type-only: the list slot's declaration. Cross-plugin collaboration goes
|
|
55
55
|
// through cordis services; a value import fails the client bundle-purity gate.
|
|
56
|
-
import type {} from '@deepseek-ai/dsh-client-ui-
|
|
56
|
+
import type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'
|
|
57
57
|
|
|
58
58
|
export const inject = ['slots', 'locale', 'connection', 'remote', 'settingsScope']
|
|
59
59
|
|
|
60
60
|
export function apply(ctx: ClientContext): void {
|
|
61
61
|
const card = new MyPluginCardController(ctx.settingsScope.bind({ namespace: 'my-plugin' }))
|
|
62
|
-
ctx.slots.inject('
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
ctx.slots.inject('plugins.item', () => ctx.slots.register({
|
|
63
|
+
id: 'my-plugin',
|
|
64
|
+
order: 100,
|
|
65
|
+
label: 'settings.myPlugin',
|
|
66
66
|
inject: () => card.inject(),
|
|
67
67
|
}, MyPluginCard),
|
|
68
68
|
)
|
|
@@ -75,7 +75,7 @@ The scope snapshot carries what a form needs: the resolved `value`, the composit
|
|
|
75
75
|
|
|
76
76
|
The **Plugin configuration** tab reads which namespaces the Host serves and dispatches one slot key per namespace. A card is rendered when the Host serves its key and skipped when it does not, so a deployment that never composed the Host half shows no trace of the card. A served namespace no card claims renders nothing — that is how the namespaces owned by other pages (`ui-theme`, `permission`, `llm-*`) stay off this tab.
|
|
77
77
|
|
|
78
|
-
Cards appear
|
|
78
|
+
Cards appear sorted by the `order` each entry declares in the `plugins.item` list slot.
|
|
79
79
|
|
|
80
80
|
## Packaging
|
|
81
81
|
|
|
@@ -47,22 +47,22 @@ export function apply(ctx: Context, config: Config) {
|
|
|
47
47
|
|
|
48
48
|
## 2. 注册卡片(浏览器半侧)
|
|
49
49
|
|
|
50
|
-
卡片以自己的命名空间为键注册进 `
|
|
50
|
+
卡片以自己的命名空间为键注册进 `plugins.item` 列表槽,并拥有其中的一切——外观、控件与文案。列表槽接受 `id`、`order`、`label`,并给组件传 `props` 对象,其中 `view: 'summary' | 'page'`(在 Plugins 页渲染紧凑摘要、在专属页渲染完整表单)。它通过 `ctx.settingsScope` 读写,后者用读取时的 revision 为每次写入设栅:
|
|
51
51
|
|
|
52
52
|
```ts ignore-check
|
|
53
53
|
import type { Context as ClientContext } from '@deepseek-ai/cordis'
|
|
54
|
-
// Type-only: the
|
|
54
|
+
// Type-only: the list slot's declaration. Cross-plugin collaboration goes
|
|
55
55
|
// through cordis services; a value import fails the client bundle-purity gate.
|
|
56
|
-
import type {} from '@deepseek-ai/dsh-client-ui-
|
|
56
|
+
import type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'
|
|
57
57
|
|
|
58
58
|
export const inject = ['slots', 'locale', 'connection', 'remote', 'settingsScope']
|
|
59
59
|
|
|
60
60
|
export function apply(ctx: ClientContext): void {
|
|
61
61
|
const card = new MyPluginCardController(ctx.settingsScope.bind({ namespace: 'my-plugin' }))
|
|
62
|
-
ctx.slots.inject('
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
ctx.slots.inject('plugins.item', () => ctx.slots.register({
|
|
63
|
+
id: 'my-plugin',
|
|
64
|
+
order: 100,
|
|
65
|
+
label: 'settings.myPlugin',
|
|
66
66
|
inject: () => card.inject(),
|
|
67
67
|
}, MyPluginCard),
|
|
68
68
|
)
|
|
@@ -75,7 +75,7 @@ scope 快照携带表单所需的一切:解析后的 `value`、组装层 `base
|
|
|
75
75
|
|
|
76
76
|
**插件配置**标签页读取 Host 服务了哪些命名空间,并为每个命名空间派发一个 slot 键。当 Host 服务了某卡片的键时它被渲染,否则被跳过,因此从未组装过 Host 半侧的部署不会留下这张卡片的任何痕迹。被服务却无人认领的命名空间什么都不渲染——归其他页面所有的那些命名空间(`ui-theme`、`permission`、`llm-*`)正是这样留在本标签页之外的。
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
卡片按各自在 `plugins.item` 列表槽中声明的 `order` 排序显示。
|
|
79
79
|
|
|
80
80
|
## 打包
|
|
81
81
|
|
|
@@ -99,4 +99,4 @@ import { clientBundle } from '../tsdown.client.ts'
|
|
|
99
99
|
export default clientBundle('@deepseek-ai/dsh-client-my-plugin', ['lib/types/index.js', 'lib/types/invariant.js'])
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
没有已发布的预设暴露该包,因此本仓库之外的包得自行复刻同样的输出格式。bundle 纯净度门禁同时拒绝跨插件的值导入,所以卡片无法导入本分区的卡片外观或其暂存表单模型——它渲染自己的那一份,并自行拥有暂存与 revision 设栅。这两条限制都记在[本分区的已知限制](../../packages/client/ui-settings-plugins/README
|
|
102
|
+
没有已发布的预设暴露该包,因此本仓库之外的包得自行复刻同样的输出格式。bundle 纯净度门禁同时拒绝跨插件的值导入,所以卡片无法导入本分区的卡片外观或其暂存表单模型——它渲染自己的那一份,并自行拥有暂存与 revision 设栅。这两条限制都记在[本分区的已知限制](../../packages/client/ui-settings-plugins/README.zh.md#known-limitations-and-deferred-work)里。
|
|
@@ -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/cookbook/adding-a-tool.md
|
|
5
|
-
adding-a-tool.md:
|
|
6
|
-
adding-a-tool.zh.md:
|
|
5
|
+
adding-a-tool.md: 659f87bf88ac7fc4b8bc7dd65672c86e6b4326f6
|
|
6
|
+
adding-a-tool.zh.md: 4804c22b22e5761e27c59392d76a322a7407af99
|
|
@@ -39,7 +39,7 @@ Registration is effect-based: disposing the plugin fiber unregisters the tool. S
|
|
|
39
39
|
|
|
40
40
|
## Rules of the execute() contract
|
|
41
41
|
|
|
42
|
-
- **Args are validated for you.** `defineTool` validates model-generated `arguments` against the unified `ParameterSchemaSpec` before `execute` runs (types, required keys, literal constraints, exact-one unions, and nested values
|
|
42
|
+
- **Args are validated for you.** `defineTool` validates model-generated `arguments` against the unified `ParameterSchemaSpec` before `execute` runs (types, required keys, literal constraints, exact-one unions, and nested values), so inside `execute` the args match `InferArgs`. Explicit object nodes declare `additionalProperties: true | false`; the implicit parameter root stays open. You still hand-check constraints the DSL does not express, such as non-empty strings, positive numbers, or cross-field rules. Raw JSON-Schema tools registered directly own their input validation.
|
|
43
43
|
- **Registration borrows your readonly definition.** A typed same-process contribution is not a serialization boundary; do not mutate its schema or replace callbacks after registration. `schemas()` materializes only the explicit model-facing projection. To hot-swap a tool, dispose its owning effect and register the replacement; mutable state inside the callback's closure remains ordinary plugin state.
|
|
44
44
|
- **Execution identity is protected.** The registry materializes `arguments` as detached lossless JSON in one recursive pass, freezes that value before policy starts, and assigns an opaque `exec.token`; `callId`, `name`, `arguments`, `agent`, `token`, the required caller-owned `signal`, and an optional enclosing-transport `parent` token stay immutable through dispatch. `parent` is identity-only and exposes no live outer execution. Treat `args` as readonly input. Only an around-dispatch wrapper receives a mutable view, and it may replace and restore the required `exec.signal` to impose a deadline but cannot remove it.
|
|
45
45
|
- **Declare and return one canonical JSON value.** `output.schema` uses `ValueSchemaSpec` and may have an object, array, scalar, or null root. `execute` returns only the inferred value; the registry snapshots it as lossless JSON, validates it, freezes it, and passes it to `output.render(args, value)`. Do not return content blocks from the body or make callers parse prose for ids and fields.
|
|
@@ -92,7 +92,7 @@ The neutral vocabulary lives in `dsh-tools`; tools never import a UI or transpor
|
|
|
92
92
|
|
|
93
93
|
## Web Client presentation
|
|
94
94
|
|
|
95
|
-
The built-in Web Client does not consume `presentCall` or `presentResult`. Session `page` and `follow` transport raw `tool/call` and `tool/result` events, including persisted `result.meta`. A Client plugin registers its wire tool name in the `tool.call.toolview` keyed slot and derives component props from the `ToolCallBlock` arguments, content, error, metadata, existing
|
|
95
|
+
The built-in Web Client does not consume `presentCall` or `presentResult`. Session `page` and `follow` transport raw `tool/call` and `tool/result` events, including persisted `result.meta`. A Client plugin registers its wire tool name in the `tool.call.toolview` keyed slot and derives component props from the `ToolCallBlock` arguments, content, error, metadata, existing PTC dispatch `parentCallId`, and Session path facts. It validates these wire values locally and returns the generic row for malformed or unsupported input.
|
|
96
96
|
|
|
97
97
|
Use `output.presentationMeta(args, value)` when an existing Web card needs bounded structured result facts that model-facing content cannot preserve losslessly. Do not store React props or a selected card in metadata, import a Host tool implementation into a browser bundle, or create another Client presenter registry. Defining Host presentation methods alone does not add a specialized Web card. The [Client-derived presentation Agent Note](../../.agents/notes/implemented/architecture/2026-08-23-client-derived-tool-presentation.md) defines ownership, fallback, and equivalence requirements.
|
|
98
98
|
|
|
@@ -39,7 +39,7 @@ export function apply(ctx: Context) {
|
|
|
39
39
|
|
|
40
40
|
## execute() 约定的规则
|
|
41
41
|
|
|
42
|
-
- **参数已为你校验。** `defineTool` 在 `execute` 运行前,会根据统一的 `ParameterSchemaSpec` 校验模型生成的 `arguments
|
|
42
|
+
- **参数已为你校验。** `defineTool` 在 `execute` 运行前,会根据统一的 `ParameterSchemaSpec` 校验模型生成的 `arguments`(类型、必填键、字面量约束、恰好匹配一个分支的联合以及嵌套值),因此 `execute` 内的 args 会匹配 `InferArgs`。显式对象节点必须声明 `additionalProperties: true | false`;隐式参数根对象保持开放。你仍需手动检查 schema DSL 无法表达的约束,例如非空字符串、正数或跨字段规则。直接注册的原始 JSON Schema 工具自行负责输入校验。
|
|
43
43
|
- **注册借用你的只读定义。** 类型化的同进程贡献不是序列化边界;注册后不要修改其 schema 或替换回调。`schemas()` 只物化显式的模型可见投影。如需热替换工具,请 dispose 其所属副作用并注册替代品;回调闭包内的可变状态仍是普通的插件状态。
|
|
44
44
|
- **执行身份受保护。** 注册表在一次递归遍历中将 `arguments` 物化为分离的无损 JSON,在策略开始前冻结该值,并分配一个不透明的 `exec.token`;`callId`、`name`、`arguments`、`agent`、`token`、必填且由调用方持有的 `signal`,以及可选的外层传输 `parent` token 在整个分发过程中保持不可变。`parent` 仅用于身份标识,不暴露活跃的外层执行。请将 `args` 视为只读输入。只有 around-dispatch 包装器会收到可变视图;它可以替换并恢复必填的 `exec.signal` 以施加截止时间,但不能移除该信号。
|
|
45
45
|
- **声明并返回一个规范 JSON 值。** `output.schema` 使用 `ValueSchemaSpec`,根可以是对象、数组、标量或 null。`execute` 只返回推导出的值;注册表将其快照为无损 JSON,完成校验和冻结后,再传给 `output.render(args, value)`。工具主体不要返回内容块,也不要迫使调用方从自然语言中解析 id 和字段。
|
|
@@ -58,11 +58,11 @@ producer 提供同步的 `cancel`、在资源清理后 settle 且不 reject 的
|
|
|
58
58
|
|
|
59
59
|
## 执行策略与观测
|
|
60
60
|
|
|
61
|
-
尽量不要把部署策略内建到工具中。使用 `tools/pre-execute` 实现可扩展的允许/拒绝/询问策略(见[权限门禁示例](extension-cookbook.zh.md#a-hook-plugin-permission-gate-example));使用 `ctx.tools.guard()` 设置最终的单调拒绝,后续监听器无法撤销;使用 `tools/execute` 为分发添加截止时间、重试或指标收集;使用 `tools/post-execute` 替换展示内容或返回值、阻止结果,或附加模型可见上下文;使用 `tools/result` 观测不可变的归一化结果而不改变它。替换内容不会阻止程序化访问 `value`;保密策略会屏蔽或替换该值。沙箱实现也可以在工具的执行器实现中运行;[`dsh-tools` README](../../packages/core/tools/README
|
|
61
|
+
尽量不要把部署策略内建到工具中。使用 `tools/pre-execute` 实现可扩展的允许/拒绝/询问策略(见[权限门禁示例](extension-cookbook.zh.md#a-hook-plugin-permission-gate-example));使用 `ctx.tools.guard()` 设置最终的单调拒绝,后续监听器无法撤销;使用 `tools/execute` 为分发添加截止时间、重试或指标收集;使用 `tools/post-execute` 替换展示内容或返回值、阻止结果,或附加模型可见上下文;使用 `tools/result` 观测不可变的归一化结果而不改变它。替换内容不会阻止程序化访问 `value`;保密策略会屏蔽或替换该值。沙箱实现也可以在工具的执行器实现中运行;[`dsh-tools` README](../../packages/core/tools/README.zh.md#extension-points) 定义每个扩展点的输入、顺序、返回值和失败行为。
|
|
62
62
|
|
|
63
63
|
## PTC mode 自动触达你的工具
|
|
64
64
|
|
|
65
|
-
在 [PTC mode](../../packages/core/tools/README
|
|
65
|
+
在 [PTC mode](../../packages/core/tools/README.zh.md) 中,每个可见的已注册工具都可通过 `await tools.<name>(args)` 调用,无需额外集成。生成的 `ToolArgsMap` 和 `ToolOutputMap` 会根据同一组 schema 分别派生精确的参数类型与规范返回类型,调用则重新进入正常的执行流水线。成功调用会解析为策略处理后的最终规范 JSON 值,而不是渲染后的 Native 内容。失败调用会以真正的 `ToolCallError` reject;程序只能检查其 `name`、`toolName` 和可供人阅读的 `message`,无法取得内部错误代码或失败联合。
|
|
66
66
|
|
|
67
67
|
请把 `output.schema` 设计为实用的程序化 API:直接返回句柄与字段;当标量、数组或 null 确实就是结果时,允许采用相应的根类型;将面向人类的解释放入 `output.render`。中间值只存在于执行期间,不会被持久化或按提示词上限截断,也不设字节上限,因此生产方如实声明的采集边界和进程内存仍然重要。只有外层 `run_code` 日志/结果会受到可配置输出上限和面向模型的 spill 流水线约束。
|
|
68
68
|
|
|
@@ -94,7 +94,7 @@ producer 提供同步的 `cancel`、在资源清理后 settle 且不 reject 的
|
|
|
94
94
|
|
|
95
95
|
## Web Client 展示
|
|
96
96
|
|
|
97
|
-
内置 Web Client 不消费 `presentCall` 或 `presentResult`。Session `page` 与 `follow` 运输原始 `tool/call` 和 `tool/result` 事件,包括持久化的 `result.meta`。Client 插件在 keyed slot `tool.call.toolview` 中注册自己的 wire 工具名称,并从 `ToolCallBlock` 的参数、内容、错误、metadata、现有
|
|
97
|
+
内置 Web Client 不消费 `presentCall` 或 `presentResult`。Session `page` 与 `follow` 运输原始 `tool/call` 和 `tool/result` 事件,包括持久化的 `result.meta`。Client 插件在 keyed slot `tool.call.toolview` 中注册自己的 wire 工具名称,并从 `ToolCallBlock` 的参数、内容、错误、metadata、现有 PTC dispatch `parentCallId` 与 Session 路径事实派生组件 props。插件在本地校验这些 wire 值,并让格式错误或不受支持的输入回退到 generic 行。
|
|
98
98
|
|
|
99
99
|
现有 Web 卡片需要模型可见内容无法无损保存的有界结构化结果事实时,使用 `output.presentationMeta(args, value)`。不要在 metadata 中保存 React props 或预选卡片,不要把 Host 工具实现导入浏览器 bundle,也不要建立另一套 Client presenter registry。只定义 Host 展示方法不会增加专用 Web 卡片。[Client 派生展示 Agent Note](../../.agents/notes/implemented/architecture/2026-08-23-client-derived-tool-presentation.zh.md)规定 owner、fallback 与对等要求。
|
|
100
100
|
|
|
@@ -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/cookbook/adding-a-vendored-package.md
|
|
5
|
-
adding-a-vendored-package.md:
|
|
6
|
-
adding-a-vendored-package.zh.md:
|
|
5
|
+
adding-a-vendored-package.md: 0f8b9f38de8f0d2ae19f40b339529afbb40d90ed
|
|
6
|
+
adding-a-vendored-package.zh.md: 2668b874eee845f6a505ae2e7d2ead5e63642ce2
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](adding-a-vendored-package.zh.md)
|
|
4
4
|
|
|
5
|
-
When the harness needs another upstream Cordis package (e.g. `@cordisjs/plugin-http`), it is **vendored** as pinned source under `vendor/`, not added as an npm dependency
|
|
5
|
+
When the harness needs another upstream Cordis package (e.g. `@cordisjs/plugin-http`), it is **vendored** as pinned source under `vendor/`, not added as an npm dependency. [vendor/README.md](../../vendor/README.md) states why and covers *updating* an already-vendored package; this guide is the file-by-file checklist for adding a **new** one. (Verified against the existing vendored set; if it drifts, fix it here.)
|
|
6
6
|
|
|
7
7
|
## 1. Copy the source in
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](adding-a-vendored-package.md) | 中文
|
|
4
4
|
|
|
5
|
-
当 harness 需要引入另一个上游 Cordis 包(如 `@cordisjs/plugin-http`)时,应将其作为固定版本的源码 **vendor** 到 `vendor/` 下,而非作为 NPM
|
|
5
|
+
当 harness 需要引入另一个上游 Cordis 包(如 `@cordisjs/plugin-http`)时,应将其作为固定版本的源码 **vendor** 到 `vendor/` 下,而非作为 NPM 依赖添加。[vendor/README.md](../../vendor/README.md) 说明其原因并介绍如何*更新*已有的 vendored 包;本指南是添加**新** vendored 包的逐文件清单。(已对照现有 vendored 集合验证;如有偏差,请在此修正。)
|
|
6
6
|
|
|
7
7
|
## 1. 复制源码
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@ export function apply(ctx: Context, config: Config) {
|
|
|
36
36
|
|
|
37
37
|
## 实现结构
|
|
38
38
|
|
|
39
|
-
让协议格式(wire format)类型、请求序列化、传输解析、分片转换和适配器类分别承担独立职责;[`llm-deepseek`](../../packages/llm/llm-deepseek/README
|
|
39
|
+
让协议格式(wire format)类型、请求序列化、传输解析、分片转换和适配器类分别承担独立职责;[`llm-deepseek`](../../packages/llm/llm-deepseek/README.zh.md) 是参考布局。
|
|
40
40
|
|
|
41
41
|
## 验证
|
|
42
42
|
|
|
@@ -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/cookbook/extension-cookbook.md
|
|
5
|
-
extension-cookbook.md:
|
|
6
|
-
extension-cookbook.zh.md:
|
|
5
|
+
extension-cookbook.md: b54f0191b48c109b21e111cac27020efcb37174a
|
|
6
|
+
extension-cookbook.zh.md: c03e92b21e156a82d51d2afd742f1dd880e32a47
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](extension-cookbook.zh.md)
|
|
4
4
|
|
|
5
|
-
Reference patterns for harness extensions. The snippets omit imports and helper implementations and are not copy-paste-complete. For concrete authoring paths, see the [package checklist](adding-a-package.md), [first-tool tutorial](../user/develop/basic/tool.md), [tool reference](adding-a-tool.md),
|
|
5
|
+
Reference patterns for harness extensions. The snippets omit imports and helper implementations and are not copy-paste-complete. For concrete authoring paths, see the [package checklist](adding-a-package.md), [first-tool tutorial](../user/develop/basic/tool.md), [tool reference](adding-a-tool.md), [LLM adapter guide](adding-an-llm-adapter.md), and [Session format version tutorial](adding-a-session-format-version.md); the [architecture](../architecture.md) owns the system and extension-point map.
|
|
6
6
|
|
|
7
7
|
## A tool plugin
|
|
8
8
|
|
|
@@ -103,10 +103,10 @@ Every product feature maps to a listener on a documented extension point — the
|
|
|
103
103
|
|
|
104
104
|
| Product feature | Plugin mechanism |
|
|
105
105
|
|---|---|
|
|
106
|
-
| Hook system (user + project level) | listeners on `agent/
|
|
106
|
+
| Hook system (user + project level) | listeners on `agent/created`, `agent/pre-step`, `agent/request`, `tools/pre-execute`, `tools/post-execute`, and `agent/turn-stopping`; the waterfalls return typed decisions, while `agent/turn-stopping` may steer another step; the `dsh-hooks-claude-code` / `dsh-hooks-codex` bridges map hook config files onto these extension points |
|
|
107
107
|
| `/goal` | `ctx.goals` owns durable state, `dsh-goal-round-driver` schedules same-session rounds through the public `Agent`, and separate command/tool producers expose human/model control |
|
|
108
108
|
| `/loop` | on the `turn/end` session event, `followup()` the next iteration; or force-continue |
|
|
109
|
-
| Dynamic workflow | `ctx.workflowEngine` + the
|
|
109
|
+
| Dynamic workflow | `ctx.workflowEngine` + the PTC workflow engine + the `workflow` tool; structured in-process children enforce output with scoped prompt/tool registrations, a monotonic tool guard, final `tools/result` commit (including enclosing `run_code`), and the structured-output execution's monotonic `concludeTurn()` marker |
|
|
110
110
|
| Queued + steering messages | core `Agent.followup()` / `Agent.steer()` |
|
|
111
111
|
| Context compaction (auto + manual) | the `ctx.compaction` seam + `dsh-compaction-basic`; automatic pressure runs on serial `agent/pre-step`, canonical overflow recovery runs on `agent/request-error`, and manual callers use the same compact service ([compaction Agent Note](../../.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md)) |
|
|
112
112
|
| System prompt configurability | `ctx.systemPrompt.section()` with ordering and scope-local shadowing |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](extension-cookbook.md) | 中文
|
|
4
4
|
|
|
5
|
-
harness 扩展的参考模式。代码片段省略了 import 和辅助实现,无法直接复制运行。具体编写路径见[包检查清单](adding-a-package.zh.md)、[第一个工具教程](../user/develop/basic/tool.zh.md)、[工具参考](adding-a-tool.zh.md)
|
|
5
|
+
harness 扩展的参考模式。代码片段省略了 import 和辅助实现,无法直接复制运行。具体编写路径见[包检查清单](adding-a-package.zh.md)、[第一个工具教程](../user/develop/basic/tool.zh.md)、[工具参考](adding-a-tool.zh.md)、[LLM(大语言模型)适配器指南](adding-an-llm-adapter.zh.md)和 [Session 格式版本教程](adding-a-session-format-version.zh.md);系统与扩展点映射由[架构文档](../architecture.zh.md)负责。
|
|
6
6
|
|
|
7
7
|
## 工具插件
|
|
8
8
|
|
|
@@ -67,7 +67,7 @@ export function apply(ctx: Context) {
|
|
|
67
67
|
|
|
68
68
|
*协议驱动*将协议对端接入 `ctx.agents`;它可以服务于 UI 或自动化客户端。stdio 驱动拥有 stdout,通过工厂创建或恢复 agent(智能体),并将协议请求映射为 `followup()` 或 `cancel()`。底层提示词请求返回其持久入队回执;它不会通过关联 `MessageId` 与 `turn/end` 获得结果。整个 agent 的状态应单独发布。自动化方法可以从回执等待到下一次 idle,并概括这一显式拥有的区间;UI 通常则会持续观察开放式事件流。通过 `AgentHandle.dispose()` 拆除 agent,以使 dispose(资源释放)达到完全停稳。
|
|
69
69
|
|
|
70
|
-
[`packages/acp/acp`](../../packages/acp/acp) 是仅面向自动化的完整示例:它通过 ACP(Agent Client Protocol)JSON-RPC stdio 提供全新文本会话,发出已提交的助手文本,并为其拥有的 agent 注册一次性机器权限应答器。其 [README](../../packages/acp/acp/README
|
|
70
|
+
[`packages/acp/acp`](../../packages/acp/acp) 是仅面向自动化的完整示例:它通过 ACP(Agent Client Protocol)JSON-RPC stdio 提供全新文本会话,发出已提交的助手文本,并为其拥有的 agent 注册一次性机器权限应答器。其 [README](../../packages/acp/acp/README.zh.md) 定义确切的方法、事件顺序和生命周期约定。
|
|
71
71
|
|
|
72
72
|
```ts
|
|
73
73
|
import type { Context } from '@deepseek-ai/cordis'
|
|
@@ -107,10 +107,10 @@ export function apply(ctx: Context) {
|
|
|
107
107
|
|
|
108
108
|
| 产品功能 | 插件机制 |
|
|
109
109
|
|---|---|
|
|
110
|
-
| 钩子系统(用户级 + 项目级) | `agent/
|
|
110
|
+
| 钩子系统(用户级 + 项目级) | `agent/created`、`agent/pre-step`、`agent/request`、`tools/pre-execute`、`tools/post-execute` 和 `agent/turn-stopping` 上的监听器;waterfall 返回类型化决策,`agent/turn-stopping` 则可通过 steering(中途引导)触发下一步;`dsh-hooks-claude-code` / `dsh-hooks-codex` 桥接器将钩子配置文件映射到这些扩展点上 |
|
|
111
111
|
| `/goal` | `ctx.goals` 管理持久状态,`dsh-goal-round-driver` 通过公共 `Agent` 调度同会话 Round,独立的命令/工具生产方分别提供人类/模型控制 |
|
|
112
112
|
| `/loop` | 在 `turn/end` 会话事件上 `followup()` 下一次迭代;或强制继续 |
|
|
113
|
-
| 动态工作流 | `ctx.workflowEngine` +
|
|
113
|
+
| 动态工作流 | `ctx.workflowEngine` + PTC 工作流引擎 + `workflow` 工具;结构化的进程内子任务通过作用域化的提示词/工具注册、单调工具守卫、最终 `tools/result` 提交(包括外层 `run_code`)和结构化输出执行的单调 `concludeTurn()` 标记来强制输出 |
|
|
114
114
|
| 排队消息 + steering | 核心 `Agent.followup()` / `Agent.steer()` |
|
|
115
115
|
| 上下文压缩(context compaction)(自动 + 手动) | `ctx.compaction` seam + `dsh-compaction-basic`;自动压力检查运行在串行 `agent/pre-step`,标准的溢出恢复机制运行在 `agent/request-error`,手动调用方使用同一个压缩服务([压缩 Agent Note](../../.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.zh.md)) |
|
|
116
116
|
| 系统提示词可配置性 | `ctx.systemPrompt.section()`,支持排序与作用域局部覆盖 |
|
|
@@ -123,7 +123,7 @@ export function apply(ctx: Context) {
|
|
|
123
123
|
| 单调终端轮次策略 | 从成功的终端工具调用 `ToolExecution.concludeTurn()`;同一响应中后续工具调用仍可由守卫阻止,循环在该步骤后停止 |
|
|
124
124
|
| 子进程沙箱(landlock / sandbox-exec) | 通过 `dsh-bash-sandbox` 使用 `ctx.sandbox` 后端;能力级别的拒绝使用 `tools/pre-execute` |
|
|
125
125
|
| 权限系统 / AskUserQuestion | 从 `tools/pre-execute` 返回 `ask` 并通过 `ctx.approval` 应答;为普通用户提问注册一个独立的面向模型的 ask 工具 |
|
|
126
|
-
| Plan mode | [`@deepseek-ai/dsh-plan-mode`](../../packages/plan/plan-mode/README
|
|
126
|
+
| Plan mode | [`@deepseek-ai/dsh-plan-mode`](../../packages/plan/plan-mode/README.zh.md):落日志的 `plan/mode` 状态、`plan:policy` 引导段、`/plan [message]` 入口、`/plan off` 直接退出,以及经用户评审的 `exit_plan_mode` 出口;强制约束留在独立的沙箱/审批轴上 |
|
|
127
127
|
| subagent 委派 | `ctx.subagents` 提供方注册表(`dsh-subagent-spawn-in-process`/`dsh-subagent-fork-in-process`/`dsh-subagent-acp`/`dsh-subagent-codex`/`dsh-subagent-claude-code`/`dsh-subagent-dsh-sdk`)+ `dsh-tool-subagent` 向模型暴露一个已配置的提供方 |
|
|
128
128
|
| MCP | 每个服务器一个插件:发现工具 → `ctx.tools.register()` |
|
|
129
129
|
| skill(技能) | section + 工具注册;调用时通过 `inject()` 注入 skill 内容 |
|
|
@@ -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/cookbook/responding-to-pr-review-on-a-stack.md
|
|
5
|
-
responding-to-pr-review-on-a-stack.md:
|
|
6
|
-
responding-to-pr-review-on-a-stack.zh.md:
|
|
5
|
+
responding-to-pr-review-on-a-stack.md: 61b15fd5e7b3a528957ef3c9e958aac0e11eb43b
|
|
6
|
+
responding-to-pr-review-on-a-stack.zh.md: a33418d342e57dd3c920008a4b12b2f33d6f31da
|
|
@@ -17,7 +17,7 @@ Review comments may target several PRs in a dependent stack (`A ← B ← C …`
|
|
|
17
17
|
1. Triage every comment on the merits before acting: verify the claim against the code — a reviewer flagging the right symptom can still misdiagnose the cause.
|
|
18
18
|
2. Map each accepted finding to its originating PR and fix it there.
|
|
19
19
|
3. Propagate the fixed layer through every affected child in order:
|
|
20
|
-
- **Merge-forward:** merge the fixed parent branch into its child, validate the child, and continue upward. Preserve each in-progress checkpoint
|
|
20
|
+
- **Merge-forward:** merge the fixed parent branch into its child, validate the child, and continue upward. Preserve each in-progress checkpoint.
|
|
21
21
|
- **Native cascading rebase:** use `gh stack rebase`, validate the rewritten layers, then publish with `gh stack push`; or use `gh stack sync`, which may publish first and therefore requires immediate post-sync validation under [dsh-pre-push-checks](../../.agents/skills/dsh-pre-push-checks/SKILL.md).
|
|
22
22
|
4. Treat delegated fixes as trust-but-verify: a sub-agent's report describes intent, not necessarily what landed. Re-run the gates yourself on the actual tree, and for a regression guard, prove it FAILS on the unfixed code (introduce the regression, watch red, revert) — a guard that passes both ways guards nothing. A sub-agent that reframes a problem as already handled is a signal to dig in personally.
|
|
23
23
|
5. Reply in the review thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level comment, stating the fix and the current commit or head that carries it.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
1. 在行动之前先就事论事地审视每条评论:对照代码验证其论断——评审者指出了正确的症状,但仍可能误诊原因。
|
|
18
18
|
2. 将每个被接受的发现映射到引入该问题的 PR,并在那里修复。
|
|
19
19
|
3. 将修复后的层按顺序传播到每个受影响的子 PR:
|
|
20
|
-
- **Merge-forward:**
|
|
20
|
+
- **Merge-forward:** 将修复后的父分支合并到其子分支,验证子分支,然后继续沿堆叠向上传播。保留每个正在处理的检查点。
|
|
21
21
|
- **原生级联 rebase:** 使用 `gh stack rebase`,验证所有已改写的层,然后通过 `gh stack push` 发布;也可以使用 `gh stack sync`,该命令可能先发布,因此必须按照 [dsh-pre-push-checks](../../.agents/skills/dsh-pre-push-checks/SKILL.md) 在同步后立即验证。
|
|
22
22
|
4. 委派的修复需要信任但验证:subagent 的报告描述的是意图,不一定是实际落地的内容。请亲自在实际代码树上重新运行门禁;对于回归守卫,要证明它在未修复的代码上**失败**(引入回归、观察变红、再还原)——两种情况都通过的守卫什么也守不住。subagent 将问题重新定性为「已处理」时,这是一个需要亲自深入的信号。
|
|
23
23
|
5. 在评审线程中回复(`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`),而非发顶层评论;说明修复内容及当前承载修复的 commit 或 head。
|
|
@@ -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/cookbook/reviewing-persistence-type-changes.md
|
|
5
|
+
reviewing-persistence-type-changes.md: 881bc689af656f0c4976e909a49848e38d53c453
|
|
6
|
+
reviewing-persistence-type-changes.zh.md: f1961013886cfab1abdbd7e2cd7e09bcfce2101d
|