dsh-plugin-dev-kb 1.3.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 +15 -0
- package/README.en.md +4 -4
- package/README.md +5 -5
- package/kb/INDEX.md +18 -18
- package/kb/README.md +6 -4
- 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 +48 -6
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +48 -6
- 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 +18 -19
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +17 -18
- package/kb/extra/development.md +27 -10
- package/kb/extra/development.zh.md +27 -10
- package/kb/extra/event-producer-consumer.md +89 -68
- package/kb/extra/event-producer-consumer.zh.md +90 -69
- package/kb/extra/glossary.md +1 -1
- package/kb/extra/glossary.zh.md +1 -1
- package/kb/extra/i18n/README.md +15 -7
- package/kb/extra/i18n/README.zh.md +15 -7
- package/kb/extra/i18n/terminology.md +4 -4
- package/kb/extra/i18n/translation-prompt.md +2 -2
- package/kb/extra/module-graph.md +574 -326
- package/kb/extra/module-graph.zh.md +574 -326
- 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 +1 -1
- package/kb/extra/rescope.zh.md +1 -1
- package/kb/extra/session-format-status.md +22 -6
- package/kb/extra/session-format-status.zh.md +22 -6
- 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 +4 -4
- package/kb/extra/subsystems/feedback.zh.md +4 -4
- 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 +3 -3
- package/kb/extra/testing.zh.md +3 -3
- 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 -3
- package/kb/extra/web-styling.zh.md +12 -3
- package/kb/meta/search-index.json +976 -256
- package/kb/meta/site-pages.txt +188 -188
- package/kb/meta/source.json +6 -6
- package/kb/meta/topics.md +10 -6
- 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 +9 -2
- 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 +9 -2
- 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 +97 -82
- package/kb/site/en/guide/public-deployments.md +36 -0
- package/kb/site/en/guide/python-sdk.md +42 -21
- 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 +1 -0
- package/kb/site/en/reference/api-gateway.md +13 -11
- package/kb/site/en/reference/capability-seams.md +177 -59
- package/kb/site/en/reference/config-catalog.md +1758 -821
- 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 +4 -3
- package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/en/reference/cookbook/extension-cookbook.md +6 -5
- 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 +18 -11
- package/kb/site/en/reference/persistence-catalog.md +7687 -54
- package/kb/site/en/reference/subsystems/approval.md +2 -1
- package/kb/site/en/reference/subsystems/client-modules.md +23 -15
- package/kb/site/en/reference/subsystems/client-resources.md +3 -1
- 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 +97 -257
- package/kb/site/en/reference/subsystems/credentials.md +169 -5
- package/kb/site/en/reference/subsystems/filesystem.md +11 -0
- package/kb/site/en/reference/subsystems/goal.md +2 -1
- package/kb/site/en/reference/subsystems/index.md +16 -5
- package/kb/site/en/reference/subsystems/jobs.md +337 -127
- package/kb/site/en/reference/subsystems/llm-streaming.md +76 -36
- package/kb/site/en/reference/subsystems/lsp.md +1 -0
- package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/en/reference/subsystems/persistence.md +4 -3
- 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 +8 -6
- package/kb/site/en/reference/subsystems/session-telemetry.md +7 -4
- package/kb/site/en/reference/subsystems/session-title.md +6 -5
- package/kb/site/en/reference/subsystems/session.md +199 -81
- package/kb/site/en/reference/subsystems/settings.md +43 -292
- package/kb/site/en/reference/subsystems/shell.md +37 -28
- package/kb/site/en/reference/subsystems/sidebar-right.md +23 -12
- package/kb/site/en/reference/subsystems/skills.md +5 -6
- package/kb/site/en/reference/subsystems/slots.md +34 -13
- package/kb/site/en/reference/subsystems/spill.md +4 -3
- package/kb/site/en/reference/subsystems/storage.md +2 -2
- package/kb/site/en/reference/subsystems/subagent.md +50 -64
- package/kb/site/en/reference/subsystems/subprocess.md +17 -18
- package/kb/site/en/reference/subsystems/system-prompt.md +4 -1
- package/kb/site/en/reference/subsystems/terminal.md +1 -0
- package/kb/site/en/reference/subsystems/token-meter.md +1 -0
- package/kb/site/en/reference/subsystems/tools.md +40 -12
- 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 +294 -34
- package/kb/site/en/reference/tool-catalog.md +782 -331
- package/kb/site/en/reference/tool-execution-pipeline.md +7 -3
- 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 +42 -21
- package/kb/site/guide/quickstart.md +2 -0
- package/kb/site/guide/schedule.md +70 -11
- package/kb/site/reference/agent-lifecycle.md +1 -0
- package/kb/site/reference/api-gateway.md +13 -11
- package/kb/site/reference/capability-seams.md +177 -59
- package/kb/site/reference/config-catalog.md +1760 -822
- 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 +4 -3
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/reference/cookbook/extension-cookbook.md +6 -5
- 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 +18 -11
- package/kb/site/reference/persistence-catalog.md +7693 -60
- package/kb/site/reference/subsystems/approval.md +2 -1
- package/kb/site/reference/subsystems/client-modules.md +23 -15
- package/kb/site/reference/subsystems/client-resources.md +3 -1
- 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 +97 -257
- package/kb/site/reference/subsystems/credentials.md +169 -5
- package/kb/site/reference/subsystems/filesystem.md +11 -0
- package/kb/site/reference/subsystems/goal.md +2 -1
- package/kb/site/reference/subsystems/index.md +16 -5
- package/kb/site/reference/subsystems/jobs.md +336 -126
- package/kb/site/reference/subsystems/llm-streaming.md +76 -36
- package/kb/site/reference/subsystems/lsp.md +1 -0
- package/kb/site/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/reference/subsystems/persistence.md +4 -3
- 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 +8 -6
- package/kb/site/reference/subsystems/session-telemetry.md +7 -4
- package/kb/site/reference/subsystems/session-title.md +6 -5
- package/kb/site/reference/subsystems/session.md +199 -81
- package/kb/site/reference/subsystems/settings.md +43 -292
- package/kb/site/reference/subsystems/shell.md +37 -28
- package/kb/site/reference/subsystems/sidebar-right.md +23 -12
- package/kb/site/reference/subsystems/skills.md +5 -6
- package/kb/site/reference/subsystems/slots.md +34 -13
- package/kb/site/reference/subsystems/spill.md +3 -2
- package/kb/site/reference/subsystems/storage.md +2 -2
- package/kb/site/reference/subsystems/subagent.md +49 -63
- package/kb/site/reference/subsystems/subprocess.md +17 -18
- package/kb/site/reference/subsystems/system-prompt.md +4 -1
- package/kb/site/reference/subsystems/terminal.md +1 -0
- package/kb/site/reference/subsystems/token-meter.md +1 -0
- package/kb/site/reference/subsystems/tools.md +40 -12
- 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 +294 -34
- package/kb/site/reference/tool-catalog.md +784 -333
- package/kb/site/reference/tool-execution-pipeline.md +7 -3
- package/package.json +2 -2
- package/skills/dsh-plugin-dev-kb.md +5 -4
- 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/typert.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/typert.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -41,7 +42,7 @@ interface TypertLookupDefinition {
|
|
|
41
42
|
|
|
42
43
|
## Invocation descriptors
|
|
43
44
|
|
|
44
|
-
An `InvocationDescriptor` is local reflection, not a wire message. Host and consumer builds generate corresponding descriptors; the request sends only the endpoint and named `args`. Strict codecs carry generated
|
|
45
|
+
An `InvocationDescriptor` is local reflection, not a wire message. Host and consumer builds generate corresponding descriptors; the request sends only the endpoint and named `args`. Strict codecs carry generated schema factories, while SRC codecs enforce JSON-safe inputs without structural type recovery. Unary result codecs can supply `encode()` for byte-containing subtrees and `decode()` for recursive native-byte validation; Client declarations narrow every `Uint8Array` to `ArrayBuffer` backing. Pure JSON results need neither byte detection nor Client decoding. Cancellation is an out-of-band carrier signal injected after business parameters and never enters `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
|
+
The Host alias `RemoteStream<Out, In>` names both directions of one stream, and the receiving method reads its call context as `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 registry
|
|
123
248
|
|
|
124
249
|
`ctx.typert` separates current-environment descriptors, explicitly selected Remote contributions, lookup providers, and scoped Context providers. A lookup provider owns the stable wire declaration and default resolver; Host composition can configure an effect-scoped synchronous or asynchronous resolver for the same key, and unloading that configuration restores the default policy. Registrations are Cordis-owned effects and return awaitable disposers.
|
|
@@ -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.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/user-questions.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -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
|
+
Timed answerers receive `wait: { callId, timed: true }`. The call id identifies the card and the foreground wait. The Client calls `attachWait` to claim the wait and obtain its remaining duration; transport forwards the original event without inspecting or rewriting these fields. A `wait` without `timed` identifies an indefinite card-keyed request. An absent `wait` identifies a blocking request without a card 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
|
+
## Timed questions and late replies
|
|
135
|
+
|
|
136
|
+
A timed question waits for a bounded foreground window and then lets the agent continue independent work. If the user answers inside the window, the tool returns the answer batch; otherwise `TimedUserQuestionResult` is `{ pending: true, callId }`. Pending means the question is still answerable; it is not an empty answer, a refusal, a confirmation, or permission.
|
|
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
|
+
A Client claim is a business Remote stream, not a Gateway delivery. `TimedQuestionWait` holds the original Host deadline and runs its timer only while no claim exists. Its `attachWait` stream yields the current remaining duration, and the Client counts down with its own clock. Focus, editing, and Take time stay local. Stream cancellation releases that claim; after the last claim leaves, the Host resumes the original deadline. An unattended timeout aborts the foreground waterfall's private signal and returns pending without cancelling the Turn. Gateway and `api-remotes` contain no question-specific timing policy.
|
|
144
|
+
|
|
145
|
+
The `userQuestions` Session projection folds existing events into the answerable question set and the settled one; no wait state, focus state, or deadline is logged. Each `request/header` records the exact tool schemas the model saw. Native calls are tracked only when that header declares the timed `ask_user_question` schema with a `timeout` parameter; the blocking legacy tool never declares it. A native `tool/call` opens a question. A `tool/result` marks it `continued` only when it carries the pending payload or is the synthetic `TOOL_OUTCOME_UNKNOWN` result Session resume repair appends; an answer batch moves it into `settled` with that batch, and any failure drops it. A `run_code` PTC sub-call enters the projection when its `tool/ptc-dispatch` result is pending, even though the request header exposes only `run_code`. A late reply moves a continued question into `settled` when its message is admitted as `user/message`, together with the answer batch read out of that message: the timed call's own result recorded the timeout, so a transcript row has nowhere else to read what the user finally chose. A queued reply can be canceled before admission and leaves the question answerable. A reply whose text carries no readable batch settles the call with no answers; one naming a call that is not active changes nothing.
|
|
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
|
+
An open question accepts answers only through the waterfall. Once it is `continued`, the `answer` Remote method queues a user message for the owning agent and wakes it if idle. The message has source `user-question-reply`, outcome `answered`, and an `answer_to_pending_question` payload. The method returns `false` for an open or unknown call, rejects a second queued reply with `REPLY_QUEUED` even after a Host restart, and rejects incomplete or duplicate answer batches with `BAD_ANSWER`.
|
|
192
|
+
|
|
193
|
+
Closing the Client panel sends nothing. A foreground timeout ends only the tool wait. Continued questions have no deadline; they stay answerable until a reply is admitted.
|
|
194
|
+
|
|
195
|
+
After a Host restart, the Remote layer resumes the root agent when the Session reopens. A late reply then enters a new turn.
|
|
196
|
+
|
|
107
197
|
## Errors
|
|
108
198
|
|
|
109
|
-
`UserQuestionError` extends `HarnessError`, so `ctx.tools.execute()` preserves `{ name, code }` for model-facing tool failures such as `EMPTY_QUESTIONS`, `NO_PROVIDER`, `ASK_ABORTED`, or UI-side cancellation.
|
|
199
|
+
`UserQuestionError` extends `HarnessError`, so `ctx.tools.execute()` preserves `{ name, code }` for model-facing tool failures such as `EMPTY_QUESTIONS`, `BAD_INTENT`, `NO_PROVIDER`, `ASK_ABORTED`, or UI-side cancellation.
|
|
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>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/web-client.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/web-client.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -7,6 +8,8 @@ outline: [2,3]
|
|
|
7
8
|
|
|
8
9
|
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.
|
|
9
10
|
|
|
11
|
+
[Keyboard shortcuts](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/shortcuts/README.md) owns window-local command registration and physical-key dispatch; [the shortcut reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/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.
|
|
12
|
+
|
|
10
13
|
## Layers and ownership
|
|
11
14
|
|
|
12
15
|
| Layer | Main owners | Responsibility |
|
|
@@ -14,7 +17,7 @@ The Web Client is a browser-side Cordis application assembled from independently
|
|
|
14
17
|
| Host application | business services and `packages/api/*-controller` Host entries | Own authoritative state, persistence, mutation ordering, access policy, and stream production. |
|
|
15
18
|
| Transport and API assembly | `client/connection`, `api/gateway`, `api/remotes` | Establish a Client generation, expose generated `ctx.remote` methods and streams, forward selected Cordis events, and carry cancellation and results. |
|
|
16
19
|
| Client models | `api/session-controller/client`, `api/workspace-controller/client` | Maintain React-free mirrors of Host state, resolve stream/unary races, own object identities and subscriptions, and expose narrow command services. |
|
|
17
|
-
| UI adapters | `client/ui-session`, `client/ui-workspace` | Convert model observables into root or
|
|
20
|
+
| UI adapters | `client/ui-session`, `client/ui-workspace` | Convert model observables into root or Provider-bound Session Slot sources and own view-level navigation and status policy. |
|
|
18
21
|
| Conversation data | `client/ui-conversation`, target packages such as `ui-chat` and `ui-trajectory` | Assemble standard events and compact historical Assistant runs into independent target snapshots and own the shared conversation shell and input flow. |
|
|
19
22
|
| Composition and rendering | `client/ui-slots`, `client/ui-renderer`, `client/ui-layout`, feature UI packages | Declare extension locations, derive component props, bind observables to React hooks, and mount the final tree. |
|
|
20
23
|
|
|
@@ -30,7 +33,7 @@ The Web boot kernel creates the module system, prefetches `immediately` entries,
|
|
|
30
33
|
|
|
31
34
|
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.
|
|
32
35
|
|
|
33
|
-
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](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/connection/README.md) defines the physical carrier and trust policy.
|
|
36
|
+
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](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/connection/README.md) defines the physical carrier and trust policy.
|
|
34
37
|
|
|
35
38
|
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.
|
|
36
39
|
|
|
@@ -40,23 +43,25 @@ Each API controller package owns a paired Host and Client face. The Host side ow
|
|
|
40
43
|
|
|
41
44
|
### Sessions
|
|
42
45
|
|
|
43
|
-
[`api/session-controller`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/README.md) exposes Host commands for list, search, creation,
|
|
46
|
+
[`api/session-controller`](https://github.com/deepseek-ai/deepseek-harness/blob/master/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`:
|
|
44
47
|
|
|
45
|
-
- `ClientSessions` provides `ctx.sessions`, owns Session scopes and stable `SessionBinding` objects, and projects
|
|
46
|
-
- `SessionManager` owns the list baseline, live list/control updates, lazy Session instances,
|
|
48
|
+
- `ClientSessions` provides `ctx.sessions`, owns references, source counts, Session scopes, and stable `SessionBinding` objects, and projects catalog state without selecting a global current Session.
|
|
49
|
+
- `SessionManager` owns the list baseline, live list/control updates, lazy Session instances, projection stores, subagent catalogs, and conflict ordering between pulls and later updates.
|
|
47
50
|
- Each `Session` owns one contiguous logical-event window represented by `SessionEventLikeEntry` values, paging, follow, prompt/control state, and the observable snapshot consumed by adapters.
|
|
48
51
|
|
|
49
|
-
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
|
|
52
|
+
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.
|
|
50
53
|
|
|
51
54
|
### Workspaces
|
|
52
55
|
|
|
53
|
-
[`api/workspace-controller`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/workspace-controller/README.md) keeps Workspace mutation policy and the authoritative follow feed on the Host. `ClientWorkspaceModel` owns
|
|
56
|
+
[`api/workspace-controller`](https://github.com/deepseek-ai/deepseek-harness/blob/master/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.
|
|
54
57
|
|
|
55
58
|
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.
|
|
56
59
|
|
|
57
60
|
## Conversation and presentation
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
Web and desktop share the [Coding Tools preference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/ui-settings/README.md#use-this-package). It controls diagnostic Views, [available preset choices](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/ui-agent-preset/README.md), changed-file cards, and the builtin HTML preview policy without changing Session records.
|
|
63
|
+
|
|
64
|
+
`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.
|
|
60
65
|
|
|
61
66
|
`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.
|
|
62
67
|
|
|
@@ -67,7 +72,8 @@ This pairing is not a second source of business truth. Host controllers decide d
|
|
|
67
72
|
| Path | Sequence |
|
|
68
73
|
|---|---|
|
|
69
74
|
| 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 |
|
|
70
|
-
| transient Session control | Host control baseline → Remote snapshot stream → `SessionManager`
|
|
75
|
+
| transient Session control | Host control baseline → Remote snapshot stream → `SessionManager` projection stores → Session and list snapshots → standard hooks → components |
|
|
76
|
+
| Background jobs | Host job registry → `job.list` / `job.follow` → [`ClientJobs`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/job-controller/README.md) roster and output views → job list and panels |
|
|
71
77
|
| Workspace state | Host Workspace baseline and increments → `ClientWorkspaceModel` → `ctx.workspaces.list` → `useWorkspaces` → sidebar, hero, and navigation entries |
|
|
72
78
|
| scoped interaction | Host Cordis waterfall → API Remotes `$events` → `ctx.remote.$on()` on the Session Context → owning UI package → result or `next()` |
|
|
73
79
|
| 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 |
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/web-server.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/web-server.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# HTTP Server
|
|
7
8
|
|
|
8
|
-
[dsh-host-webserver](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/host/webserver) is the browser HTTP carrier for the GUI host: a single `node:http` plugin providing `ctx.webServer`, a named-route registry, optional gzip response compression, index.html transform callbacks, and one fallback handler that a plugin may claim. It is not part of the agent loop and not a capability seam; it knows no harness concepts, and another plugin registers every feature route, including the `/api` bridge, plugin bundles, and the HMR event stream ([layering
|
|
9
|
+
[dsh-host-webserver](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/host/webserver) is the browser HTTP carrier for the GUI host: a single `node:http` plugin providing `ctx.webServer`, a named-route registry, optional gzip response compression, index.html transform callbacks, and one fallback handler that a plugin may claim. It is not part of the agent loop and not a capability seam; it knows no harness concepts, and another plugin registers every feature route, including the `/api` bridge, plugin bundles, and the HMR event stream ([layering reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/boot/app-boot/README.md)). It serves browsers only: Electron loads the built files over `file://` and sends fetch requests through an IPC bridge instead of this server.
|
|
9
10
|
|
|
10
11
|
Source: [`packages/host/webserver/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/host/webserver/src/index.ts)
|
|
11
12
|
|
|
@@ -63,6 +64,54 @@ A request whose handling throws (a malformed %-escape hitting `decodeURIComponen
|
|
|
63
64
|
|
|
64
65
|
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).
|
|
65
66
|
|
|
67
|
+
<a id="ctxconnection--hostconnectionhandle"></a>
|
|
68
|
+
|
|
69
|
+
### `ctx.connection` — `HostConnectionHandle`
|
|
70
|
+
|
|
71
|
+
Host `ctx.connection` members consumed by transport-independent adapters.
|
|
72
|
+
|
|
73
|
+
```ts cordis-catalog
|
|
74
|
+
/**
|
|
75
|
+
* Compose exact Fetch routes and the shared-channel RPC interceptor.
|
|
76
|
+
* @param channel - shared channel mounted by Connection.
|
|
77
|
+
* @returns Fetch handler for trusted, authenticated requests.
|
|
78
|
+
*/
|
|
79
|
+
createSharedFetchHandler(channel: '/api'): ConnectionFetchHandler
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Apply Connection's Host/Origin checks and browser authentication to
|
|
83
|
+
* another Web route.
|
|
84
|
+
* @param request - request headers from the HTTP or upgrade request.
|
|
85
|
+
* @returns rejection status, or undefined when the route may accept the request.
|
|
86
|
+
*/
|
|
87
|
+
requestRejection(request: ConnectionTrustRequest): ConnectionRequestRejection
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Admit one request: it passes {@link requestRejection} and speaks for the
|
|
91
|
+
* operator, or it is refused with that status.
|
|
92
|
+
* @param request - request headers from the HTTP or upgrade request.
|
|
93
|
+
* @returns the operator Peer, or the rejection status.
|
|
94
|
+
*/
|
|
95
|
+
admit(request: ConnectionTrustRequest): PeerAdmission
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Authenticate one frontend index request, owning a token redirect or 401.
|
|
99
|
+
* @param request - root or configured-index HTTP request.
|
|
100
|
+
* @param response - response owned when the result is false.
|
|
101
|
+
* @returns true only when the frontend may serve index.html.
|
|
102
|
+
*/
|
|
103
|
+
authorizeIndex(request: ConnectionIndexRequest, response: ConnectionIndexResponse): boolean
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Add the fresh process token to an ordinary Web application URL.
|
|
107
|
+
* @param baseUrl - clean application URL whose authority and mount are preserved.
|
|
108
|
+
* @returns tokenized URL for initial login; a mount proxy strips its prefix before {@link authorizeIndex}.
|
|
109
|
+
*/
|
|
110
|
+
authenticatedUrl(baseUrl: string): string
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Source: [`packages/client/connection/src/rpc.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/connection/src/rpc.ts)
|
|
114
|
+
|
|
66
115
|
<a id="ctxwebserver--webserver"></a>
|
|
67
116
|
|
|
68
117
|
### `ctx.webServer` — `WebServer`
|
|
@@ -132,6 +181,30 @@ renderIndex(html: string): string
|
|
|
132
181
|
|
|
133
182
|
Source: [`packages/host/webserver/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/host/webserver/src/index.ts)
|
|
134
183
|
|
|
184
|
+
<a id="connection-events"></a>
|
|
185
|
+
|
|
186
|
+
### `connection/*` events
|
|
187
|
+
|
|
188
|
+
<a id="connectionrequest--waterfall"></a>
|
|
189
|
+
|
|
190
|
+
#### `connection/request` — waterfall
|
|
191
|
+
|
|
192
|
+
Admit or wrap an authenticated shared API request, including body transfer. Existing requests continue when a listener refuses subsequent requests.
|
|
193
|
+
|
|
194
|
+
```ts cordis-catalog
|
|
195
|
+
/**
|
|
196
|
+
* Admit or wrap an authenticated shared API request, including body transfer.
|
|
197
|
+
* Existing requests continue when a listener refuses subsequent requests.
|
|
198
|
+
* @param request - Authenticated incoming HTTP request.
|
|
199
|
+
* @param response - Response owned until the delegated bridge settles.
|
|
200
|
+
* @param next - Delegate to the next listener or the shared API bridge.
|
|
201
|
+
* @mode waterfall
|
|
202
|
+
*/
|
|
203
|
+
'connection/request'(request: IncomingMessage, response: ServerResponse, next: () => Promise<void>): Promise<void>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Source: [`packages/client/connection/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/connection/src/index.ts)
|
|
207
|
+
|
|
135
208
|
<a id="webserver-events"></a>
|
|
136
209
|
|
|
137
210
|
### `webserver/*` events
|