dsh-plugin-dev-kb 1.6.0 → 1.8.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 +37 -0
- package/README.en.md +23 -6
- package/README.md +28 -8
- package/kb/INDEX.md +3 -3
- package/kb/README.md +9 -4
- package/kb/extra/AGENTS.md +1 -1
- package/kb/extra/cli-help.md +15 -7
- package/kb/extra/cli-help.zh.md +15 -7
- package/kb/extra/cookbook/adding-a-plugin-preview.md +18 -25
- package/kb/extra/cookbook/adding-a-plugin-preview.zh.md +18 -25
- package/kb/extra/cookbook/reviewing-persistence-type-changes.md +1 -1
- package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +1 -1
- package/kb/extra/cookbook/reviewing-ui-design.md +166 -0
- package/kb/extra/cookbook/reviewing-ui-design.zh.md +166 -0
- package/kb/extra/deepseek-llm-api-wire-extensions.md +2 -2
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +2 -2
- package/kb/extra/defensive-patterns/conversation-and-session.md +2 -2
- package/kb/extra/defensive-patterns/conversation-and-session.zh.md +2 -2
- package/kb/extra/defensive-patterns/general.md +2 -0
- package/kb/extra/defensive-patterns/general.zh.md +2 -0
- package/kb/extra/defensive-patterns/package-surface.md +1 -0
- package/kb/extra/defensive-patterns/package-surface.zh.md +1 -0
- package/kb/extra/defensive-patterns/remote-and-api.md +5 -3
- package/kb/extra/defensive-patterns/remote-and-api.zh.md +5 -3
- package/kb/extra/development.md +16 -9
- package/kb/extra/development.zh.md +16 -9
- package/kb/extra/event-producer-consumer.md +64 -51
- package/kb/extra/event-producer-consumer.zh.md +64 -51
- package/kb/extra/i18n/README.md +2 -0
- package/kb/extra/i18n/README.zh.md +2 -0
- package/kb/extra/module-graph.md +204 -92
- package/kb/extra/module-graph.zh.md +204 -92
- package/kb/extra/persistence-changes/2026-10-13-liveshare-share-viewer-principal.md +60 -0
- package/kb/extra/persistence-changes/2026-10-13-liveshare-share-viewer-principal.zh.md +60 -0
- package/kb/extra/persistence-changes/2026-10-19-session-team-mode.md +48 -0
- package/kb/extra/persistence-changes/2026-10-19-session-team-mode.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-10-22-action-card-status.md +60 -0
- package/kb/extra/persistence-changes/2026-10-22-action-card-status.zh.md +60 -0
- package/kb/extra/persistence-changes/2026-10-25-skill-catalog-incomplete.md +60 -0
- package/kb/extra/persistence-changes/2026-10-25-skill-catalog-incomplete.zh.md +60 -0
- package/kb/extra/persistence-changes/2026-10-27-retry-control-input.md +60 -0
- package/kb/extra/persistence-changes/2026-10-27-retry-control-input.zh.md +60 -0
- package/kb/extra/persistence-changes/2026-10-27-subagent-settlement-attribution.md +60 -0
- package/kb/extra/persistence-changes/2026-10-27-subagent-settlement-attribution.zh.md +60 -0
- package/kb/extra/persistence-changes/2026-11-02-subagent-catalog-names.md +48 -0
- package/kb/extra/persistence-changes/2026-11-02-subagent-catalog-names.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-11-02-team-task-owner-names.md +48 -0
- package/kb/extra/persistence-changes/2026-11-02-team-task-owner-names.zh.md +48 -0
- package/kb/extra/persistence-changes/README.md +2 -0
- package/kb/extra/persistence-changes/README.zh.md +2 -0
- package/kb/extra/persistence-changes/historical-formats/README.md +1 -1
- package/kb/extra/persistence-changes/historical-formats/README.zh.md +1 -1
- package/kb/extra/rescope.md +7 -5
- package/kb/extra/rescope.zh.md +7 -5
- package/kb/extra/subsystems/agent-team.md +38 -75
- package/kb/extra/subsystems/agent-team.zh.md +38 -75
- package/kb/extra/subsystems/attachment.md +36 -13
- package/kb/extra/subsystems/attachment.zh.md +36 -13
- package/kb/extra/subsystems/boot.md +179 -5
- package/kb/extra/subsystems/boot.zh.md +179 -5
- package/kb/extra/subsystems/computer-use.md +78 -0
- package/kb/extra/subsystems/computer-use.zh.md +78 -0
- package/kb/extra/subsystems/deliverables.md +2 -0
- package/kb/extra/subsystems/deliverables.zh.md +2 -0
- package/kb/extra/subsystems/forge.md +1226 -0
- package/kb/extra/subsystems/forge.zh.md +1226 -0
- package/kb/extra/subsystems/liveshare.md +158 -0
- package/kb/extra/subsystems/liveshare.zh.md +158 -0
- package/kb/extra/subsystems/mcp.md +96 -1
- package/kb/extra/subsystems/mcp.zh.md +96 -1
- package/kb/extra/subsystems/worktrees.md +54 -3
- package/kb/extra/subsystems/worktrees.zh.md +54 -3
- package/kb/extra/testing.md +1 -1
- package/kb/extra/testing.zh.md +1 -1
- package/kb/extra/ui-design-review-cases.md +445 -0
- package/kb/extra/ui-design-review-cases.zh.md +445 -0
- package/kb/extra/ui-radius.md +3 -1
- package/kb/extra/ui-radius.zh.md +3 -1
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.md +1 -1
- package/kb/extra/upgrade-guide/v0.2.1-alpha.1/team-direct-inbox/guide.zh.md +1 -1
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/cordis-timer-wrappers/guide.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/cordis-timer-wrappers/guide.zh.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-manager-view-fields/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.2/plugin-manager-view-fields/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.4/model-switch-compaction/guide.md +30 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.4/model-switch-compaction/guide.zh.md +30 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.4/session-model-selection/guide.md +28 -0
- package/kb/extra/upgrade-guide/v0.2.1-alpha.4/session-model-selection/guide.zh.md +28 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.1/agent-instructions-chain-budgets/guide.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.1/agent-instructions-chain-budgets/guide.zh.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-runtime-owner/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-runtime-owner/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-team-subagents/guide.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/agent-team-subagents/guide.zh.md +31 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/approval-projection-dependency/guide.md +34 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/approval-projection-dependency/guide.zh.md +34 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-shutdown/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-shutdown/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-user-sources/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/auto-review-user-sources/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/built-in-japanese/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/built-in-japanese/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/conditional-tools/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/conditional-tools/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/context-menu-services/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/context-menu-services/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-consent-storage/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-consent-storage/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-preset-scope/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-preset-scope/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-relative-coordinates/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/cua-relative-coordinates/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/file-drag-callbacks/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/file-drag-callbacks/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/headless-policy-composition/guide.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/headless-policy-composition/guide.zh.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/model-badge-package-removal/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/model-badge-package-removal/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/new-session-blank-reuse/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/new-session-blank-reuse/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/node-24/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/node-24/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/official-bundle-lists/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/official-bundle-lists/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/persistent-terminal-controls/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/persistent-terminal-controls/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-default-capacities/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-default-capacities/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-model-catalog/guide.md +53 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-model-catalog/guide.zh.md +53 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-protocol-replay/guide.md +30 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/pi-ai-protocol-replay/guide.zh.md +30 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/ptc-script-format/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/ptc-script-format/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-desktop-context/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-desktop-context/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-minimal-checkpoints/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/sdk-minimal-checkpoints/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-projection-handles/guide.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-projection-handles/guide.zh.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-store-writes/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-store-writes/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-team-mode/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/session-team-mode/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-activation-options/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-activation-options/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-service-methods/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-service-methods/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-user-controls/guide.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/subagent-user-controls/guide.zh.md +26 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/tool-executor-plugins/guide.md +35 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/tool-executor-plugins/guide.zh.md +35 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/web-fetch-private-destinations/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/web-fetch-private-destinations/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/webserver-index-peer/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.2/webserver-index-peer/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/attachment-read-access/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/attachment-read-access/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/computer-use-helper-permissions/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/computer-use-helper-permissions/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/cua-bundle-id-consent/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/cua-bundle-id-consent/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/generated-worktree-names/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/generated-worktree-names/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/inbox-only-agent-wait/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/inbox-only-agent-wait/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/independent-session-forks/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/independent-session-forks/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/ptc-caller-cancellation/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/ptc-caller-cancellation/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/session-follow-activation/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/session-follow-activation/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/subagent-runtime-ownership/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/subagent-runtime-ownership/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-mode-menu/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-mode-menu/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-projection/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/team-projection/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-file-downloads/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-file-downloads/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-search-defaults/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.3/web-search-defaults/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.4/model-listing-refresh/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.4/model-listing-refresh/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.4/reasoning-body-props/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.1-rc.4/reasoning-body-props/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/context-menu-target/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/context-menu-target/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cordis-loader-entry-trees/guide.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cordis-loader-entry-trees/guide.zh.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/css-anchored-menus/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/css-anchored-menus/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cua-source-dev-helper/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/cua-source-dev-helper/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/desktop-stable-channel/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/desktop-stable-channel/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-git-permissions/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-git-permissions/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-worktree-entry/guide.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/forge-worktree-entry/guide.zh.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/fs-observation-policy-default-off/guide.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/fs-observation-policy-default-off/guide.zh.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-request-purpose-declarations/guide.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/llm-request-purpose-declarations/guide.zh.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/pi-ai-request-image-count/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/pi-ai-request-image-count/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-event-frames/guide.md +32 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-event-frames/guide.zh.md +32 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-released-checkpoint/guide.md +30 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-released-checkpoint/guide.zh.md +30 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-snapshot-scope/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/projection-snapshot-scope/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/retained-ptc-timeout/guide.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/retained-ptc-timeout/guide.zh.md +21 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-agent-tools/guide.md +37 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-agent-tools/guide.zh.md +37 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-remote-host-tasks/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/schedule-remote-host-tasks/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/sdk-run-commands/guide.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/sdk-run-commands/guide.zh.md +24 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/session-header-menu/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/session-header-menu/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/subagent-explicit-reasoning/guide.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/subagent-explicit-reasoning/guide.zh.md +20 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-credential-modes/guide.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-credential-modes/guide.zh.md +17 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-default-provider/guide.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.2/web-search-default-provider/guide.zh.md +19 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/chat-process-activity-context/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/chat-process-activity-context/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/subagent-names/guide.md +29 -0
- package/kb/extra/upgrade-guide/v0.2.2-alpha.3/subagent-names/guide.zh.md +29 -0
- package/kb/extra/web-styling.md +19 -1
- package/kb/extra/web-styling.zh.md +19 -1
- package/kb/meta/search-index.json +1272 -1098
- package/kb/meta/source.json +8 -4
- package/kb/site/develop/cordis-tutorial/04-events.md +1 -1
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +5 -4
- package/kb/site/develop/framework/events.md +1 -1
- package/kb/site/develop/practice/dynamic-cordis.md +1 -1
- package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -1
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +5 -4
- package/kb/site/en/develop/framework/events.md +1 -1
- package/kb/site/en/develop/practice/dynamic-cordis.md +1 -1
- package/kb/site/en/guide/network-proxy.md +1 -1
- package/kb/site/en/guide/plugin-market.md +10 -10
- package/kb/site/en/guide/providers.md +5 -1
- package/kb/site/en/guide/python-sdk.md +17 -2
- package/kb/site/en/guide/schedule.md +45 -26
- package/kb/site/en/reference/agent-lifecycle.md +3 -1
- package/kb/site/en/reference/api-gateway.md +4 -4
- package/kb/site/en/reference/capability-seams.md +65 -17
- package/kb/site/en/reference/config-catalog.md +560 -238
- package/kb/site/en/reference/cookbook/adding-a-package.md +4 -2
- package/kb/site/en/reference/cookbook/extension-cookbook.md +1 -1
- package/kb/site/en/reference/cordis-api/context.md +1 -1
- package/kb/site/en/reference/cordis-api/events.md +9 -9
- package/kb/site/en/reference/cordis-api/fiber.md +85 -32
- package/kb/site/en/reference/cordis-api/inherited.md +10 -9
- package/kb/site/en/reference/experimental-persistence-catalog.md +3 -0
- package/kb/site/en/reference/index.md +14 -8
- package/kb/site/en/reference/persistence-catalog.md +532 -246
- package/kb/site/en/reference/subsystems/client-modules.md +19 -11
- package/kb/site/en/reference/subsystems/compaction.md +1 -1
- package/kb/site/en/reference/subsystems/conversation.md +2 -0
- package/kb/site/en/reference/subsystems/core.md +119 -65
- package/kb/site/en/reference/subsystems/filesystem.md +202 -28
- package/kb/site/en/reference/subsystems/index.md +3 -1
- package/kb/site/en/reference/subsystems/llm-streaming.md +92 -4
- package/kb/site/en/reference/subsystems/persistence.md +17 -7
- package/kb/site/en/reference/subsystems/plan.md +4 -4
- package/kb/site/en/reference/subsystems/ptc-runtime.md +12 -5
- package/kb/site/en/reference/subsystems/sandbox.md +11 -4
- package/kb/site/en/reference/subsystems/schedule.md +194 -430
- package/kb/site/en/reference/subsystems/session-projection.md +186 -44
- package/kb/site/en/reference/subsystems/session-reference.md +4 -3
- package/kb/site/en/reference/subsystems/session.md +119 -31
- package/kb/site/en/reference/subsystems/sidebar-right.md +12 -11
- package/kb/site/en/reference/subsystems/skills.md +4 -4
- package/kb/site/en/reference/subsystems/slots.md +30 -3
- package/kb/site/en/reference/subsystems/storage.md +26 -9
- package/kb/site/en/reference/subsystems/subagent.md +119 -102
- package/kb/site/en/reference/subsystems/system-prompt.md +13 -11
- package/kb/site/en/reference/subsystems/token-meter.md +45 -0
- package/kb/site/en/reference/subsystems/tools.md +222 -82
- package/kb/site/en/reference/subsystems/typert.md +21 -11
- package/kb/site/en/reference/subsystems/user-questions.md +22 -6
- package/kb/site/en/reference/subsystems/web-client.md +1 -1
- package/kb/site/en/reference/subsystems/web-server.md +68 -23
- package/kb/site/en/reference/subsystems/web.md +79 -21
- package/kb/site/en/reference/tool-catalog.md +270 -395
- package/kb/site/en/reference/tool-execution-pipeline.md +5 -4
- package/kb/site/guide/network-proxy.md +1 -1
- package/kb/site/guide/plugin-market.md +10 -10
- package/kb/site/guide/providers.md +5 -1
- package/kb/site/guide/python-sdk.md +17 -2
- package/kb/site/guide/schedule.md +45 -26
- package/kb/site/reference/agent-lifecycle.md +3 -1
- package/kb/site/reference/api-gateway.md +4 -4
- package/kb/site/reference/capability-seams.md +65 -17
- package/kb/site/reference/config-catalog.md +560 -238
- package/kb/site/reference/cookbook/adding-a-package.md +4 -2
- package/kb/site/reference/cookbook/extension-cookbook.md +1 -1
- package/kb/site/reference/cordis-api/context.md +1 -1
- package/kb/site/reference/cordis-api/events.md +9 -9
- package/kb/site/reference/cordis-api/fiber.md +87 -32
- package/kb/site/reference/cordis-api/inherited.md +10 -9
- package/kb/site/reference/experimental-persistence-catalog.md +3 -0
- package/kb/site/reference/index.md +14 -8
- package/kb/site/reference/persistence-catalog.md +532 -246
- package/kb/site/reference/subsystems/client-modules.md +19 -11
- package/kb/site/reference/subsystems/compaction.md +1 -1
- package/kb/site/reference/subsystems/conversation.md +4 -0
- package/kb/site/reference/subsystems/core.md +119 -65
- package/kb/site/reference/subsystems/filesystem.md +202 -28
- package/kb/site/reference/subsystems/index.md +3 -1
- package/kb/site/reference/subsystems/llm-streaming.md +92 -4
- package/kb/site/reference/subsystems/persistence.md +17 -7
- package/kb/site/reference/subsystems/plan.md +4 -4
- package/kb/site/reference/subsystems/ptc-runtime.md +12 -5
- package/kb/site/reference/subsystems/sandbox.md +11 -4
- package/kb/site/reference/subsystems/schedule.md +197 -433
- package/kb/site/reference/subsystems/session-projection.md +186 -44
- package/kb/site/reference/subsystems/session-reference.md +4 -3
- package/kb/site/reference/subsystems/session.md +119 -31
- package/kb/site/reference/subsystems/sidebar-right.md +12 -11
- package/kb/site/reference/subsystems/skills.md +4 -4
- package/kb/site/reference/subsystems/slots.md +30 -3
- package/kb/site/reference/subsystems/storage.md +26 -9
- package/kb/site/reference/subsystems/subagent.md +119 -102
- package/kb/site/reference/subsystems/system-prompt.md +13 -11
- package/kb/site/reference/subsystems/token-meter.md +45 -0
- package/kb/site/reference/subsystems/tools.md +222 -82
- package/kb/site/reference/subsystems/typert.md +21 -11
- package/kb/site/reference/subsystems/user-questions.md +22 -6
- package/kb/site/reference/subsystems/web-client.md +1 -1
- package/kb/site/reference/subsystems/web-server.md +68 -23
- package/kb/site/reference/subsystems/web.md +79 -21
- package/kb/site/reference/tool-catalog.md +273 -399
- package/kb/site/reference/tool-execution-pipeline.md +4 -3
- package/lib/index.js +123 -8
- package/lib/kb-version.js +118 -0
- package/package.json +4 -2
- package/scripts/refresh-kb.mjs +153 -0
- package/scripts/selfcheck.mjs +18 -0
- package/scripts/smoke.mjs +77 -0
- package/skills/dsh-plugin-dev-kb.md +7 -6
- package/skills/dsh-plugin-starter.md +65 -0
- package/skills/dsh-upgrade-assistant.md +62 -0
- package/kb/extra/agent-lifecycle.md +0 -91
- package/kb/extra/agent-lifecycle.zh.md +0 -93
- package/kb/extra/api-gateway.md +0 -172
- package/kb/extra/api-gateway.zh.md +0 -178
- package/kb/extra/architecture.md +0 -165
- package/kb/extra/architecture.zh.md +0 -169
- package/kb/extra/capability-seams.md +0 -714
- package/kb/extra/capability-seams.zh.md +0 -716
- package/kb/extra/config-catalog.md +0 -4801
- package/kb/extra/config-catalog.zh.md +0 -4803
- package/kb/extra/cookbook/adding-a-package.md +0 -170
- package/kb/extra/cookbook/adding-a-package.zh.md +0 -170
- package/kb/extra/cookbook/adding-a-settings-card.md +0 -72
- package/kb/extra/cookbook/adding-a-settings-card.zh.md +0 -72
- package/kb/extra/cookbook/adding-a-tool.md +0 -101
- package/kb/extra/cookbook/adding-a-tool.zh.md +0 -103
- package/kb/extra/cookbook/adding-an-llm-adapter.md +0 -43
- package/kb/extra/cookbook/adding-an-llm-adapter.zh.md +0 -43
- package/kb/extra/cookbook/extension-cookbook.md +0 -132
- package/kb/extra/cookbook/extension-cookbook.zh.md +0 -136
- package/kb/extra/cordis-api/context.md +0 -364
- package/kb/extra/cordis-api/context.zh.md +0 -366
- package/kb/extra/cordis-api/events.md +0 -207
- package/kb/extra/cordis-api/events.zh.md +0 -209
- package/kb/extra/cordis-api/fiber.md +0 -375
- package/kb/extra/cordis-api/fiber.zh.md +0 -377
- package/kb/extra/cordis-api/inherited.md +0 -38
- package/kb/extra/cordis-api/registry.md +0 -152
- package/kb/extra/cordis-api/registry.zh.md +0 -154
- package/kb/extra/cordis-api/service.md +0 -102
- package/kb/extra/cordis-api/service.zh.md +0 -104
- package/kb/extra/cordis-tutorial/01-first-plugin.md +0 -95
- package/kb/extra/cordis-tutorial/01-first-plugin.zh.md +0 -95
- package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.md +0 -98
- package/kb/extra/cordis-tutorial/02-lifecycle-and-effects.zh.md +0 -98
- package/kb/extra/cordis-tutorial/03-services.md +0 -98
- package/kb/extra/cordis-tutorial/03-services.zh.md +0 -98
- package/kb/extra/cordis-tutorial/04-events.md +0 -144
- package/kb/extra/cordis-tutorial/04-events.zh.md +0 -144
- package/kb/extra/cordis-tutorial/05-config.md +0 -111
- package/kb/extra/cordis-tutorial/05-config.zh.md +0 -111
- package/kb/extra/cordis-tutorial/06-composition-and-hmr.md +0 -113
- package/kb/extra/cordis-tutorial/06-composition-and-hmr.zh.md +0 -113
- package/kb/extra/cordis-tutorial/07-into-the-harness.md +0 -108
- package/kb/extra/cordis-tutorial/07-into-the-harness.zh.md +0 -108
- package/kb/extra/cordis-tutorial/index.md +0 -60
- package/kb/extra/cordis-tutorial/index.zh.md +0 -62
- package/kb/extra/experimental-persistence-catalog.md +0 -17
- package/kb/extra/experimental-persistence-catalog.zh.md +0 -17
- package/kb/extra/persistence-catalog.md +0 -9140
- package/kb/extra/persistence-catalog.zh.md +0 -9142
- package/kb/extra/subsystems/README.md +0 -76
- package/kb/extra/subsystems/README.zh.md +0 -76
- package/kb/extra/subsystems/approval.md +0 -170
- package/kb/extra/subsystems/approval.zh.md +0 -170
- package/kb/extra/subsystems/client-modules.md +0 -198
- package/kb/extra/subsystems/client-modules.zh.md +0 -198
- package/kb/extra/subsystems/client-resources.md +0 -92
- package/kb/extra/subsystems/client-resources.zh.md +0 -92
- package/kb/extra/subsystems/commands.md +0 -223
- package/kb/extra/subsystems/commands.zh.md +0 -223
- package/kb/extra/subsystems/compaction.md +0 -284
- package/kb/extra/subsystems/compaction.zh.md +0 -284
- package/kb/extra/subsystems/conversation.md +0 -301
- package/kb/extra/subsystems/conversation.zh.md +0 -303
- package/kb/extra/subsystems/core.md +0 -1113
- package/kb/extra/subsystems/core.zh.md +0 -1125
- package/kb/extra/subsystems/credentials.md +0 -493
- package/kb/extra/subsystems/credentials.zh.md +0 -493
- package/kb/extra/subsystems/filesystem.md +0 -530
- package/kb/extra/subsystems/filesystem.zh.md +0 -530
- package/kb/extra/subsystems/goal.md +0 -313
- package/kb/extra/subsystems/goal.zh.md +0 -313
- package/kb/extra/subsystems/jobs.md +0 -554
- package/kb/extra/subsystems/jobs.zh.md +0 -554
- package/kb/extra/subsystems/llm-streaming.md +0 -1196
- package/kb/extra/subsystems/llm-streaming.zh.md +0 -1202
- package/kb/extra/subsystems/lsp.md +0 -202
- package/kb/extra/subsystems/lsp.zh.md +0 -202
- package/kb/extra/subsystems/permission-presets.md +0 -167
- package/kb/extra/subsystems/permission-presets.zh.md +0 -167
- package/kb/extra/subsystems/persistence.md +0 -418
- package/kb/extra/subsystems/persistence.zh.md +0 -418
- package/kb/extra/subsystems/plan.md +0 -87
- package/kb/extra/subsystems/plan.zh.md +0 -87
- package/kb/extra/subsystems/ptc-runtime.md +0 -250
- package/kb/extra/subsystems/ptc-runtime.zh.md +0 -250
- package/kb/extra/subsystems/sandbox.md +0 -221
- package/kb/extra/subsystems/sandbox.zh.md +0 -221
- package/kb/extra/subsystems/schedule.md +0 -550
- package/kb/extra/subsystems/schedule.zh.md +0 -550
- package/kb/extra/subsystems/scope.md +0 -59
- package/kb/extra/subsystems/scope.zh.md +0 -61
- package/kb/extra/subsystems/session-projection.md +0 -356
- package/kb/extra/subsystems/session-projection.zh.md +0 -356
- package/kb/extra/subsystems/session-query.md +0 -511
- package/kb/extra/subsystems/session-query.zh.md +0 -511
- package/kb/extra/subsystems/session-reference.md +0 -224
- package/kb/extra/subsystems/session-reference.zh.md +0 -224
- package/kb/extra/subsystems/session-telemetry.md +0 -212
- package/kb/extra/subsystems/session-telemetry.zh.md +0 -212
- package/kb/extra/subsystems/session-title.md +0 -213
- package/kb/extra/subsystems/session-title.zh.md +0 -213
- package/kb/extra/subsystems/session.md +0 -1339
- package/kb/extra/subsystems/session.zh.md +0 -1343
- package/kb/extra/subsystems/settings.md +0 -155
- package/kb/extra/subsystems/settings.zh.md +0 -155
- package/kb/extra/subsystems/shell.md +0 -314
- package/kb/extra/subsystems/shell.zh.md +0 -314
- package/kb/extra/subsystems/sidebar-right.md +0 -160
- package/kb/extra/subsystems/sidebar-right.zh.md +0 -160
- package/kb/extra/subsystems/skills.md +0 -352
- package/kb/extra/subsystems/skills.zh.md +0 -352
- package/kb/extra/subsystems/slots.md +0 -200
- package/kb/extra/subsystems/slots.zh.md +0 -204
- package/kb/extra/subsystems/spill.md +0 -124
- package/kb/extra/subsystems/spill.zh.md +0 -124
- package/kb/extra/subsystems/storage.md +0 -259
- package/kb/extra/subsystems/storage.zh.md +0 -259
- package/kb/extra/subsystems/subagent.md +0 -686
- package/kb/extra/subsystems/subagent.zh.md +0 -688
- package/kb/extra/subsystems/subprocess.md +0 -321
- package/kb/extra/subsystems/subprocess.zh.md +0 -321
- package/kb/extra/subsystems/system-prompt.md +0 -254
- package/kb/extra/subsystems/system-prompt.zh.md +0 -254
- package/kb/extra/subsystems/terminal.md +0 -184
- package/kb/extra/subsystems/terminal.zh.md +0 -184
- package/kb/extra/subsystems/token-meter.md +0 -106
- package/kb/extra/subsystems/token-meter.zh.md +0 -106
- package/kb/extra/subsystems/tools.md +0 -747
- package/kb/extra/subsystems/tools.zh.md +0 -747
- package/kb/extra/subsystems/typert.md +0 -690
- package/kb/extra/subsystems/typert.zh.md +0 -690
- package/kb/extra/subsystems/user-questions.md +0 -307
- package/kb/extra/subsystems/user-questions.zh.md +0 -307
- package/kb/extra/subsystems/web-client.md +0 -100
- package/kb/extra/subsystems/web-client.zh.md +0 -100
- package/kb/extra/subsystems/web-server.md +0 -302
- package/kb/extra/subsystems/web-server.zh.md +0 -302
- package/kb/extra/subsystems/web.md +0 -206
- package/kb/extra/subsystems/web.zh.md +0 -206
- package/kb/extra/subsystems/workflow.md +0 -278
- package/kb/extra/subsystems/workflow.zh.md +0 -278
- package/kb/extra/subsystems/workspace.md +0 -647
- package/kb/extra/subsystems/workspace.zh.md +0 -647
- package/kb/extra/tool-catalog.md +0 -2824
- package/kb/extra/tool-catalog.zh.md +0 -2832
- package/kb/extra/tool-execution-pipeline.md +0 -65
- package/kb/extra/tool-execution-pipeline.zh.md +0 -67
|
@@ -6,13 +6,13 @@ outline: [2,3]
|
|
|
6
6
|
|
|
7
7
|
# Subagents
|
|
8
8
|
|
|
9
|
-
The unified activation API manages local conversations and external executions.
|
|
9
|
+
The unified activation API manages local conversations and external executions. Creation ancestry, runtime ownership, and communication belong to the subagent tree. [Subagent controls](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent-control/README.md) own agent identity and exact-caller inbox waiting; Team tools add shared tasks and task policy.
|
|
10
10
|
|
|
11
11
|
## Capabilities and activation requests
|
|
12
12
|
|
|
13
13
|
Every backend uses startActivation. Capability flags validate request options; prepareContinuable selects local Agent creation, while start selects one external execution. The model-facing tool uses parent delivery. Workflow and code mode consumers can await caller results without injecting another parent message. Historical children with unavailable descriptors remain discoverable as `mode: 'unknown'` without granting continuation capabilities; the [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/README.md) defines catalog persistence.
|
|
14
14
|
|
|
15
|
-
Optional `
|
|
15
|
+
Optional `cwd` selects the child's initial directory; relative paths resolve against the parent's current effective directory. Omitting it captures that directory at admission. Local child Sessions retain the parent's original project, and cold resume retains their logged directory state.
|
|
16
16
|
|
|
17
17
|
```ts type-equiv
|
|
18
18
|
/**
|
|
@@ -32,15 +32,19 @@ interface SubagentCapabilities {
|
|
|
32
32
|
|
|
33
33
|
```ts type-equiv
|
|
34
34
|
/** One managed child execution and its result delivery policy. */
|
|
35
|
-
interface SubagentActivationSpec {
|
|
35
|
+
interface SubagentActivationSpec extends Omit<SubagentStartRequest, 'label' | 'signal'> {
|
|
36
36
|
/** Registered backend to use. */
|
|
37
37
|
readonly provider: string
|
|
38
38
|
/** Short task label retained in cataloged child membership. */
|
|
39
39
|
readonly label: string
|
|
40
|
+
/**
|
|
41
|
+
* Requested name, unique among the parent's children: 1–32 lower-case
|
|
42
|
+
* letters, digits, or hyphens starting with a letter, other than `lead`.
|
|
43
|
+
* Omission selects the first free `agent-N`.
|
|
44
|
+
*/
|
|
45
|
+
readonly name?: string
|
|
40
46
|
/** Optional reserved identity for a local child; external backends allocate their own ids. */
|
|
41
47
|
readonly childId?: SessionId
|
|
42
|
-
/** Task, parent, and backend-supported execution options. */
|
|
43
|
-
readonly request: Omit<SubagentStartRequest, 'label' | 'signal'>
|
|
44
48
|
/** Cancellation before publication; callers own later cancellation through dispose. */
|
|
45
49
|
readonly signal: AbortSignal
|
|
46
50
|
/** Parent delivery notifies the model; caller delivery only returns the result. Local children always enter the parent catalog. */
|
|
@@ -53,6 +57,11 @@ interface SubagentActivationSpec {
|
|
|
53
57
|
interface SubagentActivation {
|
|
54
58
|
/** Stable identity of the child. */
|
|
55
59
|
readonly childId: SessionId
|
|
60
|
+
/**
|
|
61
|
+
* Model-facing name: slash-separated names from the root when every creator
|
|
62
|
+
* below the root is named, otherwise the child Session id.
|
|
63
|
+
*/
|
|
64
|
+
readonly name: string
|
|
56
65
|
/** Accepted inbox message, when the backend has a local inbox. */
|
|
57
66
|
readonly messageId?: MessageId
|
|
58
67
|
/**
|
|
@@ -60,16 +69,15 @@ interface SubagentActivation {
|
|
|
60
69
|
* Teardown failures are reported by dispose() without replacing a captured result.
|
|
61
70
|
*/
|
|
62
71
|
readonly result: Promise<SubagentResult>
|
|
63
|
-
/** Stop and release this activation
|
|
72
|
+
/** Stop and release only this activation; rejects on teardown failure. */
|
|
64
73
|
dispose(): Promise<void>
|
|
65
74
|
}
|
|
66
75
|
```
|
|
67
76
|
|
|
68
77
|
```ts type-equiv
|
|
69
78
|
/**
|
|
70
|
-
* Task and optional capabilities supplied to a backend.
|
|
71
|
-
* these
|
|
72
|
-
* policy separately.
|
|
79
|
+
* Task and optional capabilities supplied to a backend. The activation spec
|
|
80
|
+
* shares these task options and defines its own label and cancellation policy.
|
|
73
81
|
*/
|
|
74
82
|
interface SubagentStartRequest {
|
|
75
83
|
/** Initial child directory; relative paths resolve against the parent's current directory. Omitted inherits that directory at start. */
|
|
@@ -175,9 +183,23 @@ interface ContinuableCreateSpec {
|
|
|
175
183
|
}
|
|
176
184
|
```
|
|
177
185
|
|
|
186
|
+
## Agent names
|
|
187
|
+
|
|
188
|
+
Session ids remain the only execution identity for routing, authorization, persistence, and task ownership; names are model-facing references. `SubagentActivation.name` is the child's full name, and `listDescendants()` rows carry it as `path` when every link from the root is named. `namesOf(agent)` reports the names of a live member and its direct creator; the root is `lead`. `resolveName(caller, name, signal)` returns the Session id for `lead` or a full name; any other text that names no member is returned unchanged as a Session id, while a slash-separated address that names no member fails with `AGENT_NAME_NOT_FOUND`. Callers authorize the result; resolution grants no authority. The [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/README.md#agent-names) defines the name rule, defaults, failures, and catalog persistence.
|
|
189
|
+
|
|
190
|
+
```ts type-equiv
|
|
191
|
+
/** Model-facing names of one live tree member and its direct creator. */
|
|
192
|
+
interface SubagentMemberNames {
|
|
193
|
+
/** `lead` for the root, the slash-separated path for a named descendant, otherwise the Session id. */
|
|
194
|
+
readonly self: string
|
|
195
|
+
/** The direct creator's name by the same rule; absent for the root. */
|
|
196
|
+
readonly parent?: string
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
178
200
|
## Messages and interruption
|
|
179
201
|
|
|
180
|
-
sendMessage
|
|
202
|
+
`sendMessage` requires the exact live sender and a target Session id in the same root tree. Root and continuable members can message across branches; admission revalidates the sender and root. Running targets receive Steer; only an absent target cold-resumes, while its creation ancestors may remain offline. External executions reject follow-ups. Local and external executions report final text, structured output, diagnostics, and status to their direct creator only while it is online; caller delivery suppresses those notices. `drainDescendants` awaits whole-tree teardown; an activation receipt’s `dispose()` releases only that execution.
|
|
181
203
|
|
|
182
204
|
```ts type-equiv
|
|
183
205
|
/** Durable attribution for one model-authored message between Agents. */
|
|
@@ -204,13 +226,15 @@ interface SubagentSettledMessageSource {
|
|
|
204
226
|
readonly form: 'notice'
|
|
205
227
|
/** One-line account of how the child ended. */
|
|
206
228
|
readonly summary: string
|
|
229
|
+
/** Exact execution stop reason; absent on historical notices. Writers always include it. */
|
|
230
|
+
readonly stopReason?: SubagentResult['stopReason']
|
|
207
231
|
/** Session id of the child that settled. */
|
|
208
232
|
readonly senderSessionId: SessionId
|
|
209
233
|
}
|
|
210
234
|
```
|
|
211
235
|
|
|
212
236
|
```ts type-equiv
|
|
213
|
-
/** Options for one model-authored message
|
|
237
|
+
/** Options for one model-authored message within a subagent tree. */
|
|
214
238
|
interface SubagentSendMessageOptions {
|
|
215
239
|
/** Caller cancellation, owning the operation only until inbox acceptance. */
|
|
216
240
|
readonly signal: AbortSignal
|
|
@@ -219,18 +243,18 @@ interface SubagentSendMessageOptions {
|
|
|
219
243
|
|
|
220
244
|
```ts type-equiv
|
|
221
245
|
/**
|
|
222
|
-
* Authority under which one interrupt request is admitted. `user`
|
|
223
|
-
*
|
|
224
|
-
*
|
|
246
|
+
* Authority under which one interrupt request is admitted. `user` is a trusted
|
|
247
|
+
* host operation; Remote callers need permission on the target Session before
|
|
248
|
+
* invoking it. `ancestor` carries an exact live Agent in the target's creation ancestry.
|
|
225
249
|
*/
|
|
226
250
|
type SubagentInterruptAuthority =
|
|
227
|
-
| { readonly kind: 'user'
|
|
251
|
+
| { readonly kind: 'user' }
|
|
228
252
|
| { readonly kind: 'ancestor'; readonly agent: Agent }
|
|
229
253
|
```
|
|
230
254
|
|
|
231
255
|
## Durable enumeration
|
|
232
256
|
|
|
233
|
-
|
|
257
|
+
The parent-owned `subagentCatalog` projection lists all local children and parent-delivery external children. Caller-delivery external executions leave membership and result collection to their caller; local workflow children remain discoverable after completion. External entries carry `mode: 'external'` and cannot open a child Session or accept follow-ups. Catalog entries record membership at creation without execution status. `list_agents` exposes the root and reachable continuable descendants with `running` or `inactive` activity; see the [control tool](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent-control/README.md#list_agents).
|
|
234
258
|
|
|
235
259
|
## Results and backend handles
|
|
236
260
|
|
|
@@ -376,13 +400,13 @@ interface SubagentProvider {
|
|
|
376
400
|
}
|
|
377
401
|
```
|
|
378
402
|
|
|
379
|
-
## Durable enumeration: `
|
|
403
|
+
## Durable enumeration: `listDescendants()` and catalog entries
|
|
380
404
|
|
|
381
405
|
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.
|
|
382
406
|
|
|
383
|
-
|
|
407
|
+
Direct-child entries are available as `observation.projections?.values.subagentCatalog` through `ctx.sessionQuery.observeSession(parentSessionId, { signal })`; callers release the observation with `using`. Entries follow parent event order without reading child logs or enumerating the Session corpus. Query failures propagate; a missing catalog projection means discovery is unavailable. 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.
|
|
384
408
|
|
|
385
|
-
`SubagentRuntime.listDescendants(rootSessionId)` recursively calls the same catalog reader in stable pre-order, preserving each parent's event order. External entries are leaves without local Sessions. 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
|
|
409
|
+
`SubagentRuntime.listDescendants(rootSessionId)` recursively calls the same catalog reader in stable pre-order, preserving each parent's event order. External entries are leaves without local Sessions. 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, root-relative depth, and, when every link from the root is named, its full name as `path`:
|
|
386
410
|
|
|
387
411
|
```ts type-equiv
|
|
388
412
|
/** One catalog descendant with its direct parent and edge distance from the requested root. */
|
|
@@ -391,6 +415,8 @@ type SubagentDescendantListEntry = SubagentListEntry & {
|
|
|
391
415
|
readonly parentId: SessionId
|
|
392
416
|
/** Edge distance from the requested root; direct children are `1`. */
|
|
393
417
|
readonly depth: number
|
|
418
|
+
/** Slash-separated names from the requested root; absent when this child or an ancestor below the root has no name. */
|
|
419
|
+
readonly path?: string
|
|
394
420
|
}
|
|
395
421
|
```
|
|
396
422
|
|
|
@@ -408,15 +434,7 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
408
434
|
|
|
409
435
|
### `ctx.subagentModelSelection` — `SubagentModelSelectionConfig`
|
|
410
436
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
```ts cordis-catalog
|
|
414
|
-
/**
|
|
415
|
-
* Read a detached selection preference for the next eligible Session composition.
|
|
416
|
-
* @returns the enabled state and exact allowed routes.
|
|
417
|
-
*/
|
|
418
|
-
current(): SubagentModelSelectionSettings
|
|
419
|
-
```
|
|
437
|
+
Host settings owner that records Session authorization before the first model request.
|
|
420
438
|
|
|
421
439
|
Source: [`packages/subagent/tool-subagent/src/model-selection-settings.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent/src/model-selection-settings.ts)
|
|
422
440
|
|
|
@@ -449,32 +467,66 @@ startActivation(spec: SubagentActivationSpec & { readonly childId: SessionId }):
|
|
|
449
467
|
startActivation(spec: SubagentActivationSpec): Promise<SubagentActivation>
|
|
450
468
|
|
|
451
469
|
/**
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
* @
|
|
455
|
-
* @
|
|
470
|
+
* Resolve the root shared by an Agent and its other agents in its subagent tree.
|
|
471
|
+
* @param caller - exact live Agent whose subagent ancestry selects the tree.
|
|
472
|
+
* @returns the live root; ordinary Session forks lead independent trees.
|
|
473
|
+
* @throws when the caller or its runtime owner is unavailable.
|
|
474
|
+
*/
|
|
475
|
+
rootOf(caller: Agent): Agent
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Report the model-facing names of a live tree member and its direct creator.
|
|
479
|
+
* The root is `lead`; a descendant is the slash-separated path of names from
|
|
480
|
+
* the root, or its Session id when it or a creator below the root has no name.
|
|
481
|
+
* @param agent - exact live root or resident tree member.
|
|
482
|
+
* @returns the member's name and, for a descendant, its creator's name.
|
|
483
|
+
* @throws when the caller or its runtime owner is unavailable.
|
|
484
|
+
*/
|
|
485
|
+
namesOf(agent: Agent): SubagentMemberNames
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Resolve a model-supplied agent reference within the caller's tree. `lead`
|
|
489
|
+
* selects the root and a slash-separated path is looked up through the
|
|
490
|
+
* catalogs along it. Any other text that is not a name in the tree is
|
|
491
|
+
* returned as a Session id, because a single token can be one; a
|
|
492
|
+
* slash-separated address never is, so an unmatched path fails instead of
|
|
493
|
+
* reaching a member lookup as an unknown id. Resolution grants no authority:
|
|
494
|
+
* messaging, interruption, and assignment authorize the result.
|
|
495
|
+
* @param caller - exact live Agent whose tree root anchors the lookup.
|
|
496
|
+
* @param name - `lead`, a full name from the root, or a Session id.
|
|
497
|
+
* @param signal - cancellation forwarded to each catalog read.
|
|
498
|
+
* @returns the referenced Session id.
|
|
499
|
+
* @throws {@link SubagentError} `AGENT_NAME_NOT_FOUND` when a path names no member;
|
|
500
|
+
* when the caller's root is unavailable; or when a catalog along the path cannot be read.
|
|
456
501
|
*/
|
|
457
|
-
async
|
|
502
|
+
async resolveName(caller: Agent, name: string, signal: AbortSignal): Promise<SessionId>
|
|
458
503
|
|
|
459
504
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
505
|
+
* Join progressing subagent tree work for its root. Idle members with parked input
|
|
506
|
+
* stay resident without delaying host completion. Ordinary members return false.
|
|
507
|
+
* @param root - exact live subagent tree root whose member work is awaited.
|
|
508
|
+
* @returns whether work was joined; hosts recheck root idle after true.
|
|
509
|
+
*/
|
|
510
|
+
async waitForTreeWork(root: Agent): Promise<boolean>
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Steer one model-authored message to another member of the same subagent tree.
|
|
514
|
+
* A running target receives it at its next step; an idle target starts a turn.
|
|
515
|
+
* A cold target resumes under its runtime subagent tree root without restoring
|
|
516
|
+
* its creation ancestors. Sender identity is rechecked before inbox acceptance; cancellation
|
|
517
|
+
* stops only pre-acceptance work and never retracts an accepted message.
|
|
518
|
+
* @param sender - exact live root or resident continuable Agent originating the message.
|
|
519
|
+
* @param targetId - another root or continuable member's durable Session id.
|
|
467
520
|
* @param content - model-authored content to deliver.
|
|
468
521
|
* @param options - caller cancellation before inbox acceptance.
|
|
469
522
|
* @returns the accepted message's inbox id.
|
|
470
|
-
* @throws when
|
|
471
|
-
* or the message was not admitted.
|
|
523
|
+
* @throws when the target is outside the tree, cannot resume, or rejects input.
|
|
472
524
|
*/
|
|
473
525
|
async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions, ): Promise<MessageId>
|
|
474
526
|
|
|
475
527
|
/**
|
|
476
|
-
* Interrupt one live child's current execution under a
|
|
477
|
-
*
|
|
528
|
+
* Interrupt one live child's current execution under a trusted user
|
|
529
|
+
* operation or an exact live ancestor Agent. Fire-and-return: the cancel
|
|
478
530
|
* signal is issued before this returns, but the target may keep running
|
|
479
531
|
* until it observes the signal. Unclaimed pending inbox work, the Activation,
|
|
480
532
|
* and published descendants are preserved; claimed work is not requeued.
|
|
@@ -483,47 +535,22 @@ async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[],
|
|
|
483
535
|
* is an accepted no-op, as is a manager-less composition, which cannot own a
|
|
484
536
|
* live Activation.
|
|
485
537
|
* @param targetSessionId - the durable child session id to interrupt.
|
|
486
|
-
* @param authority -
|
|
538
|
+
* @param authority - a trusted user operation or exact live ancestor Agent.
|
|
487
539
|
* @throws {SubagentError} `UNAUTHORIZED` when the authority does not own the
|
|
488
540
|
* live target.
|
|
489
541
|
*/
|
|
490
542
|
interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void
|
|
491
543
|
|
|
492
544
|
/**
|
|
493
|
-
* Close
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
* @param parents - exact host-owned parent Agents entering teardown.
|
|
499
|
-
* @returns once every retained descendant activation released its execution handle.
|
|
545
|
+
* Close admission and stop all instances in the selected subagent trees, then await
|
|
546
|
+
* pending startup and cleanup. Ordinary members are ignored. The cutoff lasts
|
|
547
|
+
* until each exact root leaves the registry; unrelated subagent trees remain live.
|
|
548
|
+
* @param parents - exact live subagent tree roots entering teardown.
|
|
549
|
+
* @returns once all admitted startup and member cleanup have settled.
|
|
500
550
|
* @throws an aggregate error after all branches settle when any failed.
|
|
501
551
|
*/
|
|
502
552
|
async drainDescendants(parents: readonly Agent[]): Promise<void>
|
|
503
553
|
|
|
504
|
-
/**
|
|
505
|
-
* Release selected resident direct children of one exact live
|
|
506
|
-
* parent. Other children of the same parent remain admitted and resident.
|
|
507
|
-
* Absent targets and a manager-less composition are accepted no-ops.
|
|
508
|
-
* @param parent - exact live direct parent authorizing the selected release.
|
|
509
|
-
* @param childIds - durable direct-child ids to release when resident.
|
|
510
|
-
* @returns once every selected activation released its execution handle.
|
|
511
|
-
* @throws {SubagentError} `UNAUTHORIZED` when a resident target belongs to a
|
|
512
|
-
* different parent or the supplied parent identity is stale.
|
|
513
|
-
*/
|
|
514
|
-
async drainChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* Read the parent's durable direct-child catalog without loading or resuming an Agent.
|
|
518
|
-
* The service owns and releases the live-preferred Session observation.
|
|
519
|
-
* @param parentSessionId - parent whose direct children are requested.
|
|
520
|
-
* @param signal - cancellation forwarded to the Session query.
|
|
521
|
-
* @returns catalog children in parent event order.
|
|
522
|
-
* @throws {@link SubagentError} when query or catalog projection is unavailable.
|
|
523
|
-
* @throws SessionQueryError when the parent cannot be read or the query is cancelled.
|
|
524
|
-
*/
|
|
525
|
-
listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<SubagentCatalogEntry[]>
|
|
526
|
-
|
|
527
554
|
/**
|
|
528
555
|
* Recursively list reachable parent catalogs in stable pre-order, preserving
|
|
529
556
|
* each catalog's event order. Each row carries its catalog parent and depth;
|
|
@@ -543,8 +570,8 @@ listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<Subagent
|
|
|
543
570
|
listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<SubagentDescendantListEntry[]>
|
|
544
571
|
|
|
545
572
|
/**
|
|
546
|
-
* Deliver one browser-authored message to a continuable child through
|
|
547
|
-
*
|
|
573
|
+
* Deliver one browser-authored message to a continuable child through its
|
|
574
|
+
* live subagent tree root, retaining the caller-minted request identity and
|
|
548
575
|
* validated browser zone on the accepted message. Success identifies the
|
|
549
576
|
* message the child's inbox accepted; later execution is independent of this
|
|
550
577
|
* call. Queue delivery targets a later turn; steer delivery targets the
|
|
@@ -552,31 +579,27 @@ listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<Subagen
|
|
|
552
579
|
* Image parts are admitted and persisted through the attachment store
|
|
553
580
|
* before delivery, and the child's model must accept image input.
|
|
554
581
|
* Cold resume at capacity rejects with `subagent/delivery-unavailable`.
|
|
555
|
-
*
|
|
582
|
+
* Access is checked on the target Session before attachment admission or restoration.
|
|
583
|
+
* @param request - target id, delivery, minted identity, content, and optional browser zone.
|
|
556
584
|
* @param signal - carrier cancellation, owning the call until inbox acceptance.
|
|
557
585
|
* @returns the accepted message's inbox identity.
|
|
558
586
|
* @throws {RemoteError} `gateway/bad-request`, `subagent/attachment-invalid`,
|
|
559
|
-
* `subagent/invalid-time-zone`,
|
|
587
|
+
* `subagent/invalid-time-zone`,
|
|
560
588
|
* `subagent/not-resumable`, `subagent/unauthorized`,
|
|
561
589
|
* `subagent/delivery-unavailable`, `gateway/cancelled`, or `gateway/internal`.
|
|
562
590
|
*/
|
|
563
|
-
@Remote('prompt') async prompt(request: SubagentPromptRequest, signal: AbortSignal): Promise<SubagentPromptReceipt>
|
|
591
|
+
@Remote({ name: 'prompt', resources: { session: request => request.childSessionId } }) async prompt(request: SubagentPromptRequest, signal: AbortSignal): Promise<SubagentPromptReceipt>
|
|
564
592
|
|
|
565
593
|
/**
|
|
566
|
-
* Remote face of {@link interrupt}
|
|
567
|
-
* catalog, history, persistence, or parent Agent lookup runs
|
|
568
|
-
* primitive alone authorizes the address against the live Activation, which
|
|
569
|
-
* is what keeps a live child interruptible while its parent Agent is offline.
|
|
594
|
+
* Remote face of {@link interrupt}, authorized on the target Session by the Gateway.
|
|
595
|
+
* No catalog, history, persistence, or parent Agent lookup runs.
|
|
570
596
|
* Absent, idle, and already-completed targets are accepted no-ops there.
|
|
571
597
|
* @param childSessionId - durable child session id to interrupt.
|
|
572
|
-
* @param parentSessionId - durable direct parent whose authority is claimed.
|
|
573
|
-
* @param mode - required continuable-address discriminator.
|
|
574
598
|
* @returns acknowledgement that the cancel signal was admitted, not that the target is quiescent.
|
|
575
599
|
* @throws {RemoteError} `gateway/bad-request` for an empty id,
|
|
576
|
-
* `subagent/unauthorized` when the address does not own the live target,
|
|
577
600
|
* otherwise `gateway/internal`.
|
|
578
601
|
*/
|
|
579
|
-
@Remote(
|
|
602
|
+
@Remote({ name: 'interruptByUser', resources: { session: childSessionId => childSessionId } }) interruptByUser(childSessionId: SessionId): SubagentInterruptReceipt
|
|
580
603
|
|
|
581
604
|
/**
|
|
582
605
|
* Register a provider under its name. Registration is effect-scoped and HMR
|
|
@@ -594,12 +617,6 @@ registerProvider(provider: SubagentProvider): () => void
|
|
|
594
617
|
* @returns the provider, or undefined when absent.
|
|
595
618
|
*/
|
|
596
619
|
getProvider(name: string): SubagentProvider | undefined
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* List registered provider names in insertion order.
|
|
600
|
-
* @returns the registered names.
|
|
601
|
-
*/
|
|
602
|
-
list(): string[]
|
|
603
620
|
```
|
|
604
621
|
|
|
605
622
|
Types: [Agent](./core.md) · [ContentBlock](./llm-streaming.md) · [MessageId](./llm-streaming.md) · [SessionId](./core.md)
|
|
@@ -614,14 +631,14 @@ Source: [`packages/subagent/subagent/src/index.ts`](https://github.com/deepseek-
|
|
|
614
631
|
|
|
615
632
|
#### `subagent/end` — emit
|
|
616
633
|
|
|
617
|
-
A published child settled. Scope-filtered dispatch uses the same
|
|
634
|
+
A published child settled. Scope-filtered dispatch uses the same subagent tree-root carrier as `subagent/start`, so the lifecycle pair reaches the same scoped audience.
|
|
618
635
|
|
|
619
636
|
```ts cordis-catalog
|
|
620
637
|
/**
|
|
621
|
-
* A published child settled. Scope-filtered dispatch uses the same
|
|
622
|
-
*
|
|
638
|
+
* A published child settled. Scope-filtered dispatch uses the same subagent tree-root
|
|
639
|
+
* carrier as `subagent/start`, so the lifecycle pair reaches the
|
|
623
640
|
* same scoped audience.
|
|
624
|
-
* @param info -
|
|
641
|
+
* @param info - run identity, durable direct creator `parentSessionId`, and terminal outcome.
|
|
625
642
|
* @mode emit
|
|
626
643
|
*/
|
|
627
644
|
'subagent/end'(this: Scoped<SubagentRuntime>, info: SubagentRunEndInfo): void
|
|
@@ -669,16 +686,16 @@ Source: [`packages/subagent/subagent/src/index.ts`](https://github.com/deepseek-
|
|
|
669
686
|
|
|
670
687
|
#### `subagent/start` — emit
|
|
671
688
|
|
|
672
|
-
A provider established a published child. For in-process providers, `ctx.agents.get(info.id)` resolves during this notification. Scope-filtered dispatch keys the carrier by the
|
|
689
|
+
A provider established a published child. For in-process providers, `ctx.agents.get(info.id)` resolves during this notification. Scope-filtered dispatch keys the carrier by the subagent tree root, so a root-scoped listener observes all subagent tree activations. Paired with `subagent/end`.
|
|
673
690
|
|
|
674
691
|
```ts cordis-catalog
|
|
675
692
|
/**
|
|
676
693
|
* A provider established a published child. For in-process providers,
|
|
677
694
|
* `ctx.agents.get(info.id)` resolves during this notification.
|
|
678
|
-
* Scope-filtered dispatch keys the carrier by the
|
|
679
|
-
*
|
|
695
|
+
* Scope-filtered dispatch keys the carrier by the subagent tree root, so a
|
|
696
|
+
* root-scoped listener observes all subagent tree activations. Paired with
|
|
680
697
|
* `subagent/end`.
|
|
681
|
-
* @param info -
|
|
698
|
+
* @param info - provider, child identity, and durable direct creator `parentSessionId`.
|
|
682
699
|
* @mode emit
|
|
683
700
|
*/
|
|
684
701
|
'subagent/start'(this: Scoped<SubagentRuntime>, info: SubagentRunInfo): void
|
|
@@ -12,7 +12,7 @@ Source: [`packages/core/system-prompt/src/index.ts`](https://github.com/deepseek
|
|
|
12
12
|
|
|
13
13
|
## Assembly context
|
|
14
14
|
|
|
15
|
-
`AssembleContext` identifies the scope layer one assembly resolves and may carry the explicit control signal for that request. It is merge-extensible: `dsh-agent` adds
|
|
15
|
+
`AssembleContext` identifies the scope layer one assembly resolves and may carry the explicit control signal for that request. It is merge-extensible: `dsh-agent` adds optional `agent` and `modelSelection` fields. `assembleContextFor(agent, signal)` sets the agent, scope, and signal; the loop supplies the model selection captured for the step and retained across retries, with omitted reasoning effort using adapter defaults. A bare assembly has neither scope nor signal.
|
|
16
16
|
|
|
17
17
|
```ts type-equiv
|
|
18
18
|
/** Merge-extensible context for one prompt assembly. */
|
|
@@ -27,6 +27,8 @@ interface AssembleContext {
|
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
`TOOL_APPLY_PATCH` takes order 1350 between `TOOL_EDIT` (1300) and `TOOL_GLOB` (1400).
|
|
31
|
+
|
|
30
32
|
## Tool-provider result
|
|
31
33
|
|
|
32
34
|
`ToolProviderResult.schemas` is the model-visible set for the current assembly. `knownNames` is the provider's pre-restriction name universe used to distinguish a configured-name typo from a known tool that is deliberately hidden in this scope.
|
|
@@ -197,12 +199,12 @@ refreshContext(assembly: PromptAssembly, context: AssembleContext = {}): PromptA
|
|
|
197
199
|
|
|
198
200
|
/**
|
|
199
201
|
* Assemble global and scoped providers, detach tool parameters, apply
|
|
200
|
-
* canonical ordering, then run the
|
|
201
|
-
* variables shadow globals. The
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* @param context - the optional scope and plugin-defined assembly fields.
|
|
205
|
-
* @returns the post-waterfall assembly with any complete prompt enforced.
|
|
202
|
+
* canonical ordering, then run the presentation waterfall. Scoped sections
|
|
203
|
+
* and variables shadow globals. The waterfall's text is authoritative except
|
|
204
|
+
* that an effective complete section is restored afterwards as the sole
|
|
205
|
+
* prompt section; tool declarations stay provider-owned.
|
|
206
|
+
* @param context - the optional scope, step tool set, and plugin-defined assembly fields.
|
|
207
|
+
* @returns the post-waterfall assembly with ordered tool declarations and any complete prompt enforced.
|
|
206
208
|
*/
|
|
207
209
|
async assemble(context: AssembleContext = {}): Promise<PromptAssembly>
|
|
208
210
|
```
|
|
@@ -217,13 +219,13 @@ Source: [`packages/core/system-prompt/src/index.ts`](https://github.com/deepseek
|
|
|
217
219
|
|
|
218
220
|
#### `system-prompt/assemble` — waterfall
|
|
219
221
|
|
|
220
|
-
|
|
222
|
+
Presentation waterfall over assembled sections, contexts, and variables. Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): scoped listeners receive only that scope's assemblies. The returned text is authoritative; tool declarations remain provider-owned. A supplied signal controls only this explicit assembly request and must not be retained to control later turns. A registered complete section is restored after this waterfall, so listeners cannot add to or replace that scope's system prompt.
|
|
221
223
|
|
|
222
224
|
```ts cordis-catalog
|
|
223
225
|
/**
|
|
224
|
-
*
|
|
226
|
+
* Presentation waterfall over assembled sections, contexts, and variables.
|
|
225
227
|
* Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): scoped listeners
|
|
226
|
-
* receive only that scope's assemblies. The returned
|
|
228
|
+
* receive only that scope's assemblies. The returned text is authoritative; tool declarations remain provider-owned.
|
|
227
229
|
* A supplied signal controls only this explicit assembly request and must not
|
|
228
230
|
* be retained to control later turns. A registered complete section is
|
|
229
231
|
* restored after this waterfall, so listeners cannot add to or replace
|
|
@@ -232,7 +234,7 @@ Expert waterfall over the assembled sections, contexts, tools, and variables. Sc
|
|
|
232
234
|
* @param context - the caller's per-assembly context.
|
|
233
235
|
* @mode waterfall
|
|
234
236
|
*/
|
|
235
|
-
'system-prompt/assemble'(this: Scoped<SystemPrompt>, assembly:
|
|
237
|
+
'system-prompt/assemble'(this: Scoped<SystemPrompt>, assembly: PromptPresentation, context: AssembleContext, next: () => Promise<PromptPresentation>): Promise<PromptPresentation>
|
|
236
238
|
```
|
|
237
239
|
|
|
238
240
|
Types: [Scoped](./scope.md)
|
|
@@ -57,6 +57,44 @@ interface TokenSurfaceNode {
|
|
|
57
57
|
|
|
58
58
|
Surface order is authoritative; replacement nodes can have higher durable seqs than later positional nodes. The snapshot is immutable and does not grow when the underlying replay fold advances.
|
|
59
59
|
|
|
60
|
+
## `ContextPressureProjection`
|
|
61
|
+
|
|
62
|
+
`ctx.tokenMeter.contextPressure(session)` synchronously reads the latest logged `pressureTokens` and `contextWindow`; the client projection also derives `projectedTokens` from surface changes. These display values do not price a new request; use `measure()` for request pricing.
|
|
63
|
+
|
|
64
|
+
Source: [`packages/llm/token-meter/src/projection.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/token-meter/src/projection.ts)
|
|
65
|
+
|
|
66
|
+
```ts type-equiv
|
|
67
|
+
/**
|
|
68
|
+
* Approximate context occupancy for a status display.
|
|
69
|
+
*
|
|
70
|
+
* The fields, when present, are deliberately NOT one atomic request
|
|
71
|
+
* observation: each is a last-wins record of a different moment. Switching
|
|
72
|
+
* models can therefore pair a fresh capacity with the previous route's
|
|
73
|
+
* pressure until the next request reports usage. This is an intentional trade
|
|
74
|
+
* — the value is a user-facing reference, not a billing or gating input. See
|
|
75
|
+
* the token-meter README for the full rationale.
|
|
76
|
+
*/
|
|
77
|
+
interface ContextPressureProjection {
|
|
78
|
+
/**
|
|
79
|
+
* Provider-reported prompt size of the most recent request: uncached input
|
|
80
|
+
* plus cache reads and writes. Response output is excluded, so this does not
|
|
81
|
+
* grow as the current turn streams. Absent until a provider reports usage.
|
|
82
|
+
*/
|
|
83
|
+
pressureTokens?: number
|
|
84
|
+
/**
|
|
85
|
+
* What the NEXT request's prompt would cost: {@link pressureTokens} plus the
|
|
86
|
+
* heuristic repricing of everything the surface gained or lost since that
|
|
87
|
+
* sample. Only the delta is estimated, so the figure stays anchored to the
|
|
88
|
+
* provider while still reacting the moment a compaction shadows a span —
|
|
89
|
+
* which `pressureTokens` alone cannot do, since compaction reports no usage
|
|
90
|
+
* of its own. Absent until a provider reports usage.
|
|
91
|
+
*/
|
|
92
|
+
projectedTokens?: number
|
|
93
|
+
/** Newest recorded route capacity; absent when no adapter advertised one. */
|
|
94
|
+
contextWindow?: number
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
60
98
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
61
99
|
|
|
62
100
|
<a id="cordis-surface"></a>
|
|
@@ -72,6 +110,13 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
72
110
|
Replay owner for one service-wide estimator and isolated per-session folds.
|
|
73
111
|
|
|
74
112
|
```ts cordis-catalog
|
|
113
|
+
/**
|
|
114
|
+
* Read the latest logged provider prompt size and route capacity.
|
|
115
|
+
* @param session - Session whose committed usage and request capacity are read.
|
|
116
|
+
* @returns context pressure; fields remain absent until their source events are recorded.
|
|
117
|
+
*/
|
|
118
|
+
contextPressure(session: Session): Pick<ContextPressureProjection, 'pressureTokens' | 'contextWindow'>
|
|
119
|
+
|
|
75
120
|
/**
|
|
76
121
|
* Measure current request pressure and surface through the durable tail.
|
|
77
122
|
*
|