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/subagent.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/subagent.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -7,11 +8,11 @@ outline: [2,3]
|
|
|
7
8
|
|
|
8
9
|
The subagent seam lets an agent delegate work to a child agent. Like [bash](./shell.md), it is **one optional capability**, not part of the agent loop, so its types live here rather than in [core.md](./core.md). It differs from the other capability seams because **multiple provider implementations coexist** in one context, registered by name (`ctx.subagents`), while bash allows only one executor. Its registry follows the [LLM adapter registry](./llm-streaming.md), not the single-service bash executor.
|
|
9
10
|
|
|
10
|
-
Service Definition: [dsh-subagent](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent) (`ctx.subagents` + the vocabulary below). Service Providers are sibling packages (`dsh-subagent-spawn-in-process`, `dsh-subagent-fork-in-process`, `dsh-subagent-acp`, `dsh-subagent-codex`, `dsh-subagent-claude-code`, `dsh-subagent-dsh-sdk`); the model-facing Consumers are [dsh-tool-subagent](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/tool-subagent) (per-provider delegation) and [dsh-tool-subagent-control](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/tool-subagent-control) (the optional global `send_message`, `interrupt_agent`, and `list_agents` controls). The same `ctx.subagents` service owns continuable-child orchestration through an internal activation manager
|
|
11
|
+
Service Definition: [dsh-subagent](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent) (`ctx.subagents` + the vocabulary below). Service Providers are sibling packages (`dsh-subagent-spawn-in-process`, `dsh-subagent-fork-in-process`, `dsh-subagent-acp`, `dsh-subagent-codex`, `dsh-subagent-claude-code`, `dsh-subagent-dsh-sdk`); the model-facing Consumers are [dsh-tool-subagent](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/tool-subagent) (per-provider delegation) and [dsh-tool-subagent-control](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/tool-subagent-control) (the optional global `send_message`, `interrupt_agent`, and `list_agents` controls). The same `ctx.subagents` service owns continuable-child orchestration through an internal activation manager, direct-child discovery through the parent catalog, and recursive descendant discovery through parent catalogs. Product-provider rationale lives in [the historical Codex and Claude Code Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/archived/feature/2026-08-04-claude-code-and-codex-subagent-backends.md); common-seam rationale lives in [the historical subagent Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/archived/feature/2026-06-21-subagent-capability-seam.md), [the continuable subagents Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/feature/2026-07-28-continuable-subagent-conversations.md), and [the adjacent-Agent messaging Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-08-27-adjacent-agent-steer-messaging.md); [the archived list-identity-projection record](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/archived/architecture/2026-08-06-subagent-list-identity-projection.md) documents the original list-identity decision.
|
|
11
12
|
|
|
12
13
|
Sources: [`packages/subagent/subagent/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/src/types.ts), [`packages/subagent/subagent/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/src/index.ts), and [`packages/subagent/subagent/src/continuation.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/src/continuation.ts)
|
|
13
14
|
|
|
14
|
-
The `subagentCatalog` projection exposes `SubagentCatalogEntry[]` in parent event order through Session observations and client snapshots. Each entry contains the child id, creation time, mode, and mode-dependent label; fork-inherited catalog facts are excluded. [The subagent package](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/README.md) owns catalog creation and persistence semantics.
|
|
15
|
+
The `subagentCatalog` projection exposes `SubagentCatalogEntry[]` in parent event order through Session observations and client snapshots. Each entry contains the child id, creation time, mode, and mode-dependent label; fork-inherited catalog facts are excluded. [The subagent package](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/README.md) owns catalog creation and persistence semantics. Historical children with unavailable descriptors have `mode: 'unknown'`; their header identity remains discoverable without granting continuation capabilities.
|
|
15
16
|
|
|
16
17
|
## Two kinds of capability, discovered two ways
|
|
17
18
|
|
|
@@ -150,11 +151,11 @@ persisted Session
|
|
|
150
151
|
|
|
151
152
|
The Agent inbox is the only queue. Every Agent message uses `Agent.steer()`: an idle target starts a turn, while a running target claims it at the nearest step boundary. The browser `subagent.prompt` Remote separately carries `delivery: 'queue' | 'steer'` through the same internal admission path; Queue opens a later FIFO turn, while Steer retains the Agent loop's best-effort nearest-step behavior and the message's human source. Successful delivery returns the accepted `MessageId`; the existing `agent/inbox/inserted`, `agent/inbox/claimed`, and `agent/inbox/discarded` events remain the message-lifecycle observations, and the continuation layer defines no second queue.
|
|
152
153
|
|
|
153
|
-
Authority comes from the exact live sender. Parent-to-child delivery requires the target's `SessionHeader.parentSession` to name the sender; child-to-parent delivery requires the sender's resident Activation to name the target. Siblings, ancestors beyond one edge, self-targets, stale Agent objects, and one-shot children are rejected. Each accepted message is framed as `Agent <sender-id> sent a message:` and records `AgentMessageSource`;
|
|
154
|
+
Authority comes from the exact live sender. Parent-to-child delivery requires the target's `SessionHeader.parentSession` to name the sender; child-to-parent delivery requires the sender's resident Activation to name the target. Siblings, ancestors beyond one edge, self-targets, stale Agent objects, and one-shot children are rejected. Each accepted message is framed as `Agent <sender-id> sent a message:` and records `AgentMessageSource`; the source records the sender but grants no authority.
|
|
154
155
|
|
|
155
156
|
For `startContinuable()`, `sendMessage()`, and browser prompt delivery, the caller signal owns lookup, materialization, and admission only until inbox acceptance. Afterwards the manager owns the Activation independently: later caller cancellation neither cancels the accepted turn nor disposes the child. The public subagent service exposes no caller-selected Agent-message scheduling; browser human Queue and Steer remain internal adapter choices.
|
|
156
157
|
|
|
157
|
-
Live queue occurrence mutation remains in the Session domain. `session.updateQueue` admits ordinary Edit, Remove, and QueueDock Steer for a live subagent-owned Agent only when its current projected identity is continuable and its descriptor sequence is in that child's own non-seed suffix. The identity projection folds descriptors last-wins so a child descriptor supersedes descriptors retained from fork lineage; the own-suffix sequence check prevents a seed-only ancestor identity from authorizing mutation. One-shot, missing, unknown, corrupt, or cold children remain rejected, and queue mutation never cold-resumes a child. The target Session id is the human authority for these mutations, including pending `nextStep` steering or injected context. Steer requires a queued `MessageId` and an Agent that reports running when the command begins; cancellation after admission uses the Agent's accepted waking `nextTurn` fallback. Edit rewrites content under the same `MessageId`, and both Edit and Steer complete their Inbox work synchronously, so settlement observes only the final state. `agent/inbox/claimed` and `agent/inbox/discarded` wake the watcher to re-read whether any pending occurrence remains; this lets direct Agent delivery resume parked work and lets removing the last parked occurrence settle an idle child. The [human inbox-control
|
|
158
|
+
Live queue occurrence mutation remains in the Session domain. `session.updateQueue` admits ordinary Edit, Remove, and QueueDock Steer for a live subagent-owned Agent only when its current projected identity is continuable and its descriptor sequence is in that child's own non-seed suffix. The identity projection folds descriptors last-wins so a child descriptor supersedes descriptors retained from fork lineage; the own-suffix sequence check prevents a seed-only ancestor identity from authorizing mutation. One-shot, missing, unknown, corrupt, or cold children remain rejected, and queue mutation never cold-resumes a child. The target Session id is the human authority for these mutations, including pending `nextStep` steering or injected context. Steer requires a queued `MessageId` and an Agent that reports running when the command begins; cancellation after admission uses the Agent's accepted waking `nextTurn` fallback. Edit rewrites content under the same `MessageId`, and both Edit and Steer complete their Inbox work synchronously, so settlement observes only the final state. `agent/inbox/claimed` and `agent/inbox/discarded` wake the watcher to re-read whether any pending occurrence remains; this lets direct Agent delivery resume parked work and lets removing the last parked occurrence settle an idle child. The [human inbox-control reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/README.md) owns these semantics.
|
|
158
159
|
|
|
159
160
|
`SubagentRuntime.interrupt(targetSessionId, authority)` is the one public stop: it authorizes synchronously, issues `Agent.cancel(cause, { keepInbox: true })` on the live target, and returns without awaiting quiescence. The Activation, its unclaimed pending inbox work, and published descendants are untouched; work already claimed into the interrupted turn is not requeued. Once the interrupted driver is idle, a waking send resumes the parked FIFO queue. An absent target — unknown, one-shot, or already settled — and a manager-less composition are accepted no-ops. For a live target, a mismatched parent address or caller outside its live ancestry rejects with `UNAUTHORIZED`; stale ancestor objects and self-targeting ancestor requests reject before target lookup.
|
|
160
161
|
|
|
@@ -202,7 +203,7 @@ interface ContinuableStart {
|
|
|
202
203
|
}
|
|
203
204
|
```
|
|
204
205
|
|
|
205
|
-
When a resident Activation settles, the manager delivers one notice to the child's durable direct parent describing how that epoch ended and carrying its final assistant
|
|
206
|
+
When a resident Activation settles, the manager delivers one notice to the child's durable direct parent describing how that epoch ended and carrying the nonempty text blocks from its final assistant output, or `It left no closing message.` when none remain. That delivery is unconditional for every child whose id a caller received, happens before the ownership release that would let the parent be judged settled, and reaches a resident parent through the same waking Agent delivery as an Agent message. A parent whose own lineage is already tearing down receives it without a wake, because waking an idle Agent starts a turn rather than queueing work. Its source has a distinct kind so a transcript never presents a runtime account as something the child wrote.
|
|
206
207
|
|
|
207
208
|
```ts type-equiv
|
|
208
209
|
/**
|
|
@@ -265,22 +266,20 @@ interface ContinuableCreateSpec {
|
|
|
265
266
|
|
|
266
267
|
The descriptor (`SubagentDescriptorData` in [descriptor.ts](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/src/descriptor.ts)) is a mode-discriminated durable identity for every session-backed subagent. Both modes carry the provider name. A `one-shot` descriptor optionally carries a caller-owned display `label`; a `continuable` descriptor requires the delegation `description` as its durable creation label and additionally snapshots resolved child `agentOptions.provider`/`model`/`reasoningEffort` and optional `persona`/`toolFilter` for cold resume. It never snapshots the merge-extensible `AgentOptions` object, so an unrelated extension value cannot break continuation and a later composition input is a deliberate version change. It omits `subagentDepth` (cold resume trusts the persisted header's `delegationDepth` as the monotone floor) and `outputSchema` (one run or Activation's result contract, not durable identity).
|
|
267
268
|
|
|
268
|
-
A local one-shot provider appends the descriptor inside the child's initial turn before its first request. The continuation manager appends the descriptor after any provider-supplied lineage and before the initial prompt is admitted; `Session.inheritedEventCount` remains the fork-lineage boundary: resume-time descriptor authority reads the child's own suffix, while the
|
|
269
|
+
A local one-shot provider appends the descriptor inside the child's initial turn before its first request. The continuation manager appends the descriptor after any provider-supplied lineage and before the initial prompt is admitted; `Session.inheritedEventCount` remains the fork-lineage boundary: resume-time descriptor authority reads the child's own suffix, while the identity projection folds `subagent/descriptor` last-wins so the child's own descriptor overrides a fork-seeded ancestor's. The event is log-only: no `surfaceOp`, never in model history, and retained across compaction by the append-only log. Malformed current-version descriptors are corrupt; unsupported versions cannot be classified by this runtime.
|
|
269
270
|
|
|
270
271
|
## Durable enumeration: `listChildren()`, `listDescendants()`, and their entries
|
|
271
272
|
|
|
272
|
-
|
|
273
|
+
The model-facing `list_agents` adapter reports current activity as `running` or `inactive`. These values do not describe task completion or guarantee that `send_message` will succeed.
|
|
273
274
|
|
|
274
|
-
`SubagentRuntime.
|
|
275
|
+
`SubagentRuntime.listChildren(parentSessionId, signal?)` reads the parent's `subagentCatalog` view through a live-preferred Session observation and releases that observation on success or failure. It returns direct-child entries in parent event order without reading child logs or enumerating the Session corpus. Query failures propagate; a missing catalog projection fails explicitly. Browser rows derive membership from the shared projection store and add activity from Session status; the control stream pushes complete catalog updates. `listDescendants()` recursively reads those catalogs and derives `hasChildren` from each child catalog. [The parent-catalog Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.md) owns creation, fork isolation, ordering, and persistence costs.
|
|
276
|
+
|
|
277
|
+
`SubagentRuntime.listDescendants(rootSessionId)` recursively calls the same catalog reader in stable pre-order, preserving each parent's event order. One-shot and unknown-mode entries remain traversal nodes; unknown modes produce `unsupported` diagnostics. An unreadable child catalog produces `corrupt` or `unavailable` and stops only that branch. Root read failures, missing services or projections, and cancellation reject the listing. Each reachable catalog is observed once and released before the next read; repeated ids and cycles are skipped. Sessions absent from reachable catalogs are not discovered, including ordinary Session forks and any subagents below those forks. Each row carries its catalog parent and root-relative depth:
|
|
275
278
|
|
|
276
279
|
```ts type-equiv
|
|
277
|
-
/**
|
|
278
|
-
* One entry of a descendant listing: the interpreted subagent facts plus its
|
|
279
|
-
* position in the complete session tree. `parentId` is the durable direct
|
|
280
|
-
* parent from the enumerated header, and `depth` counts edges from the root.
|
|
281
|
-
*/
|
|
280
|
+
/** One catalog descendant with its direct parent and edge distance from the requested root. */
|
|
282
281
|
type SubagentDescendantListEntry = SubagentListEntry & {
|
|
283
|
-
/**
|
|
282
|
+
/** Parent whose catalog contains this child. */
|
|
284
283
|
readonly parentId: SessionId
|
|
285
284
|
/** Edge distance from the requested root; direct children are `1`. */
|
|
286
285
|
readonly depth: number
|
|
@@ -303,7 +302,7 @@ interface SubagentResult {
|
|
|
303
302
|
* are skipped. Without a non-empty message, the output is its accumulated
|
|
304
303
|
* assistant text stream, or `[]` when the child produced neither.
|
|
305
304
|
*/
|
|
306
|
-
readonly output: ContentBlock[]
|
|
305
|
+
readonly output: readonly ContentBlock[]
|
|
307
306
|
/**
|
|
308
307
|
* The structured result after a requested `outputSchema` was successfully
|
|
309
308
|
* satisfied. Requesting a schema does not guarantee presence: a provider can
|
|
@@ -457,12 +456,16 @@ interface SubagentProvider {
|
|
|
457
456
|
|
|
458
457
|
Provider `start()` fulfills with a published run. The service mints a unique `runId`, snapshots `local` from the provider's exact `localAgent`, observes the result, emits `subagent/start`, and returns the same run; a `start()` rejection implies cleanup of unpublished resources and emits no lifecycle pair, while a post-publication result rejection closes the emitted pair. Each continuable Activation emits the same observe-only pair for its residency epoch, so a cold resume is a new epoch with its own `runId`. The paired `subagent/end` carries the same identity and the final output or infrastructure failure. Both events are observe-only and contain listener exceptions. Their `provider` field names the provider that started the run or Activation epoch; it does not claim that the provider remains registered when the edge is emitted.
|
|
459
458
|
|
|
460
|
-
## In-process backends: depth and seed
|
|
459
|
+
## In-process backends: permission, depth, and seed
|
|
461
460
|
|
|
462
|
-
The spawn and fork backends create an ordinary one-shot agent through `parent.ctx`, pass cancellation into core creation, and dispose through `AgentHandle`; a continuable child is instead created by the continuation manager through its own activation-owner scope. Provider removal blocks new starts without revoking accepted runs. Each child gets a new flat scope rather than inheriting parent registrations.
|
|
461
|
+
The spawn and fork backends create an ordinary one-shot agent through `parent.ctx`, pass cancellation into core creation, and dispose through `AgentHandle`; a continuable child is instead created by the continuation manager through its own activation-owner scope. Provider removal blocks new starts without revoking accepted runs. Each child gets a new flat scope rather than inheriting parent registrations. Permission, depth, and fork seeding reuse existing Session vocabulary:
|
|
462
|
+
|
|
463
|
+
- **Delegated permission** is captured before the first await. Auto and Full access parents append their captured `permission/preset` identity to the fresh child after fork seeding and sandbox/approval overrides. One-shot and continuable children share this path; cold resume reads only the child log. Read Only and Workspace Write retain the inherited sandbox override plus `approval: never`, so unmatched bundles remain `custom`. Each Auto child call is reviewed independently using existing `parentSession`, creation prompt, and authenticated human/direct-parent messages. The [Auto review decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/feature/2026-08-28-auto-review.md) defines low/medium/high semantics; no delegation records, receipt, Header field, descriptor field, or Session format is added.
|
|
463
464
|
|
|
464
465
|
- **Delegation depth** is durable `SessionHeader.delegationDepth` plus the merge-extensible runtime field `AgentOptions.subagentDepth`; absence means top-level depth zero, and the greater present value is authoritative. The seam owns both fields — the loop neither sets nor reads them — so an in-process child persists parent depth + 1, cold resume cannot lower it, and every start rejects a derived depth outside the safe-integer domain or above a defined absolute `request.maxDepth` cap.
|
|
465
|
-
- **Fork seeding** uses [`CreateAgentOptions.seed`](./core.md#creation-and-ownership) (a `SessionEvent[]` prefix threaded through `AgentLoop.createAgent` → `ctx.sessions.prepare({ seed })`, the same primitive `ctx.agents.resume()` uses). The fork backend passes a *balanced completed-turn prefix* of the parent's log — the parent's events up to and including its last `turn/end` — so the seed is contiguous-from-0 and
|
|
466
|
+
- **Fork seeding** uses [`CreateAgentOptions.seed`](./core.md#creation-and-ownership) (a `SessionEvent[]` prefix threaded through `AgentLoop.createAgent` → `ctx.sessions.prepare({ seed })`, the same primitive `ctx.agents.resume()` uses). The fork backend passes a *balanced completed-turn prefix* of the parent's log — the parent's events up to and including its last `turn/end` — so the seed is contiguous-from-0 and contains only balanced turns (the in-flight, unbalanced turn is excluded).
|
|
467
|
+
|
|
468
|
+
`SubagentCatalogEntry` describes a direct child with complete or unknown-mode discovery information; `SubagentCatalogState` is the host-only projection state. `listChildren()` owns a live-preferred parent observation without opening child logs. Browser consumers read `subagentCatalog` through the shared Session projection store and combine membership with Session-list activity. `SubagentCatalogRow` belongs to recursive catalog listing. [The parent-catalog decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-01-parent-owned-subagent-catalog.md) owns the persistent facts and read semantics.
|
|
466
469
|
|
|
467
470
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
468
471
|
|
|
@@ -495,6 +498,13 @@ Source: [`packages/subagent/tool-subagent/src/model-selection-settings.ts`](http
|
|
|
495
498
|
Named provider registry with one-shot runs, durable discovery, and continuable-child operations.
|
|
496
499
|
|
|
497
500
|
```ts cordis-catalog
|
|
501
|
+
/**
|
|
502
|
+
* Resolve a delegation tool's depth policy against the current user setting.
|
|
503
|
+
* @param configured - Explicit tool limit, or provider-managed for external delegation.
|
|
504
|
+
* @returns The numeric limit, or undefined when the provider owns depth enforcement.
|
|
505
|
+
*/
|
|
506
|
+
resolveMaxDepth(configured?: number | 'provider-managed'): number | undefined
|
|
507
|
+
|
|
498
508
|
/**
|
|
499
509
|
* Establish one durable continuable child and deliver its initial prompt.
|
|
500
510
|
* Resolves when the child's inbox accepts that prompt, without waiting for the
|
|
@@ -564,56 +574,33 @@ async drainContinuableDescendants(parents: readonly Agent[]): Promise<void>
|
|
|
564
574
|
async drainContinuableChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>
|
|
565
575
|
|
|
566
576
|
/**
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
* around each await. Read rejections that settle
|
|
575
|
-
* after an abort become a stable `SubagentError` with code `CANCELLED`.
|
|
576
|
-
* @param parentSessionId - parent session whose direct children are listed.
|
|
577
|
-
* @param signal - caller-owned cancellation forwarded to Session queries
|
|
578
|
-
* and observed around every read await.
|
|
579
|
-
* @returns children and per-child diagnostics ordered by `createdAt`, then id.
|
|
580
|
-
* @throws {@link SubagentError} when the projection registry or the session
|
|
581
|
-
* store is not mounted, or the caller cancels the listing.
|
|
577
|
+
* Read the parent's durable direct-child catalog without loading or resuming an Agent.
|
|
578
|
+
* The service owns and releases the live-preferred Session observation.
|
|
579
|
+
* @param parentSessionId - parent whose direct children are requested.
|
|
580
|
+
* @param signal - cancellation forwarded to the Session query.
|
|
581
|
+
* @returns catalog children in parent event order.
|
|
582
|
+
* @throws {@link SubagentError} when query or catalog projection is unavailable.
|
|
583
|
+
* @throws SessionQueryError when the parent cannot be read or the query is cancelled.
|
|
582
584
|
*/
|
|
583
|
-
listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<
|
|
585
|
+
listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<SubagentCatalogEntry[]>
|
|
584
586
|
|
|
585
587
|
/**
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
* @param
|
|
595
|
-
*
|
|
596
|
-
* @returns children and
|
|
597
|
-
*
|
|
598
|
-
* @throws
|
|
588
|
+
* Recursively list reachable parent catalogs in stable pre-order, preserving
|
|
589
|
+
* each catalog's event order. Each row carries its catalog parent and depth;
|
|
590
|
+
* one-shot and unknown-mode children remain traversal nodes. Unknown modes
|
|
591
|
+
* produce unsupported diagnostics. Unreadable child catalogs produce corrupt
|
|
592
|
+
* or unavailable diagnostics and stop only that branch. Root read failures,
|
|
593
|
+
* missing services or projections, and cancellation reject the whole listing.
|
|
594
|
+
* Each catalog is observed once and released before the next read. No Agent
|
|
595
|
+
* is loaded or resumed; Sessions absent from reachable catalogs are omitted.
|
|
596
|
+
* @param rootSessionId - session whose catalog starts descendant discovery.
|
|
597
|
+
* @param signal - cancellation forwarded to and checked around each catalog read.
|
|
598
|
+
* @returns children and branch diagnostics in parent-catalog pre-order.
|
|
599
|
+
* @throws {@link SubagentError} when listing dependencies are unavailable or the caller cancels.
|
|
600
|
+
* @throws SessionQueryError when the root catalog cannot be read.
|
|
599
601
|
*/
|
|
600
602
|
listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<SubagentDescendantListEntry[]>
|
|
601
603
|
|
|
602
|
-
/**
|
|
603
|
-
* Remote face of {@link listChildren} for one browser: the durable listing
|
|
604
|
-
* plus live Agent activity and the delivery-time parent availability hint.
|
|
605
|
-
* Parent availability is a hint; {@link prompt} performs the authoritative
|
|
606
|
-
* check. Named apart from the provider-name {@link list}, which owns the
|
|
607
|
-
* member.
|
|
608
|
-
* @param parentSessionId - parent session whose direct children are listed.
|
|
609
|
-
* @param signal - carrier cancellation forwarded to Session queries.
|
|
610
|
-
* @returns the catalog view for that parent.
|
|
611
|
-
* @throws {RemoteError} `gateway/bad-request` for an empty parent id,
|
|
612
|
-
* `gateway/cancelled` for an aborted read, `subagent/projections-unavailable` when
|
|
613
|
-
* the deployment has no projection registry, otherwise `gateway/internal`.
|
|
614
|
-
*/
|
|
615
|
-
@Remote('list') async remoteExportList(parentSessionId: SessionId, signal: AbortSignal): Promise<SubagentCatalog>
|
|
616
|
-
|
|
617
604
|
/**
|
|
618
605
|
* Deliver one browser-authored message to a continuable child through the
|
|
619
606
|
* exact live direct parent, retaining the caller-minted request identity and
|
|
@@ -623,6 +610,7 @@ listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<Subagen
|
|
|
623
610
|
* nearest step and retains the Agent loop's best-effort fallback semantics.
|
|
624
611
|
* Image parts are admitted and persisted through the attachment store
|
|
625
612
|
* before delivery, and the child's model must accept image input.
|
|
613
|
+
* Cold resume at capacity rejects with `subagent/delivery-unavailable`.
|
|
626
614
|
* @param request - durable address, delivery, minted identity, content, and optional browser zone.
|
|
627
615
|
* @param signal - carrier cancellation, owning the call until inbox acceptance.
|
|
628
616
|
* @returns the accepted message's inbox identity.
|
|
@@ -706,7 +694,6 @@ A published child settled. Scope-filtered dispatch uses the same delegating pare
|
|
|
706
694
|
* parent carrier as `subagent/start`, so the lifecycle pair reaches the
|
|
707
695
|
* same scoped audience.
|
|
708
696
|
* @param info - the run identity and terminal outcome.
|
|
709
|
-
* @dshScopeScan unsupported
|
|
710
697
|
* @mode emit
|
|
711
698
|
*/
|
|
712
699
|
'subagent/end'(this: Scoped<SubagentRuntime>, info: SubagentRunEndInfo): void
|
|
@@ -764,7 +751,6 @@ A provider established a published child. For in-process providers, `ctx.agents.
|
|
|
764
751
|
* parent-scoped listener observes only its own delegations. Paired with
|
|
765
752
|
* `subagent/end`.
|
|
766
753
|
* @param info - the provider and published child identity.
|
|
767
|
-
* @dshScopeScan unsupported
|
|
768
754
|
* @mode emit
|
|
769
755
|
*/
|
|
770
756
|
'subagent/start'(this: Scoped<SubagentRuntime>, info: SubagentRunInfo): void
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/subprocess.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/subprocess.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -86,6 +87,8 @@ interface SubprocessStdio {
|
|
|
86
87
|
stdin: SubprocessStdinMode
|
|
87
88
|
stdout: SubprocessOutputMode
|
|
88
89
|
stderr: SubprocessOutputMode
|
|
90
|
+
/** Request a separate byte-mode duplex channel; omission creates none. */
|
|
91
|
+
control?: 'pipe'
|
|
89
92
|
}
|
|
90
93
|
```
|
|
91
94
|
|
|
@@ -153,6 +156,8 @@ interface SubprocessHandle {
|
|
|
153
156
|
readonly stdout: Readable | undefined
|
|
154
157
|
/** The child's raw stderr, present iff spawned with `stderr: 'pipe'`. */
|
|
155
158
|
readonly stderr: Readable | undefined
|
|
159
|
+
/** Separate caller-owned byte channel when requested; native startup failure may leave it absent. */
|
|
160
|
+
readonly control: Duplex | undefined
|
|
156
161
|
/** Offset-based readers for collect-mode streams (also readable after exit). */
|
|
157
162
|
readonly collected: SubprocessCollectedOutputs
|
|
158
163
|
/** Resolves with spawned-command exit facts; rejects for spawn or provider failures. */
|
|
@@ -243,7 +248,11 @@ interface SubprocessOutcome {
|
|
|
243
248
|
|
|
244
249
|
`spawnTerminal(spec)` is the non-pipe process primitive. The provider allocates the controlling terminal and owns UTF-8 text transport, foreground-process-group inspection and signalling, and one awaited TERM-to-KILL operation that reaches quiescence for every session member the provider can still observe; providers document substrate-specific observability limits. The PTY backend remains responsible for prompt detection, readiness inference, scrollback, sandbox policy, and persistent-session ownership; ordinary `spawn()` cannot reconstruct controlling-terminal semantics.
|
|
245
250
|
|
|
246
|
-
The terminal spec fully specifies argv, cwd, environment overrides, dimensions, cleanup grace, and optional allocation cancellation. Its handle exposes `pid`, ordered output, `done`, `write`, `inspectForeground`, `signalForeground`, and awaited `terminate`;
|
|
251
|
+
The terminal spec fully specifies argv, cwd, environment overrides, terminal type, dimensions, cleanup grace, and optional allocation cancellation and shell activity observation. Its handle exposes `pid`, ordered output, `done`, `write`, `resize`, `inspectForeground`, `inspectActivity`, `signalForeground`, and awaited `terminate`; [`SubprocessTerminalSpawnSpec` and `SubprocessTerminalHandle`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subprocess/subprocess/src/types.ts) define these fields and operations. `resize(cols, rows)` updates the live PTY dimensions and rejects after process exit.
|
|
252
|
+
|
|
253
|
+
`inspectActivity()` returns `SubprocessTerminalActivity`: `state` is `idle`, `busy` or `unknown`, and `revision` changes with provider-observed activity or input. A terminal request opts into supported shell lifecycle observation with `shellActivity`; provider-specific support and conservative unknown cases are documented by [subprocess-local](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subprocess/subprocess-local/README.md#running-terminal-sessions).
|
|
254
|
+
|
|
255
|
+
`terminalEnvironment(signal?)` returns `SubprocessTerminalEnvironment`: the execution environment platform (`posix` or `windows`) and optional `defaultShell`. These facts come from the provider rather than the Web server or browser. `resolveExecutable` verifies shell candidates; `SubprocessExecutableNotFoundError` identifies a missing executable, while provider and transport failures remain errors.
|
|
247
256
|
|
|
248
257
|
## Service behavior
|
|
249
258
|
|
|
@@ -257,23 +266,6 @@ The abstract [`SubprocessRuntime`](https://github.com/deepseek-ai/deepseek-harne
|
|
|
257
266
|
|
|
258
267
|
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).
|
|
259
268
|
|
|
260
|
-
<a id="ctxe2b--e2bruntime"></a>
|
|
261
|
-
|
|
262
|
-
### `ctx.e2b` — `E2BRuntime`
|
|
263
|
-
|
|
264
|
-
Creates one lazily consumable E2B SDK handle and deletes the sandbox at timeout or disposal. Creation begins at plugin construction; adapters await getSandbox before their first operation.
|
|
265
|
-
|
|
266
|
-
```ts cordis-catalog
|
|
267
|
-
/**
|
|
268
|
-
* Return the shared live SDK handle.
|
|
269
|
-
* @returns the created sandbox after the configured cwd exists.
|
|
270
|
-
* @throws when E2B rejects creation or the service is disposing.
|
|
271
|
-
*/
|
|
272
|
-
async getSandbox(): Promise<Sandbox>
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
Source: [`packages/e2b/e2b/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/e2b/e2b/src/index.ts)
|
|
276
|
-
|
|
277
269
|
<a id="ctxsubprocess--subprocessruntime-abstract-seam"></a>
|
|
278
270
|
|
|
279
271
|
### `ctx.subprocess` — `SubprocessRuntime` (abstract seam)
|
|
@@ -303,6 +295,13 @@ Implementations must honor these semantics:
|
|
|
303
295
|
*/
|
|
304
296
|
abstract resolveExecutable( command: string, env?: Readonly<Record<string, string>>, signal?: AbortSignal, ): Promise<string>
|
|
305
297
|
|
|
298
|
+
/**
|
|
299
|
+
* Inspect shell-selection facts in the provider's execution environment.
|
|
300
|
+
* @param signal - cancellation of remote environment inspection.
|
|
301
|
+
* @returns platform and preferred shell; executable lookup and allocation remain separate operations.
|
|
302
|
+
*/
|
|
303
|
+
abstract terminalEnvironment(signal?: AbortSignal): Promise<SubprocessTerminalEnvironment>
|
|
304
|
+
|
|
306
305
|
/**
|
|
307
306
|
* Start one managed child process from a fully-specified spec; this seam
|
|
308
307
|
* applies no defaults.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/system-prompt.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/system-prompt.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -59,9 +60,11 @@ interface PromptSection {
|
|
|
59
60
|
/**
|
|
60
61
|
* Static text or a provider evaluated at each assembly with that assembly's
|
|
61
62
|
* {@link AssembleContext}. The text may reference `{{variable}}`s — they are
|
|
62
|
-
* interpolated later, by {@link renderPrompt}.
|
|
63
|
+
* interpolated later, by {@link renderPrompt}, unless `interpolate` is false.
|
|
63
64
|
*/
|
|
64
65
|
readonly text: string | ((context: AssembleContext) => string)
|
|
66
|
+
/** Whether to interpolate prompt variables. Defaults to true; false preserves literal text. */
|
|
67
|
+
readonly interpolate?: boolean
|
|
65
68
|
/**
|
|
66
69
|
* Treat this contribution as the complete system prompt. Assembly still
|
|
67
70
|
* runs the cooperative waterfall so tools, contexts, and variables can be
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/tools.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/tools.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -11,7 +12,7 @@ Source: [`packages/core/tools/src/index.ts`](https://github.com/deepseek-ai/deep
|
|
|
11
12
|
|
|
12
13
|
## `ToolDefinition` — a registered tool
|
|
13
14
|
|
|
14
|
-
A `ToolSchema` (the model-facing fields) plus a mandatory canonical output declaration, the `execute` function, host-only scheduler metadata, an optional final-content callback, and optional UI presenters. The registry holds these; the loop dispatches calls through them. The registry's `schemas()` builds the model-facing `ToolSchema[]` by an explicit allowlist — `output`/`execute`/`finalizeContent`/`timeoutMs`/`isConcurrencySafe`/`presentCall`/`presentResult` must never leak into a model request.
|
|
15
|
+
A `ToolSchema` (the model-facing fields) plus a mandatory canonical output declaration, the `execute` function, host-only scheduler metadata, an optional final-content callback, and optional UI presenters. The registry holds these; the loop dispatches calls through them. The registry's `schemas()` builds the model-facing `ToolSchema[]` by an explicit allowlist — `output`/`execute`/`projectContent`/`finalizeContent`/`timeoutMs`/`isConcurrencySafe`/`presentCall`/`presentResult` must never leak into a model request.
|
|
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
|
## Execution: extensible waterfalls plus monotonic policy
|
|
174
185
|
|
|
175
|
-
`ctx.tools.execute()` accepts a caller-owned `ToolExecutionInput` with a required readonly `signal`, materializes its parsed JSON arguments once into a pipeline-owned `ToolExecution`, and runs that call through `tools/pre-execute` (the reorderable allow/deny/ask waterfall) → registered monotonic guards → `tools/execute` (around-dispatch wrappers) → `tools/post-execute` (inspect/replace the result) → optional definition-owned `finalizeContent` → `tools/result` (the immutable authoritative outcome). Only the `tools/execute` view may replace the required signal. The outcome is a `ToolExecutionResult`.
|
|
186
|
+
`ctx.tools.execute()` accepts a caller-owned `ToolExecutionInput` with a required readonly `signal`, materializes its parsed JSON arguments once into a pipeline-owned `ToolExecution`, and runs that call through `tools/pre-execute` (the reorderable allow/deny/ask waterfall) → registered monotonic guards → `tools/execute` (around-dispatch wrappers) → `projectContent` → `tools/post-execute` (inspect/replace the result) → optional definition-owned `finalizeContent` → `tools/result` (the immutable authoritative outcome). Only the `tools/execute` view may replace the required signal. The outcome is a `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 bindings freeze their ToolSchema at construction and pass it through the scheduler into `ToolExecution.schema`; it is transient execution metadata. Before policy, each actually started sub-dispatch records only pairing ids, name, and normalized arguments. Neither start nor settle events serialize description, parameters, or schema. The bridge later exposes the settled call to the `tools/ptc-dispatch-log` waterfall, which may change the durable content copy while preserving the program value, model-visible outer result, and structured failure identity:
|
|
259
272
|
|
|
260
273
|
```ts type-equiv
|
|
261
274
|
/**
|
|
@@ -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
|
+
The result carries only the outcome. Call identity remains on the immutable `ToolExecution` that accompanies it through every hook and on the durable `tool/call` / `tool/result` session events, so wrappers cannot create a second, disagreeing identity. The canonical `value` is execution-local: the loop persists only `content`, `error`, and `meta`, while `tool/ptc-dispatch` stores the sub-call's rendered `content`, `isError`, and optional structured `error`. Replay reproduces presentation but cannot reconstruct canonical intermediate values. Optional `ToolErrorInfo.reason` retains raw user-facing detail without adding it to model-facing content.
|
|
374
397
|
|
|
375
398
|
On success the registry snapshots and validates the body value, freezes it, and invokes the pure renderer plus the optional top-level-call metadata projector. It separately materializes the durable presentation fields immediately before `tools/result`; an invalid value, renderer/projector failure, or non-JSON presentation becomes a JSON-safe `isError`. The final live observer therefore sees the exact execution-local value beside fields safe for the later durable append.
|
|
376
399
|
|
|
@@ -380,15 +403,19 @@ Each interception waterfall returns a typed **Decision** (the idiom shared with
|
|
|
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
|
-
Call `next()` for the default or return a decision to short-circuit. Pre-policy may deny or ask; only `allowed-once` proceeds, while a non-grant, missing approval channel or service, or agent-less request becomes a denial. Guards may still impose a final denial. Arguments cannot be rewritten because history, audit, UI, and execution must agree.
|
|
432
|
+
Call `next()` for the default or return a decision to short-circuit. Pre-policy may deny or ask; only `allowed-once` proceeds, while a non-grant, missing approval channel or service, or agent-less request becomes a denial. A deny may attach structured identity and user-facing detail without changing its model-facing reason. Guards may still impose a final denial. Arguments cannot be rewritten because history, audit, UI, and execution must agree.
|
|
406
433
|
|
|
407
434
|
Post-policy may replace either content or value, never both. Content replacement preserves the canonical value and existing metadata; value replacement is revalidated and recomputes content/metadata; a block removes the value and becomes an `isError` containing corrective feedback. Content replacement is presentation policy, not confidentiality policy: a listener that must hide the programmatic value blocks or replaces it. `tools/result` receives the frozen execution and result after normalization; observers cannot transform them, and observer failures are contained. Unknown and throwing tools both become structured errors (`ToolNotFoundError` maps to `UNKNOWN_TOOL`), so the call fails without ending the turn.
|
|
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.
|