dsh-plugin-dev-kb 1.1.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.en.md +14 -8
- package/README.md +15 -9
- package/docs/banner.svg +25 -0
- package/kb/INDEX.md +23 -19
- package/kb/README.md +8 -6
- package/kb/extra/AGENTS.md +11 -10
- package/kb/extra/cookbook/adding-a-remote-api.md +2 -2
- package/kb/extra/cookbook/adding-a-remote-api.zh.md +2 -2
- package/kb/extra/cookbook/adding-a-session-format-version.md +151 -0
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +151 -0
- package/kb/extra/cookbook/adding-a-vendored-package.md +1 -1
- package/kb/extra/cookbook/adding-a-vendored-package.zh.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/kb/extra/cookbook/reviewing-persistence-type-changes.md +120 -0
- package/kb/extra/cookbook/reviewing-persistence-type-changes.zh.md +120 -0
- package/kb/extra/deepseek-llm-api-wire-extensions.md +19 -20
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +18 -19
- package/kb/extra/development.md +37 -10
- package/kb/extra/development.zh.md +37 -10
- package/kb/extra/event-producer-consumer.md +90 -67
- package/kb/extra/event-producer-consumer.zh.md +91 -68
- package/kb/extra/glossary.md +1 -1
- package/kb/extra/glossary.zh.md +1 -1
- package/kb/extra/i18n/README.md +16 -7
- package/kb/extra/i18n/README.zh.md +17 -8
- package/kb/extra/i18n/terminology.md +4 -4
- package/kb/extra/i18n/translation-prompt.md +3 -3
- package/kb/extra/module-graph.md +621 -335
- package/kb/extra/module-graph.zh.md +621 -335
- package/kb/extra/persistence-changes/2026-09-11-initial.md +280 -0
- package/kb/extra/persistence-changes/2026-09-11-initial.zh.md +280 -0
- package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.md +52 -0
- package/kb/extra/persistence-changes/2026-09-12-auto-review-error-metadata.zh.md +52 -0
- package/kb/extra/persistence-changes/2026-09-14-image-offload.md +96 -0
- package/kb/extra/persistence-changes/2026-09-14-image-offload.zh.md +96 -0
- package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.md +48 -0
- package/kb/extra/persistence-changes/2026-09-14-workspace-changes-event.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.md +120 -0
- package/kb/extra/persistence-changes/2026-09-16-session-format-v4.zh.md +120 -0
- package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.md +48 -0
- package/kb/extra/persistence-changes/2026-09-18-schedule-optional-title.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.md +48 -0
- package/kb/extra/persistence-changes/2026-09-20-unknown-child-catalog.zh.md +48 -0
- package/kb/extra/persistence-changes/2026-09-21-user-question-reply.md +60 -0
- package/kb/extra/persistence-changes/2026-09-21-user-question-reply.zh.md +60 -0
- package/kb/extra/persistence-changes/README.md +88 -0
- package/kb/extra/persistence-changes/README.zh.md +88 -0
- package/kb/extra/persistence-changes/historical-formats/README.md +75 -0
- package/kb/extra/persistence-changes/historical-formats/README.zh.md +75 -0
- package/kb/extra/persistence-changes/historical-formats/v0.md +5105 -0
- package/kb/extra/persistence-changes/historical-formats/v0.zh.md +5105 -0
- package/kb/extra/persistence-changes/historical-formats/v1.md +5107 -0
- package/kb/extra/persistence-changes/historical-formats/v1.zh.md +5107 -0
- package/kb/extra/persistence-changes/historical-formats/v2.md +5362 -0
- package/kb/extra/persistence-changes/historical-formats/v2.zh.md +5362 -0
- package/kb/extra/persistence-changes/historical-formats/v3.md +5634 -0
- package/kb/extra/persistence-changes/historical-formats/v3.zh.md +5634 -0
- package/kb/extra/persistence-changes/releases/README.md +103 -0
- package/kb/extra/persistence-changes/releases/README.zh.md +103 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.md +201 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.1.zh.md +201 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.md +261 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.2.zh.md +261 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.md +126 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.3.zh.md +126 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.4.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.0.1-rc.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.2.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.3.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.6.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.7.zh.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.md +110 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.0-rc.8.zh.md +110 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.1.zh.md +82 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.md +119 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.1-rc.2.zh.md +119 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.md +295 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.1.zh.md +295 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.md +286 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.2.zh.md +286 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.3.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.4.zh.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-alpha.5.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.2-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.md +154 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.1.zh.md +154 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.md +86 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.3-alpha.2.zh.md +86 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.md +139 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.1.zh.md +139 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-alpha.2.zh.md +95 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.1.zh.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.md +75 -0
- package/kb/extra/persistence-changes/releases/dsh-v0.1.5-rc.2.zh.md +75 -0
- package/kb/extra/rescope.md +2 -2
- package/kb/extra/rescope.zh.md +2 -2
- package/kb/extra/session-format-status.md +63 -0
- package/kb/extra/session-format-status.zh.md +63 -0
- package/kb/extra/subsystems/agent-team.md +52 -28
- package/kb/extra/subsystems/agent-team.zh.md +52 -28
- package/kb/extra/subsystems/attachment.md +19 -9
- package/kb/extra/subsystems/attachment.zh.md +19 -9
- package/kb/extra/subsystems/boot.md +323 -0
- package/kb/extra/subsystems/boot.zh.md +323 -0
- package/kb/extra/subsystems/browser-use.md +67 -0
- package/kb/extra/subsystems/browser-use.zh.md +67 -0
- package/kb/extra/subsystems/claude-code-mods.md +146 -0
- package/kb/extra/subsystems/claude-code-mods.zh.md +146 -0
- package/kb/extra/subsystems/computer-use.md +56 -0
- package/kb/extra/subsystems/computer-use.zh.md +56 -0
- package/kb/extra/subsystems/deliverables.md +178 -0
- package/kb/extra/subsystems/deliverables.zh.md +178 -0
- package/kb/extra/subsystems/extensions.md +6 -4
- package/kb/extra/subsystems/extensions.zh.md +6 -4
- package/kb/extra/subsystems/feedback.md +165 -31
- package/kb/extra/subsystems/feedback.zh.md +165 -31
- package/kb/extra/subsystems/mcp.md +139 -0
- package/kb/extra/subsystems/mcp.zh.md +139 -0
- package/kb/extra/subsystems/office-to-pdf.md +87 -0
- package/kb/extra/subsystems/office-to-pdf.zh.md +87 -0
- package/kb/extra/subsystems/otel.md +44 -0
- package/kb/extra/subsystems/otel.zh.md +44 -0
- package/kb/extra/subsystems/product-telemetry.md +79 -0
- package/kb/extra/subsystems/product-telemetry.zh.md +79 -0
- package/kb/extra/subsystems/ssh.md +135 -0
- package/kb/extra/subsystems/ssh.zh.md +135 -0
- package/kb/extra/subsystems/todo.md +3 -3
- package/kb/extra/subsystems/todo.zh.md +3 -3
- package/kb/extra/subsystems/voice-input.md +164 -0
- package/kb/extra/subsystems/voice-input.zh.md +164 -0
- package/kb/extra/subsystems/webhook.md +3 -3
- package/kb/extra/subsystems/webhook.zh.md +1 -1
- package/kb/extra/testing.md +5 -4
- package/kb/extra/testing.zh.md +5 -4
- package/kb/extra/ui-radius.md +115 -0
- package/kb/extra/ui-radius.zh.md +115 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/schedule-optional-bundle/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.md +25 -0
- package/kb/extra/upgrade-guide/v0.1.7-rc.2/transcript-view-legacy-normal/guide.zh.md +25 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/account-sign-in-errors/guide.zh.md +18 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/remove-runtime-invariants/guide.zh.md +23 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md +22 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.md +27 -0
- package/kb/extra/upgrade-guide/v0.2.0-rc.2/subpath-plugin-display-manifest/guide.zh.md +27 -0
- package/kb/extra/web-styling.md +12 -2
- package/kb/extra/web-styling.zh.md +12 -2
- package/kb/meta/search-index.json +1019 -251
- package/kb/meta/site-pages.txt +187 -183
- package/kb/meta/source.json +8 -8
- package/kb/meta/topics.md +11 -7
- package/kb/site/develop/basic/config.md +1 -0
- package/kb/site/develop/basic/index.md +1 -0
- package/kb/site/develop/basic/publish.md +10 -3
- package/kb/site/develop/basic/tool.md +1 -0
- package/kb/site/develop/cordis-tutorial/01-first-plugin.md +1 -0
- package/kb/site/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
- package/kb/site/develop/cordis-tutorial/03-services.md +1 -0
- package/kb/site/develop/cordis-tutorial/04-events.md +1 -0
- package/kb/site/develop/cordis-tutorial/05-config.md +28 -0
- package/kb/site/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +1 -0
- package/kb/site/develop/cordis-tutorial/index.md +1 -0
- package/kb/site/develop/framework/events.md +1 -0
- package/kb/site/develop/framework/index.md +2 -1
- package/kb/site/develop/framework/service.md +1 -0
- package/kb/site/develop/practice/dynamic-cordis.md +9 -8
- package/kb/site/develop/practice/index.md +1 -0
- package/kb/site/develop/practice/llm-adapter.md +2 -1
- package/kb/site/en/develop/basic/config.md +1 -0
- package/kb/site/en/develop/basic/index.md +1 -0
- package/kb/site/en/develop/basic/publish.md +10 -3
- package/kb/site/en/develop/basic/tool.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/01-first-plugin.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/02-lifecycle-and-effects.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/03-services.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/04-events.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/05-config.md +28 -0
- package/kb/site/en/develop/cordis-tutorial/06-composition-and-hmr.md +3 -2
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +1 -0
- package/kb/site/en/develop/cordis-tutorial/index.md +1 -0
- package/kb/site/en/develop/framework/events.md +1 -0
- package/kb/site/en/develop/framework/index.md +2 -1
- package/kb/site/en/develop/framework/service.md +1 -0
- package/kb/site/en/develop/practice/dynamic-cordis.md +9 -8
- package/kb/site/en/develop/practice/index.md +1 -0
- package/kb/site/en/develop/practice/llm-adapter.md +2 -1
- package/kb/site/en/guide/github-review.md +1 -0
- package/kb/site/en/guide/mcp-memory.md +1 -0
- package/kb/site/en/guide/network-proxy.md +2 -1
- package/kb/site/en/guide/providers-custom-form.png +0 -0
- package/kb/site/en/guide/providers-models-page.png +0 -0
- package/kb/site/en/guide/providers.md +98 -83
- package/kb/site/en/guide/public-deployments.md +36 -0
- package/kb/site/en/guide/python-sdk.md +60 -23
- package/kb/site/en/guide/quickstart.md +2 -0
- package/kb/site/en/guide/schedule.md +70 -11
- package/kb/site/en/reference/agent-lifecycle.md +13 -5
- package/kb/site/en/reference/api-gateway.md +13 -11
- package/kb/site/en/reference/capability-seams.md +187 -62
- package/kb/site/en/reference/config-catalog.md +1887 -819
- package/kb/site/en/reference/cookbook/adding-a-package.md +57 -3
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +35 -64
- package/kb/site/en/reference/cookbook/adding-a-tool.md +5 -4
- package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/en/reference/cookbook/extension-cookbook.md +7 -6
- package/kb/site/en/reference/cordis-api/context.md +1 -0
- package/kb/site/en/reference/cordis-api/events.md +1 -0
- package/kb/site/en/reference/cordis-api/fiber.md +4 -3
- package/kb/site/en/reference/cordis-api/inherited.md +16 -16
- package/kb/site/en/reference/cordis-api/registry.md +1 -0
- package/kb/site/en/reference/cordis-api/service.md +1 -0
- package/kb/site/en/reference/cordis-primer.md +1 -0
- package/kb/site/en/reference/index.md +32 -15
- package/kb/site/en/reference/persistence-catalog.md +7787 -81
- package/kb/site/en/reference/subsystems/approval.md +3 -2
- package/kb/site/en/reference/subsystems/client-modules.md +30 -13
- package/kb/site/en/reference/subsystems/client-resources.md +96 -0
- package/kb/site/en/reference/subsystems/commands.md +6 -1
- package/kb/site/en/reference/subsystems/compaction.md +50 -3
- package/kb/site/en/reference/subsystems/conversation.md +36 -6
- package/kb/site/en/reference/subsystems/core.md +174 -271
- package/kb/site/en/reference/subsystems/credentials.md +169 -5
- package/kb/site/en/reference/subsystems/filesystem.md +26 -0
- package/kb/site/en/reference/subsystems/goal.md +39 -2
- package/kb/site/en/reference/subsystems/index.md +18 -5
- package/kb/site/en/reference/subsystems/jobs.md +337 -127
- package/kb/site/en/reference/subsystems/llm-streaming.md +93 -43
- package/kb/site/en/reference/subsystems/lsp.md +2 -1
- package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/en/reference/subsystems/persistence.md +40 -18
- package/kb/site/en/reference/subsystems/plan.md +2 -1
- package/kb/site/en/reference/subsystems/ptc-runtime.md +236 -0
- package/kb/site/en/reference/subsystems/sandbox.md +7 -5
- package/kb/site/en/reference/subsystems/schedule.md +392 -33
- package/kb/site/en/reference/subsystems/scope.md +2 -1
- package/kb/site/en/reference/subsystems/session-projection.md +22 -19
- package/kb/site/en/reference/subsystems/session-query.md +1 -0
- package/kb/site/en/reference/subsystems/session-reference.md +12 -6
- package/kb/site/en/reference/subsystems/session-telemetry.md +27 -8
- package/kb/site/en/reference/subsystems/session-title.md +6 -5
- package/kb/site/en/reference/subsystems/session.md +258 -118
- package/kb/site/en/reference/subsystems/settings.md +43 -292
- package/kb/site/en/reference/subsystems/shell.md +44 -32
- package/kb/site/en/reference/subsystems/sidebar-right.md +162 -0
- package/kb/site/en/reference/subsystems/skills.md +5 -6
- package/kb/site/en/reference/subsystems/slots.md +68 -39
- package/kb/site/en/reference/subsystems/spill.md +15 -7
- package/kb/site/en/reference/subsystems/storage.md +2 -2
- package/kb/site/en/reference/subsystems/subagent.md +65 -72
- package/kb/site/en/reference/subsystems/subprocess.md +42 -44
- package/kb/site/en/reference/subsystems/system-prompt.md +7 -2
- package/kb/site/en/reference/subsystems/terminal.md +1 -0
- package/kb/site/en/reference/subsystems/token-meter.md +3 -1
- package/kb/site/en/reference/subsystems/tools.md +44 -16
- package/kb/site/en/reference/subsystems/typert.md +153 -10
- package/kb/site/en/reference/subsystems/user-questions.md +131 -1
- package/kb/site/en/reference/subsystems/web-client.md +15 -9
- package/kb/site/en/reference/subsystems/web-server.md +74 -1
- package/kb/site/en/reference/subsystems/web.md +1 -0
- package/kb/site/en/reference/subsystems/workflow.md +10 -9
- package/kb/site/en/reference/subsystems/workspace.md +343 -4
- package/kb/site/en/reference/tool-catalog.md +806 -311
- package/kb/site/en/reference/tool-execution-pipeline.md +9 -5
- package/kb/site/guide/github-review.md +1 -0
- package/kb/site/guide/mcp-memory.md +1 -0
- package/kb/site/guide/network-proxy.md +2 -1
- package/kb/site/guide/providers-custom-form.zh.png +0 -0
- package/kb/site/guide/providers-models-page.zh.png +0 -0
- package/kb/site/guide/providers.md +109 -94
- package/kb/site/guide/public-deployments.md +36 -0
- package/kb/site/guide/python-sdk.md +60 -23
- package/kb/site/guide/quickstart.md +2 -0
- package/kb/site/guide/schedule.md +70 -11
- package/kb/site/reference/agent-lifecycle.md +13 -5
- package/kb/site/reference/api-gateway.md +13 -11
- package/kb/site/reference/capability-seams.md +187 -62
- package/kb/site/reference/config-catalog.md +1889 -820
- package/kb/site/reference/cookbook/adding-a-package.md +55 -3
- package/kb/site/reference/cookbook/adding-a-settings-card.md +35 -64
- package/kb/site/reference/cookbook/adding-a-tool.md +5 -4
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/reference/cookbook/extension-cookbook.md +7 -6
- package/kb/site/reference/cordis-api/context.md +1 -0
- package/kb/site/reference/cordis-api/events.md +1 -0
- package/kb/site/reference/cordis-api/fiber.md +4 -3
- package/kb/site/reference/cordis-api/inherited.md +16 -16
- package/kb/site/reference/cordis-api/registry.md +1 -0
- package/kb/site/reference/cordis-api/service.md +1 -0
- package/kb/site/reference/cordis-primer.md +1 -0
- package/kb/site/reference/index.md +32 -15
- package/kb/site/reference/persistence-catalog.md +7791 -85
- package/kb/site/reference/subsystems/approval.md +3 -2
- package/kb/site/reference/subsystems/client-modules.md +30 -13
- package/kb/site/reference/subsystems/client-resources.md +96 -0
- package/kb/site/reference/subsystems/commands.md +6 -1
- package/kb/site/reference/subsystems/compaction.md +50 -3
- package/kb/site/reference/subsystems/conversation.md +35 -5
- package/kb/site/reference/subsystems/core.md +174 -271
- package/kb/site/reference/subsystems/credentials.md +169 -5
- package/kb/site/reference/subsystems/filesystem.md +26 -0
- package/kb/site/reference/subsystems/goal.md +39 -2
- package/kb/site/reference/subsystems/index.md +28 -15
- package/kb/site/reference/subsystems/jobs.md +336 -126
- package/kb/site/reference/subsystems/llm-streaming.md +93 -43
- package/kb/site/reference/subsystems/lsp.md +2 -1
- package/kb/site/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/reference/subsystems/persistence.md +40 -18
- package/kb/site/reference/subsystems/plan.md +2 -1
- package/kb/site/reference/subsystems/ptc-runtime.md +236 -0
- package/kb/site/reference/subsystems/sandbox.md +7 -5
- package/kb/site/reference/subsystems/schedule.md +392 -33
- package/kb/site/reference/subsystems/scope.md +2 -1
- package/kb/site/reference/subsystems/session-projection.md +22 -19
- package/kb/site/reference/subsystems/session-query.md +1 -0
- package/kb/site/reference/subsystems/session-reference.md +12 -6
- package/kb/site/reference/subsystems/session-telemetry.md +27 -8
- package/kb/site/reference/subsystems/session-title.md +6 -5
- package/kb/site/reference/subsystems/session.md +258 -118
- package/kb/site/reference/subsystems/settings.md +43 -292
- package/kb/site/reference/subsystems/shell.md +44 -32
- package/kb/site/reference/subsystems/sidebar-right.md +162 -0
- package/kb/site/reference/subsystems/skills.md +5 -6
- package/kb/site/reference/subsystems/slots.md +68 -39
- package/kb/site/reference/subsystems/spill.md +15 -7
- package/kb/site/reference/subsystems/storage.md +2 -2
- package/kb/site/reference/subsystems/subagent.md +64 -71
- package/kb/site/reference/subsystems/subprocess.md +42 -44
- package/kb/site/reference/subsystems/system-prompt.md +7 -2
- package/kb/site/reference/subsystems/terminal.md +1 -0
- package/kb/site/reference/subsystems/token-meter.md +3 -1
- package/kb/site/reference/subsystems/tools.md +44 -16
- package/kb/site/reference/subsystems/typert.md +153 -10
- package/kb/site/reference/subsystems/user-questions.md +132 -2
- package/kb/site/reference/subsystems/web-client.md +15 -9
- package/kb/site/reference/subsystems/web-server.md +74 -1
- package/kb/site/reference/subsystems/web.md +1 -0
- package/kb/site/reference/subsystems/workflow.md +10 -9
- package/kb/site/reference/subsystems/workspace.md +343 -4
- package/kb/site/reference/tool-catalog.md +810 -315
- package/kb/site/reference/tool-execution-pipeline.md +9 -5
- package/lib/index.js +25 -44
- package/package.json +3 -2
- package/skills/dsh-plugin-dev-kb.md +6 -5
- package/kb/site/en/reference/subsystems/code-runtime.md +0 -198
- package/kb/site/en/reference/subsystems/invariants.md +0 -91
- package/kb/site/reference/subsystems/code-runtime.md +0 -198
- package/kb/site/reference/subsystems/invariants.md +0 -91
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/tool-execution-pipeline.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/tool-execution-pipeline.md"
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
<!-- Generated by scripts/gen-doc-graphs.ts - do not edit by hand.
|
|
@@ -7,7 +8,7 @@ editSource: "docs/tool-execution-pipeline.md"
|
|
|
7
8
|
|
|
8
9
|
# Tool Execution Pipeline
|
|
9
10
|
|
|
10
|
-
This graph shows where policy, hooks, sandboxing, filesystem guards, result rewriting, final-outcome observation, and UI rendering run without changing the loop. The `tools/pre-execute` waterfall runs first, monotonic guards run next, and the `tools/execute` and `tools/post-execute` waterfalls follow; the three waterfalls may transform a call. Definition-owned `finalizeContent` and `tools/result` run afterward.
|
|
11
|
+
This graph shows where policy, hooks, sandboxing, filesystem guards, result rewriting, final-outcome observation, and UI rendering run without changing the loop. The `tools/pre-execute` waterfall runs first, monotonic guards run next, and the `tools/execute` and `tools/post-execute` waterfalls follow; the three waterfalls may transform a call. Definition-owned `projectContent` installs prepared content before post-execute; `finalizeContent` and `tools/result` run afterward.
|
|
11
12
|
|
|
12
13
|
```mermaid
|
|
13
14
|
flowchart TD
|
|
@@ -21,7 +22,8 @@ flowchart TD
|
|
|
21
22
|
around["<code>tools/execute</code> waterfall<br/>timeout, retry, metrics (around dispatch)"]
|
|
22
23
|
toolBody["Registered tool execute() body"]
|
|
23
24
|
fsGate["<code>fs/write-intent</code> or <code>fs/edit-intent</code><br/>tool-fs mutations only"]
|
|
24
|
-
owned["Tool-owned session events<br/><code>todo/write</code>, <code>fs/observed</code>, <code>hook/invoked</code>, <code>hook/result</code>, <code>tool/
|
|
25
|
+
owned["Tool-owned session events<br/><code>todo/write</code>, <code>fs/observed</code>, <code>hook/invoked</code>, <code>hook/result</code>, <code>tool/ptc-dispatch</code>"]
|
|
26
|
+
project["ToolDefinition.projectContent<br/>execution-prepared text and images"]
|
|
25
27
|
post["<code>tools/post-execute</code> waterfall<br/>accept, block, replace, add context"]
|
|
26
28
|
normalized["Registry outer normalization<br/>pipeline/result snapshot throws become isError"]
|
|
27
29
|
finalize["ToolDefinition.finalizeContent<br/>last content-only invariant"]
|
|
@@ -43,13 +45,15 @@ flowchart TD
|
|
|
43
45
|
approval -->|allowed-once| guards
|
|
44
46
|
approval -->|rejected, cancelled, unavailable| denied
|
|
45
47
|
approval -.->|throw| normalized
|
|
46
|
-
denied -->
|
|
48
|
+
denied --> project
|
|
47
49
|
pre -.->|throw| normalized
|
|
48
50
|
toolBody --> fsGate
|
|
49
51
|
fsGate --> toolBody
|
|
50
52
|
toolBody --> owned
|
|
51
53
|
toolBody --> around
|
|
52
|
-
around -->
|
|
54
|
+
around --> project
|
|
55
|
+
project --> post
|
|
56
|
+
project -.->|throw| normalized
|
|
53
57
|
around -.->|wrapper throws| normalized
|
|
54
58
|
post -.->|throw| normalized
|
|
55
59
|
post --> finalize
|
|
@@ -61,6 +65,6 @@ flowchart TD
|
|
|
61
65
|
allResults --> context
|
|
62
66
|
```
|
|
63
67
|
|
|
64
|
-
Filesystem read-before-edit checks stay below `tool-fs` on `fs/*` events. Generic pre/post waterfalls host hooks and approval policy; `ctx.approval` resolves asks before monotonic guards, and owner policy that must not be reordered remains a registered guard. Around-dispatch concerns such as timeouts wrap `tools/execute`. The registry losslessly snapshots the candidate result and normalizes a snapshot failure before the visible definition's snapshotted `finalizeContent` callback enforces its synchronous content-only invariant. `tools/result` then observes the immutable, lossless-JSON outcome. This lets hooks span tool families without coupling the tools to one policy service. PTC mode sends both the reserved `run_code` transport and its serialized sub-calls through the pipeline; sub-calls carry the parent token, log `tool/
|
|
68
|
+
Filesystem read-before-edit checks stay below `tool-fs` on `fs/*` events. Generic pre/post waterfalls host hooks and approval policy; `ctx.approval` resolves asks before monotonic guards, and owner policy that must not be reordered remains a registered guard. Around-dispatch concerns such as timeouts wrap `tools/execute`. The registry losslessly snapshots the candidate result and normalizes a snapshot failure before the visible definition's snapshotted `finalizeContent` callback enforces its synchronous content-only invariant. `tools/result` then observes the immutable, lossless-JSON outcome. This lets hooks span tool families without coupling the tools to one policy service. PTC mode sends both the reserved `run_code` transport and its serialized sub-calls through the pipeline; sub-calls carry the parent token, log `tool/ptc-dispatch`, return denials as binding rejections, and omit `additionalContexts` to preserve call/result adjacency.
|
|
65
69
|
|
|
66
70
|
Maintenance mode: curated Mermaid flow; exact tool schemas and event signatures live in generated catalogs.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/user/guide/network-proxy.zh.md"
|
|
3
|
+
rawMarkdownPath: "guide/network-proxy.md"
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# 在网络代理后面运行 DSH
|
|
@@ -68,7 +69,7 @@ Node 只在进程启动时读取该变量,所以要在运行 `dsh` 之前导
|
|
|
68
69
|
并非 DSH 发出的每个请求都会走代理:
|
|
69
70
|
|
|
70
71
|
- **本机上的一切。** loopback 始终直连:`localhost`、整个 `127.0.0.0/8` 段、`::1` 与 `0.0.0.0`。代理无法有意义地访问一个只在本地监听的服务。
|
|
71
|
-
- **模型编写的代码。**
|
|
72
|
+
- **模型编写的代码。** Workflow worker 与 Node ptc-runtime 进程不接收代理配置,因此模型脚本读不到可能携带密码的代理 URL。直接请求必须自行配置所需代理,并继续受到执行沙箱的约束。
|
|
72
73
|
- **使用情况遥测。** OTLP 导出器用的是 Node 自带的 HTTP 客户端,而不是代理所配置的那个,因此遥测直连;在禁止直连出网的环境里它只会失败。DSH 的任何功能都不依赖它。设 `DSH_TELEMETRY_MODE=DISABLED` 可完全关闭。
|
|
73
74
|
- **`web_fetch` 访问字面量私网地址。** 形如 `http://10.0.0.5/` 的 URL 会被拒绝而非交给代理,与未配置代理时得到的拒绝相同。
|
|
74
75
|
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/user/guide/providers.zh.md"
|
|
3
|
+
rawMarkdownPath: "guide/providers.md"
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# 配置模型
|
|
@@ -10,113 +11,125 @@ editSource: "docs/user/guide/providers.zh.md"
|
|
|
10
11
|
|
|
11
12
|
打开**设置 → 模型**。DeepSeek 卡片提供一个 API 密钥字段;输入密钥并保存。
|
|
12
13
|
|
|
13
|
-

|
|
14
15
|
|
|
15
16
|
密钥是只写的。保存后,页面只会收到脱敏描述符,永远不会收到明文密钥。密钥存储在 `$DSH_HOME/.credentials.yaml` 中,settings 只保留它的凭据引用。
|
|
16
17
|
|
|
17
|
-
##
|
|
18
|
+
## 添加第三方提供商
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
选择**添加模型提供商**。卡片默认打开在**第三方模型提供商**:选取 dsh 自带的提供商——列表显示的是提供商 id,例如 `anthropic`、`openai`、Kimi 对应的 `moonshotai`、GLM 对应的 `zai`——输入其 API 密钥并保存。已安装目录会提供端点、协议和模型列表。
|
|
20
21
|
|
|
21
|
-
通过 OAuth
|
|
22
|
+
通过 OAuth 登录的提供商(例如 Codex)暂不支持。
|
|
22
23
|
|
|
23
|
-
##
|
|
24
|
+
## 添加自定义模型 API
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
对于中转站、公司网关、自建服务器或已安装目录中不存在的提供商,把卡片切换到**自定义模型 API**。提供小写 Provider ID、基础 URL、API 协议、凭据和至少一个模型。**API 协议**必须选网关实际使用的那一种,选择框提供三种:OpenAI Chat Completions、OpenAI Responses 和 Anthropic Messages,在当前 profile 的 `cordis.patch.yml` 中分别存为 `openai-completions`、`openai-responses` 和 `anthropic-messages`。一个提供商只使用一种协议,网关同时提供两种时需要建两个提供商。
|
|
26
27
|
|
|
27
|
-

|
|
28
29
|
|
|
29
|
-
Provider ID
|
|
30
|
+
Provider ID 是永久的,因为请求、已保存会话、模型默认值和凭据引用都会使用它。如需重命名提供商,请添加新提供商并删除旧提供商。显示名称、基础 URL、协议、凭据和模型仍可编辑。
|
|
30
31
|
|
|
31
32
|
### 探测模型
|
|
32
33
|
|
|
33
|
-
在**模型目录**中选择**获取可用模型**,即可询问端点它提供哪些模型。请求使用表单当前的 API
|
|
34
|
+
在**模型目录**中选择**获取可用模型**,即可询问端点它提供哪些模型。请求使用表单当前的 API 地址、协议和密钥,已保存的提供商则用已存储的密钥;响应会打开一个可搜索的选择框,搜索、勾选想要的模型,再点**添加所选**。保存或创建提供商之前不会存储任何内容。
|
|
34
35
|
|
|
35
|
-
探测读取的是常见网关公开的列表格式,但并非每个端点都用这些格式作答,所以它只是便利手段而非保证:探测失败或列表为空时,手动添加模型 ID
|
|
36
|
+
探测读取的是常见网关公开的列表格式,但并非每个端点都用这些格式作答,所以它只是便利手段而非保证:探测失败或列表为空时,手动添加模型 ID 即可,效果完全一样。内置提供商一律由已安装目录作答,即使其 API 地址指向网关也是如此,要查看网关实际提供的模型,请通过自定义提供商探测。
|
|
36
37
|
|
|
37
38
|
## 选择模型
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
已配置的提供商会出现在模型选择器中。选择模型也会将其设为新会话的默认值。已发送过请求的会话会保留自身日志中记录的模型。
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
如果已保存默认值指向已删除的提供商,输入框会显示**选择模型**,并在选择其他模型前阻止输入。
|
|
42
43
|
|
|
43
44
|
## 进阶配置
|
|
44
45
|
|
|
45
|
-
自动生成的[插件配置目录](../reference/config-catalog.md)列出每个插件的所有受支持字段与默认值;[`dsh-llm-pi-ai`](../reference/config-catalog.md#deepseek-aidsh-llm-pi-ai)
|
|
46
|
+
自动生成的[插件配置目录](../reference/config-catalog.md)列出每个插件的所有受支持字段与默认值;[`dsh-llm-pi-ai`](../reference/config-catalog.md#deepseek-aidsh-llm-pi-ai) 就是本页所配置的那个提供商段落。[`dsh-llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm-pi-ai/README.zh.md) 和 [`dsh-llm-deepseek`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm-deepseek/README.zh.md) 参考文档负责直接 `cordis.patch.yml` 配置、目录解析、推理控制、凭据与适配器错误。
|
|
46
47
|
|
|
47
|
-
::: tip
|
|
48
|
-
|
|
48
|
+
::: tip 其他设置
|
|
49
|
+
模型页提供 API 密钥、显示名称、API 地址、API 协议,以及每个模型的 ID、显示名称、上下文窗口、最大输出 token 数和输入类型。推理等级、请求兼容性开关、请求头、超时和重试策略在 `$DSH_HOME/profiles/<profile>/cordis.patch.yml` 中设置,也就是模型页写入的同一份文档。可以直接编辑它;浏览器与服务器在同一台机器时,也可以点击设置页顶部的**打开配置文件**打开它。适配器会在下一次请求时重新读取,无需重启任何东西。下面各小节介绍多数网关会用到的字段。
|
|
50
|
+
|
|
51
|
+
按常规方式通过 `dsh web` 启动 Web UI 时,`<profile>` 就是 `web`,完整路径为 `$DSH_HOME/profiles/web/cordis.patch.yml`。如果使用自定义 profile,请替换为启动时指定的名称。
|
|
49
52
|
:::
|
|
50
53
|
|
|
51
54
|
### 图片输入
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
在**设置 → 模型**中编辑提供商,打开**自定义设置**并展开该模型的**模型选项**。**输入类型**独占容量字段下方的一行。对于支持图片的模型,勾选**图片**并保存。没有继承图片能力的新自定义模型默认勾选**文本**。至少保留一种输入类型;仅图片模型需先勾选图片,再取消文本。
|
|
57
|
+
|
|
58
|
+
复选框将 pi-ai 模型的选择保存为 `input`,将直连 DeepSeek 适配器的选择保存为 `inputModalities`。也可以在 `$DSH_HOME/profiles/<profile>/cordis.patch.yml` 中编辑模型;例如,以下自定义 pi-ai 提供商声明了一个纯文本模型和一个视觉模型:
|
|
54
59
|
|
|
55
|
-
|
|
60
|
+
这些示例展示 profile patch 中的配置字段。Cordis 配置覆盖会替换完整条目配置;编辑已有覆盖项时,请保留其他 provider 和字段。
|
|
56
61
|
|
|
57
62
|
```yaml
|
|
58
|
-
llm-pi-ai
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
- id: llm-pi-ai
|
|
64
|
+
config:
|
|
65
|
+
providers:
|
|
66
|
+
my-gateway:
|
|
67
|
+
apiKeyEnv: GATEWAY_API_KEY
|
|
68
|
+
api: openai-completions
|
|
69
|
+
baseURL: https://gateway.example/v1
|
|
70
|
+
models:
|
|
71
|
+
- id: legacy-chat
|
|
72
|
+
- id: vision-preview
|
|
73
|
+
input: [text, image]
|
|
68
74
|
```
|
|
69
75
|
|
|
70
|
-
`input` 接受 `text` 和 `image
|
|
76
|
+
Pi-ai 的 `input` 接受 `text` 和 `image`,且只作用于该模型。显式的非空选择优先。省略或为空的 `input` 先继承已安装目录的输入类型,再回退到路由的 `defaultInput`,后者默认为 `[text]`。复选框会显示这些继承值,仅打开模型行不会保存覆盖值。
|
|
77
|
+
|
|
78
|
+
DeepSeek 将省略的 `inputModalities` 视为纯文本,并拒绝空列表。取消图片还会移除该模型的 `imagePixelBudget` 和 `imageMaxBytes`,因为 DeepSeek 拒绝纯文本模型上的图片限制。以后重新启用图片且需要自定义限制时,需再次设置这些限制。
|
|
79
|
+
|
|
80
|
+
修改复选框后如需恢复继承,可在 `cordis.patch.yml` 中移除模型的 `input` 或 `inputModalities` 字段。**恢复默认模型**会移除整个模型目录覆盖,包括其他模型编辑,因此仅在需要恢复整个目录时使用。
|
|
71
81
|
|
|
72
82
|
如果你手动录入的模型全都接受图片,可以在路由上设置一次回退值,不必逐个模型写:
|
|
73
83
|
|
|
74
84
|
```yaml
|
|
75
|
-
llm-pi-ai
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
- id: llm-pi-ai
|
|
86
|
+
config:
|
|
87
|
+
providers:
|
|
88
|
+
vision-gateway:
|
|
89
|
+
apiKeyEnv: GATEWAY_API_KEY
|
|
90
|
+
api: openai-completions
|
|
91
|
+
baseURL: https://vision.example/v1
|
|
92
|
+
defaultInput: [text, image]
|
|
93
|
+
models:
|
|
94
|
+
- id: first-model
|
|
95
|
+
- id: second-model
|
|
85
96
|
```
|
|
86
97
|
|
|
87
|
-
`defaultInput` 是回退值而不是覆盖值,默认为 `[text]
|
|
98
|
+
`defaultInput` 是回退值而不是覆盖值,默认为 `[text]`:在内置提供商上,它只为其目录未描述的模型作答,因此绝不会把目录中本就具备图片能力的模型的该能力去掉。要收窄这类模型,请用它自己的 `input`。内置提供商没有显式 `models` 列表时,写在 `modelOverrides` 下,以模型 id 为键:
|
|
88
99
|
|
|
89
100
|
```yaml
|
|
90
|
-
llm-pi-ai
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
101
|
+
- id: llm-pi-ai
|
|
102
|
+
config:
|
|
103
|
+
providers:
|
|
104
|
+
anthropic:
|
|
105
|
+
modelOverrides:
|
|
106
|
+
claude-sonnet-4-5:
|
|
107
|
+
input: [text]
|
|
96
108
|
```
|
|
97
109
|
|
|
98
|
-
|
|
110
|
+
在 pi-ai 配置中,除模型自身的 `input` 外,每个列表都至少要写一项模态;模型自身的空列表与省略它同义。未知模态在任何位置写入都会被拒绝。
|
|
99
111
|
|
|
100
|
-
|
|
112
|
+
这两个字段都是对你端点的断言,而不是对它的检查。声明了端点并不提供的图片能力的模型不会在这里被拦下,改由提供商拒绝该请求。
|
|
101
113
|
|
|
102
114
|
### 推理等级
|
|
103
115
|
|
|
104
|
-
|
|
116
|
+
对于声明了推理等级的模型,模型选择器会提供**推理等级**菜单。内置提供商的模型从已安装目录继承其等级。手动录入的模型不声明任何等级,因此模型菜单里不会出现推理等级项,由端点自身的默认值决定模型是否思考。请在 `$DSH_HOME/profiles/<profile>/cordis.patch.yml` 中用 `reasoningEfforts` 声明等级:
|
|
105
117
|
|
|
106
118
|
```yaml
|
|
107
|
-
llm-pi-ai
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
- id: llm-pi-ai
|
|
120
|
+
config:
|
|
121
|
+
providers:
|
|
122
|
+
my-gateway:
|
|
123
|
+
apiKeyEnv: GATEWAY_API_KEY
|
|
124
|
+
api: openai-completions
|
|
125
|
+
baseURL: https://gateway.example/v1
|
|
126
|
+
reasoning: high
|
|
127
|
+
models:
|
|
128
|
+
- id: my-reasoner
|
|
129
|
+
reasoningEfforts:
|
|
130
|
+
off:
|
|
131
|
+
high: high
|
|
132
|
+
max: max
|
|
120
133
|
```
|
|
121
134
|
|
|
122
135
|
每个键都是菜单提供的一个等级,其值是在协议上以 `reasoning_effort` 发送的写法,因此 `max: xhigh` 可以为自有一套词汇的网关重命名某个等级。只有 `off` 可以留空,因为对多数端点来说,不思考就是不传该参数。路由的 `reasoning` 是会话尚未选择等级时采用的等级;在选择器中选定某个等级后,它会与模型一起保存为新会话的默认值。
|
|
@@ -124,51 +137,53 @@ llm-pi-ai:
|
|
|
124
137
|
留空的 `off` 什么都不发送,这只能让「按请求才思考」的模型停下来;给 `off` 一个值,则会把该值作为 `reasoning_effort` 发送。对于「不明确关闭就会思考」的模型——例如 OpenAI 兼容网关后面的 DeepSeek V4——需要 `compat.thinkingFormat: deepseek`:它让 `off` 发送 `thinking: {type: disabled}`,其他每个等级则在 effort 之外再发送 `thinking: {type: enabled}`:
|
|
125
138
|
|
|
126
139
|
```yaml
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
models:
|
|
141
|
+
- id: deepseek-v4-pro
|
|
142
|
+
compat:
|
|
143
|
+
thinkingFormat: deepseek
|
|
144
|
+
reasoningEfforts:
|
|
145
|
+
off:
|
|
146
|
+
high: high
|
|
147
|
+
max: max
|
|
135
148
|
```
|
|
136
149
|
|
|
137
|
-
|
|
150
|
+
网关并不提供推理能力的内置提供商模型,可在 `modelOverrides` 下用 `reasoningEfforts: false` 去掉其等级;之后再为它选择等级会被拒绝并报 `UNSUPPORTED_REASONING_EFFORT`。DeepSeek 自身的路由不需要以上任何配置:其模型已经提供 `off`、`low`、`high` 和 `max`,`llm-deepseek.reasoningEffort` 设置选择器的起始默认值:
|
|
138
151
|
|
|
139
152
|
```yaml
|
|
140
|
-
llm-deepseek
|
|
141
|
-
|
|
153
|
+
- id: llm-deepseek
|
|
154
|
+
config:
|
|
155
|
+
reasoningEffort: max
|
|
142
156
|
```
|
|
143
157
|
|
|
144
158
|
### 请求兼容性
|
|
145
159
|
|
|
146
160
|
网关可能持有可用的密钥、地址也通得到,却仍然拒绝每一个请求。pi-ai 依据端点的 URL 决定请求的形状——系统提示词由哪个角色承载、输出上限写在哪个字段、思考级别如何传输——而对于它无法识别的地址,会当作 OpenAI 本身来对待。多数 OpenAI 兼容网关至少会拒绝 OpenAI 所接受的某一样东西。
|
|
147
161
|
|
|
148
|
-
其中两样占了绝大多数。声明了推理能力的模型,其系统提示词会以 `role: "developer"` 发出,很多网关直接拒绝;输出上限则写作 `max_completion_tokens`,只认 `max_tokens` 的服务端会拒绝。表单里没有这两个字段;请在 `$DSH_HOME/
|
|
162
|
+
其中两样占了绝大多数。声明了推理能力的模型,其系统提示词会以 `role: "developer"` 发出,很多网关直接拒绝;输出上限则写作 `max_completion_tokens`,只认 `max_tokens` 的服务端会拒绝。表单里没有这两个字段;请在 `$DSH_HOME/profiles/<profile>/cordis.patch.yml` 的路由上更正:
|
|
149
163
|
|
|
150
164
|
```yaml
|
|
151
|
-
llm-pi-ai
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
165
|
+
- id: llm-pi-ai
|
|
166
|
+
config:
|
|
167
|
+
providers:
|
|
168
|
+
my-gateway:
|
|
169
|
+
apiKeyEnv: GATEWAY_API_KEY
|
|
170
|
+
api: openai-completions
|
|
171
|
+
baseURL: https://gateway.example/v1
|
|
172
|
+
compat:
|
|
173
|
+
supportsDeveloperRole: false
|
|
174
|
+
maxTokensField: max_tokens
|
|
175
|
+
models:
|
|
176
|
+
- id: my-model
|
|
162
177
|
```
|
|
163
178
|
|
|
164
179
|
路由的 `compat` 是其模型的默认值,模型自身的则逐字段胜出,因此更正某一个模型无需重述整条路由:
|
|
165
180
|
|
|
166
181
|
```yaml
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
182
|
+
models:
|
|
183
|
+
- id: my-model
|
|
184
|
+
- id: my-reasoner
|
|
185
|
+
compat:
|
|
186
|
+
thinkingFormat: deepseek
|
|
172
187
|
```
|
|
173
188
|
|
|
174
189
|
两者都未设置的字段,沿用已安装 catalog 为该模型记录的值;catalog 也未描述的,落到 pi-ai 的检测。凡是写下的开关都要给值:冒号后留空的键(`supportsDeveloperRole:`)会被拒绝而不是被忽略,因为空值会抹掉 catalog 已知的信息,却又没有给出任何替代。任何协议都不接受的名字同样会被拒绝,报错会列出可用的那些。
|
|
@@ -179,14 +194,14 @@ llm-pi-ai:
|
|
|
179
194
|
|
|
180
195
|
## 排错
|
|
181
196
|
|
|
182
|
-
- **`MISSING_CREDENTIAL
|
|
183
|
-
- **`UNKNOWN_MODEL
|
|
197
|
+
- **`MISSING_CREDENTIAL`**:通过模型页存储提供商密钥,或提供被引用的环境变量。
|
|
198
|
+
- **`UNKNOWN_MODEL`**:选择已配置的模型,或向自定义提供商添加缺失的模型。
|
|
184
199
|
- **获取可用模型返回 401**:检查密钥。模型发现会调用 OpenAI 兼容的 `GET /models` 端点;对于不提供该端点的服务,请手动输入模型。
|
|
185
200
|
- **获取可用模型提示既没有 `data` 数组也没有 `models` 对象**:端点返回的列表格式不在探测的读取范围内。请手动输入模型。
|
|
186
201
|
- **密钥与地址都正确,网关却拒绝每一个请求**:它的请求形状与 OpenAI 不同。先在路由上设 `compat.supportsDeveloperRole: false` 与 `compat.maxTokensField: max_tokens`。
|
|
187
202
|
- **只有推理模型失败**:pi-ai 把它们的系统提示词以 `developer` 角色发出,而网关拒绝该角色。设 `compat.supportsDeveloperRole: false`。
|
|
188
|
-
- **手动录入的模型没有推理等级菜单**:该模型没有声明任何等级。在 `
|
|
203
|
+
- **手动录入的模型没有推理等级菜单**:该模型没有声明任何等级。在 `cordis.patch.yml` 中给该模型加上 `reasoningEfforts`。
|
|
189
204
|
- **`off` 无法让 DeepSeek 模型停止思考**:留空的 `off` 不发送任何推理字段,默认思考的端点就继续思考。请在模型或路由上设置 `compat.thinkingFormat: deepseek`。
|
|
190
205
|
- **某个 compat 开关因没有值而被拒绝**:冒号后什么都没写。给它一个值,或删掉该键以沿用已安装 catalog 的值。
|
|
191
|
-
-
|
|
192
|
-
-
|
|
206
|
+
- **图片在发送前被拒绝**:该模型未声明图片模态。请给自定义提供商的模型加上 `input: [text, image]`;在 DeepSeek 自身的路由上,请从配置的目录中选择支持图片的条目(默认为 `deepseek-flash`),并确认网关提供该模型且支持图片输入。
|
|
207
|
+
- **提供商拒绝了带图片的请求**:该模型声明了其端点实际并不提供的图片能力。请从授予它图片能力的那个列表中移除 `image`——可能是模型的 `input`,也可能是路由的 `defaultInput`——然后开启新会话:附加的图片会留在会话日志里,因此在会话离开它之前,同一个请求会不断重复。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
editSource: "docs/user/guide/public-deployments.zh.md"
|
|
3
|
+
rawMarkdownPath: "guide/public-deployments.md"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 在反向代理之后发布 Web UI
|
|
7
|
+
|
|
8
|
+
`dsh --profile web` 在 loopback 端口上以明文 HTTP 提供 GUI,因此其他机器上的浏览器无法访问它,进程也无从得知你实际使用的地址。它前面的反向代理拥有这条外部链路——公开主机名、TLS,以及转发到监听器之前剥离的路径前缀——`--public-url` 则告诉 DSH 浏览器使用的是哪个地址:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
dsh --profile web --public-url https://app.example/ui/ --trusted-host app.example
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## `--public-url` 公告什么
|
|
15
|
+
|
|
16
|
+
`--public-url` 接受可带挂载前缀的 `http://` 或 `https://` 根,并把它归一化为以 `/` 结尾。它提供打印与打开的启动 URL、`DSH_WEB_URL` 与 web 表层定位。webserver 继续提供 origin-root 路由,且从不了解挂载。`publicUrl` 配置字段发布同样的公告。
|
|
17
|
+
|
|
18
|
+
## 代理必须做什么
|
|
19
|
+
|
|
20
|
+
- **保留浏览器可见的 `Host`。** 栅栏把收到的 `Host` 与被接受的 authority 比对,因此代理应原样转发,而不要改写成监听器的地址。
|
|
21
|
+
- **剥离挂载前缀。** 监听器应答的是 origin-root 路由,因此对 `/ui/api/...` 的请求必须以 `/api/...` 抵达。
|
|
22
|
+
- **转发升级请求。** 页面发出的每个请求与 WebSocket 升级都必须连同其 `Upgrade` 与 `Connection` 头抵达监听器;代理对外提供 HTTPS 时,TLS 在其外部链路上终止。
|
|
23
|
+
- **改写 cookie 作用域。** 后端始终签发不带 `Secure` 的 host-only `Path=/` cookie;代理把 `Path` 改写为挂载(`/ui/`),并仅在其 HTTPS 链路上添加 `Secure`。
|
|
24
|
+
- **重定向裸挂载。** `/ui/` 是唯一入口:只有它把启动 token 换成会话 cookie;已持有该 cookie 的浏览器可由它或 `/ui/index.html` 取得文档,因为所提供的文档以自身目录解析 URL。对 `/ui` 的请求必须以 `/ui/` 抵达,而被剥离路径的后端无法重建该外部路径。
|
|
25
|
+
|
|
26
|
+
## 信任浏览器使用的 authority
|
|
27
|
+
|
|
28
|
+
栅栏接受 loopback,以及每个由 `--trusted-host` 点名的 authority。浏览器若以其他任何 authority 访问部署,无论代理多么正确,每个 API 调用都会得到 403,因此请用 `--trusted-host` 点名浏览器可见的 authority;用 `--public-url` 公告它只是展示,并不等于接纳。不带端口的条目匹配任意端口,适合每次绑定不同端口的隧道。栅栏只放行请求;打印 URL 中的启动 token 与签名会话 cookie 才完成认证。
|
|
29
|
+
|
|
30
|
+
无论是公告 URL 还是栅栏都不保护监听端口本身,因此请把端口限制在可信代理或网络内。
|
|
31
|
+
|
|
32
|
+
## 保护外部链路
|
|
33
|
+
|
|
34
|
+
在代理处终止 TLS。`http://` 公告根会以明文发送启动 token 与会话 cookie,而 `https://` 根只加密浏览器到代理这一段。打印的 URL 携带进程凭据,只应与预期用户分享。
|
|
35
|
+
|
|
36
|
+
[Web 应用参考](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/bundle/web-app/README.zh.md#public-deployments)负责 `--public-url` 与 `--trusted-host` 的命令行约定,以及 `publicUrl` 与 `trustedHosts` 字段。
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/user/guide/python-sdk.zh.md"
|
|
3
|
+
rawMarkdownPath: "guide/python-sdk.md"
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# Python SDK 入门
|
|
@@ -16,9 +17,14 @@ editSource: "docs/user/guide/python-sdk.zh.md"
|
|
|
16
17
|
|
|
17
18
|
## 安装 SDK
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
<div>
|
|
21
|
+
<a id="linux-与-macos"></a>
|
|
22
|
+
<a id="windows-powershell"></a>
|
|
23
|
+
</div>
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
::: code-group
|
|
26
|
+
|
|
27
|
+
```sh [Linux/macOS]
|
|
22
28
|
git clone https://github.com/deepseek-ai/deepseek-harness.git
|
|
23
29
|
cd deepseek-harness
|
|
24
30
|
python -m venv .venv
|
|
@@ -26,9 +32,7 @@ python -m venv .venv
|
|
|
26
32
|
python -m pip install deepseek-harness-sdk
|
|
27
33
|
```
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```powershell
|
|
35
|
+
```powershell [Windows PowerShell]
|
|
32
36
|
git clone https://github.com/deepseek-ai/deepseek-harness.git
|
|
33
37
|
Set-Location deepseek-harness
|
|
34
38
|
py -3.10 -m venv .venv
|
|
@@ -36,31 +40,43 @@ py -3.10 -m venv .venv
|
|
|
36
40
|
python -m pip install deepseek-harness-sdk
|
|
37
41
|
```
|
|
38
42
|
|
|
43
|
+
:::
|
|
44
|
+
|
|
39
45
|
安装内容包含匹配的原生运行时 wheel 与 `dsh` 命令。普通 SDK 运行不需要系统 Node.js。需要构建产物的仓库贡献者应使用 [Python 贡献者工作流](https://github.com/deepseek-ai/deepseek-harness/blob/master/python/development.zh.md)。
|
|
40
46
|
|
|
41
47
|
## 运行检入示例
|
|
42
48
|
|
|
43
49
|
导出凭据;使用兼容代理时再设置 endpoint:
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
<div>
|
|
52
|
+
<a id="linux-与-macos-1"></a>
|
|
53
|
+
<a id="windows-powershell-1"></a>
|
|
54
|
+
</div>
|
|
46
55
|
|
|
47
|
-
|
|
56
|
+
::: code-group
|
|
57
|
+
|
|
58
|
+
```sh [Linux/macOS]
|
|
48
59
|
export DEEPSEEK_API_KEY=sk-your-key-here
|
|
49
60
|
# export DEEPSEEK_BASE_URL=http://127.0.0.1:8000/v1
|
|
50
61
|
```
|
|
51
62
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```powershell
|
|
63
|
+
```powershell [Windows PowerShell]
|
|
55
64
|
$env:DEEPSEEK_API_KEY = "sk-your-key-here"
|
|
56
65
|
# $env:DEEPSEEK_BASE_URL = "http://127.0.0.1:8000/v1"
|
|
57
66
|
```
|
|
58
67
|
|
|
68
|
+
:::
|
|
69
|
+
|
|
59
70
|
使用显式 workspace 与 home 路径运行一个任务:
|
|
60
71
|
|
|
61
|
-
|
|
72
|
+
<div>
|
|
73
|
+
<a id="linux-与-macos-2"></a>
|
|
74
|
+
<a id="windows-powershell-2"></a>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
::: code-group
|
|
62
78
|
|
|
63
|
-
```sh
|
|
79
|
+
```sh [Linux/macOS]
|
|
64
80
|
python python/sdk/examples/minimal.py \
|
|
65
81
|
--workspace /absolute/path/to/disposable-workspace \
|
|
66
82
|
--dsh-home /absolute/path/to/example-dsh-home \
|
|
@@ -68,9 +84,7 @@ python python/sdk/examples/minimal.py \
|
|
|
68
84
|
"Inspect the repository and fix the failing tests."
|
|
69
85
|
```
|
|
70
86
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
```powershell
|
|
87
|
+
```powershell [Windows PowerShell]
|
|
74
88
|
python python/sdk/examples/minimal.py `
|
|
75
89
|
--workspace C:\work\disposable-workspace `
|
|
76
90
|
--dsh-home C:\work\example-dsh-home `
|
|
@@ -78,6 +92,8 @@ python python/sdk/examples/minimal.py `
|
|
|
78
92
|
"Inspect the repository and fix the failing tests."
|
|
79
93
|
```
|
|
80
94
|
|
|
95
|
+
:::
|
|
96
|
+
|
|
81
97
|
脚本会打印最终 assistant 响应。所选 home 会保存生成的 `sdk-minimal` profile、已安装插件,以及 `sessions/` 下的未压缩 JSONL 会话日志。示例与 SDK 绝不会静默读取 `~/.dsh`。
|
|
82
98
|
|
|
83
99
|
## 在程序中使用 SDK
|
|
@@ -111,39 +127,60 @@ SDK 会延迟启动内置的 `dsh --profile sdk-minimal` 进程,并复用到
|
|
|
111
127
|
|
|
112
128
|
需要在该 home 中持久保存依赖与 bundle 层时,使用 `dsh plugin`:
|
|
113
129
|
|
|
114
|
-
|
|
130
|
+
<div>
|
|
131
|
+
<a id="linux-与-macos-3"></a>
|
|
132
|
+
<a id="windows-powershell-3"></a>
|
|
133
|
+
</div>
|
|
115
134
|
|
|
116
|
-
|
|
135
|
+
::: code-group
|
|
136
|
+
|
|
137
|
+
```sh [Linux/macOS]
|
|
117
138
|
export DSH_HOME=/absolute/path/to/example-dsh-home
|
|
118
139
|
dsh --profile sdk-minimal --dump-default-config >/dev/null
|
|
119
140
|
dsh plugin --profile sdk-minimal add file:/absolute/path/to/my-plugin-bundle
|
|
120
141
|
```
|
|
121
142
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
```powershell
|
|
143
|
+
```powershell [Windows PowerShell]
|
|
125
144
|
$env:DSH_HOME = "C:\work\example-dsh-home"
|
|
126
145
|
dsh --profile sdk-minimal --dump-default-config | Out-Null
|
|
127
146
|
dsh plugin --profile sdk-minimal add file:C:/work/my-plugin-bundle
|
|
128
147
|
```
|
|
129
148
|
|
|
149
|
+
:::
|
|
150
|
+
|
|
130
151
|
第一个命令初始化随附的独立 profile。第二个命令把包管理转发给 `pnpm`,然后记录所有导出 `dsh.bundle` 层的已安装包。只有执行此管理命令时才需要安装 `pnpm`;启动已安装 SDK 不需要它。持久配置项变更应编辑 `$DSH_HOME/profiles/sdk-minimal/cordis.patch.yml`;单次启动变更则从 Python 传入 patch 文件。
|
|
131
152
|
|
|
132
153
|
另一个 `profile` 只有包含 `@deepseek-ai/dsh-sdk-app` 或另一个 JSON-RPC server 配置项时才有效。缺失 server 配置项、无法解析的插件和非法 patch 会在启动时失败,不会回退到其他组合。
|
|
133
154
|
|
|
155
|
+
<a id="opt-in-to-str_replace_editor"></a>
|
|
156
|
+
### 显式启用 `str_replace_editor`
|
|
157
|
+
|
|
158
|
+
随附运行时包含 `str_replace_editor`,但 `sdk-minimal` 的默认 Cordis tree 不挂载它。要使用该工具,请将以下配置保存为 `editor.patch.yml`;`insert` 会添加 editor,以及极简 profile 缺少的文件系统后端:
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
- insert:
|
|
162
|
+
- id: fs-local
|
|
163
|
+
name: '@deepseek-ai/dsh-fs-local'
|
|
164
|
+
config:
|
|
165
|
+
cwd: !!js process.cwd()
|
|
166
|
+
- id: tool-str-replace-editor
|
|
167
|
+
name: '@deepseek-ai/dsh-tool-str-replace-editor'
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
构造 `DeepSeekHarness(profile="sdk-minimal", ...)` 时传入 `patches=("/absolute/path/to/editor.patch.yml",)`,或将 patch 写入 `$DSH_HOME/profiles/sdk-minimal/cordis.patch.yml` 以持久保存配置。下次运行时启动后,模型请求会在持久 shell 之外包含 `str_replace_editor`。本地文件系统后端以运行时工作目录解析相对路径;与极简 shell 一样,它不会将访问限制在该目录内。对于标准 `sdk` profile,只插入 editor 配置项,让它使用已有的文件系统后端与策略。
|
|
171
|
+
|
|
134
172
|
## 理解极简 profile
|
|
135
173
|
|
|
136
174
|
| 属性 | 值 |
|
|
137
175
|
|---|---|
|
|
138
176
|
| 系统提示词 | `DSH_SYSTEM_PROMPT`,未设置时为 `You are a helpful software engineer assistant.` |
|
|
139
177
|
| `minimal.py` 的模型 | `--model`,然后是 `DSH_MODEL`,最后是 `deepseek-v4-flash` |
|
|
140
|
-
| 面向模型的工具 | Linux/macOS 上的持久 `bash` 或 Windows 上的 `pwsh
|
|
178
|
+
| 面向模型的工具 | Linux/macOS 上的持久 `bash` 或 Windows 上的 `pwsh` |
|
|
141
179
|
| Shell 超时 | 300 秒 |
|
|
142
|
-
| Editor 输出上限 | 16,000 字符 |
|
|
143
180
|
| 运行时上下文与 compaction | 不存在 |
|
|
144
181
|
| 会话持久化 | `<dsh_home>/sessions` 下的未压缩 JSONL |
|
|
145
182
|
|
|
146
|
-
该 profile 的唯一组合包会在空根之上插入完整配置树,且不包含 `dsh-base`,因此基础 profile 以后新增的工具不会隐式出现。它包含 SDK 协议、一个由环境配置的 DeepSeek
|
|
183
|
+
该 profile 的唯一组合包会在空根之上插入完整配置树,且不包含 `dsh-base`,因此基础 profile 以后新增的工具不会隐式出现。它包含 SDK 协议、一个由环境配置的 DeepSeek 适配器、本地执行与持久化;文件系统工具、settings、托管凭据、OTel 遥测、Web 工具、subagent、本地指令发现和 compaction 均不存在。[DeepSeek 会话日志贡献器](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-log-deepseek/README.zh.md)默认随 DeepSeek 请求上传未接受的日志事件,每次请求最多 `maxBytes`(8 MiB);在 profile patch 中设置 `session-log-deepseek.enabled: false` 可将其关闭。它固定使用 `danger-full-access`,因此按平台选择的持久 shell 可以修改运行时可见的任何路径;应使用一次性 checkout 或容器。
|
|
147
184
|
|
|
148
185
|
已安装 wheel 仍会打包完整 `web` profile 与前端产物。如果 Python SDK 部署还需要浏览器应用,请针对显式 `DSH_HOME` 运行 `dsh web`;`web` 是独立 CLI 应用,不能为 Python SDK client 提供服务。
|
|
149
186
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/user/guide/index.zh.md"
|
|
3
|
+
rawMarkdownPath: "guide/quickstart.md"
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# 使用 Web UI
|
|
@@ -28,5 +29,6 @@ Agent(智能体)可以读取和编辑工作区文件、运行命令、委派
|
|
|
28
29
|
|
|
29
30
|
- [配置模型](./providers.md)
|
|
30
31
|
- [使用 Python SDK](./python-sdk.md)
|
|
32
|
+
- [在反向代理之后发布 Web UI](./public-deployments.md)
|
|
31
33
|
- [使用其他 CLI 模式](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/README.zh.md)
|
|
32
34
|
- [开发插件](../develop/basic/index.md)
|