dsh-plugin-guide 0.3.21 → 0.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-es.md +15 -12
- package/README-hi.md +15 -12
- package/README-pt.md +15 -12
- package/README-zh.md +15 -12
- package/README.md +290 -280
- package/SKILL.md +36 -19
- package/dist/dsh-plugin-dev.js +113 -9
- package/guide/choosing-a-plugin.md +412 -0
- package/guide/choosing-a-plugin.zh-CN.md +414 -0
- package/guide/links.md +20 -2
- package/guide/migration-0.2.md +219 -0
- package/guide/plugin-dev-guide.md +99 -24
- package/guide/quick-reference.es.md +14 -8
- package/guide/quick-reference.hi.md +15 -9
- package/guide/quick-reference.md +18 -10
- package/guide/quick-reference.pt.md +15 -9
- package/guide/quick-reference.zh-CN.md +19 -11
- package/guide/release-engineering.md +2 -2
- package/guide/release-engineering.zh-CN.md +2 -2
- package/guide/unfixed-issues.md +117 -82
- package/guide/when-to-retire-a-plugin.md +127 -0
- package/guide/when-to-retire-a-plugin.zh-CN.md +127 -0
- package/icon.svg +5 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +8 -4
- package/references/official-docs/AGENTS.md +8 -5
- package/references/official-docs/CONTRIBUTING.i18n.yaml +6 -5
- package/references/official-docs/README.i18n.yaml +33 -5
- package/references/official-docs/README.zh.md +3 -3
- package/references/official-docs/SNAPSHOT.md +3 -3
- package/references/official-docs/THIRD_PARTY_NOTICES.md +34 -6
- package/references/official-docs/docs/AGENTS.md +4 -4
- package/references/official-docs/docs/agent-lifecycle.i18n.yaml +9 -5
- package/references/official-docs/docs/api-gateway.i18n.yaml +27 -5
- package/references/official-docs/docs/api-gateway.md +10 -9
- package/references/official-docs/docs/api-gateway.zh.md +10 -9
- package/references/official-docs/docs/architecture.i18n.yaml +36 -5
- package/references/official-docs/docs/architecture.md +10 -8
- package/references/official-docs/docs/architecture.zh.md +10 -8
- package/references/official-docs/docs/capability-seams.i18n.yaml +9 -5
- package/references/official-docs/docs/capability-seams.md +76 -32
- package/references/official-docs/docs/capability-seams.zh.md +76 -32
- package/references/official-docs/docs/config-catalog.i18n.yaml +18 -5
- package/references/official-docs/docs/config-catalog.md +1360 -765
- package/references/official-docs/docs/config-catalog.zh.md +1363 -767
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +27 -5
- package/references/official-docs/docs/cookbook/adding-a-package.md +56 -3
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +54 -3
- package/references/official-docs/docs/cookbook/adding-a-remote-api.i18n.yaml +24 -5
- package/references/official-docs/docs/cookbook/adding-a-remote-api.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-remote-api.zh.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.i18n.yaml +39 -5
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.md +46 -6
- package/references/official-docs/docs/cookbook/adding-a-session-format-version.zh.md +46 -6
- package/references/official-docs/docs/cookbook/adding-a-settings-card.i18n.yaml +21 -5
- package/references/official-docs/docs/cookbook/adding-a-settings-card.md +34 -64
- package/references/official-docs/docs/cookbook/adding-a-settings-card.zh.md +34 -64
- package/references/official-docs/docs/cookbook/adding-a-tool.i18n.yaml +30 -5
- package/references/official-docs/docs/cookbook/adding-a-tool.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-tool.zh.md +2 -2
- package/references/official-docs/docs/cookbook/adding-a-vendored-package.i18n.yaml +18 -5
- package/references/official-docs/docs/cookbook/adding-an-llm-adapter.i18n.yaml +18 -5
- package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +24 -5
- package/references/official-docs/docs/cookbook/extension-cookbook.md +3 -3
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +3 -3
- package/references/official-docs/docs/cookbook/maintaining-dsh-code-review.i18n.yaml +21 -5
- package/references/official-docs/docs/cookbook/responding-to-pr-review-on-a-stack.i18n.yaml +15 -5
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.i18n.yaml +30 -5
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.md +13 -1
- package/references/official-docs/docs/cookbook/reviewing-persistence-type-changes.zh.md +13 -1
- package/references/official-docs/docs/cordis-api/context.i18n.yaml +72 -5
- package/references/official-docs/docs/cordis-api/events.i18n.yaml +36 -5
- package/references/official-docs/docs/cordis-api/fiber.i18n.yaml +75 -5
- package/references/official-docs/docs/cordis-api/inherited.md +15 -13
- package/references/official-docs/docs/cordis-api/registry.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-api/service.i18n.yaml +36 -5
- package/references/official-docs/docs/cordis-primer.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/01-first-plugin.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/02-lifecycle-and-effects.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/03-services.i18n.yaml +21 -5
- package/references/official-docs/docs/cordis-tutorial/04-events.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/05-config.i18n.yaml +18 -5
- package/references/official-docs/docs/cordis-tutorial/05-config.md +27 -0
- package/references/official-docs/docs/cordis-tutorial/05-config.zh.md +27 -0
- package/references/official-docs/docs/cordis-tutorial/06-composition-and-hmr.i18n.yaml +15 -5
- package/references/official-docs/docs/cordis-tutorial/07-into-the-harness.i18n.yaml +18 -5
- package/references/official-docs/docs/cordis-tutorial/index.i18n.yaml +15 -5
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +33 -5
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +7 -7
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +7 -7
- package/references/official-docs/docs/defensive-patterns.i18n.yaml +27 -5
- package/references/official-docs/docs/dependency-catalog.json +2 -2
- package/references/official-docs/docs/development.i18n.yaml +48 -5
- package/references/official-docs/docs/development.md +27 -10
- package/references/official-docs/docs/development.zh.md +27 -10
- package/references/official-docs/docs/event-producer-consumer.i18n.yaml +12 -5
- package/references/official-docs/docs/event-producer-consumer.md +78 -66
- package/references/official-docs/docs/event-producer-consumer.zh.md +78 -66
- package/references/official-docs/docs/glossary.i18n.yaml +24 -5
- package/references/official-docs/docs/graph-atlas.i18n.yaml +9 -5
- package/references/official-docs/docs/i18n/README.i18n.yaml +18 -5
- package/references/official-docs/docs/i18n/README.md +12 -8
- package/references/official-docs/docs/i18n/README.zh.md +12 -8
- package/references/official-docs/docs/i18n/terminology.md +4 -4
- package/references/official-docs/docs/i18n/translation-prompt.md +2 -2
- package/references/official-docs/docs/i18n/translation-rules.i18n.yaml +27 -5
- package/references/official-docs/docs/module-graph.i18n.yaml +9 -5
- package/references/official-docs/docs/module-graph.md +348 -245
- package/references/official-docs/docs/module-graph.zh.md +348 -245
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2064 -5
- package/references/official-docs/docs/persistence-catalog.md +5275 -3205
- package/references/official-docs/docs/persistence-catalog.zh.md +5275 -3205
- package/references/official-docs/docs/persistence-changes/2026-09-11-initial.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-12-auto-review-error-metadata.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-14-image-offload.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-14-workspace-changes-event.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.md +120 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.schema.json +16212 -0
- package/references/official-docs/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.schema.json +302 -0
- package/references/official-docs/docs/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.schema.json +250 -0
- package/references/official-docs/docs/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.i18n.yaml +28 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.md +60 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.schema.json +11405 -0
- package/references/official-docs/docs/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
- package/references/official-docs/docs/persistence-changes/README.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/README.md +17 -3
- package/references/official-docs/docs/persistence-changes/README.zh.md +17 -3
- package/references/official-docs/docs/persistence-changes/finalized/v4.json +379 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/README.i18n.yaml +27 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/README.md +3 -2
- package/references/official-docs/docs/persistence-changes/historical-formats/README.zh.md +3 -2
- package/references/official-docs/docs/persistence-changes/historical-formats/v0.i18n.yaml +1284 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v1.i18n.yaml +1284 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v2.i18n.yaml +1344 -5
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.i18n.yaml +1441 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.md +5634 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.schema.json +61307 -0
- package/references/official-docs/docs/persistence-changes/historical-formats/v3.zh.md +5634 -0
- package/references/official-docs/docs/persistence-changes/releases/README.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.4.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.0.1-rc.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.6.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.7.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.0-rc.8.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.1-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.3.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.4.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-alpha.5.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.2-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.3-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-alpha.2.schema.json +3 -3
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.1.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-changes/releases/dsh-v0.1.5-rc.2.i18n.yaml +30 -5
- package/references/official-docs/docs/persistence-schema.json +12692 -48753
- package/references/official-docs/docs/postmortem/0001-acp-default-export-drops-inject.i18n.yaml +33 -5
- package/references/official-docs/docs/postmortem/0002-js-expression-disabled-filesystem-tools.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/0003-web-agent-gui-feedback-loop.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.i18n.yaml +27 -5
- package/references/official-docs/docs/postmortem/README.i18n.yaml +6 -5
- package/references/official-docs/docs/rescope.i18n.yaml +18 -5
- package/references/official-docs/docs/rescope.md +1 -1
- package/references/official-docs/docs/rescope.zh.md +1 -1
- package/references/official-docs/docs/session-format-status.i18n.yaml +27 -5
- package/references/official-docs/docs/session-format-status.md +17 -3
- package/references/official-docs/docs/session-format-status.zh.md +17 -3
- package/references/official-docs/docs/subsystems/README.i18n.yaml +6 -5
- package/references/official-docs/docs/subsystems/README.md +6 -3
- package/references/official-docs/docs/subsystems/README.zh.md +6 -3
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/agent-team.md +52 -28
- package/references/official-docs/docs/subsystems/agent-team.zh.md +52 -28
- package/references/official-docs/docs/subsystems/approval.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/approval.md +1 -1
- package/references/official-docs/docs/subsystems/approval.zh.md +1 -1
- package/references/official-docs/docs/subsystems/attachment.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/attachment.md +2 -2
- package/references/official-docs/docs/subsystems/attachment.zh.md +2 -2
- package/references/official-docs/docs/subsystems/boot.i18n.yaml +9 -5
- package/references/official-docs/docs/subsystems/boot.md +117 -17
- package/references/official-docs/docs/subsystems/boot.zh.md +117 -17
- package/references/official-docs/docs/subsystems/browser-use.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/claude-code-mods.i18n.yaml +28 -0
- package/references/official-docs/docs/subsystems/claude-code-mods.md +146 -0
- package/references/official-docs/docs/subsystems/claude-code-mods.zh.md +146 -0
- package/references/official-docs/docs/subsystems/client-modules.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/client-modules.md +13 -7
- package/references/official-docs/docs/subsystems/client-modules.zh.md +13 -7
- package/references/official-docs/docs/subsystems/client-resources.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/commands.md +1 -1
- package/references/official-docs/docs/subsystems/commands.zh.md +1 -1
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/compaction.md +2 -2
- package/references/official-docs/docs/subsystems/compaction.zh.md +2 -2
- package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/conversation.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/conversation.md +35 -6
- package/references/official-docs/docs/subsystems/conversation.zh.md +34 -5
- package/references/official-docs/docs/subsystems/core.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/core.md +70 -214
- package/references/official-docs/docs/subsystems/core.zh.md +70 -214
- package/references/official-docs/docs/subsystems/credentials.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/credentials.md +168 -5
- package/references/official-docs/docs/subsystems/credentials.zh.md +168 -5
- package/references/official-docs/docs/subsystems/deliverables.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/extensions.i18n.yaml +6 -5
- package/references/official-docs/docs/subsystems/extensions.md +6 -4
- package/references/official-docs/docs/subsystems/extensions.zh.md +6 -4
- package/references/official-docs/docs/subsystems/feedback.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/filesystem.i18n.yaml +33 -5
- package/references/official-docs/docs/subsystems/filesystem.md +10 -0
- package/references/official-docs/docs/subsystems/filesystem.zh.md +10 -0
- package/references/official-docs/docs/subsystems/goal.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/goal.md +1 -1
- package/references/official-docs/docs/subsystems/goal.zh.md +1 -1
- package/references/official-docs/docs/subsystems/jobs.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/jobs.md +335 -126
- package/references/official-docs/docs/subsystems/jobs.zh.md +335 -126
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +48 -5
- package/references/official-docs/docs/subsystems/llm-streaming.md +60 -31
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +60 -31
- package/references/official-docs/docs/subsystems/lsp.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/mcp.i18n.yaml +33 -5
- package/references/official-docs/docs/subsystems/mcp.md +2 -2
- package/references/official-docs/docs/subsystems/mcp.zh.md +2 -2
- package/references/official-docs/docs/subsystems/office-to-pdf.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/office-to-pdf.md +4 -4
- package/references/official-docs/docs/subsystems/office-to-pdf.zh.md +4 -4
- package/references/official-docs/docs/subsystems/otel.i18n.yaml +7 -0
- package/references/official-docs/docs/subsystems/otel.md +44 -0
- package/references/official-docs/docs/subsystems/otel.zh.md +44 -0
- package/references/official-docs/docs/subsystems/permission-presets.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/permission-presets.md +7 -6
- package/references/official-docs/docs/subsystems/permission-presets.zh.md +7 -6
- package/references/official-docs/docs/subsystems/persistence.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/persistence.md +3 -3
- package/references/official-docs/docs/subsystems/persistence.zh.md +3 -3
- package/references/official-docs/docs/subsystems/plan.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/plan.md +1 -1
- package/references/official-docs/docs/subsystems/plan.zh.md +1 -1
- package/references/official-docs/docs/subsystems/product-telemetry.i18n.yaml +10 -0
- package/references/official-docs/docs/subsystems/product-telemetry.md +79 -0
- package/references/official-docs/docs/subsystems/product-telemetry.zh.md +79 -0
- package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/sandbox.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/sandbox.md +1 -1
- package/references/official-docs/docs/subsystems/sandbox.zh.md +1 -1
- package/references/official-docs/docs/subsystems/schedule.i18n.yaml +39 -5
- package/references/official-docs/docs/subsystems/schedule.md +391 -33
- package/references/official-docs/docs/subsystems/schedule.zh.md +391 -33
- package/references/official-docs/docs/subsystems/scope.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/scope.md +1 -1
- package/references/official-docs/docs/subsystems/scope.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/session-projection.md +20 -18
- package/references/official-docs/docs/subsystems/session-projection.zh.md +20 -18
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/session-telemetry.md +6 -4
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -4
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/session.i18n.yaml +66 -5
- package/references/official-docs/docs/subsystems/session.md +113 -62
- package/references/official-docs/docs/subsystems/session.zh.md +113 -62
- package/references/official-docs/docs/subsystems/settings.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/settings.md +42 -292
- package/references/official-docs/docs/subsystems/settings.zh.md +42 -292
- package/references/official-docs/docs/subsystems/shell.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/shell.md +29 -22
- package/references/official-docs/docs/subsystems/shell.zh.md +29 -22
- package/references/official-docs/docs/subsystems/sidebar-right.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/sidebar-right.md +14 -9
- package/references/official-docs/docs/subsystems/sidebar-right.zh.md +14 -9
- package/references/official-docs/docs/subsystems/skills.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/skills.md +2 -2
- package/references/official-docs/docs/subsystems/skills.zh.md +2 -2
- package/references/official-docs/docs/subsystems/slots.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/slots.md +21 -7
- package/references/official-docs/docs/subsystems/slots.zh.md +21 -7
- package/references/official-docs/docs/subsystems/spill.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/spill.md +1 -1
- package/references/official-docs/docs/subsystems/spill.zh.md +1 -1
- package/references/official-docs/docs/subsystems/ssh.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/storage.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/storage.md +1 -2
- package/references/official-docs/docs/subsystems/storage.zh.md +1 -2
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/subagent.md +35 -60
- package/references/official-docs/docs/subsystems/subagent.zh.md +35 -60
- package/references/official-docs/docs/subsystems/subprocess.i18n.yaml +30 -5
- package/references/official-docs/docs/subsystems/system-prompt.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/terminal.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/todo.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/todo.md +3 -3
- package/references/official-docs/docs/subsystems/todo.zh.md +3 -3
- package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +12 -5
- package/references/official-docs/docs/subsystems/tools.i18n.yaml +24 -5
- package/references/official-docs/docs/subsystems/tools.md +15 -4
- package/references/official-docs/docs/subsystems/tools.zh.md +15 -4
- package/references/official-docs/docs/subsystems/typert.i18n.yaml +21 -5
- package/references/official-docs/docs/subsystems/typert.md +147 -6
- package/references/official-docs/docs/subsystems/typert.zh.md +147 -6
- package/references/official-docs/docs/subsystems/user-questions.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/user-questions.md +128 -1
- package/references/official-docs/docs/subsystems/user-questions.zh.md +129 -2
- package/references/official-docs/docs/subsystems/voice-input.i18n.yaml +19 -0
- package/references/official-docs/docs/subsystems/voice-input.md +164 -0
- package/references/official-docs/docs/subsystems/voice-input.zh.md +164 -0
- package/references/official-docs/docs/subsystems/web-client.i18n.yaml +36 -5
- package/references/official-docs/docs/subsystems/web-client.md +10 -5
- package/references/official-docs/docs/subsystems/web-client.zh.md +10 -5
- package/references/official-docs/docs/subsystems/web-server.i18n.yaml +15 -5
- package/references/official-docs/docs/subsystems/web-server.md +12 -4
- package/references/official-docs/docs/subsystems/web-server.zh.md +12 -4
- package/references/official-docs/docs/subsystems/web.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/webhook.i18n.yaml +18 -5
- package/references/official-docs/docs/subsystems/webhook.md +1 -1
- package/references/official-docs/docs/subsystems/webhook.zh.md +1 -1
- package/references/official-docs/docs/subsystems/workflow.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/workflow.md +2 -2
- package/references/official-docs/docs/subsystems/workflow.zh.md +2 -2
- package/references/official-docs/docs/subsystems/workspace.i18n.yaml +27 -5
- package/references/official-docs/docs/subsystems/workspace.md +175 -35
- package/references/official-docs/docs/subsystems/workspace.zh.md +175 -35
- package/references/official-docs/docs/testing.i18n.yaml +33 -5
- package/references/official-docs/docs/testing.md +2 -2
- package/references/official-docs/docs/testing.zh.md +2 -2
- package/references/official-docs/docs/tool-catalog.i18n.yaml +312 -5
- package/references/official-docs/docs/tool-catalog.md +321 -92
- package/references/official-docs/docs/tool-catalog.zh.md +321 -92
- package/references/official-docs/docs/tool-execution-pipeline.i18n.yaml +9 -5
- package/references/official-docs/docs/tool-execution-pipeline.md +6 -3
- package/references/official-docs/docs/tool-execution-pipeline.zh.md +6 -3
- package/references/official-docs/docs/ui-radius.i18n.yaml +31 -0
- package/references/official-docs/docs/ui-radius.md +115 -0
- package/references/official-docs/docs/ui-radius.zh.md +115 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
- package/references/official-docs/docs/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.i18n.yaml +16 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
- package/references/official-docs/docs/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
- package/references/official-docs/docs/user/develop/basic/config.i18n.yaml +27 -5
- package/references/official-docs/docs/user/develop/basic/index.i18n.yaml +36 -5
- package/references/official-docs/docs/user/develop/basic/publish.i18n.yaml +30 -5
- package/references/official-docs/docs/user/develop/basic/publish.md +7 -1
- package/references/official-docs/docs/user/develop/basic/publish.zh.md +7 -1
- package/references/official-docs/docs/user/develop/basic/tool.i18n.yaml +15 -5
- package/references/official-docs/docs/user/develop/framework/events.i18n.yaml +45 -5
- package/references/official-docs/docs/user/develop/framework/index.i18n.yaml +30 -5
- package/references/official-docs/docs/user/develop/framework/service.i18n.yaml +39 -5
- package/references/official-docs/docs/user/develop/practice/dynamic-cordis.i18n.yaml +9 -5
- package/references/official-docs/docs/user/develop/practice/index.i18n.yaml +45 -5
- package/references/official-docs/docs/user/develop/practice/llm-adapter.i18n.yaml +33 -5
- package/references/official-docs/docs/user/develop/practice/llm-adapter.md +1 -1
- package/references/official-docs/docs/user/develop/practice/llm-adapter.zh.md +1 -1
- package/references/official-docs/docs/user/guide/github-review.i18n.yaml +24 -5
- package/references/official-docs/docs/user/guide/index.i18n.yaml +18 -5
- package/references/official-docs/docs/user/guide/index.md +1 -0
- package/references/official-docs/docs/user/guide/index.zh.md +1 -0
- package/references/official-docs/docs/user/guide/mcp-memory.i18n.yaml +36 -5
- package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +24 -5
- package/references/official-docs/docs/user/guide/providers-custom-form.png +0 -0
- package/references/official-docs/docs/user/guide/providers-custom-form.zh.png +0 -0
- package/references/official-docs/docs/user/guide/providers-models-page.png +0 -0
- package/references/official-docs/docs/user/guide/providers-models-page.zh.png +0 -0
- package/references/official-docs/docs/user/guide/providers.i18n.yaml +36 -5
- package/references/official-docs/docs/user/guide/providers.md +88 -78
- package/references/official-docs/docs/user/guide/providers.zh.md +102 -92
- package/references/official-docs/docs/user/guide/public-deployments.i18n.yaml +19 -0
- package/references/official-docs/docs/user/guide/public-deployments.md +33 -0
- package/references/official-docs/docs/user/guide/public-deployments.zh.md +33 -0
- package/references/official-docs/docs/user/guide/python-sdk.i18n.yaml +27 -5
- package/references/official-docs/docs/user/guide/python-sdk.md +1 -1
- package/references/official-docs/docs/user/guide/python-sdk.zh.md +1 -1
- package/references/official-docs/docs/user/guide/schedule.i18n.yaml +30 -5
- package/references/official-docs/docs/user/guide/schedule.md +69 -11
- package/references/official-docs/docs/user/guide/schedule.zh.md +69 -11
- package/references/official-docs/docs/user/index.i18n.yaml +9 -5
- package/references/official-docs/docs/web-styling.i18n.yaml +18 -5
- package/references/official-docs/docs/web-styling.md +12 -3
- package/references/official-docs/docs/web-styling.zh.md +12 -3
- package/references/official-docs/packages/AGENTS.md +1 -2
- package/references/official-docs/packages/README.md +5 -5
- package/references/official-docs/vendor/README.md +6 -2
- package/references/official-docs/website-docs.ts +10 -3
- package/references/official-plugin-dev-skill.md +124 -0
- package/references/sources.md +10 -5
- package/scripts/archive-discussions.ps1 +9 -1
- package/scripts/build-llms-full.mjs +64 -0
- package/scripts/check-docs-drift.ps1 +1 -1
- package/scripts/sync-official-docs.ps1 +1 -1
- package/templates/js/icon.svg +4 -0
- package/templates/js/locale/en.json +6 -0
- package/templates/js/locale/zh.json +6 -0
- package/templates/js/package.json +9 -1
- package/templates/ts/icon.svg +4 -0
- package/templates/ts/locale/en.json +6 -0
- package/templates/ts/locale/zh.json +6 -0
- package/templates/ts/package.json +9 -1
- package/references/official-docs/docs/subsystems/invariants.i18n.yaml +0 -6
- package/references/official-docs/docs/subsystems/invariants.md +0 -88
- package/references/official-docs/docs/subsystems/invariants.zh.md +0 -88
|
@@ -22,7 +22,7 @@ interface AskUserQuestionOption {
|
|
|
22
22
|
|
|
23
23
|
## 呈现意图
|
|
24
24
|
|
|
25
|
-
`AskUserQuestionIntent`
|
|
25
|
+
`AskUserQuestionIntent` 可选地声明一种已知的决策类型。它以 `kind` 作为标记,以便后续加入更多意图;不认识某个标记的 UI 会渲染通用选项列表。意图只改变呈现——遵循它的 UI 回答的选项标签与通用 UI 相同,因此调用方读到的答案字段一致。`approve` 指明表示同意的选项,而不依赖选项顺序。`ask()` 拒绝两种类型无法表达的断言:`approve` 未命名该问题自己的任何选项,以及没有 `detail` 的问题声明了意图。
|
|
26
26
|
|
|
27
27
|
```ts type-equiv
|
|
28
28
|
/**
|
|
@@ -103,9 +103,96 @@ interface AskUserQuestionAnswer {
|
|
|
103
103
|
}
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
+
计时回答器收到 `wait: { callId, timed: true }`。调用 id 标识卡片及前台等待。Client 调用 `attachWait` 接手等待并取得剩余时长;传输层转发原事件,不检查或改写这些字段。不带 `timed` 的 `wait` 表示无限期等待的具名卡片请求;没有 `wait` 则表示不带卡片 key 的阻塞请求。
|
|
107
|
+
|
|
108
|
+
```ts type-equiv
|
|
109
|
+
/** Client-safe payload declared for the user-question answerer waterfall. */
|
|
110
|
+
interface AskUserQuestionRequestEvent {
|
|
111
|
+
/** Questions to display. */
|
|
112
|
+
questions: AskUserQuestionItem[]
|
|
113
|
+
/** Agent identity projected to the corresponding Client Context in transit. */
|
|
114
|
+
agent?: Agent
|
|
115
|
+
/** Cancellation lifetime of the pending request. */
|
|
116
|
+
signal?: AbortSignal
|
|
117
|
+
/**
|
|
118
|
+
* Tool call the Client card is keyed by. Timed answerers attach to the
|
|
119
|
+
* business wait stream before starting their local countdown.
|
|
120
|
+
*/
|
|
121
|
+
wait?: {
|
|
122
|
+
/** Tool call the Client card is keyed by. */
|
|
123
|
+
callId: ToolCallId
|
|
124
|
+
/** True for a foreground wait that requires a Client claim; absent for indefinite waits. */
|
|
125
|
+
timed?: boolean
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## 计时问题与迟到回复
|
|
131
|
+
|
|
132
|
+
计时问题在有界的前台窗口内等待,然后让 agent 继续独立工作。用户在窗口内回答,工具返回整批答案;否则 `TimedUserQuestionResult` 为 `{ pending: true, callId }`。pending 表示问题仍可回答,不是空答案、拒绝、确认或授权。
|
|
133
|
+
|
|
134
|
+
```ts type-equiv
|
|
135
|
+
/** Timed ask result returned when the foreground answer window closes. */
|
|
136
|
+
type TimedUserQuestionResult = AskUserQuestionAnswer | { pending: true; callId: ToolCallId }
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Client 接手通过业务 Remote stream 表达,不等同于 Gateway 投递。`TimedQuestionWait` 保存原 Host deadline,仅在没有接手记录时运行计时器。`attachWait` stream 发出当前剩余时长,Client 用本地时钟倒计时。聚焦、编辑和「慢慢回答」状态仍归本地所有。stream 取消释放相应接手记录;最后一个接手方离开后,Host 恢复原 deadline。无人接手时超时中止前台 waterfall 专属的 signal 并返回 pending,不取消 Turn。Gateway 与 `api-remotes` 不包含问答专属计时策略。
|
|
140
|
+
|
|
141
|
+
`userQuestions` Session 投影把现有事件折叠成可回答的问题集合与已结算的集合;不记录任何等待状态、聚焦状态或 deadline。每个 `request/header` 都记录了模型看到的确切工具 schema。只有请求头声明了带 `timeout` 参数的 timed `ask_user_question` schema,投影才跟踪原生调用;阻塞式 legacy 工具从不声明它。原生 `tool/call` 打开一个问题。`tool/result` 只在两种情况下把它标为 `continued`:带 pending 载荷,或是 Session resume 修复补写的 `TOOL_OUTCOME_UNKNOWN` 合成结果;回答批次把它连同该批次移入 `settled`,其他结果或失败都丢弃它。`run_code` 的 PTC 子调用若在 `tool/ptc-dispatch` 结果中返回 pending,也会进入投影,尽管请求头只列出 `run_code`。迟到回复在消息获准成为 `user/message` 时,才把已继续的问题连同消息中的回答批次移入 `settled`:计时调用自己的结果记录的是超时,transcript 行无处可读用户最终的选择。排队的回复可在准入前取消,此时问题仍可回答。回复正文不含可读批次时,该调用以零答案结算;回复指向的调用已不在可回答集合中时不改变任何内容。
|
|
142
|
+
|
|
143
|
+
```ts type-equiv
|
|
144
|
+
/** `open` while the tool call may still return the answer; `continued` once the answer can only arrive as a new turn. */
|
|
145
|
+
type UserQuestionState = 'open' | 'continued'
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```ts type-equiv
|
|
149
|
+
/** One unanswered timed `ask_user_question` call reconstructed from the Session log. */
|
|
150
|
+
interface PendingUserQuestion {
|
|
151
|
+
readonly callId: ToolCallId
|
|
152
|
+
readonly questions: readonly AskUserQuestionItem[]
|
|
153
|
+
readonly state: UserQuestionState
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```ts type-equiv
|
|
158
|
+
/**
|
|
159
|
+
* One timed `ask_user_question` call and the answers it settled with: the
|
|
160
|
+
* batch its own result carried when the user answered inside the window,
|
|
161
|
+
* otherwise the batch its late reply carried, because that call's own result
|
|
162
|
+
* recorded the timeout. A transcript row reads what the user finally answered
|
|
163
|
+
* from here, and only a call listed here was a timed one.
|
|
164
|
+
*/
|
|
165
|
+
interface SettledUserQuestion {
|
|
166
|
+
/** The settled call. */
|
|
167
|
+
readonly callId: ToolCallId
|
|
168
|
+
/** The recorded batch, one entry per question; empty when the late reply carried none. */
|
|
169
|
+
readonly answers: readonly AskUserQuestionAnswerItem[]
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```ts type-equiv
|
|
174
|
+
/**
|
|
175
|
+
* Both halves of one Session's timed `ask_user_question` state, as every
|
|
176
|
+
* Client reads them. A call made while the blocking legacy tool was in
|
|
177
|
+
* effect appears in neither half.
|
|
178
|
+
*/
|
|
179
|
+
interface UserQuestionProjectionView {
|
|
180
|
+
/** Calls that can still take an answer, in ask order. */
|
|
181
|
+
readonly active: readonly PendingUserQuestion[]
|
|
182
|
+
/** Calls an answer settled, in settlement order. */
|
|
183
|
+
readonly settled: readonly SettledUserQuestion[]
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
开放中的问题只能通过 waterfall 回答。问题变为 `continued` 后,`answer` Remote 方法向所属 agent 排入一条用户消息,并在其空闲时唤醒它。消息的 source 为 `user-question-reply`,outcome 为 `answered`,正文是 `answer_to_pending_question` 载荷。开放或未知调用返回 `false`;回复仍在排队时的第二次提交以 `REPLY_QUEUED` 拒绝,Host 重启后也一样;遗漏或重复问题的回答批次以 `BAD_ANSWER` 拒绝。
|
|
188
|
+
|
|
189
|
+
收起 Client 面板不会发送内容。前台超时只结束工具等待。已继续的问题没有期限;在回复进入会话前,问题仍可回答。
|
|
190
|
+
|
|
191
|
+
Host 重启后,Session 重开时 Remote 层会恢复根 agent。之后的迟到回复会作为新一轮进入。
|
|
192
|
+
|
|
106
193
|
## 错误
|
|
107
194
|
|
|
108
|
-
`UserQuestionError` 继承 `HarnessError`,因此 `ctx.tools.execute()` 会保留 `{ name, code }`,用于面向模型的工具失败,如 `EMPTY_QUESTIONS`、`NO_PROVIDER`、`ASK_ABORTED` 或 UI 侧取消。
|
|
195
|
+
`UserQuestionError` 继承 `HarnessError`,因此 `ctx.tools.execute()` 会保留 `{ name, code }`,用于面向模型的工具失败,如 `EMPTY_QUESTIONS`、`BAD_INTENT`、`NO_PROVIDER`、`ASK_ABORTED` 或 UI 侧取消。
|
|
109
196
|
|
|
110
197
|
```ts type-equiv
|
|
111
198
|
/** Stable error taxonomy for user-questions failures. */
|
|
@@ -132,6 +219,44 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
132
219
|
`ctx.userQuestions`: validation plus the scoped answerer waterfall.
|
|
133
220
|
|
|
134
221
|
```ts cordis-catalog
|
|
222
|
+
/**
|
|
223
|
+
* Answer a continued question. The reply is steered into the agent as a
|
|
224
|
+
* user message whose source names the call; that message is also the
|
|
225
|
+
* record that closes the question in the projection.
|
|
226
|
+
* @param agent - Live root agent for the owning Session.
|
|
227
|
+
* @param callId - Continued question identity.
|
|
228
|
+
* @param answer - Complete structured answer batch, one item per question of the call.
|
|
229
|
+
* @returns Whether the question is still continued; an accepted reply stays
|
|
230
|
+
* queued until the agent admits its user message.
|
|
231
|
+
* @throws {UserQuestionError} `BAD_ANSWER` when the batch does not name each
|
|
232
|
+
* question of the call exactly once, or `REPLY_QUEUED` when a reply is
|
|
233
|
+
* already waiting for admission.
|
|
234
|
+
*/
|
|
235
|
+
@Remote answer(agent: Agent, callId: ToolCallId, answer: AskUserQuestionAnswer): boolean
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Let one answer UI hold a live timed wait. Closing the stream releases its claim.
|
|
239
|
+
* @param agent - Live root agent owning the question.
|
|
240
|
+
* @param callId - Foreground tool call to attach to.
|
|
241
|
+
* @param signal - Remote stream cancellation, including Client disconnect.
|
|
242
|
+
* @returns One Host-computed remaining duration, or no frames once the wait ended.
|
|
243
|
+
*/
|
|
244
|
+
@Remote({ mode: 'stream' }) async *attachWait(agent: Agent, callId: ToolCallId, signal: AbortSignal): AsyncIterable<{ remainingMs: number }>
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Foreground wait whose first settlement the Client decides: the Client
|
|
248
|
+
* rejects with `ASK_TIMED_OUT` when its countdown ends, and this method maps
|
|
249
|
+
* that code to the pending result.
|
|
250
|
+
* @param request - Questions, live owner agent, and abort signal.
|
|
251
|
+
* @param callId - Tool call identity the Client card is keyed by.
|
|
252
|
+
* @param timeoutMs - Positive foreground wait in milliseconds.
|
|
253
|
+
* @returns The answer when it arrives inside the window, otherwise a pending
|
|
254
|
+
* result, also when no connected Client claimed the request by the deadline.
|
|
255
|
+
* @throws {UserQuestionError} `BAD_TIMEOUT` for a non-integer, non-positive,
|
|
256
|
+
* or oversized wait.
|
|
257
|
+
*/
|
|
258
|
+
async askTimed( request: AskUserQuestionRequest & { agent: Agent }, callId: ToolCallId, timeoutMs: number, ): Promise<TimedUserQuestionResult>
|
|
259
|
+
|
|
135
260
|
/**
|
|
136
261
|
* Ask the scoped answerer waterfall and wait for the user's answer.
|
|
137
262
|
*
|
|
@@ -151,6 +276,8 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
151
276
|
async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>
|
|
152
277
|
```
|
|
153
278
|
|
|
279
|
+
Types: [Agent](core.zh.md) · [ToolCallId](core.zh.md)
|
|
280
|
+
|
|
154
281
|
Source: [`packages/interaction/user-questions/src/index.ts`](../../packages/interaction/user-questions/src/index.ts)
|
|
155
282
|
|
|
156
283
|
<a id="user-questions-events"></a>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Bilingual-pair consistency record for voice-input.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write docs/subsystems/voice-input.md
|
|
5
|
+
/voice-input:
|
|
6
|
+
en: b21f58d0dcb90287
|
|
7
|
+
zh: be60807d02623a87
|
|
8
|
+
/voice-input/provider-selection:
|
|
9
|
+
en: 3a5ec4718b839349
|
|
10
|
+
zh: a8448bd6064d4c81
|
|
11
|
+
/voice-input/browser-and-host-ownership:
|
|
12
|
+
en: 404d67d8276522db
|
|
13
|
+
zh: f653397888d2e616
|
|
14
|
+
/voice-input/preparation-and-settings:
|
|
15
|
+
en: 9350b2e58813262e
|
|
16
|
+
zh: c3b5e5cb100408af
|
|
17
|
+
/voice-input/design-rationale:
|
|
18
|
+
en: 604b86d95ac007b3
|
|
19
|
+
zh: 472db5ba5905eddc
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Voice input
|
|
2
|
+
|
|
3
|
+
English | [中文](voice-input.zh.md)
|
|
4
|
+
|
|
5
|
+
Experimental speech recognition has three roles: the [Service Definition](../../packages/experimental/speech-to-text/README.md) routes named providers, the [SenseVoice provider](../../packages/experimental/speech-to-text-sensevoice/README.md) owns local inference, and the [Remote consumer](../../packages/experimental/api-speech-to-text/README.md) serves the browser. The [optional bundle](../../packages/experimental/voice-input-bundle/README.md) composes them with the microphone UI.
|
|
6
|
+
|
|
7
|
+
## Provider selection
|
|
8
|
+
|
|
9
|
+
`SpeechProviderId` brands the registration identity. `SpeechProviderInfo` carries a display name, accepted `languages` hints and `host-local` or `cloud` processing location. `SpeechRequest` contains WAV bytes and optional provider/language selection; `resolve()` produces `SpeechSpec` with one captured provider instance. A missing provider or unsupported language fails; replacement or withdrawal invalidates resolved work. Audio never falls back to a different provider.
|
|
10
|
+
|
|
11
|
+
`SpeechProvider.transcribe()` accepts one complete `SpeechInput` and an `AbortSignal`. `Transcript` returns plain `text`, `audioSeconds` and `inferenceSeconds`. Providers honor cancellation and settle their work before deregistration completes. The local provider serializes calls, bounds its queue and manages its worker lifetime independently of Sessions.
|
|
12
|
+
|
|
13
|
+
## Browser and Host ownership
|
|
14
|
+
|
|
15
|
+
The browser owns microphone tracks and the unsent draft. `TranscriptionRequest` sends canonical base64 PCM16 WAV through the authenticated Remote. `SpeechCatalog` advertises available providers, the default selection and recording byte/duration limits. The API validates this process input before recognition.
|
|
16
|
+
|
|
17
|
+
The input facade captures a revision-bearing selection before recording. `InputActions.insertText()` inserts one undoable plain-text edit only while the selection revision is current and submission permits editing. A rejected insertion leaves the transcript available for explicit insertion. Switching Sessions or disposing the plugin invalidates late results. Recognition itself writes no Session event; ordinary user submission owns the final model-visible text.
|
|
18
|
+
|
|
19
|
+
## Preparation and settings
|
|
20
|
+
|
|
21
|
+
`SpeechProviderInfo.downloadSources` advertises preparation origins. `SpeechPreparationOptions.downloadSource` selects one for a task; omission preserves provider policy. SenseVoice validates the advertised choice, pins a manual source without fallback, and rejects source changes during active preparation. The UI keeps a choice for retries in the current card; it is not a persisted recognition preference.
|
|
22
|
+
|
|
23
|
+
The Host provider owns one preparation task across page and Session changes. The Client shares one `follow()` subscription across the composer, setup prompt and bundle details. Optional `SpeechSetupEstimate` metadata supplies provider-specific planning hints, separate from measured progress. `SpeechPreparationStepKind` identifies ordered resource operations; `SpeechPreparationStep` records each status and start time. The complete `SpeechPreparationState` retains these steps after cancellation or failure. The collapsed UI shows the current operation; expanding lists all steps, with byte progress or elapsed time only for the running step. Closing an observer never cancels preparation. Verified files survive retries and idle worker reclamation.
|
|
24
|
+
|
|
25
|
+
Failed preparation can include `SpeechDownloadFailure` with the asset, source origin, classified reason and optional diagnostic code or HTTP status. The Client localizes recovery advice; raw download causes remain on the Host.
|
|
26
|
+
|
|
27
|
+
The microphone occupies `conversation.input.activity`, between the model selector and Send. Clicking starts capture and expands the toolbar; Stop transcribes and inserts into the draft. The activity preserves the editor and submit action, owns local feedback, and releases expansion on unmount. Cancel, Escape or hiding the page discards capture. Waveform history displays measured microphone amplitude. Bundle details contain recognition preferences, preparation state and progress. Explicit enablement uses `plugins.bundle.activation` to guide users with missing models to setup; the list shows only the bundle description and switch.
|
|
28
|
+
|
|
29
|
+
## Design rationale
|
|
30
|
+
|
|
31
|
+
The [voice input decision](../../.agents/notes/implemented/architecture/2026-09-16-experimental-voice-input.md) explains transient audio, explicit provider selection and lazy local preparation.
|
|
32
|
+
|
|
33
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
34
|
+
|
|
35
|
+
<a id="cordis-surface"></a>
|
|
36
|
+
|
|
37
|
+
## Cordis API
|
|
38
|
+
|
|
39
|
+
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).
|
|
40
|
+
|
|
41
|
+
<a id="ctxspeechcontroller--speechcontroller"></a>
|
|
42
|
+
|
|
43
|
+
### `ctx.speechController` — `SpeechController`
|
|
44
|
+
|
|
45
|
+
Speech calls never activate or submit to an Agent.
|
|
46
|
+
|
|
47
|
+
```ts cordis-catalog
|
|
48
|
+
/**
|
|
49
|
+
* Read provider choices without preparing a recognizer.
|
|
50
|
+
* @returns available providers, resolved default, and recording limits.
|
|
51
|
+
*/
|
|
52
|
+
@Remote catalog(): SpeechCatalog
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Follow provider readiness independently of Session and preparation lifetimes.
|
|
56
|
+
* @param signal - Client observation lifetime.
|
|
57
|
+
* @returns initial and subsequent complete readiness snapshots.
|
|
58
|
+
*/
|
|
59
|
+
@Remote({ mode: 'stream' }) async *follow(signal: AbortSignal): AsyncIterable<SpeechCatalog>
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Persist the user's recognition preferences.
|
|
63
|
+
* @param patch - changed preference fields.
|
|
64
|
+
* @returns after preferences are saved.
|
|
65
|
+
*/
|
|
66
|
+
@Remote configure(patch: SpeechSelectionPatch): Promise<void>
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Start or join one Host-owned preparation task.
|
|
70
|
+
* @param providerId - selected recognizer.
|
|
71
|
+
* @param options - task-local source selection validated by the provider.
|
|
72
|
+
*/
|
|
73
|
+
@Remote prepare(providerId: SpeechProviderId, options?: SpeechPreparationOptions): void
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Explicitly cancel resource preparation.
|
|
77
|
+
* @param providerId - selected recognizer.
|
|
78
|
+
* @returns after the preparation task settles.
|
|
79
|
+
*/
|
|
80
|
+
@Remote cancelPreparation(providerId: SpeechProviderId): Promise<void>
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Validate and transcribe one recording through the explicit provider selection.
|
|
84
|
+
* @param request - canonical WAV encoded as base64, provider id and language hint.
|
|
85
|
+
* @param signal - Client cancellation or Remote contribution disposal.
|
|
86
|
+
* @returns final transcript without adding a Session event.
|
|
87
|
+
*/
|
|
88
|
+
@Remote async transcribe(request: TranscriptionRequest, signal: AbortSignal): Promise<Transcript>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Source: [`packages/experimental/api-speech-to-text/src/index.ts`](../../packages/experimental/api-speech-to-text/src/index.ts)
|
|
92
|
+
|
|
93
|
+
<a id="ctxspeechtotext--speechtotext"></a>
|
|
94
|
+
|
|
95
|
+
### `ctx.speechToText` — `SpeechToText`
|
|
96
|
+
|
|
97
|
+
Registry shared by all transcription consumers in one Host composition.
|
|
98
|
+
|
|
99
|
+
```ts cordis-catalog
|
|
100
|
+
/**
|
|
101
|
+
* Register one recognizer; duplicate ids fail without replacing the original.
|
|
102
|
+
* @param provider - recognizer owned by the contributing fiber.
|
|
103
|
+
* @returns idempotent disposer which rejects admission, cancels, and joins accepted work.
|
|
104
|
+
*/
|
|
105
|
+
register(provider: SpeechProvider): () => Promise<void>
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Read the current recognizer roster.
|
|
109
|
+
* @returns available provider facts in registration order.
|
|
110
|
+
*/
|
|
111
|
+
listProviders(): readonly SpeechProviderInfo[]
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Observe complete readiness snapshots; a slow reader coalesces intermediate progress.
|
|
115
|
+
* @param caller - observer lifetime, independent of any preparation task.
|
|
116
|
+
* @returns an initial snapshot followed by the latest provider states.
|
|
117
|
+
*/
|
|
118
|
+
async *follow(caller: AbortSignal): AsyncIterable<SpeechSnapshot>
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Read provider readiness and current user preferences together.
|
|
122
|
+
* @returns one detached complete observation.
|
|
123
|
+
*/
|
|
124
|
+
snapshot(): SpeechSnapshot
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Persist changed selection fields into this plugin's profile entry; the resulting language must be accepted by the selected provider.
|
|
128
|
+
* @param patch - explicit provider or language changes.
|
|
129
|
+
* @returns after the profile write and the live update it applies.
|
|
130
|
+
*/
|
|
131
|
+
async configure(patch: SpeechSelectionPatch): Promise<void>
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Start or join provider-owned preparation.
|
|
135
|
+
* @param id - exact registered provider identity.
|
|
136
|
+
* @param options - task-local source selection validated by the provider.
|
|
137
|
+
*/
|
|
138
|
+
prepare(id: SpeechProviderId, options?: SpeechPreparationOptions): void
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Explicitly cancel provider preparation without tying it to a browser connection.
|
|
142
|
+
* @param id - exact registered provider identity.
|
|
143
|
+
* @returns after the preparation task settles.
|
|
144
|
+
*/
|
|
145
|
+
async cancelPreparation(id: SpeechProviderId): Promise<void>
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Apply composition defaults and capture the selected provider. Missing providers and unsupported languages fail explicitly.
|
|
149
|
+
* @param request - complete recording and optional selection.
|
|
150
|
+
* @returns provider-pinned input for transcribe().
|
|
151
|
+
*/
|
|
152
|
+
resolve(request: SpeechRequest): SpeechSpec
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Execute exactly the resolved provider; no fallback sends audio elsewhere.
|
|
156
|
+
* @param spec - resolved input; a withdrawn or replaced registration is rejected.
|
|
157
|
+
* @param signal - caller cancellation.
|
|
158
|
+
* @returns final transcript after provider settlement.
|
|
159
|
+
*/
|
|
160
|
+
async transcribe(spec: SpeechSpec, signal: AbortSignal): Promise<Transcript>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Source: [`packages/experimental/speech-to-text/src/index.ts`](../../packages/experimental/speech-to-text/src/index.ts)
|
|
164
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# 语音输入
|
|
2
|
+
|
|
3
|
+
[English](voice-input.md) | 中文
|
|
4
|
+
|
|
5
|
+
实验性语音识别包含三个角色:[服务定义](../../packages/experimental/speech-to-text/README.zh.md)路由具名 Provider,[SenseVoice Provider](../../packages/experimental/speech-to-text-sensevoice/README.zh.md)拥有本地推理,[Remote 消费者](../../packages/experimental/api-speech-to-text/README.zh.md)服务浏览器。[可选 Bundle](../../packages/experimental/voice-input-bundle/README.zh.md)将它们与麦克风 UI 组合。
|
|
6
|
+
|
|
7
|
+
## Provider 选择
|
|
8
|
+
|
|
9
|
+
`SpeechProviderId` 为注册标识添加类型品牌。`SpeechProviderInfo` 携带显示名称、支持的 `languages` 语言提示及 `host-local` 或 `cloud` 处理位置。`SpeechRequest` 包含 WAV 字节和可选的 Provider、语言选择;`resolve()` 生成捕获一个 Provider 实例的 `SpeechSpec`。缺失的 Provider 或不支持的语言会报错;替换或撤销会使已解析的任务失效。音频不会回退到其他 Provider。
|
|
10
|
+
|
|
11
|
+
`SpeechProvider.transcribe()` 接收完整的 `SpeechInput` 与 `AbortSignal`。`Transcript` 返回纯文本 `text`、`audioSeconds` 和 `inferenceSeconds`。Provider 响应取消,并在注销完成前结束其任务。本地 Provider 串行执行调用、限制队列,并独立于 Session 管理工作进程生命周期。
|
|
12
|
+
|
|
13
|
+
## 浏览器与 Host 所有权
|
|
14
|
+
|
|
15
|
+
浏览器拥有麦克风轨道与未发送的草稿。`TranscriptionRequest` 通过带认证的 Remote 发送规范 base64 PCM16 WAV。`SpeechCatalog` 公布可用 Provider、默认选择及录音字节和时长限制。API 在识别前校验这些进程输入。
|
|
16
|
+
|
|
17
|
+
输入门面在录音前捕获带版本的选区。`InputActions.insertText()` 仅在选区版本仍有效且提交状态允许编辑时,插入一次可撤销的纯文本编辑。插入被拒绝时,转写文字保留以供显式插入。切换 Session 或释放插件使迟到结果失效。识别本身不写入 Session 事件;普通用户提交拥有最终的模型可见文字。
|
|
18
|
+
|
|
19
|
+
## 准备与设置
|
|
20
|
+
|
|
21
|
+
`SpeechProviderInfo.downloadSources` 公布准备阶段的源。`SpeechPreparationOptions.downloadSource` 为单次任务选择一个源;省略时保留提供方策略。SenseVoice 校验公布的选项,固定使用手动指定的源而不回退,并拒绝在准备期间改源。UI 为当前卡片中的重试保留选择,但不会将其保存为识别偏好。
|
|
22
|
+
|
|
23
|
+
Host Provider 在页面和 Session 变化期间拥有同一个准备任务。Client 在输入框、安装引导弹窗、Bundle 详情之间共享一份 `follow()` 订阅。可选 `SpeechSetupEstimate` 元数据提供各 Provider 的资源预期,与实测进度分开。`SpeechPreparationStepKind` 标识有序资源操作;`SpeechPreparationStep` 记录各步骤状态与开始时间。完整 `SpeechPreparationState` 在取消或失败后保留这些步骤。折叠 UI 显示当前操作,展开后列出所有步骤,仅进行中步骤显示字节进度或等待时间。关闭观察者不会取消准备。已校验文件在重试及空闲进程回收后继续复用。
|
|
24
|
+
|
|
25
|
+
准备失败时可包含 `SpeechDownloadFailure`,提供文件、下载源、原因分类以及可选错误码或 HTTP 状态。Client 将恢复建议本地化;原始下载错误留在 Host。
|
|
26
|
+
|
|
27
|
+
麦克风占用模型选择器与发送按钮之间的 `conversation.input.activity`。点击开始录音并展开工具栏;停止后转写并插入草稿。活动栏保留编辑器与提交按钮,拥有局部反馈,并在卸载时释放展开状态。取消、Escape 或隐藏页面会丢弃录音。波形历史展示实测麦克风音量。Bundle 详情包含识别偏好、准备状态和进度。显式启用时通过 `plugins.bundle.activation` 引导缺少模型的用户前往安装;列表只显示 Bundle 描述和开关。
|
|
28
|
+
|
|
29
|
+
## 设计依据
|
|
30
|
+
|
|
31
|
+
[语音输入决策](../../.agents/notes/implemented/architecture/2026-09-16-experimental-voice-input.zh.md)解释临时音频、显式 Provider 选择和延迟准备本地运行时。
|
|
32
|
+
|
|
33
|
+
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
34
|
+
|
|
35
|
+
<a id="cordis-surface"></a>
|
|
36
|
+
|
|
37
|
+
## Cordis API
|
|
38
|
+
|
|
39
|
+
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).
|
|
40
|
+
|
|
41
|
+
<a id="ctxspeechcontroller--speechcontroller"></a>
|
|
42
|
+
|
|
43
|
+
### `ctx.speechController` — `SpeechController`
|
|
44
|
+
|
|
45
|
+
Speech calls never activate or submit to an Agent.
|
|
46
|
+
|
|
47
|
+
```ts cordis-catalog
|
|
48
|
+
/**
|
|
49
|
+
* Read provider choices without preparing a recognizer.
|
|
50
|
+
* @returns available providers, resolved default, and recording limits.
|
|
51
|
+
*/
|
|
52
|
+
@Remote catalog(): SpeechCatalog
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Follow provider readiness independently of Session and preparation lifetimes.
|
|
56
|
+
* @param signal - Client observation lifetime.
|
|
57
|
+
* @returns initial and subsequent complete readiness snapshots.
|
|
58
|
+
*/
|
|
59
|
+
@Remote({ mode: 'stream' }) async *follow(signal: AbortSignal): AsyncIterable<SpeechCatalog>
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Persist the user's recognition preferences.
|
|
63
|
+
* @param patch - changed preference fields.
|
|
64
|
+
* @returns after preferences are saved.
|
|
65
|
+
*/
|
|
66
|
+
@Remote configure(patch: SpeechSelectionPatch): Promise<void>
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Start or join one Host-owned preparation task.
|
|
70
|
+
* @param providerId - selected recognizer.
|
|
71
|
+
* @param options - task-local source selection validated by the provider.
|
|
72
|
+
*/
|
|
73
|
+
@Remote prepare(providerId: SpeechProviderId, options?: SpeechPreparationOptions): void
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Explicitly cancel resource preparation.
|
|
77
|
+
* @param providerId - selected recognizer.
|
|
78
|
+
* @returns after the preparation task settles.
|
|
79
|
+
*/
|
|
80
|
+
@Remote cancelPreparation(providerId: SpeechProviderId): Promise<void>
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Validate and transcribe one recording through the explicit provider selection.
|
|
84
|
+
* @param request - canonical WAV encoded as base64, provider id and language hint.
|
|
85
|
+
* @param signal - Client cancellation or Remote contribution disposal.
|
|
86
|
+
* @returns final transcript without adding a Session event.
|
|
87
|
+
*/
|
|
88
|
+
@Remote async transcribe(request: TranscriptionRequest, signal: AbortSignal): Promise<Transcript>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Source: [`packages/experimental/api-speech-to-text/src/index.ts`](../../packages/experimental/api-speech-to-text/src/index.ts)
|
|
92
|
+
|
|
93
|
+
<a id="ctxspeechtotext--speechtotext"></a>
|
|
94
|
+
|
|
95
|
+
### `ctx.speechToText` — `SpeechToText`
|
|
96
|
+
|
|
97
|
+
Registry shared by all transcription consumers in one Host composition.
|
|
98
|
+
|
|
99
|
+
```ts cordis-catalog
|
|
100
|
+
/**
|
|
101
|
+
* Register one recognizer; duplicate ids fail without replacing the original.
|
|
102
|
+
* @param provider - recognizer owned by the contributing fiber.
|
|
103
|
+
* @returns idempotent disposer which rejects admission, cancels, and joins accepted work.
|
|
104
|
+
*/
|
|
105
|
+
register(provider: SpeechProvider): () => Promise<void>
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Read the current recognizer roster.
|
|
109
|
+
* @returns available provider facts in registration order.
|
|
110
|
+
*/
|
|
111
|
+
listProviders(): readonly SpeechProviderInfo[]
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Observe complete readiness snapshots; a slow reader coalesces intermediate progress.
|
|
115
|
+
* @param caller - observer lifetime, independent of any preparation task.
|
|
116
|
+
* @returns an initial snapshot followed by the latest provider states.
|
|
117
|
+
*/
|
|
118
|
+
async *follow(caller: AbortSignal): AsyncIterable<SpeechSnapshot>
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Read provider readiness and current user preferences together.
|
|
122
|
+
* @returns one detached complete observation.
|
|
123
|
+
*/
|
|
124
|
+
snapshot(): SpeechSnapshot
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Persist changed selection fields into this plugin's profile entry; the resulting language must be accepted by the selected provider.
|
|
128
|
+
* @param patch - explicit provider or language changes.
|
|
129
|
+
* @returns after the profile write and the live update it applies.
|
|
130
|
+
*/
|
|
131
|
+
async configure(patch: SpeechSelectionPatch): Promise<void>
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Start or join provider-owned preparation.
|
|
135
|
+
* @param id - exact registered provider identity.
|
|
136
|
+
* @param options - task-local source selection validated by the provider.
|
|
137
|
+
*/
|
|
138
|
+
prepare(id: SpeechProviderId, options?: SpeechPreparationOptions): void
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Explicitly cancel provider preparation without tying it to a browser connection.
|
|
142
|
+
* @param id - exact registered provider identity.
|
|
143
|
+
* @returns after the preparation task settles.
|
|
144
|
+
*/
|
|
145
|
+
async cancelPreparation(id: SpeechProviderId): Promise<void>
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Apply composition defaults and capture the selected provider. Missing providers and unsupported languages fail explicitly.
|
|
149
|
+
* @param request - complete recording and optional selection.
|
|
150
|
+
* @returns provider-pinned input for transcribe().
|
|
151
|
+
*/
|
|
152
|
+
resolve(request: SpeechRequest): SpeechSpec
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Execute exactly the resolved provider; no fallback sends audio elsewhere.
|
|
156
|
+
* @param spec - resolved input; a withdrawn or replaced registration is rejected.
|
|
157
|
+
* @param signal - caller cancellation.
|
|
158
|
+
* @returns final transcript after provider settlement.
|
|
159
|
+
*/
|
|
160
|
+
async transcribe(spec: SpeechSpec, signal: AbortSignal): Promise<Transcript>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Source: [`packages/experimental/speech-to-text/src/index.ts`](../../packages/experimental/speech-to-text/src/index.ts)
|
|
164
|
+
<!-- END GENERATED cordis-surface -->
|
|
@@ -1,6 +1,37 @@
|
|
|
1
|
-
# Bilingual-pair consistency record (docs/i18n/README.md):
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
# Bilingual-pair consistency record for web-client.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/web-client.md
|
|
5
|
-
web-client
|
|
6
|
-
|
|
5
|
+
/web-client-architecture:
|
|
6
|
+
en: 4936655bc5d3ba5b
|
|
7
|
+
zh: 062419330dea65b3
|
|
8
|
+
/web-client-architecture/layers-and-ownership:
|
|
9
|
+
en: c0454bca818f86ee
|
|
10
|
+
zh: 427582150fd3b976
|
|
11
|
+
/web-client-architecture/browser-boot:
|
|
12
|
+
en: 5ac7d3aed7bf273a
|
|
13
|
+
zh: e34869c8ad64052d
|
|
14
|
+
/web-client-architecture/remote-communication:
|
|
15
|
+
en: 426b09164210b77a
|
|
16
|
+
zh: ce576099ee668984
|
|
17
|
+
/web-client-architecture/client-models:
|
|
18
|
+
en: 13be17c2a2790ae9
|
|
19
|
+
zh: f5af715d0ae222be
|
|
20
|
+
/web-client-architecture/client-models/sessions:
|
|
21
|
+
en: e010ab37d059025f
|
|
22
|
+
zh: f857a2fc2720a28f
|
|
23
|
+
/web-client-architecture/client-models/workspaces:
|
|
24
|
+
en: c063711f8247c240
|
|
25
|
+
zh: 5e54758bbaf1670c
|
|
26
|
+
/web-client-architecture/conversation-and-presentation:
|
|
27
|
+
en: 71362f4ac9490bcb
|
|
28
|
+
zh: 025507ca615f5e2a
|
|
29
|
+
/web-client-architecture/data-paths:
|
|
30
|
+
en: a254278432416473
|
|
31
|
+
zh: 567c2d3c6a20b304
|
|
32
|
+
/web-client-architecture/reconnection:
|
|
33
|
+
en: 478f461e261b1ca5
|
|
34
|
+
zh: 626791d04656faee
|
|
35
|
+
/web-client-architecture/package-boundaries:
|
|
36
|
+
en: 3e64e8c28f0c4cb1
|
|
37
|
+
zh: 47aa81c2ace5ba89
|
|
@@ -4,6 +4,8 @@ English | [中文](web-client.zh.md)
|
|
|
4
4
|
|
|
5
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
6
|
|
|
7
|
+
[Keyboard shortcuts](../../packages/client/shortcuts/README.md) owns window-local command registration and physical-key dispatch; [the shortcut reference](../../packages/client/ui-shortcuts/README.md) presents available commands and local input actions. Command owners declare each runtime/platform default and share their existing actions with mouse controls. The shared modal primitive arbitrates top-layer Escape and restores focus.
|
|
8
|
+
|
|
7
9
|
## Layers and ownership
|
|
8
10
|
|
|
9
11
|
| Layer | Main owners | Responsibility |
|
|
@@ -27,7 +29,7 @@ The Web boot kernel creates the module system, prefetches `immediately` entries,
|
|
|
27
29
|
|
|
28
30
|
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
31
|
|
|
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.
|
|
32
|
+
The Connection owns request URL resolution, 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
33
|
|
|
32
34
|
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
35
|
|
|
@@ -40,19 +42,21 @@ Each API controller package owns a paired Host and Client face. The Host side ow
|
|
|
40
42
|
[`api/session-controller`](../../packages/api/session-controller/README.md) exposes Host commands for list, search, creation, prompt, queue, cancellation, pagination, and follow/control streams. Its Client side is organized as `ClientSessions → SessionManager → Session`:
|
|
41
43
|
|
|
42
44
|
- `ClientSessions` provides `ctx.sessions`, owns references, source counts, Session scopes, and stable `SessionBinding` objects, and projects catalog state without selecting a global current Session.
|
|
43
|
-
- `SessionManager` owns the list baseline, live list/control updates, lazy Session instances,
|
|
45
|
+
- `SessionManager` owns the list baseline, live list/control updates, lazy Session instances, projection stores, subagent catalogs, and conflict ordering between pulls and later updates.
|
|
44
46
|
- 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
47
|
|
|
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
|
|
48
|
+
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 projection updates.
|
|
47
49
|
|
|
48
50
|
### Workspaces
|
|
49
51
|
|
|
50
|
-
[`api/workspace-controller`](../../packages/api/workspace-controller/README.md) keeps Workspace mutation policy and the authoritative follow feed on the Host. `ClientWorkspaceModel` owns
|
|
52
|
+
[`api/workspace-controller`](../../packages/api/workspace-controller/README.md) keeps Workspace mutation policy and the authoritative follow feed on the Host. `ClientWorkspaceModel` owns browser rows, Workspace order, archived and pinned Session id arrays, command echoes, and stream/unary race resolution. Every stream generation starts with a complete baseline followed by `upsert`, `remove`, `order`, `archived`, and `pinned` increments; reconnect replaces the model from the new baseline. `WorkspaceController` exposes that model as `ctx.workspaces`, while `ui-workspace` contributes `useWorkspaces` and navigation callbacks. The sidebar's `ArchivedFilter` controls default-hidden, shown, or archived-only rows in lists and search. Archived rows retain their ordering slots, render grayed, and cannot open until restored through the row or search-result Unarchive action. Restoration calls `workspace.unarchiveSession`, and its complete archive set reaches Clients through the unary response and `archived` increment. Session display order stays browser-local and includes hidden archives; pinning moves a Session within that full order, while unpinning does not restore its earlier position.
|
|
51
53
|
|
|
52
54
|
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
55
|
|
|
54
56
|
## Conversation and presentation
|
|
55
57
|
|
|
58
|
+
Web and desktop share the [Coding Tools preference](../../packages/client/ui-settings/README.md#use-this-package). It controls diagnostic Views, [available preset choices](../../packages/client/ui-agent-preset/README.md), changed-file cards, and the builtin HTML preview policy without changing Session records.
|
|
59
|
+
|
|
56
60
|
`ui-session` installs the Session scope adapter and publishes `useSessions`, `useSessionStatus`, `useSessionRetainInfo`, `useSession`, `sessionId`, and `useProjection`. `SessionProvider` inherits an outer binding or binds an explicit `SessionReference`, so concurrent subtrees can target different Sessions. Domain adapters add further standard sources without putting React hooks on the model objects.
|
|
57
61
|
|
|
58
62
|
`ui-conversation` binds once to each `SessionBinding.eventSource`. Its event registry correlates durable Session events and Client-only `assistant/live-chunk` updates into stable business Contexts, and its view registry materializes target snapshots. Chat Assistant, Trajectory Assistant, and Turn Tail interpret both live chunks and the compact streams embedded in durable settlements, so reconnect and paged history reproduce the same Assistant state without durable token rows. `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.
|
|
@@ -64,7 +68,8 @@ This pairing is not a second source of business truth. Host controllers decide d
|
|
|
64
68
|
| Path | Sequence |
|
|
65
69
|
|---|---|
|
|
66
70
|
| 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`
|
|
71
|
+
| transient Session control | Host control baseline → Remote snapshot stream → `SessionManager` projection stores → Session and list snapshots → standard hooks → components |
|
|
72
|
+
| Background jobs | Host job registry → `job.list` / `job.follow` → [`ClientJobs`](../../packages/api/job-controller/README.md) roster and output views → job list and panels |
|
|
68
73
|
| Workspace state | Host Workspace baseline and increments → `ClientWorkspaceModel` → `ctx.workspaces.list` → `useWorkspaces` → sidebar, hero, and navigation entries |
|
|
69
74
|
| scoped interaction | Host Cordis waterfall → API Remotes `$events` → `ctx.remote.$on()` on the Session Context → owning UI package → result or `next()` |
|
|
70
75
|
| 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 |
|