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
|
@@ -34,7 +34,7 @@ interface ToolDefinition extends ToolSchema {
|
|
|
34
34
|
/**
|
|
35
35
|
* Run one accepted call and return only its canonical lossless-JSON value.
|
|
36
36
|
* Async work must observe or forward `exec.signal` and settle only after its
|
|
37
|
-
* owned work reaches quiescence. The
|
|
37
|
+
* owned work reaches quiescence. The executor preserves caller cancellation
|
|
38
38
|
* through around-dispatch signal replacement and does not abandon this
|
|
39
39
|
* promise, but it cannot hard-kill same-process code.
|
|
40
40
|
* @param args - losslessly snapshotted, frozen model arguments.
|
|
@@ -53,12 +53,12 @@ interface ToolDefinition extends ToolSchema {
|
|
|
53
53
|
*/
|
|
54
54
|
projectContent?(exec: Readonly<ToolExecution>, result: Readonly<ToolExecutionResult>): ContentBlock[] | undefined
|
|
55
55
|
/**
|
|
56
|
-
* Synchronous last-mile transform for model-facing content. The
|
|
56
|
+
* Synchronous last-mile transform for model-facing content. The executor
|
|
57
57
|
* snapshots this callback when execution starts and invokes it exactly once
|
|
58
58
|
* for every normalized outcome, including pipeline failures that bypass
|
|
59
59
|
* `tools/post-execute`, immediately before lossless materialization.
|
|
60
60
|
* Returning `undefined` preserves the content; every other result field
|
|
61
|
-
* remains
|
|
61
|
+
* remains executor-owned. The callback must be total and must not throw.
|
|
62
62
|
* @param exec - immutable execution identity and arguments.
|
|
63
63
|
* @param result - complete normalized outcome before materialization.
|
|
64
64
|
* @returns replacement content, or `undefined` to preserve it.
|
|
@@ -181,9 +181,140 @@ interface ToolRestriction {
|
|
|
181
181
|
}
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
+
## 条件准入 — 步骤拥有的准入集合
|
|
185
|
+
|
|
186
|
+
注册可以携带 `when` 条件。AgentLoop 为每个拟议步骤以捕获的模型选择调用一次 `ctx.tools.resolve()`;返回的集合决定该步骤的工具声明、执行器分区以及批次中的每次调用,包括 PTC 程序的子调用。`ctx.tools.executable()` 在执行时应用集合,没有集合时排除条件注册。同名替换或新的限制会阻止尚未开始的调用使用已准入的注册,步骤的批次结束后循环释放集合。
|
|
187
|
+
|
|
188
|
+
```ts type-equiv
|
|
189
|
+
/** Inputs for a tool's step-time activation condition. */
|
|
190
|
+
interface ToolActivationContext {
|
|
191
|
+
/** Agent preparing the step. */
|
|
192
|
+
readonly agent: Agent
|
|
193
|
+
/** Provider, model, and optional reasoning effort captured for the step. */
|
|
194
|
+
readonly modelSelection: Readonly<ModelSelection>
|
|
195
|
+
/** Cancellation of step preparation; asynchronous conditions must observe it. */
|
|
196
|
+
readonly signal: AbortSignal
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
```ts type-equiv
|
|
201
|
+
/** Lifecycle-owned conditions for a registered tool. */
|
|
202
|
+
interface ToolRegistrationOptions {
|
|
203
|
+
/**
|
|
204
|
+
* Decide whether the step's requests may call the tool. Omission enables
|
|
205
|
+
* it. False excludes it from both declarations and dispatch; rejection fails
|
|
206
|
+
* step preparation. Conditions must not mutate registrations or start tool work.
|
|
207
|
+
* @param context - preparing agent, captured model selection, and cancellation signal.
|
|
208
|
+
* @returns whether the tool participates in this step.
|
|
209
|
+
*/
|
|
210
|
+
readonly when?: (context: ToolActivationContext) => boolean | Promise<boolean>
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
```ts type-equiv
|
|
215
|
+
/** One step's admitted registrations, also used by nested PTC calls. */
|
|
216
|
+
interface ResolvedToolSet {
|
|
217
|
+
/** Close admission after the step's tool batch settles. */
|
|
218
|
+
dispose(): void
|
|
219
|
+
/**
|
|
220
|
+
* Read admitted registrations that remain visible in their original scope.
|
|
221
|
+
* @param scope - exact requesting agent; another scope is never admitted.
|
|
222
|
+
* @returns original definitions excluding removed or restricted registrations.
|
|
223
|
+
*/
|
|
224
|
+
view(scope: ScopeKey | undefined): ReadonlyMap<string, ToolDefinition>
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## 执行器与原始调用批次
|
|
229
|
+
|
|
230
|
+
`ctx.tools.execute()` 把完整的原始模型调用批次委托给最近作用域的执行器。服务在每个批次开始时选择当前提供者;提示词组装仅返回模型输入。`agent` 在独立服务调用中不存在;`log` 在模型步骤之外的程序调用(例如初始化钩子)中不存在。有 Agent 而没有 `log` 时,调用仍受该 Agent 的工具作用域约束,但不记录根调用/结果事件。工具自身的事件仍可使用 Agent 的 Session。
|
|
231
|
+
|
|
232
|
+
```ts type-equiv
|
|
233
|
+
/** Model-call schemas produced by an executor. */
|
|
234
|
+
type ToolModelInput = Pick<ToolProviderResult, 'schemas' | 'knownNames'>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
```ts type-equiv
|
|
238
|
+
/** Raw model calls, with optional Agent ownership and model-step logging. */
|
|
239
|
+
interface ToolBatchInput {
|
|
240
|
+
readonly calls: readonly ToolCallBlock[]
|
|
241
|
+
readonly signal: AbortSignal
|
|
242
|
+
/**
|
|
243
|
+
* Positive integer overriding the executor's concurrency limit for this batch.
|
|
244
|
+
* Applies to concurrency-safe root calls; program subcall limits remain separate.
|
|
245
|
+
* Undefined uses the executor's configured limit.
|
|
246
|
+
*/
|
|
247
|
+
readonly maxParallelToolCalls?: number
|
|
248
|
+
/**
|
|
249
|
+
* Owning Agent supplies scoped tools and execution context, including outside a turn.
|
|
250
|
+
* Undefined for standalone calls outside an Agent, such as a service invocation.
|
|
251
|
+
*/
|
|
252
|
+
readonly agent?: Agent
|
|
253
|
+
/**
|
|
254
|
+
* Step admission for every call in the batch, including program subcalls.
|
|
255
|
+
* Undefined admits only unconditional registrations.
|
|
256
|
+
*/
|
|
257
|
+
readonly toolSet?: ResolvedToolSet
|
|
258
|
+
/**
|
|
259
|
+
* Committed model step receiving root call/result events; requires `agent`.
|
|
260
|
+
* Undefined when `agent` is absent or for calls outside a model response, such
|
|
261
|
+
* as session initialization hooks. Without `log`, root call/result events are
|
|
262
|
+
* omitted while `agent`, when provided, still supplies scope and execution context.
|
|
263
|
+
*/
|
|
264
|
+
readonly log?: {
|
|
265
|
+
readonly turn: number
|
|
266
|
+
readonly step: number
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
```ts type-equiv
|
|
272
|
+
/** One settled result correlated with its original model call. */
|
|
273
|
+
interface ToolCallResult {
|
|
274
|
+
readonly callId: ToolCallId
|
|
275
|
+
readonly result: ToolExecutionResult
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
```ts type-equiv
|
|
280
|
+
/** Model-ordered outcomes and context accepted for the next step. */
|
|
281
|
+
interface ToolBatchResult {
|
|
282
|
+
readonly results: readonly ToolCallResult[]
|
|
283
|
+
readonly additionalContexts: readonly UserMessage[]
|
|
284
|
+
readonly concluded: boolean
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
```ts type-equiv
|
|
289
|
+
/** A plugin owns argument parsing, dispatch, scheduling, cancellation, and logging. */
|
|
290
|
+
interface ToolExecutor {
|
|
291
|
+
/** Guidance registered and disposed with this executor; absent means no executor-owned sections. */
|
|
292
|
+
readonly sections?: readonly ToolPromptSection[]
|
|
293
|
+
/**
|
|
294
|
+
* Describe the model's callable tools.
|
|
295
|
+
* @param tools - currently visible capability definitions, after scoped restrictions.
|
|
296
|
+
* @returns schemas and names used to validate tool ordering.
|
|
297
|
+
*/
|
|
298
|
+
describe(tools: readonly ToolDefinition[]): ToolModelInput
|
|
299
|
+
/**
|
|
300
|
+
* Execute a complete batch. With log, commit root call/result events to the
|
|
301
|
+
* Agent's Session; without log, omit those events. Tool-owned events may still
|
|
302
|
+
* use the owning Agent's Session. Return
|
|
303
|
+
* one outcome per input call in input order, including skipped calls on abort.
|
|
304
|
+
* Never settle while started work is still running. Internal failures reject
|
|
305
|
+
* with ToolBatchExecutionError after draining, preserving committed outcomes
|
|
306
|
+
* and context; callers must stop dependent work and repair missing log results.
|
|
307
|
+
* An explicit maxParallelToolCalls takes precedence over executor configuration.
|
|
308
|
+
* @param input - original calls, cancellation, optional concurrency override, Agent and logging step.
|
|
309
|
+
* @returns settled results, deferred context, and whether a success concludes the turn.
|
|
310
|
+
*/
|
|
311
|
+
execute(input: ToolBatchInput): Promise<ToolBatchResult>
|
|
312
|
+
}
|
|
313
|
+
```
|
|
314
|
+
|
|
184
315
|
## 执行:可扩展的 waterfall(瀑布式事件)加单调策略
|
|
185
316
|
|
|
186
|
-
|
|
317
|
+
内置执行器把解析后的 `ToolExecutionInput` 交给共享 `ToolExecutionPipeline`。流水线负责参数快照、执行身份、策略瀑布、工具分发和最终结果通知,每次返回一个 `ToolExecutionResult`。自定义执行器可以独立实现这些行为;公开的 `ToolExecutor` 只要求工具描述和批次执行方法。
|
|
187
318
|
|
|
188
319
|
```ts type-equiv
|
|
189
320
|
/** Opaque call identity that permits correlation without exposing mutable execution state. */
|
|
@@ -192,8 +323,8 @@ type ToolExecutionToken = symbol & { readonly [toolExecutionTokenBrand]: true }
|
|
|
192
323
|
|
|
193
324
|
```ts type-equiv
|
|
194
325
|
/**
|
|
195
|
-
*
|
|
196
|
-
* adds
|
|
326
|
+
* Parsed input to the shared invocation pipeline. The pipeline
|
|
327
|
+
* adds its own token to form a {@link ToolExecution};
|
|
197
328
|
* callers do not choose that token.
|
|
198
329
|
*/
|
|
199
330
|
interface ToolExecutionInput {
|
|
@@ -210,14 +341,16 @@ interface ToolExecutionInput {
|
|
|
210
341
|
readonly arguments: unknown
|
|
211
342
|
/** The agent on whose behalf the call runs (set by the agent loop). */
|
|
212
343
|
readonly agent?: Agent
|
|
344
|
+
/** Step admission shared by Native and PTC dispatch. Conditional tools require it. */
|
|
345
|
+
readonly toolSet?: ResolvedToolSet
|
|
213
346
|
/**
|
|
214
347
|
* Opaque token of the enclosing transport execution, when one exists. PTC
|
|
215
348
|
* mode sets this on SDK sub-dispatches so commit-style observers can wait for
|
|
216
349
|
* the outer `run_code` outcome without receiving its live mutable execution.
|
|
217
350
|
* The token also marks the call as a transport sub-dispatch rather than a
|
|
218
|
-
* model-direct call:
|
|
351
|
+
* model-direct call: with the PTC executor selected, only calls with a parent may
|
|
219
352
|
* execute a native tool name — a model-direct call (no parent) is denied as
|
|
220
|
-
* `UNKNOWN_TOOL` before the policy pipeline.
|
|
353
|
+
* `UNKNOWN_TOOL` before the policy pipeline.
|
|
221
354
|
*/
|
|
222
355
|
readonly parent?: ToolExecutionToken
|
|
223
356
|
/** Required caller-owned cancellation for this invocation. */
|
|
@@ -229,7 +362,7 @@ interface ToolExecutionInput {
|
|
|
229
362
|
|
|
230
363
|
```ts type-equiv
|
|
231
364
|
/**
|
|
232
|
-
* Runtime context handed to a tool implementation after the
|
|
365
|
+
* Runtime context handed to a tool implementation after the executor has
|
|
233
366
|
* accepted a {@link ToolExecution}. {@link deferContext} attaches context to
|
|
234
367
|
* this execution's own result — a composite tool ferries nested-dispatch
|
|
235
368
|
* context back to the outer result, and a leaf tool may mint a fresh
|
|
@@ -298,16 +431,16 @@ interface PtcDispatchLog {
|
|
|
298
431
|
|
|
299
432
|
```ts type-equiv
|
|
300
433
|
/**
|
|
301
|
-
* One pending tool call inside the
|
|
434
|
+
* One pending tool call inside the executor pipeline. Parsed arguments cross
|
|
302
435
|
* one lossless-JSON materialization boundary before policy and are deep-frozen;
|
|
303
|
-
* call identity, the caller signal, and the
|
|
304
|
-
* readonly. The
|
|
436
|
+
* call identity, the caller signal, and the executor-assigned {@link token} are
|
|
437
|
+
* readonly. The executor freezes the complete object before `tools/result`
|
|
305
438
|
* observers run.
|
|
306
439
|
*/
|
|
307
440
|
interface ToolExecution extends ToolExecutionInput {
|
|
308
441
|
/** Root model-requested call, resolved for every root and nested execution. */
|
|
309
442
|
readonly rootCallId: ToolCallId
|
|
310
|
-
/**
|
|
443
|
+
/** Executor-assigned identity shared with nested calls only as their opaque `parent` token. */
|
|
311
444
|
readonly token: ToolExecutionToken
|
|
312
445
|
}
|
|
313
446
|
```
|
|
@@ -316,7 +449,7 @@ interface ToolExecution extends ToolExecutionInput {
|
|
|
316
449
|
/**
|
|
317
450
|
* Around-dispatch view of a {@link ToolExecution}. A `tools/execute` wrapper
|
|
318
451
|
* may replace the signal for its delegated lifetime, but it cannot remove it.
|
|
319
|
-
* The
|
|
452
|
+
* The executor fuses every replacement with the captured caller signal.
|
|
320
453
|
*/
|
|
321
454
|
interface ToolDispatchExecution extends Omit<ToolExecution, 'signal'> {
|
|
322
455
|
/** Cancellation signal visible to the next wrapper or tool body. */
|
|
@@ -505,33 +638,21 @@ type ObjectJsonSchema = JsonSchemaNode & { type: 'object' }
|
|
|
505
638
|
|
|
506
639
|
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).
|
|
507
640
|
|
|
508
|
-
<a id="ctxtools--
|
|
641
|
+
<a id="ctxtools--toolsservice"></a>
|
|
509
642
|
|
|
510
|
-
### `ctx.tools` — `
|
|
643
|
+
### `ctx.tools` — `ToolsService`
|
|
511
644
|
|
|
512
|
-
|
|
645
|
+
Concrete tool registry and scoped executor dispatcher.
|
|
513
646
|
|
|
514
647
|
```ts cordis-catalog
|
|
515
|
-
/**
|
|
516
|
-
* Present the calling scope's tools in `mode` instead of the deployment
|
|
517
|
-
* default. Nearest scope on the chain wins, so a preset's standing
|
|
518
|
-
* declaration covers every agent joined under it.
|
|
519
|
-
*
|
|
520
|
-
* Scoped only, and one declaration per scope: this is how an agent preset
|
|
521
|
-
* composes PTC mode agents beside native ones in the same process, and a
|
|
522
|
-
* process-global override would be the `mode` config field instead.
|
|
523
|
-
* @param mode - the presentation the covered agents' models see.
|
|
524
|
-
* @returns the exact disposer that restores the deployment default.
|
|
525
|
-
*/
|
|
526
|
-
presentAs(mode: ToolPresentationMode): () => void
|
|
527
|
-
|
|
528
648
|
/**
|
|
529
649
|
* Register globally or in the calling agent scope. Scoped tools shadow
|
|
530
650
|
* globals; duplicates within one layer and the reserved `run_code` name fail.
|
|
531
651
|
* @param definition - tool schema, execution, and optional finalization/presentation callbacks.
|
|
652
|
+
* @param options - optional step-time activation condition.
|
|
532
653
|
* @returns the exact disposer that unregisters the tool.
|
|
533
654
|
*/
|
|
534
|
-
register(definition: ToolDefinition): () => void
|
|
655
|
+
register(definition: ToolDefinition, options: ToolRegistrationOptions = {}): () => void
|
|
535
656
|
|
|
536
657
|
/**
|
|
537
658
|
* Restrict global tools for the calling agent scope. Empty filters, unknown
|
|
@@ -542,18 +663,6 @@ register(definition: ToolDefinition): () => void
|
|
|
542
663
|
*/
|
|
543
664
|
restrict(filter: ToolRestriction): () => void
|
|
544
665
|
|
|
545
|
-
/**
|
|
546
|
-
* Register a monotonic guard after the extensible `tools/pre-execute`
|
|
547
|
-
* waterfall. A plain-context guard applies globally; one registered through
|
|
548
|
-
* `agent.ctx` applies only to that agent. Any matching guard may deny by
|
|
549
|
-
* returning a reason, while no guard can force-allow a call another guard
|
|
550
|
-
* denied. The exact effect disposer is returned for ordered ownership and
|
|
551
|
-
* HMR cleanup.
|
|
552
|
-
* @param guard - synchronous check; a returned string denies the execution.
|
|
553
|
-
* @returns the exact disposer that unregisters the guard.
|
|
554
|
-
*/
|
|
555
|
-
guard(guard: ToolGuard): () => void
|
|
556
|
-
|
|
557
666
|
/**
|
|
558
667
|
* Look up a tool as one scope sees it (scoped
|
|
559
668
|
* shadows global; a restricted-away global reads as absent). Presenters pass
|
|
@@ -561,42 +670,76 @@ guard(guard: ToolGuard): () => void
|
|
|
561
670
|
* actually executed.
|
|
562
671
|
* @param name - the tool name as registered.
|
|
563
672
|
* @param scope - the viewing scope (the agent); omitted = the global view.
|
|
673
|
+
* @param toolSet - step admission; omit only to inspect registered definitions.
|
|
564
674
|
* @returns the definition the scope resolves, or undefined when none is visible.
|
|
565
675
|
*/
|
|
566
|
-
get(name: string, scope?: ScopeKey): ToolDefinition | undefined
|
|
676
|
+
get(name: string, scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolDefinition | undefined
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Resolve the definition a call may execute. With a step's admitted set, the
|
|
680
|
+
* set decides; without one, conditional registrations are unavailable.
|
|
681
|
+
* @param name - the tool name as registered.
|
|
682
|
+
* @param scope - the calling agent; omitted = the global view.
|
|
683
|
+
* @param toolSet - step admission, or omitted for a call outside a model step.
|
|
684
|
+
* @returns the executable definition, or undefined when the call must fail as `UNKNOWN_TOOL`.
|
|
685
|
+
*/
|
|
686
|
+
executable(name: string, scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolDefinition | undefined
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Resolve conditions once for this step without changing shared registrations.
|
|
690
|
+
* Cancellation or a rejected condition publishes no partial selection. Removed
|
|
691
|
+
* registrations cannot be restored by a late condition result.
|
|
692
|
+
* @param context - preparing agent, captured model selection, and cancellation.
|
|
693
|
+
* @returns the complete selection; the caller disposes it after its tool batch settles.
|
|
694
|
+
*/
|
|
695
|
+
async resolve(context: ToolActivationContext): Promise<ResolvedToolSet>
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Read the visible capability definitions for descriptions and program bindings.
|
|
699
|
+
* @param scope - viewing Agent or preset; omitted selects the global view.
|
|
700
|
+
* @param toolSet - step admission; omit only to inspect registered definitions.
|
|
701
|
+
* @returns definitions after scoped shadowing and restrictions, limited to the step's admission when given.
|
|
702
|
+
*/
|
|
703
|
+
definitions(scope?: ScopeKey, toolSet?: ResolvedToolSet): readonly ToolDefinition[]
|
|
567
704
|
|
|
568
705
|
/**
|
|
569
706
|
* Project visible definitions onto the allowlisted model-facing schema fields,
|
|
570
707
|
* excluding execution and presentation callbacks.
|
|
571
708
|
* @param scope - the viewing scope (the agent); omitted = the global view.
|
|
709
|
+
* @param toolSet - step admission, or omitted for registered-definition inspection.
|
|
572
710
|
* @returns one deep-cloned schema per visible tool.
|
|
573
711
|
*/
|
|
574
|
-
schemas(scope?: ScopeKey): ToolSchema[]
|
|
712
|
+
schemas(scope?: ScopeKey, toolSet?: ResolvedToolSet): ToolSchema[]
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Provide the executor for the calling scope; an unscoped contribution is the deployment default.
|
|
716
|
+
* Rendering any executor-owned section requires the viewing scope's selection to remain available.
|
|
717
|
+
* @param executor - initialized provider owned by the contributing plugin.
|
|
718
|
+
* @returns the effect disposer. Unloading leaves the selection unavailable until it is replaced.
|
|
719
|
+
*/
|
|
720
|
+
setExecutor(executor: ToolExecutor): () => void
|
|
575
721
|
|
|
576
722
|
/**
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
* @
|
|
581
|
-
* @returns the fail-closed scheduling mode.
|
|
723
|
+
* Delegate a raw call batch to its Agent's provider or the deployment default.
|
|
724
|
+
* Select at dispatch; accepted batches settle through that provider even if it unloads.
|
|
725
|
+
* @param input - original calls, optional owning Agent, and optional logging step.
|
|
726
|
+
* @returns the selected executor's settled batch; unavailable selections reject.
|
|
582
727
|
*/
|
|
583
|
-
|
|
728
|
+
async execute(input: ToolBatchInput): Promise<ToolBatchResult>
|
|
584
729
|
|
|
585
730
|
/**
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
* reports `UNKNOWN_TOOL`. The returned outcome is the same lossless, frozen
|
|
590
|
-
* snapshot final observers receive. Cancellation
|
|
591
|
-
* arriving after entry and before final result materialization skips a
|
|
592
|
-
* not-yet-started body with `ABORTED_BEFORE_DISPATCH` or replaces a
|
|
593
|
-
* successful started outcome with `ABORTED`; already-started work is still
|
|
594
|
-
* drained and may retain a tool-owned structured error.
|
|
595
|
-
* @param exec - the typed same-process call input. The registry assigns its
|
|
596
|
-
* correlation token before policy begins.
|
|
597
|
-
* @returns the materialized final result.
|
|
731
|
+
* Register a monotonic denial in the calling scope.
|
|
732
|
+
* @param guard - evaluated after extensible pre-execute policy by the shared pipeline.
|
|
733
|
+
* @returns the effect disposer that removes this guard.
|
|
598
734
|
*/
|
|
599
|
-
|
|
735
|
+
guard(guard: ToolGuard): () => void
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Check global and inherited guards after pre-execute policy and approval resolve.
|
|
739
|
+
* @param exec - invocation whose guards are checked before dispatch.
|
|
740
|
+
* @returns the first denial reason, or undefined when no guard denies.
|
|
741
|
+
*/
|
|
742
|
+
checkGuards(exec: ToolExecution): string | undefined
|
|
600
743
|
```
|
|
601
744
|
|
|
602
745
|
Types: [ScopeKey](./scope.md)
|
|
@@ -611,22 +754,19 @@ Source: [`packages/core/tools/src/index.ts`](https://github.com/deepseek-ai/deep
|
|
|
611
754
|
|
|
612
755
|
#### `tools/change` — emit
|
|
613
756
|
|
|
614
|
-
A tool was registered or unregistered, or a scoped restriction changed
|
|
757
|
+
A tool was registered or unregistered, or a scoped restriction changed. Unfiltered registry notification: scoped listeners receive changes from every scope because a global contribution can affect every agent's next assembly.
|
|
615
758
|
|
|
616
759
|
```ts cordis-catalog
|
|
617
760
|
/**
|
|
618
|
-
* A tool was registered or unregistered, or a scoped restriction changed
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
* dispatch: a global change concerns every agent's next assembly, so a
|
|
622
|
-
* scoped listener subscribing here sees every change, not just its own
|
|
623
|
-
* scope's.
|
|
761
|
+
* A tool was registered or unregistered, or a scoped restriction changed.
|
|
762
|
+
* Unfiltered registry notification: scoped listeners receive changes from every
|
|
763
|
+
* scope because a global contribution can affect every agent's next assembly.
|
|
624
764
|
* @mode emit
|
|
625
765
|
*/
|
|
626
766
|
'tools/change'(): void
|
|
627
767
|
```
|
|
628
768
|
|
|
629
|
-
Source: [`packages/core/tools/src/
|
|
769
|
+
Source: [`packages/core/tools/src/events.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/events.ts)
|
|
630
770
|
|
|
631
771
|
<a id="toolsexecute--waterfall"></a>
|
|
632
772
|
|
|
@@ -645,12 +785,12 @@ Around-dispatch waterfall for timeout, retry, or metrics. `next()` returns a nor
|
|
|
645
785
|
* @param exec - the allowed call about to dispatch (name, parsed arguments, caller agent, signal).
|
|
646
786
|
* @mode waterfall
|
|
647
787
|
*/
|
|
648
|
-
'tools/execute'(this: Scoped<
|
|
788
|
+
'tools/execute'(this: Scoped<ToolsService>, exec: ToolDispatchExecution, next: () => Promise<ToolExecutionResult>): Promise<ToolExecutionResult>
|
|
649
789
|
```
|
|
650
790
|
|
|
651
791
|
Types: [Scoped](./scope.md)
|
|
652
792
|
|
|
653
|
-
Source: [`packages/core/tools/src/
|
|
793
|
+
Source: [`packages/core/tools/src/events.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/events.ts)
|
|
654
794
|
|
|
655
795
|
<a id="toolspost-execute--waterfall"></a>
|
|
656
796
|
|
|
@@ -670,12 +810,12 @@ Accept, replace, enrich, or block a normalized dispatch result. `next()` accepts
|
|
|
670
810
|
* @param result - the dispatch outcome a listener may accept, replace, or block.
|
|
671
811
|
* @mode waterfall
|
|
672
812
|
*/
|
|
673
|
-
'tools/post-execute'(this: Scoped<
|
|
813
|
+
'tools/post-execute'(this: Scoped<ToolsService>, exec: ToolExecution, result: Readonly<ToolExecutionResult>, next: () => Promise<PostToolDecision>): Promise<PostToolDecision>
|
|
674
814
|
```
|
|
675
815
|
|
|
676
816
|
Types: [Scoped](./scope.md)
|
|
677
817
|
|
|
678
|
-
Source: [`packages/core/tools/src/
|
|
818
|
+
Source: [`packages/core/tools/src/events.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/events.ts)
|
|
679
819
|
|
|
680
820
|
<a id="toolspre-execute--waterfall"></a>
|
|
681
821
|
|
|
@@ -694,12 +834,12 @@ Allow, deny, cancel, or ask before dispatch. `next()` delegates to allow; `cance
|
|
|
694
834
|
* @param exec - the pending call (name, parsed arguments, caller agent).
|
|
695
835
|
* @mode waterfall
|
|
696
836
|
*/
|
|
697
|
-
'tools/pre-execute'(this: Scoped<
|
|
837
|
+
'tools/pre-execute'(this: Scoped<ToolsService>, exec: ToolExecution, next: () => Promise<PreToolDecision>): Promise<PreToolDecision>
|
|
698
838
|
```
|
|
699
839
|
|
|
700
840
|
Types: [Scoped](./scope.md)
|
|
701
841
|
|
|
702
|
-
Source: [`packages/core/tools/src/
|
|
842
|
+
Source: [`packages/core/tools/src/events.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/events.ts)
|
|
703
843
|
|
|
704
844
|
<a id="toolsptc-dispatch-log--waterfall"></a>
|
|
705
845
|
|
|
@@ -721,12 +861,12 @@ Allow a listener to replace content in the DURABLE LOG COPY of one `run_code` su
|
|
|
721
861
|
* @param dispatch - the parent execution, sub-call identity, and the settled content to log.
|
|
722
862
|
* @mode waterfall
|
|
723
863
|
*/
|
|
724
|
-
'tools/ptc-dispatch-log'(this: Scoped<
|
|
864
|
+
'tools/ptc-dispatch-log'(this: Scoped<ToolsService>, dispatch: PtcDispatchLog, next: () => Promise<ContentBlock[]>): Promise<ContentBlock[]>
|
|
725
865
|
```
|
|
726
866
|
|
|
727
867
|
Types: [ContentBlock](./llm-streaming.md) · [Scoped](./scope.md)
|
|
728
868
|
|
|
729
|
-
Source: [`packages/core/
|
|
869
|
+
Source: [`packages/core/tool-executor-ptc/src/runtime-types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tool-executor-ptc/src/runtime-types.ts)
|
|
730
870
|
|
|
731
871
|
<a id="toolsresult--emit"></a>
|
|
732
872
|
|
|
@@ -742,10 +882,10 @@ Observe the frozen, lossless-JSON final outcome. Listener failures are contained
|
|
|
742
882
|
* @param result - a deep-frozen snapshot of the final returned result.
|
|
743
883
|
* @mode emit
|
|
744
884
|
*/
|
|
745
|
-
'tools/result'(this: Scoped<
|
|
885
|
+
'tools/result'(this: Scoped<ToolsService>, exec: Readonly<ToolExecution>, result: Readonly<ToolExecutionResult>): undefined
|
|
746
886
|
```
|
|
747
887
|
|
|
748
888
|
Types: [Scoped](./scope.md)
|
|
749
889
|
|
|
750
|
-
Source: [`packages/core/tools/src/
|
|
890
|
+
Source: [`packages/core/tools/src/events.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/events.ts)
|
|
751
891
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -290,7 +290,7 @@ interface RemoteInvocation {
|
|
|
290
290
|
|
|
291
291
|
## Remote 访问资源
|
|
292
292
|
|
|
293
|
-
每个 Remote 方法都受 [`dsh-api-remote-access`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/remote-access/README.zh.md) 的访问控制:只有当该 principal 种类的 policy 在调用访问的每个资源上都绑定了列出该端点 action 的 role 时,非 owner 调用才被放行。拥有某个身份类型的包把其资源种类声明合并进 `TypertResourceMap`;内置的无身份资源 `global` 从不是其中的种类。Gateway 从 `@Remote({ resources })` 或 `@RemoteScope(key, { resources })` 的 `resources` 读取函数读取某个种类的身份,其次是把该种类声明为 `resource` 的 lookup 参数或作用域 Context,再次是在 `typert.resources`
|
|
293
|
+
每个 Remote 方法都受 [`dsh-api-remote-access`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/remote-access/README.zh.md) 的访问控制:只有当该 principal 种类的 policy 在调用访问的每个资源上都绑定了列出该端点 action 的 role 时,非 owner 调用才被放行。拥有某个身份类型的包把其资源种类声明合并进 `TypertResourceMap`;内置的无身份资源 `global` 从不是其中的种类。Gateway 从 `@Remote({ resources })` 或 `@RemoteScope(key, { resources })` 的 `resources` 读取函数读取某个种类的身份,其次是把该种类声明为 `resource` 的 lookup 参数或作用域 Context,再次是在 `typert.resources` 中登记的默认字段或 resolver;不指向任何资源的调用访问 `global`。决策由 [Peer 身份属性 Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-10-12-peer-principal-and-remote-access.zh.md) 负责。
|
|
294
294
|
|
|
295
295
|
```ts type-equiv
|
|
296
296
|
/**
|
|
@@ -338,11 +338,14 @@ interface RemoteScopeOptions<WireArgs extends readonly unknown[] = never> {
|
|
|
338
338
|
* throw, an empty list, or an identity other than a non-empty string
|
|
339
339
|
* refuses the call. For a kind without a reader, the Gateway reads the
|
|
340
340
|
* identity of a scoped Context whose Host adapter declares that `resource`
|
|
341
|
-
* and of lookup parameters declaring it, else the
|
|
342
|
-
* `typert.resources`: a
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
341
|
+
* and of lookup parameters declaring it, else the registered default of
|
|
342
|
+
* `typert.resources`: a `resolve` function receiving the validated named
|
|
343
|
+
* wire values and their ordered parameters, or a `field` naming a top-level
|
|
344
|
+
* argument or, failing that, a field of the first object argument. A
|
|
345
|
+
* throwing resolver, an array result, or a field holding an array refuses
|
|
346
|
+
* the call. A call that carries no identity touches `global`. The readers
|
|
347
|
+
* and these defaults together must name every resource the method accesses:
|
|
348
|
+
* access control never checks a resource they omit.
|
|
346
349
|
*/
|
|
347
350
|
readonly resources?: TypertResourceReaders<WireArgs>
|
|
348
351
|
}
|
|
@@ -362,7 +365,7 @@ interface RemoteMethodOptions<WireArgs extends readonly unknown[] = never> exten
|
|
|
362
365
|
|
|
363
366
|
## Typert 注册表
|
|
364
367
|
|
|
365
|
-
`ctx.typert` 分开保存当前环境的 descriptor、显式选择的 Remote contribution、lookup
|
|
368
|
+
`ctx.typert` 分开保存当前环境的 descriptor、显式选择的 Remote contribution、lookup 提供方、作用域上下文提供方与资源种类的默认字段或 resolver。lookup 提供方拥有稳定 wire 声明和默认 resolver;Host 组合可以为同一个 key 配置 effect-scoped 同步或异步 resolver,配置卸载后恢复默认策略。各项注册都是由 Cordis 持有的 effect,并返回可等待的 disposer。
|
|
366
369
|
|
|
367
370
|
```ts type-equiv
|
|
368
371
|
/** Minimal Typert runtime consumed through dependency inversion. */
|
|
@@ -445,6 +448,8 @@ interface TypertGateway {
|
|
|
445
448
|
* @returns whether an owner stream is open and has not been cancelled.
|
|
446
449
|
*/
|
|
447
450
|
hasLiveClient(): boolean
|
|
451
|
+
/** @returns detached metadata for all unsettled forwarded events in arrival order. */
|
|
452
|
+
getPendingRemoteEvents(): readonly PendingRemoteEventInfo[]
|
|
448
453
|
/**
|
|
449
454
|
* Register the application-selected forwarded-event source.
|
|
450
455
|
* @param source - stream factory installed by the Remote assembly.
|
|
@@ -565,10 +570,9 @@ decide(request: RemoteAccessRequest<Principal>): RemoteAccessDecision
|
|
|
565
570
|
allows(resource: RemoteAccessResource): boolean
|
|
566
571
|
|
|
567
572
|
/**
|
|
568
|
-
* The baseline a page opens with before its snapshot stream connects
|
|
569
|
-
*
|
|
570
|
-
* {@link REMOTE_ACCESS_SNAPSHOT_KEY}
|
|
571
|
-
* replacing the owner baseline the webServer index carries.
|
|
573
|
+
* The baseline a page opens with before its snapshot stream connects; every
|
|
574
|
+
* index the webServer renders carries it under
|
|
575
|
+
* {@link REMOTE_ACCESS_SNAPSHOT_KEY} for the Peer the page speaks for.
|
|
572
576
|
* @param principal - the page's caller identity.
|
|
573
577
|
* @returns the owner baseline for the owner; otherwise the principal's current grants.
|
|
574
578
|
*/
|
|
@@ -666,6 +670,12 @@ Resolve strict generated definitions or conservative SRC markers against current
|
|
|
666
670
|
*/
|
|
667
671
|
hasLiveClient(): boolean
|
|
668
672
|
|
|
673
|
+
/**
|
|
674
|
+
* Inspect unsettled forwarded events without changing their lifetime.
|
|
675
|
+
* @returns detached event names and Agent identities.
|
|
676
|
+
*/
|
|
677
|
+
getPendingRemoteEvents(): readonly PendingRemoteEventInfo[]
|
|
678
|
+
|
|
669
679
|
/**
|
|
670
680
|
* Register the sole application-selected forwarded-event source.
|
|
671
681
|
* @param source - stream factory installed by the Remote assembly.
|
|
@@ -26,7 +26,7 @@ interface AskUserQuestionOption {
|
|
|
26
26
|
|
|
27
27
|
## 呈现意图
|
|
28
28
|
|
|
29
|
-
`AskUserQuestionIntent`
|
|
29
|
+
`AskUserQuestionIntent` 改变呈现方式,保留选项标签和调用方的决策规则。`plan-review` 指定批准选项,并要求提供计划正文。`approval` 要求只有一个阻塞式问题,带有说明以及互不相同的拒绝、允许和可选的始终允许标签,完整对应已提供的选项,不支持多选或计时等待。CUA 前端通过现有 composer 呈现自己的固定审批;普通问答和计划审阅继续使用原有呈现。
|
|
30
30
|
|
|
31
31
|
```ts type-equiv
|
|
32
32
|
/**
|
|
@@ -47,6 +47,23 @@ type AskUserQuestionIntent = {
|
|
|
47
47
|
approve: string
|
|
48
48
|
/** Logged tool invocation whose arguments contain the reviewed plan. */
|
|
49
49
|
callId?: ToolCallId
|
|
50
|
+
} | {
|
|
51
|
+
/** A blocking permission decision with fixed actions and no free-text answer. */
|
|
52
|
+
kind: 'approval'
|
|
53
|
+
/** Option label granting the scope described by the caller. */
|
|
54
|
+
approve: string
|
|
55
|
+
/** Option label refusing the requested access. */
|
|
56
|
+
reject: string
|
|
57
|
+
/** Optional persistent grant offered only when the caller supports it. */
|
|
58
|
+
always?: string
|
|
59
|
+
/** Metadata for human recognition; the caller admits icon sources, which the UI may load as URLs. Never an authorization identity. */
|
|
60
|
+
subject?: { name: string; icon?: string }
|
|
61
|
+
/** Localized question and limited-grant label; fixed cards own reject/always wording. Option labels remain answer values. */
|
|
62
|
+
display?: {
|
|
63
|
+
question: { en: string; [locale: string]: string }
|
|
64
|
+
detail?: { en: string; [locale: string]: string }
|
|
65
|
+
approve?: { en: string; [locale: string]: string }
|
|
66
|
+
}
|
|
50
67
|
}
|
|
51
68
|
```
|
|
52
69
|
|
|
@@ -265,17 +282,16 @@ async askTimed( request: AskUserQuestionRequest & { agent: Agent }, callId: Tool
|
|
|
265
282
|
* Ask the scoped answerer waterfall and wait for the user's answer.
|
|
266
283
|
*
|
|
267
284
|
* When a caller supplies an agent, human interaction is valid only for the
|
|
268
|
-
* exact live
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* root may ask normally.
|
|
285
|
+
* exact live instance of an ordinary Session. Explicit subagent origin
|
|
286
|
+
* rejects delegated callers; historical ordinary forks may retain parent
|
|
287
|
+
* metadata and still ask normally.
|
|
272
288
|
*
|
|
273
289
|
* @param request Questions, owner agent, and abort signal.
|
|
274
290
|
* @returns The answer chosen or typed by the human.
|
|
275
291
|
* @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
|
|
276
292
|
* is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
|
|
277
293
|
* is not the registry's exact live instance, or `DELEGATED_CALLER` when
|
|
278
|
-
* that live agent
|
|
294
|
+
* that live agent has subagent origin.
|
|
279
295
|
*/
|
|
280
296
|
async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>
|
|
281
297
|
```
|
|
@@ -27,7 +27,7 @@ Web Client 是由独立加载插件组装而成的浏览器侧 Cordis 应用。
|
|
|
27
27
|
|
|
28
28
|
Host 把组合后的 `WebBootGraph` 写入 `window.__DSH_BOOT__`,并在 parser-preloaded script 执行前安装浏览器 module-loader facade。模块系统是一张 lazy CommonJS 表:加载 bundle 只注册 factory;materialize entry 时才以同步 `require` 运行 factory,并解析 platform module 和已声明的动态依赖。
|
|
29
29
|
|
|
30
|
-
Web boot kernel 创建模块系统、预取 `immediately` entry、挂载 vendored Cordis Loader,再创建图中的每个 entry。Cordis service injection 决定激活顺序;module graph 顺序只决定同步 import 能否被 materialize。完整 roster 到达 settled
|
|
30
|
+
Web boot kernel 创建模块系统、预取 `immediately` entry、挂载 vendored Cordis Loader,再创建图中的每个 entry。Cordis service injection 决定激活顺序;module graph 顺序只决定同步 import 能否被 materialize。完整 roster 到达 settled 状态且启动审计通过后(浏览器必需名单中的 entry 未激活会拒绝启动;其他未激活 entry 输出一条控制台警告),`ui-renderer` hydrate 不依赖框架的 boot DOM,并调用唯一一次 context 级 `renderSlot('root')`。[Client Modules](./client-modules.md)负责 graph、bundle route、cache revision 与 loader 细节。
|
|
31
31
|
|
|
32
32
|
## Remote 通信
|
|
33
33
|
|