dsh-plugin-dev-kb 1.1.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.en.md +14 -8
- package/README.md +15 -9
- package/docs/banner.svg +25 -0
- package/kb/INDEX.md +23 -19
- package/kb/README.md +8 -6
- package/kb/extra/AGENTS.md +11 -10
- package/kb/extra/cookbook/adding-a-remote-api.md +2 -2
- package/kb/extra/cookbook/adding-a-remote-api.zh.md +2 -2
- package/kb/extra/cookbook/adding-a-session-format-version.md +151 -0
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +151 -0
- package/kb/extra/cookbook/adding-a-vendored-package.md +1 -1
- package/kb/extra/cookbook/adding-a-vendored-package.zh.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/kb/extra/cookbook/reviewing-persistence-type-changes.md +120 -0
- package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +120 -0
- package/kb/extra/deepseek-llm-api-wire-extensions.md +19 -20
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +18 -19
- package/kb/extra/development.md +37 -10
- package/kb/extra/development.zh.md +37 -10
- package/kb/extra/event-producer-consumer.md +90 -67
- package/kb/extra/event-producer-consumer.zh.md +91 -68
- package/kb/extra/glossary.md +1 -1
- package/kb/extra/glossary.zh.md +1 -1
- package/kb/extra/i18n/README.md +16 -7
- package/kb/extra/i18n/README.zh.md +17 -8
- package/kb/extra/i18n/terminology.md +4 -4
- package/kb/extra/i18n/translation-prompt.md +3 -3
- package/kb/extra/module-graph.md +621 -335
- package/kb/extra/module-graph.zh.md +621 -335
- package/kb/extra/persistence-changes/2026-09-11-initial.md +280 -0
- package/kb/extra/persistence-changes/2026-09-11-initial.zh.md +280 -0
- package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
- package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
- package/kb/extra/persistence-changes/2026-09-14-image-offload.md +96 -0
- package/kb/extra/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
- package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
- package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +120 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
- package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
- package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
- package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-21-user-question-reply.md +60 -0
- package/kb/extra/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
- package/kb/extra/persistence-changes/README.md +88 -0
- package/kb/extra/persistence-changes/README.zh.md +88 -0
- package/kb/extra/persistence-changes/historical-formats/README.md +75 -0
- package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -0
- package/kb/extra/persistence-changes/historical-formats/v0.md +5105 -0
- package/kb/extra/persistence-changes/historical-formats/v0.zh.md +5105 -0
- package/kb/extra/persistence-changes/historical-formats/v1.md +5107 -0
- package/kb/extra/persistence-changes/historical-formats/v1.zh.md +5107 -0
- package/kb/extra/persistence-changes/historical-formats/v2.md +5362 -0
- package/kb/extra/persistence-changes/historical-formats/v2.zh.md +5362 -0
- package/kb/extra/persistence-changes/historical-formats/v3.md +5634 -0
- package/kb/extra/persistence-changes/historical-formats/v3.zh.md +5634 -0
- package/kb/extra/persistence-changes/releases/README.md +103 -0
- package/kb/extra/persistence-changes/releases/README.zh.md +103 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
- package/kb/extra/rescope.md +2 -2
- package/kb/extra/rescope.zh.md +2 -2
- package/kb/extra/session-format-status.md +63 -0
- package/kb/extra/session-format-status.zh.md +63 -0
- package/kb/extra/subsystems/agent-team.md +52 -28
- package/kb/extra/subsystems/agent-team.zh.md +52 -28
- package/kb/extra/subsystems/attachment.md +19 -9
- package/kb/extra/subsystems/attachment.zh.md +19 -9
- package/kb/extra/subsystems/boot.md +323 -0
- package/kb/extra/subsystems/boot.zh.md +323 -0
- package/kb/extra/subsystems/browser-use.md +67 -0
- package/kb/extra/subsystems/browser-use.zh.md +67 -0
- package/kb/extra/subsystems/claude-code-mods.md +146 -0
- package/kb/extra/subsystems/claude-code-mods.zh.md +146 -0
- package/kb/extra/subsystems/computer-use.md +56 -0
- package/kb/extra/subsystems/computer-use.zh.md +56 -0
- package/kb/extra/subsystems/deliverables.md +178 -0
- package/kb/extra/subsystems/deliverables.zh.md +178 -0
- package/kb/extra/subsystems/extensions.md +6 -4
- package/kb/extra/subsystems/extensions.zh.md +6 -4
- package/kb/extra/subsystems/feedback.md +165 -31
- package/kb/extra/subsystems/feedback.zh.md +165 -31
- package/kb/extra/subsystems/mcp.md +139 -0
- package/kb/extra/subsystems/mcp.zh.md +139 -0
- package/kb/extra/subsystems/office-to-pdf.md +87 -0
- package/kb/extra/subsystems/office-to-pdf.zh.md +87 -0
- package/kb/extra/subsystems/otel.md +44 -0
- package/kb/extra/subsystems/otel.zh.md +44 -0
- package/kb/extra/subsystems/product-telemetry.md +79 -0
- package/kb/extra/subsystems/product-telemetry.zh.md +79 -0
- package/kb/extra/subsystems/ssh.md +135 -0
- package/kb/extra/subsystems/ssh.zh.md +135 -0
- package/kb/extra/subsystems/todo.md +3 -3
- package/kb/extra/subsystems/todo.zh.md +3 -3
- package/kb/extra/subsystems/voice-input.md +164 -0
- package/kb/extra/subsystems/voice-input.zh.md +164 -0
- package/kb/extra/subsystems/webhook.md +3 -3
- package/kb/extra/subsystems/webhook.zh.md +1 -1
- package/kb/extra/testing.md +5 -4
- package/kb/extra/testing.zh.md +5 -4
- package/kb/extra/ui-radius.md +115 -0
- package/kb/extra/ui-radius.zh.md +115 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
- package/kb/extra/web-styling.md +12 -2
- package/kb/extra/web-styling.zh.md +12 -2
- package/kb/meta/search-index.json +1019 -251
- package/kb/meta/site-pages.txt +187 -183
- package/kb/meta/source.json +8 -8
- package/kb/meta/topics.md +11 -7
- package/kb/site/develop/basic/config.md +1 -0
- package/kb/site/develop/basic/index.md +1 -0
- package/kb/site/develop/basic/publish.md +10 -3
- package/kb/site/develop/basic/tool.md +1 -0
- package/kb/site/develop/cordis-tutorial/01-first-plugin.md +1 -0
- package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
- package/kb/site/develop/cordis-tutorial/03-services.md +1 -0
- package/kb/site/develop/cordis-tutorial/04-events.md +1 -0
- package/kb/site/develop/cordis-tutorial/05-config.md +28 -0
- package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +1 -0
- package/kb/site/develop/cordis-tutorial/index.md +1 -0
- package/kb/site/develop/framework/events.md +1 -0
- package/kb/site/develop/framework/index.md +2 -1
- package/kb/site/develop/framework/service.md +1 -0
- package/kb/site/develop/practice/dynamic-cordis.md +9 -8
- package/kb/site/develop/practice/index.md +1 -0
- package/kb/site/develop/practice/llm-adapter.md +2 -1
- package/kb/site/en/develop/basic/config.md +1 -0
- package/kb/site/en/develop/basic/index.md +1 -0
- package/kb/site/en/develop/basic/publish.md +10 -3
- package/kb/site/en/develop/basic/tool.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/03-services.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/05-config.md +28 -0
- package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/index.md +1 -0
- package/kb/site/en/develop/framework/events.md +1 -0
- package/kb/site/en/develop/framework/index.md +2 -1
- package/kb/site/en/develop/framework/service.md +1 -0
- package/kb/site/en/develop/practice/dynamic-cordis.md +9 -8
- package/kb/site/en/develop/practice/index.md +1 -0
- package/kb/site/en/develop/practice/llm-adapter.md +2 -1
- package/kb/site/en/guide/github-review.md +1 -0
- package/kb/site/en/guide/mcp-memory.md +1 -0
- package/kb/site/en/guide/network-proxy.md +2 -1
- package/kb/site/en/guide/providers-custom-form.png +0 -0
- package/kb/site/en/guide/providers-models-page.png +0 -0
- package/kb/site/en/guide/providers.md +98 -83
- package/kb/site/en/guide/public-deployments.md +36 -0
- package/kb/site/en/guide/python-sdk.md +60 -23
- package/kb/site/en/guide/quickstart.md +2 -0
- package/kb/site/en/guide/schedule.md +70 -11
- package/kb/site/en/reference/agent-lifecycle.md +13 -5
- package/kb/site/en/reference/api-gateway.md +13 -11
- package/kb/site/en/reference/capability-seams.md +187 -62
- package/kb/site/en/reference/config-catalog.md +1887 -819
- package/kb/site/en/reference/cookbook/adding-a-package.md +57 -3
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +35 -64
- package/kb/site/en/reference/cookbook/adding-a-tool.md +5 -4
- package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/en/reference/cookbook/extension-cookbook.md +7 -6
- package/kb/site/en/reference/cordis-api/context.md +1 -0
- package/kb/site/en/reference/cordis-api/events.md +1 -0
- package/kb/site/en/reference/cordis-api/fiber.md +4 -3
- package/kb/site/en/reference/cordis-api/inherited.md +16 -16
- package/kb/site/en/reference/cordis-api/registry.md +1 -0
- package/kb/site/en/reference/cordis-api/service.md +1 -0
- package/kb/site/en/reference/cordis-primer.md +1 -0
- package/kb/site/en/reference/index.md +32 -15
- package/kb/site/en/reference/persistence-catalog.md +7787 -81
- package/kb/site/en/reference/subsystems/approval.md +3 -2
- package/kb/site/en/reference/subsystems/client-modules.md +30 -13
- package/kb/site/en/reference/subsystems/client-resources.md +96 -0
- package/kb/site/en/reference/subsystems/commands.md +6 -1
- package/kb/site/en/reference/subsystems/compaction.md +50 -3
- package/kb/site/en/reference/subsystems/conversation.md +36 -6
- package/kb/site/en/reference/subsystems/core.md +174 -271
- package/kb/site/en/reference/subsystems/credentials.md +169 -5
- package/kb/site/en/reference/subsystems/filesystem.md +26 -0
- package/kb/site/en/reference/subsystems/goal.md +39 -2
- package/kb/site/en/reference/subsystems/index.md +18 -5
- package/kb/site/en/reference/subsystems/jobs.md +337 -127
- package/kb/site/en/reference/subsystems/llm-streaming.md +93 -43
- package/kb/site/en/reference/subsystems/lsp.md +2 -1
- package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/en/reference/subsystems/persistence.md +40 -18
- package/kb/site/en/reference/subsystems/plan.md +2 -1
- package/kb/site/en/reference/subsystems/ptc-runtime.md +236 -0
- package/kb/site/en/reference/subsystems/sandbox.md +7 -5
- package/kb/site/en/reference/subsystems/schedule.md +392 -33
- package/kb/site/en/reference/subsystems/scope.md +2 -1
- package/kb/site/en/reference/subsystems/session-projection.md +22 -19
- package/kb/site/en/reference/subsystems/session-query.md +1 -0
- package/kb/site/en/reference/subsystems/session-reference.md +12 -6
- package/kb/site/en/reference/subsystems/session-telemetry.md +27 -8
- package/kb/site/en/reference/subsystems/session-title.md +6 -5
- package/kb/site/en/reference/subsystems/session.md +258 -118
- package/kb/site/en/reference/subsystems/settings.md +43 -292
- package/kb/site/en/reference/subsystems/shell.md +44 -32
- package/kb/site/en/reference/subsystems/sidebar-right.md +162 -0
- package/kb/site/en/reference/subsystems/skills.md +5 -6
- package/kb/site/en/reference/subsystems/slots.md +68 -39
- package/kb/site/en/reference/subsystems/spill.md +15 -7
- package/kb/site/en/reference/subsystems/storage.md +2 -2
- package/kb/site/en/reference/subsystems/subagent.md +65 -72
- package/kb/site/en/reference/subsystems/subprocess.md +42 -44
- package/kb/site/en/reference/subsystems/system-prompt.md +7 -2
- package/kb/site/en/reference/subsystems/terminal.md +1 -0
- package/kb/site/en/reference/subsystems/token-meter.md +3 -1
- package/kb/site/en/reference/subsystems/tools.md +44 -16
- package/kb/site/en/reference/subsystems/typert.md +153 -10
- package/kb/site/en/reference/subsystems/user-questions.md +131 -1
- package/kb/site/en/reference/subsystems/web-client.md +15 -9
- package/kb/site/en/reference/subsystems/web-server.md +74 -1
- package/kb/site/en/reference/subsystems/web.md +1 -0
- package/kb/site/en/reference/subsystems/workflow.md +10 -9
- package/kb/site/en/reference/subsystems/workspace.md +343 -4
- package/kb/site/en/reference/tool-catalog.md +806 -311
- package/kb/site/en/reference/tool-execution-pipeline.md +9 -5
- package/kb/site/guide/github-review.md +1 -0
- package/kb/site/guide/mcp-memory.md +1 -0
- package/kb/site/guide/network-proxy.md +2 -1
- package/kb/site/guide/providers-custom-form.zh.png +0 -0
- package/kb/site/guide/providers-models-page.zh.png +0 -0
- package/kb/site/guide/providers.md +109 -94
- package/kb/site/guide/public-deployments.md +36 -0
- package/kb/site/guide/python-sdk.md +60 -23
- package/kb/site/guide/quickstart.md +2 -0
- package/kb/site/guide/schedule.md +70 -11
- package/kb/site/reference/agent-lifecycle.md +13 -5
- package/kb/site/reference/api-gateway.md +13 -11
- package/kb/site/reference/capability-seams.md +187 -62
- package/kb/site/reference/config-catalog.md +1889 -820
- package/kb/site/reference/cookbook/adding-a-package.md +55 -3
- package/kb/site/reference/cookbook/adding-a-settings-card.md +35 -64
- package/kb/site/reference/cookbook/adding-a-tool.md +5 -4
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/reference/cookbook/extension-cookbook.md +7 -6
- package/kb/site/reference/cordis-api/context.md +1 -0
- package/kb/site/reference/cordis-api/events.md +1 -0
- package/kb/site/reference/cordis-api/fiber.md +4 -3
- package/kb/site/reference/cordis-api/inherited.md +16 -16
- package/kb/site/reference/cordis-api/registry.md +1 -0
- package/kb/site/reference/cordis-api/service.md +1 -0
- package/kb/site/reference/cordis-primer.md +1 -0
- package/kb/site/reference/index.md +32 -15
- package/kb/site/reference/persistence-catalog.md +7791 -85
- package/kb/site/reference/subsystems/approval.md +3 -2
- package/kb/site/reference/subsystems/client-modules.md +30 -13
- package/kb/site/reference/subsystems/client-resources.md +96 -0
- package/kb/site/reference/subsystems/commands.md +6 -1
- package/kb/site/reference/subsystems/compaction.md +50 -3
- package/kb/site/reference/subsystems/conversation.md +35 -5
- package/kb/site/reference/subsystems/core.md +174 -271
- package/kb/site/reference/subsystems/credentials.md +169 -5
- package/kb/site/reference/subsystems/filesystem.md +26 -0
- package/kb/site/reference/subsystems/goal.md +39 -2
- package/kb/site/reference/subsystems/index.md +28 -15
- package/kb/site/reference/subsystems/jobs.md +336 -126
- package/kb/site/reference/subsystems/llm-streaming.md +93 -43
- package/kb/site/reference/subsystems/lsp.md +2 -1
- package/kb/site/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/reference/subsystems/persistence.md +40 -18
- package/kb/site/reference/subsystems/plan.md +2 -1
- package/kb/site/reference/subsystems/ptc-runtime.md +236 -0
- package/kb/site/reference/subsystems/sandbox.md +7 -5
- package/kb/site/reference/subsystems/schedule.md +392 -33
- package/kb/site/reference/subsystems/scope.md +2 -1
- package/kb/site/reference/subsystems/session-projection.md +22 -19
- package/kb/site/reference/subsystems/session-query.md +1 -0
- package/kb/site/reference/subsystems/session-reference.md +12 -6
- package/kb/site/reference/subsystems/session-telemetry.md +27 -8
- package/kb/site/reference/subsystems/session-title.md +6 -5
- package/kb/site/reference/subsystems/session.md +258 -118
- package/kb/site/reference/subsystems/settings.md +43 -292
- package/kb/site/reference/subsystems/shell.md +44 -32
- package/kb/site/reference/subsystems/sidebar-right.md +162 -0
- package/kb/site/reference/subsystems/skills.md +5 -6
- package/kb/site/reference/subsystems/slots.md +68 -39
- package/kb/site/reference/subsystems/spill.md +15 -7
- package/kb/site/reference/subsystems/storage.md +2 -2
- package/kb/site/reference/subsystems/subagent.md +64 -71
- package/kb/site/reference/subsystems/subprocess.md +42 -44
- package/kb/site/reference/subsystems/system-prompt.md +7 -2
- package/kb/site/reference/subsystems/terminal.md +1 -0
- package/kb/site/reference/subsystems/token-meter.md +3 -1
- package/kb/site/reference/subsystems/tools.md +44 -16
- package/kb/site/reference/subsystems/typert.md +153 -10
- package/kb/site/reference/subsystems/user-questions.md +132 -2
- package/kb/site/reference/subsystems/web-client.md +15 -9
- package/kb/site/reference/subsystems/web-server.md +74 -1
- package/kb/site/reference/subsystems/web.md +1 -0
- package/kb/site/reference/subsystems/workflow.md +10 -9
- package/kb/site/reference/subsystems/workspace.md +343 -4
- package/kb/site/reference/tool-catalog.md +810 -315
- package/kb/site/reference/tool-execution-pipeline.md +9 -5
- package/lib/index.js +25 -44
- package/package.json +3 -2
- package/skills/dsh-plugin-dev-kb.md +6 -5
- package/kb/site/en/reference/subsystems/code-runtime.md +0 -198
- package/kb/site/en/reference/subsystems/invariants.md +0 -91
- package/kb/site/reference/subsystems/code-runtime.md +0 -198
- package/kb/site/reference/subsystems/invariants.md +0 -91
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/subagent.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/subagent.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -7,10 +8,12 @@ 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
|
|
|
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.
|
|
16
|
+
|
|
14
17
|
## Two kinds of capability, discovered two ways
|
|
15
18
|
|
|
16
19
|
A provider advertises its **start-time** features on a static descriptor the service checks BEFORE a one-shot run exists; a request that needs one the provider lacks is rejected loud (`SubagentError('UNSUPPORTED_CAPABILITY')`), never accepted-then-ignored. Those flags describe only the one-shot [`start()`](#the-provider-contract-subagentprovider) path, where the provider composes the child. **Continuable** children are composed by the continuation manager itself, so they are gated by one optional method whose presence IS the capability, with TS narrowing as the discovery mechanism: [`SubagentProvider.prepareContinuable`](#the-provider-contract-subagentprovider).
|
|
@@ -99,7 +102,7 @@ interface SubagentStartRequest {
|
|
|
99
102
|
/**
|
|
100
103
|
* Optional per-child persona. Requires {@link SubagentCapabilities.persona};
|
|
101
104
|
* rejected at start otherwise. In-process backends register it as a scoped
|
|
102
|
-
* `deployment:persona` section on the child, SHADOWING the deployment's
|
|
105
|
+
* `deployment:persona-prefix` section on the child, SHADOWING the deployment's
|
|
103
106
|
* persona for this child alone — same template semantics as the deployment
|
|
104
107
|
* persona (strict `{{…}}` interpolation against the registered variables).
|
|
105
108
|
*/
|
|
@@ -144,13 +147,15 @@ persisted Session
|
|
|
144
147
|
| `waiting` | wake and steer the same Activation |
|
|
145
148
|
| no Activation | cold-resume a new Activation, then steer it |
|
|
146
149
|
|
|
147
|
-
`running` means the Agent has an active
|
|
150
|
+
`running` means the Agent has an active driver or maintenance task; `waiting` means no Agent activity is active but its Inbox is nonempty or it owns at least one child Activation that has not completed disposal; `settled` means no Agent activity is active, the Inbox is empty, and every owned child is disposed, at which point the manager disposes the [`AgentHandle`](./core.md#creation-and-ownership) and removes the Activation. The manager derives these internal conditions from `Agent.whenIdle()`, `Agent.inbox.hasPending`, the owned-child set, and an Activation generation that invalidates stale observations, rather than maintaining a second execution state machine. After the final Session flush, the child-lock decision uses the synchronous task entry of `Agent.runMaintenance()` to claim the idle phase and close admission in the same JavaScript turn. This conservative rule does not distinguish delivery modes: context parked by `Agent.inject()` can keep an idle Activation and its live ancestors resident until a waking delivery claims it, a queue mutation removes it, or manager teardown discards it.
|
|
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.
|
|
148
153
|
|
|
149
|
-
|
|
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.
|
|
150
155
|
|
|
151
|
-
|
|
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.
|
|
152
157
|
|
|
153
|
-
|
|
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.
|
|
154
159
|
|
|
155
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.
|
|
156
161
|
|
|
@@ -165,7 +170,7 @@ type SubagentInterruptAuthority =
|
|
|
165
170
|
| { readonly kind: 'ancestor'; readonly agent: Agent }
|
|
166
171
|
```
|
|
167
172
|
|
|
168
|
-
Every Activation owns its `AgentHandle` and an `ownedChildren: Set<SessionId>`; because one Session has at most one live Activation, the child Session id identifies the live child without another runtime-incarnation reference. Starting a child or submitting parent-originated work registers the child in a continuation-managed parent's set before the child can run, and that parent cannot settle while the set is non-empty. A top-level or other non-continuation Agent has no Activation and stays outside the waiting graph. Child release happens only after the child Agent is
|
|
173
|
+
Every Activation owns its `AgentHandle` and an `ownedChildren: Set<SessionId>`; because one Session has at most one live Activation, the child Session id identifies the live child without another runtime-incarnation reference. Starting a child or submitting parent-originated work registers the child in a continuation-managed parent's set before the child can run, and that parent cannot settle while the set is non-empty. A top-level or other non-continuation Agent has no Activation and stays outside the waiting graph. Child release happens only after the child has no active Agent work, its Inbox is empty, every child of that child is disposed, the best-effort final session flush settles, and the child's `AgentHandle` completes disposal.
|
|
169
174
|
|
|
170
175
|
Final settlement awaits `ctx.sessions.flush(session)` but ignores its participation boolean because an arbitrary listener cannot prove that a persistence backend stored the state. Rejection is logged without failing the Activation, and the manager still disposes the handle and releases ownership; the persisted child state may then be missing or stale on a later resume. Manager unload invokes an internal manager-wide drain that closes admission and disposes every live forest; `drainContinuableDescendants(parents)` closes admission only below exact live host-owned Agents and disposes their continuable descendants while unrelated forests remain live. Both await already-admitted materializations in their scope, propagate cancellation top-down, release handles child-first, and await every selected branch despite individual failures. Durable child Sessions survive that process-local teardown.
|
|
171
176
|
|
|
@@ -198,7 +203,7 @@ interface ContinuableStart {
|
|
|
198
203
|
}
|
|
199
204
|
```
|
|
200
205
|
|
|
201
|
-
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.
|
|
202
207
|
|
|
203
208
|
```ts type-equiv
|
|
204
209
|
/**
|
|
@@ -261,22 +266,20 @@ interface ContinuableCreateSpec {
|
|
|
261
266
|
|
|
262
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).
|
|
263
268
|
|
|
264
|
-
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.
|
|
265
270
|
|
|
266
271
|
## Durable enumeration: `listChildren()`, `listDescendants()`, and their entries
|
|
267
272
|
|
|
268
|
-
|
|
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.
|
|
269
274
|
|
|
270
|
-
`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:
|
|
271
278
|
|
|
272
279
|
```ts type-equiv
|
|
273
|
-
/**
|
|
274
|
-
* One entry of a descendant listing: the interpreted subagent facts plus its
|
|
275
|
-
* position in the complete session tree. `parentId` is the durable direct
|
|
276
|
-
* parent from the enumerated header, and `depth` counts edges from the root.
|
|
277
|
-
*/
|
|
280
|
+
/** One catalog descendant with its direct parent and edge distance from the requested root. */
|
|
278
281
|
type SubagentDescendantListEntry = SubagentListEntry & {
|
|
279
|
-
/**
|
|
282
|
+
/** Parent whose catalog contains this child. */
|
|
280
283
|
readonly parentId: SessionId
|
|
281
284
|
/** Edge distance from the requested root; direct children are `1`. */
|
|
282
285
|
readonly depth: number
|
|
@@ -299,7 +302,7 @@ interface SubagentResult {
|
|
|
299
302
|
* are skipped. Without a non-empty message, the output is its accumulated
|
|
300
303
|
* assistant text stream, or `[]` when the child produced neither.
|
|
301
304
|
*/
|
|
302
|
-
readonly output: ContentBlock[]
|
|
305
|
+
readonly output: readonly ContentBlock[]
|
|
303
306
|
/**
|
|
304
307
|
* The structured result after a requested `outputSchema` was successfully
|
|
305
308
|
* satisfied. Requesting a schema does not guarantee presence: a provider can
|
|
@@ -453,12 +456,16 @@ interface SubagentProvider {
|
|
|
453
456
|
|
|
454
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.
|
|
455
458
|
|
|
456
|
-
## In-process backends: depth and seed
|
|
459
|
+
## In-process backends: permission, depth, and seed
|
|
460
|
+
|
|
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:
|
|
457
462
|
|
|
458
|
-
|
|
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.
|
|
459
464
|
|
|
460
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.
|
|
461
|
-
- **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.
|
|
462
469
|
|
|
463
470
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
464
471
|
|
|
@@ -472,11 +479,11 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
472
479
|
|
|
473
480
|
### `ctx.subagentModelSelection` — `SubagentModelSelectionConfig`
|
|
474
481
|
|
|
475
|
-
Singleton settings owner read
|
|
482
|
+
Singleton settings owner read when delegation tools are composed for a Session.
|
|
476
483
|
|
|
477
484
|
```ts cordis-catalog
|
|
478
485
|
/**
|
|
479
|
-
* Read a detached selection preference for the next eligible
|
|
486
|
+
* Read a detached selection preference for the next eligible Session composition.
|
|
480
487
|
* @returns the enabled state and exact allowed routes.
|
|
481
488
|
*/
|
|
482
489
|
current(): SubagentModelSelectionSettings
|
|
@@ -491,6 +498,13 @@ Source: [`packages/subagent/tool-subagent/src/model-selection-settings.ts`](http
|
|
|
491
498
|
Named provider registry with one-shot runs, durable discovery, and continuable-child operations.
|
|
492
499
|
|
|
493
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
|
+
|
|
494
508
|
/**
|
|
495
509
|
* Establish one durable continuable child and deliver its initial prompt.
|
|
496
510
|
* Resolves when the child's inbox accepts that prompt, without waiting for the
|
|
@@ -560,65 +574,44 @@ async drainContinuableDescendants(parents: readonly Agent[]): Promise<void>
|
|
|
560
574
|
async drainContinuableChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>
|
|
561
575
|
|
|
562
576
|
/**
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
* around each await. Read rejections that settle
|
|
571
|
-
* after an abort become a stable `SubagentError` with code `CANCELLED`.
|
|
572
|
-
* @param parentSessionId - parent session whose direct children are listed.
|
|
573
|
-
* @param signal - caller-owned cancellation forwarded to Session queries
|
|
574
|
-
* and observed around every read await.
|
|
575
|
-
* @returns children and per-child diagnostics ordered by `createdAt`, then id.
|
|
576
|
-
* @throws {@link SubagentError} when the projection registry or the session
|
|
577
|
-
* 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.
|
|
578
584
|
*/
|
|
579
|
-
listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<
|
|
585
|
+
listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<SubagentCatalogEntry[]>
|
|
580
586
|
|
|
581
587
|
/**
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
* @param
|
|
591
|
-
*
|
|
592
|
-
* @returns children and
|
|
593
|
-
*
|
|
594
|
-
* @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.
|
|
595
601
|
*/
|
|
596
602
|
listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<SubagentDescendantListEntry[]>
|
|
597
603
|
|
|
598
|
-
/**
|
|
599
|
-
* Remote face of {@link listChildren} for one browser: the durable listing
|
|
600
|
-
* plus live Agent activity and the delivery-time parent availability hint.
|
|
601
|
-
* Parent availability is a hint; {@link prompt} performs the authoritative
|
|
602
|
-
* check. Named apart from the provider-name {@link list}, which owns the
|
|
603
|
-
* member.
|
|
604
|
-
* @param parentSessionId - parent session whose direct children are listed.
|
|
605
|
-
* @param signal - carrier cancellation forwarded to Session queries.
|
|
606
|
-
* @returns the catalog view for that parent.
|
|
607
|
-
* @throws {RemoteError} `gateway/bad-request` for an empty parent id,
|
|
608
|
-
* `gateway/cancelled` for an aborted read, `subagent/projections-unavailable` when
|
|
609
|
-
* the deployment has no projection registry, otherwise `gateway/internal`.
|
|
610
|
-
*/
|
|
611
|
-
@Remote('list') async remoteExportList(parentSessionId: SessionId, signal: AbortSignal): Promise<SubagentCatalog>
|
|
612
|
-
|
|
613
604
|
/**
|
|
614
605
|
* Deliver one browser-authored message to a continuable child through the
|
|
615
606
|
* exact live direct parent, retaining the caller-minted request identity and
|
|
616
607
|
* validated browser zone on the accepted message. Success identifies the
|
|
617
|
-
* message the child's
|
|
618
|
-
*
|
|
608
|
+
* message the child's inbox accepted; later execution is independent of this
|
|
609
|
+
* call. Queue delivery targets a later turn; steer delivery targets the
|
|
610
|
+
* nearest step and retains the Agent loop's best-effort fallback semantics.
|
|
619
611
|
* Image parts are admitted and persisted through the attachment store
|
|
620
612
|
* before delivery, and the child's model must accept image input.
|
|
621
|
-
*
|
|
613
|
+
* Cold resume at capacity rejects with `subagent/delivery-unavailable`.
|
|
614
|
+
* @param request - durable address, delivery, minted identity, content, and optional browser zone.
|
|
622
615
|
* @param signal - carrier cancellation, owning the call until inbox acceptance.
|
|
623
616
|
* @returns the accepted message's inbox identity.
|
|
624
617
|
* @throws {RemoteError} `gateway/bad-request`, `subagent/attachment-invalid`,
|
|
@@ -672,6 +665,8 @@ list(): string[]
|
|
|
672
665
|
* fulfills; a rejection therefore has no run for the caller to dispose and
|
|
673
666
|
* emits no run lifecycle events. Post-publication turn and infrastructure
|
|
674
667
|
* failures settle through the returned run.
|
|
668
|
+
* A catalog append failure disposes the run and handles its result rejection;
|
|
669
|
+
* the caller receives the catalog error even if disposal also fails.
|
|
675
670
|
* @param name - the provider to use.
|
|
676
671
|
* @param request - child label, prompt, parent, signal, and optional capabilities.
|
|
677
672
|
* @returns the published holder-owned run.
|
|
@@ -699,7 +694,6 @@ A published child settled. Scope-filtered dispatch uses the same delegating pare
|
|
|
699
694
|
* parent carrier as `subagent/start`, so the lifecycle pair reaches the
|
|
700
695
|
* same scoped audience.
|
|
701
696
|
* @param info - the run identity and terminal outcome.
|
|
702
|
-
* @dshScopeScan unsupported
|
|
703
697
|
* @mode emit
|
|
704
698
|
*/
|
|
705
699
|
'subagent/end'(this: Scoped<SubagentRuntime>, info: SubagentRunEndInfo): void
|
|
@@ -757,7 +751,6 @@ A provider established a published child. For in-process providers, `ctx.agents.
|
|
|
757
751
|
* parent-scoped listener observes only its own delegations. Paired with
|
|
758
752
|
* `subagent/end`.
|
|
759
753
|
* @param info - the provider and published child identity.
|
|
760
|
-
* @dshScopeScan unsupported
|
|
761
754
|
* @mode emit
|
|
762
755
|
*/
|
|
763
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
|
|
|
@@ -109,14 +112,15 @@ interface SubprocessSpawnSpec {
|
|
|
109
112
|
stdio: SubprocessStdio
|
|
110
113
|
/**
|
|
111
114
|
* Positive finite grace period in milliseconds, no greater than
|
|
112
|
-
* `MAX_TIMER_DELAY_MS`,
|
|
113
|
-
* and for draining still-open collected pipes after the process exits
|
|
114
|
-
* inherited descriptor held by a
|
|
115
|
-
*
|
|
115
|
+
* `MAX_TIMER_DELAY_MS`, available to the provider's termination procedure
|
|
116
|
+
* and used for draining still-open collected pipes after the process exits
|
|
117
|
+
* (an inherited descriptor held by a survivor cannot hold the outcome open
|
|
118
|
+
* indefinitely). Providers document whether range termination is staged or
|
|
119
|
+
* immediate.
|
|
116
120
|
*/
|
|
117
121
|
graceMs: number
|
|
118
122
|
/**
|
|
119
|
-
* Abort signal — starts the terminate escalation on the
|
|
123
|
+
* Abort signal — starts the terminate escalation on the managed range when
|
|
120
124
|
* it fires. The caller owns deadlines and cause classification; this seam
|
|
121
125
|
* only reacts to the abort.
|
|
122
126
|
*/
|
|
@@ -132,45 +136,44 @@ interface SubprocessSpawnSpec {
|
|
|
132
136
|
}
|
|
133
137
|
```
|
|
134
138
|
|
|
135
|
-
## Handles: streams, readers, and
|
|
139
|
+
## Handles: streams, readers, and managed-range termination
|
|
136
140
|
|
|
137
|
-
A spawn returns a live handle
|
|
141
|
+
A spawn returns a live handle synchronously while target and managed-range identities remain provider-private. Collect-mode readers take whole-stream byte offsets and never consume, so independent readers cannot steal one another's deltas; piped streams belong to the caller. `terminate()` starts the provider's documented procedure, and `waitForExit()` observes the same provider-managed range; staged providers may use `graceMs`, while immediate providers do not delay. Consumers can build their own teardown ladders over those two operations (the ACP backend's stdin-EOF-first `disposeAcpChild` is the template).
|
|
138
142
|
|
|
139
143
|
```ts type-equiv
|
|
140
144
|
/**
|
|
141
|
-
* A live
|
|
145
|
+
* A live subprocess and its provider-managed process range. Collected output
|
|
142
146
|
* remains readable after exit; piped streams belong to the caller.
|
|
143
147
|
*
|
|
144
|
-
* Termination
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* the handle unnoticed.
|
|
148
|
+
* Termination and {@link SubprocessHandle.waitForExit} use the same managed
|
|
149
|
+
* range. Each provider documents the range it can observe and its signalling
|
|
150
|
+
* and observation limits.
|
|
148
151
|
*/
|
|
149
152
|
interface SubprocessHandle {
|
|
150
|
-
/** Process id (tree root); -1 when the spawn itself failed. */
|
|
151
|
-
readonly pid: number
|
|
152
153
|
/** The child's stdin, present iff spawned with `stdin: 'pipe'`. */
|
|
153
154
|
readonly stdin: Writable | undefined
|
|
154
155
|
/** The child's raw stdout, present iff spawned with `stdout: 'pipe'`. */
|
|
155
156
|
readonly stdout: Readable | undefined
|
|
156
157
|
/** The child's raw stderr, present iff spawned with `stderr: 'pipe'`. */
|
|
157
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
|
|
158
161
|
/** Offset-based readers for collect-mode streams (also readable after exit). */
|
|
159
162
|
readonly collected: SubprocessCollectedOutputs
|
|
160
|
-
/** Resolves
|
|
163
|
+
/** Resolves with spawned-command exit facts; rejects for spawn or provider failures. */
|
|
161
164
|
readonly done: Promise<SubprocessOutcome>
|
|
162
165
|
/**
|
|
163
|
-
* Begin the
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
* and also triggered by the spec's abort signal.
|
|
166
|
+
* Begin the provider's documented termination procedure on the managed range
|
|
167
|
+
* — the seam's only termination verb. Idempotent, a no-op once that range is
|
|
168
|
+
* gone, and also triggered by the spec's abort signal.
|
|
167
169
|
*/
|
|
168
170
|
terminate(): void
|
|
169
171
|
/**
|
|
170
|
-
* Wait until the
|
|
171
|
-
*
|
|
172
|
+
* Wait until the same managed range is empty — not just until the spawned
|
|
173
|
+
* command reports its outcome, so surviving work remains observable.
|
|
172
174
|
* @param signal - optional bound for the wait.
|
|
173
|
-
* @returns `true` when the
|
|
175
|
+
* @returns `true` when the managed range is empty, `false` when the signal aborted first.
|
|
176
|
+
* @throws when the selected provider can no longer observe its managed range.
|
|
174
177
|
*/
|
|
175
178
|
waitForExit(signal?: AbortSignal): Promise<boolean>
|
|
176
179
|
}
|
|
@@ -245,11 +248,15 @@ interface SubprocessOutcome {
|
|
|
245
248
|
|
|
246
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.
|
|
247
250
|
|
|
248
|
-
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.
|
|
249
256
|
|
|
250
257
|
## Service behavior
|
|
251
258
|
|
|
252
|
-
The abstract [`SubprocessRuntime`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subprocess/subprocess/src/index.ts) Service Definition specifies execution-world coordinates, executable lookup, ordinary `spawn`, and `spawnTerminal`. [`LocalSubprocessRuntime`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subprocess/subprocess-local/src/index.ts) provides them with
|
|
259
|
+
The abstract [`SubprocessRuntime`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subprocess/subprocess/src/index.ts) Service Definition specifies execution-world coordinates, executable lookup, ordinary `spawn`, and `spawnTerminal`. [`LocalSubprocessRuntime`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subprocess/subprocess-local/src/index.ts) provides them with platform-selected managed ranges, per-disposition wiring, credential scrubbing, `node-pty`, platform process inspection, and terminate-and-join disposal. See [`dsh-subprocess`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subprocess/subprocess/README.md) for the Service Definition contract and [`dsh-subprocess-local`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subprocess/subprocess-local/README.md) for local mechanics.
|
|
253
260
|
|
|
254
261
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
255
262
|
|
|
@@ -259,23 +266,6 @@ The abstract [`SubprocessRuntime`](https://github.com/deepseek-ai/deepseek-harne
|
|
|
259
266
|
|
|
260
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).
|
|
261
268
|
|
|
262
|
-
<a id="ctxe2b--e2bruntime"></a>
|
|
263
|
-
|
|
264
|
-
### `ctx.e2b` — `E2BRuntime`
|
|
265
|
-
|
|
266
|
-
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.
|
|
267
|
-
|
|
268
|
-
```ts cordis-catalog
|
|
269
|
-
/**
|
|
270
|
-
* Return the shared live SDK handle.
|
|
271
|
-
* @returns the created sandbox after the configured cwd exists.
|
|
272
|
-
* @throws when E2B rejects creation or the service is disposing.
|
|
273
|
-
*/
|
|
274
|
-
async getSandbox(): Promise<Sandbox>
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
Source: [`packages/e2b/e2b/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/e2b/e2b/src/index.ts)
|
|
278
|
-
|
|
279
269
|
<a id="ctxsubprocess--subprocessruntime-abstract-seam"></a>
|
|
280
270
|
|
|
281
271
|
### `ctx.subprocess` — `SubprocessRuntime` (abstract seam)
|
|
@@ -285,9 +275,9 @@ Abstract subprocess service. Subclass, implement spawn, and load the subclass as
|
|
|
285
275
|
Implementations must honor these semantics:
|
|
286
276
|
|
|
287
277
|
- Executable paths belong to one execution world shared with the mounted filesystem provider.
|
|
288
|
-
- spawn returns
|
|
278
|
+
- spawn returns a live handle synchronously. Target identity remains provider-private; `done` resolves with the spawned command's exit facts and may reject for spawn or provider failures.
|
|
289
279
|
- Collect-mode readers are offset-based and non-consuming, so independent readers never consume one another's output; lossy reads report truncation and the spill file holding the complete stream when one exists. Piped streams are handed to the caller raw and never buffered here.
|
|
290
|
-
- SubprocessHandle.terminate (and the spec's abort signal)
|
|
280
|
+
- SubprocessHandle.terminate (and the spec's abort signal) starts the provider's documented procedure against its managed range. SubprocessHandle.waitForExit observes that same range so a consumer-owned teardown ladder can hold each tier on real quiescence; each provider documents its signalling and observability limits.
|
|
291
281
|
- Disposal of the service terminates all still-running managed processes and awaits their exit.
|
|
292
282
|
- spawnTerminal owns terminal allocation, text transport, foreground groups, signalling, and whole-session quiescence behind one awaited termination method; readiness and persistent-shell policy stay in the PTY consumer. Its output stream ends after queued terminal output when the top-level process exits.
|
|
293
283
|
|
|
@@ -305,18 +295,26 @@ Implementations must honor these semantics:
|
|
|
305
295
|
*/
|
|
306
296
|
abstract resolveExecutable( command: string, env?: Readonly<Record<string, string>>, signal?: AbortSignal, ): Promise<string>
|
|
307
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
|
+
|
|
308
305
|
/**
|
|
309
306
|
* Start one managed child process from a fully-specified spec; this seam
|
|
310
307
|
* applies no defaults.
|
|
311
308
|
* @param spec - argv, directory, stdio dispositions, grace, cancellation, and environment.
|
|
312
309
|
* @returns the live process handle (streams/readers, signalling, outcome promise).
|
|
310
|
+
* @throws synchronously when pre-aborted or when argv, cwd, environment, or grace is invalid before handle creation.
|
|
313
311
|
*/
|
|
314
312
|
abstract spawn(spec: SubprocessSpawnSpec): SubprocessHandle
|
|
315
313
|
|
|
316
314
|
/**
|
|
317
315
|
* Allocate a real terminal and start one owned process session. This is the
|
|
318
316
|
* only non-pipe process primitive: implementations own terminal byte I/O,
|
|
319
|
-
* foreground groups, signals, and
|
|
317
|
+
* foreground groups, signals, and whole-session quiescence.
|
|
320
318
|
* @param spec - fully specified argv, cwd, environment, dimensions, grace, and allocation cancellation.
|
|
321
319
|
* @returns the live terminal handle after allocation succeeds.
|
|
322
320
|
*/
|
|
@@ -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
|
|
|
@@ -42,7 +43,9 @@ interface ToolProviderResult {
|
|
|
42
43
|
|
|
43
44
|
## Prompt sections
|
|
44
45
|
|
|
45
|
-
`
|
|
46
|
+
The exported `PERSONA_PREFIX_SECTION` (`deployment:persona-prefix`) and `PERSONA_SUFFIX_SECTION` (`deployment:persona-suffix`) name the slots shared by global configuration and scoped contributions. Their `PromptSectionOrderName` entries are `DEPLOYMENT_PERSONA_PREFIX` and `DEPLOYMENT_PERSONA_SUFFIX`; the [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/system-prompt/README.md#configure-the-prompt) owns their placement and template configuration.
|
|
47
|
+
|
|
48
|
+
`PromptSection` is a readonly same-process registration contract. Its text may be static or resolved from the current assembly context. Sections sort by ascending order and then code-unit name; repository contributors resolve the service-owned named allocation through `getSectionOrder()`. Runtime-context contributors resolve their independent allocation through `getContextOrder()`. One effective `complete` section becomes the sole prompt section after cooperative assembly. agent-loop renders the assembled sections with `renderPrompt` and commits the text as a `system/message` surface node — appended as surface node 0 on the first step, then replaced in place when the rendered text changes or, when the prepared call declares `systemPromptUpdate: 'in-history'`, appended after the cached history for non-empty updates in a continuing series — so the prompt reaches the model as a message of derived history rather than as a request field ([decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md); [decision rule](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent-loop/README.md#understand-the-implementation)).
|
|
46
49
|
|
|
47
50
|
```ts type-equiv
|
|
48
51
|
/** One contributed section of the system prompt (registry input). */
|
|
@@ -57,9 +60,11 @@ interface PromptSection {
|
|
|
57
60
|
/**
|
|
58
61
|
* Static text or a provider evaluated at each assembly with that assembly's
|
|
59
62
|
* {@link AssembleContext}. The text may reference `{{variable}}`s — they are
|
|
60
|
-
* interpolated later, by {@link renderPrompt}.
|
|
63
|
+
* interpolated later, by {@link renderPrompt}, unless `interpolate` is false.
|
|
61
64
|
*/
|
|
62
65
|
readonly text: string | ((context: AssembleContext) => string)
|
|
66
|
+
/** Whether to interpolate prompt variables. Defaults to true; false preserves literal text. */
|
|
67
|
+
readonly interpolate?: boolean
|
|
63
68
|
/**
|
|
64
69
|
* Treat this contribution as the complete system prompt. Assembly still
|
|
65
70
|
* runs the cooperative waterfall so tools, contexts, and variables can be
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/token-meter.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/token-meter.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -81,7 +82,8 @@ Replay owner for one service-wide estimator and isolated per-session folds.
|
|
|
81
82
|
* usage is reused only when the latest successful call's canonical request
|
|
82
83
|
* envelope matches `requestHeader` and its total is no lower than that
|
|
83
84
|
* call's full route-priced anchor; otherwise the complete envelope and
|
|
84
|
-
* surface are repriced.
|
|
85
|
+
* surface are repriced. The anchor includes all surface nodes immediately
|
|
86
|
+
* before the assistant message, including inputs admitted after step/start.
|
|
85
87
|
*
|
|
86
88
|
* `requestHeader` replaces the latest logged envelope for pressure and node
|
|
87
89
|
* pricing; the node set always describes the current session surface. Every
|