dsh-plugin-dev-kb 1.3.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 +15 -0
- package/README.en.md +4 -4
- package/README.md +5 -5
- package/kb/INDEX.md +18 -18
- package/kb/README.md +6 -4
- 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 +48 -6
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +48 -6
- 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 +18 -19
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +17 -18
- package/kb/extra/development.md +27 -10
- package/kb/extra/development.zh.md +27 -10
- package/kb/extra/event-producer-consumer.md +89 -68
- package/kb/extra/event-producer-consumer.zh.md +90 -69
- package/kb/extra/glossary.md +1 -1
- package/kb/extra/glossary.zh.md +1 -1
- package/kb/extra/i18n/README.md +15 -7
- package/kb/extra/i18n/README.zh.md +15 -7
- package/kb/extra/i18n/terminology.md +4 -4
- package/kb/extra/i18n/translation-prompt.md +2 -2
- package/kb/extra/module-graph.md +574 -326
- package/kb/extra/module-graph.zh.md +574 -326
- 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 +1 -1
- package/kb/extra/rescope.zh.md +1 -1
- package/kb/extra/session-format-status.md +22 -6
- package/kb/extra/session-format-status.zh.md +22 -6
- 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 +4 -4
- package/kb/extra/subsystems/feedback.zh.md +4 -4
- 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 +3 -3
- package/kb/extra/testing.zh.md +3 -3
- 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 -3
- package/kb/extra/web-styling.zh.md +12 -3
- package/kb/meta/search-index.json +976 -256
- package/kb/meta/site-pages.txt +188 -188
- package/kb/meta/source.json +6 -6
- package/kb/meta/topics.md +10 -6
- 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 +9 -2
- 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 +9 -2
- 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 +97 -82
- package/kb/site/en/guide/public-deployments.md +36 -0
- package/kb/site/en/guide/python-sdk.md +42 -21
- 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 +1 -0
- package/kb/site/en/reference/api-gateway.md +13 -11
- package/kb/site/en/reference/capability-seams.md +177 -59
- package/kb/site/en/reference/config-catalog.md +1758 -821
- 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 +4 -3
- package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/en/reference/cookbook/extension-cookbook.md +6 -5
- 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 +18 -11
- package/kb/site/en/reference/persistence-catalog.md +7687 -54
- package/kb/site/en/reference/subsystems/approval.md +2 -1
- package/kb/site/en/reference/subsystems/client-modules.md +23 -15
- package/kb/site/en/reference/subsystems/client-resources.md +3 -1
- 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 +97 -257
- package/kb/site/en/reference/subsystems/credentials.md +169 -5
- package/kb/site/en/reference/subsystems/filesystem.md +11 -0
- package/kb/site/en/reference/subsystems/goal.md +2 -1
- package/kb/site/en/reference/subsystems/index.md +16 -5
- package/kb/site/en/reference/subsystems/jobs.md +337 -127
- package/kb/site/en/reference/subsystems/llm-streaming.md +76 -36
- package/kb/site/en/reference/subsystems/lsp.md +1 -0
- package/kb/site/en/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/en/reference/subsystems/persistence.md +4 -3
- 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 +8 -6
- package/kb/site/en/reference/subsystems/session-telemetry.md +7 -4
- package/kb/site/en/reference/subsystems/session-title.md +6 -5
- package/kb/site/en/reference/subsystems/session.md +199 -81
- package/kb/site/en/reference/subsystems/settings.md +43 -292
- package/kb/site/en/reference/subsystems/shell.md +37 -28
- package/kb/site/en/reference/subsystems/sidebar-right.md +23 -12
- package/kb/site/en/reference/subsystems/skills.md +5 -6
- package/kb/site/en/reference/subsystems/slots.md +34 -13
- package/kb/site/en/reference/subsystems/spill.md +4 -3
- package/kb/site/en/reference/subsystems/storage.md +2 -2
- package/kb/site/en/reference/subsystems/subagent.md +50 -64
- package/kb/site/en/reference/subsystems/subprocess.md +17 -18
- package/kb/site/en/reference/subsystems/system-prompt.md +4 -1
- package/kb/site/en/reference/subsystems/terminal.md +1 -0
- package/kb/site/en/reference/subsystems/token-meter.md +1 -0
- package/kb/site/en/reference/subsystems/tools.md +40 -12
- 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 +294 -34
- package/kb/site/en/reference/tool-catalog.md +782 -331
- package/kb/site/en/reference/tool-execution-pipeline.md +7 -3
- 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 +42 -21
- package/kb/site/guide/quickstart.md +2 -0
- package/kb/site/guide/schedule.md +70 -11
- package/kb/site/reference/agent-lifecycle.md +1 -0
- package/kb/site/reference/api-gateway.md +13 -11
- package/kb/site/reference/capability-seams.md +177 -59
- package/kb/site/reference/config-catalog.md +1760 -822
- 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 +4 -3
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -0
- package/kb/site/reference/cookbook/extension-cookbook.md +6 -5
- 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 +18 -11
- package/kb/site/reference/persistence-catalog.md +7693 -60
- package/kb/site/reference/subsystems/approval.md +2 -1
- package/kb/site/reference/subsystems/client-modules.md +23 -15
- package/kb/site/reference/subsystems/client-resources.md +3 -1
- 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 +97 -257
- package/kb/site/reference/subsystems/credentials.md +169 -5
- package/kb/site/reference/subsystems/filesystem.md +11 -0
- package/kb/site/reference/subsystems/goal.md +2 -1
- package/kb/site/reference/subsystems/index.md +16 -5
- package/kb/site/reference/subsystems/jobs.md +336 -126
- package/kb/site/reference/subsystems/llm-streaming.md +76 -36
- package/kb/site/reference/subsystems/lsp.md +1 -0
- package/kb/site/reference/subsystems/permission-presets.md +66 -29
- package/kb/site/reference/subsystems/persistence.md +4 -3
- 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 +8 -6
- package/kb/site/reference/subsystems/session-telemetry.md +7 -4
- package/kb/site/reference/subsystems/session-title.md +6 -5
- package/kb/site/reference/subsystems/session.md +199 -81
- package/kb/site/reference/subsystems/settings.md +43 -292
- package/kb/site/reference/subsystems/shell.md +37 -28
- package/kb/site/reference/subsystems/sidebar-right.md +23 -12
- package/kb/site/reference/subsystems/skills.md +5 -6
- package/kb/site/reference/subsystems/slots.md +34 -13
- package/kb/site/reference/subsystems/spill.md +3 -2
- package/kb/site/reference/subsystems/storage.md +2 -2
- package/kb/site/reference/subsystems/subagent.md +49 -63
- package/kb/site/reference/subsystems/subprocess.md +17 -18
- package/kb/site/reference/subsystems/system-prompt.md +4 -1
- package/kb/site/reference/subsystems/terminal.md +1 -0
- package/kb/site/reference/subsystems/token-meter.md +1 -0
- package/kb/site/reference/subsystems/tools.md +40 -12
- 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 +294 -34
- package/kb/site/reference/tool-catalog.md +784 -333
- package/kb/site/reference/tool-execution-pipeline.md +7 -3
- package/package.json +2 -2
- package/skills/dsh-plugin-dev-kb.md +5 -4
- 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,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/llm-streaming.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/llm-streaming.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# LLM Streaming
|
|
7
8
|
|
|
8
|
-
The conversation and streaming types from [`packages/llm`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/README.md):
|
|
9
|
+
The conversation and streaming types from [`packages/llm`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/README.md): durable `Message` values, request-only user inputs, shared `ContentBlock` variants, the fully assembled model request, the raw `StreamChunk` protocol, the adapter contract every adapter must implement, and the shared assembler. The [core packages](./core.md) hold and log these values on every turn; this page declares them.
|
|
9
10
|
|
|
10
11
|
Source: [`packages/llm/llm/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/types.ts)
|
|
11
12
|
|
|
@@ -20,7 +21,8 @@ Source: [`packages/llm/llm/src/types.ts`](https://github.com/deepseek-ai/deepsee
|
|
|
20
21
|
```ts type-equiv
|
|
21
22
|
/**
|
|
22
23
|
* Merge-extensible content blocks keyed by `type`. New core blocks must land
|
|
23
|
-
* with adapter, UI, and compaction support.
|
|
24
|
+
* with adapter, UI, and compaction support. Tool-change blocks belong to
|
|
25
|
+
* developer messages; `projectToolUpdates` selects what each route receives.
|
|
24
26
|
*/
|
|
25
27
|
interface ContentBlockMap {
|
|
26
28
|
'text': TextBlock
|
|
@@ -28,11 +30,12 @@ interface ContentBlockMap {
|
|
|
28
30
|
'image': ImageBlock
|
|
29
31
|
'file': FileBlock
|
|
30
32
|
'tool-call': ToolCallBlock
|
|
31
|
-
'tool-
|
|
33
|
+
'tool-addition': ToolAdditionBlock
|
|
34
|
+
'tool-removal': ToolRemovalBlock
|
|
32
35
|
}
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
The block interfaces (full fields in source): `TextBlock` (`text`), `ReasoningBlock` (thinking, distinct from visible text), `ImageBlock` (a durable [image attachment](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/attachment.md)), `FileBlock` (a durable verbatim [file attachment](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/attachment.md) that request assembly projects to handle text for every route), `ToolCallBlock` (`id: ToolCallId`, `name`, raw-JSON `arguments`)
|
|
38
|
+
The block interfaces (full fields in source): `TextBlock` (`text`), `ReasoningBlock` (thinking, distinct from visible text), `ImageBlock` (a durable [image attachment](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/attachment.md)), `FileBlock` (a durable verbatim [file attachment](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/attachment.md) that request assembly projects to handle text for every route), and `ToolCallBlock` (`id: ToolCallId`, `name`, raw-JSON `arguments`). Tool results are first-class `ToolResultMessage` values with `toolCallId`, result `content`, and optional `isError`; they are not content blocks. `ContentBlock = ContentBlockMap[ContentBlockType]`. A new modality belongs in the merge-extensible map only when its adapter, UI, compaction, and durable replay paths honor it. Developer tool-change blocks are projected according to the resolved route capability.
|
|
36
39
|
|
|
37
40
|
Image access belongs to request serialization rather than the durable attachment or deterministic request-image version. `resolveImageAttachmentAccess()` combines the attachment provider's optional host object path with a mapping supplied by the consumer for the current tool execution filesystem. The result is available only for that request and does not participate in `variantId`.
|
|
38
41
|
|
|
@@ -52,7 +55,7 @@ A `Message` is one identified, immutable role/source/content value. Model-produc
|
|
|
52
55
|
|
|
53
56
|
```ts type-equiv
|
|
54
57
|
/** Provider/model identity and adapter-private replay data for an assistant message. */
|
|
55
|
-
interface
|
|
58
|
+
interface AssistantProviderMetadata {
|
|
56
59
|
/** Provider route that produced the message. */
|
|
57
60
|
provider: string
|
|
58
61
|
/** Provider model id that produced the message. */
|
|
@@ -67,31 +70,27 @@ interface AssistantProvenance {
|
|
|
67
70
|
```
|
|
68
71
|
|
|
69
72
|
```ts type-equiv
|
|
70
|
-
/**
|
|
71
|
-
|
|
72
|
-
/** Stable identity preserved across every representation boundary. */
|
|
73
|
-
readonly id: MessageId
|
|
74
|
-
/** Provider-neutral conversation role. */
|
|
75
|
-
readonly role: 'system' | 'user' | 'assistant'
|
|
76
|
-
/** Exact model-facing blocks. */
|
|
77
|
-
readonly content: ContentBlock[]
|
|
78
|
-
/** Required source fields supplied by the producer. */
|
|
79
|
-
readonly source: MessageSource
|
|
80
|
-
}
|
|
73
|
+
/** Any persisted conversation message, discriminated by its `role`. */
|
|
74
|
+
type Message = MessageRoleMap[keyof MessageRoleMap]
|
|
81
75
|
```
|
|
82
76
|
|
|
77
|
+
`DeveloperMessage` records incremental agent session changes in conversation order with the `developer` role. `ToolAdditionBlock.toolName` activates the definition selected by the containing Session event's historical header reference; `ToolRemovalBlock.toolName` removes the active definition. Both blocks are rejected in other message roles. `deferLoading` independently requests deferred definition loading without requiring an addition record. See [Session](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/README.md) for header binding and the [LLM package](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/README.md#known-limitations-and-deferred-work) for provider support limits. `ToolUpdate` is `in-history` or `addition-only` on resolved and prepared model metadata. `GenerateOptions.toolHistory` carries `ToolHistory`: initial `tools` and ordered `updates`, each binding a developer `messageId` to its historically resolved `additions`. The runtime projects this state into provider declarations; it does not change the active tool list in logged headers.
|
|
78
|
+
|
|
83
79
|
Where a message came from is itself a merge-extensible sum type:
|
|
84
80
|
|
|
85
81
|
```ts type-equiv
|
|
86
82
|
/**
|
|
87
|
-
* Where a message (or injected content) came from
|
|
88
|
-
* Merge-extensible sum type —
|
|
83
|
+
* Where a message (or injected content) came from, in the harness's own
|
|
84
|
+
* vocabulary. Merge-extensible sum type — each producer declares its own
|
|
85
|
+
* `kind` in its own module; there is no shared catch-all `plugin` kind.
|
|
86
|
+
* Model and tool sources answer their role messages; user messages carry any
|
|
87
|
+
* producer's kind, and consumers fall through unknown kinds.
|
|
89
88
|
*/
|
|
90
89
|
interface MessageSourceMap {
|
|
91
90
|
user: { kind: 'user' }
|
|
92
|
-
plugin: { kind: 'plugin'; plugin: string } & ContextFormed
|
|
93
91
|
model: ModelMessageSource
|
|
94
92
|
tool: ToolMessageSource
|
|
93
|
+
'system-prompt': SystemPromptMessageSource
|
|
95
94
|
}
|
|
96
95
|
```
|
|
97
96
|
|
|
@@ -100,7 +99,7 @@ Producer identity and presentation form are independent. `kind` answers *who pro
|
|
|
100
99
|
```ts type-equiv
|
|
101
100
|
/**
|
|
102
101
|
* The kind of information in producer-supplied context, declared by the
|
|
103
|
-
* producer
|
|
102
|
+
* producer in the same `MessageSource`.
|
|
104
103
|
*
|
|
105
104
|
* `MessageSource.kind` answers *who produced this*; `form` answers *what kind
|
|
106
105
|
* of thing it is*, and the two axes are deliberately independent — several
|
|
@@ -228,7 +227,7 @@ type StreamChunk =
|
|
|
228
227
|
|
|
229
228
|
`snapshot()` returns a detached immutable stream. `expandAssistantStream()` strictly checks record keys, member counts, indexes, timestamps, tool-call identity, and lossless JSON before recreating the exact timed chunk sequence. The Session log embeds this stream in `assistant/message` for a surface result or `assistant/attempt` for an attempt with no surface message.
|
|
230
229
|
|
|
231
|
-
Process-local `agent/assistant-stream` frames carry live presentation. Durable replay and restore validation still expand the embedded settlement; telemetry, token accounting, and Host folds read the compact records directly. Record-level readers (`assistantStreamFirstTokenTime`, `assistantStreamHasVisibleContent`, `assistantStreamHasVisibleText`, `lastAssistantStreamChunk`, `assistantStreamChunks`, `joinAssistantStreamText`, `assembleAssistantStream`, and the per-run `runFirstTokenTime` and `runFirstVisibleTime`) answer consumer questions in one pass over the records with early exit, so a large history costs O(records) per settlement instead of O(members) expansion ([fold
|
|
230
|
+
Process-local `agent/assistant-stream` frames carry live presentation. Durable replay and restore validation still expand the embedded settlement; telemetry, token accounting, and Host folds read the compact records directly. Record-level readers (`assistantStreamFirstTokenTime`, `assistantStreamHasVisibleContent`, `assistantStreamHasVisibleText`, `lastAssistantStreamChunk`, `assistantStreamChunks`, `joinAssistantStreamText`, `assembleAssistantStream`, and the per-run `runFirstTokenTime` and `runFirstVisibleTime`) answer consumer questions in one pass over the records with early exit, so a large history costs O(records) per settlement instead of O(members) expansion ([fold reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/README.md)). `expandAssistantStream()` remains the validating path for records read at a durable boundary and for consumers that need every member.
|
|
232
231
|
|
|
233
232
|
## `LlmFailure`
|
|
234
233
|
|
|
@@ -247,12 +246,19 @@ interface LlmFailure {
|
|
|
247
246
|
readonly providerRetryAfterMs?: number
|
|
248
247
|
/** Opaque provider-issued request identifier for diagnostics. */
|
|
249
248
|
readonly requestId?: ProviderRequestId
|
|
249
|
+
/**
|
|
250
|
+
* With code `IMAGE_OFFLOAD_REQUIRED`: how many more of the oldest retained
|
|
251
|
+
* image occurrences the route needs offloaded before the same request fits
|
|
252
|
+
* its exact byte accounting. `dsh-compaction-image-offload` records the
|
|
253
|
+
* selected occurrences in an `image/offload` event and retries the step.
|
|
254
|
+
*/
|
|
255
|
+
readonly offloadImages?: number
|
|
250
256
|
}
|
|
251
257
|
```
|
|
252
258
|
|
|
253
259
|
## Request-image pricing
|
|
254
260
|
|
|
255
|
-
An adapter whose provider charges visual tokens for request images declares per-route pricing by overriding `LlmAdapter.imageRequestPricing`, and `ctx.llm.imageRequestPricing(provider, model)` resolves it synchronously for consumers. The token meter resolves the routed model's pricing on every measurement so compaction pressure, retention, and range selection price image history as the routed request actually sends it; the DeepSeek adapter
|
|
261
|
+
An adapter whose provider charges visual tokens for request images declares per-route pricing by overriding `LlmAdapter.imageRequestPricing`, and `ctx.llm.imageRequestPricing(provider, model)` resolves it synchronously for consumers. The token meter resolves the routed model's pricing on every measurement so compaction pressure, retention, and range selection price image history as the routed request actually sends it; the DeepSeek adapter prices each retained occurrence at its per-model request target with the published vision accounting and each occurrence selected by a logged image-offload decision as its placeholder text, while provider usage remains the authoritative anchor for completed requests.
|
|
256
262
|
|
|
257
263
|
```ts type-equiv
|
|
258
264
|
/**
|
|
@@ -281,10 +287,11 @@ interface LlmImageRequestPrice {
|
|
|
281
287
|
interface LlmImageRequestPricing {
|
|
282
288
|
/**
|
|
283
289
|
* Price every image occurrence of one request projection.
|
|
284
|
-
* @param images -
|
|
290
|
+
* @param images - surface image blocks in request order, one entry per occurrence; an `offloaded` block
|
|
291
|
+
* is priced as its placeholder text.
|
|
285
292
|
* @returns one price per occurrence, aligned by index with `images`.
|
|
286
293
|
*/
|
|
287
|
-
priceImages(images: readonly
|
|
294
|
+
priceImages(images: readonly ImageBlock[]): readonly LlmImageRequestPrice[]
|
|
288
295
|
}
|
|
289
296
|
```
|
|
290
297
|
|
|
@@ -308,7 +315,7 @@ Retry configuration resolves before route registration into an immutable discrim
|
|
|
308
315
|
|
|
309
316
|
## `AppIdentity` — app attribution
|
|
310
317
|
|
|
311
|
-
The static public application identity every adapter sends to providers ([`packages/llm/llm/src/attribution.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/attribution.ts)). `attributionHeaders(identity?)` maps it to the standard `User-Agent` header only; OpenRouter-specific app attribution headers are intentionally not supported by this contract. The default `APP_IDENTITY` sources its version from the package manifest; every field is a public product fact - no secrets, paths, session ids, or per-user identifiers, and nothing per-request may influence the values.
|
|
318
|
+
The static public application identity every adapter sends to providers ([`packages/llm/llm/src/attribution.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm/src/attribution.ts)). `attributionHeaders(identity?)` maps it to the standard `User-Agent` header only; OpenRouter-specific app attribution headers are intentionally not supported by this contract. The default `APP_IDENTITY` sources its version from the package manifest; every field is a public product fact - no secrets, paths, session ids, or per-user identifiers, and nothing per-request may influence the values.
|
|
312
319
|
|
|
313
320
|
```ts type-equiv
|
|
314
321
|
/**
|
|
@@ -410,10 +417,10 @@ declare class BlockAssembler {
|
|
|
410
417
|
get replayState(): ReplayEnvelope | undefined;
|
|
411
418
|
/**
|
|
412
419
|
* The assembled assistant message.
|
|
413
|
-
* @param source -
|
|
420
|
+
* @param source - provider/model attribution (without the `kind` tag) for the assembled message.
|
|
414
421
|
* @returns a frozen assistant-role message over `blocks()` (same open-block assembly rules).
|
|
415
422
|
*/
|
|
416
|
-
message(source:
|
|
423
|
+
message(source: Omit<ModelMessageSource, 'kind'>): AssistantMessage;
|
|
417
424
|
}
|
|
418
425
|
```
|
|
419
426
|
|
|
@@ -569,9 +576,28 @@ interface LlmResolvedModelInfo extends LlmModelInfo {
|
|
|
569
576
|
reasoning?: LlmModelReasoningInfo
|
|
570
577
|
/** Declared mid-conversation system prompt handling; absent means only a leading system message is read. */
|
|
571
578
|
systemPromptUpdate?: SystemPromptUpdate
|
|
579
|
+
/** Declared mid-conversation tool declaration handling; absent means every request declares the complete tool list. */
|
|
580
|
+
toolUpdate?: ToolUpdate
|
|
572
581
|
}
|
|
573
582
|
```
|
|
574
583
|
|
|
584
|
+
Auxiliary callers can provide user content without a durable identity or source. Existing `Message[]` histories remain valid request inputs. Session writes, Agent delivery, and recorded title requests continue to require durable messages.
|
|
585
|
+
|
|
586
|
+
```ts type-equiv
|
|
587
|
+
/** User input for one LLM request; it has no durable Session identity or source. */
|
|
588
|
+
interface RequestUserInput {
|
|
589
|
+
readonly role: 'user'
|
|
590
|
+
readonly content: UserMessage['content']
|
|
591
|
+
readonly id?: never
|
|
592
|
+
readonly source?: never
|
|
593
|
+
}
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
```ts type-equiv
|
|
597
|
+
/** A durable conversation message or a user input used only for one request. */
|
|
598
|
+
type RequestMessage = Message | RequestUserInput
|
|
599
|
+
```
|
|
600
|
+
|
|
575
601
|
```ts type-equiv
|
|
576
602
|
/** A single model request, fully assembled. */
|
|
577
603
|
interface GenerateOptions {
|
|
@@ -584,9 +610,9 @@ interface GenerateOptions {
|
|
|
584
610
|
* Ordered conversation messages, exactly as the provider sees them. A
|
|
585
611
|
* loop-built request passes the derived history (dsh-agent-loop), whose
|
|
586
612
|
* leading system-role message carries the system prompt; a hand-built
|
|
587
|
-
* one-shot
|
|
613
|
+
* one-shot may include identity-free user inputs.
|
|
588
614
|
*/
|
|
589
|
-
messages:
|
|
615
|
+
messages: RequestMessage[]
|
|
590
616
|
/**
|
|
591
617
|
* System prompt text for one-shot callers; adapters map it to the provider's
|
|
592
618
|
* system slot ahead of `messages`. Loop-built requests leave it undefined.
|
|
@@ -594,6 +620,8 @@ interface GenerateOptions {
|
|
|
594
620
|
system?: string
|
|
595
621
|
/** Tool schemas (adapters map to the provider's `tools` field). */
|
|
596
622
|
tools?: ToolSchema[]
|
|
623
|
+
/** Session-folded tool history used for route projection; omission sends complete declarations without tool updates. */
|
|
624
|
+
toolHistory?: ToolHistory
|
|
597
625
|
temperature?: number
|
|
598
626
|
maxTokens?: number
|
|
599
627
|
/**
|
|
@@ -646,6 +674,12 @@ interface FinishReasonMap {
|
|
|
646
674
|
* it from this package.
|
|
647
675
|
*/
|
|
648
676
|
interface ToolSchema {
|
|
677
|
+
/**
|
|
678
|
+
* Requests deferred loading of the tool definition into model context,
|
|
679
|
+
* independently of whether a tool-addition block records the tool.
|
|
680
|
+
* Uses Anthropic's defer_loading terminology.
|
|
681
|
+
*/
|
|
682
|
+
deferLoading?: true
|
|
649
683
|
name: string
|
|
650
684
|
description: string
|
|
651
685
|
/** JSON Schema object for the arguments. */
|
|
@@ -699,6 +733,8 @@ interface LlmDiscoveredModel {
|
|
|
699
733
|
contextWindow?: number
|
|
700
734
|
/** Maximum output tokens, when disclosed. */
|
|
701
735
|
maxTokens?: number
|
|
736
|
+
/** Accepted input types when disclosed by the catalog or endpoint; absent means unknown. */
|
|
737
|
+
inputModalities?: readonly ModelModality[]
|
|
702
738
|
}
|
|
703
739
|
```
|
|
704
740
|
|
|
@@ -708,7 +744,7 @@ The loop builds each request from logged state. `EpochHeader` records call confi
|
|
|
708
744
|
|
|
709
745
|
`agent/request` receives a frozen call-config seed and may return a replacement to switch provider, model, reasoning effort, or sampling. Before the waterfall, the loop removes values marked as adapter defaults so exact-model preparation materializes the selected route's current values; unmarked explicit settings remain in the proposal. After the waterfall, preparation rejects unsupported explicit effort ids without clamping and logs the effective config plus the fields supplied by adapter defaults under the turn signal. On step admission, this waterfall and preparation run after assembly and `step/start` but before the system prompt and accepted user batch are committed; cancellation during either commits neither. The prepared capability governs prompt reconciliation, and the call keeps one adapter registration through dispatch. Requests reaching `llm/stream` are deep-frozen, so mutation throws, and carry a process-local loop identity so observers do not confuse separately logged frozen auxiliary calls with conversation requests.
|
|
710
746
|
|
|
711
|
-
On the wire, a loop-built request is the derived history alone: the rendered prompt travels as the leading `system`-role message (surface node 0, a `system/message` event) and, when the prepared call declares `systemPromptUpdate: 'in-history'`, a non-empty changed prompt may follow the cached history as a later `system`-role message that the model reads as the effective prompt; the request's `system` field is unset — `GenerateOptions.system` serves direct one-shot callers such as title providers. An empty rendering leaves no system messages in derived history, even when earlier requests retained several prompt versions. The logged request ends with the newest `user/message` on a turn's first step and the previous step's tool results on later steps.
|
|
747
|
+
On the wire, a loop-built request is the derived history alone: the rendered prompt travels as the leading `system`-role message (surface node 0, a `system/message` event) and, when the prepared call declares `systemPromptUpdate: 'in-history'`, a non-empty changed prompt may follow the cached history as a later `system`-role message that the model reads as the effective prompt; the request's `system` field is unset — `GenerateOptions.system` serves direct one-shot callers such as title providers. An empty rendering leaves no system messages in derived history, even when earlier requests retained several prompt versions. The logged request ends with the newest `user/message` on a turn's first step and the previous step's tool results on later steps.
|
|
712
748
|
|
|
713
749
|
FIXME(call-config-shape): revisit which remaining fields are genuinely epoch-level for cache purposes (`model` and the model-owned reasoning effort are explicit; the sampling scalars sit here out of caution).
|
|
714
750
|
|
|
@@ -742,7 +778,7 @@ interface LlmCallConfigAdapterDefaults {
|
|
|
742
778
|
|
|
743
779
|
## Official DeepSeek request extensions
|
|
744
780
|
|
|
745
|
-
`ctx.deepseekLlmApiExtensions` is the provider-specific registry for additive top-level fields on `deepseek-official` requests. Contributor plugins use `register(field, provider)` to claim one field; the adapter calls `prepare(request)` after serializing its base body and merges the returned fields before HTTP. The prepared `accept()` transaction runs after 2xx, so a contributor can commit delivery state without treating a transport or provider rejection as acceptance. Preparation, collision, and acceptance failures use `REQUEST_EXTENSION` and fail the model request.
|
|
781
|
+
`ctx.deepseekLlmApiExtensions` is the provider-specific registry for additive top-level fields on `deepseek-official` requests. Contributor plugins use `register(field, provider)` to claim one field; the adapter calls `prepare(request)` after serializing its base body and merges the returned fields before HTTP. The prepared `accept()` transaction runs after 2xx, so a contributor can commit delivery state without treating a transport or provider rejection as acceptance. Preparation, collision, and acceptance failures use `REQUEST_EXTENSION` and fail the model request. A merged body that fails to serialize is sent without extension fields; acceptance is skipped and the provider plugin logs the omitted field names.
|
|
746
782
|
|
|
747
783
|
The [wire reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/deepseek-llm-api-wire-extensions.md) defines the exact request headers, extension transaction, field versions, and receiver obligations. The shipped composition registers [`dsh_session_log`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-log-deepseek/README.md) as a lossless incremental canonical-log suffix and [`dsh_plugin_packages`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/plugin-package-inventory-deepseek/README.md) as the complete active Loader-backed package set. These fields remain outside model messages and are absent from the pi-ai adapter path.
|
|
748
784
|
|
|
@@ -763,6 +799,8 @@ interface PreparedLlmCall {
|
|
|
763
799
|
readonly inputModalities?: readonly ModelModality[]
|
|
764
800
|
/** Exact model system prompt update mode captured with the adapter dispatch generation. */
|
|
765
801
|
readonly systemPromptUpdate?: SystemPromptUpdate
|
|
802
|
+
/** Exact model tool update mode captured with the adapter dispatch generation. */
|
|
803
|
+
readonly toolUpdate?: ToolUpdate
|
|
766
804
|
/** Config fields materialized by the captured adapter rather than proposed by the caller. */
|
|
767
805
|
readonly adapterDefaults: LlmCallConfigAdapterDefaults
|
|
768
806
|
/**
|
|
@@ -808,8 +846,9 @@ declare abstract class LlmAdapter {
|
|
|
808
846
|
imageRequestPricing(_provider: string, _model: string): LlmImageRequestPricing | undefined;
|
|
809
847
|
/**
|
|
810
848
|
* List models this adapter can currently advertise for one owned provider.
|
|
811
|
-
*
|
|
812
|
-
*
|
|
849
|
+
* Core routing accepts unlisted model ids; catalog-driven entry points such
|
|
850
|
+
* as the GUI may require membership. Adapters used there must advertise
|
|
851
|
+
* their available models; the base empty catalog offers no GUI selection.
|
|
813
852
|
* @param _provider - one provider route owned by this adapter.
|
|
814
853
|
* @returns discoverable models in adapter-preferred order.
|
|
815
854
|
*/
|
|
@@ -985,7 +1024,8 @@ fileRequestText(ref: FileAttachmentRef): string
|
|
|
985
1024
|
|
|
986
1025
|
/**
|
|
987
1026
|
* Discover models advertised by one registered provider. Catalog membership
|
|
988
|
-
*
|
|
1027
|
+
* does not constrain core routing. Catalog-driven entry points may restrict
|
|
1028
|
+
* selection and submission to the advertised models.
|
|
989
1029
|
* @param provider - registered provider route to inspect.
|
|
990
1030
|
* @returns detached model metadata in adapter-preferred order.
|
|
991
1031
|
*/
|
|
@@ -1082,8 +1122,8 @@ Waterfall around every streaming model call (retry, replay, routing). Bound to t
|
|
|
1082
1122
|
* process-local {@link markAgentLoopRequest} identity and arrives deep-frozen
|
|
1083
1123
|
* (mutation throws): its content is a pure function of the session log (the
|
|
1084
1124
|
* reconstructability Agent Note), so listeners read it, never rewrite it.
|
|
1085
|
-
* Hand-built calls do not carry that marker;
|
|
1086
|
-
* the
|
|
1125
|
+
* Hand-built calls do not carry that marker; callers own their request
|
|
1126
|
+
* inputs and must keep them unchanged until the stream settles.
|
|
1087
1127
|
* @mode waterfall
|
|
1088
1128
|
*/
|
|
1089
1129
|
'llm/stream'(this: LlmRuntime, options: GenerateOptions, next: () => AsyncIterable<StreamChunk>): AsyncIterable<StreamChunk>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/permission-presets.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/permission-presets.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Permission Presets
|
|
7
8
|
|
|
8
|
-
The permission-preset layer of [dsh-permission-presets](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/permission-presets) (`ctx.permissionPresets`, `PermissionPresetService`) bundles the two independent enforcement knobs — [sandbox mode](./sandbox.md) (`sandbox/mode`) and [approval policy](./approval.md) (`approval/policy`) — into named presets a client offers as one Permissions selector.
|
|
9
|
+
The permission-preset layer of [dsh-permission-presets](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/permission-presets) (`ctx.permissionPresets`, `PermissionPresetService`) bundles the two independent enforcement knobs — [sandbox mode](./sandbox.md) (`sandbox/mode`) and [approval policy](./approval.md) (`approval/policy`) — into named presets a client offers as one Permissions selector. The configured table owns future-session defaults, while the fixed `registerAuto(admit)` hook lets the [Auto review](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/auto-review/README.md) integration publish its current-session-only option for one effect lifetime. The layer is optional and owns no execution policy: prompt narration and replay keep reading their knob folds, while Auto review owns the additional enforcement. The [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/README.md) owns composition status and limitations; the [historical sandbox switching design](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/archived/feature/2026-07-06-sandbox.md) records the original knob rationale.
|
|
9
10
|
|
|
10
11
|
Source: [`packages/interaction/permission-presets/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/src/index.ts)
|
|
11
12
|
|
|
12
13
|
## The preset table
|
|
13
14
|
|
|
14
|
-
A preset
|
|
15
|
+
A preset maps one stable key to a sandbox/approval bundle plus optional client presentation. The default configured table ships `workspace-write` (`workspace-write` + `ask`) and `danger-full-access` (`danger-full-access` + `never`); `custom` and `auto` are reserved and cannot be configured.
|
|
15
16
|
|
|
16
17
|
```ts type-equiv
|
|
17
18
|
/** One preset's sandbox/approval bundle and optional client presentation. */
|
|
@@ -33,29 +34,36 @@ interface Config {
|
|
|
33
34
|
/**
|
|
34
35
|
* The preset table: name → knob bundle. Defaults to `workspace-write`
|
|
35
36
|
* (workspace-write + ask) and `danger-full-access` (danger-full-access +
|
|
36
|
-
* never). The
|
|
37
|
+
* never). The names `custom` and `auto` are reserved for derived state and
|
|
38
|
+
* the Auto review integration respectively.
|
|
37
39
|
*/
|
|
38
|
-
presets
|
|
40
|
+
presets: Record<string, PresetSpec>
|
|
39
41
|
/**
|
|
40
42
|
* Default for new sessions. When omitted, the preset matching the composed
|
|
41
43
|
* sandbox and approval defaults is used.
|
|
42
44
|
*/
|
|
43
|
-
defaultPreset
|
|
45
|
+
defaultPreset: Volatile<string | undefined>
|
|
44
46
|
}
|
|
45
47
|
```
|
|
46
48
|
|
|
47
|
-
The service requires a confining `ctx.shell` executor and `ctx.approval`, and misconfiguration fails at plugin load:
|
|
49
|
+
The service requires a confining `ctx.shell` executor and `ctx.approval`, and misconfiguration fails at plugin load: configured entries named `custom` or `auto` throw, and composing over a bash executor that does not confine (no `sandboxMode` capability fact) throws because presets bundle a sandbox mode.
|
|
50
|
+
|
|
51
|
+
## Fixed current-session Auto registration
|
|
52
|
+
|
|
53
|
+
The Auto integration calls `registerAuto(admit)` for its effect lifetime. This service fixes the `auto` identity and its `danger-full-access` plus `ask` bundle, and a recorded Auto selection also matches the `never` policy that delegated children pin; the shipped client locale dictionaries own Auto's label and description, while configured preset presentation remains Host-owned. Callers cannot publish another preset through a generic contribution API. Auto appears after configured presets, never enters the `permission.defaultPreset` settings schema, and disappears when the effect is disposed. The synchronous `admit` callback runs before Auto selection mutates the Session and before a stored Auto Session publishes, so a missing or closing integration does not rewrite the durable identity.
|
|
54
|
+
|
|
55
|
+
Registering or removing Auto emits the payload-free `permission-presets/catalog-changed` notification. Process consumers subscribe before calling `catalog()`, then re-read the complete selectable catalog after each notification. The `permissions` Session projection contains only `currentValue`, so catalog changes append no Session event, publish no Session projection frame, and leave the Session sequence unchanged.
|
|
48
56
|
|
|
49
57
|
## Current preset and the derived `custom`
|
|
50
58
|
|
|
51
|
-
`current(session)` derives the effective preset from the
|
|
59
|
+
`current(session)` derives the effective preset from the required `permissions` projection. The unit folds the session's sandbox mode, approval policy, and recorded selection; values absent within that state fall back to the executor's configured mode and the approval service config, then `ask`. A missing projection key fails explicitly. The service prefers a still-matching selection, including a recorded Auto selection under the `never` approval policy, then the first matching configured entry, and otherwise returns `CUSTOM_PRESET` (`'custom'`). `custom` is derived-only: clients may display it as the current value, but it is never a switch target or an event payload.
|
|
52
60
|
|
|
53
|
-
`names` lists
|
|
61
|
+
`names` lists configured presets in declaration order followed by Auto while its integration is live. `catalog()` returns those selectable entries as one process-level snapshot. `optionOf(name)` builds an available entry (its label falls back to the key) or the derived `custom` presentation, and throws for any other name. Clients join the catalog with the Session projection; `custom` may label the current value but never becomes a catalog entry.
|
|
54
62
|
|
|
55
63
|
```ts type-equiv
|
|
56
|
-
/**
|
|
64
|
+
/** Presentation for an available preset or the derived `custom` current value. */
|
|
57
65
|
interface PresetOption {
|
|
58
|
-
/** Stable option value:
|
|
66
|
+
/** Stable option value: a configured preset key, live `auto`, or derived `custom`. */
|
|
59
67
|
value: string
|
|
60
68
|
/** The display label. */
|
|
61
69
|
name: string
|
|
@@ -66,9 +74,9 @@ interface PresetOption {
|
|
|
66
74
|
|
|
67
75
|
## Switching and the `permission/preset` event
|
|
68
76
|
|
|
69
|
-
`set(session, name)` resolves the preset (unknown names throw), appends a log-only `permission/preset` event unless `name` is already the effective preset, then writes each knob through its own setter — `setSandboxMode` from [dsh-sandbox-policy](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/sandbox/sandbox-policy) and `setApprovalPolicy` from [dsh-user-approval](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/user-approval) — only when that knob's effective value changes. The selection event precedes the knob events in the same turn, and re-selecting the effective preset appends nothing.
|
|
77
|
+
`set(session, name)` resolves the preset (unknown names throw), runs Auto admission when applicable, appends a log-only `permission/preset` event unless `name` is already the effective preset, then writes each knob through its own setter — `setSandboxMode` from [dsh-sandbox-policy](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/sandbox/sandbox-policy) and `setApprovalPolicy` from [dsh-user-approval](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/user-approval) — only when that knob's effective value changes. The selection event precedes the knob events in the same turn, and re-selecting the effective preset appends nothing.
|
|
70
78
|
|
|
71
|
-
`permission/preset` is durable, log-only user intent: it stays out of the model transcript (the knob events own the model-visible consequences through their consumers), and it exists so `current()` can preserve
|
|
79
|
+
`permission/preset` is durable, log-only user intent: it stays out of the model transcript (the knob events own the model-visible consequences through their consumers), and it exists so `current()` can preserve which preset the user chose when two presets share a bundle. The `permissions` projection folds that selection with both knob events and retains the `session/end-seed` boundary used to distinguish a restored empty seed from a fresh session; replay needs no catch-up state or raw-log rescan. A restored `auto` selection requires the live Auto registration before Agent publication. The complete event declaration is in the [persistence log event catalog](../persistence-catalog.md); the method signatures are in the generated [service catalog](#ctxpermissionpresets--permissionpresetservice).
|
|
72
80
|
|
|
73
81
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
74
82
|
|
|
@@ -82,40 +90,48 @@ Generated from source by `scripts/gen-cordis-catalog.ts` (verified fresh by `pnp
|
|
|
82
90
|
|
|
83
91
|
### `ctx.permissionPresets` — `PermissionPresetService`
|
|
84
92
|
|
|
85
|
-
Owns the deployment's permission presets and their write path. Requires a confining `ctx.shell` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.
|
|
93
|
+
Owns the deployment's configured permission presets, the fixed Auto integration hook, and their write path. Requires a confining `ctx.shell` executor and `ctx.approval`; unmatched knob values are reported as CUSTOM_PRESET, not an error.
|
|
86
94
|
|
|
87
95
|
```ts cordis-catalog
|
|
96
|
+
/**
|
|
97
|
+
* Read the complete process-level catalog exposed to current-session UI.
|
|
98
|
+
* @returns every currently selectable preset in contribution order.
|
|
99
|
+
*/
|
|
100
|
+
@Remote('catalog') catalog(): PermissionCatalog
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Publish the fixed current-session Auto preset for the calling
|
|
104
|
+
* integration's effect lifetime.
|
|
105
|
+
* @param admit - synchronous gate run before live Auto selection or restore.
|
|
106
|
+
* @returns the async effect disposer that removes Auto.
|
|
107
|
+
*/
|
|
108
|
+
registerAuto(admit: () => void): () => Promise<void>
|
|
109
|
+
|
|
88
110
|
/**
|
|
89
111
|
* Resolve the preset matching the effective knob values. A still-matching
|
|
90
|
-
* last selection wins shared-bundle ties
|
|
91
|
-
*
|
|
112
|
+
* last selection wins shared-bundle ties, and a still-selected Auto also
|
|
113
|
+
* matches the `never` approval policy; otherwise the first configured
|
|
114
|
+
* match wins. Returns
|
|
115
|
+
* {@link CUSTOM_PRESET} when no available preset matches.
|
|
92
116
|
* @param session - the session whose knob state is read.
|
|
93
117
|
* @returns the effective preset name, or `custom` when nothing matches.
|
|
94
118
|
*/
|
|
95
119
|
current(session: Session): string
|
|
96
120
|
|
|
97
121
|
/**
|
|
98
|
-
*
|
|
99
|
-
* option in declaration order, `custom` appended exactly while derived.
|
|
100
|
-
* @param state - the folded knob overrides.
|
|
101
|
-
* @returns the `permissions` projection payload.
|
|
102
|
-
*/
|
|
103
|
-
selectFor(state: KnobState): PermissionSelect
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Resolve a preset's knob bundle.
|
|
122
|
+
* Resolve an available preset's knob bundle.
|
|
107
123
|
* @param name - the preset name to resolve.
|
|
108
124
|
* @returns the configured bundle.
|
|
109
|
-
* @throws when `name` is
|
|
125
|
+
* @throws when `name` is neither configured nor the currently live Auto preset.
|
|
110
126
|
*/
|
|
111
127
|
resolve(name: string): PresetSpec
|
|
112
128
|
|
|
113
129
|
/**
|
|
114
|
-
* Build the client option for
|
|
115
|
-
* missing label falls back to the
|
|
116
|
-
* @param name - a
|
|
130
|
+
* Build the client option for an available preset or {@link CUSTOM_PRESET}.
|
|
131
|
+
* A missing label falls back to the preset key.
|
|
132
|
+
* @param name - a configured preset key, live `auto`, or `custom`.
|
|
117
133
|
* @returns the option a client renders.
|
|
118
|
-
* @throws when `name` is neither a
|
|
134
|
+
* @throws when `name` is neither a configured preset, live `auto`, nor `custom`.
|
|
119
135
|
*/
|
|
120
136
|
optionOf(name: string): PresetOption
|
|
121
137
|
|
|
@@ -131,4 +147,25 @@ set(session: Session, name: string): void
|
|
|
131
147
|
Types: [Session](./session.md)
|
|
132
148
|
|
|
133
149
|
Source: [`packages/interaction/permission-presets/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/src/index.ts)
|
|
150
|
+
|
|
151
|
+
<a id="permission-presets-events"></a>
|
|
152
|
+
|
|
153
|
+
### `permission-presets/*` events
|
|
154
|
+
|
|
155
|
+
<a id="permission-presetscatalog-changed--emit"></a>
|
|
156
|
+
|
|
157
|
+
#### `permission-presets/catalog-changed` — emit
|
|
158
|
+
|
|
159
|
+
The selectable process catalog changed. Payload-free by design: consumers subscribe first, then re-read the complete catalog.
|
|
160
|
+
|
|
161
|
+
```ts cordis-catalog
|
|
162
|
+
/**
|
|
163
|
+
* The selectable process catalog changed. Payload-free by design:
|
|
164
|
+
* consumers subscribe first, then re-read the complete catalog.
|
|
165
|
+
* @mode emit
|
|
166
|
+
*/
|
|
167
|
+
'permission-presets/catalog-changed'(): void
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Source: [`packages/interaction/permission-presets/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/src/types.ts)
|
|
134
171
|
<!-- END GENERATED cordis-surface -->
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/persistence.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/persistence.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -7,7 +8,7 @@ outline: [2,3]
|
|
|
7
8
|
|
|
8
9
|
The **durability seam** for the event log. [session.md](./session.md) describes the in-memory `Session` — the append-only `SessionEvent` log that is the source of truth. This page describes how that log is made durable: the abstract `SessionPersistence` service, its provider model and shipped JSONL backend, the flush checkpoint, crash recovery, and the metadata header that travels alongside the log. The event vocabulary the log carries is enumerated, member by member, in the generated [persistence log event catalog](../persistence-catalog.md).
|
|
9
10
|
|
|
10
|
-
The seam is a [capability seam](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-13-capability-seams.md): one abstract service ([dsh-session-persistence](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence), `ctx.sessionPersistence`) exposing `create`/`open`/`stat`/`list` over the existing `SessionEvent` — **no parallel persisted event type** — where `create` and `open` return a per-session `SessionHandle` (`read`/`append`/`flush`/`close`) that carries all log access and single-writer ownership. The repository ships [dsh-session-persistence-jsonl](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence-jsonl) as its provider; out-of-tree providers may implement the same service contract. See the [handle-based persistence Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-08-27-handle-based-session-persistence.md) and the [session-persistence
|
|
11
|
+
The seam is a [capability seam](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-06-13-capability-seams.md): one abstract service ([dsh-session-persistence](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence), `ctx.sessionPersistence`) exposing `create`/`open`/`stat`/`list` over the existing `SessionEvent` — **no parallel persisted event type** — where `create` and `open` return a per-session `SessionHandle` (`read`/`append`/`flush`/`close`) that carries all log access and single-writer ownership. The repository ships [dsh-session-persistence-jsonl](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence-jsonl) as its provider; out-of-tree providers may implement the same service contract. See the [handle-based persistence Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/architecture/2026-08-27-handle-based-session-persistence.md) and the [session-persistence reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-persistence/README.md).
|
|
11
12
|
|
|
12
13
|
## `SessionHandle` — one open channel onto a stored session
|
|
13
14
|
|
|
@@ -206,8 +207,8 @@ interface CreateSessionOptions {
|
|
|
206
207
|
readonly seed?: readonly SessionEvent[]
|
|
207
208
|
/**
|
|
208
209
|
* Exact fork-inherited prefix length when `meta.isSeeded` is true. The
|
|
209
|
-
* constructor
|
|
210
|
-
*
|
|
210
|
+
* constructor appends the child-owned tagged marker at the cut unless
|
|
211
|
+
* the seed already includes it followed by child-owned fork closers.
|
|
211
212
|
*/
|
|
212
213
|
readonly inheritedEventCount?: SessionLogOffset
|
|
213
214
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
editSource: "docs/subsystems/plan.md"
|
|
3
|
+
rawMarkdownPath: "en/reference/subsystems/plan.md"
|
|
3
4
|
outline: [2,3]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Plan Mode
|
|
7
8
|
|
|
8
|
-
Plan mode is logged per-agent collaboration state owned by [dsh-plan-mode](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/plan/plan-mode) (`ctx.planMode`, `PlanModeController`): while active, a deployment-owned guidance section is included in each model request. Plan mode is **soft guidance**. [Sandbox mode](./sandbox.md) and [approval policy](./approval.md) enforce restrictions independently; neither reads or writes plan state, so deployments configure them separately. The package is optional, and the agent loop does not depend on it. It contributes the `plan:policy` prompt section and registers the `exit_plan_mode` tool and `/plan` command. The [design
|
|
9
|
+
Plan mode is logged per-agent collaboration state owned by [dsh-plan-mode](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/plan/plan-mode) (`ctx.planMode`, `PlanModeController`): while active, a deployment-owned guidance section is included in each model request. Plan mode is **soft guidance**. [Sandbox mode](./sandbox.md) and [approval policy](./approval.md) enforce restrictions independently; neither reads or writes plan state, so deployments configure them separately. The package is optional, and the agent loop does not depend on it. It contributes the `plan:policy` prompt section and registers the `exit_plan_mode` tool and `/plan` command. The [design reference](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/README.md) owns the rationale; the [package README](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/README.md) owns the model-experience and limitation detail.
|
|
9
10
|
|
|
10
11
|
Source: [`packages/plan/plan-mode/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/src/index.ts)
|
|
11
12
|
|