dsh-plugin-guide 0.3.1 → 0.3.3
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 +28 -23
- 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 +25 -8
- package/references/official-docs/docs/architecture.zh.md +38 -21
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +134 -67
- package/references/official-docs/docs/capability-seams.zh.md +134 -67
- package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/config-catalog.md +731 -403
- package/references/official-docs/docs/config-catalog.zh.md +747 -419
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-package.md +3 -4
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +9 -8
- 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 +660 -909
- package/references/official-docs/docs/module-graph.zh.md +662 -911
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-catalog.md +185 -53
- package/references/official-docs/docs/persistence-catalog.zh.md +193 -61
- 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 +207 -0
- package/references/official-docs/docs/subsystems/agent-team.zh.md +207 -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 +12 -8
- package/references/official-docs/docs/subsystems/code-runtime.zh.md +13 -9
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/commands.md +30 -7
- package/references/official-docs/docs/subsystems/commands.zh.md +31 -8
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/compaction.md +14 -14
- package/references/official-docs/docs/subsystems/compaction.zh.md +19 -19
- 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 +114 -36
- package/references/official-docs/docs/subsystems/core.zh.md +145 -65
- 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 +6 -6
- package/references/official-docs/docs/subsystems/feedback.zh.md +6 -6
- 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 +183 -173
- package/references/official-docs/docs/subsystems/persistence.zh.md +182 -172
- 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 +148 -75
- package/references/official-docs/docs/subsystems/session-projection.zh.md +148 -75
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-query.md +30 -16
- package/references/official-docs/docs/subsystems/session-query.zh.md +31 -17
- 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 +8 -8
- package/references/official-docs/docs/subsystems/session-title.zh.md +10 -10
- package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session.md +376 -71
- package/references/official-docs/docs/subsystems/session.zh.md +392 -85
- 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 +175 -0
- package/references/official-docs/docs/subsystems/slots.zh.md +175 -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 +38 -7
- package/references/official-docs/docs/subsystems/storage.zh.md +41 -10
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subagent.md +148 -116
- package/references/official-docs/docs/subsystems/subagent.zh.md +158 -124
- 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 +29 -14
- package/references/official-docs/docs/subsystems/token-meter.zh.md +30 -15
- 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 +413 -61
- package/references/official-docs/docs/tool-catalog.zh.md +418 -63
- 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 +2 -2
- package/references/official-docs/docs/web-styling.md +3 -0
- package/references/official-docs/docs/web-styling.zh.md +5 -2
- package/references/official-docs/packages/AGENTS.md +4 -3
- 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,33 +2,38 @@
|
|
|
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.
|
|
33
|
+
* @param inheritedEventCount - exact fork-inherited prefix length.
|
|
29
34
|
* @returns the initial state.
|
|
30
35
|
*/
|
|
31
|
-
init(): S
|
|
36
|
+
init(header: SessionHeader, inheritedEventCount: SessionLogOffset): NoInfer<S>
|
|
32
37
|
/**
|
|
33
38
|
* Pure transition: previous state + one committed event → next state. A
|
|
34
39
|
* unit uninterested in an event MUST return the same state reference — an
|
|
@@ -37,13 +42,21 @@ interface ProjectionDefinition<K extends keyof SessionProjectionMap, S> {
|
|
|
37
42
|
* @param event - the next committed session event.
|
|
38
43
|
* @returns the next state (same reference when the event is not the unit's).
|
|
39
44
|
*/
|
|
40
|
-
apply(state: S
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
apply(state: NoInfer<S>, event: SessionEvent): NoInfer<S>
|
|
46
|
+
/** Client view. Omit for host-only units. */
|
|
47
|
+
wire?: K extends keyof SessionProjectionMap ? {
|
|
48
|
+
/** Validates the wire payload before it leaves the host. */
|
|
49
|
+
viewSchema: ZodType<SessionProjectionMap[K]>
|
|
50
|
+
/**
|
|
51
|
+
* State → wire payload (the read-side projection). The live drive keeps
|
|
52
|
+
* the two latest raw results and compares them with `Object.is`; an
|
|
53
|
+
* object-valued view must reuse its reference to suppress publication
|
|
54
|
+
* across internal-only state changes.
|
|
55
|
+
* @param state - the current state.
|
|
56
|
+
* @returns the whole current value for this unit's key.
|
|
57
|
+
*/
|
|
58
|
+
view(state: NoInfer<S>): SessionProjectionMap[K]
|
|
59
|
+
} : never
|
|
47
60
|
/**
|
|
48
61
|
* Persisted-cache invalidation version: bump whenever the serialized state fields or the
|
|
49
62
|
* fold semantics change, so persisted `(sessionId, key, ver, seq, val)`
|
|
@@ -60,37 +73,37 @@ The whole-value event rule is load-bearing: a state-carrying log event carries t
|
|
|
60
73
|
|
|
61
74
|
```ts type-equiv
|
|
62
75
|
/**
|
|
63
|
-
* One consistent read cut over every registered unit for one session.
|
|
76
|
+
* One consistent read cut over every registered client-visible unit for one session.
|
|
64
77
|
* `asOfSeq` is the shared watermark — the seq of the last event every value
|
|
65
|
-
* reflects (`-1` for an empty log
|
|
78
|
+
* reflects (`-1` for an empty log).
|
|
66
79
|
*/
|
|
67
80
|
interface ProjectionSnapshot {
|
|
68
81
|
/** Seq of the last event the values reflect; -1 for an empty log. */
|
|
69
|
-
asOfSeq:
|
|
70
|
-
/** Whole current value per registered key. */
|
|
82
|
+
asOfSeq: SessionSeqCursor
|
|
83
|
+
/** Whole current client value per registered key. */
|
|
71
84
|
values: Partial<SessionProjectionMap>
|
|
72
85
|
}
|
|
73
86
|
```
|
|
74
87
|
|
|
75
88
|
```ts type-equiv
|
|
76
89
|
/**
|
|
77
|
-
* Change-feed listener: one unit's
|
|
78
|
-
* the schema-validated
|
|
79
|
-
* emission (the seq of the event that caused the change).
|
|
90
|
+
* Change-feed listener: one unit's raw `view` result changed by `Object.is`
|
|
91
|
+
* for one session. `value` is the schema-validated output; `seq` is the
|
|
92
|
+
* unit's watermark at emission (the seq of the event that caused the change).
|
|
80
93
|
*/
|
|
81
94
|
type ProjectionChangeListener = (
|
|
82
95
|
session: Session,
|
|
83
96
|
key: Extract<keyof SessionProjectionMap, string>,
|
|
84
97
|
value: unknown,
|
|
85
|
-
seq:
|
|
98
|
+
seq: SessionSeq,
|
|
86
99
|
) => void
|
|
87
100
|
```
|
|
88
101
|
|
|
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.
|
|
102
|
+
`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
103
|
|
|
91
104
|
## The registry: `ctx.sessionProjections`
|
|
92
105
|
|
|
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
|
|
106
|
+
`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
107
|
|
|
95
108
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
96
109
|
|
|
@@ -98,63 +111,79 @@ type ProjectionChangeListener = (
|
|
|
98
111
|
|
|
99
112
|
## Cordis API
|
|
100
113
|
|
|
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`) —
|
|
114
|
+
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
115
|
|
|
103
116
|
<a id="ctxsessionprojectioncache--sessionprojectioncache"></a>
|
|
104
117
|
|
|
105
118
|
### `ctx.sessionProjectionCache` — `SessionProjectionCache`
|
|
106
119
|
|
|
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
|
|
120
|
+
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
121
|
|
|
109
122
|
```ts cordis-catalog
|
|
110
123
|
/**
|
|
111
124
|
* 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
|
-
*
|
|
125
|
+
* rows (version-matching keys only), each cut carried with its watermark so
|
|
126
|
+
* a client value store can seed under its higher-seq-wins rule — as stale
|
|
127
|
+
* as the last durable checkpoint but never wrong, and never from an
|
|
115
128
|
* unrelated log (the caller's header is the identity witness). Fresher
|
|
116
|
-
* paths (the history tail baseline
|
|
117
|
-
*
|
|
129
|
+
* paths (the history tail baseline) supersede these values whenever a
|
|
130
|
+
* session is actually opened.
|
|
118
131
|
* @param meta - the listed session's header (identity witness; no log read).
|
|
132
|
+
* @param inheritedEventCount - exact inherited prefix length that completes
|
|
133
|
+
* the checkpoint identity.
|
|
134
|
+
* @param keys - optional projection keys required by the caller's audience.
|
|
119
135
|
* @returns the cut (`asOfSeq` = lowest served-row watermark), or
|
|
120
136
|
* `undefined` when no usable row exists for this lifecycle.
|
|
121
137
|
*/
|
|
122
|
-
cachedSnapshot(meta: SessionHeader): ProjectionSnapshot | undefined
|
|
138
|
+
cachedSnapshot( meta: SessionHeader, inheritedEventCount: SessionLogOffset, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Hydrate projection cells for an already-prepared Session without another
|
|
142
|
+
* persistence read. The cache seeds matching rows; the supplied exact log
|
|
143
|
+
* advances every unit to the observation cut. No checkpoint is written
|
|
144
|
+
* because the logical observation may contain recovery events not yet durable.
|
|
145
|
+
* @param session - exact unpublished Session retained by persistence.
|
|
146
|
+
* @param events - exact logical event prefix represented by the observation.
|
|
147
|
+
* @returns all projection values at the event cut.
|
|
148
|
+
*/
|
|
149
|
+
hydratePrepared( session: Session, events: readonly SessionEvent[], ): ProjectionSnapshot
|
|
123
150
|
|
|
124
151
|
/**
|
|
125
|
-
* Durably checkpoint one live session NOW (
|
|
152
|
+
* Durably checkpoint one live session NOW (all mandatory points call
|
|
126
153
|
* 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
|
|
154
|
+
* this boundary (states are live references), then the session's record is
|
|
155
|
+
* replaced on the domain's write chain. NOT fail-soft — callers on the
|
|
156
|
+
* fail-soft paths contain it.
|
|
129
157
|
* @param session - the live session to checkpoint.
|
|
130
158
|
* @returns resolution after durability and event emission.
|
|
131
159
|
*/
|
|
132
160
|
async write(session: Session): Promise<void>
|
|
133
161
|
|
|
134
162
|
/**
|
|
135
|
-
* Cold-read one
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* @param
|
|
143
|
-
* @param
|
|
144
|
-
* @
|
|
163
|
+
* Cold-read one session's projections from its complete log. Each unit is
|
|
164
|
+
* seeded from the identity-checked cached rows — the registry skips `apply`
|
|
165
|
+
* for the already-folded prefix (events at or below the row's `seq`) — and
|
|
166
|
+
* the refreshed checkpoint is written back (fail-soft, fire-and-forget), so
|
|
167
|
+
* the first cold read creates the cache row and later ones seed from it.
|
|
168
|
+
* The caller supplies the complete log in seq order: this service never
|
|
169
|
+
* consults the persistence layer.
|
|
170
|
+
* @param meta - the stored session header (identity witness).
|
|
171
|
+
* @param inheritedEventCount - exact inherited prefix length for projection initialization and identity.
|
|
172
|
+
* @param events - the session's complete log, in seq order.
|
|
173
|
+
* @returns the projection cut at the log end.
|
|
145
174
|
*/
|
|
146
|
-
|
|
175
|
+
coldSnapshot( meta: SessionHeader, inheritedEventCount: SessionLogOffset, events: readonly SessionEvent[], ): ProjectionSnapshot
|
|
147
176
|
```
|
|
148
177
|
|
|
149
|
-
Types: [Session](session.md) · [SessionHeader](persistence.md) · [
|
|
178
|
+
Types: [Session](session.md) · [SessionEvent](session.md) · [SessionHeader](persistence.md) · [SessionLogOffset](session.md)
|
|
150
179
|
|
|
151
|
-
Source: [`packages/session/session-projection-cache/src/index.ts
|
|
180
|
+
Source: [`packages/session/session-projection-cache/src/index.ts`](../../packages/session/session-projection-cache/src/index.ts)
|
|
152
181
|
|
|
153
182
|
<a id="ctxsessionprojections--sessionprojectionregistry"></a>
|
|
154
183
|
|
|
155
184
|
### `ctx.sessionProjections` — `SessionProjectionRegistry`
|
|
156
185
|
|
|
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)
|
|
186
|
+
`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
187
|
|
|
159
188
|
```ts cordis-catalog
|
|
160
189
|
/**
|
|
@@ -165,28 +194,57 @@ Source: [`packages/session/session-projection-cache/src/index.ts:71`](../../pack
|
|
|
165
194
|
* @param definition - key, state schema, pure unit functions, and stateVersion.
|
|
166
195
|
* @returns the exact disposer that unregisters this unit.
|
|
167
196
|
*/
|
|
168
|
-
register<K extends keyof SessionProjectionMap, S>(definition: ProjectionDefinition<K, S>): () => void
|
|
197
|
+
register< K extends keyof SessionProjectionMap, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, 'wire'> & { wire: NonNullable<ProjectionDefinition<K, S>['wire']> }, ): () => void
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Register one host-only unit. Its state is omitted from client snapshots
|
|
201
|
+
* and always checkpointed like every other unit.
|
|
202
|
+
* @param definition - key, state schema, pure unit functions, and stateVersion.
|
|
203
|
+
* @returns the exact disposer that unregisters this unit.
|
|
204
|
+
*/
|
|
205
|
+
register< K extends Exclude<keyof SessionProjectionStateMap, keyof SessionProjectionMap>, S extends SessionProjectionStateMap[K], >( definition: Omit<ProjectionDefinition<K, S>, 'wire'>, ): () => void
|
|
169
206
|
|
|
170
207
|
/**
|
|
171
208
|
* Subscribe to the change feed. The registration is an effect on the
|
|
172
209
|
* calling context's fiber.
|
|
173
|
-
* @param listener - called once per unit whose
|
|
210
|
+
* @param listener - called once per client-visible unit whose raw view changed by `Object.is`, per committed event.
|
|
174
211
|
* @returns the exact disposer that unsubscribes.
|
|
175
212
|
*/
|
|
176
213
|
onChanged(listener: ProjectionChangeListener): () => void
|
|
177
214
|
|
|
178
215
|
/**
|
|
179
|
-
*
|
|
216
|
+
* Read one unit's current host state after materializing every registered
|
|
217
|
+
* unit at the Session cursor. Unrelated wire views are not produced.
|
|
218
|
+
* The returned value is live; callers must not mutate it.
|
|
219
|
+
* @param session - the session whose state is read.
|
|
220
|
+
* @param key - the registered unit key.
|
|
221
|
+
* @returns current state, or `undefined` when the key is not registered.
|
|
222
|
+
*/
|
|
223
|
+
stateOf<K extends keyof SessionProjectionStateMap>( session: Session, key: K, ): SessionProjectionStateMap[K] | undefined
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* One consistent cut over every registered client-visible unit for one session, read from
|
|
180
227
|
* the watermark cache (missing cells fold lazily over the in-memory log).
|
|
181
228
|
* Fully synchronous — every value and `asOfSeq` reflect the same log
|
|
182
|
-
* position. Each value passes its unit's
|
|
229
|
+
* position. Each value passes its unit's `viewSchema` before leaving.
|
|
183
230
|
* @param session - the session whose projection values are read.
|
|
184
|
-
* @
|
|
231
|
+
* @param keys - optional client-visible outputs; state materialization remains complete.
|
|
232
|
+
* @returns the snapshot; `values` is empty when no selected client-visible unit is registered.
|
|
233
|
+
*/
|
|
234
|
+
snapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Read only already-materialized client-visible cells without folding history.
|
|
238
|
+
* Values may trail the live Session and are therefore hints, not a complete
|
|
239
|
+
* baseline. Missing cells are omitted.
|
|
240
|
+
* @param session - attached Session whose cached cells are inspected.
|
|
241
|
+
* @param keys - optional wire keys to view.
|
|
242
|
+
* @returns the lowest common cached cut, or `undefined` when no wire cell exists.
|
|
185
243
|
*/
|
|
186
|
-
|
|
244
|
+
cachedSnapshot( session: Session, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined
|
|
187
245
|
|
|
188
246
|
/**
|
|
189
|
-
* State-level checkpoint of every
|
|
247
|
+
* State-level checkpoint of every persisted unit for one session, read
|
|
190
248
|
* from the watermark cache (missing cells fold lazily over the in-memory
|
|
191
249
|
* log). This is the write side of the persisted projection cache: the
|
|
192
250
|
* returned rows are the `(key → {ver, seq, val})` part of the durable
|
|
@@ -197,7 +255,7 @@ snapshot(session: Session): ProjectionSnapshot
|
|
|
197
255
|
* every subsequent snapshot and frame through it (plain JSON by the unit
|
|
198
256
|
* contract, so the clone is total).
|
|
199
257
|
* @param session - the session whose unit states are checkpointed.
|
|
200
|
-
* @returns one row per registered key
|
|
258
|
+
* @returns one row per registered key.
|
|
201
259
|
*/
|
|
202
260
|
checkpoint(session: Session): ProjectionCheckpoint
|
|
203
261
|
|
|
@@ -213,30 +271,31 @@ checkpoint(session: Session): ProjectionCheckpoint
|
|
|
213
271
|
* yields an end below every watermark and the restore rejects for a full
|
|
214
272
|
* re-read.
|
|
215
273
|
* @param checkpoint - persisted rows for one session (possibly stale or empty).
|
|
216
|
-
* @returns the
|
|
217
|
-
* when no unit is registered (no read needed —
|
|
218
|
-
* serve empty values regardless).
|
|
274
|
+
* @returns the offset for the stored-log suffix read (`SessionHandle.read`),
|
|
275
|
+
* or `undefined` when no unit is registered (no read needed —
|
|
276
|
+
* {@link restore} would serve empty values regardless).
|
|
219
277
|
*/
|
|
220
|
-
restoreFloor(checkpoint: ProjectionCheckpoint):
|
|
278
|
+
restoreFloor(checkpoint: ProjectionCheckpoint): SessionLogOffset | undefined
|
|
221
279
|
|
|
222
280
|
/**
|
|
223
281
|
* 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
|
|
282
|
+
* client-visible unit whose row's `ver` matches, serve the schema-validated
|
|
283
|
+
* `view` of the schema-validated stored state; mismatched, malformed, or absent rows leave their key
|
|
226
284
|
* absent (a cold or listing consumer treats it as not-yet-available and a
|
|
227
285
|
* fuller read path refolds it). The zero-I/O rung of the read ladder —
|
|
228
286
|
* values are as stale as their rows, never wrong.
|
|
229
287
|
* @param checkpoint - persisted rows for one session (possibly stale or empty).
|
|
288
|
+
* @param keys - optional wire keys to view.
|
|
230
289
|
* @returns whole values per key with a usable row; empty when none.
|
|
231
290
|
*/
|
|
232
|
-
viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>
|
|
291
|
+
viewCheckpoint( checkpoint: ProjectionCheckpoint, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): Partial<SessionProjectionMap>
|
|
233
292
|
|
|
234
293
|
/**
|
|
235
|
-
* Cold read: fold every
|
|
294
|
+
* Cold read: fold every persisted unit over a stored log suffix, seeding
|
|
236
295
|
* each from its checkpoint row when usable — the one read recipe (cached
|
|
237
296
|
* state + forward tail replay + `view`) applied without a live `Session`.
|
|
238
|
-
* Call with the events
|
|
239
|
-
* `
|
|
297
|
+
* Call with the stored events at or past `restoreFloor(checkpoint)` (a
|
|
298
|
+
* `SessionHandle.read` slice) and that same floor as
|
|
240
299
|
* `baseSeq`; the floor's one-below anchor makes the supplied end honest,
|
|
241
300
|
* so a shrunk log is detected here. A row is usable iff its
|
|
242
301
|
* `ver` matches the live unit's `stateVersion`, it does not predate `baseSeq`
|
|
@@ -249,14 +308,28 @@ viewCheckpoint(checkpoint: ProjectionCheckpoint): Partial<SessionProjectionMap>
|
|
|
249
308
|
* @param checkpoint - persisted rows for one session (possibly stale or empty).
|
|
250
309
|
* @param events - the stored events with `seq >= baseSeq`, in seq order.
|
|
251
310
|
* @param baseSeq - the seq `events` starts at (its first event's seq when non-empty).
|
|
311
|
+
* @param header - immutable metadata for the Session being restored.
|
|
312
|
+
* @param inheritedEventCount - exact fork-inherited prefix length supplied to unit initialization.
|
|
252
313
|
* @returns the snapshot cut at the supplied log end (`asOfSeq` is the last
|
|
253
314
|
* supplied event's seq, `baseSeq - 1` for an empty tail) plus the
|
|
254
315
|
* refreshed checkpoint rows at that cut, ready for a durable write-back.
|
|
255
316
|
*/
|
|
256
|
-
restore(checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq:
|
|
317
|
+
restore( checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, header: SessionHeader, inheritedEventCount: SessionLogOffset, ): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Restore an exact cut and install its states on the supplied prepared Session.
|
|
321
|
+
* A later publication reuses these cells; ordinary live reads and event drive
|
|
322
|
+
* advance any constructor-owned suffix exactly once.
|
|
323
|
+
* @param session - exact prepared Session that owns the restored log prefix.
|
|
324
|
+
* @param checkpoint - persisted rows for this Session lifecycle.
|
|
325
|
+
* @param events - exact events at the observation cut.
|
|
326
|
+
* @param baseSeq - first supplied event sequence.
|
|
327
|
+
* @returns all projection values at the supplied cut.
|
|
328
|
+
*/
|
|
329
|
+
hydrate( session: Session, checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, ): ProjectionSnapshot
|
|
257
330
|
```
|
|
258
331
|
|
|
259
|
-
Types: [Session](session.md) · [SessionEvent](session.md)
|
|
332
|
+
Types: [Session](session.md) · [SessionEvent](session.md) · [SessionHeader](persistence.md) · [SessionLogOffset](session.md)
|
|
260
333
|
|
|
261
|
-
Source: [`packages/session/session-projection/src/index.ts
|
|
334
|
+
Source: [`packages/session/session-projection/src/index.ts`](../../packages/session/session-projection/src/index.ts)
|
|
262
335
|
<!-- END GENERATED cordis-surface -->
|