dsh-plugin-guide 0.2.0 → 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 +36 -18
- package/README.hi.md +36 -18
- package/README.md +38 -18
- package/README.pt.md +36 -18
- package/README.zh.md +38 -18
- 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 +2 -2
- package/guide/quick-reference.md +2 -2
- package/guide/quick-reference.pt.md +2 -2
- package/guide/quick-reference.zh-CN.md +3 -3
- package/package.json +13 -4
- package/references/cordis-paper-and-community.md +1 -1
- package/references/harness-repo.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 +160 -39
- package/references/official-docs/docs/persistence-catalog.zh.md +169 -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 +273 -39
- package/references/official-docs/docs/subsystems/session.zh.md +290 -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/check-docs-drift.ps1 +55 -0
- package/scripts/check-readme-sync.mjs +91 -0
- 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,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](typert.md) | 中文
|
|
4
4
|
|
|
5
|
-
以下类型由生成的 Remote 产物、Host Gateway 与消费方 API assembly 共用。[Typert Gateway Agent Note](../../.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.md) 负责架构与传输决策;本页记录 [`dsh-typert-protocol`](../../packages/typert/protocol/src/types.ts) 和 [`dsh-api-gateway`](../../packages/api/gateway/src/types.ts) 中公共约定的字面定义。
|
|
5
|
+
以下类型由生成的 Remote 产物、Host Gateway 与消费方 API assembly 共用。[Typert Gateway Agent Note](../../.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.zh.md) 负责架构与传输决策;本页记录 [`dsh-typert-protocol`](../../packages/typert/protocol/src/types.ts) 和 [`dsh-api-gateway`](../../packages/api/gateway/src/types.ts) 中公共约定的字面定义。
|
|
6
6
|
|
|
7
7
|
## Lookup 与上下文声明
|
|
8
8
|
|
|
@@ -84,6 +84,8 @@ interface InvocationDescriptor {
|
|
|
84
84
|
readonly method: string
|
|
85
85
|
/** Service member invoked when the exported method name is an alias. */
|
|
86
86
|
readonly implementation?: string
|
|
87
|
+
/** Absent for unary calls; stream calls validate and deliver every yielded item. */
|
|
88
|
+
readonly mode?: 'stream'
|
|
87
89
|
/** Receiver selection mode. */
|
|
88
90
|
readonly invocation:
|
|
89
91
|
| { readonly kind: 'direct' }
|
|
@@ -95,7 +97,7 @@ interface InvocationDescriptor {
|
|
|
95
97
|
}
|
|
96
98
|
/** Optional consuming-Context projection for one direct lookup parameter. */
|
|
97
99
|
readonly scope?: {
|
|
98
|
-
/** Context kind whose Client
|
|
100
|
+
/** Context kind whose Client adapter supplies the identity. */
|
|
99
101
|
readonly context: string
|
|
100
102
|
/** Lookup parameter wire field replaced by the Context identity. */
|
|
101
103
|
readonly wire: string
|
|
@@ -107,7 +109,7 @@ interface InvocationDescriptor {
|
|
|
107
109
|
/** Reserved final Host method parameter. */
|
|
108
110
|
readonly parameter: 'signal'
|
|
109
111
|
}
|
|
110
|
-
/** Codec for the
|
|
112
|
+
/** Codec for the unary result or each yielded stream item. */
|
|
111
113
|
readonly result: TypertCodec
|
|
112
114
|
/** Source declaration used only for diagnostics. */
|
|
113
115
|
readonly sourceLocation?: InvocationSourceLocation
|
|
@@ -137,7 +139,7 @@ interface TypertRemoteNamespaceMap {}
|
|
|
137
139
|
|
|
138
140
|
## Host Gateway
|
|
139
141
|
|
|
140
|
-
Connection 会先解码 carrier envelope,再调用 `ctx.typertGateway`。请求将精确的具名 wire 字段与 carrier 的取消 signal
|
|
142
|
+
Connection 会先解码 carrier envelope,再调用 `ctx.typertGateway`。请求将精确的具名 wire 字段与 carrier 的取消 signal 分开携带;基础设施与边界失败由 `TypertGatewayError` 承载,其 `gateway/*` 码就是普通的 `RemoteError` 码,因此 RPC 适配器会把每个经结构识别的 `RemoteError` 连同其 code 与 details 原样放行,只把无法识别的异常归并为 `gateway/internal`。
|
|
141
143
|
|
|
142
144
|
```ts type-equiv
|
|
143
145
|
/** One Remote method request after a carrier has decoded its envelope. */
|
|
@@ -156,35 +158,53 @@ interface InvokeRemoteRequest {
|
|
|
156
158
|
```ts type-equiv
|
|
157
159
|
/** Stable infrastructure and boundary failures emitted before or after business execution. */
|
|
158
160
|
type TypertGatewayErrorCode =
|
|
159
|
-
| 'ambiguous-endpoint'
|
|
160
|
-
| 'arguments-invalid'
|
|
161
|
-
| 'binding-invalid'
|
|
162
|
-
| 'context-failed'
|
|
163
|
-
| 'context-not-found'
|
|
164
|
-
| 'context-unavailable'
|
|
165
|
-
| 'definition-unavailable'
|
|
166
|
-
| 'input-invalid'
|
|
167
|
-
| 'invocation-unavailable'
|
|
168
|
-
| 'lookup-failed'
|
|
169
|
-
| 'lookup-not-found'
|
|
170
|
-
| 'lookup-unavailable'
|
|
171
|
-
| 'method-unavailable'
|
|
172
|
-
| 'provider-mismatch'
|
|
173
|
-
| 'result-invalid'
|
|
174
|
-
| 'service-unavailable'
|
|
175
|
-
| 'signature-invalid'
|
|
161
|
+
| 'gateway/ambiguous-endpoint'
|
|
162
|
+
| 'gateway/arguments-invalid'
|
|
163
|
+
| 'gateway/binding-invalid'
|
|
164
|
+
| 'gateway/context-failed'
|
|
165
|
+
| 'gateway/context-not-found'
|
|
166
|
+
| 'gateway/context-unavailable'
|
|
167
|
+
| 'gateway/definition-unavailable'
|
|
168
|
+
| 'gateway/input-invalid'
|
|
169
|
+
| 'gateway/invocation-unavailable'
|
|
170
|
+
| 'gateway/lookup-failed'
|
|
171
|
+
| 'gateway/lookup-not-found'
|
|
172
|
+
| 'gateway/lookup-unavailable'
|
|
173
|
+
| 'gateway/method-unavailable'
|
|
174
|
+
| 'gateway/provider-mismatch'
|
|
175
|
+
| 'gateway/result-invalid'
|
|
176
|
+
| 'gateway/service-unavailable'
|
|
177
|
+
| 'gateway/signature-invalid'
|
|
176
178
|
```
|
|
177
179
|
|
|
178
180
|
```ts type-equiv
|
|
179
181
|
/** Host dispatcher consumed by Connection adapters. */
|
|
180
182
|
interface TypertGateway {
|
|
183
|
+
/** Carrier adapter shared by WebSocket and in-process transports. */
|
|
184
|
+
readonly wireStream: TypertGatewayWireStream
|
|
185
|
+
/**
|
|
186
|
+
* Register the application-selected forwarded-event source.
|
|
187
|
+
* @param source - stream factory installed by the Remote assembly.
|
|
188
|
+
* @param host - stable Host facts included in each Client generation's opening frame.
|
|
189
|
+
* @returns disposer removing this exact source and cancelling its active streams.
|
|
190
|
+
*/
|
|
191
|
+
registerRemoteEvents(
|
|
192
|
+
source: TypertRemoteEventSource,
|
|
193
|
+
host: RemoteEventHostInfo,
|
|
194
|
+
): () => Promise<void>
|
|
181
195
|
/**
|
|
182
196
|
* Invoke one live Remote method without assuming a carrier or response envelope.
|
|
183
197
|
* @param request - decoded endpoint and named wire arguments.
|
|
184
|
-
* @returns the
|
|
198
|
+
* @returns the business result without output decoding.
|
|
185
199
|
* @throws {@link TypertGatewayError} for dispatch, provider, or boundary failures; lookup-policy and business errors retain identity.
|
|
186
200
|
*/
|
|
187
201
|
invoke(request: InvokeRemoteRequest): Promise<unknown>
|
|
202
|
+
/**
|
|
203
|
+
* Open one live stream Remote method without assuming a physical carrier.
|
|
204
|
+
* @param request - decoded endpoint and named wire arguments.
|
|
205
|
+
* @returns a cancellation-aware iterable over the business results.
|
|
206
|
+
*/
|
|
207
|
+
stream(request: InvokeRemoteRequest): Promise<AsyncIterable<unknown>>
|
|
188
208
|
}
|
|
189
209
|
```
|
|
190
210
|
|
|
@@ -202,26 +222,15 @@ interface TypertClientRemote extends TypertRemoteNamespaceMap {
|
|
|
202
222
|
*/
|
|
203
223
|
$mount(contribution: TypertRemoteContribution): Promise<TypertDisposer>
|
|
204
224
|
/**
|
|
205
|
-
* Subscribe to one forwarded Host event
|
|
206
|
-
* order
|
|
225
|
+
* Subscribe to one forwarded Host event. Notifications run in registration
|
|
226
|
+
* order and isolate failures; scoped waterfalls return, delegate through
|
|
227
|
+
* `next()`, or reject the Host dispatch.
|
|
207
228
|
* @template Event - forwarded event name selected by the Host assembly.
|
|
208
229
|
* @param event - forwarded Host event name, unchanged on the wire.
|
|
209
|
-
* @param listener - receives the
|
|
230
|
+
* @param listener - receives the Client projection of the Cordis `Events` declaration.
|
|
210
231
|
* @returns disposer owned by the calling fiber.
|
|
211
232
|
*/
|
|
212
|
-
$on<Event extends TypertRemoteEvent>(event: Event, listener:
|
|
213
|
-
/**
|
|
214
|
-
* Hand one decoded forwarded frame to the subscription table. The carrier
|
|
215
|
-
* owning the Host frame sink calls this; a consumer subscribes with
|
|
216
|
-
* {@link TypertClientRemote.$on} and never calls it.
|
|
217
|
-
*
|
|
218
|
-
* `event` is a plain string because this is the wire boundary: the name is
|
|
219
|
-
* whatever the Host assembly's allowlist selected, and one nobody subscribed
|
|
220
|
-
* to is dropped silently.
|
|
221
|
-
* @param event - forwarded Host event name, exactly as the Host emitted it.
|
|
222
|
-
* @param args - the Host argument list, already JSON-decoded.
|
|
223
|
-
*/
|
|
224
|
-
$dispatch(event: string, args: readonly unknown[]): void
|
|
233
|
+
$on<Event extends TypertRemoteEvent>(event: Event, listener: TypertClientEventListener<Event>): () => void
|
|
225
234
|
}
|
|
226
235
|
```
|
|
227
236
|
|
|
@@ -231,24 +240,7 @@ interface TypertClientRemote extends TypertRemoteNamespaceMap {
|
|
|
231
240
|
|
|
232
241
|
## Cordis API
|
|
233
242
|
|
|
234
|
-
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`) —
|
|
235
|
-
|
|
236
|
-
<a id="ctxapiproxy--apiproxy"></a>
|
|
237
|
-
|
|
238
|
-
### `ctx.apiProxy` — `ApiProxy`
|
|
239
|
-
|
|
240
|
-
Root interface of the unified API. New client-request domain = one new file pair + one field here + one map row.
|
|
241
|
-
|
|
242
|
-
```ts cordis-catalog
|
|
243
|
-
/**
|
|
244
|
-
* Response entry for server requests; not a domain method.
|
|
245
|
-
* @param message - Client response carrying the server request's rpcId.
|
|
246
|
-
* @returns Transport receipt for the response delivery.
|
|
247
|
-
*/
|
|
248
|
-
respond(message: ClientResponse): Promise<RpcReceipt>
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
Source: [`packages/host/apiproxy/src/api/index.ts:22`](../../packages/host/apiproxy/src/api/index.ts)
|
|
243
|
+
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).
|
|
252
244
|
|
|
253
245
|
<a id="ctxtypert--typertregistry"></a>
|
|
254
246
|
|
|
@@ -312,9 +304,9 @@ listPackages(filter: TypertPackageFilter = {}): TypertPackageRecord[]
|
|
|
312
304
|
toJSONSchema(key: string, params?: z.core.ToJSONSchemaParams): z.core.JSONSchema.BaseSchema
|
|
313
305
|
```
|
|
314
306
|
|
|
315
|
-
Types: [TypertContribution](invariants.md) · [TypertFace](invariants.md) · [TypertPackageFilter](invariants.md) · [TypertPackageRecord](invariants.md) · [TypertSchemaFilter](invariants.md) · [TypertSchemaRecord](invariants.md)
|
|
307
|
+
Types: [TypertContribution](invariants.zh.md) · [TypertFace](invariants.zh.md) · [TypertPackageFilter](invariants.zh.md) · [TypertPackageRecord](invariants.zh.md) · [TypertSchemaFilter](invariants.zh.md) · [TypertSchemaRecord](invariants.zh.md)
|
|
316
308
|
|
|
317
|
-
Source: [`packages/typert/registry/src/service.ts
|
|
309
|
+
Source: [`packages/typert/registry/src/service.ts`](../../packages/typert/registry/src/service.ts)
|
|
318
310
|
|
|
319
311
|
<a id="ctxtypertgateway--typertgatewayservice"></a>
|
|
320
312
|
|
|
@@ -323,14 +315,29 @@ Source: [`packages/typert/registry/src/service.ts:446`](../../packages/typert/re
|
|
|
323
315
|
Resolve strict generated definitions or conservative SRC markers against current Cordis Services and Typert providers.
|
|
324
316
|
|
|
325
317
|
```ts cordis-catalog
|
|
318
|
+
/**
|
|
319
|
+
* Register the sole application-selected forwarded-event source.
|
|
320
|
+
* @param source - stream factory installed by the Remote assembly.
|
|
321
|
+
* @param host - stable Host facts included in each Client generation's opening frame.
|
|
322
|
+
* @returns disposer removing this source and cancelling its active streams.
|
|
323
|
+
*/
|
|
324
|
+
registerRemoteEvents( source: TypertRemoteEventSource, host: RemoteEventHostInfo, ): () => Promise<void>
|
|
325
|
+
|
|
326
326
|
/**
|
|
327
327
|
* Invoke one live Remote method through strict generated reflection or SRC markers.
|
|
328
328
|
* @param request - decoded endpoint and exact named wire arguments.
|
|
329
|
-
* @returns the
|
|
329
|
+
* @returns the business result without output decoding.
|
|
330
330
|
* @throws {@link TypertGatewayError} for dispatch, provider, or boundary failures; lookup-policy and business errors retain identity.
|
|
331
331
|
*/
|
|
332
332
|
async invoke(request: InvokeRemoteRequest): Promise<unknown>
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Open one live stream Remote method without assuming a physical carrier.
|
|
336
|
+
* @param request - decoded endpoint and named wire arguments.
|
|
337
|
+
* @returns a cancellation-aware iterable over the business results.
|
|
338
|
+
*/
|
|
339
|
+
async stream(request: InvokeRemoteRequest): Promise<AsyncIterable<unknown>>
|
|
333
340
|
```
|
|
334
341
|
|
|
335
|
-
Source: [`packages/api/gateway/src/index.ts
|
|
342
|
+
Source: [`packages/api/gateway/src/index.ts`](../../packages/api/gateway/src/index.ts)
|
|
336
343
|
<!-- 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/user-questions.md
|
|
5
|
-
user-questions.md:
|
|
6
|
-
user-questions.zh.md:
|
|
5
|
+
user-questions.md: fbbfb1435586c7191e47a6eaa5b1783c9f172d48
|
|
6
|
+
user-questions.zh.md: 054ca06cd3c8a85cb35d99658c325848ea780cb5
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](user-questions.zh.md)
|
|
4
4
|
|
|
5
|
-
The user-questions seam of [dsh-user-questions](../../packages/interaction/user-questions). It is the provider-neutral vocabulary a tool or permission plugin uses when it needs the human to answer before the agent can continue.
|
|
5
|
+
The user-questions seam of [dsh-user-questions](../../packages/interaction/user-questions). It is the provider-neutral vocabulary a tool or permission plugin uses when it needs the human to answer before the agent can continue. Agent-scoped waterfall listeners compose the available UI surfaces, including listeners relayed to a connected client.
|
|
6
6
|
|
|
7
7
|
Source: [`packages/interaction/user-questions/src/index.ts`](../../packages/interaction/user-questions/src/index.ts)
|
|
8
8
|
|
|
@@ -74,14 +74,7 @@ interface AskUserQuestionItem {
|
|
|
74
74
|
|
|
75
75
|
```ts type-equiv
|
|
76
76
|
/** Request for a human answer. */
|
|
77
|
-
interface AskUserQuestionRequest {
|
|
78
|
-
/** Questions to display. */
|
|
79
|
-
questions: AskUserQuestionItem[]
|
|
80
|
-
/** Exact live calling agent, when the request came from an agent tool call. */
|
|
81
|
-
agent?: Agent
|
|
82
|
-
/** Abort signal for the owning tool/step. */
|
|
83
|
-
signal?: AbortSignal
|
|
84
|
-
}
|
|
77
|
+
interface AskUserQuestionRequest extends AskUserQuestionRequestEvent {}
|
|
85
78
|
```
|
|
86
79
|
|
|
87
80
|
## Answer
|
|
@@ -108,17 +101,6 @@ interface AskUserQuestionAnswer {
|
|
|
108
101
|
}
|
|
109
102
|
```
|
|
110
103
|
|
|
111
|
-
## Provider
|
|
112
|
-
|
|
113
|
-
Only one provider may be active in a context. Provider registration is effect-bound so HMR/disposal removes the active UI.
|
|
114
|
-
|
|
115
|
-
```ts type-equiv
|
|
116
|
-
/** UI-side provider for user questions. */
|
|
117
|
-
interface UserQuestionProvider {
|
|
118
|
-
ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
104
|
## Errors
|
|
123
105
|
|
|
124
106
|
`UserQuestionError` extends `HarnessError`, so `ctx.tools.execute()` preserves `{ name, code }` for model-facing tool failures such as `EMPTY_QUESTIONS`, `NO_PROVIDER`, `ASK_ABORTED`, or UI-side cancellation.
|
|
@@ -139,25 +121,17 @@ class UserQuestionError extends HarnessError {
|
|
|
139
121
|
|
|
140
122
|
## Cordis API
|
|
141
123
|
|
|
142
|
-
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`) —
|
|
124
|
+
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).
|
|
143
125
|
|
|
144
126
|
<a id="ctxuserquestions--userquestionservice"></a>
|
|
145
127
|
|
|
146
128
|
### `ctx.userQuestions` — `UserQuestionService`
|
|
147
129
|
|
|
148
|
-
`ctx.userQuestions`:
|
|
130
|
+
`ctx.userQuestions`: validation plus the scoped answerer waterfall.
|
|
149
131
|
|
|
150
132
|
```ts cordis-catalog
|
|
151
133
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* @param provider UI-side implementation that collects answers.
|
|
155
|
-
* @returns Disposer that unregisters this provider.
|
|
156
|
-
*/
|
|
157
|
-
registerProvider(provider: UserQuestionProvider): () => void
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Ask the active UI provider and wait for the user's answer.
|
|
134
|
+
* Ask the scoped answerer waterfall and wait for the user's answer.
|
|
161
135
|
*
|
|
162
136
|
* When a caller supplies an agent, human interaction is valid only for the
|
|
163
137
|
* exact live runtime root. Runtime ownership, not durable session lineage,
|
|
@@ -167,12 +141,38 @@ registerProvider(provider: UserQuestionProvider): () => void
|
|
|
167
141
|
*
|
|
168
142
|
* @param request Questions, owner agent, and abort signal.
|
|
169
143
|
* @returns The answer chosen or typed by the human.
|
|
170
|
-
* @throws {UserQuestionError} code `
|
|
171
|
-
*
|
|
172
|
-
*
|
|
144
|
+
* @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
|
|
145
|
+
* is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
|
|
146
|
+
* is not the registry's exact live instance, or `DELEGATED_CALLER` when
|
|
147
|
+
* that live agent is owned by another agent.
|
|
173
148
|
*/
|
|
174
149
|
async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>
|
|
175
150
|
```
|
|
176
151
|
|
|
177
|
-
Source: [`packages/interaction/user-questions/src/index.ts
|
|
152
|
+
Source: [`packages/interaction/user-questions/src/index.ts`](../../packages/interaction/user-questions/src/index.ts)
|
|
153
|
+
|
|
154
|
+
<a id="user-questions-events"></a>
|
|
155
|
+
|
|
156
|
+
### `user-questions/*` events
|
|
157
|
+
|
|
158
|
+
<a id="user-questionsrequest--waterfall"></a>
|
|
159
|
+
|
|
160
|
+
#### `user-questions/request` — waterfall
|
|
161
|
+
|
|
162
|
+
Ask composed answerers for structured user input. Return an answer to claim the request or call `next()` to delegate. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
163
|
+
|
|
164
|
+
```ts cordis-catalog
|
|
165
|
+
/**
|
|
166
|
+
* Ask composed answerers for structured user input. Return an answer to
|
|
167
|
+
* claim the request or call `next()` to delegate. Scope-filtered dispatch
|
|
168
|
+
* (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
169
|
+
* @param request - pending user-question request.
|
|
170
|
+
* @mode waterfall
|
|
171
|
+
*/
|
|
172
|
+
'user-questions/request'( this: Scoped<Agent>, request: AskUserQuestionRequestEvent, next: () => Promise<AskUserQuestionAnswer>, ): Promise<AskUserQuestionAnswer>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Types: [Agent](core.md) · [Scoped](scope.md)
|
|
176
|
+
|
|
177
|
+
Source: [`packages/interaction/user-questions/src/types.ts`](../../packages/interaction/user-questions/src/types.ts)
|
|
178
178
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](user-questions.md) | 中文
|
|
4
4
|
|
|
5
|
-
[dsh-user-questions](../../packages/interaction/user-questions) 的用户交互 seam。它是工具或权限插件需要人类回答后 agent(智能体)才能继续时所使用的、提供方无关的词汇。UI
|
|
5
|
+
[dsh-user-questions](../../packages/interaction/user-questions) 的用户交互 seam。它是工具或权限插件需要人类回答后 agent(智能体)才能继续时所使用的、提供方无关的词汇。Agent-scoped waterfall listener 组合可用的 UI 界面,其中包括转发到已连接 client 的 listener。
|
|
6
6
|
|
|
7
7
|
源码:[`packages/interaction/user-questions/src/index.ts`](../../packages/interaction/user-questions/src/index.ts)
|
|
8
8
|
|
|
@@ -74,14 +74,7 @@ interface AskUserQuestionItem {
|
|
|
74
74
|
|
|
75
75
|
```ts type-equiv
|
|
76
76
|
/** Request for a human answer. */
|
|
77
|
-
interface AskUserQuestionRequest {
|
|
78
|
-
/** Questions to display. */
|
|
79
|
-
questions: AskUserQuestionItem[]
|
|
80
|
-
/** Exact live calling agent, when the request came from an agent tool call. */
|
|
81
|
-
agent?: Agent
|
|
82
|
-
/** Abort signal for the owning tool/step. */
|
|
83
|
-
signal?: AbortSignal
|
|
84
|
-
}
|
|
77
|
+
interface AskUserQuestionRequest extends AskUserQuestionRequestEvent {}
|
|
85
78
|
```
|
|
86
79
|
|
|
87
80
|
## 回答
|
|
@@ -108,17 +101,6 @@ interface AskUserQuestionAnswer {
|
|
|
108
101
|
}
|
|
109
102
|
```
|
|
110
103
|
|
|
111
|
-
## 提供方
|
|
112
|
-
|
|
113
|
-
同一上下文中只能有一个活跃的提供方。提供方注册绑定到 effect,因此 HMR(热模块替换)或 dispose(资源释放)会移除当前活跃的 UI。
|
|
114
|
-
|
|
115
|
-
```ts type-equiv
|
|
116
|
-
/** UI-side provider for user questions. */
|
|
117
|
-
interface UserQuestionProvider {
|
|
118
|
-
ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
104
|
## 错误
|
|
123
105
|
|
|
124
106
|
`UserQuestionError` 继承 `HarnessError`,因此 `ctx.tools.execute()` 会保留 `{ name, code }`,用于面向模型的工具失败,如 `EMPTY_QUESTIONS`、`NO_PROVIDER`、`ASK_ABORTED` 或 UI 侧取消。
|
|
@@ -139,25 +121,17 @@ class UserQuestionError extends HarnessError {
|
|
|
139
121
|
|
|
140
122
|
## Cordis API
|
|
141
123
|
|
|
142
|
-
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`) —
|
|
124
|
+
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).
|
|
143
125
|
|
|
144
126
|
<a id="ctxuserquestions--userquestionservice"></a>
|
|
145
127
|
|
|
146
128
|
### `ctx.userQuestions` — `UserQuestionService`
|
|
147
129
|
|
|
148
|
-
`ctx.userQuestions`:
|
|
130
|
+
`ctx.userQuestions`: validation plus the scoped answerer waterfall.
|
|
149
131
|
|
|
150
132
|
```ts cordis-catalog
|
|
151
133
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* @param provider UI-side implementation that collects answers.
|
|
155
|
-
* @returns Disposer that unregisters this provider.
|
|
156
|
-
*/
|
|
157
|
-
registerProvider(provider: UserQuestionProvider): () => void
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Ask the active UI provider and wait for the user's answer.
|
|
134
|
+
* Ask the scoped answerer waterfall and wait for the user's answer.
|
|
161
135
|
*
|
|
162
136
|
* When a caller supplies an agent, human interaction is valid only for the
|
|
163
137
|
* exact live runtime root. Runtime ownership, not durable session lineage,
|
|
@@ -167,12 +141,38 @@ registerProvider(provider: UserQuestionProvider): () => void
|
|
|
167
141
|
*
|
|
168
142
|
* @param request Questions, owner agent, and abort signal.
|
|
169
143
|
* @returns The answer chosen or typed by the human.
|
|
170
|
-
* @throws {UserQuestionError} code `
|
|
171
|
-
*
|
|
172
|
-
*
|
|
144
|
+
* @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
|
|
145
|
+
* is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
|
|
146
|
+
* is not the registry's exact live instance, or `DELEGATED_CALLER` when
|
|
147
|
+
* that live agent is owned by another agent.
|
|
173
148
|
*/
|
|
174
149
|
async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>
|
|
175
150
|
```
|
|
176
151
|
|
|
177
|
-
Source: [`packages/interaction/user-questions/src/index.ts
|
|
152
|
+
Source: [`packages/interaction/user-questions/src/index.ts`](../../packages/interaction/user-questions/src/index.ts)
|
|
153
|
+
|
|
154
|
+
<a id="user-questions-events"></a>
|
|
155
|
+
|
|
156
|
+
### `user-questions/*` events
|
|
157
|
+
|
|
158
|
+
<a id="user-questionsrequest--waterfall"></a>
|
|
159
|
+
|
|
160
|
+
#### `user-questions/request` — waterfall
|
|
161
|
+
|
|
162
|
+
Ask composed answerers for structured user input. Return an answer to claim the request or call `next()` to delegate. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
163
|
+
|
|
164
|
+
```ts cordis-catalog
|
|
165
|
+
/**
|
|
166
|
+
* Ask composed answerers for structured user input. Return an answer to
|
|
167
|
+
* claim the request or call `next()` to delegate. Scope-filtered dispatch
|
|
168
|
+
* (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
|
|
169
|
+
* @param request - pending user-question request.
|
|
170
|
+
* @mode waterfall
|
|
171
|
+
*/
|
|
172
|
+
'user-questions/request'( this: Scoped<Agent>, request: AskUserQuestionRequestEvent, next: () => Promise<AskUserQuestionAnswer>, ): Promise<AskUserQuestionAnswer>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Types: [Agent](core.zh.md) · [Scoped](scope.zh.md)
|
|
176
|
+
|
|
177
|
+
Source: [`packages/interaction/user-questions/src/types.ts`](../../packages/interaction/user-questions/src/types.ts)
|
|
178
178
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write docs/subsystems/web-client.md
|
|
5
|
+
web-client.md: 166ad50df661e37318c5ed2f271569c292cce39a
|
|
6
|
+
web-client.zh.md: cdf91958e23c0ea5c99562e6ca347947fbeff292
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Web Client architecture
|
|
2
|
+
|
|
3
|
+
English | [中文](web-client.zh.md)
|
|
4
|
+
|
|
5
|
+
The Web Client is a browser-side Cordis application assembled from independently loaded plugins. Its architecture has four reusable foundations: [Client Modules](client-modules.md) loads the plugin graph, the [API Gateway](../api-gateway.md) provides typed Host communication, [Slots](slots.md) composes React UI, and [Conversation](conversation.md) turns a Session history window into target-owned views. This page connects those systems and defines where Client models and feature packages belong.
|
|
6
|
+
|
|
7
|
+
## Layers and ownership
|
|
8
|
+
|
|
9
|
+
| Layer | Main owners | Responsibility |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Host application | business services and `packages/api/*-controller` Host entries | Own authoritative state, persistence, mutation ordering, access policy, and stream production. |
|
|
12
|
+
| Transport and API assembly | `client/connection`, `api/gateway`, `api/remotes` | Establish a Client generation, expose generated `ctx.remote` methods and streams, forward selected Cordis events, and carry cancellation and results. |
|
|
13
|
+
| Client models | `api/session-controller/client`, `api/workspace-controller/client` | Maintain React-free mirrors of Host state, resolve stream/unary races, own object identities and subscriptions, and expose narrow command services. |
|
|
14
|
+
| UI adapters | `client/ui-session`, `client/ui-workspace` | Convert model observables into root or Session-scoped standard Slot sources without taking ownership of business state. |
|
|
15
|
+
| Conversation data | `client/ui-conversation`, target packages such as `ui-chat` and `ui-trajectory` | Assemble standard events and compact historical Assistant runs into independent target snapshots and own the shared conversation shell and input flow. |
|
|
16
|
+
| Composition and rendering | `client/ui-slots`, `client/ui-renderer`, `client/ui-layout`, feature UI packages | Declare extension locations, derive component props, bind observables to React hooks, and mount the final tree. |
|
|
17
|
+
|
|
18
|
+
The dependency direction is Host state → Remote transport → Client model → UI adapter → Conversation or presentation → Slots → React. User actions travel back through callbacks that close over an injected Client service or generated Remote namespace. A presentation component never receives Cordis `ctx`, a transport object, or another feature plugin's implementation.
|
|
19
|
+
|
|
20
|
+
## Browser boot
|
|
21
|
+
|
|
22
|
+
The Host writes the composed `WebBootGraph` to `window.__DSH_BOOT__` and installs the browser module-loader facade before parser-preloaded scripts execute. The module system is a lazy CommonJS table: loading a bundle registers its factory, while materializing an entry runs the factory with synchronous `require` over platform modules and declared dynamic dependencies.
|
|
23
|
+
|
|
24
|
+
The Web boot kernel creates the module system, prefetches `immediately` entries, mounts the vendored Cordis Loader, and creates every graph entry. Cordis service injection determines activation; module graph order determines only whether synchronous imports can be materialized. After the complete roster reaches a settled state, `ui-renderer` hydrates the framework-free boot DOM and calls the sole context-level `renderSlot('root')` operation. [Client Modules](client-modules.md) owns the graph, bundle route, cache revision, and loader details.
|
|
25
|
+
|
|
26
|
+
## Remote communication
|
|
27
|
+
|
|
28
|
+
Host business services annotate callable methods with Typert Remote decorators. Host generation emits strict descriptors, runtime codecs, declaration merges, and source maps. The Client-side `api-remotes` assembly selects those generated contributions and mounts concrete methods under `ctx.remote.<namespace>` and Session-scoped `agentCtx.remote.<namespace>`. Feature packages depend on the generated service face, not the Gateway implementation or a Host package's runtime entry.
|
|
29
|
+
|
|
30
|
+
The Connection owns request correlation, the `/api` carrier, trust checks, exact Fetch routes, and connection generations. API Gateway owns Remote dispatch, cancellation, logical streams, and selected Host event forwarding. Controller operations belong on generated Remote methods or explicit Remote streams; feature-owned downloads register exact Fetch routes. The [API Gateway reference](../api-gateway.md) defines generation and invocation, while the [Connection README](../../packages/client/connection/README.md) defines the physical carrier and trust policy.
|
|
31
|
+
|
|
32
|
+
The internal `$events` logical stream is the Connection generation source. Its opening `ready` frame carries the Host home used for path display and establishes the generation after Host listeners are attached, before any controller begins a baseline read. `ctx.remote.$on()` delivers allowlisted ordinary events to the root Client Context and scoped waterfall events to the resolved Session Context; a waterfall listener returns a result, calls `next()`, or rejects.
|
|
33
|
+
|
|
34
|
+
## Client models
|
|
35
|
+
|
|
36
|
+
Each API controller package owns a paired Host and Client face. The Host side owns authoritative mutation and stream production. The Client side owns an identity-stable, React-free model over the same generated wire types and exposes observable snapshots plus commands. UI packages consume these Client services and do not reproduce transport state in component stores.
|
|
37
|
+
|
|
38
|
+
### Sessions
|
|
39
|
+
|
|
40
|
+
[`api/session-controller`](../../packages/api/session-controller/README.md) exposes Host commands for list, search, creation, selection data, prompt, queue, cancellation, pagination, and follow/control streams. Its Client side is organized as `ClientSessions → SessionManager → Session`:
|
|
41
|
+
|
|
42
|
+
- `ClientSessions` provides `ctx.sessions`, owns Session scopes and stable `SessionBinding` objects, and projects the selected list state.
|
|
43
|
+
- `SessionManager` owns the list baseline, live list/control updates, lazy Session instances, queues, projection stores, subagent catalogs, and conflict ordering between pulls and later updates.
|
|
44
|
+
- Each `Session` owns one contiguous logical-event window represented by `SessionEventLikeEntry` values, paging, follow, prompt/control state, and the observable snapshot consumed by adapters.
|
|
45
|
+
|
|
46
|
+
The durable event path opens `follow()`, whose first frame contains the current header, tail page, cursor, and complete projection baseline. History records have an explicit `event` or `chunks` discriminator and an aligned inner `event`; the journal validates each inclusive logical sequence range before the Client retains the records as `SessionEventLikeEntry` values without per-record conversion. Each physical generation atomically replaces the retained window from that snapshot; standard live events then append by sequence. `page()` is reserved for older history and gap repair. The transient control stream starts every generation with a complete baseline and then applies queue, job, and projection updates.
|
|
47
|
+
|
|
48
|
+
### Workspaces
|
|
49
|
+
|
|
50
|
+
[`api/workspace-controller`](../../packages/api/workspace-controller/README.md) keeps Workspace mutation policy and the authoritative follow feed on the Host. `ClientWorkspaceModel` owns the browser rows, order, archived Session ids, command echoes, and stream/unary race resolution. Every stream generation starts with a complete baseline followed by `upsert`, `remove`, `order`, and `archived` increments; reconnect replaces the model from the new baseline. `WorkspaceController` exposes that model as `ctx.workspaces`, while `ui-workspace` contributes `useWorkspaces` and navigation callbacks to the UI.
|
|
51
|
+
|
|
52
|
+
This pairing is not a second source of business truth. Host controllers decide durable state and mutation outcomes; Client models maintain the latest usable local projection, preserve object identity where useful to rendering, and encode how delayed responses and replacement baselines merge.
|
|
53
|
+
|
|
54
|
+
## Conversation and presentation
|
|
55
|
+
|
|
56
|
+
`ui-session` installs the `session` scope adapter and publishes `useSessions`, `useSession`, `sessionId`, and `useProjection`. Domain adapters add further standard sources without putting React hooks on the model objects.
|
|
57
|
+
|
|
58
|
+
`ui-conversation` binds once to each `SessionBinding.eventSource`. Its event registry correlates standard events and Client-only `chunkrow/*` history events into stable business Contexts, and its view registry materializes target snapshots. Packed runs stay single inputs and Matches through replay; Chat Assistant, Trajectory Assistant, and Turn Tail are the built-in Definitions that interpret them. `ui-chat` and `ui-trajectory` register separate Definitions and builders: they may interpret the same event family, but they do not import or share each other's final display model. The shell selects a registered view and passes its snapshot through standard hooks and Slots. [Conversation](conversation.md) defines Context identity, replay, Location data, target builders, and keyed renderers.
|
|
59
|
+
|
|
60
|
+
`ui-slots` provides the typed registry and lifecycle ledger; `ui-renderer` is the only package that binds bare observables through `useSyncExternalStore`, owns React contexts, and renders the root tree. Feature components receive framework hooks, owner props, store actions, and explicit injection through their derived props. [Web Client Slots](slots.md) lists those inputs, extension APIs, and the current Slot hierarchy.
|
|
61
|
+
|
|
62
|
+
## Data paths
|
|
63
|
+
|
|
64
|
+
| Path | Sequence |
|
|
65
|
+
|---|---|
|
|
66
|
+
| durable Session display | Host Session log → packed Remote `follow`/`page` history → Client `SessionEventLikeEntry` window → Conversation Contexts → target snapshot (`chat`, `trajectory`, or another registered target) → Slot view → React |
|
|
67
|
+
| transient Session control | Host control baseline → Remote snapshot stream → `SessionManager` queue/job/projection stores → Session and list snapshots → standard hooks → components |
|
|
68
|
+
| Workspace state | Host Workspace baseline and increments → `ClientWorkspaceModel` → `ctx.workspaces.list` → `useWorkspaces` → sidebar, hero, and navigation entries |
|
|
69
|
+
| scoped interaction | Host Cordis waterfall → API Remotes `$events` → `ctx.remote.$on()` on the Session Context → owning UI package → result or `next()` |
|
|
70
|
+
| user command | component callback → registration inject face or Slot owner → `ctx.sessions`, `ctx.workspaces`, or generated scoped Remote → Host Controller → authoritative update → stream or event projection back to the Client |
|
|
71
|
+
|
|
72
|
+
## Reconnection
|
|
73
|
+
|
|
74
|
+
Physical and logical recovery are separate. Gateway mux restores the physical WebSocket; each `RemoteStream` reopens its own logical source when the Connection publishes a usable generation. A carrier failure is retryable, while a business error, malformed opening item, or protocol violation is terminal for the owning logical stream.
|
|
75
|
+
|
|
76
|
+
Recovery follows the data's semantics:
|
|
77
|
+
|
|
78
|
+
- A durable Session journal validates logical sequence ranges and replaces its window from every generation's opening snapshot; `page()` supplies older history and repairs any later range gap.
|
|
79
|
+
- Session control and Workspace streams retain the last published value while disconnected, then atomically replace it from a fresh opening baseline.
|
|
80
|
+
- Ordinary forwarded notifications are not replayed. Stateful domains need a baseline, cursor, or explicit query; scoped waterfalls retain their own request lifetime.
|
|
81
|
+
|
|
82
|
+
There is no monolithic Client `Runtime`, `HostFrame`, `events.mux`, `events.host`, or universal `resync()` API. The Connection exposes generation state, Gateway owns logical stream supervision, and each Client model defines replacement or resume semantics appropriate to its data.
|
|
83
|
+
|
|
84
|
+
## Package boundaries
|
|
85
|
+
|
|
86
|
+
Feature plugin packages may share declarations through `import type`; they do not runtime-import or re-export another feature plugin's values. Cross-package behavior uses injected Cordis services, and cross-package UI uses Slots. Target-specific Conversation Definitions, projection helpers, and final view data stay with their target package even when Chat and Trajectory intentionally implement parallel logic.
|
|
87
|
+
|
|
88
|
+
Shared runtime values need a narrow static owner with no feature lifecycle, such as `client/store`, `ui-primitives`, or a browser-safe utility package. Transport and generated API assembly may import runtime contributions because assembling one protocol is their explicit responsibility. A feature package does not add `dsh.client.external` merely to bypass this rule.
|
|
89
|
+
|
|
90
|
+
Use the four detailed references according to the extension being added:
|
|
91
|
+
|
|
92
|
+
- [Client Modules](client-modules.md) for package discovery, loading, shared module identities, and boot order.
|
|
93
|
+
- [API Gateway](../api-gateway.md) for Host methods, generated Remote contributions, streams, and forwarded events.
|
|
94
|
+
- [Web Client Slots](slots.md) for components, hooks, stores, injection, and placement.
|
|
95
|
+
- [Conversation](conversation.md) for durable event correlation, target snapshots, and Chat or Trajectory view contributions.
|