dsh-plugin-guide 0.3.1 → 0.3.2
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 +1 -1
- package/README.hi.md +1 -1
- package/README.md +1 -1
- package/README.pt.md +1 -1
- package/README.zh.md +1 -1
- package/SKILL.md +1 -1
- package/dist/dsh-plugin-dev.js +5 -5
- package/guide/links.md +1 -1
- package/guide/plugin-dev-guide.md +1 -1
- package/guide/quick-reference.es.md +2 -2
- package/guide/quick-reference.hi.md +1 -1
- package/guide/quick-reference.md +2 -2
- package/guide/quick-reference.pt.md +2 -2
- package/guide/quick-reference.zh-CN.md +2 -2
- package/package.json +3 -3
- package/references/cordis-paper-and-community.md +1 -1
- package/references/official-docs/AGENTS.md +27 -22
- package/references/official-docs/README.i18n.yaml +2 -2
- package/references/official-docs/README.md +1 -1
- package/references/official-docs/README.zh.md +19 -9
- package/references/official-docs/SNAPSHOT.md +5 -5
- package/references/official-docs/THIRD_PARTY_NOTICES.md +36 -13
- package/references/official-docs/docs/AGENTS.md +4 -4
- package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
- package/references/official-docs/docs/agent-lifecycle.md +1 -1
- package/references/official-docs/docs/agent-lifecycle.zh.md +2 -2
- package/references/official-docs/docs/api-gateway.i18n.yaml +2 -2
- package/references/official-docs/docs/api-gateway.md +8 -8
- package/references/official-docs/docs/api-gateway.zh.md +8 -8
- package/references/official-docs/docs/architecture.i18n.yaml +2 -2
- package/references/official-docs/docs/architecture.md +23 -7
- package/references/official-docs/docs/architecture.zh.md +36 -20
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +132 -67
- package/references/official-docs/docs/capability-seams.zh.md +132 -67
- package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/config-catalog.md +659 -373
- package/references/official-docs/docs/config-catalog.zh.md +677 -391
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-package.md +2 -3
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +8 -7
- package/references/official-docs/docs/cookbook/{adding-a-conversation-node.i18n.yaml → adding-a-remote-api.i18n.yaml} +3 -3
- package/references/official-docs/docs/cookbook/adding-a-remote-api.md +197 -0
- package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +197 -0
- package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +6 -0
- package/references/official-docs/docs/cookbook/adding-a-settings-card.md +102 -0
- package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +102 -0
- package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-tool.md +11 -4
- package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +16 -9
- 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 +2 -2
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.zh.md +4 -4
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.md +1 -1
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.zh.md +3 -3
- package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/extension-cookbook.md +9 -8
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +17 -14
- package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +1 -1
- package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.zh.md +1 -1
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +1 -1
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/references/official-docs/docs/cordis-api/context.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-api/context.zh.md +1 -1
- package/references/official-docs/docs/cordis-api/events.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-api/events.zh.md +1 -1
- package/references/official-docs/docs/cordis-api/inherited.md +1 -1
- package/references/official-docs/docs/cordis-primer.i18n.yaml +2 -2
- package/references/official-docs/docs/cordis-primer.md +2 -1
- package/references/official-docs/docs/cordis-primer.zh.md +3 -2
- package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/01-first-plugin.zh.md +4 -4
- package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +4 -4
- package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/03-services.zh.md +4 -4
- package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/04-events.zh.md +4 -4
- package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +2 -2
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.zh.md +3 -3
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +2 -2
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.md +5 -4
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.zh.md +11 -10
- package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +1 -1
- package/references/official-docs/docs/cordis-tutorial/index.zh.md +10 -10
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +6 -0
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +159 -0
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +159 -0
- package/references/official-docs/docs/defensive-patterns.i18n.yaml +1 -1
- package/references/official-docs/docs/defensive-patterns.zh.md +3 -1
- package/references/official-docs/docs/development.i18n.yaml +2 -2
- package/references/official-docs/docs/development.md +9 -13
- package/references/official-docs/docs/development.zh.md +23 -21
- package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
- package/references/official-docs/docs/event-producer-consumer.md +55 -46
- package/references/official-docs/docs/event-producer-consumer.zh.md +55 -46
- 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/graph-atlas.i18n.yaml +2 -2
- package/references/official-docs/docs/graph-atlas.md +0 -2
- package/references/official-docs/docs/graph-atlas.zh.md +7 -9
- package/references/official-docs/docs/i18n/README.i18n.yaml +2 -2
- package/references/official-docs/docs/i18n/README.md +7 -7
- package/references/official-docs/docs/i18n/README.zh.md +11 -9
- package/references/official-docs/docs/i18n/style-samples.md +3 -3
- package/references/official-docs/docs/i18n/translation-prompt.md +3 -3
- package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +2 -2
- package/references/official-docs/docs/i18n/translation-rules.md +2 -2
- package/references/official-docs/docs/i18n/translation-rules.zh.md +3 -3
- package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
- package/references/official-docs/docs/module-graph.md +666 -747
- package/references/official-docs/docs/module-graph.zh.md +668 -749
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-catalog.md +172 -40
- package/references/official-docs/docs/persistence-catalog.zh.md +180 -48
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +2 -2
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.md +2 -2
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.zh.md +3 -3
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +2 -2
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +2 -2
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +2 -2
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +2 -2
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.md +2 -2
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +2 -2
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +2 -2
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +1 -1
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +2 -2
- package/references/official-docs/docs/postmortem/README.i18n.yaml +1 -1
- package/references/official-docs/docs/postmortem/README.zh.md +5 -5
- 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 +3 -3
- package/references/official-docs/docs/subsystems/README.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/README.md +8 -2
- package/references/official-docs/docs/subsystems/README.zh.md +53 -47
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/agent-team.md +206 -0
- package/references/official-docs/docs/subsystems/agent-team.zh.md +206 -0
- package/references/official-docs/docs/subsystems/approval.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/approval.md +12 -12
- package/references/official-docs/docs/subsystems/approval.zh.md +13 -13
- package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/attachment.md +90 -7
- package/references/official-docs/docs/subsystems/attachment.zh.md +90 -7
- package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/client-modules.md +69 -19
- package/references/official-docs/docs/subsystems/client-modules.zh.md +69 -19
- package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/code-runtime.md +5 -5
- package/references/official-docs/docs/subsystems/code-runtime.zh.md +6 -6
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/commands.md +29 -6
- package/references/official-docs/docs/subsystems/commands.zh.md +30 -7
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/compaction.md +5 -5
- package/references/official-docs/docs/subsystems/compaction.zh.md +11 -11
- package/references/official-docs/docs/subsystems/conversation.i18n.yaml +6 -0
- package/references/official-docs/docs/{cookbook/adding-a-conversation-node.md → subsystems/conversation.md} +49 -24
- package/references/official-docs/docs/{cookbook/adding-a-conversation-node.zh.md → subsystems/conversation.zh.md} +49 -24
- package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/core.md +110 -33
- package/references/official-docs/docs/subsystems/core.zh.md +141 -62
- package/references/official-docs/docs/subsystems/credentials.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/credentials.md +207 -11
- package/references/official-docs/docs/subsystems/credentials.zh.md +207 -11
- package/references/official-docs/docs/subsystems/extensions.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/extensions.md +27 -9
- package/references/official-docs/docs/subsystems/extensions.zh.md +30 -12
- package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/feedback.md +4 -4
- package/references/official-docs/docs/subsystems/feedback.zh.md +4 -4
- package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/filesystem.md +17 -7
- package/references/official-docs/docs/subsystems/filesystem.zh.md +19 -9
- package/references/official-docs/docs/subsystems/goal.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/goal.md +4 -4
- package/references/official-docs/docs/subsystems/goal.zh.md +8 -8
- package/references/official-docs/docs/subsystems/invariants.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/invariants.md +2 -2
- package/references/official-docs/docs/subsystems/invariants.zh.md +5 -5
- package/references/official-docs/docs/subsystems/jobs.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/jobs.md +3 -3
- package/references/official-docs/docs/subsystems/jobs.zh.md +6 -6
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/llm-streaming.md +193 -22
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +199 -28
- package/references/official-docs/docs/subsystems/lsp.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/lsp.md +2 -2
- package/references/official-docs/docs/subsystems/lsp.zh.md +3 -3
- package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/permission-presets.md +8 -8
- package/references/official-docs/docs/subsystems/permission-presets.zh.md +8 -8
- package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/persistence.md +35 -17
- package/references/official-docs/docs/subsystems/persistence.zh.md +38 -20
- package/references/official-docs/docs/subsystems/plan.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/plan.md +4 -4
- package/references/official-docs/docs/subsystems/plan.zh.md +10 -10
- package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/sandbox.md +5 -3
- package/references/official-docs/docs/subsystems/sandbox.zh.md +8 -6
- package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/schedule.md +9 -3
- package/references/official-docs/docs/subsystems/schedule.zh.md +11 -5
- package/references/official-docs/docs/subsystems/scope.i18n.yaml +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 +136 -67
- package/references/official-docs/docs/subsystems/session-projection.zh.md +136 -67
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-query.md +11 -3
- package/references/official-docs/docs/subsystems/session-query.zh.md +12 -4
- package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-reference.md +94 -7
- package/references/official-docs/docs/subsystems/session-reference.zh.md +95 -8
- package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-telemetry.md +5 -6
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +9 -10
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-title.md +3 -3
- 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 +284 -39
- package/references/official-docs/docs/subsystems/session.zh.md +301 -54
- package/references/official-docs/docs/subsystems/settings.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/settings.md +105 -10
- package/references/official-docs/docs/subsystems/settings.zh.md +105 -10
- package/references/official-docs/docs/subsystems/shell.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/shell.md +3 -3
- package/references/official-docs/docs/subsystems/shell.zh.md +11 -11
- package/references/official-docs/docs/subsystems/skills.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/skills.md +26 -3
- package/references/official-docs/docs/subsystems/skills.zh.md +29 -6
- package/references/official-docs/docs/subsystems/slots.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/slots.md +174 -0
- package/references/official-docs/docs/subsystems/slots.zh.md +174 -0
- package/references/official-docs/docs/subsystems/spill.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/spill.md +4 -4
- package/references/official-docs/docs/subsystems/spill.zh.md +6 -6
- package/references/official-docs/docs/subsystems/storage.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/storage.md +13 -5
- package/references/official-docs/docs/subsystems/storage.zh.md +16 -8
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subagent.md +120 -32
- package/references/official-docs/docs/subsystems/subagent.zh.md +131 -41
- package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subprocess.md +3 -3
- package/references/official-docs/docs/subsystems/subprocess.zh.md +5 -5
- package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/system-prompt.md +21 -8
- package/references/official-docs/docs/subsystems/system-prompt.zh.md +23 -10
- package/references/official-docs/docs/subsystems/terminal.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/terminal.md +2 -2
- package/references/official-docs/docs/subsystems/terminal.zh.md +4 -4
- package/references/official-docs/docs/subsystems/todo.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/todo.md +32 -0
- package/references/official-docs/docs/subsystems/todo.zh.md +32 -0
- package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/token-meter.md +27 -12
- package/references/official-docs/docs/subsystems/token-meter.zh.md +28 -13
- package/references/official-docs/docs/subsystems/tools.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/tools.md +46 -46
- package/references/official-docs/docs/subsystems/tools.zh.md +54 -54
- package/references/official-docs/docs/subsystems/typert.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/typert.md +65 -58
- package/references/official-docs/docs/subsystems/typert.zh.md +67 -60
- package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/user-questions.md +35 -35
- package/references/official-docs/docs/subsystems/user-questions.zh.md +35 -35
- package/references/official-docs/docs/subsystems/web-client.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/web-client.md +95 -0
- package/references/official-docs/docs/subsystems/web-client.zh.md +95 -0
- package/references/official-docs/docs/subsystems/web-server.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/web-server.md +55 -9
- package/references/official-docs/docs/subsystems/web-server.zh.md +56 -10
- package/references/official-docs/docs/subsystems/web.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/web.md +14 -7
- package/references/official-docs/docs/subsystems/web.zh.md +16 -9
- package/references/official-docs/docs/subsystems/webhook.i18n.yaml +6 -0
- package/references/official-docs/docs/subsystems/webhook.md +70 -0
- package/references/official-docs/docs/subsystems/webhook.zh.md +70 -0
- 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 +13 -13
- package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/workspace.md +98 -5
- package/references/official-docs/docs/subsystems/workspace.zh.md +102 -9
- package/references/official-docs/docs/testing.i18n.yaml +2 -2
- package/references/official-docs/docs/testing.md +15 -10
- package/references/official-docs/docs/testing.zh.md +15 -10
- package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-catalog.md +433 -27
- package/references/official-docs/docs/tool-catalog.zh.md +438 -29
- package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-execution-pipeline.md +1 -1
- package/references/official-docs/docs/tool-execution-pipeline.zh.md +1 -1
- package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/basic/config.md +1 -1
- package/references/official-docs/docs/user/develop/basic/config.zh.md +4 -4
- package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +1 -1
- package/references/official-docs/docs/user/develop/basic/index.zh.md +5 -5
- package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/basic/publish.md +3 -3
- package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -7
- package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/basic/tool.md +3 -3
- package/references/official-docs/docs/user/develop/basic/tool.zh.md +4 -4
- package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/framework/events.md +2 -2
- package/references/official-docs/docs/user/develop/framework/events.zh.md +3 -3
- package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +1 -1
- package/references/official-docs/docs/user/develop/framework/index.zh.md +3 -3
- package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/framework/service.md +1 -1
- package/references/official-docs/docs/user/develop/framework/service.zh.md +3 -3
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +6 -0
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.md +15 -0
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
- package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/practice/index.md +1 -1
- package/references/official-docs/docs/user/develop/practice/index.zh.md +3 -3
- package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +2 -2
- package/references/official-docs/docs/user/develop/practice/llm-adapter.md +4 -3
- package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +4 -3
- package/references/official-docs/docs/user/guide/github-review.i18n.yaml +6 -0
- package/references/official-docs/docs/user/guide/github-review.md +102 -0
- package/references/official-docs/docs/user/guide/github-review.zh.md +102 -0
- package/references/official-docs/docs/user/guide/index.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/index.md +2 -2
- package/references/official-docs/docs/user/guide/index.zh.md +8 -8
- package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +6 -0
- package/references/official-docs/docs/user/guide/mcp-memory.md +101 -0
- package/references/official-docs/docs/user/guide/mcp-memory.zh.md +101 -0
- package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/providers.md +40 -1
- package/references/official-docs/docs/user/guide/providers.zh.md +41 -2
- package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/python-sdk.md +80 -34
- package/references/official-docs/docs/user/guide/python-sdk.zh.md +87 -41
- package/references/official-docs/docs/user/guide/schedule.i18n.yaml +6 -0
- package/references/official-docs/docs/user/guide/schedule.md +21 -0
- package/references/official-docs/docs/user/guide/schedule.zh.md +21 -0
- package/references/official-docs/docs/web-styling.i18n.yaml +1 -1
- package/references/official-docs/docs/web-styling.zh.md +2 -2
- package/references/official-docs/packages/AGENTS.md +3 -2
- package/references/official-docs/packages/README.md +104 -59
- package/references/official-docs/vendor/README.md +1 -0
- package/references/official-docs/website-docs.ts +52 -11
- package/references/sources.md +2 -2
- package/references/website-pages.md +3 -3
- package/scripts/download-sources.ps1 +1 -1
- package/scripts/sync-official-docs.ps1 +19 -11
- package/scripts/verify-kit.ps1 +0 -4
- package/templates/js/README.es.md +1 -1
- package/templates/js/README.hi.md +1 -1
- package/templates/js/README.md +1 -1
- package/templates/js/README.pt.md +1 -1
- package/templates/js/README.zh.md +1 -1
- package/templates/js/package.json +4 -4
- package/templates/ts/README.es.md +1 -1
- package/templates/ts/README.hi.md +1 -1
- package/templates/ts/README.md +1 -1
- package/templates/ts/README.pt.md +1 -1
- package/templates/ts/README.zh.md +1 -1
- package/templates/ts/package.json +4 -4
- package/references/official-docs/examples/AGENTS.md +0 -20
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/schedule.md
|
|
5
|
-
schedule.md:
|
|
6
|
-
schedule.zh.md:
|
|
5
|
+
schedule.md: f98cf319d588f805e4630ca572f10c3c45e94b79
|
|
6
|
+
schedule.zh.md: bee816be9cc49943f5815d4d13869b27e30380d5
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](schedule.zh.md)
|
|
4
4
|
|
|
5
|
-
Schedule owns durable reminders that return to the original live Session as ordinary later conversation turns. The [durable Schedule Agent Note](../../.agents/notes/implemented/feature/2026-08-05-durable-web-schedule.md) owns
|
|
5
|
+
Schedule owns durable reminders that return to the original live Session as ordinary later conversation turns. The [durable Schedule Agent Note](../../.agents/notes/implemented/feature/2026-08-05-durable-web-schedule.md) owns persistence, lifecycle, and active-state presentation, [conversational delivery](../../.agents/notes/implemented/simplification/2026-08-09-conversational-schedule-delivery.md) owns the no-receipt boundary, the [explicit time-zone boundary](../../.agents/notes/implemented/simplification/2026-08-09-explicit-schedule-time-zone.md) owns browser-local interpretation, and [bounded fixed-rate Schedule](../../.agents/notes/implemented/simplification/2026-08-09-bounded-fixed-rate-schedule.md) owns recurrence. This page records the durable and model-facing shapes from [`packages/schedule/schedule/src/types.ts`](../../packages/schedule/schedule/src/types.ts); the [package README](../../packages/schedule/schedule/README.md) owns composition, tool behavior, and the exact reminder framing.
|
|
6
6
|
|
|
7
7
|
## Durable records
|
|
8
8
|
|
|
@@ -149,7 +149,7 @@ type ScheduleDispatchChange = OneShotScheduleDispatchChange | EveryScheduleDispa
|
|
|
149
149
|
type ScheduleChange = ScheduleCreateChange | ScheduleDeleteChange | ScheduleDispatchChange
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
The strict decoder and fold reject unknown versions, extra fields, reused ids, mismatched one-shot or Every dispatch shapes, and delete or dispatch transitions against inactive records. A normal Session folds its complete event stream. A fork folds only events at or after `SessionHeader.seedLength`, so it retains history without adopting the parent Session's active reminders. The `schedule/change` declaration and source location are also indexed in the [persistence catalog](../persistence-catalog.md#schedulechange--log-only).
|
|
152
|
+
The strict decoder and fold reject unknown versions, extra fields, reused ids, mismatched one-shot or Every dispatch shapes, and delete or dispatch transitions against inactive records. A normal Session folds its complete event stream. A fork folds only events at or after `SessionHeader.seedLength`, so it retains history without adopting the parent Session's active reminders. The Schedule projection derives that boundary from the immutable header passed to `init(header)`, uses the shared transition, and persists both active records and used-id history so cached restore preserves strict replay. The `schedule/change` declaration and source location are also indexed in the [persistence catalog](../persistence-catalog.md#schedulechange--log-only).
|
|
153
153
|
|
|
154
154
|
## Active views and management
|
|
155
155
|
|
|
@@ -177,10 +177,16 @@ type ScheduleView = ScheduleRecord & {
|
|
|
177
177
|
|
|
178
178
|
The generated [tool catalog](../tool-catalog.md#deepseek-aidsh-schedule) owns the argument and result schemas for `schedule_create`, `schedule_list`, and `schedule_delete`. Management calls serialize with due work in one Agent-scoped queue. Every read or decision first waits for the shared Session persistence barrier; create and an actual delete wait again after appending. A barrier failure reports `persistence_uncertain` instead of guessing whether an eager write committed. The other stable error codes are `invalid_prompt`, `invalid_selector`, `invalid_rule`, `invalid_time_zone`, `not_future`, `time_out_of_range`, `frequency_too_high`, `corrupt_schedule_log`, and `internal_error`.
|
|
179
179
|
|
|
180
|
+
## Read-only Web catalog
|
|
181
|
+
|
|
182
|
+
When the optional Session projection registry is present, Schedule registers the client-visible `schedule` key whose value is the complete active `ScheduleRecord[]`. Live, cache, history, and detached reads use the same header-aware strict fold; malformed authoritative input fails the existing read path instead of publishing a partial value.
|
|
183
|
+
|
|
184
|
+
The shipped Web bundle keeps `ui-schedule` disabled by default, while the explicit Schedule overlay enables it together with the Host capability. [`dsh-client-ui-schedule`](../../packages/client/ui-schedule/README.md) owns the header interaction, [`dsh-client-ui-workspace`](../../packages/client/ui-workspace/README.md) owns list-row presentation, and the durable Schedule Agent Note owns their shared active-state boundary. The shared value represents current active state, never delivery history or a receipt; due reminders still appear through the ordinary Assistant output described below.
|
|
185
|
+
|
|
180
186
|
## Live delivery
|
|
181
187
|
|
|
182
188
|
The process-local owner derives its earliest timer from the durable fold and rereads the wall clock after every bounded wait. Cold Sessions do no work; reopening one reconstructs timers and makes past targets overdue. Due one-shots take priority and enter one later turn at a time. When no one-shot is due, all overdue Every records form the single batch described above.
|
|
183
189
|
|
|
184
190
|
Due work waits for the Agent to become fully idle and claims the maintenance phase before it refolds state, samples the decision, queues one `followup()`, and appends the corresponding dispatch changes. It never calls `steer()` and never interrupts a current turn.
|
|
185
191
|
|
|
186
|
-
The admitted one-shot or fixed-rate batch starts one normal later turn and appears only through the ordinary conversation transcript; Schedule has no independent durable Web receipt
|
|
192
|
+
The admitted one-shot or fixed-rate batch starts one normal later turn and appears only through the ordinary conversation transcript; Schedule has no independent durable Web receipt. The read-only active catalog above never represents delivery success. If framing or synchronous queue admission fails, no dispatch is recorded and the reminder stays active. The narrow crash interval after admission but before durable dispatch can repeat reminder content after recovery, so the boundary is best-effort at-least-once rather than exactly-once delivery.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[English](schedule.md) | 中文
|
|
4
4
|
|
|
5
|
-
Schedule 拥有持久提醒;这些提醒会作为普通的后续对话轮次返回原 live Session。[持久 Schedule Agent Note](../../.agents/notes/implemented/feature/2026-08-05-durable-web-schedule.md)
|
|
5
|
+
Schedule 拥有持久提醒;这些提醒会作为普通的后续对话轮次返回原 live Session。[持久 Schedule Agent Note](../../.agents/notes/implemented/feature/2026-08-05-durable-web-schedule.zh.md) 负责持久化、生命周期与活动状态呈现,[对话式交付](../../.agents/notes/implemented/simplification/2026-08-09-conversational-schedule-delivery.zh.md) 负责无回执边界,[显式时区边界](../../.agents/notes/implemented/simplification/2026-08-09-explicit-schedule-time-zone.zh.md) 负责浏览器本地解释,[有界固定速率 Schedule](../../.agents/notes/implemented/simplification/2026-08-09-bounded-fixed-rate-schedule.zh.md) 负责重复调度。本页记录 [`packages/schedule/schedule/src/types.ts`](../../packages/schedule/schedule/src/types.ts) 中的持久数据形状和面向模型的数据形状;[包 README](../../packages/schedule/schedule/README.zh.md) 负责组合、工具行为与确切的提醒 framing。
|
|
6
6
|
|
|
7
7
|
## 持久记录
|
|
8
8
|
|
|
9
|
-
`ScheduleId` 是[品牌化 id](core.md#branded-ids),在单个 Session 内唯一且绝不复用。版本 1 支持正的安全整数 `after_seconds` 延时、显式的绝对 `at` 目标,或至少五分钟的安全整数 `every_seconds` 间隔。创建操作会将每个初始目标规范化为使用四位年份的 RFC 3339 UTC `scheduledAt`;`after` 记录会保留提交的延时,`at` 记录只存储结果时点,`every` 记录则保留固定间隔和下一个目标。
|
|
9
|
+
`ScheduleId` 是[品牌化 id](core.zh.md#branded-ids),在单个 Session 内唯一且绝不复用。版本 1 支持正的安全整数 `after_seconds` 延时、显式的绝对 `at` 目标,或至少五分钟的安全整数 `every_seconds` 间隔。创建操作会将每个初始目标规范化为使用四位年份的 RFC 3339 UTC `scheduledAt`;`after` 记录会保留提交的延时,`at` 记录只存储结果时点,`every` 记录则保留固定间隔和下一个目标。
|
|
10
10
|
|
|
11
11
|
```ts type-equiv
|
|
12
12
|
/** Durable one-shot reminder created from a positive delay. */
|
|
@@ -149,7 +149,7 @@ type ScheduleDispatchChange = OneShotScheduleDispatchChange | EveryScheduleDispa
|
|
|
149
149
|
type ScheduleChange = ScheduleCreateChange | ScheduleDeleteChange | ScheduleDispatchChange
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
严格 decoder 与 fold 会拒绝未知版本、额外字段、复用 id、不匹配的一次性提醒或 Every dispatch 形状,以及针对非活动记录的 delete 或 dispatch 转换。普通 Session 折叠完整事件流。fork 只折叠 `SessionHeader.seedLength` 位置及其后的事件,因此保留历史,但不会接管父 Session
|
|
152
|
+
严格 decoder 与 fold 会拒绝未知版本、额外字段、复用 id、不匹配的一次性提醒或 Every dispatch 形状,以及针对非活动记录的 delete 或 dispatch 转换。普通 Session 折叠完整事件流。fork 只折叠 `SessionHeader.seedLength` 位置及其后的事件,因此保留历史,但不会接管父 Session 的活动提醒。Schedule projection 从传给 `init(header)` 的不可变 header 派生该边界,复用共享 transition,并持久化活动记录与已使用 id 历史,使缓存恢复继续保持严格回放。`schedule/change` 声明和源码位置也编入[持久化目录](../persistence-catalog.zh.md#schedulechange--log-only)。
|
|
153
153
|
|
|
154
154
|
## 活动视图与管理
|
|
155
155
|
|
|
@@ -175,7 +175,13 @@ type ScheduleView = ScheduleRecord & {
|
|
|
175
175
|
}
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
生成的[工具目录](../tool-catalog.md#deepseek-aidsh-schedule)负责 `schedule_create`、`schedule_list` 和 `schedule_delete` 的参数与结果 schema。一条 Agent-scoped 队列将管理调用与到期工作串行化。每次读取或判断都会先等待共享的 Session 持久化 barrier;create 与实际执行的 delete 在追加后还会再次等待。barrier 失败会报告 `persistence_uncertain`,而不是猜测 eager write 是否已提交。其他稳定错误代码是 `invalid_prompt`、`invalid_selector`、`invalid_rule`、`invalid_time_zone`、`not_future`、`time_out_of_range`、`frequency_too_high`、`corrupt_schedule_log` 和 `internal_error`。
|
|
178
|
+
生成的[工具目录](../tool-catalog.zh.md#deepseek-aidsh-schedule)负责 `schedule_create`、`schedule_list` 和 `schedule_delete` 的参数与结果 schema。一条 Agent-scoped 队列将管理调用与到期工作串行化。每次读取或判断都会先等待共享的 Session 持久化 barrier;create 与实际执行的 delete 在追加后还会再次等待。barrier 失败会报告 `persistence_uncertain`,而不是猜测 eager write 是否已提交。其他稳定错误代码是 `invalid_prompt`、`invalid_selector`、`invalid_rule`、`invalid_time_zone`、`not_future`、`time_out_of_range`、`frequency_too_high`、`corrupt_schedule_log` 和 `internal_error`。
|
|
179
|
+
|
|
180
|
+
## 只读 Web 目录
|
|
181
|
+
|
|
182
|
+
可选 Session projection 注册表存在时,Schedule 会注册客户端可见的 `schedule` key,其值是完整的活动 `ScheduleRecord[]`。live、cache、history 与 detached 读取共用同一套 header-aware 严格 fold;畸形权威输入会使既有读取路径失败,而不会发布部分值。
|
|
183
|
+
|
|
184
|
+
shipped Web bundle 默认禁用 `ui-schedule`,显式 Schedule overlay 则把它与 Host 能力一同启用。[`dsh-client-ui-schedule`](../../packages/client/ui-schedule/README.zh.md)拥有 header 交互,[`dsh-client-ui-workspace`](../../packages/client/ui-workspace/README.zh.md)拥有列表行呈现,持久 Schedule Agent Note 拥有二者共享的活动状态边界。共享值只表示当前活动状态,绝不表示交付历史或回执;到期提醒仍通过下文所述的普通 Assistant 输出出现。
|
|
179
185
|
|
|
180
186
|
## Live 交付
|
|
181
187
|
|
|
@@ -183,4 +189,4 @@ type ScheduleView = ScheduleRecord & {
|
|
|
183
189
|
|
|
184
190
|
到期工作会先等待 Agent 完全 idle 并认领 maintenance phase,再重新折叠状态、采样本次判断、将一个 `followup()` 排入队列,并追加对应的 dispatch 变更。它绝不会调用 `steer()`,也绝不会中断当前轮次。
|
|
185
191
|
|
|
186
|
-
获得准入的一次性提醒或固定速率批次会启动一个普通的后续轮次,且只通过普通对话 transcript(文本记录)出现;Schedule 不提供独立的持久 Web
|
|
192
|
+
获得准入的一次性提醒或固定速率批次会启动一个普通的后续轮次,且只通过普通对话 transcript(文本记录)出现;Schedule 不提供独立的持久 Web 回执。上面的只读活动目录绝不表示交付成功。如果 framing 构造或同步队列准入失败,则不会记录 dispatch,提醒仍保持活动。队列准入后、持久 dispatch 前的狭窄崩溃窗口可能使提醒内容在恢复后重复,因此该边界提供的是尽力而为的至少一次交付,而非恰好一次交付。
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/scope.md
|
|
5
5
|
scope.md: c425217de224839d719da213e33f58bd2e6bf002
|
|
6
|
-
scope.zh.md:
|
|
6
|
+
scope.zh.md: 448f9fbfdc2211e9134cdf831a6e5311511acdfe
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](scope.md) | 中文
|
|
4
4
|
|
|
5
|
-
[scope 包](../../packages/core/scope)提供身份、载体与作用域层词汇,使同一注册上下文同时表达每个 agent(智能体)的可见性和共享生命周期所有权。它是库原语,而不是 Cordis 服务;生命周期设计理由由 [agent-scope 运行时设计 Agent Note](../../.agents/notes/implemented/architecture/2026-07-12-agent-scope-runtime-design.md#scope-routing-one-opaque-key-selects-one-layer)规定,注册表层决策由[共享存储 Agent Note](../../.agents/notes/implemented/architecture/2026-07-12-scoped-layers-store.md)规定,可调用 API 与过滤语义则由包 [README](../../packages/core/scope/README.md)规定。
|
|
5
|
+
[scope 包](../../packages/core/scope)提供身份、载体与作用域层词汇,使同一注册上下文同时表达每个 agent(智能体)的可见性和共享生命周期所有权。它是库原语,而不是 Cordis 服务;生命周期设计理由由 [agent-scope 运行时设计 Agent Note](../../.agents/notes/implemented/architecture/2026-07-12-agent-scope-runtime-design.zh.md#scope-routing-one-opaque-key-selects-one-layer)规定,注册表层决策由[共享存储 Agent Note](../../.agents/notes/implemented/architecture/2026-07-12-scoped-layers-store.zh.md)规定,可调用 API 与过滤语义则由包 [README](../../packages/core/scope/README.zh.md)规定。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/core/scope/src/index.ts`](../../packages/core/scope/src/index.ts) 与 [`packages/core/scope/src/store.ts`](../../packages/core/scope/src/store.ts)。
|
|
8
8
|
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/session-projection.md
|
|
5
|
-
session-projection.md:
|
|
6
|
-
session-projection.zh.md:
|
|
5
|
+
session-projection.md: b5bacc4846a9a9709bb8c102aaa78810a2752110
|
|
6
|
+
session-projection.zh.md: 36653721a125ceef13bff8b1a4562e7981a45696
|
|
@@ -2,33 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](session-projection.zh.md)
|
|
4
4
|
|
|
5
|
-
The session-projection seam — a [capability seam](../capability-seams.md) through which domain host plugins serve whole current values of log-derived per-session state to client carriers: the Service Definition and registry ([dsh-session-projection](../../packages/session/session-projection), `ctx.sessionProjections`), domain contributors (each registering one pure unit), and carriers ([dsh-
|
|
5
|
+
The session-projection seam — a [capability seam](../capability-seams.md) through which domain host plugins serve whole current values of log-derived per-session state to client carriers: the Service Definition and registry ([dsh-session-projection](../../packages/session/session-projection), `ctx.sessionProjections`), domain contributors (each registering one pure unit), and carriers ([dsh-session-controller](../../packages/api/session-controller)'s history tail page and `session/projection` push frame). It is one optional capability, not part of the agent-loop spine. The framework drives, the domain computes: the registry subscribes to `session/event` once and folds every committed event through every unit; domains hold no subscriptions and clients never fold domain events — they receive finished values. Design authority: the [session-projection RFC](../../.agents/notes/proposed/architecture/2026-07-27-session-projection-and-command-log.md); drive/cache/feed contracts: the [package README](../../packages/session/session-projection/README.md).
|
|
6
6
|
|
|
7
7
|
Source: [`packages/session/session-projection/src/index.ts`](../../packages/session/session-projection/src/index.ts)
|
|
8
8
|
|
|
9
9
|
## The unit
|
|
10
10
|
|
|
11
|
-
`
|
|
11
|
+
`SessionProjectionStateMap` is the merge-extensible table of host fold states, while `SessionProjectionMap` retains the client-visible whole values. A domain contributes one `ProjectionDefinition` per state key; a `wire` block makes that key client-visible, and rendering belongs to the slot system, never this layer:
|
|
12
12
|
|
|
13
13
|
```ts type-equiv
|
|
14
14
|
/**
|
|
15
|
-
* One domain's state-driven computation unit:
|
|
16
|
-
*
|
|
15
|
+
* One domain's state-driven computation unit: a pure synchronous fold plus
|
|
16
|
+
* declarations and an optional client view — never an opaque getter. The framework drives
|
|
17
17
|
* `apply` on every committed session event; the domain holds no
|
|
18
|
-
* subscriptions and owns only the
|
|
19
|
-
* synchronous (an async unit would tear the carriers' consistency cut) and
|
|
18
|
+
* subscriptions and owns only the computation. All functions MUST be
|
|
19
|
+
* synchronous (an async unit would tear the carriers' consistency cut), and
|
|
20
20
|
* `state` MUST be plain JSON (the persisted-cache precondition).
|
|
21
21
|
*/
|
|
22
|
-
interface ProjectionDefinition<
|
|
23
|
-
|
|
22
|
+
interface ProjectionDefinition<
|
|
23
|
+
K extends keyof SessionProjectionStateMap,
|
|
24
|
+
S extends SessionProjectionStateMap[K] = SessionProjectionStateMap[K],
|
|
25
|
+
> {
|
|
26
|
+
/** The projection key this unit owns (its `SessionProjectionStateMap` entry). */
|
|
24
27
|
key: K
|
|
25
|
-
/** Validates
|
|
26
|
-
|
|
28
|
+
/** Validates persisted state before it seeds a fold. */
|
|
29
|
+
stateSchema: ZodType<S>
|
|
27
30
|
/**
|
|
28
|
-
* State for the empty log.
|
|
31
|
+
* State for the empty log and its immutable Session metadata.
|
|
32
|
+
* @param header - immutable metadata for the Session being projected.
|
|
29
33
|
* @returns the initial state.
|
|
30
34
|
*/
|
|
31
|
-
init(): S
|
|
35
|
+
init(header: SessionHeader): NoInfer<S>
|
|
32
36
|
/**
|
|
33
37
|
* Pure transition: previous state + one committed event → next state. A
|
|
34
38
|
* unit uninterested in an event MUST return the same state reference — an
|
|
@@ -37,13 +41,21 @@ interface ProjectionDefinition<K extends keyof SessionProjectionMap, S> {
|
|
|
37
41
|
* @param event - the next committed session event.
|
|
38
42
|
* @returns the next state (same reference when the event is not the unit's).
|
|
39
43
|
*/
|
|
40
|
-
apply(state: S
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
apply(state: NoInfer<S>, event: SessionEvent): NoInfer<S>
|
|
45
|
+
/** Client view. Omit for host-only units. */
|
|
46
|
+
wire?: K extends keyof SessionProjectionMap ? {
|
|
47
|
+
/** Validates the wire payload before it leaves the host. */
|
|
48
|
+
viewSchema: ZodType<SessionProjectionMap[K]>
|
|
49
|
+
/**
|
|
50
|
+
* State → wire payload (the read-side projection). The live drive keeps
|
|
51
|
+
* the two latest raw results and compares them with `Object.is`; an
|
|
52
|
+
* object-valued view must reuse its reference to suppress publication
|
|
53
|
+
* across internal-only state changes.
|
|
54
|
+
* @param state - the current state.
|
|
55
|
+
* @returns the whole current value for this unit's key.
|
|
56
|
+
*/
|
|
57
|
+
view(state: NoInfer<S>): SessionProjectionMap[K]
|
|
58
|
+
} : never
|
|
47
59
|
/**
|
|
48
60
|
* Persisted-cache invalidation version: bump whenever the serialized state fields or the
|
|
49
61
|
* fold semantics change, so persisted `(sessionId, key, ver, seq, val)`
|
|
@@ -60,23 +72,23 @@ The whole-value event rule is load-bearing: a state-carrying log event carries t
|
|
|
60
72
|
|
|
61
73
|
```ts type-equiv
|
|
62
74
|
/**
|
|
63
|
-
* One consistent read cut over every registered unit for one session.
|
|
75
|
+
* One consistent read cut over every registered client-visible unit for one session.
|
|
64
76
|
* `asOfSeq` is the shared watermark — the seq of the last event every value
|
|
65
|
-
* reflects (`-1` for an empty log
|
|
77
|
+
* reflects (`-1` for an empty log).
|
|
66
78
|
*/
|
|
67
79
|
interface ProjectionSnapshot {
|
|
68
80
|
/** Seq of the last event the values reflect; -1 for an empty log. */
|
|
69
81
|
asOfSeq: number
|
|
70
|
-
/** Whole current value per registered key. */
|
|
82
|
+
/** Whole current client value per registered key. */
|
|
71
83
|
values: Partial<SessionProjectionMap>
|
|
72
84
|
}
|
|
73
85
|
```
|
|
74
86
|
|
|
75
87
|
```ts type-equiv
|
|
76
88
|
/**
|
|
77
|
-
* Change-feed listener: one unit's
|
|
78
|
-
* the schema-validated
|
|
79
|
-
* emission (the seq of the event that caused the change).
|
|
89
|
+
* Change-feed listener: one unit's raw `view` result changed by `Object.is`
|
|
90
|
+
* for one session. `value` is the schema-validated output; `seq` is the
|
|
91
|
+
* unit's watermark at emission (the seq of the event that caused the change).
|
|
80
92
|
*/
|
|
81
93
|
type ProjectionChangeListener = (
|
|
82
94
|
session: Session,
|
|
@@ -86,11 +98,11 @@ type ProjectionChangeListener = (
|
|
|
86
98
|
) => void
|
|
87
99
|
```
|
|
88
100
|
|
|
89
|
-
`snapshot(session)` is fully synchronous: a carrier reads it in the same tick as its page slice, so `asOfSeq` covers both reads at one sequence number.
|
|
101
|
+
`snapshot(session)` is fully synchronous: a carrier reads it in the same tick as its page slice, so `asOfSeq` covers both reads at one sequence number. It returns only client views, and every value passes its unit's `viewSchema` before return. `stateOf(session, key)` reads one live host state without computing unrelated views; callers must not mutate the borrowed reference. A state-reference change computes one cached raw view, and the change feed fires only when that result changes by `Object.is`; an object-valued view must preserve its reference to suppress publication across internal-only state changes.
|
|
90
102
|
|
|
91
103
|
## The registry: `ctx.sessionProjections`
|
|
92
104
|
|
|
93
|
-
`SessionProjectionRegistry` ([signatures](#ctxsessionprojections--sessionprojectionregistry)) owns the drive: one `session/event` subscription, eager `apply` over every registered unit, and per-session per-unit watermark cells. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect whose disposer rides the calling fiber: an unloaded domain plugin's key (with its cached cells) disappears from subsequent drives and snapshots, and clients read that as capability absence; duplicate
|
|
105
|
+
`SessionProjectionRegistry` ([signatures](#ctxsessionprojections--sessionprojectionregistry)) owns the drive: one `session/event` subscription, eager `apply` over every registered unit, and per-session per-unit watermark cells. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect whose disposer rides the calling fiber: an unloaded domain plugin's key (with its cached cells) disappears from subsequent drives and snapshots, and clients read that as capability absence; a duplicate key with a different `stateVersion` throws, while same-version registrants share one unit and are counted. Domain plugins register under `ctx.inject(['sessionProjections'], …)` so headless assemblies without the registry stay unaffected.
|
|
94
106
|
|
|
95
107
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
96
108
|
|
|
@@ -98,63 +110,77 @@ type ProjectionChangeListener = (
|
|
|
98
110
|
|
|
99
111
|
## Cordis API
|
|
100
112
|
|
|
101
|
-
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) —
|
|
113
|
+
Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnpm run verify-cordis-catalog` in doc-sync; regenerate with `pnpm run gen-cordis-catalog`) — the language sides differ only in locale-specific paired document paths. Signature blocks use a `ts cordis-catalog` fence and keep the original source JSDoc; dispatch modes are defined in the [primer](../cordis-primer.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
102
114
|
|
|
103
115
|
<a id="ctxsessionprojectioncache--sessionprojectioncache"></a>
|
|
104
116
|
|
|
105
117
|
### `ctx.sessionProjectionCache` — `SessionProjectionCache`
|
|
106
118
|
|
|
107
|
-
The persisted projection cache service. Opens the `session_projcache` domain at init, checkpoints live sessions on a throttled write-behind (count/interval triggers from Config) plus
|
|
119
|
+
The persisted projection cache service. Opens the `session_projcache` domain at init, checkpoints live sessions on a throttled write-behind (count/interval triggers from Config) plus three mandatory points — session creation, `turn/end`, and session disposal (the live-to-cold moment) — and serves the cached rows for a session header. Every durable write is fail-soft: failures log a warning and the cache self-heals on the next write.
|
|
108
120
|
|
|
109
121
|
```ts cordis-catalog
|
|
110
122
|
/**
|
|
111
123
|
* The zero-I/O listing read: whole values viewed straight from the stored
|
|
112
|
-
* rows (version-matching keys only), each cut carried with its watermark
|
|
113
|
-
*
|
|
114
|
-
*
|
|
124
|
+
* rows (version-matching keys only), each cut carried with its watermark so
|
|
125
|
+
* a client value store can seed under its higher-seq-wins rule — as stale
|
|
126
|
+
* as the last durable checkpoint but never wrong, and never from an
|
|
115
127
|
* unrelated log (the caller's header is the identity witness). Fresher
|
|
116
|
-
* paths (the history tail baseline
|
|
117
|
-
*
|
|
128
|
+
* paths (the history tail baseline) supersede these values whenever a
|
|
129
|
+
* session is actually opened.
|
|
118
130
|
* @param meta - the listed session's header (identity witness; no log read).
|
|
131
|
+
* @param keys - optional projection keys required by the caller's audience.
|
|
119
132
|
* @returns the cut (`asOfSeq` = lowest served-row watermark), or
|
|
120
133
|
* `undefined` when no usable row exists for this lifecycle.
|
|
121
134
|
*/
|
|
122
|
-
cachedSnapshot(meta: SessionHeader): ProjectionSnapshot | undefined
|
|
135
|
+
cachedSnapshot( meta: SessionHeader, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Hydrate projection cells for an already-prepared Session without another
|
|
139
|
+
* persistence read. The cache seeds matching rows; the supplied exact log
|
|
140
|
+
* advances every unit to the observation cut. No checkpoint is written
|
|
141
|
+
* because the logical observation may contain recovery events not yet durable.
|
|
142
|
+
* @param session - exact unpublished Session retained by persistence.
|
|
143
|
+
* @param meta - observed lifecycle header.
|
|
144
|
+
* @param events - exact logical event prefix represented by the observation.
|
|
145
|
+
* @returns all projection values at the event cut.
|
|
146
|
+
*/
|
|
147
|
+
hydratePrepared( session: Session, meta: SessionHeader, events: readonly SessionEvent[], ): ProjectionSnapshot
|
|
123
148
|
|
|
124
149
|
/**
|
|
125
|
-
* Durably checkpoint one live session NOW (
|
|
150
|
+
* Durably checkpoint one live session NOW (all mandatory points call
|
|
126
151
|
* this; tests and carriers may too). The registry cut is snapshotted at
|
|
127
|
-
* this boundary (states are live references), then the
|
|
128
|
-
* replaced. NOT fail-soft — callers on the
|
|
152
|
+
* this boundary (states are live references), then the session's record is
|
|
153
|
+
* replaced on the domain's write chain. NOT fail-soft — callers on the
|
|
154
|
+
* fail-soft paths contain it.
|
|
129
155
|
* @param session - the live session to checkpoint.
|
|
130
156
|
* @returns resolution after durability and event emission.
|
|
131
157
|
*/
|
|
132
158
|
async write(session: Session): Promise<void>
|
|
133
159
|
|
|
134
160
|
/**
|
|
135
|
-
* Cold-read one
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* @param
|
|
143
|
-
* @param
|
|
144
|
-
* @returns the
|
|
161
|
+
* Cold-read one session's projections from its complete log. Each unit is
|
|
162
|
+
* seeded from the identity-checked cached rows — the registry skips `apply`
|
|
163
|
+
* for the already-folded prefix (events at or below the row's `seq`) — and
|
|
164
|
+
* the refreshed checkpoint is written back (fail-soft, fire-and-forget), so
|
|
165
|
+
* the first cold read creates the cache row and later ones seed from it.
|
|
166
|
+
* The caller supplies the complete log in seq order: this service never
|
|
167
|
+
* consults the persistence layer.
|
|
168
|
+
* @param meta - the stored session header (identity witness).
|
|
169
|
+
* @param events - the session's complete log, in seq order.
|
|
170
|
+
* @returns the projection cut at the log end.
|
|
145
171
|
*/
|
|
146
|
-
|
|
172
|
+
coldSnapshot(meta: SessionHeader, events: readonly SessionEvent[]): ProjectionSnapshot
|
|
147
173
|
```
|
|
148
174
|
|
|
149
|
-
Types: [Session](session.md) · [
|
|
175
|
+
Types: [Session](session.md) · [SessionEvent](session.md) · [SessionHeader](persistence.md)
|
|
150
176
|
|
|
151
|
-
Source: [`packages/session/session-projection-cache/src/index.ts
|
|
177
|
+
Source: [`packages/session/session-projection-cache/src/index.ts`](../../packages/session/session-projection-cache/src/index.ts)
|
|
152
178
|
|
|
153
179
|
<a id="ctxsessionprojections--sessionprojectionregistry"></a>
|
|
154
180
|
|
|
155
181
|
### `ctx.sessionProjections` — `SessionProjectionRegistry`
|
|
156
182
|
|
|
157
|
-
`ctx.sessionProjections`: the projection unit table and its drive. The service subscribes to `session/event` once; every committed event passes every registered unit's `apply` (eager drive)
|
|
183
|
+
`ctx.sessionProjections`: the projection unit table and its drive. The service subscribes to `session/event` once; every committed event passes every registered unit's `apply` (eager drive). A changed state reference computes the next client view; the change feed is notified only when its raw result changes by `Object.is`. Cells build lazily — a unit registered after events flowed, or a session older than the registry, folds `init` over the in-memory log on first touch (event or read). Registration is an effect (disposer rides the calling fiber): an unloaded domain plugin's key disappears from snapshots and clients read it as capability absence. A host reader either declares `sessionProjections` in its plugin `inject` or fails explicitly when the registry or required key is absent. Contributors may preserve optional registration through `ctx.inject(['sessionProjections'], ...)`. Registrants sharing a key share one unit and are counted: the same tool package mounted in N agent presets registers N times, and the key survives until the last one unloads.
|
|
158
184
|
|
|
159
185
|
```ts cordis-catalog
|
|
160
186
|
/**
|
|
@@ -165,28 +191,57 @@ Source: [`packages/session/session-projection-cache/src/index.ts:71`](../../pack
|
|
|
165
191
|
* @param definition - key, state schema, pure unit functions, and stateVersion.
|
|
166
192
|
* @returns the exact disposer that unregisters this unit.
|
|
167
193
|
*/
|
|
168
|
-
register<K extends keyof SessionProjectionMap, S>(definition: ProjectionDefinition<K, S>): () => void
|
|
194
|
+
register< K extends keyof SessionProjectionMap, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, 'wire'> & { wire: NonNullable<ProjectionDefinition<K, S>['wire']> }, ): () => void
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Register one host-only unit. Its state is omitted from client snapshots
|
|
198
|
+
* and always checkpointed like every other unit.
|
|
199
|
+
* @param definition - key, state schema, pure unit functions, and stateVersion.
|
|
200
|
+
* @returns the exact disposer that unregisters this unit.
|
|
201
|
+
*/
|
|
202
|
+
register< K extends Exclude<keyof SessionProjectionStateMap, keyof SessionProjectionMap>, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, 'wire'>, ): () => void
|
|
169
203
|
|
|
170
204
|
/**
|
|
171
205
|
* Subscribe to the change feed. The registration is an effect on the
|
|
172
206
|
* calling context's fiber.
|
|
173
|
-
* @param listener - called once per unit whose
|
|
207
|
+
* @param listener - called once per client-visible unit whose raw view changed by `Object.is`, per committed event.
|
|
174
208
|
* @returns the exact disposer that unsubscribes.
|
|
175
209
|
*/
|
|
176
210
|
onChanged(listener: ProjectionChangeListener): () => void
|
|
177
211
|
|
|
178
212
|
/**
|
|
179
|
-
*
|
|
213
|
+
* Read one unit's current host state after materializing every registered
|
|
214
|
+
* unit at the Session cursor. Unrelated wire views are not produced.
|
|
215
|
+
* The returned value is live; callers must not mutate it.
|
|
216
|
+
* @param session - the session whose state is read.
|
|
217
|
+
* @param key - the registered unit key.
|
|
218
|
+
* @returns current state, or `undefined` when the key is not registered.
|
|
219
|
+
*/
|
|
220
|
+
stateOf<K extends keyof SessionProjectionStateMap>( session: Session, key: K, ): SessionProjectionStateMap[K] | undefined
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* One consistent cut over every registered client-visible unit for one session, read from
|
|
180
224
|
* the watermark cache (missing cells fold lazily over the in-memory log).
|
|
181
225
|
* Fully synchronous — every value and `asOfSeq` reflect the same log
|
|
182
|
-
* position. Each value passes its unit's
|
|
226
|
+
* position. Each value passes its unit's `viewSchema` before leaving.
|
|
183
227
|
* @param session - the session whose projection values are read.
|
|
184
|
-
* @
|
|
228
|
+
* @param keys - optional client-visible outputs; state materialization remains complete.
|
|
229
|
+
* @returns the snapshot; `values` is empty when no selected client-visible unit is registered.
|
|
230
|
+
*/
|
|
231
|
+
snapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Read only already-materialized client-visible cells without folding history.
|
|
235
|
+
* Values may trail the live Session and are therefore hints, not a complete
|
|
236
|
+
* baseline. Missing cells are omitted.
|
|
237
|
+
* @param session - attached Session whose cached cells are inspected.
|
|
238
|
+
* @param keys - optional wire keys to view.
|
|
239
|
+
* @returns the lowest common cached cut, or `undefined` when no wire cell exists.
|
|
185
240
|
*/
|
|
186
|
-
|
|
241
|
+
cachedSnapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined
|
|
187
242
|
|
|
188
243
|
/**
|
|
189
|
-
* State-level checkpoint of every
|
|
244
|
+
* State-level checkpoint of every persisted unit for one session, read
|
|
190
245
|
* from the watermark cache (missing cells fold lazily over the in-memory
|
|
191
246
|
* log). This is the write side of the persisted projection cache: the
|
|
192
247
|
* returned rows are the `(key → {ver, seq, val})` part of the durable
|
|
@@ -197,7 +252,7 @@ snapshot(session: Session): ProjectionSnapshot
|
|
|
197
252
|
* every subsequent snapshot and frame through it (plain JSON by the unit
|
|
198
253
|
* contract, so the clone is total).
|
|
199
254
|
* @param session - the session whose unit states are checkpointed.
|
|
200
|
-
* @returns one row per registered key
|
|
255
|
+
* @returns one row per registered key.
|
|
201
256
|
*/
|
|
202
257
|
checkpoint(session: Session): ProjectionCheckpoint
|
|
203
258
|
|
|
@@ -221,18 +276,19 @@ restoreFloor(checkpoint: ProjectionCheckpoint): number | undefined
|
|
|
221
276
|
|
|
222
277
|
/**
|
|
223
278
|
* View a checkpoint's rows without any log read: for every registered
|
|
224
|
-
* unit whose row's `ver` matches, serve the schema-validated
|
|
225
|
-
* `view` of the stored state; mismatched or absent rows leave their key
|
|
279
|
+
* client-visible unit whose row's `ver` matches, serve the schema-validated
|
|
280
|
+
* `view` of the schema-validated stored state; mismatched, malformed, or absent rows leave their key
|
|
226
281
|
* absent (a cold or listing consumer treats it as not-yet-available and a
|
|
227
282
|
* fuller read path refolds it). The zero-I/O rung of the read ladder —
|
|
228
283
|
* values are as stale as their rows, never wrong.
|
|
229
284
|
* @param checkpoint - persisted rows for one session (possibly stale or empty).
|
|
285
|
+
* @param keys - optional wire keys to view.
|
|
230
286
|
* @returns whole values per key with a usable row; empty when none.
|
|
231
287
|
*/
|
|
232
|
-
viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>
|
|
288
|
+
viewCheckpoint( checkpoint: ProjectionCheckpoint, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): Partial<SessionProjectionMap>
|
|
233
289
|
|
|
234
290
|
/**
|
|
235
|
-
* Cold read: fold every
|
|
291
|
+
* Cold read: fold every persisted unit over a stored log suffix, seeding
|
|
236
292
|
* each from its checkpoint row when usable — the one read recipe (cached
|
|
237
293
|
* state + forward tail replay + `view`) applied without a live `Session`.
|
|
238
294
|
* Call with the events returned by a persistence
|
|
@@ -249,14 +305,27 @@ viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>
|
|
|
249
305
|
* @param checkpoint - persisted rows for one session (possibly stale or empty).
|
|
250
306
|
* @param events - the stored events with `seq >= baseSeq`, in seq order.
|
|
251
307
|
* @param baseSeq - the seq `events` starts at (its first event's seq when non-empty).
|
|
308
|
+
* @param header - immutable metadata for the Session being restored.
|
|
252
309
|
* @returns the snapshot cut at the supplied log end (`asOfSeq` is the last
|
|
253
310
|
* supplied event's seq, `baseSeq - 1` for an empty tail) plus the
|
|
254
311
|
* refreshed checkpoint rows at that cut, ready for a durable write-back.
|
|
255
312
|
*/
|
|
256
|
-
restore(checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: number): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }
|
|
313
|
+
restore( checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: number, header: SessionHeader, ): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Restore an exact cut and install its states on the supplied prepared Session.
|
|
317
|
+
* A later publication reuses these cells; ordinary live reads and event drive
|
|
318
|
+
* advance any constructor-owned suffix exactly once.
|
|
319
|
+
* @param session - exact prepared Session that owns the restored log prefix.
|
|
320
|
+
* @param checkpoint - persisted rows for this Session lifecycle.
|
|
321
|
+
* @param events - exact events at the observation cut.
|
|
322
|
+
* @param baseSeq - first supplied event sequence.
|
|
323
|
+
* @returns all projection values at the supplied cut.
|
|
324
|
+
*/
|
|
325
|
+
hydrate( session: Session, checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: number, ): ProjectionSnapshot
|
|
257
326
|
```
|
|
258
327
|
|
|
259
|
-
Types: [Session](session.md) · [SessionEvent](session.md)
|
|
328
|
+
Types: [Session](session.md) · [SessionEvent](session.md) · [SessionHeader](persistence.md)
|
|
260
329
|
|
|
261
|
-
Source: [`packages/session/session-projection/src/index.ts
|
|
330
|
+
Source: [`packages/session/session-projection/src/index.ts`](../../packages/session/session-projection/src/index.ts)
|
|
262
331
|
<!-- END GENERATED cordis-surface -->
|