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
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dsh-plugin-starter
|
|
3
|
+
description: dsh 插件脚手架助手:从零新建一个合规的 dsh 插件骨架(package.json 含 dsh.bundle.patch 与 peer 显式预发布范围、cordis.patch.yml、双语 README、selfcheck、CHANGELOG、GitHub topics),逐项满足 dsh 官方发布要求与 dsh-market / awesome-dsh-plugin 收录门槛。用户说「新建 dsh 插件 / 做一个插件 / 插件脚手架 / starter」时加载本技能。注意:写 NoneBot 插件时请用 nonebot-plugin-dev-kb,勿用本技能。
|
|
4
|
+
whenToUse: 用户要从零开始新建一个 dsh 插件,或问「插件骨架怎么搭 / 发布要准备什么文件」时
|
|
5
|
+
---
|
|
6
|
+
# dsh 插件脚手架(dsh-plugin-starter)
|
|
7
|
+
|
|
8
|
+
帮用户从零搭一个**能通过官方校验、能进 market / awesome 收录**的 dsh 插件骨架。
|
|
9
|
+
原则:每生成一个文件都对照下方清单自检;知识库文档只读不猜,拿不准就先检索确认。
|
|
10
|
+
|
|
11
|
+
## 0. 知识库位置
|
|
12
|
+
|
|
13
|
+
- **知识库根**:`{{KB_ROOT}}`
|
|
14
|
+
- 先读两篇再动手:`{{KB_ROOT}}/site/develop/basic/index.md`(插件 = 导出 `apply(ctx)` 的模块,
|
|
15
|
+
`ctx.effect()` 自动清理)与 `{{KB_ROOT}}/site/develop/basic/publish.md`(打包发布)。
|
|
16
|
+
- 配置 / 工具 / 事件写法按需检索:`dsh_kb_search`,如 query=`ctx.tools.register 工具定义`。
|
|
17
|
+
|
|
18
|
+
## 1. 骨架清单(缺一 = 发布/收录会卡)
|
|
19
|
+
|
|
20
|
+
在用户指定的目录 `<plugin-name>/` 下生成(命名规范:`dsh-plugin-<topic>` 或 `dsh-<topic>`):
|
|
21
|
+
|
|
22
|
+
| 文件 | 要点 |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `package.json` | `"main": "./lib/index.js"`;`files` 数组**必须含 main 入口所在目录**;`license: "MIT"`;`homepage` 指 GitHub 仓库 `#readme`;`repository.url`;`keywords ≥3`(含 `dsh` / `dsh-plugin` / `deepseek-harness`);**`dsh: { bundle: { patch: "./cordis.patch.yml" } }`**(只声明 `dsh.client` 会被 awesome CI 拒);`engines.node >=18`;`peerDependencies` 若引 `@deepseek-ai/*`,**范围必须显式覆盖预发布分支**(如 `"^4.0.1"` 对 cordis 可行,对 dsh 主包要写 `">=0.2.0-rc.1 <0.3.0-0"` 形态,否则预发布构建被静默排除);`scripts.selfcheck` 指向最小自检 |
|
|
25
|
+
| `cordis.patch.yml` | 插件自注册声明(`dsh.profile.bundles` 挂载用);含 Config 时在此声明配置 schema |
|
|
26
|
+
| `lib/index.js` | `export function apply(ctx, config)`;零 `@deepseek-ai/*` 运行时 import(插件以 link:/file: 装入 profile,外部依赖按 realpath 解析不到——用原始 definition 形状注册工具,参照 dsh-plugin-windows-guard 先例);每个注册动作包 `ctx.effect(() => ..., '说明')` |
|
|
27
|
+
| `README.md` | ① 顶部标题 + 一句话描述;② `## 安装` 段**必须含标准安装命令**(`git clone` / `npm install` 等——market ease 项);③ `## 功能` + `## 配置`/`## 示例` 双标题;④ ≥2 个代码块;⑤ `## 相关插件` 互相引用段(列同系列全部**已发布**插件:npm 链 + GitHub 链 + 一句话);⑥ 长度 >2000 字更佳;⑦ 需要 `AI 生成声明` 段 |
|
|
28
|
+
| `README.en.md` | 结构与中文一致(i18n 规范见 `{{KB_ROOT}}/extra/i18n/`) |
|
|
29
|
+
| `CHANGELOG.md` | `## x.y.z - 日期` 逐版条目:修了什么/为什么/怎么验证 |
|
|
30
|
+
| `LICENSE` | MIT |
|
|
31
|
+
| `scripts/selfcheck.mjs` | 最小结构自检(文件存在性 + package.json 关键字段),发布前必跑 |
|
|
32
|
+
| `.github/workflows/`(可选) | CI / 自动化(如每周内容同步) |
|
|
33
|
+
|
|
34
|
+
## 2. 命名与元数据红线
|
|
35
|
+
|
|
36
|
+
- 目录名 = npm 包名(例外如 `dsh-notify` 是历史遗留,新插件不要再造)
|
|
37
|
+
- **README 里写「无需配置」时必须带否定词**("无需 / 不需要 / zero-config")——market 的
|
|
38
|
+
needsConfig 反向检测按裸关键词(`API_KEY` 等)扫描,否定语境会被先摘除;确需配置的插件
|
|
39
|
+
写配置项时避免裸写这些 KEY 名
|
|
40
|
+
- 描述不得夸大:awesome 评审会对着源码逐条核对数字 / 命令 / API 名
|
|
41
|
+
|
|
42
|
+
## 3. GitHub 侧(骨架生成后提醒用户补)
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
gh api -X PATCH repos/<owner>/<repo> -f description="…(一句话中文简介,勿夸大)" -f homepage="https://github.com/<owner>/<repo>#readme"
|
|
46
|
+
# topics 至少含 dsh / dsh-plugin / deepseek-harness + 主题词——缺 topics 是 market 收录失败最常见原因
|
|
47
|
+
gh api -X PUT repos/<owner>/<repo>/topics --input topics.json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 4. 验证闭环
|
|
51
|
+
|
|
52
|
+
1. `node scripts/selfcheck.mjs` → 全部通过
|
|
53
|
+
2. 用 dsh-dev-sandbox 技能建独立沙箱 profile 挂载冒烟(不污染主力 dsh):
|
|
54
|
+
启动日志**不得**出现 `skipping profile bundle "<你的插件>"`(出现 = peer 闸门没过 = 静默失效)
|
|
55
|
+
3. `npm pack --dry-run` 核对发布内容(files 不夹带内部文档)
|
|
56
|
+
4. 发布流程与版本纪律见 `{{KB_ROOT}}/site/develop/basic/publish.md`
|
|
57
|
+
|
|
58
|
+
## 5. 红线
|
|
59
|
+
|
|
60
|
+
- **不要双挂载**:插件经 `dsh.profile.bundles` 进场后,profile 层不得再 insert 同 id
|
|
61
|
+
(`duplicate loader entry id` 启动即崩)
|
|
62
|
+
- **不要在插件运行时 import `@deepseek-ai/*`**(见 lib/index.js 要点)
|
|
63
|
+
- **不要把凭据写进入库文件**;用户凭据走 credentials ref / 环境变量
|
|
64
|
+
- 知识库快照可能领先宿主 dsh 版本:API 行为不符时以宿主实际安装包为准,
|
|
65
|
+
版本差异读 `{{KB_ROOT}}/extra/upgrade-guide/`
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dsh-upgrade-assistant
|
|
3
|
+
description: DeepSeek Harness (dsh) 升级助手:用户升级 dsh 版本时,用知识库里的官方升级指南(upgrade-guide/)与持久化变更记录(persistence-changes/)生成迁移检查清单、预判破坏性变更、给出回滚方案。用户提到「升级 dsh / 更新 Harness / 换版本 / upgrade」或升级 dsh 后报错时加载本技能。注意:写 NoneBot 时请用 nonebot-plugin-dev-kb,勿用本技能。
|
|
4
|
+
whenToUse: 用户要升级 dsh / DeepSeek Harness 版本,或升级后插件不工作、会话打不开等需要排查迁移问题时
|
|
5
|
+
---
|
|
6
|
+
# dsh 升级助手(dsh-upgrade-assistant)
|
|
7
|
+
|
|
8
|
+
帮用户安全升级 DeepSeek Harness:先搞清「从哪版 → 到哪版」,再用知识库把两版之间的全部变更读出来,
|
|
9
|
+
生成检查清单,升级后逐条验证。
|
|
10
|
+
|
|
11
|
+
## 0. 知识库位置
|
|
12
|
+
|
|
13
|
+
- **知识库根**:`{{KB_ROOT}}`(插件挂载时自动替换为实际绝对路径,可直接 read/glob/grep)
|
|
14
|
+
- 升级相关内容在:`{{KB_ROOT}}/extra/upgrade-guide/`(逐版本升级指南)与
|
|
15
|
+
`{{KB_ROOT}}/extra/persistence-changes/`(持久化格式变更,按日期命名)
|
|
16
|
+
|
|
17
|
+
## 1. 标准流程
|
|
18
|
+
|
|
19
|
+
### 第一步:确定版本区间
|
|
20
|
+
|
|
21
|
+
1. **当前版本**:读用户 profile 的安装信息(如 `%LOCALAPPDATA%` / profile 目录下的
|
|
22
|
+
`package.json` 中 `@deepseek-ai/dsh` 的版本,或让用户看 Desktop 关于页)。
|
|
23
|
+
2. **目标版本**:`npm view @deepseek-ai/dsh version`(latest)或用户指定版本。
|
|
24
|
+
3. 列出区间内的版本号,形如 `v0.2.0-rc.2 → v0.2.1-rc.4`。
|
|
25
|
+
|
|
26
|
+
### 第二步:读变更(知识库检索)
|
|
27
|
+
|
|
28
|
+
1. 对区间内**每个版本**读一份指南:
|
|
29
|
+
`{{KB_ROOT}}/extra/upgrade-guide/<版本>/`(目录按 `v0.1.7-rc.2` … `v0.2.2-alpha.3` 组织,
|
|
30
|
+
每个子目录是一篇 guide.md / guide.zh.md,读中文版)。
|
|
31
|
+
2. 持久化/会话格式变更:列出 `{{KB_ROOT}}/extra/persistence-changes/` 中日期晚于当前版本
|
|
32
|
+
发布日的条目(文件名即日期),只读标题相关条目判断「历史会话会不会丢/迁移」。
|
|
33
|
+
3. 快速定位也可用 `dsh_kb_search` 工具,如 query=`升级 upgrade-guide v0.2.1`。
|
|
34
|
+
4. 优先关注三类破坏点:**删除/改名的 API**(插件会静默失效)、**会话格式升级**
|
|
35
|
+
(旧会话打不开或需要迁移)、**配置字段变更**(profile 的 cordis.patch.yml / package.json)。
|
|
36
|
+
|
|
37
|
+
### 第三步:给出升级检查清单(输出给用户)
|
|
38
|
+
|
|
39
|
+
清单必须包含:
|
|
40
|
+
|
|
41
|
+
- **备份**:升级前备份 profile 的 `package.json` 与 `pnpm-lock.yaml`
|
|
42
|
+
- **变更摘要**:区间内每个版本的破坏性变更,逐条说明「影响你吗」
|
|
43
|
+
- **插件兼容**:dsh 有插件兼容闸门——`peerDependencies` 不覆盖目标版本的插件会被
|
|
44
|
+
**整体拒绝安装**或**启动时跳过(静默失效)**;把用户已装插件与目标版本对照,
|
|
45
|
+
预先列出需要升级/移除/豁免(allow-version)的插件
|
|
46
|
+
- **回滚方案**:保留旧版本安装包/备份路径,回滚 = 恢复备份 + 重装旧版
|
|
47
|
+
|
|
48
|
+
### 第四步:升级后验证
|
|
49
|
+
|
|
50
|
+
- 启动时逐条看 stderr 的 `dsh: skipping profile bundle "X"` 警告——被跳过 = 该插件静默失效
|
|
51
|
+
- 用一个旧会话验证历史消息正常加载(会话格式变更最常坏这里)
|
|
52
|
+
- 逐个核心功能冒烟:新建会话、工具调用、技能加载、设置页
|
|
53
|
+
- 若用户安装了 `dsh-plugin-dev-kb`,知识库可能比目标版本新(快照领先),
|
|
54
|
+
文档与实际行为不符时以实际安装包为准
|
|
55
|
+
|
|
56
|
+
## 2. 红线
|
|
57
|
+
|
|
58
|
+
- **不要在未备份的情况下动 profile**;备份是第一步,不是可选项
|
|
59
|
+
- **不要用 allow-version 豁免兼容闸门来「绕过」不兼容插件**——除非用户明确要求并理解风险
|
|
60
|
+
(静默失效比拒绝安装更难排查)
|
|
61
|
+
- 知识库是快照,若 upgrade-guide 目录里没有目标版本的目录(比如目标版本比知识库同步点新),
|
|
62
|
+
明确告知用户「该版本的官方指南未收录」,让用户看官方 release notes,不要编造变更内容
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<!-- Generated by scripts/gen-doc-graphs.ts - do not edit by hand.
|
|
2
|
-
Run `pnpm run gen-doc-graphs` to regenerate. -->
|
|
3
|
-
|
|
4
|
-
# Agent Turn And Step Lifecycle
|
|
5
|
-
|
|
6
|
-
This sequence is the visual companion to [architecture.md](architecture.md#turn-flow). It keeps durable replay facts on `session/event` and live control/status on `agent/*`.
|
|
7
|
-
|
|
8
|
-
```mermaid
|
|
9
|
-
sequenceDiagram
|
|
10
|
-
participant User
|
|
11
|
-
participant Agent
|
|
12
|
-
participant Driver
|
|
13
|
-
participant Hooks as hook listeners
|
|
14
|
-
participant Prompt as ctx.systemPrompt
|
|
15
|
-
participant LLM as ctx.llm
|
|
16
|
-
participant Tools as ctx.tools
|
|
17
|
-
participant Session
|
|
18
|
-
participant SDK as UI or SDK listener
|
|
19
|
-
User->>Agent: followup(content)
|
|
20
|
-
Agent-->>SDK: <code>agent/inbox/spliced</code>
|
|
21
|
-
Agent-->>SDK: <code>agent/inbox/inserted</code> { message }
|
|
22
|
-
Agent->>Driver: queued work wakes driver
|
|
23
|
-
Driver-->>SDK: <code>agent/status</code> running
|
|
24
|
-
Driver->>Session: <code>turn/start</code>
|
|
25
|
-
Note over Agent,Driver: claim pending next-step input plus one queued prompt
|
|
26
|
-
Driver-->>SDK: <code>agent/inbox/spliced</code> pure deletion
|
|
27
|
-
Driver-->>SDK: <code>agent/inbox/claimed</code> { message, turn } per message
|
|
28
|
-
Driver->>Prompt: <code>system-prompt/assemble</code> waterfall
|
|
29
|
-
Driver->>Hooks: <code>agent/pre-step</code> waterfall
|
|
30
|
-
Hooks-->>Driver: authoritative reject or enter(messages)
|
|
31
|
-
alt proposed step rejected, first batch empty, or pre-step failed
|
|
32
|
-
Driver-->>Driver: claimed batch stays removed, the open turn spends no step
|
|
33
|
-
else enter proposed step
|
|
34
|
-
Driver->>Session: <code>step/start</code>
|
|
35
|
-
Driver->>Hooks: <code>agent/request</code> waterfall
|
|
36
|
-
Driver->>LLM: prepareCall(config, signal)
|
|
37
|
-
Note over Driver,LLM: cancellation during either async phase commits neither system nor users
|
|
38
|
-
Note over Driver,Session: synchronous admission using the prepared call capability
|
|
39
|
-
Driver->>Session: <code>system/message</code> ordered per-node reconciliation
|
|
40
|
-
Driver->>Session: <code>user/message</code> per entered message
|
|
41
|
-
Driver->>Session: <code>request/header</code> and <code>request/context</code> as needed
|
|
42
|
-
Driver->>Driver: derive and freeze request from the log
|
|
43
|
-
Driver->>LLM: bound prepared call through <code>llm/stream</code> waterfall
|
|
44
|
-
LLM-->>Driver: StreamChunk*
|
|
45
|
-
Driver-->>SDK: <code>agent/assistant-stream</code> chunk*
|
|
46
|
-
alt final adapter or terminal in-band request failure
|
|
47
|
-
Driver->>Session: <code>assistant/attempt</code>
|
|
48
|
-
Driver-->>SDK: <code>agent/assistant-stream</code> committed end
|
|
49
|
-
Driver->>Hooks: <code>agent/request-error</code> waterfall
|
|
50
|
-
Hooks-->>Driver: return retry action or preserve the original error
|
|
51
|
-
Note over Driver,LLM: retry in the open step: prepare and reconcile the same rendered assembly without repeating pre-step or users
|
|
52
|
-
else model request succeeded
|
|
53
|
-
Driver->>Session: <code>assistant/message</code>
|
|
54
|
-
Driver-->>SDK: <code>agent/assistant-stream</code> committed end
|
|
55
|
-
Driver->>Tools: classify pending call by executionMode
|
|
56
|
-
loop barriers and bounded rolling pool, reclassify before start
|
|
57
|
-
opt call starts
|
|
58
|
-
Driver->>Session: <code>tool/call</code>
|
|
59
|
-
Driver->>Tools: ordered pre, concurrent execute
|
|
60
|
-
Tools-->>Session: tool-owned events when applicable
|
|
61
|
-
end
|
|
62
|
-
opt next model-order result ready
|
|
63
|
-
Driver->>Tools: ordered post
|
|
64
|
-
Driver->>Session: <code>tool/result</code>
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
Driver->>Session: <code>step/end</code>
|
|
68
|
-
opt natural stop and next-step inbox empty
|
|
69
|
-
Driver->>Hooks: <code>agent/turn-stopping</code> serial terminal checkpoint
|
|
70
|
-
end
|
|
71
|
-
opt next-step input is pending
|
|
72
|
-
Driver-->>Driver: claim pending next-step input
|
|
73
|
-
Driver-->>SDK: <code>agent/inbox/claimed</code> { message, turn } per message
|
|
74
|
-
Driver->>Hooks: <code>agent/pre-step</code> waterfall
|
|
75
|
-
Hooks-->>Driver: authoritative reject or enter(messages)
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
Driver->>Session: <code>turn/end</code>
|
|
80
|
-
Driver-->>SDK: <code>agent/status</code> idle
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
The `assistant/message` event records every successful provider call, including content-less and `max-tokens` finishes, and embeds the exact compact timed stream. Empty content stays out of derived history. A failed, retried, cancelled, or stream-error attempt that reaches settlement without a surface message records its stream as `assistant/attempt`. Live `agent/assistant-stream` chunk frames are transient; replay reads either durable settlement, and a hard process loss before settlement leaves no durable attempt stream.
|
|
84
|
-
|
|
85
|
-
`dsh-compaction-basic` uses `agent/pre-step` for pressure before request derivation and `agent/request-error` only for canonical context overflow. Once either trigger qualifies, optional tool-result pruning runs before summary selection. Recovery runs within the open step and retries only when pruning or summarization advances the surface replacement generation; otherwise the original request error remains authoritative. Each retry prepares its call and reconciles the retained rendered assembly before request derivation, without repeating assembly, pre-step, or user admission.
|
|
86
|
-
|
|
87
|
-
The returned `agent/pre-step` decision is authoritative; listeners wrapping `next()` preserve downstream messages and `startsRequestSeries` unless replacement is intentional. Steering and injected context pass through the same waterfall after a later claim operation takes their next-step batch.
|
|
88
|
-
|
|
89
|
-
SDK users that need replayable transcript data should consume `session/event`; `agent/*` is the live coordination API for queue/status, prompt interception, request construction, steering, continuation, and errors.
|
|
90
|
-
|
|
91
|
-
Maintenance mode: curated Mermaid sequence; exact event signatures live in the generated Cordis catalog.
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
<!-- 英文源文件由 scripts/gen-doc-graphs.ts 生成;本中文文件是通过双语配对维护的经评审对侧。
|
|
2
|
-
更新时先运行 `pnpm run gen-doc-graphs` 更新英文,再更新本文件并运行 `pnpm run verify-translation-pairing --write docs/agent-lifecycle.md` 重新记录配对。 -->
|
|
3
|
-
|
|
4
|
-
# Agent 轮次与步骤生命周期
|
|
5
|
-
|
|
6
|
-
[English](agent-lifecycle.md) | 中文
|
|
7
|
-
|
|
8
|
-
此时序图是 [architecture.md](architecture.zh.md#turn-flow) 的配套图示。持久的回放事实保存在 `session/event` 中,实时控制与状态则保存在 `agent/*` 中。
|
|
9
|
-
|
|
10
|
-
```mermaid
|
|
11
|
-
sequenceDiagram
|
|
12
|
-
participant User
|
|
13
|
-
participant Agent
|
|
14
|
-
participant Driver
|
|
15
|
-
participant Hooks as hook listeners
|
|
16
|
-
participant Prompt as ctx.systemPrompt
|
|
17
|
-
participant LLM as ctx.llm
|
|
18
|
-
participant Tools as ctx.tools
|
|
19
|
-
participant Session
|
|
20
|
-
participant SDK as UI or SDK listener
|
|
21
|
-
User->>Agent: followup(content)
|
|
22
|
-
Agent-->>SDK: <code>agent/inbox/spliced</code>
|
|
23
|
-
Agent-->>SDK: <code>agent/inbox/inserted</code> { message }
|
|
24
|
-
Agent->>Driver: queued work wakes driver
|
|
25
|
-
Driver-->>SDK: <code>agent/status</code> running
|
|
26
|
-
Driver->>Session: <code>turn/start</code>
|
|
27
|
-
Note over Agent,Driver: claim pending next-step input plus one queued prompt
|
|
28
|
-
Driver-->>SDK: <code>agent/inbox/spliced</code> pure deletion
|
|
29
|
-
Driver-->>SDK: <code>agent/inbox/claimed</code> { message, turn } per message
|
|
30
|
-
Driver->>Prompt: <code>system-prompt/assemble</code> waterfall
|
|
31
|
-
Driver->>Hooks: <code>agent/pre-step</code> waterfall
|
|
32
|
-
Hooks-->>Driver: authoritative reject or enter(messages)
|
|
33
|
-
alt proposed step rejected, first batch empty, or pre-step failed
|
|
34
|
-
Driver-->>Driver: claimed batch stays removed, the open turn spends no step
|
|
35
|
-
else enter proposed step
|
|
36
|
-
Driver->>Session: <code>step/start</code>
|
|
37
|
-
Driver->>Hooks: <code>agent/request</code> waterfall
|
|
38
|
-
Driver->>LLM: prepareCall(config, signal)
|
|
39
|
-
Note over Driver,LLM: cancellation during either async phase commits neither system nor users
|
|
40
|
-
Note over Driver,Session: synchronous admission using the prepared call capability
|
|
41
|
-
Driver->>Session: <code>system/message</code> ordered per-node reconciliation
|
|
42
|
-
Driver->>Session: <code>user/message</code> per entered message
|
|
43
|
-
Driver->>Session: <code>request/header</code> and <code>request/context</code> as needed
|
|
44
|
-
Driver->>Driver: derive and freeze request from the log
|
|
45
|
-
Driver->>LLM: bound prepared call through <code>llm/stream</code> waterfall
|
|
46
|
-
LLM-->>Driver: StreamChunk*
|
|
47
|
-
Driver-->>SDK: <code>agent/assistant-stream</code> chunk*
|
|
48
|
-
alt final adapter or terminal in-band request failure
|
|
49
|
-
Driver->>Session: <code>assistant/attempt</code>
|
|
50
|
-
Driver-->>SDK: <code>agent/assistant-stream</code> committed end
|
|
51
|
-
Driver->>Hooks: <code>agent/request-error</code> waterfall
|
|
52
|
-
Hooks-->>Driver: return retry action or preserve the original error
|
|
53
|
-
Note over Driver,LLM: retry in the open step: prepare and reconcile the same rendered assembly without repeating pre-step or users
|
|
54
|
-
else model request succeeded
|
|
55
|
-
Driver->>Session: <code>assistant/message</code>
|
|
56
|
-
Driver-->>SDK: <code>agent/assistant-stream</code> committed end
|
|
57
|
-
Driver->>Tools: classify pending call by executionMode
|
|
58
|
-
loop barriers and bounded rolling pool, reclassify before start
|
|
59
|
-
opt call starts
|
|
60
|
-
Driver->>Session: <code>tool/call</code>
|
|
61
|
-
Driver->>Tools: ordered pre, concurrent execute
|
|
62
|
-
Tools-->>Session: tool-owned events when applicable
|
|
63
|
-
end
|
|
64
|
-
opt next model-order result ready
|
|
65
|
-
Driver->>Tools: ordered post
|
|
66
|
-
Driver->>Session: <code>tool/result</code>
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
Driver->>Session: <code>step/end</code>
|
|
70
|
-
opt natural stop and next-step inbox empty
|
|
71
|
-
Driver->>Hooks: <code>agent/turn-stopping</code> serial terminal checkpoint
|
|
72
|
-
end
|
|
73
|
-
opt next-step input is pending
|
|
74
|
-
Driver-->>Driver: claim pending next-step input
|
|
75
|
-
Driver-->>SDK: <code>agent/inbox/claimed</code> { message, turn } per message
|
|
76
|
-
Driver->>Hooks: <code>agent/pre-step</code> waterfall
|
|
77
|
-
Hooks-->>Driver: authoritative reject or enter(messages)
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
Driver->>Session: <code>turn/end</code>
|
|
82
|
-
Driver-->>SDK: <code>agent/status</code> idle
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
`assistant/message` 事件会记录每次成功的提供方调用,包括返回空内容或以 `max-tokens` 结束的调用,并嵌入精确的紧凑带时间 stream。空内容不会进入派生历史。失败、重试、取消或 stream error attempt 到达 settlement 时,如果没有 surface message,就会把 stream 记录为 `assistant/attempt`。实时 `agent/assistant-stream` chunk frame 是瞬态数据;回放读取任一种持久 settlement,如果进程在 settlement 前硬中断,则不会留下持久 attempt stream。
|
|
86
|
-
|
|
87
|
-
`dsh-compaction-basic` 在派生请求之前通过 `agent/pre-step` 处理压力,而 `agent/request-error` 仅用于规范的上下文溢出。任一触发条件满足后,系统都会先执行可选的工具结果剪枝,再选择摘要。恢复发生在仍打开的步骤内,只有剪枝或摘要生成推进 surface replacement generation 时才重试,否则仍以原始请求错误为准。每次重试都会准备调用,并在派生请求之前协调保留的已渲染组装结果,不重复组装、pre-step 或用户消息准入。
|
|
88
|
-
|
|
89
|
-
以返回的 `agent/pre-step` 决策为准;通过包装 `next()` 的监听器会保留下游消息与 `startsRequestSeries`,除非有意替换。steering(中途引导)和注入的上下文在后续的认领操作取得其下一步骤批次后,会经过同一 waterfall(瀑布式事件)。
|
|
90
|
-
|
|
91
|
-
需要可回放 transcript(文本记录)数据的 SDK 用户应当消费 `session/event`;`agent/*` 是用于队列与状态、提示词拦截、请求构造、steering、继续执行和错误处理的实时协调接口。
|
|
92
|
-
|
|
93
|
-
维护模式:英文源文件包含人工维护的 Mermaid 时序图,并由生成器写出;本中文文件作为经评审对侧通过双语配对维护。确切的事件签名位于生成的 Cordis 目录中。
|
package/kb/extra/api-gateway.md
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
# API Gateway
|
|
2
|
-
|
|
3
|
-
English | [中文](api-gateway.zh.md)
|
|
4
|
-
|
|
5
|
-
This is the current-state reference for the Typert API Gateway. It describes how business services declare unary and stream Remote methods, how the build generates Host and Client contracts, and how calls reuse the Connection RPC and `/api` route. Session events, incremental data, and other streaming protocols are outside this document's scope; they may use the same Connection but do not use Remote method descriptors.
|
|
6
|
-
|
|
7
|
-
## Programming model
|
|
8
|
-
|
|
9
|
-
Business services use `@Remote` or `@RemoteScope` to select the methods exposed to the Client. Unmarked methods do not enter the generated Client types or runtime contributions and cannot be called through `ctx.remote`.
|
|
10
|
-
|
|
11
|
-
`@Remote` denotes calling a Cordis service registered on the root Host Context. Complex Host objects cannot cross the wire directly; the business package must declare their association with a wire identity through `TypertLookupMap` and register a default resolution provider with `ctx.typert.lookups` at runtime. For example, an `Agent` parameter named `agent` in the Host signature produces an `agentId` wire field, and the Gateway resolves that id to a Host object before invoking the business method. Host composition can use `ctx.typert.lookups.configure()` to override the resolution policy for a lookup key without changing the parameter name, wire field, or canonical type symbol owned by the business package.
|
|
12
|
-
|
|
13
|
-
`@RemoteScope(key)` first resolves an identity to a scoped Context through `ctx.typert.contexts`, then obtains the service from that Context and invokes the method. It applies when the method itself depends on scoped composition and does not need to receive objects such as `Agent` explicitly.
|
|
14
|
-
|
|
15
|
-
`@Remote` accepts an export name or `{ name?, mode?, resources? }`, and `@RemoteScope(key, option?)` accepts an export name, as in `@RemoteScope('agent', 'current')` below, or `{ name?, resources? }` as its second argument. `resources` holds per-kind readers that return the identities of the resources one call touches for access control; each reader receives the method's wire arguments as its own parameters, with types inferred from the decorated method. Most methods declare no readers, because the Gateway also reads identities from lookup parameters and scoped Contexts that declare a `resource`, and from the default fields in `typert.resources`; the [Typert subsystem](subsystems/typert.md) owns that order.
|
|
16
|
-
|
|
17
|
-
Services normally extend `TypertRemoteService` so the constructor explicitly binds the Cordis service key and default Remote namespace. A service that already has another base class can instead declare `readonly typertRemote = bindTypertRemote(this, serviceKey)`; both forms leave an inspectable public binding and do not depend on the compiler injecting a symbol into the constructor.
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
import type { Agent } from '@deepseek-ai/dsh-agent'
|
|
21
|
-
import { TypertRemoteService, Remote, RemoteScope } from '@deepseek-ai/dsh-typert-protocol'
|
|
22
|
-
import type { Context } from '@deepseek-ai/cordis'
|
|
23
|
-
|
|
24
|
-
export interface CreateGoalRequest {
|
|
25
|
-
objective: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface CreateGoalResult {
|
|
29
|
-
accepted: boolean
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export class GoalService extends TypertRemoteService {
|
|
33
|
-
constructor(ctx: Context) {
|
|
34
|
-
super(ctx, 'goals')
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@Remote('create')
|
|
38
|
-
createForClient(
|
|
39
|
-
agent: Agent,
|
|
40
|
-
request: CreateGoalRequest,
|
|
41
|
-
signal: AbortSignal,
|
|
42
|
-
): CreateGoalResult {
|
|
43
|
-
signal.throwIfAborted()
|
|
44
|
-
return this.create(agent, request)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@RemoteScope('agent', 'current')
|
|
48
|
-
currentForClient(): CreateGoalResult {
|
|
49
|
-
return { accepted: true }
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private create(_agent: Agent, request: CreateGoalRequest): CreateGoalResult {
|
|
53
|
-
return { accepted: request.objective.length > 0 }
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Remote methods may return a value synchronously or return a Promise. For cooperative cancellation, the final parameter in the Host signature must be `signal: AbortSignal` using the global type; it is recorded in the descriptor instead of entering `args`, while the generated Client method accepts an optional final `AbortSignal`.
|
|
59
|
-
|
|
60
|
-
`@Remote({ mode: 'stream' })` marks a method that returns `Iterable`, `AsyncIterable`, or `RemoteStream<Out, In>`: the Gateway delivers each yielded item, a value the Host method produced, over its multiplexed `/api/remote.mux` WebSocket or an in-process carrier, and the generated Client method returns a `RemoteStreamHandle<Out, In>` that iterates the items and exposes `send`, `end`, and `dispose` for the Client-to-Host uplink of the same logical stream. The second type argument of `RemoteStream<Out, In>` declares the uplink item type; the Gateway validates each item the Client sends, because it arrives from the browser, with the generated `In` codec before the Host method reads it through `this.ctx.invocation.uplink<In>()`. The uplink enters neither `args` nor the parameter list; the [Gateway README](../packages/api/gateway/README.md) owns the frame, half-close, cancellation, and inbox-bound contracts.
|
|
61
|
-
|
|
62
|
-
The Client uses concrete functions on ordinary objects, not a JavaScript Proxy. Direct and scoped calls appear under `ctx.remote.<namespace>` and `agentCtx.remote.<namespace>`. Each namespace is a traced Cordis child Service registered as `remote.<namespace>`; the Client assembly mounts contributions through `ctx.remote.$mount()`, and the namespace unloads after its last method is withdrawn. Dependency declarations belong to the actual caller: only a business package that reads `ctx.remote.<namespace>` or `agentCtx.remote.<namespace>` declares both `remote` and `remote.<namespace>` in its own `inject`; assemblies that only mount contributions and higher-level runtimes that do not call that namespace do not declare the namespace dependency on the business package's behalf. When an `@Remote` method has exactly one lookup parameter and a same-named `TypertContextMap` uses the same wire identity, the generated scoped signature omits that identity parameter. `@RemoteScope` generates only the scoped invocation interface.
|
|
63
|
-
|
|
64
|
-
```ts ignore-check
|
|
65
|
-
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
66
|
-
import type { AgentContext } from '@deepseek-ai/dsh-api-session-controller/client'
|
|
67
|
-
import type { Context } from '@deepseek-ai/cordis'
|
|
68
|
-
import type {} from '@deepseek-ai/dsh-api-remotes/client'
|
|
69
|
-
|
|
70
|
-
export const inject = ['remote', 'remote.goals']
|
|
71
|
-
|
|
72
|
-
declare const ctx: Context
|
|
73
|
-
declare const agentCtx: AgentContext
|
|
74
|
-
declare const agentId: SessionId
|
|
75
|
-
|
|
76
|
-
await ctx.remote.goals.create(agentId, { objective: 'ship it' })
|
|
77
|
-
await agentCtx.remote.goals.create({ objective: 'ship it' })
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Client applications assemble only `@deepseek-ai/dsh-api-remotes`. That package imports the `/remote` subpaths of selected business packages as runtime values, mounts their contributions through `ctx.remote.$mount()`, and re-exports the declaration merges from the same files. Adding a Host Remote package is an explicit choice by the Client composition owner; business components do not need to load the Typert Gateway or the business package's Remote JS separately.
|
|
81
|
-
|
|
82
|
-
The `api-remotes` assembly and the `ctx.remote` contract are React-independent; the Host methods visible to any Client assembly are limited to the Remote methods selected at generation time.
|
|
83
|
-
|
|
84
|
-
## Component responsibilities
|
|
85
|
-
|
|
86
|
-
| Location | Package or entry | Responsibility |
|
|
87
|
-
|---|---|---|
|
|
88
|
-
| Shared | `@deepseek-ai/dsh-typert-protocol` | Declares decorators, Gateway bindings, merge-extensible protocol maps, invocation descriptors, and provider types; starts no TypeScript analysis and registers no Cordis services |
|
|
89
|
-
| Build | `@deepseek-ai/dsh-typert-generator` | Strictly analyzes Remote signatures, the type graph, lookups, Contexts, and source locations from the Host `ts.Program`, then generates Host and Host-for-Client artifacts |
|
|
90
|
-
| Host | `@deepseek-ai/dsh-typert-registry` and Loader | Places generated Host descriptors, schemas, and business-package registrations in `ctx.typert`, and holds lookup and Context providers |
|
|
91
|
-
| Host | `@deepseek-ai/dsh-api-session-controller` | Owns the application Agent/Session identity policy and configures the corresponding Typert lookups |
|
|
92
|
-
| Host | `@deepseek-ai/dsh-api-gateway` | Provides `ctx.typertGateway`, claims Remote endpoints, validates request values, resolves objects or Contexts, and invokes live Cordis services |
|
|
93
|
-
| Host | `@deepseek-ai/dsh-api-remote-access` | Decides which Remote methods a non-owner Peer may call through business-registered role-based policies, filters list results, and streams each Peer's access snapshot; the Gateway requires it |
|
|
94
|
-
| Client | `@deepseek-ai/dsh-api-gateway/client` | Provides `ctx.remote` and `remote.<namespace>` child Services, mounts generated descriptors as concrete methods, and initiates and cancels calls through the Connection |
|
|
95
|
-
| Client | `@deepseek-ai/dsh-api-remotes/client` | Explicitly selects and mounts the `/remote` contributions allowed by the application and brings the corresponding declaration merges into business code |
|
|
96
|
-
| Both | `@deepseek-ai/dsh-client-connection` | Provides the RPC carrier, request correlation, trust boundary, cancellation, response envelope, and the `/api` HTTP bridge |
|
|
97
|
-
|
|
98
|
-
The API Gateway package owns the Host dispatcher and Client Remote endpoint as peer entries, but the two builds never enter the same `ts.Program`. The Host entry does not import the Client Cordis `Context` merge, and the Client entry does not import the Host Gateway service.
|
|
99
|
-
|
|
100
|
-
## Strict generation pipeline
|
|
101
|
-
|
|
102
|
-
The root build compiles and bundles the Host face, then the Client face, then builds the Web shell ([step order](development.md#typescript-project-layout)). The Host phase first compiles the Host package references, then runs `tsdown --env.DSH_BUILD_FACE host`; the normal Host Project Reference graph compiles the Typert generator, which runs during this tsdown pass with the Host aggregate as its only `ts.Program` seed. The Client phase then compiles the Client package references and runs `tsdown --env.DSH_BUILD_FACE client`, consuming the newly generated Remote Client declarations and runtime contributions without starting Typert again.
|
|
103
|
-
|
|
104
|
-
Both tsdown passes match `vendor/*`, `packages/*/*`, and `apps/cli`, the Host pass also `apps/desktop-host` ([build order](development.md#typescript-project-layout)), and both bundle only JavaScript emitted to `lib/types` by the corresponding tsc phase. The root config does not scan Client artifacts, classify package names, or pass a maintained filter to tsdown; package-local configs return entries for the current phase based on `DSH_BUILD_FACE`. An ordinary Client plugin produces both its Node loader entry and browser bundle during the Client phase.
|
|
105
|
-
|
|
106
|
-
`api/remotes`, `api/gateway`, `api/session-controller`, and `api/workspace-controller` (plus `client/connection`) split TypeScript faces. `api/remotes`' Client project depends on `/remote` declarations generated for business packages during Host tsdown; root aggregates and direct consumers must reference each split package's `tsconfig.host.json` or `tsconfig.client.json` respectively. `api-remotes`' `clientBundle(..., { hostPhase: true })` produces its Host entry during Host tsdown and leaves only the browser entry for Client tsdown. The Agent/Session lookup policy lives in `@deepseek-ai/dsh-api-session-controller`, not in `api-remotes`.
|
|
107
|
-
|
|
108
|
-
Each contributing business package writes generated files to its own `lib/` directory, not to its source directory:
|
|
109
|
-
|
|
110
|
-
| File | Consumer | Contents |
|
|
111
|
-
|---|---|---|
|
|
112
|
-
| `typert.host.js` | Host Loader | Runtime reflection for the Host face, strict invocation descriptors, and schema registration values |
|
|
113
|
-
| `typert.host.d.ts` | Host type system | Generated declarations for the Host face |
|
|
114
|
-
| `typert.remote-client.js` | `api-remotes` | A mountable `TypertRemoteContribution` containing strict descriptors and runtime codecs |
|
|
115
|
-
| `typert.remote-client.d.ts` | Client type system | Declaration merges for `TypertRemoteNamespaceMap` and `TypertRemoteScopeMap`, plus Client-safe type references |
|
|
116
|
-
| `typert.remote-client.d.ts.map` | Editor | Maps generated method properties back to Remote method declarations in the Host package |
|
|
117
|
-
|
|
118
|
-
Business packages expose the Host Loader entry through `./typert` and the Host-for-Client entry through `./remote`. The generator also validates these package exports and published-file lists; it generates artifacts only for explicit contribution packages that provide the corresponding entry.
|
|
119
|
-
|
|
120
|
-
Parameter names in Remote Client declarations come from wire fields, while parameter and return types reference Client-safe types exported by the original business package. The declaration map resolves the generated property behind `ctx.remote.goals.create` back to the Host source method marked with `@Remote`, so editors that support declaration maps can navigate from a Client call to the real implementation instead of stopping at the generated `.d.ts`.
|
|
121
|
-
|
|
122
|
-
Strict analysis requires a Remote to be a public, non-static instance method with a concrete implementation. The method cannot be generic; parameters must be required, named simple identifiers and cannot use destructuring, default values, rest parameters, or optional parameters. Typert generates strict schemas for ordinary JSON-representable types; complex objects such as workspace classes must have a unique `TypertLookupMap` declaration. Lookup and Context packages are responsible for both static declaration merges and runtime provider registration; if either side is missing, the build fails or the first call that needs the provider fails.
|
|
123
|
-
|
|
124
|
-
## Runtime invocation
|
|
125
|
-
|
|
126
|
-
Remote calls use the Connection's `/api` route. The Client Remote calls `connection.rpc.call('/api', '<namespace>/<method>', { args }, signal)`; the HTTP carrier maps this to `POST /api/<namespace>/<method>`, with a payload containing only a named `args` object.
|
|
127
|
-
|
|
128
|
-
The Connection performs the unified trust check for `/api` before the HTTP bridge, then dispatches inside the shared FetchHandler. The Typert Gateway claims only two-segment endpoints that have a strict descriptor or active SRC marker; it projects binary Remote fields into JSON-compatible metadata and result-relative byte attachments, which Connection frames as multipart responses. Feature-owned exact Fetch routes handle responses outside the RPC envelope, and other requests return 404. Connection owns transport, RPC ids, response envelopes, and request cancellation, while Gateway owns the Remote data protocol and business dispatch. Replacing the Connection carrier does not require changes to Remote descriptors or the Client programming interface.
|
|
129
|
-
|
|
130
|
-
For every call, the Gateway resolves the descriptor and live service from the current registries instead of caching business objects. Every call names the Peer it speaks for, and a disposed Peer is refused with `gateway/peer-disposed`. The Gateway requires the fields in `args` to match the descriptor exactly; for a call whose Peer principal is not the owner it then resolves the resources the call touches and asks `ctx.remoteAccess.decide()`, so a refused call resolves no lookup and activates no Agent. It validates wire values with codecs, resolves objects or receivers through registered lookup or Context providers, and invokes the service method targeted by the binding. The Client Gateway validates decoded binary results with the generated result codec; ordinary JSON results retain their existing handling. A missing provider, unknown identity, binding mismatch, missing or extra argument, schema failure, or missing method fails before entering or after leaving business code.
|
|
131
|
-
|
|
132
|
-
The lookup provider's `register()` supplies both the stable declaration and the default resolver; `configure()` supplies a resolver owned by Host composition that may execute asynchronously and is scoped to an effect lifetime. Configuration may precede provider mounting; without a provider, invocation still fails with `gateway/lookup-unavailable`, and unloading the configuration restores the provider's default policy. The Session Controller owns the standard resolver semantics for `agent` and `session`: it reuses a live Agent, automatically resumes ordinary cold sessions, deduplicates concurrent resumes, and rejects identities owned by subagent routing; the `session` lookup returns that Agent's Session. A resume failure and an ownership fence raise a `RemoteError` carrying their own code, `session/not-found` or `session/agent-busy`, which the Gateway encodes onto the wire unchanged; only an unclassified throw folds into `gateway/internal`.
|
|
133
|
-
|
|
134
|
-
Unloading a Client contribution removes its descriptors and concrete methods together, aborts its in-flight calls, and makes stale method handles retained by external code reject further calls. A strict endpoint withdrawn on the Host also does not degrade to SRC inference, preventing a hot unload from silently weakening validation.
|
|
135
|
-
|
|
136
|
-
## SRC development fallback
|
|
137
|
-
|
|
138
|
-
When the Host starts from source through `node --import tsx/esm`, it does not execute the Typert compiler plugin. Standard decorator initializers still record the method name and invocation mode in a versioned descriptor on the Service prototype, while `TypertRemoteService` or `bindTypertRemote()` supplies the explicit service binding; the Gateway can therefore construct a weaker temporary descriptor without starting a `ts.Program`. The descriptor's stable string property name lets `remoteMethods()` read markers written by another installed copy of the protocol package.
|
|
139
|
-
|
|
140
|
-
The SRC fallback parses simple parameter names from the live function. When a parameter name matches the `parameter` of a registered lookup, such as `agent` or `session`, it uses the lookup's `agentId` or `sessionId` wire field and resolves the object on the Host; other parameters are checked only for cycle-free, JSON-safe data with no special prototype. `@RemoteScope` directly uses the wire field of a registered Host Context provider. SRC does not read TypeScript types, generate Zod schemas, infer optional parameters, or support destructuring, default values, rest parameters, or duplicate parameter names.
|
|
141
|
-
|
|
142
|
-
SRC solves only dispatch for a Host process running from source. The Client does not discover decorators from the running Host, and the Client Remote refuses to mount SRC descriptors that lack strict codecs; its types, codecs, and Remote registration values always come from the most recently generated `lib/typert.remote-client.*` artifacts.
|
|
143
|
-
|
|
144
|
-
## Development mode
|
|
145
|
-
|
|
146
|
-
Web development runs one command, which builds current Host, Client, and Web artifacts, starts the source Host, and keeps Client bundles rebuilt:
|
|
147
|
-
|
|
148
|
-
```sh
|
|
149
|
-
pnpm run dev:web
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
`dsh` starts the Host source through tsx, so the Host can use the SRC fallback; the `dev:web` watchers rebuild the client-face type emit, Client plugin and library bundles, and the Web shell on source edits. They do not analyze Host decorators or generate Remote Client DTS; only the complete build that `dev:web` runs first (or `pnpm run build`) does.
|
|
153
|
-
|
|
154
|
-
Changing only a Remote method's implementation body without changing its contract does not require regenerating the Typert files. After adding or removing a decorator or changing an export name, namespace, parameter, return value, lookup, Context, or cancellation signature, rerun the ordered lib build so the Host generates the strict contract before the Client compiles and bundles the new contribution:
|
|
155
|
-
|
|
156
|
-
```sh
|
|
157
|
-
pnpm run build:lib
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
The running Client watcher consumes these generated files when it rebundles. If `pnpm run build:lib:host` has already refreshed the Host contract, `pnpm run build:lib:client` can complete the Client side; a clean worktree cannot skip the Host phase. Recompiling only the frontend source cannot infer new types from Host decorators. `pnpm run typecheck` generates the Host contract with the bundle-free Typert pass before Client tsc, and the CI build lanes and release builds generate it in the Host bundle phase before Client tsc.
|
|
161
|
-
|
|
162
|
-
## Boundaries
|
|
163
|
-
|
|
164
|
-
Remote handles unary method calls with one request and one result, and stream methods whose items flow Host → Client while the Client's items reach the running Host method through `this.ctx.invocation.uplink()`. Session event streams, pagination, incremental reduce, projection, and entity substreams still require a separate data protocol and registration model; even when they reuse the Connection, they must not masquerade as Remote methods or enter invocation descriptors.
|
|
165
|
-
|
|
166
|
-
The API layers are organized as `remotes → gateway → connection → webserver`. The BFF and Typert RPC layers live under `packages/api`; Connection and WebServer live at `packages/client/connection` and `packages/host/webserver`. Unary results containing `Uint8Array`, including nested fields and array entries, use [binary Remote transfer](../.agents/notes/implemented/architecture/2026-09-17-workspace-file-binary-transfer.md). A feature that needs a response outside the RPC envelope registers an exact Connection Fetch route.
|
|
167
|
-
|
|
168
|
-
Lookup policy is configured per key, so all `agent` or `session` parameters share the cold-resume behavior. Accepting live objects only would require an explicit per-parameter or per-endpoint policy, which does not exist; the business method must not guess whether the object came from restoration.
|
|
169
|
-
|
|
170
|
-
### Business ownership
|
|
171
|
-
|
|
172
|
-
`packages/api` owns transport, call shape, and session lifecycle; a business rule belongs to an independent business package and reaches this layer through a registration surface or projected data. The requirements a change here must satisfy — the four `@Remote` disciplines, the additive-names rule, and the boundary this layer keeps — are owned by [Remote and API rules](defensive-patterns/remote-and-api.md), which is where a review checks them.
|