dsh-plugin-guide 0.3.21 → 0.3.23
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 +15 -12
- package/README-hi.md +15 -12
- package/README-pt.md +15 -12
- package/README-zh.md +15 -12
- package/README.md +290 -280
- package/SKILL.md +36 -19
- package/dist/dsh-plugin-dev.js +113 -9
- package/guide/choosing-a-plugin.md +412 -0
- package/guide/choosing-a-plugin.zh-CN.md +414 -0
- package/guide/links.md +20 -2
- package/guide/migration-0.2.md +219 -0
- package/guide/plugin-dev-guide.md +99 -24
- package/guide/quick-reference.es.md +14 -8
- package/guide/quick-reference.hi.md +15 -9
- package/guide/quick-reference.md +18 -10
- package/guide/quick-reference.pt.md +15 -9
- package/guide/quick-reference.zh-CN.md +19 -11
- package/guide/release-engineering.md +2 -2
- package/guide/release-engineering.zh-CN.md +2 -2
- package/guide/unfixed-issues.md +117 -82
- package/guide/when-to-retire-a-plugin.md +127 -0
- package/guide/when-to-retire-a-plugin.zh-CN.md +127 -0
- package/icon.svg +5 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +8 -4
- package/references/official-docs/AGENTS.md +8 -5
- package/references/official-docs/CONTRIBUTING.i18n.yaml +6 -5
- package/references/official-docs/README.i18n.yaml +33 -5
- package/references/official-docs/README.zh.md +3 -3
- package/references/official-docs/SNAPSHOT.md +3 -3
- package/references/official-docs/THIRD_PARTY_NOTICES.md +34 -6
- package/references/official-docs/docs/AGENTS.md +4 -4
- package/references/official-docs/docs/agent-lifecycle.i18n.yaml +9 -5
- package/references/official-docs/docs/api-gateway.i18n.yaml +27 -5
- package/references/official-docs/docs/api-gateway.md +10 -9
- package/references/official-docs/docs/api-gateway.zh.md +10 -9
- package/references/official-docs/docs/architecture.i18n.yaml +36 -5
- package/references/official-docs/docs/architecture.md +10 -8
- package/references/official-docs/docs/architecture.zh.md +10 -8
- package/references/official-docs/docs/capability-seams.i18n.yaml +9 -5
- package/references/official-docs/docs/capability-seams.md +76 -32
- package/references/official-docs/docs/capability-seams.zh.md +76 -32
- package/references/official-docs/docs/config-catalog.i18n.yaml +18 -5
- package/references/official-docs/docs/config-catalog.md +1360 -765
- package/references/official-docs/docs/config-catalog.zh.md +1363 -767
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +27 -5
- package/references/official-docs/docs/cookbook/adding-a-package.md +56 -3
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +54 -3
- package/references/official-docs/docs/cookbook/adding-a-remote-api.i18n.yaml +24 -5
- package/references/official-docs/docs/cookbook/adding-a-remote-api.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +39 -5
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +46 -6
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +46 -6
- package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +21 -5
- package/references/official-docs/docs/cookbook/adding-a-settings-card.md +34 -64
- package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +34 -64
- package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +30 -5
- package/references/official-docs/docs/cookbook/adding-a-tool.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +18 -5
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +18 -5
- package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +24 -5
- package/references/official-docs/docs/cookbook/extension-cookbook.md +3 -3
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +3 -3
- package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +21 -5
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +15 -5
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +30 -5
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +13 -1
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +13 -1
- package/references/official-docs/docs/cordis-api/context.i18n.yaml +72 -5
- package/references/official-docs/docs/cordis-api/events.i18n.yaml +36 -5
- package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +75 -5
- package/references/official-docs/docs/cordis-api/inherited.md +15 -13
- package/references/official-docs/docs/cordis-api/registry.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-api/service.i18n.yaml +36 -5
- package/references/official-docs/docs/cordis-primer.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +18 -5
- package/references/official-docs/docs/cordis-tutorial/05-config.md +27 -0
- package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +27 -0
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +18 -5
- package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +15 -5
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +33 -5
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +7 -7
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +7 -7
- package/references/official-docs/docs/defensive-patterns.i18n.yaml +27 -5
- package/references/official-docs/docs/dependency-catalog.json +2 -2
- package/references/official-docs/docs/development.i18n.yaml +48 -5
- package/references/official-docs/docs/development.md +27 -10
- package/references/official-docs/docs/development.zh.md +27 -10
- package/references/official-docs/docs/event-producer-consumer.i18n.yaml +12 -5
- package/references/official-docs/docs/event-producer-consumer.md +78 -66
- package/references/official-docs/docs/event-producer-consumer.zh.md +78 -66
- package/references/official-docs/docs/glossary.i18n.yaml +24 -5
- package/references/official-docs/docs/graph-atlas.i18n.yaml +9 -5
- package/references/official-docs/docs/i18n/README.i18n.yaml +18 -5
- package/references/official-docs/docs/i18n/README.md +12 -8
- package/references/official-docs/docs/i18n/README.zh.md +12 -8
- package/references/official-docs/docs/i18n/terminology.md +4 -4
- package/references/official-docs/docs/i18n/translation-prompt.md +2 -2
- package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +27 -5
- package/references/official-docs/docs/module-graph.i18n.yaml +9 -5
- package/references/official-docs/docs/module-graph.md +348 -245
- package/references/official-docs/docs/module-graph.zh.md +348 -245
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2064 -5
- package/references/official-docs/docs/persistence-catalog.md +5275 -3205
- package/references/official-docs/docs/persistence-catalog.zh.md +5275 -3205
- package/references/official-docs/docs/persistence-changes/2026-09-11-initial.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.md +120 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.schema.json +16212 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.schema.json +302 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.schema.json +250 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.md +60 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.schema.json +11405 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
- package/references/official-docs/docs/persistence-changes/README.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/README.md +17 -3
- package/references/official-docs/docs/persistence-changes/README.zh.md +17 -3
- package/references/official-docs/docs/persistence-changes/finalized/v4.json +379 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/README.md +3 -2
- package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +3 -2
- package/references/official-docs/docs/persistence-changes/historical-formats/v0.i18n.yaml +1284 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v1.i18n.yaml +1284 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v2.i18n.yaml +1344 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.i18n.yaml +1441 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.md +5634 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.schema.json +61307 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.zh.md +5634 -0
- package/references/official-docs/docs/persistence-changes/releases/README.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.schema.json +3 -3
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-schema.json +12692 -48753
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +33 -5
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/README.i18n.yaml +6 -5
- package/references/official-docs/docs/rescope.i18n.yaml +18 -5
- package/references/official-docs/docs/rescope.md +1 -1
- package/references/official-docs/docs/rescope.zh.md +1 -1
- package/references/official-docs/docs/session-format-status.i18n.yaml +27 -5
- package/references/official-docs/docs/session-format-status.md +17 -3
- package/references/official-docs/docs/session-format-status.zh.md +17 -3
- package/references/official-docs/docs/subsystems/README.i18n.yaml +6 -5
- package/references/official-docs/docs/subsystems/README.md +6 -3
- package/references/official-docs/docs/subsystems/README.zh.md +6 -3
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/agent-team.md +52 -28
- package/references/official-docs/docs/subsystems/agent-team.zh.md +52 -28
- package/references/official-docs/docs/subsystems/approval.i18n.yaml +18 -5
- 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 +12 -5
- package/references/official-docs/docs/subsystems/attachment.md +2 -2
- package/references/official-docs/docs/subsystems/attachment.zh.md +2 -2
- package/references/official-docs/docs/subsystems/boot.i18n.yaml +9 -5
- package/references/official-docs/docs/subsystems/boot.md +117 -17
- package/references/official-docs/docs/subsystems/boot.zh.md +117 -17
- package/references/official-docs/docs/subsystems/browser-use.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/claude-code-mods.i18n.yaml +28 -0
- package/references/official-docs/docs/subsystems/claude-code-mods.md +146 -0
- package/references/official-docs/docs/subsystems/claude-code-mods.zh.md +146 -0
- package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/client-modules.md +13 -7
- package/references/official-docs/docs/subsystems/client-modules.zh.md +13 -7
- package/references/official-docs/docs/subsystems/client-resources.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/commands.md +1 -1
- package/references/official-docs/docs/subsystems/commands.zh.md +1 -1
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/compaction.md +2 -2
- package/references/official-docs/docs/subsystems/compaction.zh.md +2 -2
- package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/conversation.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/conversation.md +35 -6
- package/references/official-docs/docs/subsystems/conversation.zh.md +34 -5
- package/references/official-docs/docs/subsystems/core.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/core.md +70 -214
- package/references/official-docs/docs/subsystems/core.zh.md +70 -214
- package/references/official-docs/docs/subsystems/credentials.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/credentials.md +168 -5
- package/references/official-docs/docs/subsystems/credentials.zh.md +168 -5
- package/references/official-docs/docs/subsystems/deliverables.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/extensions.i18n.yaml +6 -5
- package/references/official-docs/docs/subsystems/extensions.md +6 -4
- package/references/official-docs/docs/subsystems/extensions.zh.md +6 -4
- package/references/official-docs/docs/subsystems/feedback.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +33 -5
- package/references/official-docs/docs/subsystems/filesystem.md +10 -0
- package/references/official-docs/docs/subsystems/filesystem.zh.md +10 -0
- package/references/official-docs/docs/subsystems/goal.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/goal.md +1 -1
- package/references/official-docs/docs/subsystems/goal.zh.md +1 -1
- package/references/official-docs/docs/subsystems/jobs.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/jobs.md +335 -126
- package/references/official-docs/docs/subsystems/jobs.zh.md +335 -126
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +48 -5
- package/references/official-docs/docs/subsystems/llm-streaming.md +60 -31
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +60 -31
- package/references/official-docs/docs/subsystems/lsp.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/mcp.i18n.yaml +33 -5
- package/references/official-docs/docs/subsystems/mcp.md +2 -2
- package/references/official-docs/docs/subsystems/mcp.zh.md +2 -2
- package/references/official-docs/docs/subsystems/office-to-pdf.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/office-to-pdf.md +4 -4
- package/references/official-docs/docs/subsystems/office-to-pdf.zh.md +4 -4
- package/references/official-docs/docs/subsystems/otel.i18n.yaml +7 -0
- package/references/official-docs/docs/subsystems/otel.md +44 -0
- package/references/official-docs/docs/subsystems/otel.zh.md +44 -0
- package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/permission-presets.md +7 -6
- package/references/official-docs/docs/subsystems/permission-presets.zh.md +7 -6
- package/references/official-docs/docs/subsystems/persistence.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/persistence.md +3 -3
- package/references/official-docs/docs/subsystems/persistence.zh.md +3 -3
- package/references/official-docs/docs/subsystems/plan.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/plan.md +1 -1
- package/references/official-docs/docs/subsystems/plan.zh.md +1 -1
- package/references/official-docs/docs/subsystems/product-telemetry.i18n.yaml +10 -0
- package/references/official-docs/docs/subsystems/product-telemetry.md +79 -0
- package/references/official-docs/docs/subsystems/product-telemetry.zh.md +79 -0
- package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/sandbox.md +1 -1
- package/references/official-docs/docs/subsystems/sandbox.zh.md +1 -1
- package/references/official-docs/docs/subsystems/schedule.i18n.yaml +39 -5
- package/references/official-docs/docs/subsystems/schedule.md +391 -33
- package/references/official-docs/docs/subsystems/schedule.zh.md +391 -33
- package/references/official-docs/docs/subsystems/scope.i18n.yaml +15 -5
- 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 +15 -5
- package/references/official-docs/docs/subsystems/session-projection.md +20 -18
- package/references/official-docs/docs/subsystems/session-projection.zh.md +20 -18
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/session-telemetry.md +6 -4
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -4
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/session.i18n.yaml +66 -5
- package/references/official-docs/docs/subsystems/session.md +113 -62
- package/references/official-docs/docs/subsystems/session.zh.md +113 -62
- package/references/official-docs/docs/subsystems/settings.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/settings.md +42 -292
- package/references/official-docs/docs/subsystems/settings.zh.md +42 -292
- package/references/official-docs/docs/subsystems/shell.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/shell.md +29 -22
- package/references/official-docs/docs/subsystems/shell.zh.md +29 -22
- package/references/official-docs/docs/subsystems/sidebar-right.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/sidebar-right.md +14 -9
- package/references/official-docs/docs/subsystems/sidebar-right.zh.md +14 -9
- package/references/official-docs/docs/subsystems/skills.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/skills.md +2 -2
- package/references/official-docs/docs/subsystems/skills.zh.md +2 -2
- package/references/official-docs/docs/subsystems/slots.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/slots.md +21 -7
- package/references/official-docs/docs/subsystems/slots.zh.md +21 -7
- package/references/official-docs/docs/subsystems/spill.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/spill.md +1 -1
- package/references/official-docs/docs/subsystems/spill.zh.md +1 -1
- package/references/official-docs/docs/subsystems/ssh.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/storage.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/storage.md +1 -2
- package/references/official-docs/docs/subsystems/storage.zh.md +1 -2
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/subagent.md +35 -60
- package/references/official-docs/docs/subsystems/subagent.zh.md +35 -60
- package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/terminal.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/todo.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/todo.md +3 -3
- package/references/official-docs/docs/subsystems/todo.zh.md +3 -3
- package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/tools.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/tools.md +15 -4
- package/references/official-docs/docs/subsystems/tools.zh.md +15 -4
- package/references/official-docs/docs/subsystems/typert.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/typert.md +147 -6
- package/references/official-docs/docs/subsystems/typert.zh.md +147 -6
- package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/user-questions.md +128 -1
- package/references/official-docs/docs/subsystems/user-questions.zh.md +129 -2
- package/references/official-docs/docs/subsystems/voice-input.i18n.yaml +19 -0
- package/references/official-docs/docs/subsystems/voice-input.md +164 -0
- package/references/official-docs/docs/subsystems/voice-input.zh.md +164 -0
- package/references/official-docs/docs/subsystems/web-client.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/web-client.md +10 -5
- package/references/official-docs/docs/subsystems/web-client.zh.md +10 -5
- package/references/official-docs/docs/subsystems/web-server.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/web-server.md +12 -4
- package/references/official-docs/docs/subsystems/web-server.zh.md +12 -4
- package/references/official-docs/docs/subsystems/web.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/webhook.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/webhook.md +1 -1
- package/references/official-docs/docs/subsystems/webhook.zh.md +1 -1
- package/references/official-docs/docs/subsystems/workflow.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/workflow.md +2 -2
- package/references/official-docs/docs/subsystems/workflow.zh.md +2 -2
- package/references/official-docs/docs/subsystems/workspace.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/workspace.md +175 -35
- package/references/official-docs/docs/subsystems/workspace.zh.md +175 -35
- package/references/official-docs/docs/testing.i18n.yaml +33 -5
- package/references/official-docs/docs/testing.md +2 -2
- package/references/official-docs/docs/testing.zh.md +2 -2
- package/references/official-docs/docs/tool-catalog.i18n.yaml +312 -5
- package/references/official-docs/docs/tool-catalog.md +321 -92
- package/references/official-docs/docs/tool-catalog.zh.md +321 -92
- package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +9 -5
- package/references/official-docs/docs/tool-execution-pipeline.md +6 -3
- package/references/official-docs/docs/tool-execution-pipeline.zh.md +6 -3
- package/references/official-docs/docs/ui-radius.i18n.yaml +31 -0
- package/references/official-docs/docs/ui-radius.md +115 -0
- package/references/official-docs/docs/ui-radius.zh.md +115 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
- package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +27 -5
- package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +36 -5
- package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +30 -5
- package/references/official-docs/docs/user/develop/basic/publish.md +7 -1
- package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -1
- package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +15 -5
- package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +45 -5
- package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +30 -5
- package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +39 -5
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +9 -5
- package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +45 -5
- package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +33 -5
- package/references/official-docs/docs/user/develop/practice/llm-adapter.md +1 -1
- package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +1 -1
- package/references/official-docs/docs/user/guide/github-review.i18n.yaml +24 -5
- package/references/official-docs/docs/user/guide/index.i18n.yaml +18 -5
- package/references/official-docs/docs/user/guide/index.md +1 -0
- package/references/official-docs/docs/user/guide/index.zh.md +1 -0
- package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +36 -5
- package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +24 -5
- package/references/official-docs/docs/user/guide/providers-custom-form.png +0 -0
- package/references/official-docs/docs/user/guide/providers-custom-form.zh.png +0 -0
- package/references/official-docs/docs/user/guide/providers-models-page.png +0 -0
- package/references/official-docs/docs/user/guide/providers-models-page.zh.png +0 -0
- package/references/official-docs/docs/user/guide/providers.i18n.yaml +36 -5
- package/references/official-docs/docs/user/guide/providers.md +88 -78
- package/references/official-docs/docs/user/guide/providers.zh.md +102 -92
- package/references/official-docs/docs/user/guide/public-deployments.i18n.yaml +19 -0
- package/references/official-docs/docs/user/guide/public-deployments.md +33 -0
- package/references/official-docs/docs/user/guide/public-deployments.zh.md +33 -0
- package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +27 -5
- package/references/official-docs/docs/user/guide/python-sdk.md +1 -1
- package/references/official-docs/docs/user/guide/python-sdk.zh.md +1 -1
- package/references/official-docs/docs/user/guide/schedule.i18n.yaml +30 -5
- package/references/official-docs/docs/user/guide/schedule.md +69 -11
- package/references/official-docs/docs/user/guide/schedule.zh.md +69 -11
- package/references/official-docs/docs/user/index.i18n.yaml +9 -5
- package/references/official-docs/docs/web-styling.i18n.yaml +18 -5
- package/references/official-docs/docs/web-styling.md +12 -3
- package/references/official-docs/docs/web-styling.zh.md +12 -3
- package/references/official-docs/packages/AGENTS.md +1 -2
- package/references/official-docs/packages/README.md +5 -5
- package/references/official-docs/vendor/README.md +6 -2
- package/references/official-docs/website-docs.ts +10 -3
- package/references/official-plugin-dev-skill.md +124 -0
- package/references/sources.md +10 -5
- package/scripts/archive-discussions.ps1 +9 -1
- package/scripts/build-llms-full.mjs +64 -0
- package/scripts/check-docs-drift.ps1 +1 -1
- package/scripts/sync-official-docs.ps1 +1 -1
- package/templates/js/icon.svg +4 -0
- package/templates/js/locale/en.json +6 -0
- package/templates/js/locale/zh.json +6 -0
- package/templates/js/package.json +9 -1
- package/templates/ts/icon.svg +4 -0
- package/templates/ts/locale/en.json +6 -0
- package/templates/ts/locale/zh.json +6 -0
- package/templates/ts/package.json +9 -1
- package/references/official-docs/docs/subsystems/invariants.i18n.yaml +0 -6
- package/references/official-docs/docs/subsystems/invariants.md +0 -88
- package/references/official-docs/docs/subsystems/invariants.zh.md +0 -88
|
@@ -11,8 +11,8 @@ Source: [`packages/core/session/src/types.ts`](../../packages/core/session/src/t
|
|
|
11
11
|
The append-only event types. Merge-extensible: a plugin declares extra event types via declaration merging — e.g. the [compaction seam](compaction.md) adds `compaction/start` / `compaction/summary` / `compaction/end`, and `@deepseek-ai/dsh-hook-protocol` adds log-only `hook/invoked` / `hook/result` records for a hook bridge. Like `compaction/*`, these are NOT `SurfaceEventType`s (no `surfaceOp`). The generated [persistence log event catalog](../persistence-catalog.md) enumerates every member — core and merged — with its payload, surface badge, and declaration site.
|
|
12
12
|
|
|
13
13
|
```ts type-equiv
|
|
14
|
-
/** A user-role specialization of the
|
|
15
|
-
interface UserMessage extends
|
|
14
|
+
/** A user-role specialization of the shared message representation. */
|
|
15
|
+
interface UserMessage extends MessageBase {
|
|
16
16
|
readonly role: 'user'
|
|
17
17
|
}
|
|
18
18
|
```
|
|
@@ -53,6 +53,14 @@ interface SessionEventMap {
|
|
|
53
53
|
* project their `content` verbatim; `source` tells them apart.
|
|
54
54
|
*/
|
|
55
55
|
'user/message': UserMessage
|
|
56
|
+
/** An incremental agent session change admitted at the named turn and step. */
|
|
57
|
+
'developer/message': {
|
|
58
|
+
turn: number
|
|
59
|
+
step: number
|
|
60
|
+
message: DeveloperMessage
|
|
61
|
+
/** Earlier request/header defining every tool addition; required exactly when additions are present. */
|
|
62
|
+
headerSeq?: SessionSeq
|
|
63
|
+
}
|
|
56
64
|
/**
|
|
57
65
|
* The rendered system prompt on the model-visible surface. The loop appends
|
|
58
66
|
* the first one as surface node 0 before the step's first `user/message`.
|
|
@@ -116,7 +124,7 @@ interface SessionEventMap {
|
|
|
116
124
|
message: ToolResultMessage
|
|
117
125
|
/**
|
|
118
126
|
* Optional failure identity and raw user-facing reason, outside model content;
|
|
119
|
-
* allowed only when the
|
|
127
|
+
* allowed only when the message has `isError: true`.
|
|
120
128
|
*/
|
|
121
129
|
error?: { name: string; code: string; reason?: string }
|
|
122
130
|
meta?: JsonValue
|
|
@@ -128,7 +136,7 @@ interface SessionEventMap {
|
|
|
128
136
|
'request/header': {
|
|
129
137
|
header: EpochHeader
|
|
130
138
|
reason: RequestHeaderReason
|
|
131
|
-
/**
|
|
139
|
+
/** This request begins a distinct model-message series, independently of the header reason. */
|
|
132
140
|
startsSeries?: true
|
|
133
141
|
}
|
|
134
142
|
/**
|
|
@@ -139,18 +147,20 @@ interface SessionEventMap {
|
|
|
139
147
|
*/
|
|
140
148
|
'request/context': RequestContext
|
|
141
149
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
150
|
+
* Separates inherited or restored history from later lifecycle-owned work.
|
|
151
|
+
* This log-only marker need not be at {@link Session.firstLiveSeq}: a fork
|
|
152
|
+
* seed can already contain its tagged marker and child-owned synthetic
|
|
153
|
+
* closers before construction.
|
|
146
154
|
*
|
|
147
155
|
* A fresh fork child owns one `{ inherited: true }` marker at its exact
|
|
148
156
|
* inherited-prefix cut, even when that prefix ends in an ancestor marker.
|
|
149
|
-
*
|
|
150
|
-
*
|
|
157
|
+
* `buildForkSeed` appends that marker before any synthetic closers; the
|
|
158
|
+
* `Session` constructor supplies it when given only the inherited prefix.
|
|
159
|
+
* The last tagged marker is the current Session's cut; untagged markers
|
|
160
|
+
* keep ordinary restore and replay lifecycle boundaries.
|
|
151
161
|
*
|
|
152
|
-
* `Session`
|
|
153
|
-
*
|
|
162
|
+
* Only the `Session` constructor and `buildForkSeed` may create this marker.
|
|
163
|
+
* Session append does not reject other writers, so a plugin appending one
|
|
154
164
|
* would silently classify every live bracket before it as seed history.
|
|
155
165
|
*
|
|
156
166
|
* An owner of a standalone open/close bracket (`compaction/start` …
|
|
@@ -170,7 +180,7 @@ interface SessionEventMap {
|
|
|
170
180
|
|
|
171
181
|
### The request header event: `request/header`
|
|
172
182
|
|
|
173
|
-
The request envelope — the `EpochHeader` (call config + markers for adapter-supplied defaults + assembled tool schemas) — is logged session state, so every conversation request is a pure function of the log (the reconstructability Agent Note). The rendered system prompt is not part of the header: it is derived history, the `system/message` event at surface node 0 and any later in-history system node ([decision](../../.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md)), so a prompt change replaces or appends a system node and leaves the header unchanged. A full `request/header` snapshot with reason `'initial'` or `'resume'` records each loop-instance boundary; a changed request appends a snapshot with reason `'change'`; and an unchanged envelope beginning an explicitly declared message series or following a surface replacement appends a snapshot with reason `'series'`.
|
|
183
|
+
The request envelope — the `EpochHeader` (call config + markers for adapter-supplied defaults + assembled tool schemas) — is logged session state, so every conversation request is a pure function of the log (the reconstructability Agent Note). The rendered system prompt is not part of the header: it is derived history, the `system/message` event at surface node 0 and any later in-history system node ([decision](../../.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md)), so a prompt change replaces or appends a system node and leaves the header unchanged. A full `request/header` snapshot with reason `'initial'` or `'resume'` records each loop-instance boundary; a changed request appends a snapshot with reason `'change'`; and an unchanged envelope beginning an explicitly declared message series or following a surface replacement appends a snapshot with reason `'series'`. An `'initial'`, `'resume'`, or `'change'` snapshot carries `startsSeries: true` when that request also begins a series; reason `'series'` already records that fact. Ordinary append-only later Turns, further Steps, and retries in the same model-message series inherit the latest snapshot. `foldRequestHeader(events)` reconstructs the header by selecting the latest snapshot. The event is not a `SurfaceEventType`: it produces no LLM message.
|
|
174
184
|
|
|
175
185
|
```ts type-equiv
|
|
176
186
|
/**
|
|
@@ -186,6 +196,10 @@ interface EpochHeader {
|
|
|
186
196
|
adapterDefaults?: LlmCallConfigAdapterDefaults
|
|
187
197
|
/** Assembled tool schemas; absent for a tool-less request. */
|
|
188
198
|
tools?: ToolSchema[]
|
|
199
|
+
/** Retired request text; system prompts belong to system/message events.
|
|
200
|
+
* @persistenceReserved
|
|
201
|
+
*/
|
|
202
|
+
system?: never
|
|
189
203
|
}
|
|
190
204
|
```
|
|
191
205
|
|
|
@@ -193,7 +207,7 @@ Current event acceptance requires canonical `request/header.header`: any `system
|
|
|
193
207
|
|
|
194
208
|
### The route capacity event: `request/context`
|
|
195
209
|
|
|
196
|
-
The context metadata of the route a request resolved to is separate logged state, appended beside `request/header` inside the same step and only when the provider, model, capacity, or `systemPromptUpdate` mode differs from the previous record. It stays outside `EpochHeader` because that type is the reconstruction contract compared field-wise by `headerEquals`: capacity and the update mode describe a route, not a request input, so folding them in would let a route change register as a request-envelope `change` and would pull adapter metadata into the loop's reconstruction
|
|
210
|
+
The context metadata of the route a request resolved to is separate logged state, appended beside `request/header` inside the same step and only when the provider, model, capacity, or `systemPromptUpdate` mode differs from the previous record. It stays outside `EpochHeader` because that type is the reconstruction contract compared field-wise by `headerEquals`: capacity and the update mode describe a route, not a request input, so folding them in would let a route change register as a request-envelope `change` and would pull adapter metadata into the loop's request reconstruction. Like `request/header`, it is not a `SurfaceEventType` and produces no LLM message. `session.requestContext()` folds the latest record incrementally; the agent loop reads that record's `systemPromptUpdate` when it decides whether a changed system prompt replaces the latest system node or is appended after the cached history ([decision rule](../../packages/core/agent-loop/README.md#understand-the-implementation)). A route whose adapter advertises no capacity is recorded with `contextWindow` absent, so the new record clears an older route's capacity; a route without a declared update mode likewise clears an older route's `systemPromptUpdate`.
|
|
197
211
|
|
|
198
212
|
```ts type-equiv
|
|
199
213
|
/** Registration-bound metadata for one resolved model route. */
|
|
@@ -277,11 +291,11 @@ type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
277
291
|
|
|
278
292
|
`SessionEventType = keyof SessionEventMap`. Because `SessionEventMap` is merge-extensible, switches over `SessionEvent` must NOT use `assertNever` — a plugin-added variant is a valid unknown value; handle the known cases and fall through `default`.
|
|
279
293
|
|
|
280
|
-
Every surface event requires `surfaceOp`; known log-only events forbid both surface metadata fields. Native unknown or obsolete ignorable envelopes remain opaque. `assistant/message` embeds its provider stream and forbids `sourceEventSeqs`. System, user, and tool surface events may cite a complete non-empty set of unique earlier events when source attribution or replacement coverage requires it. A `tool/result` may carry `data.error` only when its
|
|
294
|
+
Every surface event requires `surfaceOp`; known log-only events forbid both surface metadata fields. Native unknown or obsolete ignorable envelopes remain opaque. `assistant/message` embeds its provider stream and forbids `sourceEventSeqs`. System, user, and tool surface events may cite a complete non-empty set of unique earlier events when source attribution or replacement coverage requires it. A `tool/result` may carry `data.error` only when its message has `isError: true`; failure identity remains optional for failed results.
|
|
281
295
|
|
|
282
296
|
## Surface types
|
|
283
297
|
|
|
284
|
-
The
|
|
298
|
+
The message-producing types (`SurfaceEventType` — `system/message`, `developer/message`, `user/message`, `assistant/message`, `tool/result`) carry surface metadata declaring how they join the ordered derived surface. `system/message` holds the rendered system prompt: the loop appends the first one as surface node 0 and, when the prompt changes, replaces exactly the latest system node or appends a new one on an in-history route; the surface fold rejects any other replacement covering a `system/message` at node 0, while a later system node is ordinary history that a compaction replacement may shadow. See the [session surface Agent Note](../../.agents/notes/implemented/architecture/2026-06-18-session-surface.md).
|
|
285
299
|
|
|
286
300
|
### `SurfaceEventType` — the message-producing subset of event types
|
|
287
301
|
|
|
@@ -294,6 +308,7 @@ The four message-producing types (`SurfaceEventType` — `system/message`, `user
|
|
|
294
308
|
*/
|
|
295
309
|
type SurfaceEventType =
|
|
296
310
|
| 'system/message'
|
|
311
|
+
| 'developer/message'
|
|
297
312
|
| 'user/message'
|
|
298
313
|
| 'assistant/message'
|
|
299
314
|
| 'tool/result'
|
|
@@ -458,29 +473,26 @@ declare class Session {
|
|
|
458
473
|
/** The session identity, derived from its durable header's single copy. */
|
|
459
474
|
get id(): SessionId;
|
|
460
475
|
/**
|
|
461
|
-
* The
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* the constructor-input boundary for lifecycle ownership and persistence
|
|
466
|
-
* adoption; consumers that need complete canonical history still start at
|
|
467
|
-
* seq 0. Distinct from {@link inheritedEventCount}, the DURABLE
|
|
468
|
-
* fork-lineage cut: a resumed session's constructor seed is its full stored
|
|
469
|
-
* log, while the inherited count keeps the original fork value — this field is the
|
|
470
|
-
* in-process construction fact.
|
|
471
|
-
*
|
|
472
|
-
* Not persisted itself: a seeded session projects it into the log as the
|
|
473
|
-
* `session/end-seed` event, which is what a consumer reading STORED history
|
|
474
|
-
* reads. Locate the LAST such event, not necessarily one at this seq — a
|
|
475
|
-
* seed already ending in one is not re-marked, so reopening an untouched
|
|
476
|
-
* session leaves that event at a smaller seq than `firstLiveSeq`. Prefer
|
|
477
|
-
* this field in-process: it is exact before the marker reaches storage.
|
|
476
|
+
* The constructor seed length (0 without one), before any marker appended
|
|
477
|
+
* during construction. Seed events never publish on `session/event`. A
|
|
478
|
+
* marker appended before the store attaches occupies this seq without
|
|
479
|
+
* publishing either; otherwise this seq is available for the next append.
|
|
478
480
|
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
481
|
+
* This in-process offset is not persisted. A fork seed can already contain
|
|
482
|
+
* the child's inherited marker and synthetic closers, so its child-owned
|
|
483
|
+
* history starts at {@link inheritedEventCount}, before this offset. A
|
|
484
|
+
* resumed Session's seed contains its full stored log, while its inherited
|
|
485
|
+
* count keeps the durable fork cut. Consumers needing complete canonical
|
|
486
|
+
* history start at seq 0.
|
|
482
487
|
*/
|
|
483
488
|
readonly firstLiveSeq: SessionLogOffset;
|
|
489
|
+
/**
|
|
490
|
+
* First event produced for this object lifecycle. A new fork includes its
|
|
491
|
+
* child-owned seed marker and closers; a restored Session starts after its
|
|
492
|
+
* complete stored prefix. This in-process capture offset is not persisted.
|
|
493
|
+
*/
|
|
494
|
+
readonly firstLifecycleSeq: SessionLogOffset;
|
|
495
|
+
|
|
484
496
|
/**
|
|
485
497
|
* Create a detached session by validating and snapshotting borrowed seed
|
|
486
498
|
* events and storage metadata.
|
|
@@ -616,6 +628,12 @@ declare class Session {
|
|
|
616
628
|
* @returns the latest immutable route metadata.
|
|
617
629
|
*/
|
|
618
630
|
requestContext(): RequestContext | undefined;
|
|
631
|
+
/**
|
|
632
|
+
* Fold unseen committed events into capability-independent tool history.
|
|
633
|
+
* Initial access reconstructs inherited history; later reads consume only new events.
|
|
634
|
+
* @returns an immutable snapshot for LLM request projection, including historical addition definitions.
|
|
635
|
+
*/
|
|
636
|
+
toolHistory(): ToolHistory;
|
|
619
637
|
/**
|
|
620
638
|
* Derive the LLM message history by walking the ordered sequences of
|
|
621
639
|
* message-producing events maintained by `surfaceOp` markers. The
|
|
@@ -647,11 +665,11 @@ declare class Session {
|
|
|
647
665
|
|
|
648
666
|
## Derived history: `deriveMessages()` and `deriveEventMessage()`
|
|
649
667
|
|
|
650
|
-
`Session.deriveMessages()` projects the event log into the `Message[]` the model sees — cached (each surface node projected once, when first seen; a surface rewrite rebuilds) and frozen (a fresh array per call over shared, deep-frozen messages, so mutating logged history through a projection is unrepresentable). `deriveEventMessage(event)` is the per-node pure function the fold applies — public so external reconstructors
|
|
668
|
+
`Session.deriveMessages()` projects the event log into the `Message[]` the model sees — cached (each surface node projected once, when first seen; a surface rewrite rebuilds) and frozen (a fresh array per call over shared, deep-frozen messages, so mutating logged history through a projection is unrepresentable). `deriveEventMessage(event)` is the per-node pure function the fold applies — public so external reconstructors project a log prefix with exactly the same rules and cannot disagree with the cache. The projection rules:
|
|
651
669
|
|
|
652
670
|
- `user/message` → a user message carrying exact `content`; an optional envelope remains log-only display metadata.
|
|
653
671
|
- `assistant/message` → an assistant message with the provider and model that produced it plus optional adapter-private replay state. Its embedded compact stream is replay, usage, and UI evidence rather than a second message. An **empty-content** `assistant/message` is also skipped — a max-tokens step cut off with no content still records an `assistant/message` to hold its stream, usage, provider, and model, but a content-less assistant turn must not enter the provider transcript.
|
|
654
|
-
- `tool/result` → a
|
|
672
|
+
- `tool/result` → a first-class tool-role message carrying its result content and tool-call identity.
|
|
655
673
|
- `user/message` (injected context, i.e. non-`user` source) → a user-role message carrying its `content` verbatim at its chronological position; its typed source names the producer and carries any producer-specific data.
|
|
656
674
|
|
|
657
675
|
Everything else (`turn/*`, `step/*`, `assistant/attempt`, plugin-owned `llm/retry`) is structural and does not project into a message. Token accounting expands the embedded stream on each `assistant/message` or `assistant/attempt`, while the message's top-level `usage` remains the committed-message authority when present. A failed model-request attempt therefore retains its provider usage without fabricating an assistant message. Current logical validation rejects request headers and assistant messages that omit provider/model instead of guessing a route; supported historical representations are normalized and validated by their adjacent format edge before a current Session exists.
|
|
@@ -662,7 +680,7 @@ Everything else (`turn/*`, `step/*`, `assistant/attempt`, plugin-owned `llm/retr
|
|
|
662
680
|
|
|
663
681
|
- `fork(source, boundary?, childSessionId?)` accepts a live `Session` object or live `SessionId`, selects source events through the inclusive `SessionSeq` boundary (default: current last event), requires the selected prefix to end outside an open turn, then creates a live child session with deep-cloned seed events, `parentSession`, `isSeeded: true`, the exact `inheritedEventCount`, and inherited `cwd`.
|
|
664
682
|
|
|
665
|
-
An explicit `boundary` lets callers fork from any stable between-turn position, including a previous `turn/end` or a later standalone log-only event, even if the source has newer events or an open current turn. The API rejects a prefix that ends inside an open turn instead of clipping silently.
|
|
683
|
+
An explicit `boundary` lets callers fork from any stable between-turn position, including a previous `turn/end` or a later standalone log-only event, even if the source has newer events or an open current turn. The API rejects a prefix that ends inside an open turn instead of clipping silently. `dsh-subagent-fork-in-process` keeps its completed-prefix clipping because tool-time delegation usually starts while the parent turn is open; ordinary session branching should make the requested boundary explicit.
|
|
666
684
|
|
|
667
685
|
## Why a turn ended: `TurnEndReasonMap`
|
|
668
686
|
|
|
@@ -698,20 +716,27 @@ interface TurnEndReasonMap {
|
|
|
698
716
|
* the events recorded before the crash remain intact.
|
|
699
717
|
*/
|
|
700
718
|
interrupted: { kind: 'interrupted' }
|
|
719
|
+
/**
|
|
720
|
+
* Fork-seed construction closed a turn that was still open at the fork
|
|
721
|
+
* boundary in the source session. Only fork seeds carry this marker — the
|
|
722
|
+
* loop never emits it — and the source events before the boundary remain
|
|
723
|
+
* intact in the child.
|
|
724
|
+
*/
|
|
725
|
+
forked: { kind: 'forked' }
|
|
701
726
|
}
|
|
702
727
|
```
|
|
703
728
|
|
|
704
|
-
`max-tokens` mirrors the model-call `FinishReason` of the same name: any `max-tokens` step in a turn makes the whole turn end `max-tokens` rather than `completed` (the cut-short fact wins over a later continuation), so a consumer can tell a clean stop from a truncated one. Cancellation and errors remain distinct outcomes.
|
|
729
|
+
`max-tokens` mirrors the model-call `FinishReason` of the same name: any `max-tokens` step in a turn makes the whole turn end `max-tokens` rather than `completed` (the cut-short fact wins over a later continuation), so a consumer can tell a clean stop from a truncated one. Cancellation and errors remain distinct outcomes. The loop emits neither `interrupted` nor `forked` live: crash recovery synthesizes `interrupted` (see [persistence.md](persistence.md)), while fork-seed construction synthesizes `forked`. The map is merge-extensible.
|
|
705
730
|
|
|
706
731
|
## Execution enclosure and standalone events
|
|
707
732
|
|
|
708
733
|
A turn encloses one model-loop execution, not the whole session log. AgentLoop records injected `user/message` events only from entering pre-step batches inside a turn; plugin-owned log-only events may still appear between `turn/end` and the next `turn/start`, consuming event seqs without incrementing turn numbers. Persistence admits every contiguous accepted event into a bounded durable batch, while crash repair closes only a genuinely open trailing turn. A producer that needs an immediate durability barrier explicitly awaits `ctx.sessions.flush(session)`.
|
|
709
734
|
|
|
710
|
-
|
|
735
|
+
Merge-extensible event relations belong to the plugin that declares them, so core does not reject an unknown event merely because no turn is open. See [the standalone-event decision](../../.agents/notes/implemented/simplification/2026-07-28-remove-synthetic-log-only-turns.md).
|
|
711
736
|
|
|
712
737
|
## The end-seed boundary: `session/end-seed`
|
|
713
738
|
|
|
714
|
-
|
|
739
|
+
`buildForkSeed` appends `session/end-seed { inherited: true }` at the exact inherited-prefix cut before adding synthetic fork closers. The `Session` constructor retains that prepared marker or appends one when given only the inherited prefix. A restore retains the tagged marker and appends an ordinary `session/end-seed {}` only when its complete stored seed does not already end in a marker. Both forms are log-only and produce no message; only the constructor and `buildForkSeed` may create them.
|
|
715
740
|
|
|
716
741
|
For fork lineage, locate the LAST marker whose payload carries `inherited: true`; current-format decoding requires it exactly when `SessionHeader.isSeeded` is true and derives `inheritedEventCount` from its seq. For lifecycle ownership, locate the last `session/end-seed` of either form. Reopening a seed that already ends in any marker does not append another ordinary marker.
|
|
717
742
|
|
|
@@ -721,7 +746,7 @@ Consumers that order Sessions by human activity exclude this boundary: picking a
|
|
|
721
746
|
|
|
722
747
|
## Plugin-contributed log-only events
|
|
723
748
|
|
|
724
|
-
A plugin may declaration-merge extra `SessionEventMap` types. These are **log-only**: NOT `SurfaceEventType`s (they carry no `surfaceOp` and contribute nothing to derived history). Their owner decides whether they belong to an open execution turn or may stand between turns
|
|
749
|
+
A plugin may declaration-merge extra `SessionEventMap` types. These are **log-only**: NOT `SurfaceEventType`s (they carry no `surfaceOp` and contribute nothing to derived history). Their owner decides whether they belong to an open execution turn or may stand between turns. The generated [persistence log event catalog](../persistence-catalog.md) enumerates every core and plugin-contributed event; the compaction seam's `compaction/*` semantics are discussed on [compaction.md](compaction.md).
|
|
725
750
|
|
|
726
751
|
When several events in one plugin-owned family assemble into one Web Client Conversation Node, every start, update, result, resource, or interruption event in that family carries or independently derives the same stable business id. This requirement applies to correlated Node families, not to every Session event; it lets the client group each event without guessing from adjacency or scanning history. See the [Conversation subsystem](conversation.md).
|
|
727
752
|
|
|
@@ -739,6 +764,8 @@ The backends that consume this contract are on [persistence.md](persistence.md).
|
|
|
739
764
|
|
|
740
765
|
`SessionOpenWorkspacePathRequest` carries an absolute or workspace-resolved `path`; optional `action: "reveal"` selects file-manager navigation instead of default-application opening. `SessionOpenWorkspacePathValue` confirms that the Host accepted the native handoff. A Session-aware Client resolves relative paths against its current Session cwd when known; the controller hands the path to the opener unchanged and reports invalid requests, cancellation, and opener failures through the Session Remote error vocabulary.
|
|
741
766
|
|
|
767
|
+
The optional `application` selects a registered file handler without changing the system default; `workspacePathApplications({ path })` returns current handlers, names, icons, and default selection after Host path verification.
|
|
768
|
+
|
|
742
769
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
743
770
|
|
|
744
771
|
<a id="cordis-surface"></a>
|
|
@@ -772,7 +799,7 @@ inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspectio
|
|
|
772
799
|
/**
|
|
773
800
|
* Read all visible Session rows without resuming an Agent.
|
|
774
801
|
* @param _request - reserved empty list request.
|
|
775
|
-
* @param signal - cancellation for persistence reads.
|
|
802
|
+
* @param signal - cancellation for persistence reads and summary generation.
|
|
776
803
|
* @returns visible Session summaries ordered by activity.
|
|
777
804
|
*/
|
|
778
805
|
@Remote('list') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>
|
|
@@ -793,12 +820,18 @@ inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspectio
|
|
|
793
820
|
@Remote('create') create(request: SessionCreateRequest): Promise<SessionCreateValue>
|
|
794
821
|
|
|
795
822
|
/**
|
|
796
|
-
* Select one Session-local model after explicitly resuming the Session.
|
|
823
|
+
* Select one Session-local model after explicitly resuming the Session; save the default in the background.
|
|
797
824
|
* @param request - Session identity and requested model selection.
|
|
798
|
-
* @returns the normalized selection installed for the Session.
|
|
825
|
+
* @returns the normalized selection installed for the Session, without waiting for default persistence.
|
|
799
826
|
*/
|
|
800
827
|
@Remote('selectModel') selectModel(request: SessionSelectModelRequest): Promise<SessionSelectModelValue>
|
|
801
828
|
|
|
829
|
+
/**
|
|
830
|
+
* Select the first available account model after login when no provider API key is configured.
|
|
831
|
+
* @returns after saving the first available model or retaining the existing default.
|
|
832
|
+
*/
|
|
833
|
+
@Remote async initializeDefaultModel(): Promise<void>
|
|
834
|
+
|
|
802
835
|
/**
|
|
803
836
|
* Describe every currently routable model for Host-generation selectors.
|
|
804
837
|
* @returns provider-grouped models, the deployment default, and isolated provider failures.
|
|
@@ -818,14 +851,23 @@ inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspectio
|
|
|
818
851
|
workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' | 'explorer' | 'directory' | null }
|
|
819
852
|
|
|
820
853
|
/**
|
|
821
|
-
*
|
|
854
|
+
* Verify one path through the composed filesystem and open it on the Host desktop.
|
|
822
855
|
* @param request - path after best-effort Session workspace resolution.
|
|
823
856
|
* @param signal - caller lifetime; abort terminates the native command.
|
|
824
857
|
* @returns confirmation after the native opener accepts the path.
|
|
825
|
-
* @throws RemoteError when the request is invalid, cancelled, or the opener fails.
|
|
858
|
+
* @throws RemoteError when the request is invalid, has no verified Host mapping, is cancelled, or the opener fails.
|
|
826
859
|
*/
|
|
827
860
|
@Remote('openWorkspacePath') async openWorkspacePath( request: SessionOpenWorkspacePathRequest, signal: AbortSignal, ): Promise<SessionOpenWorkspacePathValue>
|
|
828
861
|
|
|
862
|
+
/**
|
|
863
|
+
* Query current file handlers on the serving desktop without activating an Agent.
|
|
864
|
+
* @param request - file path in Host filesystem syntax.
|
|
865
|
+
* @param signal - caller lifetime, propagated to filesystem and desktop queries.
|
|
866
|
+
* @returns OS application names, icons, and default selection; empty when desktop opening is unavailable.
|
|
867
|
+
* @throws RemoteError when the path is invalid, the query is cancelled, or native discovery fails.
|
|
868
|
+
*/
|
|
869
|
+
@Remote('workspacePathApplications') async workspacePathApplications( request: { readonly path: string }, signal: AbortSignal, ): Promise<readonly SessionWorkspacePathApplication[]>
|
|
870
|
+
|
|
829
871
|
/**
|
|
830
872
|
* Rename one Session after explicitly resuming it.
|
|
831
873
|
* @param request - Session identity and proposed title.
|
|
@@ -834,8 +876,10 @@ workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' |
|
|
|
834
876
|
@Remote('rename') rename(request: SessionRenameRequest): Promise<SessionRenameValue>
|
|
835
877
|
|
|
836
878
|
/**
|
|
837
|
-
* Fork one cold-readable
|
|
838
|
-
*
|
|
879
|
+
* Fork one cold-readable exact event prefix into a new Session. An omitted
|
|
880
|
+
* boundary selects the latest completed-turn prefix; an open cut receives
|
|
881
|
+
* synthetic fork closers.
|
|
882
|
+
* @param request - source Session and optional exact inclusive event boundary.
|
|
839
883
|
* @returns the new Session identity.
|
|
840
884
|
*/
|
|
841
885
|
@Remote('fork') fork(request: SessionForkRequest): Promise<SessionForkValue>
|
|
@@ -886,6 +930,14 @@ workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' |
|
|
|
886
930
|
*/
|
|
887
931
|
@Remote({ mode: 'stream' }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>
|
|
888
932
|
|
|
933
|
+
/**
|
|
934
|
+
* Read all registered projections without activating an Agent.
|
|
935
|
+
* @param request - Session whose current values are required.
|
|
936
|
+
* @param signal - cancellation for the Session observation.
|
|
937
|
+
* @returns complete baseline, or null when the Session does not exist.
|
|
938
|
+
*/
|
|
939
|
+
@Remote('projections') async projections(request: SessionProjectionsRequest, signal: AbortSignal): Promise<SessionProjectionsValue>
|
|
940
|
+
|
|
889
941
|
/**
|
|
890
942
|
* Stream a complete live-control baseline followed by replacement frames.
|
|
891
943
|
* @param signal - cancellation owned by the Remote stream carrier.
|
|
@@ -999,8 +1051,8 @@ announce(session: Session): void
|
|
|
999
1051
|
* store owns the carrier, so callers (the checkpoint policy's per-request
|
|
1000
1052
|
* barrier, goal-round-driver's idle checkpoint, teardown drains, and consumers
|
|
1001
1053
|
* that flush themselves before reading storage) must come through here
|
|
1002
|
-
* rather than dispatch a raw `ctx.parallel('session/flush', …)` — one owner
|
|
1003
|
-
* one spelling
|
|
1054
|
+
* rather than dispatch a raw `ctx.parallel('session/flush', …)` — one owner
|
|
1055
|
+
* and one spelling.
|
|
1004
1056
|
* @param session - the session whose buffered events must reach durable storage.
|
|
1005
1057
|
* @returns whether at least one durability listener participated, after every
|
|
1006
1058
|
* listener has settled successfully.
|
|
@@ -1022,10 +1074,12 @@ get(id: SessionId): Session | undefined
|
|
|
1022
1074
|
list(): Session[]
|
|
1023
1075
|
|
|
1024
1076
|
/**
|
|
1025
|
-
* Create a live child session from
|
|
1077
|
+
* Create a live child session from an exact prefix of a live source.
|
|
1026
1078
|
* `boundary` is an inclusive source event seq; omitted means the source's
|
|
1027
|
-
* current last event.
|
|
1028
|
-
*
|
|
1079
|
+
* current last event. An open tail receives synthetic tool results and
|
|
1080
|
+
* step/turn closers with the forked cause. Closed steps and turns remain
|
|
1081
|
+
* unchanged, including any failed tool calls already missing results.
|
|
1082
|
+
* `inheritedEventCount` counts only copied source events, excluding these closers.
|
|
1029
1083
|
*
|
|
1030
1084
|
* @param source - Live source session object or id.
|
|
1031
1085
|
* @param boundary - Inclusive source event seq to fork through; omitted means
|
|
@@ -1070,13 +1124,14 @@ Source: [`packages/api/session-controller/src/types.ts`](../../packages/api/sess
|
|
|
1070
1124
|
|
|
1071
1125
|
#### `api-session/added` — emit
|
|
1072
1126
|
|
|
1073
|
-
A Session became visible
|
|
1127
|
+
A Session became visible or its Agent was created or disposed. Consumers upsert the summary and replace its current running and availability state.
|
|
1074
1128
|
|
|
1075
1129
|
```ts cordis-catalog
|
|
1076
1130
|
/**
|
|
1077
|
-
* A Session became visible
|
|
1131
|
+
* A Session became visible or its Agent was created or disposed.
|
|
1132
|
+
* Consumers upsert the summary and replace its current running and availability state.
|
|
1078
1133
|
* @mode emit
|
|
1079
|
-
* @param summary -
|
|
1134
|
+
* @param summary - current list row for the Session.
|
|
1080
1135
|
*/
|
|
1081
1136
|
'api-session/added'(summary: SessionSummary): void
|
|
1082
1137
|
```
|
|
@@ -1161,7 +1216,6 @@ Creation announcement during session publication. A synchronous throw vetoes and
|
|
|
1161
1216
|
* Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners
|
|
1162
1217
|
* receive only sessions entered through that agent's context.
|
|
1163
1218
|
* @param session - the session just entered and announced.
|
|
1164
|
-
* @dshScopeScan unsupported
|
|
1165
1219
|
* @mode emit
|
|
1166
1220
|
*/
|
|
1167
1221
|
'session/created'(this: Scoped<Session>, session: Session): void
|
|
@@ -1184,7 +1238,6 @@ Emitted once when an announced session leaves the store, including publication r
|
|
|
1184
1238
|
* did not begin. Listener failures are logged and contained.
|
|
1185
1239
|
* Scope-filtered dispatch (`@deepseek-ai/dsh-scope`) reuses the owner scope.
|
|
1186
1240
|
* @param session - the session that is no longer live in the store.
|
|
1187
|
-
* @dshScopeScan unsupported
|
|
1188
1241
|
* @mode emit
|
|
1189
1242
|
*/
|
|
1190
1243
|
'session/disposed'(this: Scoped<Session>, session: Session): void
|
|
@@ -1209,7 +1262,6 @@ Post-commit, fire-and-forget append feed. The listener snapshot resolves before
|
|
|
1209
1262
|
* receive only events from sessions entered through that agent's context.
|
|
1210
1263
|
* @param session - the session whose log grew.
|
|
1211
1264
|
* @param event - the appended event, exactly as recorded.
|
|
1212
|
-
* @dshScopeScan unsupported
|
|
1213
1265
|
* @mode emit
|
|
1214
1266
|
*/
|
|
1215
1267
|
'session/event'(this: Scoped<Session>, session: Session, event: SessionEvent): void
|
|
@@ -1231,7 +1283,6 @@ Awaited parallel durability checkpoint: every listener runs and the caller await
|
|
|
1231
1283
|
* caller awaits all of them, with no waterfall veto. Scope-filtered dispatch
|
|
1232
1284
|
* (`@deepseek-ai/dsh-scope`) reuses the session's owner scope.
|
|
1233
1285
|
* @param session - the session whose buffered events must reach durable storage.
|
|
1234
|
-
* @dshScopeScan unsupported
|
|
1235
1286
|
* @mode parallel
|
|
1236
1287
|
*/
|
|
1237
1288
|
'session/flush'(this: Scoped<Session>, session: Session): Promise<void> | void
|