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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Webhook runtime
|
|
2
|
+
|
|
3
|
+
[English](webhook.md) | 中文
|
|
4
|
+
|
|
5
|
+
Webhook 子系统会把已通过身份验证的外部交付转换为可选的普通根 Session。提供方适配器拥有身份验证与通用 JSON 接收;受信任的程序化规则拥有条件与外部调用;`ctx.webhookRuntime` 拥有回调生命周期以及基于 Workspace 的 Session 创建。[已实现决策](../../.agents/notes/implemented/feature/2026-08-22-fire-and-forget-webhook-sessions.zh.md)记录了 runtime 为何不保留交付或完成状态。
|
|
6
|
+
|
|
7
|
+
## 共享值
|
|
8
|
+
|
|
9
|
+
`WebhookRuleId`、`WebhookSourceId` 与 `WebhookDeliveryId` 是不透明字符串。交付 id 仅用于来源信息:runtime 既不存储也不对它去重。
|
|
10
|
+
|
|
11
|
+
`WebhookEventMap` 可按提供方种类合并扩展。`WebhookEventOf<K>` 会选择已知提供方事件,否则接纳通用无损 JSON,从而让树外适配器无需修改 runtime 包。
|
|
12
|
+
|
|
13
|
+
`VerifiedWebhookDelivery<K>` 包含 `kind`、已配置 `source`、提供方 `deliveryId`、规范化 `event` 与非负安全整数 `receivedAt`。runtime 会先验证、分离并冻结完整值,再把它分发给多个规则。
|
|
14
|
+
|
|
15
|
+
`WebhookRule<K>` 包含唯一 id、提供方种类与 `run(delivery, signal)`。回调可以执行任意受信任代码。它返回 `null` 或一个 `WebhookSessionRequest`,并且异步工作若应在注册卸载时停止,就必须观察 signal。
|
|
16
|
+
|
|
17
|
+
`WebhookSessionRequest` 要求绝对 `workspacePath`、标题、文本提示词、agent preset 与 permission preset。可选 `model` 会指定明确的提供方/模型路由与可选输出 token 上限,并使用该适配器的默认推理强度。省略时会快照包含推理强度的完整当前部署选择,直到首个请求记录持久 header。
|
|
18
|
+
|
|
19
|
+
## Fire-and-forget 分发
|
|
20
|
+
|
|
21
|
+
`dispatch()` 会快照匹配规则,彼此独立地调度每个规则,并在任何回调结算前返回。抛出与拒绝按规则分别被包含。注册 disposer 会先移除规则,再中止并排空活动调用,因此后续交付无法进入正在卸载的代码。
|
|
22
|
+
|
|
23
|
+
runtime 没有队列、重试、去重、执行状态、崩溃重放、Agent 状态监听器或完成结果。重复交付可能创建重复 Session。唯一的活动操作表是私有 teardown 记账,并随进程消失。
|
|
24
|
+
|
|
25
|
+
## Session 创建
|
|
26
|
+
|
|
27
|
+
非 `null` 结果会在异步预检前生成快照。runtime 会验证 permission 与 agent preset,解析或创建规范 Workspace,创建 Session cwd 等于 Workspace 路径的 Agent,在发布前挂载所选 agent preset,并在应用权限、标题与初始 follow-up 前持久附加 Session。
|
|
28
|
+
|
|
29
|
+
follow-up 是普通持久 user-role 消息,使用 `source.kind: "webhook"`,并携带提供方/来源/交付/规则来源信息。其 inbox 插入被接受时提交 webhook 操作。runtime 不执行特殊 flush,也不等待轮次;之后应用普通 Session persistence 与 Agent 生命周期。
|
|
30
|
+
|
|
31
|
+
附加失败会在提示词出现前释放新 Agent。附加之后、提示词接纳之前的失败会尝试脱离 Workspace 并释放 Agent,且不会取代原始错误。预检期间自动创建的 Workspace 会保留,因为另一个并发调用者可能已经使用它。
|
|
32
|
+
|
|
33
|
+
## GitHub 适配器
|
|
34
|
+
|
|
35
|
+
`@deepseek-ai/dsh-webhook-github` 在注入的 WebServer 上注册精确路由,为每次请求解析凭据引用,在解析前验证未改动的 `application/json` body,并在内存分发后立即返回 `202`。它的规范化事件保证为已签名的无损 JSON 对象;规则负责验证自己消费的事件特定字段。
|
|
36
|
+
|
|
37
|
+
[GitHub 评审指南](../user/guide/github-review.zh.md)把该路由挂载在隔离的第二个 WebServer 上,因此暴露 webhook 入口不会暴露浏览器 API。
|
|
38
|
+
|
|
39
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
40
|
+
|
|
41
|
+
<a id="cordis-surface"></a>
|
|
42
|
+
|
|
43
|
+
## Cordis API
|
|
44
|
+
|
|
45
|
+
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.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
46
|
+
|
|
47
|
+
<a id="ctxwebhookruntime--webhookruntime"></a>
|
|
48
|
+
|
|
49
|
+
### `ctx.webhookRuntime` — `WebhookRuntime`
|
|
50
|
+
|
|
51
|
+
Fire-and-forget rule runtime. Session creation is the only built-in action.
|
|
52
|
+
|
|
53
|
+
```ts cordis-catalog
|
|
54
|
+
/**
|
|
55
|
+
* Register one trusted programmatic rule.
|
|
56
|
+
* @param rule - unique id, provider kind, and arbitrary callback.
|
|
57
|
+
* @returns awaitable effect disposer that aborts and drains this rule's active callbacks.
|
|
58
|
+
*/
|
|
59
|
+
register<K extends string>(rule: WebhookRule<K>): () => Promise<void>
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Start every currently matching rule and return before any callback settles.
|
|
63
|
+
* @param delivery - authenticated provider data; snapshotted before dispatch.
|
|
64
|
+
* @throws synchronously when the runtime is closing or the delivery is malformed.
|
|
65
|
+
*/
|
|
66
|
+
dispatch<K extends string>(delivery: VerifiedWebhookDelivery<K>): void
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Source: [`packages/webhook/webhook/src/index.ts`](../../packages/webhook/webhook/src/index.ts)
|
|
70
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/workflow.md
|
|
5
|
-
workflow.md:
|
|
6
|
-
workflow.zh.md:
|
|
5
|
+
workflow.md: b608efab2300b20b06a3aa09041c3419fbc2145b
|
|
6
|
+
workflow.zh.md: 47186df724b10138f277302384b3e96a0667be46
|
|
@@ -133,7 +133,7 @@ The top-level `dsh-tool-workflow` consumer projects display facts into its calli
|
|
|
133
133
|
|
|
134
134
|
## Cordis API
|
|
135
135
|
|
|
136
|
-
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`) —
|
|
136
|
+
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).
|
|
137
137
|
|
|
138
138
|
<a id="ctxworkflowengine--workflowengine-abstract-seam"></a>
|
|
139
139
|
|
|
@@ -151,7 +151,7 @@ Workflow Service Definition contract. Invalid requests throw before publication;
|
|
|
151
151
|
abstract start(request: WorkflowStartRequest): WorkflowRun
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
154
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
155
155
|
|
|
156
156
|
<a id="workflow-events"></a>
|
|
157
157
|
|
|
@@ -177,7 +177,7 @@ One `agent()` call settled (clean result, child failure, or run cancellation). P
|
|
|
177
177
|
'workflow/agent-end'(info: WorkflowRunInfo, agent: WorkflowAgentEndInfo): void
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
180
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
181
181
|
|
|
182
182
|
<a id="workflowagent-start--emit"></a>
|
|
183
183
|
|
|
@@ -198,7 +198,7 @@ One `agent()` call established a published child run. Paired with Events['workfl
|
|
|
198
198
|
'workflow/agent-start'(info: WorkflowRunInfo, agent: WorkflowAgentInfo): void
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
201
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
202
202
|
|
|
203
203
|
<a id="workflowend--emit"></a>
|
|
204
204
|
|
|
@@ -219,7 +219,7 @@ A workflow run settled (any stop reason). Fired when WorkflowRun.result resolves
|
|
|
219
219
|
'workflow/end'(info: WorkflowRunInfo, result: WorkflowResultInfo): void
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
222
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
223
223
|
|
|
224
224
|
<a id="workflowlog--emit"></a>
|
|
225
225
|
|
|
@@ -237,7 +237,7 @@ The script emitted a narration line (a `log(message)` call).
|
|
|
237
237
|
'workflow/log'(info: WorkflowRunInfo, message: string): void
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
240
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
241
241
|
|
|
242
242
|
<a id="workflowphase--emit"></a>
|
|
243
243
|
|
|
@@ -256,7 +256,7 @@ The script entered a phase (a `phase(title)` call) — progress grouping for obs
|
|
|
256
256
|
'workflow/phase'(info: WorkflowRunInfo, title: string): void
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
259
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
260
260
|
|
|
261
261
|
<a id="workflowstart--emit"></a>
|
|
262
262
|
|
|
@@ -274,5 +274,5 @@ A workflow run started — the script's meta block validated, the body about to
|
|
|
274
274
|
'workflow/start'(info: WorkflowRunInfo): void
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
277
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
278
278
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[English](workflow.md) | 中文
|
|
4
4
|
|
|
5
|
-
工作流 seam 允许 agent(智能体)运行由模型编写、会启动 subagent 的编排脚本。与 [subagent](subagent.md) 一样,它是**一项可选能力**,不属于 agent loop,因此其类型和操作记录在此处,而非 [core.md](core.md)。与 bash 一样,每个上下文只允许一个引擎实现提供 `ctx.workflowEngine`;没有命名提供方注册表(第二个引擎通过插件配置替换第一个,而不与它同时运行)。
|
|
5
|
+
工作流 seam 允许 agent(智能体)运行由模型编写、会启动 subagent 的编排脚本。与 [subagent](subagent.zh.md) 一样,它是**一项可选能力**,不属于 agent loop,因此其类型和操作记录在此处,而非 [core.md](core.zh.md)。与 bash 一样,每个上下文只允许一个引擎实现提供 `ctx.workflowEngine`;没有命名提供方注册表(第二个引擎通过插件配置替换第一个,而不与它同时运行)。
|
|
6
6
|
|
|
7
|
-
Service Definition:[dsh-workflow](../../packages/workflow/workflow)(`ctx.workflowEngine` + 下文词汇)。Service Provider 是 [dsh-workflow-worker-thread](../../packages/workflow/workflow-worker-thread)(一个 `node:worker_threads` 引擎——每个 run 一个 worker,脚本的 vm 上下文位于其中);面向模型的 Consumer 是 [dsh-tool-workflow](../../packages/workflow/tool-workflow)。提案与设计理由见 [dynamic-workflows Agent Note](../../.agents/notes/implemented/feature/2026-07-05-dynamic-workflows.md)。
|
|
7
|
+
Service Definition:[dsh-workflow](../../packages/workflow/workflow)(`ctx.workflowEngine` + 下文词汇)。Service Provider 是 [dsh-workflow-worker-thread](../../packages/workflow/workflow-worker-thread)(一个 `node:worker_threads` 引擎——每个 run 一个 worker,脚本的 vm 上下文位于其中);面向模型的 Consumer 是 [dsh-tool-workflow](../../packages/workflow/tool-workflow)。提案与设计理由见 [dynamic-workflows Agent Note](../../.agents/notes/implemented/feature/2026-07-05-dynamic-workflows.zh.md)。
|
|
8
8
|
|
|
9
9
|
源码:浏览器安全词汇位于 [`packages/workflow/workflow/src/types.ts`](../../packages/workflow/workflow/src/types.ts),Host 请求与活跃运行句柄位于 [`runtime-types.ts`](../../packages/workflow/workflow/src/runtime-types.ts)。
|
|
10
10
|
|
|
11
11
|
## 启动请求
|
|
12
12
|
|
|
13
|
-
本节定义调用方启动一次运行时提交的请求。普通工作流工具会根据模型的 `{ script, meta, args }` 调用和发起调用的 agent 构建该请求;专用消费方还可以为本次运行选择引擎级 `subagentProvider`,并将 `maxTotalAgents` 调低,但脚本无法观察或替换这两项策略。`meta` 与 `args` 是普通 JSON 数据;引擎会用 schema 校验 `meta`,并在任何工作开始前明确报错并拒绝无效数据。引擎绝不会通过对脚本文本求值来获取它们。`parent` 是必填字段——脚本启动的每个子 agent 都归属于它,cwd、谱系与深度通过 [subagent seam](subagent.md) 传递。
|
|
13
|
+
本节定义调用方启动一次运行时提交的请求。普通工作流工具会根据模型的 `{ script, meta, args }` 调用和发起调用的 agent 构建该请求;专用消费方还可以为本次运行选择引擎级 `subagentProvider`,并将 `maxTotalAgents` 调低,但脚本无法观察或替换这两项策略。`meta` 与 `args` 是普通 JSON 数据;引擎会用 schema 校验 `meta`,并在任何工作开始前明确报错并拒绝无效数据。引擎绝不会通过对脚本文本求值来获取它们。`parent` 是必填字段——脚本启动的每个子 agent 都归属于它,cwd、谱系与深度通过 [subagent seam](subagent.zh.md) 传递。
|
|
14
14
|
|
|
15
15
|
```ts type-equiv
|
|
16
16
|
/**
|
|
@@ -113,7 +113,7 @@ interface WorkflowRun {
|
|
|
113
113
|
|
|
114
114
|
## 失败纪律:`WorkflowError.fatal`
|
|
115
115
|
|
|
116
|
-
脚本内部的钩子误用:错误参数、未知或延迟的 `agent()` 选项、超出[结构化输出子集](../../packages/core/tools/README.md)的 schema、超出上限、seam 启动失败、取消,都会抛出 `fatal: true` 的 `WorkflowError`。`parallel()`/`pipeline()` 组合器对 fatal 错误直接重新抛出,而非将该项映射为 `null`:一个拼写错误的选项必须明确报错并终止脚本,绝不能消融为看似普通子 agent 失败的结果。逐项的 `null` 保留给子运行失败(非 `completed` 的 stop reason)和阶段内的普通脚本错误。
|
|
116
|
+
脚本内部的钩子误用:错误参数、未知或延迟的 `agent()` 选项、超出[结构化输出子集](../../packages/core/tools/README.zh.md)的 schema、超出上限、seam 启动失败、取消,都会抛出 `fatal: true` 的 `WorkflowError`。`parallel()`/`pipeline()` 组合器对 fatal 错误直接重新抛出,而非将该项映射为 `null`:一个拼写错误的选项必须明确报错并终止脚本,绝不能消融为看似普通子 agent 失败的结果。逐项的 `null` 保留给子运行失败(非 `completed` 的 stop reason)和阶段内的普通脚本错误。
|
|
117
117
|
|
|
118
118
|
## 事件
|
|
119
119
|
|
|
@@ -125,7 +125,7 @@ interface WorkflowRun {
|
|
|
125
125
|
|
|
126
126
|
`dsh-tool-workflow/invariant` 会在实时提交前和 Session 加载时校验同一协议:每个运行只有一个 start,成员序号为正且唯一,成员 end 必须配对,仍有开放成员时不能结束运行,运行结束后不能继续更新。日志尾部缺少成员 end 或 run end 是有效的中断证据,不是损坏。
|
|
127
127
|
|
|
128
|
-
`dsh-client-ui-workflow-run` 通过 Conversation Node 引擎把四类事件折叠为一个 `workflow-run` Chat 节点,以 run-start 序号锚定在原工作流工具节点之后。阶段组只来自真正开始过的成员,并保留精确字符串,包括字段缺省与 `''` 的区别。Location 关闭时,缺失终点会显示为已中断。[界面包 README](../../packages/client/ui-workflow-run/README.md)负责定义 disclosure、状态与同父本地导航行为。
|
|
128
|
+
`dsh-client-ui-workflow-run` 通过 Conversation Node 引擎把四类事件折叠为一个 `workflow-run` Chat 节点,以 run-start 序号锚定在原工作流工具节点之后。阶段组只来自真正开始过的成员,并保留精确字符串,包括字段缺省与 `''` 的区别。Location 关闭时,缺失终点会显示为已中断。[界面包 README](../../packages/client/ui-workflow-run/README.zh.md)负责定义 disclosure、状态与同父本地导航行为。
|
|
129
129
|
|
|
130
130
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
131
131
|
|
|
@@ -133,7 +133,7 @@ interface WorkflowRun {
|
|
|
133
133
|
|
|
134
134
|
## Cordis API
|
|
135
135
|
|
|
136
|
-
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`) —
|
|
136
|
+
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.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
137
137
|
|
|
138
138
|
<a id="ctxworkflowengine--workflowengine-abstract-seam"></a>
|
|
139
139
|
|
|
@@ -151,7 +151,7 @@ Workflow Service Definition contract. Invalid requests throw before publication;
|
|
|
151
151
|
abstract start(request: WorkflowStartRequest): WorkflowRun
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
154
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
155
155
|
|
|
156
156
|
<a id="workflow-events"></a>
|
|
157
157
|
|
|
@@ -177,7 +177,7 @@ One `agent()` call settled (clean result, child failure, or run cancellation). P
|
|
|
177
177
|
'workflow/agent-end'(info: WorkflowRunInfo, agent: WorkflowAgentEndInfo): void
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
180
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
181
181
|
|
|
182
182
|
<a id="workflowagent-start--emit"></a>
|
|
183
183
|
|
|
@@ -198,7 +198,7 @@ One `agent()` call established a published child run. Paired with Events['workfl
|
|
|
198
198
|
'workflow/agent-start'(info: WorkflowRunInfo, agent: WorkflowAgentInfo): void
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
201
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
202
202
|
|
|
203
203
|
<a id="workflowend--emit"></a>
|
|
204
204
|
|
|
@@ -219,7 +219,7 @@ A workflow run settled (any stop reason). Fired when WorkflowRun.result resolves
|
|
|
219
219
|
'workflow/end'(info: WorkflowRunInfo, result: WorkflowResultInfo): void
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
222
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
223
223
|
|
|
224
224
|
<a id="workflowlog--emit"></a>
|
|
225
225
|
|
|
@@ -237,7 +237,7 @@ The script emitted a narration line (a `log(message)` call).
|
|
|
237
237
|
'workflow/log'(info: WorkflowRunInfo, message: string): void
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
240
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
241
241
|
|
|
242
242
|
<a id="workflowphase--emit"></a>
|
|
243
243
|
|
|
@@ -256,7 +256,7 @@ The script entered a phase (a `phase(title)` call) — progress grouping for obs
|
|
|
256
256
|
'workflow/phase'(info: WorkflowRunInfo, title: string): void
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
259
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
260
260
|
|
|
261
261
|
<a id="workflowstart--emit"></a>
|
|
262
262
|
|
|
@@ -274,5 +274,5 @@ A workflow run started — the script's meta block validated, the body about to
|
|
|
274
274
|
'workflow/start'(info: WorkflowRunInfo): void
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
Source: [`packages/workflow/workflow/src/index.ts
|
|
277
|
+
Source: [`packages/workflow/workflow/src/index.ts`](../../packages/workflow/workflow/src/index.ts)
|
|
278
278
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/workspace.md
|
|
5
|
-
workspace.md:
|
|
6
|
-
workspace.zh.md:
|
|
5
|
+
workspace.md: 82bbe310d490653bae5d88f41d1fcbe76833b431
|
|
6
|
+
workspace.zh.md: 9bf63b7a90f9136173fbec16b55a22821fa380e5
|
|
@@ -117,13 +117,13 @@ Ownership truth is the record's ordered `sessionIds`, never derived from session
|
|
|
117
117
|
|
|
118
118
|
## The registry: `ctx.workspaceRegistry`
|
|
119
119
|
|
|
120
|
-
`WorkspaceRegistry` ([signatures](#ctxworkspaceregistry--workspaceregistry)) owns registration and resolution. `create(path, title?)` canonicalizes the path, rejects a nonexistent path (the original `ENOENT`) or a non-directory, returns the existing entity unchanged when the canonical path is already owned, and otherwise creates a record with `title ?? basename(path)` prepended to the durable registry order
|
|
120
|
+
`WorkspaceRegistry` ([signatures](#ctxworkspaceregistry--workspaceregistry)) owns registration and resolution. `create(path, title?)` canonicalizes the path, rejects a nonexistent path (the original `ENOENT`) or a non-directory, returns the existing entity unchanged when the canonical path is already owned, and otherwise creates a record with `title ?? basename(path)` prepended to the durable registry order (different canonical paths may share a display title). `get(id)` and the ordered `list()` are synchronous cache reads; `resolveByPath(path)` applies the same realpath canon without creating. `delete(id)` removes only the registration, order entry, and session account — the directory, user files, live sessions, and persisted logs are never touched, so those sessions become Ungrouped ([decision](../../.agents/notes/implemented/feature/2026-07-27-workspace-registration-deletion.md)); unknown ids return `false`. Create and delete persist a pending-mutation marker before their two writes (record + order) can diverge; startup resolves exactly the marked mutation — by deleting the marked table row, which completes an interrupted delete and rolls back an interrupted create (the registration is re-creatable, so rollback is the safe direction) — and an unmarked order/table mismatch fails loud as corruption.
|
|
121
121
|
|
|
122
122
|
Sessions get their cwd at create time from whoever creates them, not from this registry — the API gateway resolves a new session's cwd from the chosen workspace's `path` (falling back to an explicit or default cwd), creates the session so the cwd lands in its immutable [`SessionHeader`](persistence.md#sessionheader--metadata-beside-the-log), then calls `attachSession`, which re-validates that stored header cwd against the workspace path. On the first successful start, the registry bootstraps history from persisted headers alone (`id`, `cwd`, `createdAt` — never event bodies), grouping sessions with a valid canonical cwd into per-directory workspaces, newest first; the initialized marker is written last so an interrupted bootstrap resumes safely. The bootstrap is one-time: cwd-less legacy sessions stay Ungrouped, and sessions created afterwards join a workspace only through `attachSession`.
|
|
123
123
|
|
|
124
124
|
## Consumers
|
|
125
125
|
|
|
126
|
-
[dsh-
|
|
126
|
+
[`dsh-workspace-controller`](../../packages/api/workspace-controller) serves workspace CRUD to GUI clients over `ctx.workspaceRegistry`, and [`dsh-session-controller`](../../packages/api/session-controller) performs the create-session-then-attach flow above. [dsh-agent-instructions](../../packages/context/agent-instructions) is **not** a consumer despite the name: it discovers AGENTS.md-style instruction files under an agent's own cwd and never touches `ctx.workspaceRegistry` — the shared word refers to the user's working directory, not to this registry's entities.
|
|
127
127
|
|
|
128
128
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
129
129
|
|
|
@@ -131,7 +131,7 @@ Sessions get their cwd at create time from whoever creates them, not from this r
|
|
|
131
131
|
|
|
132
132
|
## Cordis API
|
|
133
133
|
|
|
134
|
-
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`) —
|
|
134
|
+
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).
|
|
135
135
|
|
|
136
136
|
<a id="ctxdirectorypicker--directorypicker-abstract-seam"></a>
|
|
137
137
|
|
|
@@ -147,7 +147,100 @@ Abstract directory-picking service. Subclass, implement `capability()`, and load
|
|
|
147
147
|
abstract capability(): DirectoryPickerCapability
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
Source: [`packages/host/directory-picker/src/index.ts
|
|
150
|
+
Source: [`packages/host/directory-picker/src/index.ts`](../../packages/host/directory-picker/src/index.ts)
|
|
151
|
+
|
|
152
|
+
<a id="ctxdirectorypickercontroller--directorypickercontroller"></a>
|
|
153
|
+
|
|
154
|
+
### `ctx.directoryPickerController` — `DirectoryPickerController`
|
|
155
|
+
|
|
156
|
+
Host service backing the generated `ctx.remote.directoryPicker` namespace. The seam it exports is abstract and therefore never a Loader entry of its own, so this controller carries the wire verbs: one composed backend serves either the native chooser or the browse primitives, and a verb the composition cannot serve is refused rather than approximated.
|
|
157
|
+
|
|
158
|
+
```ts cordis-catalog
|
|
159
|
+
/**
|
|
160
|
+
* Open the host's OS chooser for a Remote caller.
|
|
161
|
+
* @param signal - caller lifetime; abort terminates the chooser.
|
|
162
|
+
* @returns the chosen absolute path, or null when the operator cancels.
|
|
163
|
+
*/
|
|
164
|
+
@Remote('pick') async pick(signal: AbortSignal): Promise<string | null>
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* List one directory level for a Remote caller's in-app browser.
|
|
168
|
+
* @param path - absolute directory to list; absent lists the home directory.
|
|
169
|
+
* @param signal - caller lifetime; abort stops the backend's scan instead of
|
|
170
|
+
* letting it outlive a disconnected caller.
|
|
171
|
+
* @returns the level's listing with its ancestry.
|
|
172
|
+
*/
|
|
173
|
+
@Remote('list') async list(path: string | undefined, signal: AbortSignal): Promise<DirectoryListing>
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Create one child directory for a Remote caller's in-app browser.
|
|
177
|
+
* @param path - absolute existing parent directory.
|
|
178
|
+
* @param name - single non-blank path segment.
|
|
179
|
+
* @returns the created directory's absolute path.
|
|
180
|
+
*/
|
|
181
|
+
@Remote('createDirectory') async createDirectory(path: string, name: string): Promise<string>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Source: [`packages/api/workspace-controller/src/directory-picker.ts`](../../packages/api/workspace-controller/src/directory-picker.ts)
|
|
185
|
+
|
|
186
|
+
<a id="ctxworkspacecontroller--workspacecontroller"></a>
|
|
187
|
+
|
|
188
|
+
### `ctx.workspaceController` — `WorkspaceController`
|
|
189
|
+
|
|
190
|
+
Host service backing the generated `ctx.remote.workspace` namespace.
|
|
191
|
+
|
|
192
|
+
```ts cordis-catalog
|
|
193
|
+
/**
|
|
194
|
+
* Create or idempotently resolve one Workspace over an existing directory.
|
|
195
|
+
* @param request - directory path to register.
|
|
196
|
+
* @returns the Workspace and whether this call created it.
|
|
197
|
+
*/
|
|
198
|
+
@Remote('create') create(request: WorkspaceCreateRequest): Promise<WorkspaceCreateValue>
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Rename one Workspace to a unique non-blank title.
|
|
202
|
+
* @param request - Workspace identity and proposed title.
|
|
203
|
+
* @returns the updated Workspace projection.
|
|
204
|
+
*/
|
|
205
|
+
@Remote('rename') rename(request: WorkspaceRenameRequest): Promise<WorkspaceValue>
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Remove one Workspace registration while retaining files and Sessions.
|
|
209
|
+
* @param request - Workspace identity to remove.
|
|
210
|
+
* @returns deletion confirmation.
|
|
211
|
+
*/
|
|
212
|
+
@Remote('delete') delete(request: WorkspaceDeleteRequest): Promise<WorkspaceDeleteValue>
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Move one Workspace within the registry display order.
|
|
216
|
+
* @param request - moved Workspace and optional anchor.
|
|
217
|
+
* @returns the complete resulting Workspace order.
|
|
218
|
+
*/
|
|
219
|
+
@Remote('insertBefore') insertBefore(request: WorkspaceInsertBeforeRequest): Promise<WorkspaceOrderValue>
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Move one accounted Session within a Workspace.
|
|
223
|
+
* @param request - Workspace, Session, and optional anchor identities.
|
|
224
|
+
* @returns the updated Workspace projection.
|
|
225
|
+
*/
|
|
226
|
+
@Remote('insertSessionBefore') insertSessionBefore(request: WorkspaceInsertSessionBeforeRequest): Promise<WorkspaceValue>
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Hide one known Session from Workspace grouping surfaces.
|
|
230
|
+
* @param request - Session identity to archive.
|
|
231
|
+
* @returns the complete resulting archive set.
|
|
232
|
+
*/
|
|
233
|
+
@Remote('archiveSession') archiveSession(request: WorkspaceArchiveSessionRequest): Promise<WorkspaceArchiveValue>
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Stream a complete Workspace baseline followed by ordered increments.
|
|
237
|
+
* @param signal - generation cancellation.
|
|
238
|
+
* @returns baseline followed by ordered Workspace increments.
|
|
239
|
+
*/
|
|
240
|
+
@Remote({ mode: 'stream' }) follow(signal: AbortSignal): AsyncIterable<WorkspaceFollowFrame>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Source: [`packages/api/workspace-controller/src/index.ts`](../../packages/api/workspace-controller/src/index.ts)
|
|
151
244
|
|
|
152
245
|
<a id="ctxworkspaceregistry--workspaceregistry"></a>
|
|
153
246
|
|
|
@@ -224,5 +317,5 @@ async resolveByPath(path: string): Promise<Workspace | undefined>
|
|
|
224
317
|
|
|
225
318
|
Types: [SessionId](core.md)
|
|
226
319
|
|
|
227
|
-
Source: [`packages/workspace/workspace/src/index.ts
|
|
320
|
+
Source: [`packages/workspace/workspace/src/index.ts`](../../packages/workspace/workspace/src/index.ts)
|
|
228
321
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](workspace.md) | 中文
|
|
4
4
|
|
|
5
|
-
工作区(workspace)是用户工作目录的持久记录:一个建立在规范路径之上的稳定 id、一个显示标题,以及归属于它的会话的有序账本。该子系统是单个包(package)([dsh-workspace](../../packages/workspace/workspace),`ctx.workspaceRegistry`)——一项宿主侧可选能力,不属于 agent loop(智能体循环)主干,并且对模型不可见(没有工具、没有提示词文本、没有会话事件)。它通过[存储领域数据形式](storage.md)存储自己的记录,并对照 [`SessionHeader.cwd`](persistence.md#sessionheader--metadata-beside-the-log) 校验会话成员资格,因此 `storageDomain` 与 `sessionPersistence` 是必需的启动依赖:持久化这一依赖不可用时,插件保持 pending,而不是把这种不可用误当作空历史。设计记录:[领域 KV 存储 Agent Note(agent 决策记录)](../../.agents/notes/proposed/architecture/2026-07-24-domain-kv-storage-and-workspace.md);引导与 GUI 顺序:[Workspace UI 产品流程 Agent Note](../../.agents/notes/implemented/feature/2026-07-25-workspace-ui-product-flow.md)。
|
|
5
|
+
工作区(workspace)是用户工作目录的持久记录:一个建立在规范路径之上的稳定 id、一个显示标题,以及归属于它的会话的有序账本。该子系统是单个包(package)([dsh-workspace](../../packages/workspace/workspace),`ctx.workspaceRegistry`)——一项宿主侧可选能力,不属于 agent loop(智能体循环)主干,并且对模型不可见(没有工具、没有提示词文本、没有会话事件)。它通过[存储领域数据形式](storage.zh.md)存储自己的记录,并对照 [`SessionHeader.cwd`](persistence.zh.md#sessionheader--metadata-beside-the-log) 校验会话成员资格,因此 `storageDomain` 与 `sessionPersistence` 是必需的启动依赖:持久化这一依赖不可用时,插件保持 pending,而不是把这种不可用误当作空历史。设计记录:[领域 KV 存储 Agent Note(agent 决策记录)](../../.agents/notes/proposed/architecture/2026-07-24-domain-kv-storage-and-workspace.zh.md);引导与 GUI 顺序:[Workspace UI 产品流程 Agent Note](../../.agents/notes/implemented/feature/2026-07-25-workspace-ui-product-flow.zh.md)。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/workspace/workspace/src/types.ts`](../../packages/workspace/workspace/src/types.ts)
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
type WorkspaceId = Branded<'WorkspaceId'>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
`WorkspaceId` 是[品牌化 id](core.md#branded-ids)。路径标识与之分离:`realpathNormalize`(`fs.realpath`;尾部斜杠、`..` 与符号链接全部解析)是唯一的一套唯一性规范——工作区路径以规范化形式存储,唯一性即规范路径的字符串相等(指向已被拥有目录的符号链接会与之冲突),attach 时的会话 cwd 检查也走同一套规范。
|
|
19
|
+
`WorkspaceId` 是[品牌化 id](core.zh.md#branded-ids)。路径标识与之分离:`realpathNormalize`(`fs.realpath`;尾部斜杠、`..` 与符号链接全部解析)是唯一的一套唯一性规范——工作区路径以规范化形式存储,唯一性即规范路径的字符串相等(指向已被拥有目录的符号链接会与之冲突),attach 时的会话 cwd 检查也走同一套规范。
|
|
20
20
|
|
|
21
21
|
## 工作区实体
|
|
22
22
|
|
|
@@ -117,13 +117,13 @@ interface Workspace {
|
|
|
117
117
|
|
|
118
118
|
## 注册表:`ctx.workspaceRegistry`
|
|
119
119
|
|
|
120
|
-
`WorkspaceRegistry`([签名](#ctxworkspaceregistry--workspaceregistry))拥有注册与解析。`create(path, title?)` 规范化路径,拒绝不存在的路径(原样传出原始 `ENOENT`)或非目录;当规范路径已被拥有时原样返回既有实体;否则创建一条标题为 `title ?? basename(path)`
|
|
120
|
+
`WorkspaceRegistry`([签名](#ctxworkspaceregistry--workspaceregistry))拥有注册与解析。`create(path, title?)` 规范化路径,拒绝不存在的路径(原样传出原始 `ENOENT`)或非目录;当规范路径已被拥有时原样返回既有实体;否则创建一条标题为 `title ?? basename(path)` 的记录并前插到持久的注册表顺序中(不同规范路径可以共享同一显示标题)。`get(id)` 与有序的 `list()` 是同步缓存读取;`resolveByPath(path)` 应用同一套 realpath 规范但不创建。`delete(id)` 只移除注册记录、顺序条目和会话账本——目录、用户文件、实时会话和已持久化日志一概不动,因此这些会话变为 Ungrouped([决策](../../.agents/notes/implemented/feature/2026-07-27-workspace-registration-deletion.zh.md));未知 id 返回 `false`。create 与 delete 会在其两次写入(记录 + 顺序)可能分叉之前先持久写入一个待定变更标记;启动时恰好解决被标记的那次变更——通过删除被标记的表行:这会补完被中断的 delete,并回滚被中断的 create(注册可以重建,因此回滚是安全方向)——而没有标记的顺序/表不一致则作为损坏大声失败。
|
|
121
121
|
|
|
122
|
-
会话的 cwd 在创建时由创建者赋予,而不是由本注册表赋予——API 网关从所选工作区的 `path` 解析新会话的 cwd(回退到显式或默认 cwd),先创建会话使 cwd 落入其不可变的 [`SessionHeader`](persistence.md#sessionheader--metadata-beside-the-log),再调用 `attachSession`,后者会把已存储的 header cwd 与工作区路径重新校验一遍。首次成功启动时,注册表仅凭已持久化的 header(`id`、`cwd`、`createdAt`——绝不读事件正文)引导历史:把规范 cwd 有效的会话按目录分组为工作区,最新的排在最前;「已初始化」标记最后写入,因此被中断的引导可以安全续跑。引导只发生这一次:没有 cwd 的历史遗留会话保持 Ungrouped,此后创建的会话只能通过 `attachSession` 加入工作区。
|
|
122
|
+
会话的 cwd 在创建时由创建者赋予,而不是由本注册表赋予——API 网关从所选工作区的 `path` 解析新会话的 cwd(回退到显式或默认 cwd),先创建会话使 cwd 落入其不可变的 [`SessionHeader`](persistence.zh.md#sessionheader--metadata-beside-the-log),再调用 `attachSession`,后者会把已存储的 header cwd 与工作区路径重新校验一遍。首次成功启动时,注册表仅凭已持久化的 header(`id`、`cwd`、`createdAt`——绝不读事件正文)引导历史:把规范 cwd 有效的会话按目录分组为工作区,最新的排在最前;「已初始化」标记最后写入,因此被中断的引导可以安全续跑。引导只发生这一次:没有 cwd 的历史遗留会话保持 Ungrouped,此后创建的会话只能通过 `attachSession` 加入工作区。
|
|
123
123
|
|
|
124
124
|
## 消费方
|
|
125
125
|
|
|
126
|
-
[dsh-
|
|
126
|
+
[`dsh-workspace-controller`](../../packages/api/workspace-controller) 经 `ctx.workspaceRegistry` 向 GUI 客户端提供工作区 CRUD,[`dsh-session-controller`](../../packages/api/session-controller) 执行上文「先建会话再 attach」的流程。[dsh-agent-instructions](../../packages/context/agent-instructions) 尽管名字如此,却**不是**消费方:它在 agent 自己的 cwd 下发现 AGENTS.md 风格的指令文件,从不触碰 `ctx.workspaceRegistry`——两者共用的这个词指的是用户的工作目录,而非本注册表的实体。
|
|
127
127
|
|
|
128
128
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
129
129
|
|
|
@@ -131,7 +131,7 @@ interface Workspace {
|
|
|
131
131
|
|
|
132
132
|
## Cordis API
|
|
133
133
|
|
|
134
|
-
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`) —
|
|
134
|
+
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.zh.md#dispatch-modes), and the framework-inherited `ctx` API lives in [cordis-api/inherited.md](../cordis-api/inherited.md).
|
|
135
135
|
|
|
136
136
|
<a id="ctxdirectorypicker--directorypicker-abstract-seam"></a>
|
|
137
137
|
|
|
@@ -147,7 +147,100 @@ Abstract directory-picking service. Subclass, implement `capability()`, and load
|
|
|
147
147
|
abstract capability(): DirectoryPickerCapability
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
Source: [`packages/host/directory-picker/src/index.ts
|
|
150
|
+
Source: [`packages/host/directory-picker/src/index.ts`](../../packages/host/directory-picker/src/index.ts)
|
|
151
|
+
|
|
152
|
+
<a id="ctxdirectorypickercontroller--directorypickercontroller"></a>
|
|
153
|
+
|
|
154
|
+
### `ctx.directoryPickerController` — `DirectoryPickerController`
|
|
155
|
+
|
|
156
|
+
Host service backing the generated `ctx.remote.directoryPicker` namespace. The seam it exports is abstract and therefore never a Loader entry of its own, so this controller carries the wire verbs: one composed backend serves either the native chooser or the browse primitives, and a verb the composition cannot serve is refused rather than approximated.
|
|
157
|
+
|
|
158
|
+
```ts cordis-catalog
|
|
159
|
+
/**
|
|
160
|
+
* Open the host's OS chooser for a Remote caller.
|
|
161
|
+
* @param signal - caller lifetime; abort terminates the chooser.
|
|
162
|
+
* @returns the chosen absolute path, or null when the operator cancels.
|
|
163
|
+
*/
|
|
164
|
+
@Remote('pick') async pick(signal: AbortSignal): Promise<string | null>
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* List one directory level for a Remote caller's in-app browser.
|
|
168
|
+
* @param path - absolute directory to list; absent lists the home directory.
|
|
169
|
+
* @param signal - caller lifetime; abort stops the backend's scan instead of
|
|
170
|
+
* letting it outlive a disconnected caller.
|
|
171
|
+
* @returns the level's listing with its ancestry.
|
|
172
|
+
*/
|
|
173
|
+
@Remote('list') async list(path: string | undefined, signal: AbortSignal): Promise<DirectoryListing>
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Create one child directory for a Remote caller's in-app browser.
|
|
177
|
+
* @param path - absolute existing parent directory.
|
|
178
|
+
* @param name - single non-blank path segment.
|
|
179
|
+
* @returns the created directory's absolute path.
|
|
180
|
+
*/
|
|
181
|
+
@Remote('createDirectory') async createDirectory(path: string, name: string): Promise<string>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Source: [`packages/api/workspace-controller/src/directory-picker.ts`](../../packages/api/workspace-controller/src/directory-picker.ts)
|
|
185
|
+
|
|
186
|
+
<a id="ctxworkspacecontroller--workspacecontroller"></a>
|
|
187
|
+
|
|
188
|
+
### `ctx.workspaceController` — `WorkspaceController`
|
|
189
|
+
|
|
190
|
+
Host service backing the generated `ctx.remote.workspace` namespace.
|
|
191
|
+
|
|
192
|
+
```ts cordis-catalog
|
|
193
|
+
/**
|
|
194
|
+
* Create or idempotently resolve one Workspace over an existing directory.
|
|
195
|
+
* @param request - directory path to register.
|
|
196
|
+
* @returns the Workspace and whether this call created it.
|
|
197
|
+
*/
|
|
198
|
+
@Remote('create') create(request: WorkspaceCreateRequest): Promise<WorkspaceCreateValue>
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Rename one Workspace to a unique non-blank title.
|
|
202
|
+
* @param request - Workspace identity and proposed title.
|
|
203
|
+
* @returns the updated Workspace projection.
|
|
204
|
+
*/
|
|
205
|
+
@Remote('rename') rename(request: WorkspaceRenameRequest): Promise<WorkspaceValue>
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Remove one Workspace registration while retaining files and Sessions.
|
|
209
|
+
* @param request - Workspace identity to remove.
|
|
210
|
+
* @returns deletion confirmation.
|
|
211
|
+
*/
|
|
212
|
+
@Remote('delete') delete(request: WorkspaceDeleteRequest): Promise<WorkspaceDeleteValue>
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Move one Workspace within the registry display order.
|
|
216
|
+
* @param request - moved Workspace and optional anchor.
|
|
217
|
+
* @returns the complete resulting Workspace order.
|
|
218
|
+
*/
|
|
219
|
+
@Remote('insertBefore') insertBefore(request: WorkspaceInsertBeforeRequest): Promise<WorkspaceOrderValue>
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Move one accounted Session within a Workspace.
|
|
223
|
+
* @param request - Workspace, Session, and optional anchor identities.
|
|
224
|
+
* @returns the updated Workspace projection.
|
|
225
|
+
*/
|
|
226
|
+
@Remote('insertSessionBefore') insertSessionBefore(request: WorkspaceInsertSessionBeforeRequest): Promise<WorkspaceValue>
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Hide one known Session from Workspace grouping surfaces.
|
|
230
|
+
* @param request - Session identity to archive.
|
|
231
|
+
* @returns the complete resulting archive set.
|
|
232
|
+
*/
|
|
233
|
+
@Remote('archiveSession') archiveSession(request: WorkspaceArchiveSessionRequest): Promise<WorkspaceArchiveValue>
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Stream a complete Workspace baseline followed by ordered increments.
|
|
237
|
+
* @param signal - generation cancellation.
|
|
238
|
+
* @returns baseline followed by ordered Workspace increments.
|
|
239
|
+
*/
|
|
240
|
+
@Remote({ mode: 'stream' }) follow(signal: AbortSignal): AsyncIterable<WorkspaceFollowFrame>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Source: [`packages/api/workspace-controller/src/index.ts`](../../packages/api/workspace-controller/src/index.ts)
|
|
151
244
|
|
|
152
245
|
<a id="ctxworkspaceregistry--workspaceregistry"></a>
|
|
153
246
|
|
|
@@ -222,7 +315,7 @@ archiveSession(sessionId: SessionId): Promise<void>
|
|
|
222
315
|
async resolveByPath(path: string): Promise<Workspace | undefined>
|
|
223
316
|
```
|
|
224
317
|
|
|
225
|
-
Types: [SessionId](core.md)
|
|
318
|
+
Types: [SessionId](core.zh.md)
|
|
226
319
|
|
|
227
|
-
Source: [`packages/workspace/workspace/src/index.ts
|
|
320
|
+
Source: [`packages/workspace/workspace/src/index.ts`](../../packages/workspace/workspace/src/index.ts)
|
|
228
321
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/testing.md
|
|
5
|
-
testing.md:
|
|
6
|
-
testing.zh.md:
|
|
5
|
+
testing.md: 25514702e7aa8649c10ec213f5a6bf5c6e9e9a09
|
|
6
|
+
testing.zh.md: 5338e4bc392e1e1ff16c32f708970be917e6efa7
|