dsh-plugin-dev-kb 1.1.0 → 1.4.0
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/CHANGELOG.md +31 -0
- package/README.en.md +14 -8
- package/README.md +15 -9
- package/docs/banner.svg +25 -0
- package/kb/INDEX.md +23 -19
- package/kb/README.md +8 -6
- package/kb/extra/AGENTS.md +11 -10
- package/kb/extra/cookbook/adding-a-remote-api.md +2 -2
- package/kb/extra/cookbook/adding-a-remote-api.zh.md +2 -2
- package/kb/extra/cookbook/adding-a-session-format-version.md +151 -0
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +151 -0
- package/kb/extra/cookbook/adding-a-vendored-package.md +1 -1
- package/kb/extra/cookbook/adding-a-vendored-package.zh.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/kb/extra/cookbook/reviewing-persistence-type-changes.md +120 -0
- package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +120 -0
- package/kb/extra/deepseek-llm-api-wire-extensions.md +19 -20
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +18 -19
- package/kb/extra/development.md +37 -10
- package/kb/extra/development.zh.md +37 -10
- package/kb/extra/event-producer-consumer.md +90 -67
- package/kb/extra/event-producer-consumer.zh.md +91 -68
- package/kb/extra/glossary.md +1 -1
- package/kb/extra/glossary.zh.md +1 -1
- package/kb/extra/i18n/README.md +16 -7
- package/kb/extra/i18n/README.zh.md +17 -8
- package/kb/extra/i18n/terminology.md +4 -4
- package/kb/extra/i18n/translation-prompt.md +3 -3
- package/kb/extra/module-graph.md +621 -335
- package/kb/extra/module-graph.zh.md +621 -335
- package/kb/extra/persistence-changes/2026-09-11-initial.md +280 -0
- package/kb/extra/persistence-changes/2026-09-11-initial.zh.md +280 -0
- package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
- package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
- package/kb/extra/persistence-changes/2026-09-14-image-offload.md +96 -0
- package/kb/extra/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
- package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
- package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +120 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
- package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
- package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
- package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-21-user-question-reply.md +60 -0
- package/kb/extra/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
- package/kb/extra/persistence-changes/README.md +88 -0
- package/kb/extra/persistence-changes/README.zh.md +88 -0
- package/kb/extra/persistence-changes/historical-formats/README.md +75 -0
- package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -0
- package/kb/extra/persistence-changes/historical-formats/v0.md +5105 -0
- package/kb/extra/persistence-changes/historical-formats/v0.zh.md +5105 -0
- package/kb/extra/persistence-changes/historical-formats/v1.md +5107 -0
- package/kb/extra/persistence-changes/historical-formats/v1.zh.md +5107 -0
- package/kb/extra/persistence-changes/historical-formats/v2.md +5362 -0
- package/kb/extra/persistence-changes/historical-formats/v2.zh.md +5362 -0
- package/kb/extra/persistence-changes/historical-formats/v3.md +5634 -0
- package/kb/extra/persistence-changes/historical-formats/v3.zh.md +5634 -0
- package/kb/extra/persistence-changes/releases/README.md +103 -0
- package/kb/extra/persistence-changes/releases/README.zh.md +103 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
- package/kb/extra/rescope.md +2 -2
- package/kb/extra/rescope.zh.md +2 -2
- package/kb/extra/session-format-status.md +63 -0
- package/kb/extra/session-format-status.zh.md +63 -0
- package/kb/extra/subsystems/agent-team.md +52 -28
- package/kb/extra/subsystems/agent-team.zh.md +52 -28
- package/kb/extra/subsystems/attachment.md +19 -9
- package/kb/extra/subsystems/attachment.zh.md +19 -9
- package/kb/extra/subsystems/boot.md +323 -0
- package/kb/extra/subsystems/boot.zh.md +323 -0
- package/kb/extra/subsystems/browser-use.md +67 -0
- package/kb/extra/subsystems/browser-use.zh.md +67 -0
- package/kb/extra/subsystems/claude-code-mods.md +146 -0
- package/kb/extra/subsystems/claude-code-mods.zh.md +146 -0
- package/kb/extra/subsystems/computer-use.md +56 -0
- package/kb/extra/subsystems/computer-use.zh.md +56 -0
- package/kb/extra/subsystems/deliverables.md +178 -0
- package/kb/extra/subsystems/deliverables.zh.md +178 -0
- package/kb/extra/subsystems/extensions.md +6 -4
- package/kb/extra/subsystems/extensions.zh.md +6 -4
- package/kb/extra/subsystems/feedback.md +165 -31
- package/kb/extra/subsystems/feedback.zh.md +165 -31
- package/kb/extra/subsystems/mcp.md +139 -0
- package/kb/extra/subsystems/mcp.zh.md +139 -0
- package/kb/extra/subsystems/office-to-pdf.md +87 -0
- package/kb/extra/subsystems/office-to-pdf.zh.md +87 -0
- package/kb/extra/subsystems/otel.md +44 -0
- package/kb/extra/subsystems/otel.zh.md +44 -0
- package/kb/extra/subsystems/product-telemetry.md +79 -0
- package/kb/extra/subsystems/product-telemetry.zh.md +79 -0
- package/kb/extra/subsystems/ssh.md +135 -0
- package/kb/extra/subsystems/ssh.zh.md +135 -0
- package/kb/extra/subsystems/todo.md +3 -3
- package/kb/extra/subsystems/todo.zh.md +3 -3
- package/kb/extra/subsystems/voice-input.md +164 -0
- package/kb/extra/subsystems/voice-input.zh.md +164 -0
- package/kb/extra/subsystems/webhook.md +3 -3
- package/kb/extra/subsystems/webhook.zh.md +1 -1
- package/kb/extra/testing.md +5 -4
- package/kb/extra/testing.zh.md +5 -4
- package/kb/extra/ui-radius.md +115 -0
- package/kb/extra/ui-radius.zh.md +115 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
- package/kb/extra/web-styling.md +12 -2
- package/kb/extra/web-styling.zh.md +12 -2
- package/kb/meta/search-index.json +1019 -251
- package/kb/meta/site-pages.txt +187 -183
- package/kb/meta/source.json +8 -8
- package/kb/meta/topics.md +11 -7
- package/kb/site/develop/basic/config.md +1 -0
- package/kb/site/develop/basic/index.md +1 -0
- package/kb/site/develop/basic/publish.md +10 -3
- package/kb/site/develop/basic/tool.md +1 -0
- package/kb/site/develop/cordis-tutorial/01-first-plugin.md +1 -0
- package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
- package/kb/site/develop/cordis-tutorial/03-services.md +1 -0
- package/kb/site/develop/cordis-tutorial/04-events.md +1 -0
- package/kb/site/develop/cordis-tutorial/05-config.md +28 -0
- package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +1 -0
- package/kb/site/develop/cordis-tutorial/index.md +1 -0
- package/kb/site/develop/framework/events.md +1 -0
- package/kb/site/develop/framework/index.md +2 -1
- package/kb/site/develop/framework/service.md +1 -0
- package/kb/site/develop/practice/dynamic-cordis.md +9 -8
- package/kb/site/develop/practice/index.md +1 -0
- package/kb/site/develop/practice/llm-adapter.md +2 -1
- package/kb/site/en/develop/basic/config.md +1 -0
- package/kb/site/en/develop/basic/index.md +1 -0
- package/kb/site/en/develop/basic/publish.md +10 -3
- package/kb/site/en/develop/basic/tool.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/03-services.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/05-config.md +28 -0
- package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/index.md +1 -0
- package/kb/site/en/develop/framework/events.md +1 -0
- package/kb/site/en/develop/framework/index.md +2 -1
- package/kb/site/en/develop/framework/service.md +1 -0
- package/kb/site/en/develop/practice/dynamic-cordis.md +9 -8
- package/kb/site/en/develop/practice/index.md +1 -0
- package/kb/site/en/develop/practice/llm-adapter.md +2 -1
- package/kb/site/en/guide/github-review.md +1 -0
- package/kb/site/en/guide/mcp-memory.md +1 -0
- package/kb/site/en/guide/network-proxy.md +2 -1
- package/kb/site/en/guide/providers-custom-form.png +0 -0
- package/kb/site/en/guide/providers-models-page.png +0 -0
- package/kb/site/en/guide/providers.md +98 -83
- package/kb/site/en/guide/public-deployments.md +36 -0
- package/kb/site/en/guide/python-sdk.md +60 -23
- package/kb/site/en/guide/quickstart.md +2 -0
- package/kb/site/en/guide/schedule.md +70 -11
- package/kb/site/en/reference/agent-lifecycle.md +13 -5
- package/kb/site/en/reference/api-gateway.md +13 -11
- package/kb/site/en/reference/capability-seams.md +187 -62
- package/kb/site/en/reference/config-catalog.md +1887 -819
- package/kb/site/en/reference/cookbook/adding-a-package.md +57 -3
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +35 -64
- package/kb/site/en/reference/cookbook/adding-a-tool.md +5 -4
- package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/en/reference/cookbook/extension-cookbook.md +7 -6
- package/kb/site/en/reference/cordis-api/context.md +1 -0
- package/kb/site/en/reference/cordis-api/events.md +1 -0
- package/kb/site/en/reference/cordis-api/fiber.md +4 -3
- package/kb/site/en/reference/cordis-api/inherited.md +16 -16
- package/kb/site/en/reference/cordis-api/registry.md +1 -0
- package/kb/site/en/reference/cordis-api/service.md +1 -0
- package/kb/site/en/reference/cordis-primer.md +1 -0
- package/kb/site/en/reference/index.md +32 -15
- package/kb/site/en/reference/persistence-catalog.md +7787 -81
- package/kb/site/en/reference/subsystems/approval.md +3 -2
- package/kb/site/en/reference/subsystems/client-modules.md +30 -13
- package/kb/site/en/reference/subsystems/client-resources.md +96 -0
- package/kb/site/en/reference/subsystems/commands.md +6 -1
- package/kb/site/en/reference/subsystems/compaction.md +50 -3
- package/kb/site/en/reference/subsystems/conversation.md +36 -6
- package/kb/site/en/reference/subsystems/core.md +174 -271
- package/kb/site/en/reference/subsystems/credentials.md +169 -5
- package/kb/site/en/reference/subsystems/filesystem.md +26 -0
- package/kb/site/en/reference/subsystems/goal.md +39 -2
- package/kb/site/en/reference/subsystems/index.md +18 -5
- package/kb/site/en/reference/subsystems/jobs.md +337 -127
- package/kb/site/en/reference/subsystems/llm-streaming.md +93 -43
- package/kb/site/en/reference/subsystems/lsp.md +2 -1
- package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/en/reference/subsystems/persistence.md +40 -18
- package/kb/site/en/reference/subsystems/plan.md +2 -1
- package/kb/site/en/reference/subsystems/ptc-runtime.md +236 -0
- package/kb/site/en/reference/subsystems/sandbox.md +7 -5
- package/kb/site/en/reference/subsystems/schedule.md +392 -33
- package/kb/site/en/reference/subsystems/scope.md +2 -1
- package/kb/site/en/reference/subsystems/session-projection.md +22 -19
- package/kb/site/en/reference/subsystems/session-query.md +1 -0
- package/kb/site/en/reference/subsystems/session-reference.md +12 -6
- package/kb/site/en/reference/subsystems/session-telemetry.md +27 -8
- package/kb/site/en/reference/subsystems/session-title.md +6 -5
- package/kb/site/en/reference/subsystems/session.md +258 -118
- package/kb/site/en/reference/subsystems/settings.md +43 -292
- package/kb/site/en/reference/subsystems/shell.md +44 -32
- package/kb/site/en/reference/subsystems/sidebar-right.md +162 -0
- package/kb/site/en/reference/subsystems/skills.md +5 -6
- package/kb/site/en/reference/subsystems/slots.md +68 -39
- package/kb/site/en/reference/subsystems/spill.md +15 -7
- package/kb/site/en/reference/subsystems/storage.md +2 -2
- package/kb/site/en/reference/subsystems/subagent.md +65 -72
- package/kb/site/en/reference/subsystems/subprocess.md +42 -44
- package/kb/site/en/reference/subsystems/system-prompt.md +7 -2
- package/kb/site/en/reference/subsystems/terminal.md +1 -0
- package/kb/site/en/reference/subsystems/token-meter.md +3 -1
- package/kb/site/en/reference/subsystems/tools.md +44 -16
- package/kb/site/en/reference/subsystems/typert.md +153 -10
- package/kb/site/en/reference/subsystems/user-questions.md +131 -1
- package/kb/site/en/reference/subsystems/web-client.md +15 -9
- package/kb/site/en/reference/subsystems/web-server.md +74 -1
- package/kb/site/en/reference/subsystems/web.md +1 -0
- package/kb/site/en/reference/subsystems/workflow.md +10 -9
- package/kb/site/en/reference/subsystems/workspace.md +343 -4
- package/kb/site/en/reference/tool-catalog.md +806 -311
- package/kb/site/en/reference/tool-execution-pipeline.md +9 -5
- package/kb/site/guide/github-review.md +1 -0
- package/kb/site/guide/mcp-memory.md +1 -0
- package/kb/site/guide/network-proxy.md +2 -1
- package/kb/site/guide/providers-custom-form.zh.png +0 -0
- package/kb/site/guide/providers-models-page.zh.png +0 -0
- package/kb/site/guide/providers.md +109 -94
- package/kb/site/guide/public-deployments.md +36 -0
- package/kb/site/guide/python-sdk.md +60 -23
- package/kb/site/guide/quickstart.md +2 -0
- package/kb/site/guide/schedule.md +70 -11
- package/kb/site/reference/agent-lifecycle.md +13 -5
- package/kb/site/reference/api-gateway.md +13 -11
- package/kb/site/reference/capability-seams.md +187 -62
- package/kb/site/reference/config-catalog.md +1889 -820
- package/kb/site/reference/cookbook/adding-a-package.md +55 -3
- package/kb/site/reference/cookbook/adding-a-settings-card.md +35 -64
- package/kb/site/reference/cookbook/adding-a-tool.md +5 -4
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/reference/cookbook/extension-cookbook.md +7 -6
- package/kb/site/reference/cordis-api/context.md +1 -0
- package/kb/site/reference/cordis-api/events.md +1 -0
- package/kb/site/reference/cordis-api/fiber.md +4 -3
- package/kb/site/reference/cordis-api/inherited.md +16 -16
- package/kb/site/reference/cordis-api/registry.md +1 -0
- package/kb/site/reference/cordis-api/service.md +1 -0
- package/kb/site/reference/cordis-primer.md +1 -0
- package/kb/site/reference/index.md +32 -15
- package/kb/site/reference/persistence-catalog.md +7791 -85
- package/kb/site/reference/subsystems/approval.md +3 -2
- package/kb/site/reference/subsystems/client-modules.md +30 -13
- package/kb/site/reference/subsystems/client-resources.md +96 -0
- package/kb/site/reference/subsystems/commands.md +6 -1
- package/kb/site/reference/subsystems/compaction.md +50 -3
- package/kb/site/reference/subsystems/conversation.md +35 -5
- package/kb/site/reference/subsystems/core.md +174 -271
- package/kb/site/reference/subsystems/credentials.md +169 -5
- package/kb/site/reference/subsystems/filesystem.md +26 -0
- package/kb/site/reference/subsystems/goal.md +39 -2
- package/kb/site/reference/subsystems/index.md +28 -15
- package/kb/site/reference/subsystems/jobs.md +336 -126
- package/kb/site/reference/subsystems/llm-streaming.md +93 -43
- package/kb/site/reference/subsystems/lsp.md +2 -1
- package/kb/site/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/reference/subsystems/persistence.md +40 -18
- package/kb/site/reference/subsystems/plan.md +2 -1
- package/kb/site/reference/subsystems/ptc-runtime.md +236 -0
- package/kb/site/reference/subsystems/sandbox.md +7 -5
- package/kb/site/reference/subsystems/schedule.md +392 -33
- package/kb/site/reference/subsystems/scope.md +2 -1
- package/kb/site/reference/subsystems/session-projection.md +22 -19
- package/kb/site/reference/subsystems/session-query.md +1 -0
- package/kb/site/reference/subsystems/session-reference.md +12 -6
- package/kb/site/reference/subsystems/session-telemetry.md +27 -8
- package/kb/site/reference/subsystems/session-title.md +6 -5
- package/kb/site/reference/subsystems/session.md +258 -118
- package/kb/site/reference/subsystems/settings.md +43 -292
- package/kb/site/reference/subsystems/shell.md +44 -32
- package/kb/site/reference/subsystems/sidebar-right.md +162 -0
- package/kb/site/reference/subsystems/skills.md +5 -6
- package/kb/site/reference/subsystems/slots.md +68 -39
- package/kb/site/reference/subsystems/spill.md +15 -7
- package/kb/site/reference/subsystems/storage.md +2 -2
- package/kb/site/reference/subsystems/subagent.md +64 -71
- package/kb/site/reference/subsystems/subprocess.md +42 -44
- package/kb/site/reference/subsystems/system-prompt.md +7 -2
- package/kb/site/reference/subsystems/terminal.md +1 -0
- package/kb/site/reference/subsystems/token-meter.md +3 -1
- package/kb/site/reference/subsystems/tools.md +44 -16
- package/kb/site/reference/subsystems/typert.md +153 -10
- package/kb/site/reference/subsystems/user-questions.md +132 -2
- package/kb/site/reference/subsystems/web-client.md +15 -9
- package/kb/site/reference/subsystems/web-server.md +74 -1
- package/kb/site/reference/subsystems/web.md +1 -0
- package/kb/site/reference/subsystems/workflow.md +10 -9
- package/kb/site/reference/subsystems/workspace.md +343 -4
- package/kb/site/reference/tool-catalog.md +810 -315
- package/kb/site/reference/tool-execution-pipeline.md +9 -5
- package/lib/index.js +25 -44
- package/package.json +3 -2
- package/skills/dsh-plugin-dev-kb.md +6 -5
- package/kb/site/en/reference/subsystems/code-runtime.md +0 -198
- package/kb/site/en/reference/subsystems/invariants.md +0 -91
- package/kb/site/reference/subsystems/code-runtime.md +0 -198
- package/kb/site/reference/subsystems/invariants.md +0 -91
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/tools.zh.md"
|
|
3
|
+
rawMarkdownPath: "reference/subsystems/tools.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -11,7 +12,7 @@ outline: [2,3]
|
|
|
11
12
|
|
|
12
13
|
## `ToolDefinition` — 一个已注册的工具
|
|
13
14
|
|
|
14
|
-
由一个 `ToolSchema`(面向模型的字段)、必需的规范输出声明、`execute` 函数、仅供宿主使用的调度器元数据、可选的最终内容回调和可选 UI 展示函数组成。注册表持有这些定义,循环通过它们分派调用。注册表的 `schemas()` 通过显式允许列表构建面向模型的 `ToolSchema[]`;`output`/`execute`/`finalizeContent`/`timeoutMs`/`isConcurrencySafe`/`presentCall`/`presentResult` 绝不能泄漏到模型请求中。
|
|
15
|
+
由一个 `ToolSchema`(面向模型的字段)、必需的规范输出声明、`execute` 函数、仅供宿主使用的调度器元数据、可选的最终内容回调和可选 UI 展示函数组成。注册表持有这些定义,循环通过它们分派调用。注册表的 `schemas()` 通过显式允许列表构建面向模型的 `ToolSchema[]`;`output`/`execute`/`projectContent`/`finalizeContent`/`timeoutMs`/`isConcurrencySafe`/`presentCall`/`presentResult` 绝不能泄漏到模型请求中。
|
|
15
16
|
|
|
16
17
|
```ts type-equiv
|
|
17
18
|
/** Tool-owned canonical output contract used after the body returns a JSON value. */
|
|
@@ -41,6 +42,16 @@ interface ToolDefinition extends ToolSchema {
|
|
|
41
42
|
* @returns the canonical value declared by `output.schema`.
|
|
42
43
|
*/
|
|
43
44
|
execute(args: unknown, exec: ToolRunContext): Promise<unknown>
|
|
45
|
+
/**
|
|
46
|
+
* Install execution-prepared content before `tools/post-execute` policies.
|
|
47
|
+
* The callback is captured when the call starts and runs once for a
|
|
48
|
+
* normalized outcome entering post-execute. Policy replacements remain
|
|
49
|
+
* authoritative; pipeline failures that bypass post-execute skip projection.
|
|
50
|
+
* @param exec - immutable execution identity and arguments.
|
|
51
|
+
* @param result - normalized result before post-execute policy.
|
|
52
|
+
* @returns replacement content, or undefined to preserve the renderer output.
|
|
53
|
+
*/
|
|
54
|
+
projectContent?(exec: Readonly<ToolExecution>, result: Readonly<ToolExecutionResult>): ContentBlock[] | undefined
|
|
44
55
|
/**
|
|
45
56
|
* Synchronous last-mile transform for model-facing content. The registry
|
|
46
57
|
* snapshots this callback when execution starts and invokes it exactly once
|
|
@@ -172,7 +183,7 @@ interface ToolRestriction {
|
|
|
172
183
|
|
|
173
184
|
## 执行:可扩展的 waterfall(瀑布式事件)加单调策略
|
|
174
185
|
|
|
175
|
-
`ctx.tools.execute()` 接受由调用方拥有且包含必需 readonly `signal` 的 `ToolExecutionInput`,将其解析后的 JSON 参数一次性物化为流水线拥有的 `ToolExecution`,然后让调用依次经过 `tools/pre-execute`(可重排的 allow/deny/ask waterfall)→ 已注册的单调 guard → `tools/execute`(环绕分派包装层)→ `tools/post-execute`(检查/替换结果)→ 可选且由定义拥有的 `finalizeContent` → `tools/result`(不可变的权威结果)。只有 `tools/execute` 视图可以替换必需的 signal。最终产出为 `ToolExecutionResult`。
|
|
186
|
+
`ctx.tools.execute()` 接受由调用方拥有且包含必需 readonly `signal` 的 `ToolExecutionInput`,将其解析后的 JSON 参数一次性物化为流水线拥有的 `ToolExecution`,然后让调用依次经过 `tools/pre-execute`(可重排的 allow/deny/ask waterfall)→ 已注册的单调 guard → `tools/execute`(环绕分派包装层)→ `projectContent` → `tools/post-execute`(检查/替换结果)→ 可选且由定义拥有的 `finalizeContent` → `tools/result`(不可变的权威结果)。只有 `tools/execute` 视图可以替换必需的 signal。最终产出为 `ToolExecutionResult`。
|
|
176
187
|
|
|
177
188
|
```ts type-equiv
|
|
178
189
|
/** Opaque call identity that permits correlation without exposing mutable execution state. */
|
|
@@ -193,6 +204,8 @@ interface ToolExecutionInput {
|
|
|
193
204
|
*/
|
|
194
205
|
readonly rootCallId?: ToolCallId
|
|
195
206
|
readonly name: string
|
|
207
|
+
/** Binding-time tool schema for a PTC inner call; frozen by its producer and never logged. */
|
|
208
|
+
readonly schema?: ToolSchema
|
|
196
209
|
/** Losslessly JSON-serializable parsed arguments (tools validate their own schema). */
|
|
197
210
|
readonly arguments: unknown
|
|
198
211
|
/** The agent on whose behalf the call runs (set by the agent loop). */
|
|
@@ -255,7 +268,7 @@ type ToolExecutionMode =
|
|
|
255
268
|
| { kind: 'exclusive' }
|
|
256
269
|
```
|
|
257
270
|
|
|
258
|
-
PTC
|
|
271
|
+
PTC 绑定在构造时冻结 ToolSchema,经由调度器传入 `ToolExecution.schema`;它只是临时执行元数据。每个实际开始的子分派在策略之前只记录配对 id、名称与规范化参数。开始和结算事件都不序列化描述、参数 schema 或 schema 字段。桥接层随后把已结算调用交给 `tools/ptc-dispatch-log` waterfall;它可以改变持久内容副本,但会保留程序取得的值、模型可见的外层结果和结构化失败身份:
|
|
259
272
|
|
|
260
273
|
```ts type-equiv
|
|
261
274
|
/**
|
|
@@ -265,14 +278,14 @@ PTC mode 的桥接层还会把每个已结算的子分派暴露给 `tools/ptc-di
|
|
|
265
278
|
* copy a listener may reshape. `content` is the RENDERED result projection
|
|
266
279
|
* (what a native `tool/result` would carry) — the program itself received
|
|
267
280
|
* the structured `value` (or just the error message on failure); only the
|
|
268
|
-
* `tool/
|
|
281
|
+
* `tool/ptc-dispatch` event's copy changes.
|
|
269
282
|
*/
|
|
270
283
|
interface PtcDispatchLog {
|
|
271
284
|
/** The outer `run_code` execution. */
|
|
272
285
|
readonly exec: ToolExecution
|
|
273
286
|
/** The calling agent (the scope routing key and the spill owner), when the outer call has one. */
|
|
274
287
|
readonly agent?: Agent
|
|
275
|
-
/**
|
|
288
|
+
/** Opaque sub-call id; new calls use `<parent>:ptc:<n>`. */
|
|
276
289
|
readonly subCallId: ToolCallId
|
|
277
290
|
/** The dispatched sub-tool name. */
|
|
278
291
|
readonly name: string
|
|
@@ -370,7 +383,17 @@ interface ToolExecutionFailure {
|
|
|
370
383
|
type ToolExecutionResult = ToolExecutionSuccess | ToolExecutionFailure
|
|
371
384
|
```
|
|
372
385
|
|
|
373
|
-
|
|
386
|
+
```ts type-equiv
|
|
387
|
+
/** Structured error metadata for a failed tool call (alongside the model-facing text). */
|
|
388
|
+
interface ToolErrorInfo {
|
|
389
|
+
name: string
|
|
390
|
+
code: string
|
|
391
|
+
/** Optional raw user-facing detail; durable projections preserve it but model-facing content does not include it. */
|
|
392
|
+
reason?: string
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
结果仅承载产出。调用身份保留在不可变的 `ToolExecution` 上,后者伴随结果经过每个钩子,并出现在持久化的 `tool/call` / `tool/result` 会话事件上,因此包装层无法创建第二个相互矛盾的身份。规范的 `value` 仅存在于执行期间:循环只持久化 `content`、`error` 和 `meta`,`tool/ptc-dispatch` 则存储子调用渲染后的 `content`、`isError` 与可选结构化 `error`。回放可以重现展示,却无法重建规范的中间值。可选的 `ToolErrorInfo.reason` 保留面向用户的原始详情,不将其加入模型可见内容。
|
|
374
397
|
|
|
375
398
|
成功时,注册表会快照并校验函数体返回值,将其冻结,然后调用纯渲染器;对于直接的外层调用,还会调用可选的元数据投影器。注册表会在 `tools/result` 之前另行物化持久展示字段;无效值、渲染器/投影器失败或非 JSON 展示都会转为 JSON 安全的 `isError`。因此,最终实时观察者能看到精确的执行期值,以及可安全用于后续持久追加的字段。
|
|
376
399
|
|
|
@@ -380,15 +403,19 @@ type ToolExecutionResult = ToolExecutionSuccess | ToolExecutionFailure
|
|
|
380
403
|
|
|
381
404
|
```ts type-equiv
|
|
382
405
|
/**
|
|
383
|
-
* Pre-dispatch decision. `allow` runs the call; `deny` materializes
|
|
384
|
-
*
|
|
385
|
-
*
|
|
406
|
+
* Pre-dispatch decision. `allow` runs the call; `deny` materializes its
|
|
407
|
+
* model-facing reason and optional structured error identity; `cancel` selects
|
|
408
|
+
* the canonical cancellation result without presenting a policy denial; `ask`
|
|
409
|
+
* runs only after an approval service returns `allowed-once` and otherwise
|
|
410
|
+
* denies; its `reason` is the audited approval reason and its optional
|
|
411
|
+
* `displayReason` is the localized prompt text. Input rewriting is excluded because arguments are already logged and
|
|
386
412
|
* presented.
|
|
387
413
|
*/
|
|
388
414
|
type PreToolDecision =
|
|
389
415
|
| { kind: 'allow' }
|
|
390
|
-
| { kind: 'deny'; reason: string }
|
|
391
|
-
| { kind: '
|
|
416
|
+
| { kind: 'deny'; reason: string; info?: ToolErrorInfo }
|
|
417
|
+
| { kind: 'cancel' }
|
|
418
|
+
| { kind: 'ask'; reason?: string; displayReason?: { readonly en: string; readonly [locale: string]: string } }
|
|
392
419
|
```
|
|
393
420
|
|
|
394
421
|
```ts type-equiv
|
|
@@ -402,7 +429,7 @@ type PostToolDecision =
|
|
|
402
429
|
| { kind: 'block'; feedback: ContentBlock[]; additionalContexts?: UserMessage[] }
|
|
403
430
|
```
|
|
404
431
|
|
|
405
|
-
调用 `next()` 获取默认决策,或直接返回一个决策以短路。前置策略可以 deny 或 ask;只有 `allowed-once` 才继续执行,而未授权、缺少审批通道或服务、或无 agent
|
|
432
|
+
调用 `next()` 获取默认决策,或直接返回一个决策以短路。前置策略可以 deny 或 ask;只有 `allowed-once` 才继续执行,而未授权、缺少审批通道或服务、或无 agent 的请求都会变为拒绝。拒绝可以附带结构化身份与用户可见详情,而不改变其模型可见原因。Guard 仍可施加最终拒绝。参数不可被改写,因为历史记录、审计、UI 和执行必须保持一致。
|
|
406
433
|
|
|
407
434
|
后置策略可以替换内容或值,但不能同时替换两者。替换内容会保留规范值和现有元数据;替换值会重新校验并重新计算内容/元数据;阻止会移除值,并转为包含纠正反馈的 `isError`。内容替换是展示策略,而非保密策略;需要隐藏程序化值的监听器必须阻止或替换该值。`tools/result` 在归一化后接收冻结的执行和结果;观察者无法对其进行变换,观察者的失败也会被隔离。未知工具和抛出异常的工具都会变为结构化错误(`ToolNotFoundError` 映射为 `UNKNOWN_TOOL`),调用失败但不终止当前轮次。
|
|
408
435
|
|
|
@@ -654,11 +681,12 @@ Source: [`packages/core/tools/src/index.ts`](https://github.com/deepseek-ai/deep
|
|
|
654
681
|
|
|
655
682
|
#### `tools/pre-execute` — waterfall
|
|
656
683
|
|
|
657
|
-
Allow, deny, or ask before dispatch. `next()` delegates to allow; missing approval support turns `ask` into denial. Async gates must observe `exec.signal`; the registry rechecks cancellation after they settle but never abandons their promise. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's calls.
|
|
684
|
+
Allow, deny, cancel, or ask before dispatch. `next()` delegates to allow; `cancel` selects the canonical pre-dispatch cancellation result, and missing approval support turns `ask` into denial. Async gates must observe `exec.signal`; the registry rechecks cancellation after they settle but never abandons their promise. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's calls.
|
|
658
685
|
|
|
659
686
|
```ts cordis-catalog
|
|
660
687
|
/**
|
|
661
|
-
* Allow, deny, or ask before dispatch. `next()` delegates to allow;
|
|
688
|
+
* Allow, deny, cancel, or ask before dispatch. `next()` delegates to allow;
|
|
689
|
+
* `cancel` selects the canonical pre-dispatch cancellation result, and missing
|
|
662
690
|
* approval support turns `ask` into denial. Async gates must observe
|
|
663
691
|
* `exec.signal`; the registry rechecks cancellation after they settle but
|
|
664
692
|
* never abandons their promise.
|
|
@@ -677,13 +705,13 @@ Source: [`packages/core/tools/src/index.ts`](https://github.com/deepseek-ai/deep
|
|
|
677
705
|
|
|
678
706
|
#### `tools/ptc-dispatch-log` — waterfall
|
|
679
707
|
|
|
680
|
-
Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` sub-dispatch outcome before the bridge appends its `tool/
|
|
708
|
+
Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` sub-dispatch outcome before the bridge appends its `tool/ptc-dispatch` event. `next()` keeps the content unchanged; a listener may return replacement blocks (e.g. the spill policy's preview + locator for an oversized text result). Only the logged copy is affected — the program already received the complete value, and the model sees neither. A throwing listener is contained: the bridge falls back to logging the original settled content. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent's dispatches.
|
|
681
709
|
|
|
682
710
|
```ts cordis-catalog
|
|
683
711
|
/**
|
|
684
712
|
* Allow a listener to replace content in the DURABLE LOG COPY of one
|
|
685
713
|
* `run_code` sub-dispatch outcome before the bridge appends its
|
|
686
|
-
* `tool/
|
|
714
|
+
* `tool/ptc-dispatch` event. `next()` keeps the
|
|
687
715
|
* content unchanged; a listener may return replacement blocks (e.g. the
|
|
688
716
|
* spill policy's preview + locator for an oversized text result). Only the
|
|
689
717
|
* logged copy is affected — the program already received the complete
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/typert.zh.md"
|
|
3
|
+
rawMarkdownPath: "reference/subsystems/typert.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -41,7 +42,7 @@ interface TypertLookupDefinition {
|
|
|
41
42
|
|
|
42
43
|
## 调用 descriptor
|
|
43
44
|
|
|
44
|
-
`InvocationDescriptor` 是本地反射信息,不是 wire message。Host 与消费方构建会生成彼此对应的 descriptor;请求只发送 endpoint 与具名 `args`。strict codec 携带生成的 schema,SRC codec
|
|
45
|
+
`InvocationDescriptor` 是本地反射信息,不是 wire message。Host 与消费方构建会生成彼此对应的 descriptor;请求只发送 endpoint 与具名 `args`。strict codec 携带生成的 schema factory,SRC codec 则在不恢复结构类型的前提下强制要求输入为 JSON 安全值。一元结果 codec 可提供 `encode()` 处理含字节的子树,并通过 `decode()` 递归校验原生字节;Client 声明将每个 `Uint8Array` 限定为以 `ArrayBuffer` 为底层缓冲区。纯 JSON 结果无需字节识别或 Client 解码。取消通过带外 carrier signal 表达:它在业务参数之后注入,绝不进入 `args`。
|
|
45
46
|
|
|
46
47
|
```ts type-equiv
|
|
47
48
|
/** Codec attached to one invocation parameter or result. */
|
|
@@ -49,7 +50,21 @@ type TypertCodec =
|
|
|
49
50
|
| {
|
|
50
51
|
readonly mode: 'strict'
|
|
51
52
|
readonly typeSymbol: string
|
|
52
|
-
|
|
53
|
+
/** Materialize and return the process-realm schema on first boundary use. */
|
|
54
|
+
readonly create: () => TypertSchema
|
|
55
|
+
/**
|
|
56
|
+
* Decode a unary result whose fields require type-specific handling.
|
|
57
|
+
* @param value - result reconstructed by the RPC carrier.
|
|
58
|
+
* @returns the validated result, retaining native byte views.
|
|
59
|
+
*/
|
|
60
|
+
readonly decode?: (value: unknown) => unknown
|
|
61
|
+
/**
|
|
62
|
+
* Project typed binary fields into RPC result attachments.
|
|
63
|
+
* @param value - native unary result.
|
|
64
|
+
* @param writeBytes - records a byte view at its result-relative path and returns its JSON placeholder.
|
|
65
|
+
* @returns JSON metadata with untouched JSON subtrees retained.
|
|
66
|
+
*/
|
|
67
|
+
readonly encode?: (value: unknown, writeBytes: (bytes: Uint8Array, path: readonly (string | number)[]) => null) => unknown
|
|
53
68
|
}
|
|
54
69
|
| {
|
|
55
70
|
readonly mode: 'src-json'
|
|
@@ -87,7 +102,7 @@ interface InvocationDescriptor {
|
|
|
87
102
|
readonly method: string
|
|
88
103
|
/** Service member invoked when the exported method name is an alias. */
|
|
89
104
|
readonly implementation?: string
|
|
90
|
-
/** Absent for unary calls; stream calls
|
|
105
|
+
/** Absent for unary calls; stream calls deliver every yielded item as the Host produced it. */
|
|
91
106
|
readonly mode?: 'stream'
|
|
92
107
|
/** Receiver selection mode. */
|
|
93
108
|
readonly invocation:
|
|
@@ -107,6 +122,16 @@ interface InvocationDescriptor {
|
|
|
107
122
|
}
|
|
108
123
|
/** Ordered business parameters. */
|
|
109
124
|
readonly parameters: readonly InvocationParameterDescriptor[]
|
|
125
|
+
/**
|
|
126
|
+
* Client-to-Host items of the same logical stream, generated from the `In`
|
|
127
|
+
* type argument of the method's `RemoteStream<Out, In>` return type; absent
|
|
128
|
+
* when `In` is `never`. The method reads the items through
|
|
129
|
+
* `RemoteInvocation.uplink()`, so nothing enters the parameter list.
|
|
130
|
+
*/
|
|
131
|
+
readonly uplink?: {
|
|
132
|
+
/** Codec validating every uplink item before `uplink()` delivers it. */
|
|
133
|
+
readonly codec: TypertCodec
|
|
134
|
+
}
|
|
110
135
|
/** Transport cancellation injected after business parameters instead of entering wire args. */
|
|
111
136
|
readonly cancellation?: {
|
|
112
137
|
/** Reserved final Host method parameter. */
|
|
@@ -119,6 +144,106 @@ interface InvocationDescriptor {
|
|
|
119
144
|
}
|
|
120
145
|
```
|
|
121
146
|
|
|
147
|
+
Host 别名 `RemoteStream<Out, In>` 同时命名一条流的两个方向,接收方法通过 `this.ctx.invocation` 读取本次调用的上下文:
|
|
148
|
+
|
|
149
|
+
```ts type-equiv
|
|
150
|
+
/**
|
|
151
|
+
* One Remote stream as a Host method returns it: the items it yields to the
|
|
152
|
+
* Client, iterated as a plain `AsyncIterable<Out>`. `In` is the type of the
|
|
153
|
+
* items the Client may send back on the same logical stream, read through
|
|
154
|
+
* `RemoteInvocation.uplink()`; it is carried only as a type-level marker. The
|
|
155
|
+
* default `never` declares a method that reads none, and its descriptor
|
|
156
|
+
* carries no uplink codec. A generated Client stream method returns the same
|
|
157
|
+
* stream as a `RemoteStreamHandle<Out, In>`.
|
|
158
|
+
* @template Out - item type the Host method yields.
|
|
159
|
+
* @template In - item type the Client may send; `never` when the method reads none.
|
|
160
|
+
*/
|
|
161
|
+
type RemoteStream<Out, In = never> = AsyncIterable<Out> & { readonly [STREAM_UPLINK]?: In }
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
```ts type-equiv
|
|
165
|
+
/**
|
|
166
|
+
* One open Remote stream as the Client holds it: the downlink items as an
|
|
167
|
+
* `AsyncIterable`, plus the uplink and cancellation of the same logical
|
|
168
|
+
* stream. A generated Client stream method returns it, and calling that
|
|
169
|
+
* method opens the stream: a holder that neither iterates nor disposes the
|
|
170
|
+
* handle keeps the Host stream alive. A handle stands for one generation:
|
|
171
|
+
* when the carrier is lost, iteration fails with the carrier error and the
|
|
172
|
+
* handle is finished.
|
|
173
|
+
* @template Out - item type the Host method yields.
|
|
174
|
+
* @template In - item type the Client may send; `never` when the method reads none.
|
|
175
|
+
*/
|
|
176
|
+
interface RemoteStreamHandle<Out, In> extends AsyncIterable<Out> {
|
|
177
|
+
/**
|
|
178
|
+
* Send one uplink item. Items sent before the stream has opened are queued
|
|
179
|
+
* and sent once the `open` frame is on the wire. A top-level `undefined`
|
|
180
|
+
* travels as an `item` frame without `value`.
|
|
181
|
+
* @param item - item the Host validates against the method's uplink codec.
|
|
182
|
+
* @throws {Error} when the item is not a lossless JSON value, when `end()`
|
|
183
|
+
* was called, or once the stream has terminated.
|
|
184
|
+
*/
|
|
185
|
+
send(item: In): void
|
|
186
|
+
/** Half-close the uplink: the Host's `uplink()` iteration ends. Idempotent; ignored after termination. */
|
|
187
|
+
end(): void
|
|
188
|
+
/**
|
|
189
|
+
* Cancel the logical stream: send `cancel` unless a terminal frame has
|
|
190
|
+
* arrived, and end the downlink iterator quietly. Breaking out of
|
|
191
|
+
* `for await` early does the same.
|
|
192
|
+
*/
|
|
193
|
+
dispose(): void
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
```ts type-equiv
|
|
198
|
+
/**
|
|
199
|
+
* One Peer's session on this Host. Connection owns it: `ctx` is the Cordis
|
|
200
|
+
* scope that owns connection-lifetime registrations and is disposed with the
|
|
201
|
+
* Peer. Who the Peer is and what it may do are not recorded here.
|
|
202
|
+
*/
|
|
203
|
+
interface PeerScope {
|
|
204
|
+
readonly id: PeerId
|
|
205
|
+
readonly ctx: Context
|
|
206
|
+
/**
|
|
207
|
+
* Tear down every registration made through `ctx`.
|
|
208
|
+
* @returns settles once the scope has quiesced; racing calls share one completion.
|
|
209
|
+
*/
|
|
210
|
+
dispose(): Promise<void>
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
```ts type-equiv
|
|
215
|
+
/**
|
|
216
|
+
* The context of one Remote call, reachable inside the receiving method as
|
|
217
|
+
* `this.ctx.invocation`. The Gateway derives the receiver from a Context that
|
|
218
|
+
* carries it, so no parameter is injected and nothing crosses the wire.
|
|
219
|
+
*/
|
|
220
|
+
interface RemoteInvocation {
|
|
221
|
+
readonly request: {
|
|
222
|
+
readonly namespace: string
|
|
223
|
+
readonly method: string
|
|
224
|
+
readonly args: Readonly<Record<string, unknown>>
|
|
225
|
+
}
|
|
226
|
+
/** Cordis service key of the receiving Service. */
|
|
227
|
+
readonly service: string
|
|
228
|
+
/** Peer the call speaks for; an in-process carrier speaks for the operator. */
|
|
229
|
+
readonly peer: PeerScope
|
|
230
|
+
/** Carrier cancellation: Client cancel, socket close, or an uplink failure. */
|
|
231
|
+
readonly signal: AbortSignal
|
|
232
|
+
/**
|
|
233
|
+
* The Client's uplink items for this call. Available once; a second call
|
|
234
|
+
* throws. With an uplink codec on the descriptor every item is decoded to
|
|
235
|
+
* `In`; without one items arrive as `unknown` after a JSON-safety check.
|
|
236
|
+
* Iteration ends when the Client ends its uplink; when the method finishes
|
|
237
|
+
* its downlink the Gateway calls the iterator's `return()` and unread items
|
|
238
|
+
* are dropped. `In` is the caller's assertion: the runtime decodes by the
|
|
239
|
+
* descriptor and does not cross-check it.
|
|
240
|
+
* @template In - item type the caller reads; the descriptor codec decides what arrives.
|
|
241
|
+
* @returns the single-consumer uplink iterable.
|
|
242
|
+
*/
|
|
243
|
+
uplink<In = unknown>(): AsyncIterable<In>
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
122
247
|
## Typert 注册表
|
|
123
248
|
|
|
124
249
|
`ctx.typert` 分开保存当前环境的 descriptor、显式选择的 Remote contribution、lookup 提供方与作用域上下文提供方。lookup 提供方拥有稳定 wire 声明和默认 resolver;Host 组合可以为同一个 key 配置 effect-scoped 同步或异步 resolver,配置卸载后恢复默认策略。各项注册都是由 Cordis 持有的 effect,并返回可等待的 disposer。
|
|
@@ -153,6 +278,13 @@ interface InvokeRemoteRequest {
|
|
|
153
278
|
readonly method: string
|
|
154
279
|
/** Named wire values; fields must exactly match the descriptor. */
|
|
155
280
|
readonly args: Readonly<Record<string, unknown>>
|
|
281
|
+
/**
|
|
282
|
+
* Client uplink items of this logical stream, delivered to the method through
|
|
283
|
+
* `invocation.uplink()`; absent means an immediately ended iterable.
|
|
284
|
+
*/
|
|
285
|
+
readonly uplink?: AsyncIterable<unknown>
|
|
286
|
+
/** Peer the call speaks for; absent means an in-process carrier, answered as the operator. */
|
|
287
|
+
readonly peer?: PeerScope
|
|
156
288
|
/** Carrier or direct-caller cancellation injected only into cancellation-aware methods. */
|
|
157
289
|
readonly signal?: AbortSignal
|
|
158
290
|
}
|
|
@@ -174,10 +306,12 @@ type TypertGatewayErrorCode =
|
|
|
174
306
|
| 'gateway/lookup-not-found'
|
|
175
307
|
| 'gateway/lookup-unavailable'
|
|
176
308
|
| 'gateway/method-unavailable'
|
|
309
|
+
| 'gateway/protocol'
|
|
177
310
|
| 'gateway/provider-mismatch'
|
|
178
311
|
| 'gateway/result-invalid'
|
|
179
312
|
| 'gateway/service-unavailable'
|
|
180
313
|
| 'gateway/signature-invalid'
|
|
314
|
+
| 'gateway/uplink-overflow'
|
|
181
315
|
```
|
|
182
316
|
|
|
183
317
|
```ts type-equiv
|
|
@@ -185,6 +319,11 @@ type TypertGatewayErrorCode =
|
|
|
185
319
|
interface TypertGateway {
|
|
186
320
|
/** Carrier adapter shared by WebSocket and in-process transports. */
|
|
187
321
|
readonly wireStream: TypertGatewayWireStream
|
|
322
|
+
/**
|
|
323
|
+
* Check for an active Client event stream.
|
|
324
|
+
* @returns whether a stream is open and has not been cancelled.
|
|
325
|
+
*/
|
|
326
|
+
hasLiveClient(): boolean
|
|
188
327
|
/**
|
|
189
328
|
* Register the application-selected forwarded-event source.
|
|
190
329
|
* @param source - stream factory installed by the Remote assembly.
|
|
@@ -204,7 +343,7 @@ interface TypertGateway {
|
|
|
204
343
|
invoke(request: InvokeRemoteRequest): Promise<unknown>
|
|
205
344
|
/**
|
|
206
345
|
* Open one live stream Remote method without assuming a physical carrier.
|
|
207
|
-
* @param request - decoded endpoint
|
|
346
|
+
* @param request - decoded endpoint, named wire arguments, and the Client uplink when the carrier has one.
|
|
208
347
|
* @returns a cancellation-aware iterable over the business results.
|
|
209
348
|
*/
|
|
210
349
|
stream(request: InvokeRemoteRequest): Promise<AsyncIterable<unknown>>
|
|
@@ -264,14 +403,14 @@ register(contribution: TypertContribution): TypertDisposer
|
|
|
264
403
|
/**
|
|
265
404
|
* Look up one schema by `<package>#<name>`.
|
|
266
405
|
* @param key - global schema key.
|
|
267
|
-
* @returns the
|
|
406
|
+
* @returns a record containing the cached schema, or `undefined` when absent.
|
|
268
407
|
*/
|
|
269
408
|
get(key: string): TypertSchemaRecord | undefined
|
|
270
409
|
|
|
271
410
|
/**
|
|
272
411
|
* Resolve one required schema.
|
|
273
412
|
* @param key - global schema key.
|
|
274
|
-
* @returns the
|
|
413
|
+
* @returns a record containing the cached schema.
|
|
275
414
|
* @throws when the key is malformed, the package face is absent, or the schema is not contributed.
|
|
276
415
|
*/
|
|
277
416
|
resolve(key: string): TypertSchemaRecord
|
|
@@ -279,7 +418,7 @@ resolve(key: string): TypertSchemaRecord
|
|
|
279
418
|
/**
|
|
280
419
|
* Enumerate live schemas in registration order.
|
|
281
420
|
* @param filter - optional package and face restriction.
|
|
282
|
-
* @returns matching
|
|
421
|
+
* @returns matching records containing the cached schemas.
|
|
283
422
|
*/
|
|
284
423
|
list(filter: TypertSchemaFilter = {}): TypertSchemaRecord[]
|
|
285
424
|
|
|
@@ -307,8 +446,6 @@ listPackages(filter: TypertPackageFilter = {}): TypertPackageRecord[]
|
|
|
307
446
|
toJSONSchema(key: string, params?: z.core.ToJSONSchemaParams): z.core.JSONSchema.BaseSchema
|
|
308
447
|
```
|
|
309
448
|
|
|
310
|
-
Types: [TypertContribution](./invariants.md) · [TypertFace](./invariants.md) · [TypertPackageFilter](./invariants.md) · [TypertPackageRecord](./invariants.md) · [TypertSchemaFilter](./invariants.md) · [TypertSchemaRecord](./invariants.md)
|
|
311
|
-
|
|
312
449
|
Source: [`packages/typert/registry/src/service.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/typert/registry/src/service.ts)
|
|
313
450
|
|
|
314
451
|
<a id="ctxtypertgateway--typertgatewayservice"></a>
|
|
@@ -318,6 +455,12 @@ Source: [`packages/typert/registry/src/service.ts`](https://github.com/deepseek-
|
|
|
318
455
|
Resolve strict generated definitions or conservative SRC markers against current Cordis Services and Typert providers.
|
|
319
456
|
|
|
320
457
|
```ts cordis-catalog
|
|
458
|
+
/**
|
|
459
|
+
* Check for an active Client event stream.
|
|
460
|
+
* @returns whether a stream is open and has not been cancelled.
|
|
461
|
+
*/
|
|
462
|
+
hasLiveClient(): boolean
|
|
463
|
+
|
|
321
464
|
/**
|
|
322
465
|
* Register the sole application-selected forwarded-event source.
|
|
323
466
|
* @param source - stream factory installed by the Remote assembly.
|
|
@@ -336,7 +479,7 @@ async invoke(request: InvokeRemoteRequest): Promise<unknown>
|
|
|
336
479
|
|
|
337
480
|
/**
|
|
338
481
|
* Open one live stream Remote method without assuming a physical carrier.
|
|
339
|
-
* @param request - decoded endpoint
|
|
482
|
+
* @param request - decoded endpoint, named wire arguments, and the Client uplink when the carrier has one.
|
|
340
483
|
* @returns a cancellation-aware iterable over the business results.
|
|
341
484
|
*/
|
|
342
485
|
async stream(request: InvokeRemoteRequest): Promise<AsyncIterable<unknown>>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/user-questions.zh.md"
|
|
3
|
+
rawMarkdownPath: "reference/subsystems/user-questions.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -25,7 +26,7 @@ interface AskUserQuestionOption {
|
|
|
25
26
|
|
|
26
27
|
## 呈现意图
|
|
27
28
|
|
|
28
|
-
`AskUserQuestionIntent`
|
|
29
|
+
`AskUserQuestionIntent` 可选地声明一种已知的决策类型。它以 `kind` 作为标记,以便后续加入更多意图;不认识某个标记的 UI 会渲染通用选项列表。意图只改变呈现——遵循它的 UI 回答的选项标签与通用 UI 相同,因此调用方读到的答案字段一致。`approve` 指明表示同意的选项,而不依赖选项顺序。`ask()` 拒绝两种类型无法表达的断言:`approve` 未命名该问题自己的任何选项,以及没有 `detail` 的问题声明了意图。
|
|
29
30
|
|
|
30
31
|
```ts type-equiv
|
|
31
32
|
/**
|
|
@@ -44,6 +45,8 @@ type AskUserQuestionIntent = {
|
|
|
44
45
|
* An `approve` naming no option of its own question is rejected at `ask()`.
|
|
45
46
|
*/
|
|
46
47
|
approve: string
|
|
48
|
+
/** Logged tool invocation whose arguments contain the reviewed plan. */
|
|
49
|
+
callId?: ToolCallId
|
|
47
50
|
}
|
|
48
51
|
```
|
|
49
52
|
|
|
@@ -104,9 +107,96 @@ interface AskUserQuestionAnswer {
|
|
|
104
107
|
}
|
|
105
108
|
```
|
|
106
109
|
|
|
110
|
+
计时回答器收到 `wait: { callId, timed: true }`。调用 id 标识卡片及前台等待。Client 调用 `attachWait` 接手等待并取得剩余时长;传输层转发原事件,不检查或改写这些字段。不带 `timed` 的 `wait` 表示无限期等待的具名卡片请求;没有 `wait` 则表示不带卡片 key 的阻塞请求。
|
|
111
|
+
|
|
112
|
+
```ts type-equiv
|
|
113
|
+
/** Client-safe payload declared for the user-question answerer waterfall. */
|
|
114
|
+
interface AskUserQuestionRequestEvent {
|
|
115
|
+
/** Questions to display. */
|
|
116
|
+
questions: AskUserQuestionItem[]
|
|
117
|
+
/** Agent identity projected to the corresponding Client Context in transit. */
|
|
118
|
+
agent?: Agent
|
|
119
|
+
/** Cancellation lifetime of the pending request. */
|
|
120
|
+
signal?: AbortSignal
|
|
121
|
+
/**
|
|
122
|
+
* Tool call the Client card is keyed by. Timed answerers attach to the
|
|
123
|
+
* business wait stream before starting their local countdown.
|
|
124
|
+
*/
|
|
125
|
+
wait?: {
|
|
126
|
+
/** Tool call the Client card is keyed by. */
|
|
127
|
+
callId: ToolCallId
|
|
128
|
+
/** True for a foreground wait that requires a Client claim; absent for indefinite waits. */
|
|
129
|
+
timed?: boolean
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 计时问题与迟到回复
|
|
135
|
+
|
|
136
|
+
计时问题在有界的前台窗口内等待,然后让 agent 继续独立工作。用户在窗口内回答,工具返回整批答案;否则 `TimedUserQuestionResult` 为 `{ pending: true, callId }`。pending 表示问题仍可回答,不是空答案、拒绝、确认或授权。
|
|
137
|
+
|
|
138
|
+
```ts type-equiv
|
|
139
|
+
/** Timed ask result returned when the foreground answer window closes. */
|
|
140
|
+
type TimedUserQuestionResult = AskUserQuestionAnswer | { pending: true; callId: ToolCallId }
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Client 接手通过业务 Remote stream 表达,不等同于 Gateway 投递。`TimedQuestionWait` 保存原 Host deadline,仅在没有接手记录时运行计时器。`attachWait` stream 发出当前剩余时长,Client 用本地时钟倒计时。聚焦、编辑和「慢慢回答」状态仍归本地所有。stream 取消释放相应接手记录;最后一个接手方离开后,Host 恢复原 deadline。无人接手时超时中止前台 waterfall 专属的 signal 并返回 pending,不取消 Turn。Gateway 与 `api-remotes` 不包含问答专属计时策略。
|
|
144
|
+
|
|
145
|
+
`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 行无处可读用户最终的选择。排队的回复可在准入前取消,此时问题仍可回答。回复正文不含可读批次时,该调用以零答案结算;回复指向的调用已不在可回答集合中时不改变任何内容。
|
|
146
|
+
|
|
147
|
+
```ts type-equiv
|
|
148
|
+
/** `open` while the tool call may still return the answer; `continued` once the answer can only arrive as a new turn. */
|
|
149
|
+
type UserQuestionState = 'open' | 'continued'
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```ts type-equiv
|
|
153
|
+
/** One unanswered timed `ask_user_question` call reconstructed from the Session log. */
|
|
154
|
+
interface PendingUserQuestion {
|
|
155
|
+
readonly callId: ToolCallId
|
|
156
|
+
readonly questions: readonly AskUserQuestionItem[]
|
|
157
|
+
readonly state: UserQuestionState
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
```ts type-equiv
|
|
162
|
+
/**
|
|
163
|
+
* One timed `ask_user_question` call and the answers it settled with: the
|
|
164
|
+
* batch its own result carried when the user answered inside the window,
|
|
165
|
+
* otherwise the batch its late reply carried, because that call's own result
|
|
166
|
+
* recorded the timeout. A transcript row reads what the user finally answered
|
|
167
|
+
* from here, and only a call listed here was a timed one.
|
|
168
|
+
*/
|
|
169
|
+
interface SettledUserQuestion {
|
|
170
|
+
/** The settled call. */
|
|
171
|
+
readonly callId: ToolCallId
|
|
172
|
+
/** The recorded batch, one entry per question; empty when the late reply carried none. */
|
|
173
|
+
readonly answers: readonly AskUserQuestionAnswerItem[]
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```ts type-equiv
|
|
178
|
+
/**
|
|
179
|
+
* Both halves of one Session's timed `ask_user_question` state, as every
|
|
180
|
+
* Client reads them. A call made while the blocking legacy tool was in
|
|
181
|
+
* effect appears in neither half.
|
|
182
|
+
*/
|
|
183
|
+
interface UserQuestionProjectionView {
|
|
184
|
+
/** Calls that can still take an answer, in ask order. */
|
|
185
|
+
readonly active: readonly PendingUserQuestion[]
|
|
186
|
+
/** Calls an answer settled, in settlement order. */
|
|
187
|
+
readonly settled: readonly SettledUserQuestion[]
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
开放中的问题只能通过 waterfall 回答。问题变为 `continued` 后,`answer` Remote 方法向所属 agent 排入一条用户消息,并在其空闲时唤醒它。消息的 source 为 `user-question-reply`,outcome 为 `answered`,正文是 `answer_to_pending_question` 载荷。开放或未知调用返回 `false`;回复仍在排队时的第二次提交以 `REPLY_QUEUED` 拒绝,Host 重启后也一样;遗漏或重复问题的回答批次以 `BAD_ANSWER` 拒绝。
|
|
192
|
+
|
|
193
|
+
收起 Client 面板不会发送内容。前台超时只结束工具等待。已继续的问题没有期限;在回复进入会话前,问题仍可回答。
|
|
194
|
+
|
|
195
|
+
Host 重启后,Session 重开时 Remote 层会恢复根 agent。之后的迟到回复会作为新一轮进入。
|
|
196
|
+
|
|
107
197
|
## 错误
|
|
108
198
|
|
|
109
|
-
`UserQuestionError` 继承 `HarnessError`,因此 `ctx.tools.execute()` 会保留 `{ name, code }`,用于面向模型的工具失败,如 `EMPTY_QUESTIONS`、`NO_PROVIDER`、`ASK_ABORTED` 或 UI 侧取消。
|
|
199
|
+
`UserQuestionError` 继承 `HarnessError`,因此 `ctx.tools.execute()` 会保留 `{ name, code }`,用于面向模型的工具失败,如 `EMPTY_QUESTIONS`、`BAD_INTENT`、`NO_PROVIDER`、`ASK_ABORTED` 或 UI 侧取消。
|
|
110
200
|
|
|
111
201
|
```ts type-equiv
|
|
112
202
|
/** Stable error taxonomy for user-questions failures. */
|
|
@@ -133,6 +223,44 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
133
223
|
`ctx.userQuestions`: validation plus the scoped answerer waterfall.
|
|
134
224
|
|
|
135
225
|
```ts cordis-catalog
|
|
226
|
+
/**
|
|
227
|
+
* Answer a continued question. The reply is steered into the agent as a
|
|
228
|
+
* user message whose source names the call; that message is also the
|
|
229
|
+
* record that closes the question in the projection.
|
|
230
|
+
* @param agent - Live root agent for the owning Session.
|
|
231
|
+
* @param callId - Continued question identity.
|
|
232
|
+
* @param answer - Complete structured answer batch, one item per question of the call.
|
|
233
|
+
* @returns Whether the question is still continued; an accepted reply stays
|
|
234
|
+
* queued until the agent admits its user message.
|
|
235
|
+
* @throws {UserQuestionError} `BAD_ANSWER` when the batch does not name each
|
|
236
|
+
* question of the call exactly once, or `REPLY_QUEUED` when a reply is
|
|
237
|
+
* already waiting for admission.
|
|
238
|
+
*/
|
|
239
|
+
@Remote answer(agent: Agent, callId: ToolCallId, answer: AskUserQuestionAnswer): boolean
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Let one answer UI hold a live timed wait. Closing the stream releases its claim.
|
|
243
|
+
* @param agent - Live root agent owning the question.
|
|
244
|
+
* @param callId - Foreground tool call to attach to.
|
|
245
|
+
* @param signal - Remote stream cancellation, including Client disconnect.
|
|
246
|
+
* @returns One Host-computed remaining duration, or no frames once the wait ended.
|
|
247
|
+
*/
|
|
248
|
+
@Remote({ mode: 'stream' }) async *attachWait(agent: Agent, callId: ToolCallId, signal: AbortSignal): AsyncIterable<{ remainingMs: number }>
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Foreground wait whose first settlement the Client decides: the Client
|
|
252
|
+
* rejects with `ASK_TIMED_OUT` when its countdown ends, and this method maps
|
|
253
|
+
* that code to the pending result.
|
|
254
|
+
* @param request - Questions, live owner agent, and abort signal.
|
|
255
|
+
* @param callId - Tool call identity the Client card is keyed by.
|
|
256
|
+
* @param timeoutMs - Positive foreground wait in milliseconds.
|
|
257
|
+
* @returns The answer when it arrives inside the window, otherwise a pending
|
|
258
|
+
* result, also when no connected Client claimed the request by the deadline.
|
|
259
|
+
* @throws {UserQuestionError} `BAD_TIMEOUT` for a non-integer, non-positive,
|
|
260
|
+
* or oversized wait.
|
|
261
|
+
*/
|
|
262
|
+
async askTimed( request: AskUserQuestionRequest & { agent: Agent }, callId: ToolCallId, timeoutMs: number, ): Promise<TimedUserQuestionResult>
|
|
263
|
+
|
|
136
264
|
/**
|
|
137
265
|
* Ask the scoped answerer waterfall and wait for the user's answer.
|
|
138
266
|
*
|
|
@@ -152,6 +280,8 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
152
280
|
async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>
|
|
153
281
|
```
|
|
154
282
|
|
|
283
|
+
Types: [Agent](./core.md) · [ToolCallId](./core.md)
|
|
284
|
+
|
|
155
285
|
Source: [`packages/interaction/user-questions/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/user-questions/src/index.ts)
|
|
156
286
|
|
|
157
287
|
<a id="user-questions-events"></a>
|