better-dsh 0.2.3 → 0.2.4
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/cordis.patch.yml +1 -1
- package/docs/50_test-reports/2026-09-06-write/345/267/245/345/205/267sandbox/345/215/207/347/272/247/351/200/217/344/274/240bug/345/244/215/345/217/221/345/217/212/346/214/202/350/265/267-/344/272/213/344/273/266/346/212/245/345/221/212.md +176 -0
- package/docs/50_test-reports/2026-09-08-hashline-edit-E_RANGE_UNVERIFIED/350/267/250/350/275/256/344/274/232/350/257/235/351/224/256/345/244/261/346/225/210-/350/257/212/346/226/255/346/212/245/345/221/212.md +226 -0
- package/docs/50_test-reports/2026-09-11-control-prompt-into-eval-description/345/256/236/346/265/213/346/212/245/345/221/212.md +222 -0
- package/docs/50_test-reports/2026-09-12-fs-scheme-resolution-/345/256/236/346/265/213/346/212/245/345/221/212.md +81 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-grammar-matrix/344/270/216catalog-centralize-/345/256/236/346/265/213/346/212/245/345/221/212.md +234 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-design/351/252/214/350/257/201/346/212/245/345/221/212.md +160 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/345/211/247/346/234/254.md +44 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/346/212/245/345/221/212.md +89 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-/345/205/255scheme/345/206/222/347/203/237/344/270/216/350/276/271/347/225/214/345/256/236/346/265/213/346/212/245/345/221/212.md +198 -0
- package/docs/50_test-reports/2026-09-13-hashline-off/344/270/213scheme/345/217/257/350/276/276/346/200/247/345/267/245/345/205/267/351/235/242/344/270/215/345/257/271/347/247/260-/345/256/236/346/265/213/346/212/245/345/221/212.md +246 -0
- package/docs/50_test-reports/2026-09-13-preact-ui-shell/345/256/236/346/265/213/346/212/245/345/221/212.md +50 -0
- package/docs/50_test-reports/2026-09-14-4999-skill/346/270/205/345/215/225/344/270/216lsp-gate/345/256/236/346/265/213/346/212/245/345/221/212.md +63 -0
- package/docs/50_test-reports/upstream-dsh-0.1.3-alpha.2-local-test-report.md +44 -0
- package/docs/50_test-reports/upstream-dsh-0.1.3-alpha.2-report.md +110 -0
- package/docs/50_test-reports/upstream-dsh-0.1.5-rc.2-local-test-report.md +79 -0
- package/docs/50_test-reports/v0.2.3b-hashline-content-locator/345/256/236/346/265/213/346/212/245/345/221/212.md +73 -0
- package/docs/50_test-reports/v0.2.3c-mobile-wave/345/256/236/346/265/213/346/212/245/345/221/212.md +47 -0
- package/docs/50_test-reports/v0.2.4-ios-focus-zoom-suppression/345/256/236/346/265/213/346/212/245/345/221/212.md +158 -0
- package/docs/specs/agent/spec.md +54 -0
- package/docs/specs/ast/spec.md +34 -0
- package/docs/specs/compaction-recall/spec.md +46 -0
- package/docs/specs/ctx/spec.md +107 -0
- package/docs/specs/dsh/spec.md +47 -0
- package/docs/specs/dvc/spec.md +87 -0
- package/docs/specs/escalation-guidance/spec.md +44 -0
- package/docs/specs/fs-scheme-resolution/spec.md +37 -0
- package/docs/specs/hash-edit/spec.md +41 -0
- package/docs/specs/http-read/spec.md +73 -0
- package/docs/specs/kernel-provisioning/spec.md +53 -0
- package/docs/specs/lsp/spec.md +121 -0
- package/docs/specs/mobile-layout/spec.md +108 -0
- package/docs/specs/model-failover/spec.md +20 -0
- package/docs/specs/preact-ui-shell/spec.md +22 -0
- package/docs/specs/repl-dispatch-resilience/spec.md +21 -0
- package/docs/specs/skill/spec.md +58 -0
- package/docs/specs/tool-surface/spec.md +222 -0
- package/docs/specs/url-schema/spec.md +148 -0
- package/docs/specs/web-trust-fence/spec.md +43 -0
- package/docs/upstream-dsh-0.1.5-rc.2-report.md +156 -0
- package/dsh-docs/AGENTS.md +75 -0
- package/dsh-docs/agent-lifecycle.md +84 -0
- package/dsh-docs/agent-lifecycle.zh.md +86 -0
- package/dsh-docs/api-gateway.md +164 -0
- package/dsh-docs/api-gateway.zh.md +164 -0
- package/dsh-docs/architecture.md +150 -0
- package/dsh-docs/architecture.zh.md +154 -0
- package/dsh-docs/capability-seams.md +543 -0
- package/dsh-docs/capability-seams.zh.md +545 -0
- package/dsh-docs/config-catalog.md +3473 -0
- package/dsh-docs/config-catalog.zh.md +3474 -0
- package/dsh-docs/cookbook/adding-a-package.md +117 -0
- package/dsh-docs/cookbook/adding-a-package.zh.md +119 -0
- package/dsh-docs/cookbook/adding-a-remote-api.md +197 -0
- package/dsh-docs/cookbook/adding-a-remote-api.zh.md +197 -0
- package/dsh-docs/cookbook/adding-a-session-format-version.md +109 -0
- package/dsh-docs/cookbook/adding-a-session-format-version.zh.md +109 -0
- package/dsh-docs/cookbook/adding-a-settings-card.md +102 -0
- package/dsh-docs/cookbook/adding-a-settings-card.zh.md +102 -0
- package/dsh-docs/cookbook/adding-a-tool.md +101 -0
- package/dsh-docs/cookbook/adding-a-tool.zh.md +103 -0
- package/dsh-docs/cookbook/adding-a-vendored-package.md +59 -0
- package/dsh-docs/cookbook/adding-a-vendored-package.zh.md +59 -0
- package/dsh-docs/cookbook/adding-an-llm-adapter.md +43 -0
- package/dsh-docs/cookbook/adding-an-llm-adapter.zh.md +43 -0
- package/dsh-docs/cookbook/extension-cookbook.md +132 -0
- package/dsh-docs/cookbook/extension-cookbook.zh.md +136 -0
- package/dsh-docs/cookbook/maintaining-dsh-code-review.md +64 -0
- package/dsh-docs/cookbook/maintaining-dsh-code-review.zh.md +64 -0
- package/dsh-docs/cookbook/responding-to-pr-review-on-a-stack.md +32 -0
- package/dsh-docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +32 -0
- package/dsh-docs/cordis-api/context.md +364 -0
- package/dsh-docs/cordis-api/context.zh.md +366 -0
- package/dsh-docs/cordis-api/events.md +207 -0
- package/dsh-docs/cordis-api/events.zh.md +209 -0
- package/dsh-docs/cordis-api/fiber.md +375 -0
- package/dsh-docs/cordis-api/fiber.zh.md +377 -0
- package/dsh-docs/cordis-api/inherited.md +39 -0
- package/dsh-docs/cordis-api/registry.md +152 -0
- package/dsh-docs/cordis-api/registry.zh.md +154 -0
- package/dsh-docs/cordis-api/service.md +102 -0
- package/dsh-docs/cordis-api/service.zh.md +104 -0
- package/dsh-docs/cordis-primer.md +45 -0
- package/dsh-docs/cordis-primer.zh.md +51 -0
- package/dsh-docs/cordis-tutorial/01-first-plugin.md +95 -0
- package/dsh-docs/cordis-tutorial/01-first-plugin.zh.md +95 -0
- package/dsh-docs/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
- package/dsh-docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
- package/dsh-docs/cordis-tutorial/03-services.md +98 -0
- package/dsh-docs/cordis-tutorial/03-services.zh.md +98 -0
- package/dsh-docs/cordis-tutorial/04-events.md +144 -0
- package/dsh-docs/cordis-tutorial/04-events.zh.md +144 -0
- package/dsh-docs/cordis-tutorial/05-config.md +84 -0
- package/dsh-docs/cordis-tutorial/05-config.zh.md +84 -0
- package/dsh-docs/cordis-tutorial/06-composition-and-hmr.md +113 -0
- package/dsh-docs/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
- package/dsh-docs/cordis-tutorial/07-into-the-harness.md +108 -0
- package/dsh-docs/cordis-tutorial/07-into-the-harness.zh.md +108 -0
- package/dsh-docs/cordis-tutorial/index.md +60 -0
- package/dsh-docs/cordis-tutorial/index.zh.md +62 -0
- package/dsh-docs/deepseek-llm-api-wire-extensions.md +163 -0
- package/dsh-docs/deepseek-llm-api-wire-extensions.zh.md +163 -0
- package/dsh-docs/defensive-patterns.md +33 -0
- package/dsh-docs/defensive-patterns.zh.md +35 -0
- package/dsh-docs/development.md +167 -0
- package/dsh-docs/development.zh.md +173 -0
- package/dsh-docs/event-producer-consumer.md +86 -0
- package/dsh-docs/event-producer-consumer.zh.md +88 -0
- package/dsh-docs/glossary.md +45 -0
- package/dsh-docs/glossary.zh.md +45 -0
- package/dsh-docs/graph-atlas.md +22 -0
- package/dsh-docs/graph-atlas.zh.md +24 -0
- package/dsh-docs/i18n/README.md +60 -0
- package/dsh-docs/i18n/README.zh.md +62 -0
- package/dsh-docs/i18n/style-samples.md +87 -0
- package/dsh-docs/i18n/terminology.md +214 -0
- package/dsh-docs/i18n/translation-prompt.md +263 -0
- package/dsh-docs/i18n/translation-rules.md +69 -0
- package/dsh-docs/i18n/translation-rules.zh.md +69 -0
- package/dsh-docs/module-graph.md +1411 -0
- package/dsh-docs/module-graph.zh.md +1413 -0
- package/dsh-docs/persistence-catalog.md +1075 -0
- package/dsh-docs/persistence-catalog.zh.md +1077 -0
- package/dsh-docs/postmortem/0001-acp-default-export-drops-inject.md +113 -0
- package/dsh-docs/postmortem/0001-acp-default-export-drops-inject.zh.md +113 -0
- package/dsh-docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +47 -0
- package/dsh-docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +47 -0
- package/dsh-docs/postmortem/0003-web-agent-gui-feedback-loop.md +53 -0
- package/dsh-docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +53 -0
- package/dsh-docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +55 -0
- package/dsh-docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +55 -0
- package/dsh-docs/postmortem/README.md +18 -0
- package/dsh-docs/postmortem/README.zh.md +18 -0
- package/dsh-docs/rescope.md +53 -0
- package/dsh-docs/rescope.zh.md +53 -0
- package/dsh-docs/session-format-status.md +47 -0
- package/dsh-docs/session-format-status.zh.md +47 -0
- package/dsh-docs/subsystems/README.md +61 -0
- package/dsh-docs/subsystems/README.zh.md +61 -0
- package/dsh-docs/subsystems/agent-team.md +207 -0
- package/dsh-docs/subsystems/agent-team.zh.md +207 -0
- package/dsh-docs/subsystems/approval.md +170 -0
- package/dsh-docs/subsystems/approval.zh.md +170 -0
- package/dsh-docs/subsystems/attachment.md +351 -0
- package/dsh-docs/subsystems/attachment.zh.md +351 -0
- package/dsh-docs/subsystems/client-modules.md +168 -0
- package/dsh-docs/subsystems/client-modules.zh.md +168 -0
- package/dsh-docs/subsystems/client-resources.md +91 -0
- package/dsh-docs/subsystems/client-resources.zh.md +91 -0
- package/dsh-docs/subsystems/code-runtime.md +195 -0
- package/dsh-docs/subsystems/code-runtime.zh.md +195 -0
- package/dsh-docs/subsystems/commands.md +219 -0
- package/dsh-docs/subsystems/commands.zh.md +219 -0
- package/dsh-docs/subsystems/compaction.md +238 -0
- package/dsh-docs/subsystems/compaction.zh.md +238 -0
- package/dsh-docs/subsystems/conversation.md +258 -0
- package/dsh-docs/subsystems/conversation.zh.md +258 -0
- package/dsh-docs/subsystems/core.md +1209 -0
- package/dsh-docs/subsystems/core.zh.md +1219 -0
- package/dsh-docs/subsystems/credentials.md +329 -0
- package/dsh-docs/subsystems/credentials.zh.md +329 -0
- package/dsh-docs/subsystems/extensions.md +382 -0
- package/dsh-docs/subsystems/extensions.zh.md +382 -0
- package/dsh-docs/subsystems/feedback.md +266 -0
- package/dsh-docs/subsystems/feedback.zh.md +266 -0
- package/dsh-docs/subsystems/filesystem.md +505 -0
- package/dsh-docs/subsystems/filesystem.zh.md +505 -0
- package/dsh-docs/subsystems/goal.md +277 -0
- package/dsh-docs/subsystems/goal.zh.md +277 -0
- package/dsh-docs/subsystems/invariants.md +88 -0
- package/dsh-docs/subsystems/invariants.zh.md +88 -0
- package/dsh-docs/subsystems/jobs.md +290 -0
- package/dsh-docs/subsystems/jobs.zh.md +290 -0
- package/dsh-docs/subsystems/llm-streaming.md +1080 -0
- package/dsh-docs/subsystems/llm-streaming.zh.md +1086 -0
- package/dsh-docs/subsystems/lsp.md +202 -0
- package/dsh-docs/subsystems/lsp.zh.md +202 -0
- package/dsh-docs/subsystems/permission-presets.md +131 -0
- package/dsh-docs/subsystems/permission-presets.zh.md +131 -0
- package/dsh-docs/subsystems/persistence.md +395 -0
- package/dsh-docs/subsystems/persistence.zh.md +395 -0
- package/dsh-docs/subsystems/plan.md +87 -0
- package/dsh-docs/subsystems/plan.zh.md +87 -0
- package/dsh-docs/subsystems/sandbox.md +220 -0
- package/dsh-docs/subsystems/sandbox.zh.md +220 -0
- package/dsh-docs/subsystems/schedule.md +192 -0
- package/dsh-docs/subsystems/schedule.zh.md +192 -0
- package/dsh-docs/subsystems/scope.md +59 -0
- package/dsh-docs/subsystems/scope.zh.md +59 -0
- package/dsh-docs/subsystems/session-projection.md +354 -0
- package/dsh-docs/subsystems/session-projection.zh.md +354 -0
- package/dsh-docs/subsystems/session-query.md +509 -0
- package/dsh-docs/subsystems/session-query.zh.md +509 -0
- package/dsh-docs/subsystems/session-reference.md +219 -0
- package/dsh-docs/subsystems/session-reference.zh.md +219 -0
- package/dsh-docs/subsystems/session-telemetry.md +194 -0
- package/dsh-docs/subsystems/session-telemetry.zh.md +194 -0
- package/dsh-docs/subsystems/session-title.md +204 -0
- package/dsh-docs/subsystems/session-title.zh.md +204 -0
- package/dsh-docs/subsystems/session.md +1155 -0
- package/dsh-docs/subsystems/session.zh.md +1159 -0
- package/dsh-docs/subsystems/settings.md +405 -0
- package/dsh-docs/subsystems/settings.zh.md +405 -0
- package/dsh-docs/subsystems/shell.md +303 -0
- package/dsh-docs/subsystems/shell.zh.md +303 -0
- package/dsh-docs/subsystems/sidebar-right.md +148 -0
- package/dsh-docs/subsystems/sidebar-right.zh.md +148 -0
- package/dsh-docs/subsystems/skills.md +354 -0
- package/dsh-docs/subsystems/skills.zh.md +354 -0
- package/dsh-docs/subsystems/slots.md +175 -0
- package/dsh-docs/subsystems/slots.zh.md +175 -0
- package/dsh-docs/subsystems/spill.md +117 -0
- package/dsh-docs/subsystems/spill.zh.md +117 -0
- package/dsh-docs/subsystems/storage.md +260 -0
- package/dsh-docs/subsystems/storage.zh.md +260 -0
- package/dsh-docs/subsystems/subagent.md +766 -0
- package/dsh-docs/subsystems/subagent.zh.md +770 -0
- package/dsh-docs/subsystems/subprocess.md +324 -0
- package/dsh-docs/subsystems/subprocess.zh.md +324 -0
- package/dsh-docs/subsystems/system-prompt.md +220 -0
- package/dsh-docs/subsystems/system-prompt.zh.md +220 -0
- package/dsh-docs/subsystems/terminal.md +184 -0
- package/dsh-docs/subsystems/terminal.zh.md +184 -0
- package/dsh-docs/subsystems/todo.md +32 -0
- package/dsh-docs/subsystems/todo.zh.md +32 -0
- package/dsh-docs/subsystems/token-meter.md +105 -0
- package/dsh-docs/subsystems/token-meter.zh.md +105 -0
- package/dsh-docs/subsystems/tools.md +720 -0
- package/dsh-docs/subsystems/tools.zh.md +720 -0
- package/dsh-docs/subsystems/typert.md +343 -0
- package/dsh-docs/subsystems/typert.zh.md +343 -0
- package/dsh-docs/subsystems/user-questions.md +178 -0
- package/dsh-docs/subsystems/user-questions.zh.md +178 -0
- package/dsh-docs/subsystems/web-client.md +95 -0
- package/dsh-docs/subsystems/web-client.zh.md +95 -0
- package/dsh-docs/subsystems/web-server.md +154 -0
- package/dsh-docs/subsystems/web-server.zh.md +154 -0
- package/dsh-docs/subsystems/web.md +206 -0
- package/dsh-docs/subsystems/web.zh.md +206 -0
- package/dsh-docs/subsystems/webhook.md +70 -0
- package/dsh-docs/subsystems/webhook.zh.md +70 -0
- package/dsh-docs/subsystems/workflow.md +278 -0
- package/dsh-docs/subsystems/workflow.zh.md +278 -0
- package/dsh-docs/subsystems/workspace.md +321 -0
- package/dsh-docs/subsystems/workspace.zh.md +321 -0
- package/dsh-docs/testing.md +54 -0
- package/dsh-docs/testing.zh.md +54 -0
- package/dsh-docs/tool-catalog.md +2225 -0
- package/dsh-docs/tool-catalog.zh.md +2233 -0
- package/dsh-docs/tool-execution-pipeline.md +62 -0
- package/dsh-docs/tool-execution-pipeline.zh.md +64 -0
- package/dsh-docs/user/develop/basic/config.md +106 -0
- package/dsh-docs/user/develop/basic/config.zh.md +106 -0
- package/dsh-docs/user/develop/basic/index.md +144 -0
- package/dsh-docs/user/develop/basic/index.zh.md +144 -0
- package/dsh-docs/user/develop/basic/publish.md +183 -0
- package/dsh-docs/user/develop/basic/publish.zh.md +183 -0
- package/dsh-docs/user/develop/basic/tool.md +52 -0
- package/dsh-docs/user/develop/basic/tool.zh.md +52 -0
- package/dsh-docs/user/develop/framework/events.md +143 -0
- package/dsh-docs/user/develop/framework/events.zh.md +143 -0
- package/dsh-docs/user/develop/framework/index.md +137 -0
- package/dsh-docs/user/develop/framework/index.zh.md +137 -0
- package/dsh-docs/user/develop/framework/service.md +148 -0
- package/dsh-docs/user/develop/framework/service.zh.md +150 -0
- package/dsh-docs/user/develop/practice/dynamic-cordis.md +15 -0
- package/dsh-docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
- package/dsh-docs/user/develop/practice/index.md +155 -0
- package/dsh-docs/user/develop/practice/index.zh.md +155 -0
- package/dsh-docs/user/develop/practice/llm-adapter.md +189 -0
- package/dsh-docs/user/develop/practice/llm-adapter.zh.md +189 -0
- package/dsh-docs/user/guide/github-review.md +102 -0
- package/dsh-docs/user/guide/github-review.zh.md +102 -0
- package/dsh-docs/user/guide/index.md +30 -0
- package/dsh-docs/user/guide/index.zh.md +30 -0
- package/dsh-docs/user/guide/mcp-memory.md +101 -0
- package/dsh-docs/user/guide/mcp-memory.zh.md +101 -0
- package/dsh-docs/user/guide/network-proxy.md +85 -0
- package/dsh-docs/user/guide/network-proxy.zh.md +85 -0
- package/dsh-docs/user/guide/providers.md +190 -0
- package/dsh-docs/user/guide/providers.zh.md +190 -0
- package/dsh-docs/user/guide/python-sdk.md +150 -0
- package/dsh-docs/user/guide/python-sdk.zh.md +150 -0
- package/dsh-docs/user/guide/schedule.md +21 -0
- package/dsh-docs/user/guide/schedule.zh.md +21 -0
- package/dsh-docs/user/index.md +11 -0
- package/dsh-docs/user/index.zh.md +11 -0
- package/dsh-docs/web-styling.md +29 -0
- package/dsh-docs/web-styling.zh.md +29 -0
- package/eval-description.md +33 -0
- package/lib/client/index.js +327 -88
- package/lib/fs-aware/sandbox-plugin.d.ts +71 -0
- package/lib/fs-aware/sandbox-plugin.js +249 -0
- package/lib/index.d.ts +22 -22
- package/lib/index.js +3095 -3204
- package/lib/lsp-server-registry-DkaYmTwt.js +972 -0
- package/lib/lsp-server-registry-_hk-Wcia.js +3 -0
- package/lib/py-sdk-Chvy92MB.js +178 -0
- package/lib/py-sdk.d.ts +19 -2
- package/lib/py-sdk.js +2 -2
- package/lib/wrap-JFjcWwZf.js +747 -0
- package/package.json +9 -3
- package/url-schemes-instruction.md +22 -0
- package/control-prompt.md +0 -37
- package/docs/50_test-reports/v0.1.8d_artifacts/README.md +0 -138
- package/docs/50_test-reports/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
- package/docs/50_test-reports/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
- package/docs/50_test-reports/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
- package/docs/50_test-reports/v0.1.8d_artifacts/functions.json +0 -592
- package/docs/50_test-reports/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
- package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
- package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
- package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
- package/docs/50_test-reports/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
- package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
- package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
- package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
- package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
- package/docs/50_test-reports/v0.2.0b_artifacts/hashline-probe.md +0 -5
- package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
- package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
- package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
- package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
- package/docs/60_exploration-and-research/cordis-research.md +0 -350
- package/docs/60_exploration-and-research/dsh-web-profile-package-map.md +0 -186
- package/docs/60_exploration-and-research/dsh-web-ui-slot-system-research.md +0 -310
- package/docs/60_exploration-and-research/dsh-webui-strip-boundary-research.md +0 -300
- package/docs/60_exploration-and-research/ios-chat-app-bridge-research.md +0 -324
- package/docs/60_exploration-and-research/web-frontend-composability-research.md +0 -191
- package/docs/REPL-/345/267/245/345/205/267/350/260/203/347/224/250-/346/210/252/346/226/255/350/257/212/346/226/255.md +0 -110
- package/docs/adr/0001-bridge-tool-layer-not-service-layer.md +0 -14
- package/docs/adr/0002-masking-is-presentation-only.md +0 -15
- package/docs/plans/A2A-messaging-channel-test-archive.md +0 -256
- package/docs/plans/code-mode-vs-rlm-ipython-comparison.md +0 -137
- package/docs/plans/dashr-blueprint-review.md +0 -201
- package/docs/plans/dashr-blueprint.md +0 -561
- package/docs/plans/dashr-compaction-window-and-archive.md +0 -307
- package/docs/plans/dashr-profile-layer-feasibility.md +0 -367
- package/docs/plans/dashr-sandbox-escalation-semantics-gap.md +0 -171
- package/docs/plans/dashr-security-sandbox-analysis.md +0 -187
- package/docs/plans/dashr-surface-invariant-and-omp-imports.md +0 -97
- package/docs/plans/ipython-kernel-interactive-interface-test-report.md +0 -152
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft.md +0 -146
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v3.md +0 -50
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v4.md +0 -79
- package/docs/plans/kernel-refactoring/Dash-vs-PrimeAgent-systemprompt-toolcatalog-comparison.md +0 -138
- package/docs/plans/kernel-refactoring/RLM-system-prompt-injection-gap-report.md +0 -161
- package/docs/plans/kernel-refactoring/V0.1.5-development-plan.md +0 -109
- package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_dsh.md +0 -50
- package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_prime.md +0 -113
- package/docs/plans/recallable-compaction.md +0 -147
- package/docs/plans/spike-tag-repro.mjs +0 -102
- package/docs/plans/upstream-analysis.md +0 -128
- package/docs/v0.1.8-improved-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -142
- package/docs/v0.1.8-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -193
- package/docs/v0.1.8b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -96
- package/docs/v0.1.8c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -127
- package/docs/v0.1.8d-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -150
- package/docs/v0.1.8d_artifacts/README.md +0 -138
- package/docs/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
- package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
- package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
- package/docs/v0.1.8d_artifacts/functions.json +0 -592
- package/docs/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
- package/docs/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
- package/docs/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
- package/docs/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
- package/docs/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
- package/docs/v0.1.8e-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -224
- package/docs/v0.1.9a-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -168
- package/docs/v0.2.0b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -123
- package/docs/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
- package/docs/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
- package/docs/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
- package/docs/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
- package/docs/v0.2.0b_artifacts/hashline-probe.md +0 -5
- package/docs/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
- package/docs/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
- package/docs/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
- package/docs/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
- package/docs/v0.2.1-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -110
- package/docs/v0.2.1b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -86
- package/docs/v0.2.1c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -66
- package/lib/py-sdk-BCaOGYz7.d.ts +0 -125
- package/lib/py-sdk-CbgYiX8O.js +0 -691
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# LLM 适配器
|
|
2
|
+
|
|
3
|
+
[English](llm-adapter.md) | 中文
|
|
4
|
+
|
|
5
|
+
本文介绍如何为 Harness 接入新的模型提供方。
|
|
6
|
+
|
|
7
|
+
## 概述
|
|
8
|
+
|
|
9
|
+
LLM 适配器是一个继承 `LlmAdapter` 并实现 `stream()` 方法的类,它会将 Harness 的提供方无关请求转换为具体提供方的 API 调用,并将响应转换回 Harness 分片。
|
|
10
|
+
|
|
11
|
+
## 最小实现
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import type { Context } from '@deepseek-ai/cordis'
|
|
15
|
+
import Schema from '@deepseek-ai/schemastery'
|
|
16
|
+
import { LlmAdapter, type GenerateOptions, type StreamChunk } from '@deepseek-ai/dsh-llm'
|
|
17
|
+
|
|
18
|
+
class MyAdapter extends LlmAdapter {
|
|
19
|
+
private apiKey: string
|
|
20
|
+
|
|
21
|
+
constructor(apiKey: string) {
|
|
22
|
+
super()
|
|
23
|
+
this.apiKey = apiKey
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async *stream(options: GenerateOptions): AsyncIterable<StreamChunk> {
|
|
27
|
+
// 1. Convert options.messages to the provider format.
|
|
28
|
+
// 2. Call the streaming API.
|
|
29
|
+
// 3. Convert the response into StreamChunk values.
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface Config {
|
|
34
|
+
apiKey: string
|
|
35
|
+
providers: string[]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const Config: Schema<Config> = Schema.object({
|
|
39
|
+
apiKey: Schema.string().required(),
|
|
40
|
+
providers: Schema.array(Schema.string()).required(),
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
export const name = 'my-llm-adapter'
|
|
44
|
+
export const inject = ['llm']
|
|
45
|
+
|
|
46
|
+
export function apply(ctx: Context, config: Config) {
|
|
47
|
+
const adapter = new MyAdapter(config.apiKey)
|
|
48
|
+
ctx.llm.registerAdapter(config.providers, adapter)
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## StreamChunk 协议
|
|
53
|
+
|
|
54
|
+
`stream()` 必须按以下协议生成分片:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { brandString } from '@deepseek-ai/dsh-brand'
|
|
58
|
+
import type { StreamChunk, ToolCallId } from '@deepseek-ai/dsh-llm'
|
|
59
|
+
|
|
60
|
+
async function* exampleChunks(): AsyncIterable<StreamChunk> {
|
|
61
|
+
// 1. Start each content block with block-start.
|
|
62
|
+
yield { type: 'block-start', index: 0, blockType: 'text' }
|
|
63
|
+
|
|
64
|
+
// 2. Stream text through text-delta.
|
|
65
|
+
yield { type: 'text-delta', index: 0, text: 'Hello' }
|
|
66
|
+
yield { type: 'text-delta', index: 0, text: ' world' }
|
|
67
|
+
|
|
68
|
+
// 3. End each content block with block-end and the complete block.
|
|
69
|
+
yield {
|
|
70
|
+
type: 'block-end',
|
|
71
|
+
index: 0,
|
|
72
|
+
block: { type: 'text', text: 'Hello world' },
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// 4. Tool-call block.
|
|
76
|
+
yield { type: 'block-start', index: 1, blockType: 'tool-call' }
|
|
77
|
+
yield {
|
|
78
|
+
type: 'tool-call-delta',
|
|
79
|
+
index: 1,
|
|
80
|
+
id: brandString<ToolCallId>('call-123'),
|
|
81
|
+
name: 'bash',
|
|
82
|
+
argumentsDelta: '{"command":"ls"}',
|
|
83
|
+
}
|
|
84
|
+
yield {
|
|
85
|
+
type: 'block-end',
|
|
86
|
+
index: 1,
|
|
87
|
+
block: {
|
|
88
|
+
type: 'tool-call',
|
|
89
|
+
id: brandString<ToolCallId>('call-123'),
|
|
90
|
+
name: 'bash',
|
|
91
|
+
arguments: '{"command":"ls"}',
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// 5. Token usage.
|
|
96
|
+
yield { type: 'usage', usage: { inputTokens: 100, outputTokens: 50 } }
|
|
97
|
+
|
|
98
|
+
// 6. Finish reason.
|
|
99
|
+
yield { type: 'finish', reason: { kind: 'stop' } }
|
|
100
|
+
// Alternatively, { kind: 'tool-calls' } requests tool execution.
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 关键规则
|
|
105
|
+
|
|
106
|
+
- 每个 `block-start` 都必须有与之对应的 `block-end`。
|
|
107
|
+
- `index` 从 0 开始递增,用于标识内容块的顺序。
|
|
108
|
+
- `tool-call-delta` 的 `argumentsDelta` 是原始 JSON 文本的增量,可以在一个分片中完整生成,也可以分多个分片生成。
|
|
109
|
+
- `finish` 必须是最后一个分片。
|
|
110
|
+
- `usage` 必须在 `finish` 之前生成。
|
|
111
|
+
|
|
112
|
+
## GenerateOptions
|
|
113
|
+
|
|
114
|
+
`stream()` 接收仓库导出的 `GenerateOptions`。它包含模型、适配器拥有的推理强度 ID、对话历史、系统提示词、工具 schema、生成参数、停止序列和中止信号;完整字段以 `@deepseek-ai/dsh-llm` 导出的 TypeScript 类型为准。适配器必须将支持的字段映射到具体 API;如果无法支持某个字段,应抛出带稳定 code 的 `LlmError`,不得静默丢弃。
|
|
115
|
+
|
|
116
|
+
请覆写 `resolveModel(provider, model, signal?)`,在一次查询中返回确切的提供方/模型身份以及可选的 `context` 和 `reasoning` 元数据。推理元数据包含有序的不透明 ID、展示名称,以及可选的配置默认值;请保留适配器给出的权威可选列表,包括其上游能力 API 返回的 `off`,不要将这些值提升为核心枚举。异步查询必须响应该可选信号,使取消和资源释放过程完全停稳。服务会校验聚合结果,并在调用 `stream()` 前拒绝显式指定但不受支持的推理强度;省略 `reasoning` 表示该模型没有可选的推理强度能力。
|
|
117
|
+
|
|
118
|
+
## 注册适配器
|
|
119
|
+
|
|
120
|
+
```ts ignore-check
|
|
121
|
+
ctx.llm.registerAdapter(['my-provider'], adapter)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
第一个参数是该适配器处理的提供方路由列表。`GenerateOptions.provider` 选择已注册的适配器,`GenerateOptions.model` 则传入由适配器拥有、无需在生命周期启动时注册的模型 id。适配器能够向选择器公布模型选项时,请覆写 `listModels()`。
|
|
125
|
+
|
|
126
|
+
## 在 cordis.yml 中使用
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
- id: my-llm
|
|
130
|
+
name: './src/my-llm-adapter.ts'
|
|
131
|
+
config:
|
|
132
|
+
apiKey: !!js process.env.MY_API_KEY
|
|
133
|
+
providers:
|
|
134
|
+
- my-provider
|
|
135
|
+
|
|
136
|
+
- id: agent-loop
|
|
137
|
+
name: '@deepseek-ai/dsh-agent-loop'
|
|
138
|
+
config:
|
|
139
|
+
agents:
|
|
140
|
+
- id: main
|
|
141
|
+
provider: my-provider
|
|
142
|
+
model: my-model-v1
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## 实战参考
|
|
146
|
+
|
|
147
|
+
仓库中包含以下两个完整实现:
|
|
148
|
+
|
|
149
|
+
- `packages/llm/llm-deepseek/` — DeepSeek API 适配器(OpenAI 兼容格式)
|
|
150
|
+
- `packages/llm/llm-pi-ai/` — Pi AI 适配器(不同的 API 格式)
|
|
151
|
+
|
|
152
|
+
对比这两个已交付的适配器,可以看到同一套 harness 契约如何在不同提供方 SDK 之上实现。
|
|
153
|
+
|
|
154
|
+
## 错误处理
|
|
155
|
+
|
|
156
|
+
适配器应通过带稳定 code 的 `LlmError` 抛出传输和协议故障;agent loop(智能体循环)会保留该错误及其 code,用于诊断和策略处理。不要依赖普通 `Error` 被自动转换。每个提供方 HTTP 请求还必须合并 `attributionHeaders()`,并传递 `options.signal`。
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
import {
|
|
160
|
+
attributionHeaders,
|
|
161
|
+
LlmAdapter,
|
|
162
|
+
LlmError,
|
|
163
|
+
type GenerateOptions,
|
|
164
|
+
type StreamChunk,
|
|
165
|
+
} from '@deepseek-ai/dsh-llm'
|
|
166
|
+
|
|
167
|
+
class HttpAdapter extends LlmAdapter {
|
|
168
|
+
constructor(private readonly endpoint: string) {
|
|
169
|
+
super()
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
async *stream(options: GenerateOptions): AsyncIterable<StreamChunk> {
|
|
173
|
+
const response = await fetch(this.endpoint, {
|
|
174
|
+
method: 'POST',
|
|
175
|
+
headers: {
|
|
176
|
+
'content-type': 'application/json',
|
|
177
|
+
...attributionHeaders(),
|
|
178
|
+
},
|
|
179
|
+
body: JSON.stringify({ model: options.model, messages: options.messages }),
|
|
180
|
+
...options.signal ? { signal: options.signal } : {},
|
|
181
|
+
})
|
|
182
|
+
if (!response.ok) {
|
|
183
|
+
throw new LlmError(`Provider API error: ${response.status}`, 'PROVIDER_HTTP_ERROR')
|
|
184
|
+
}
|
|
185
|
+
// A real adapter parses the response and emits the complete chunk sequence.
|
|
186
|
+
yield { type: 'finish', reason: { kind: 'stop' } }
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
```
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Create review Sessions from GitHub webhooks
|
|
2
|
+
|
|
3
|
+
English | [中文](github-review.zh.md)
|
|
4
|
+
|
|
5
|
+
This opt-in overlay adds a signed GitHub endpoint to `dsh web`. When a pull request in the configured repository changes from draft to ready for review, the rule creates a titled root Session under the repository's Web Workspace and starts a read-only review prompt.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- A local checkout that DSH may register as a Web Workspace.
|
|
10
|
+
- A high-entropy GitHub webhook secret available through the `DSH_GITHUB_WEBHOOK_SECRET` credential reference.
|
|
11
|
+
- A TLS reverse proxy or tunnel that can forward one public URL to the loopback listener.
|
|
12
|
+
- GitHub webhook subscription to the Pull requests event with content type `application/json`.
|
|
13
|
+
|
|
14
|
+
The overlay defaults the Workspace to the launch directory and the listener to `127.0.0.1:3081`. Override them with `DSH_GITHUB_REVIEW_WORKSPACE` and `DSH_GITHUB_WEBHOOK_PORT`.
|
|
15
|
+
|
|
16
|
+
## Start DSH
|
|
17
|
+
|
|
18
|
+
Generate a secret and retain the same value across restarts:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
export DSH_GITHUB_WEBHOOK_SECRET="$(openssl rand -hex 32)"
|
|
22
|
+
printf '%s\n' "$DSH_GITHUB_WEBHOOK_SECRET"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
From a development checkout:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
export DSH_GITHUB_REVIEW_WORKSPACE=/path/to/deepseek-harness
|
|
29
|
+
pnpm dsh web --patch apps/cli/config/examples/github-review/cordis.yml
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
An installed DSH uses the same overlay through an absolute path:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
dsh web --patch /absolute/path/to/github-review/cordis.yml
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
For a permanent profile, place `github-ready-review-rule.mjs` beside `$DSH_HOME/profiles/web/cordis.patch.yml`, append the rows from `cordis.yml` to that patch, and start with `dsh web`. The shipped CLI already contains both webhook packages; the overlay alone activates them.
|
|
39
|
+
|
|
40
|
+
## Expose the dedicated endpoint
|
|
41
|
+
|
|
42
|
+
The main Web UI and `/api` remain on port 3080. The overlay mounts a second WebServer in an isolated realm; only `POST /github` is registered there, and every other path returns `404`.
|
|
43
|
+
|
|
44
|
+
A Caddy configuration can expose only that listener:
|
|
45
|
+
|
|
46
|
+
```caddyfile
|
|
47
|
+
hooks.example.com {
|
|
48
|
+
route {
|
|
49
|
+
@github path /github
|
|
50
|
+
reverse_proxy @github 127.0.0.1:3081
|
|
51
|
+
respond 404
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Configure GitHub with:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
Payload URL: https://hooks.example.com/github
|
|
60
|
+
Content type: application/json
|
|
61
|
+
Secret: DSH_GITHUB_WEBHOOK_SECRET value
|
|
62
|
+
Events: Pull requests
|
|
63
|
+
Active: yes
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Rule behavior
|
|
67
|
+
|
|
68
|
+
The rule accepts only source `primary-github`, repository `deepseek-harness/deepseek-harness`, event `pull_request`, and action `ready_for_review`. It passes the exact head SHA plus selected PR fields to the review prompt, labeling the JSON as untrusted metadata and forbidding file, branch, PR, or GitHub mutation.
|
|
69
|
+
|
|
70
|
+
The Session request selects the `standard` agent preset and `read-only` permission preset. `workspacePath` is canonicalized through `WorkspaceRegistry.create()`, so the first matching delivery creates the Web Workspace when absent and later deliveries reuse it.
|
|
71
|
+
|
|
72
|
+
The HTTP response is intentionally weaker than the Agent outcome: `202` means the signature and JSON were accepted and rule calls were scheduled in memory. It does not mean this rule matched or that a Session was created.
|
|
73
|
+
|
|
74
|
+
## Programmatic extensions
|
|
75
|
+
|
|
76
|
+
`run()` is ordinary trusted JavaScript. A deployment can query an internal policy service before returning a Session request:
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
const response = await fetch('https://policy.internal/pr-review', {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
headers: { 'content-type': 'application/json' },
|
|
82
|
+
body: JSON.stringify({ repository: payload.repository.full_name }),
|
|
83
|
+
signal,
|
|
84
|
+
})
|
|
85
|
+
if (!response.ok || (await response.json()).automaticReview !== true) return null
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
It can also map repositories to different local paths:
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
const workspacePath = {
|
|
92
|
+
'deepseek-harness/deepseek-harness': '/path/to/deepseek-harness',
|
|
93
|
+
'deepseek-harness/dsh-sdk': '/path/to/dsh-sdk',
|
|
94
|
+
}[payload.repository.full_name]
|
|
95
|
+
if (workspacePath === undefined) return null
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Delivery semantics
|
|
99
|
+
|
|
100
|
+
The webhook runtime stores no delivery or execution state. Repeated delivery runs the rule and may create another Session. A crash loses rule calls that have not admitted their prompt. After prompt admission, the ordinary Session log, persistence, Workspace, and Agent lifecycle own the work.
|
|
101
|
+
|
|
102
|
+
The webhook secret authenticates inbound GitHub data only. It grants neither rule code nor the created Agent outbound GitHub access; configure that authority separately when a rule or Agent needs it.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# 通过 GitHub Webhook 创建评审会话
|
|
2
|
+
|
|
3
|
+
[English](github-review.md) | 中文
|
|
4
|
+
|
|
5
|
+
此可选 overlay 会为 `dsh web` 增加一个签名 GitHub 端点。当已配置仓库中的 pull request 从 draft 变为 ready for review 时,规则会在该仓库的 Web Workspace 下创建带标题的根 Session,并启动只读评审提示词。
|
|
6
|
+
|
|
7
|
+
## 前置条件
|
|
8
|
+
|
|
9
|
+
- 一个可由 DSH 注册为 Web Workspace 的本地 checkout。
|
|
10
|
+
- 一个可通过 `DSH_GITHUB_WEBHOOK_SECRET` 凭据引用访问的高熵 GitHub webhook 密钥。
|
|
11
|
+
- 一个可以把单个公共 URL 转发到 loopback 监听器的 TLS 反向代理或 tunnel。
|
|
12
|
+
- GitHub webhook 订阅 Pull requests 事件,且 content type 为 `application/json`。
|
|
13
|
+
|
|
14
|
+
overlay 默认使用启动目录作为 Workspace,并监听 `127.0.0.1:3081`。可通过 `DSH_GITHUB_REVIEW_WORKSPACE` 与 `DSH_GITHUB_WEBHOOK_PORT` 覆盖它们。
|
|
15
|
+
|
|
16
|
+
## 启动 DSH
|
|
17
|
+
|
|
18
|
+
生成密钥,并在重启后继续使用同一值:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
export DSH_GITHUB_WEBHOOK_SECRET="$(openssl rand -hex 32)"
|
|
22
|
+
printf '%s\n' "$DSH_GITHUB_WEBHOOK_SECRET"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
在开发 checkout 中运行:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
export DSH_GITHUB_REVIEW_WORKSPACE=/path/to/deepseek-harness
|
|
29
|
+
pnpm dsh web --patch apps/cli/config/examples/github-review/cordis.yml
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
安装版 DSH 通过绝对路径使用同一 overlay:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
dsh web --patch /absolute/path/to/github-review/cordis.yml
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
对于永久 profile,把 `github-ready-review-rule.mjs` 放在 `$DSH_HOME/profiles/web/cordis.patch.yml` 旁边,把 `cordis.yml` 中的行追加到该 patch,然后运行 `dsh web`。随附 CLI 已经包含两个 webhook 包;只需 overlay 即可激活它们。
|
|
39
|
+
|
|
40
|
+
## 暴露专用端点
|
|
41
|
+
|
|
42
|
+
主 Web UI 与 `/api` 继续位于端口 3080。overlay 会在隔离 realm 中挂载第二个 WebServer;其中只注册 `POST /github`,其他路径均返回 `404`。
|
|
43
|
+
|
|
44
|
+
Caddy 配置可以只暴露该监听器:
|
|
45
|
+
|
|
46
|
+
```caddyfile
|
|
47
|
+
hooks.example.com {
|
|
48
|
+
route {
|
|
49
|
+
@github path /github
|
|
50
|
+
reverse_proxy @github 127.0.0.1:3081
|
|
51
|
+
respond 404
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
GitHub 配置如下:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
Payload URL: https://hooks.example.com/github
|
|
60
|
+
Content type: application/json
|
|
61
|
+
Secret: DSH_GITHUB_WEBHOOK_SECRET value
|
|
62
|
+
Events: Pull requests
|
|
63
|
+
Active: yes
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 规则行为
|
|
67
|
+
|
|
68
|
+
规则只接受来源 `primary-github`、仓库 `deepseek-harness/deepseek-harness`、事件 `pull_request` 与动作 `ready_for_review`。它会把精确 head SHA 和选定 PR 字段传给评审提示词,把 JSON 标为不受信任的元数据,并禁止修改文件、分支、PR 或 GitHub 状态。
|
|
69
|
+
|
|
70
|
+
Session 请求选择 `standard` agent preset 与 `read-only` permission preset。`workspacePath` 通过 `WorkspaceRegistry.create()` 规范化,因此第一次匹配交付会在 Workspace 不存在时创建它,后续交付会复用它。
|
|
71
|
+
|
|
72
|
+
HTTP 响应刻意弱于 Agent 结果:`202` 表示签名与 JSON 已被接受,规则调用已在内存中调度。它不表示此规则已经匹配,也不表示已创建 Session。
|
|
73
|
+
|
|
74
|
+
## 程序化扩展
|
|
75
|
+
|
|
76
|
+
`run()` 是普通受信任 JavaScript。部署可以在返回 Session 请求前查询内部策略服务:
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
const response = await fetch('https://policy.internal/pr-review', {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
headers: { 'content-type': 'application/json' },
|
|
82
|
+
body: JSON.stringify({ repository: payload.repository.full_name }),
|
|
83
|
+
signal,
|
|
84
|
+
})
|
|
85
|
+
if (!response.ok || (await response.json()).automaticReview !== true) return null
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
它还可以把仓库映射到不同本地路径:
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
const workspacePath = {
|
|
92
|
+
'deepseek-harness/deepseek-harness': '/path/to/deepseek-harness',
|
|
93
|
+
'deepseek-harness/dsh-sdk': '/path/to/dsh-sdk',
|
|
94
|
+
}[payload.repository.full_name]
|
|
95
|
+
if (workspacePath === undefined) return null
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 交付语义
|
|
99
|
+
|
|
100
|
+
webhook runtime 不存储交付或执行状态。重复交付会运行规则,并可能创建另一个 Session。崩溃会丢失尚未接纳提示词的规则调用。提示词接纳后,工作由普通 Session 日志、persistence、Workspace 与 Agent 生命周期拥有。
|
|
101
|
+
|
|
102
|
+
webhook 密钥只验证入站 GitHub 数据。它不会向规则代码或所创建 Agent 授予出站 GitHub 访问权;规则或 Agent 需要时应单独配置该权限。
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Use the Web UI
|
|
2
|
+
|
|
3
|
+
English | [中文](index.zh.md)
|
|
4
|
+
|
|
5
|
+
Start the Web UI through the [root README](../../../README.md#run); the command prints its URL. This guide begins after that server is running. The `dsh` process uses its invoking directory as the default filesystem location, but a fresh Web UI has no selected workspace until you add one.
|
|
6
|
+
|
|
7
|
+
## Configure a model
|
|
8
|
+
|
|
9
|
+
Open **Settings → Models**, enter a [DeepSeek API key](https://platform.deepseek.com/), and save it. The model route becomes usable immediately without restarting the server.
|
|
10
|
+
|
|
11
|
+
The [model configuration guide](./providers.md) covers other providers and custom OpenAI-compatible endpoints.
|
|
12
|
+
|
|
13
|
+
## Choose a workspace
|
|
14
|
+
|
|
15
|
+
Click **Choose workspace**, add the project directory where you started `dsh`, and select it. The session composer remains unavailable until a workspace is selected.
|
|
16
|
+
|
|
17
|
+
## Run a task
|
|
18
|
+
|
|
19
|
+
Start a session and send:
|
|
20
|
+
|
|
21
|
+
> Summarize this repository and identify its main packages.
|
|
22
|
+
|
|
23
|
+
The agent can read and edit workspace files, run commands, delegate work, and maintain a plan. The Web UI asks before operations that require approval under the active permission policy.
|
|
24
|
+
|
|
25
|
+
## Continue
|
|
26
|
+
|
|
27
|
+
- [Configure models](./providers.md)
|
|
28
|
+
- [Use the Python SDK](./python-sdk.md)
|
|
29
|
+
- [Use other CLI modes](../../../apps/cli/README.md)
|
|
30
|
+
- [Develop a plugin](../develop/basic/index.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# 使用 Web UI
|
|
2
|
+
|
|
3
|
+
[English](index.md) | 中文
|
|
4
|
+
|
|
5
|
+
请先按照[根目录 README](../../../README.zh.md#run) 中的说明启动 Web UI;命令会打印其访问地址。本指南从服务器已经运行的状态开始。`dsh` 进程会把启动时所在的目录作为默认文件系统位置;全新的 Web UI 则不会选中任何工作区,你需要添加一个工作区。
|
|
6
|
+
|
|
7
|
+
## 配置模型
|
|
8
|
+
|
|
9
|
+
打开**设置 → 模型**,输入 [DeepSeek API 密钥](https://platform.deepseek.com/)并保存。模型路由会立即可用,不需要重启服务器。
|
|
10
|
+
|
|
11
|
+
[模型配置指南](./providers.zh.md)介绍其他提供方和自定义 OpenAI 兼容端点。
|
|
12
|
+
|
|
13
|
+
## 选择工作区
|
|
14
|
+
|
|
15
|
+
点击**选择工作区**,添加启动 `dsh` 时所在的项目目录,然后选中它。选中工作区前,会话输入框不可用。
|
|
16
|
+
|
|
17
|
+
## 运行任务
|
|
18
|
+
|
|
19
|
+
启动一个会话并发送:
|
|
20
|
+
|
|
21
|
+
> Summarize this repository and identify its main packages.
|
|
22
|
+
|
|
23
|
+
Agent(智能体)可以读取和编辑工作区文件、运行命令、委派工作并维护计划。如果根据当前权限策略,某项操作需要审批,Web UI 会先询问你。
|
|
24
|
+
|
|
25
|
+
## 继续使用
|
|
26
|
+
|
|
27
|
+
- [配置模型](./providers.zh.md)
|
|
28
|
+
- [使用 Python SDK](./python-sdk.zh.md)
|
|
29
|
+
- [使用其他 CLI 模式](../../../apps/cli/README.zh.md)
|
|
30
|
+
- [开发插件](../develop/basic/index.zh.md)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Connect a third-party memory MCP server
|
|
2
|
+
|
|
3
|
+
English | [中文](mcp-memory.zh.md)
|
|
4
|
+
|
|
5
|
+
These three **default-off reference configurations** connect one memory system to DSH through [`@deepseek-ai/dsh-mcp-client`](../../../packages/mcp/mcp-client/README.md). Pick one, or copy the same generic MCP row for another server.
|
|
6
|
+
|
|
7
|
+
These third-party configurations are provided as interoperability examples only. Their inclusion does not imply endorsement, recommendation, partnership, or ongoing support by DeepSeek.
|
|
8
|
+
|
|
9
|
+
## What DSH does
|
|
10
|
+
|
|
11
|
+
DSH parses the selected Cordis overlay, starts a configured stdio command or connects to a configured Streamable HTTP URL, discovers MCP tools, and exposes them as `mcp__<serverName>__<tool>`. DSH does **not** download the server, initialize its database, choose its model or embedding provider, create a cloud account, migrate vendor data, or supervise a separate HTTP service. For stdio, the generic client launches and stops the child with the DSH plugin lifecycle; for HTTP, the upstream service must already be running.
|
|
12
|
+
|
|
13
|
+
The stdio bridge deliberately removes ambient variables whose names usually identify credentials and all `DSH_*` variables before launching a child; other ambient variables remain inherited. Each example adds only the baseline override it needs. If an optional upstream feature needs another secret, add that variable to the row's `config.env` instead of putting the secret directly in YAML.
|
|
14
|
+
|
|
15
|
+
## Choose one
|
|
16
|
+
|
|
17
|
+
| System | Tested pin | Transport | Upstream prerequisite |
|
|
18
|
+
|---|---:|---|---|
|
|
19
|
+
| [Memorix](https://github.com/AVIDS2/memorix) | `memorix@1.3.0` (`500792cad3144142293bfbb20acb4841c9f7fcfa`) | stdio | Node 22.18+ and `npm install --global memorix@1.3.0` |
|
|
20
|
+
| [MCP Reference Memory](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) | `@modelcontextprotocol/server-memory@2026.7.4` (`6dd0a683e198783e30feabf7abaf42f925bd18b1`) | stdio | `npm install --global @modelcontextprotocol/server-memory@2026.7.4` |
|
|
21
|
+
| [Engram](https://github.com/Gentleman-Programming/engram) | `v1.20.0` (`ba9e46ced152c37a7cb9e576153c41995873e2fc`) | stdio | Go 1.25.10+ and `go install github.com/Gentleman-Programming/engram/cmd/engram@v1.20.0`, or the matching release binary |
|
|
22
|
+
|
|
23
|
+
## Enable one
|
|
24
|
+
|
|
25
|
+
Pass one overlay to DSH:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/memorix.cordis.yml"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Replace the filename with `mcp-reference-memory.cordis.yml` or `engram.cordis.yml`. The path may point to a copied file anywhere on disk. No memory server is present in the shipped composition, so omitting `--patch` keeps all three disabled.
|
|
32
|
+
|
|
33
|
+
To keep the selection across runs, merge the chosen file's single `insert` patch into a user patch layer — `$DSH_HOME/profiles/<name>/cordis.patch.yml` for one profile, or `$DSH_HOME/cordis.patch.yml` for every profile on the machine. Do not copy over an existing file: it may already contain unrelated user patches.
|
|
34
|
+
|
|
35
|
+
## Provider setup
|
|
36
|
+
|
|
37
|
+
### Memorix
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm install --global memorix@1.3.0
|
|
41
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/memorix.cordis.yml"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Memorix works in local heuristic mode without an LLM or embedding service. Configure optional providers in Memorix's own `~/.memorix/config.toml` or project `memorix.toml`. The example keeps Memorix's Git-project identity from the DSH working directory and uses Memorix's own `~/.memorix/data` default. Set `MEMORIX_DATA_DIR` before starting DSH to override it.
|
|
45
|
+
|
|
46
|
+
### MCP Reference Memory
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npm install --global @modelcontextprotocol/server-memory@2026.7.4
|
|
50
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/mcp-reference-memory.cordis.yml"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This reference server stores a local knowledge graph and exposes entity, relation, observation, read, search, and open tools. It needs no model or embedding service. The example stores its JSONL at `$HOME/.dsh-mcp-reference-memory.jsonl` instead of the installed npm package directory. Set `MEMORY_FILE_PATH` before starting DSH to override it.
|
|
54
|
+
|
|
55
|
+
Search is case-insensitive substring matching over entity names, types, and observations, not semantic retrieval. The server does not add embeddings, automatic summarization, conflict resolution, or a forgetting policy.
|
|
56
|
+
|
|
57
|
+
### Engram
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
go install github.com/Gentleman-Programming/engram/cmd/engram@v1.20.0
|
|
61
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/engram.cordis.yml"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Engram owns storage and project selection: it uses `~/.engram` by default, detects the Git project from the DSH working directory, and accepts `ENGRAM_DATA_DIR` or `ENGRAM_PROJECT` as ambient overrides.
|
|
65
|
+
|
|
66
|
+
## Optional shared model instruction
|
|
67
|
+
|
|
68
|
+
Add this short, vendor-neutral instruction to your existing model instructions if the server's tool descriptions do not trigger memory use reliably:
|
|
69
|
+
|
|
70
|
+
> When the user asks you to remember something, call a memory write tool. When historical information may be relevant, search memory and use relevant results.
|
|
71
|
+
|
|
72
|
+
This is additive guidance only. The examples do not replace DSH's system-prompt persona.
|
|
73
|
+
|
|
74
|
+
## Verify write, fresh-session recall, and use
|
|
75
|
+
|
|
76
|
+
Use one unique value and keep the provider's storage scope unchanged throughout:
|
|
77
|
+
|
|
78
|
+
1. In DSH session A, ask: `Remember that my validation drink is lapsang-<unique suffix>.` Confirm the model called the provider's write tool and the tool returned success.
|
|
79
|
+
2. Create DSH session B in the same running Host. Do not copy session A's conversation. Ask: `What is my validation drink? Check memory.` Confirm the model called the provider's search or recall tool and returned the value.
|
|
80
|
+
3. Still in session B, ask: `Use that preference to suggest one drink for the meeting.` Confirm the answer uses the recalled value.
|
|
81
|
+
|
|
82
|
+
A new DSH session is required; a Host restart is not. A crashed MCP child triggers automatic reconnection with backoff and a tool re-sync; tools stay listed and calls fail only during the outage, and after the reconnect budget is exhausted the tools are unregistered and reconnection stops until a reload or restart. Initial discovery is asynchronous, so wait for the provider's `mcp__...` tools before sending the first validation prompt.
|
|
83
|
+
|
|
84
|
+
## Bring another MCP server
|
|
85
|
+
|
|
86
|
+
Copy the same entry fields and use a unique `id` and `serverName`:
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
- insert:
|
|
90
|
+
- id: memory-my-server
|
|
91
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
92
|
+
config:
|
|
93
|
+
serverName: my-memory
|
|
94
|
+
transport: stdio
|
|
95
|
+
command: my-memory-mcp
|
|
96
|
+
args: []
|
|
97
|
+
env: {}
|
|
98
|
+
cwd: !!js process.cwd()
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
For a remote server, use `transport: streamable-http`, `url`, and `headers` instead. Provider-specific installation, identity, authentication, models, embeddings, persistence, and licensing remain the provider's responsibility.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# 连接第三方记忆 MCP 服务
|
|
2
|
+
|
|
3
|
+
[English](mcp-memory.md) | 中文
|
|
4
|
+
|
|
5
|
+
这三份**默认关闭的参考配置**通过 [`@deepseek-ai/dsh-mcp-client`](../../../packages/mcp/mcp-client/README.zh.md) 将一个记忆系统连接到 DSH。请选择其中一份,或复制相同的通用 MCP 配置项来连接其他服务器。
|
|
6
|
+
|
|
7
|
+
这些第三方配置仅作为互操作参考;收录不代表 DeepSeek 的认可、推荐、合作关系或持续支持承诺。
|
|
8
|
+
|
|
9
|
+
## DSH 负责什么
|
|
10
|
+
|
|
11
|
+
DSH 解析选中的 Cordis overlay,启动已配置的 stdio 命令或连接已配置的 Streamable HTTP URL,发现 MCP 工具,并以 `mcp__<serverName>__<tool>` 的形式公开这些工具。DSH **不负责** 下载服务器、初始化其数据库、选择模型或 embedding 提供方、创建云端账户、迁移提供方数据,也不监管独立的 HTTP 服务。对于 stdio,通用客户端会随 DSH 插件生命周期启动和停止子进程;对于 HTTP,上游服务必须已经运行。
|
|
12
|
+
|
|
13
|
+
stdio 桥接器在启动子进程前会主动移除环境中名称通常表示凭据的变量和所有 `DSH_*` 变量;其余环境变量仍会继承。每份示例仅添加其基线所需的覆盖项。如果某个可选的上游功能还需要其他密钥,请将该变量添加到配置项的 `config.env`,不要把密钥直接写进 YAML。
|
|
14
|
+
|
|
15
|
+
## 选择一个
|
|
16
|
+
|
|
17
|
+
| 系统 | 已测试版本 | 传输方式 | 上游前置条件 |
|
|
18
|
+
|---|---:|---|---|
|
|
19
|
+
| [Memorix](https://github.com/AVIDS2/memorix) | `memorix@1.3.0`(`500792cad3144142293bfbb20acb4841c9f7fcfa`) | stdio | Node 22.18+,并执行 `npm install --global memorix@1.3.0` |
|
|
20
|
+
| [MCP Reference Memory](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) | `@modelcontextprotocol/server-memory@2026.7.4`(`6dd0a683e198783e30feabf7abaf42f925bd18b1`) | stdio | `npm install --global @modelcontextprotocol/server-memory@2026.7.4` |
|
|
21
|
+
| [Engram](https://github.com/Gentleman-Programming/engram) | `v1.20.0`(`ba9e46ced152c37a7cb9e576153c41995873e2fc`) | stdio | Go 1.25.10+,并执行 `go install github.com/Gentleman-Programming/engram/cmd/engram@v1.20.0`,或安装匹配的发布版二进制文件 |
|
|
22
|
+
|
|
23
|
+
## 启用一个
|
|
24
|
+
|
|
25
|
+
将一份 overlay 传给 DSH:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/memorix.cordis.yml"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
请将文件名替换为 `mcp-reference-memory.cordis.yml` 或 `engram.cordis.yml`。该路径可以指向磁盘任意位置的一份复制文件。交付组合不包含任何记忆服务器,因此不传 `--patch` 就会让这三项全部保持关闭。
|
|
32
|
+
|
|
33
|
+
如果要跨次运行保留所选配置,请将对应文件中的单个 `insert` patch 合并到用户 patch 层:只对一个 profile 生效则写入 `$DSH_HOME/profiles/<name>/cordis.patch.yml`,对本机所有 profile 生效则写入 `$DSH_HOME/cordis.patch.yml`。不要覆盖已有文件,其中可能已经包含无关的用户 patch。
|
|
34
|
+
|
|
35
|
+
## 提供方设置
|
|
36
|
+
|
|
37
|
+
### Memorix
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm install --global memorix@1.3.0
|
|
41
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/memorix.cordis.yml"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Memorix 无需 LLM(大语言模型)或 embedding 服务,即可在本地启发式模式下运行。请在 Memorix 自己的 `~/.memorix/config.toml` 或项目 `memorix.toml` 中配置可选提供方。该示例沿用 DSH 工作目录中的 Git 项目标识,并使用 Memorix 自身的默认目录 `~/.memorix/data`。若要覆盖该目录,请在启动 DSH 前设置 `MEMORIX_DATA_DIR`。
|
|
45
|
+
|
|
46
|
+
### MCP Reference Memory
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npm install --global @modelcontextprotocol/server-memory@2026.7.4
|
|
50
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/mcp-reference-memory.cordis.yml"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
该参考服务器存储本地知识图谱,并公开实体、关系、观察、读取、搜索和打开工具。它不需要模型或 embedding 服务。该示例将 JSONL 存储在 `$HOME/.dsh-mcp-reference-memory.jsonl`,而不是已安装的 npm 包目录中。若要覆盖该路径,请在启动 DSH 前设置 `MEMORY_FILE_PATH`。
|
|
54
|
+
|
|
55
|
+
搜索只对实体名称、类型和观察进行不区分大小写的子字符串匹配,不是语义检索。该服务器不提供 embedding、自动摘要、冲突消解或遗忘策略。
|
|
56
|
+
|
|
57
|
+
### Engram
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
go install github.com/Gentleman-Programming/engram/cmd/engram@v1.20.0
|
|
61
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/engram.cordis.yml"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Engram 负责存储和项目选择:它默认使用 `~/.engram`,从 DSH 工作目录检测 Git 项目,并接受 `ENGRAM_DATA_DIR` 或 `ENGRAM_PROJECT` 作为环境覆盖项。
|
|
65
|
+
|
|
66
|
+
## 可选的共用模型指令
|
|
67
|
+
|
|
68
|
+
如果服务器的工具描述无法可靠触发记忆使用,请将以下简短、与提供方无关的指令添加到你现有的模型指令中:
|
|
69
|
+
|
|
70
|
+
> 用户要求记住某事时调用记忆写入工具;历史信息可能相关时,检索记忆并使用相关结果。
|
|
71
|
+
|
|
72
|
+
这只是附加指导。示例不会替换 DSH 系统提示词中的 persona。
|
|
73
|
+
|
|
74
|
+
## 验证写入、新会话召回和使用
|
|
75
|
+
|
|
76
|
+
请在整个过程中使用一个唯一值,并保持提供方的存储范围不变:
|
|
77
|
+
|
|
78
|
+
1. 在 DSH 会话 A 中提出:`Remember that my validation drink is lapsang-<unique suffix>.`。确认模型调用了提供方的写入工具,并且工具返回成功。
|
|
79
|
+
2. 在同一个仍在运行的 Host 中创建 DSH 会话 B。不要复制会话 A 的对话。提出:`What is my validation drink? Check memory.`。确认模型调用了提供方的搜索或召回工具,并返回该值。
|
|
80
|
+
3. 继续在会话 B 中提出:`Use that preference to suggest one drink for the meeting.`。确认回答使用了召回的值。
|
|
81
|
+
|
|
82
|
+
必须新建 DSH 会话,但不需要重启 Host。MCP 子进程崩溃后会触发带退避的自动重连与工具重新同步;停机期间工具仍保持列出,调用只在停机期间失败;重连预算耗尽后工具会被注销,重连停止,直到重新加载或重启。初始发现过程是异步的,因此发送第一条验证提示词前,请等待提供方的 `mcp__...` 工具出现。
|
|
83
|
+
|
|
84
|
+
## 接入其他 MCP 服务器
|
|
85
|
+
|
|
86
|
+
复制相同的条目字段,并使用唯一的 `id` 和 `serverName`:
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
- insert:
|
|
90
|
+
- id: memory-my-server
|
|
91
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
92
|
+
config:
|
|
93
|
+
serverName: my-memory
|
|
94
|
+
transport: stdio
|
|
95
|
+
command: my-memory-mcp
|
|
96
|
+
args: []
|
|
97
|
+
env: {}
|
|
98
|
+
cwd: !!js process.cwd()
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
对于远程服务器,请改用 `transport: streamable-http`、`url` 和 `headers`。提供方专属的安装、身份、认证、模型、embedding、持久化和许可仍由提供方负责。
|