dsh-plugin-dev-kb 1.0.8 → 1.0.9
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 +11 -0
- package/README.en.md +6 -6
- package/README.md +6 -6
- package/kb/INDEX.md +19 -5
- package/kb/README.md +11 -10
- package/kb/extra/AGENTS.md +4 -4
- package/kb/extra/cookbook/adding-a-vendored-package.md +2 -2
- package/kb/extra/cookbook/adding-a-vendored-package.zh.md +2 -2
- package/kb/extra/deepseek-llm-api-wire-extensions.md +159 -0
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +159 -0
- package/kb/extra/development.md +8 -14
- package/kb/extra/development.zh.md +8 -14
- package/kb/extra/event-producer-consumer.md +47 -41
- package/kb/extra/event-producer-consumer.zh.md +47 -41
- package/kb/extra/glossary.md +1 -1
- package/kb/extra/glossary.zh.md +1 -1
- package/kb/extra/graph-atlas.md +0 -2
- package/kb/extra/graph-atlas.zh.md +0 -2
- package/kb/extra/i18n/README.md +4 -4
- package/kb/extra/i18n/README.zh.md +4 -4
- package/kb/extra/module-graph.md +680 -413
- package/kb/extra/module-graph.zh.md +681 -414
- package/kb/extra/postmortem/0001-acp-default-export-drops-inject.md +2 -2
- package/kb/extra/postmortem/0001-acp-default-export-drops-inject.zh.md +2 -2
- package/kb/extra/postmortem/0002-js-expression-disabled-filesystem-tools.md +2 -2
- package/kb/extra/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +2 -2
- package/kb/extra/postmortem/0003-web-agent-gui-feedback-loop.md +2 -2
- package/kb/extra/postmortem/0003-web-agent-gui-feedback-loop.zh.md +2 -2
- package/kb/extra/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +1 -1
- package/kb/extra/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +1 -1
- package/kb/extra/rescope.md +2 -2
- package/kb/extra/rescope.zh.md +2 -2
- package/kb/extra/subsystems/agent-team.md +24 -1
- package/kb/extra/subsystems/agent-team.zh.md +24 -1
- package/kb/extra/subsystems/attachment.md +12 -4
- package/kb/extra/subsystems/attachment.zh.md +12 -4
- package/kb/extra/subsystems/extensions.md +18 -0
- package/kb/extra/subsystems/extensions.zh.md +18 -0
- package/kb/extra/subsystems/feedback.md +2 -2
- package/kb/extra/subsystems/feedback.zh.md +2 -2
- package/kb/extra/subsystems/todo.md +32 -0
- package/kb/extra/subsystems/todo.zh.md +32 -0
- package/kb/extra/subsystems/webhook.md +70 -0
- package/kb/extra/subsystems/webhook.zh.md +70 -0
- package/kb/extra/testing.md +11 -10
- package/kb/extra/testing.zh.md +8 -7
- package/kb/meta/search-index.json +269 -161
- package/kb/meta/site-pages.txt +182 -168
- package/kb/meta/source.json +5 -5
- package/kb/meta/topics.md +14 -6
- package/kb/site/develop/basic/publish.md +2 -2
- package/kb/site/develop/basic/tool.md +1 -1
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +4 -4
- package/kb/site/develop/framework/events.md +1 -1
- package/kb/site/develop/practice/dynamic-cordis.md +17 -0
- package/kb/site/develop/practice/llm-adapter.md +3 -3
- package/kb/site/en/develop/basic/publish.md +2 -2
- package/kb/site/en/develop/basic/tool.md +1 -1
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +4 -4
- package/kb/site/en/develop/framework/events.md +1 -1
- package/kb/site/en/develop/practice/dynamic-cordis.md +17 -0
- package/kb/site/en/develop/practice/llm-adapter.md +3 -3
- package/kb/site/en/guide/github-review.md +104 -0
- package/kb/site/en/guide/mcp-memory.md +103 -0
- package/kb/site/en/guide/python-sdk.md +80 -34
- package/kb/site/en/guide/schedule.md +21 -0
- package/kb/site/en/reference/agent-lifecycle.md +1 -1
- package/kb/{extra → site/en/reference}/api-gateway.md +11 -9
- package/kb/site/en/reference/capability-seams.md +115 -67
- package/kb/site/en/reference/config-catalog.md +358 -164
- package/kb/site/en/reference/cookbook/adding-a-package.md +2 -2
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +2 -2
- package/kb/site/en/reference/cookbook/adding-a-tool.md +11 -4
- package/kb/site/en/reference/cookbook/adding-an-llm-adapter.md +1 -1
- package/kb/site/en/reference/cookbook/extension-cookbook.md +6 -6
- package/kb/site/en/reference/cordis-api/inherited.md +1 -1
- package/kb/site/en/reference/cordis-primer.md +2 -1
- package/kb/site/en/reference/index.md +19 -7
- package/kb/site/en/reference/persistence-catalog.md +91 -44
- package/kb/site/en/reference/subsystems/approval.md +10 -10
- package/kb/site/en/reference/subsystems/client-modules.md +58 -16
- package/kb/site/en/reference/subsystems/code-runtime.md +3 -3
- package/kb/site/en/reference/subsystems/compaction.md +2 -2
- package/kb/site/en/reference/{cookbook/adding-a-conversation-node.md → subsystems/conversation.md} +43 -24
- package/kb/site/en/reference/subsystems/core.md +70 -12
- package/kb/site/en/reference/subsystems/credentials.md +43 -3
- package/kb/site/en/reference/subsystems/filesystem.md +12 -2
- package/kb/site/en/reference/subsystems/index.md +6 -1
- package/kb/site/en/reference/subsystems/jobs.md +1 -1
- package/kb/site/en/reference/subsystems/llm-streaming.md +132 -11
- package/kb/site/en/reference/subsystems/permission-presets.md +1 -1
- package/kb/site/en/reference/subsystems/persistence.md +22 -3
- package/kb/site/en/reference/subsystems/plan.md +1 -1
- package/kb/site/en/reference/subsystems/session-projection.md +74 -33
- package/kb/site/en/reference/subsystems/session-query.md +9 -1
- package/kb/site/en/reference/subsystems/session-reference.md +28 -7
- package/kb/site/en/reference/subsystems/session-telemetry.md +2 -3
- package/kb/site/en/reference/subsystems/session.md +260 -41
- package/kb/site/en/reference/subsystems/settings.md +78 -1
- package/kb/site/en/reference/subsystems/skills.md +23 -0
- package/kb/site/en/reference/subsystems/slots.md +177 -0
- package/kb/site/en/reference/subsystems/spill.md +2 -2
- package/kb/site/en/reference/subsystems/storage.md +9 -1
- package/kb/site/en/reference/subsystems/subagent.md +90 -23
- package/kb/site/en/reference/subsystems/system-prompt.md +4 -4
- package/kb/site/en/reference/subsystems/token-meter.md +25 -10
- package/kb/site/en/reference/subsystems/tools.md +39 -39
- package/kb/site/en/reference/subsystems/typert.md +44 -37
- package/kb/site/en/reference/subsystems/user-questions.md +33 -33
- package/kb/site/en/reference/subsystems/web-client.md +98 -0
- package/kb/site/en/reference/subsystems/web-server.md +11 -5
- package/kb/site/en/reference/subsystems/web.md +7 -1
- package/kb/site/en/reference/subsystems/workspace.md +95 -2
- package/kb/site/en/reference/tool-catalog.md +76 -18
- package/kb/site/en/reference/tool-execution-pipeline.md +1 -1
- package/kb/site/guide/github-review.md +104 -0
- package/kb/site/guide/mcp-memory.md +103 -0
- package/kb/site/guide/python-sdk.md +87 -41
- package/kb/site/guide/schedule.md +21 -0
- package/kb/site/reference/agent-lifecycle.md +1 -1
- package/kb/{extra/api-gateway.zh.md → site/reference/api-gateway.md} +11 -9
- package/kb/site/reference/capability-seams.md +115 -67
- package/kb/site/reference/config-catalog.md +357 -163
- package/kb/site/reference/cookbook/adding-a-package.md +2 -2
- package/kb/site/reference/cookbook/adding-a-settings-card.md +2 -2
- package/kb/site/reference/cookbook/adding-a-tool.md +11 -4
- package/kb/site/reference/cookbook/adding-an-llm-adapter.md +1 -1
- package/kb/site/reference/cookbook/extension-cookbook.md +6 -6
- package/kb/site/reference/cordis-api/inherited.md +1 -1
- package/kb/site/reference/cordis-primer.md +2 -1
- package/kb/site/reference/index.md +19 -7
- package/kb/site/reference/persistence-catalog.md +87 -40
- package/kb/site/reference/subsystems/approval.md +10 -10
- package/kb/site/reference/subsystems/client-modules.md +58 -16
- package/kb/site/reference/subsystems/code-runtime.md +3 -3
- package/kb/site/reference/subsystems/compaction.md +2 -2
- package/kb/site/reference/{cookbook/adding-a-conversation-node.md → subsystems/conversation.md} +43 -24
- package/kb/site/reference/subsystems/core.md +70 -12
- package/kb/site/reference/subsystems/credentials.md +43 -3
- package/kb/site/reference/subsystems/filesystem.md +12 -2
- package/kb/site/reference/subsystems/index.md +6 -1
- package/kb/site/reference/subsystems/jobs.md +1 -1
- package/kb/site/reference/subsystems/llm-streaming.md +132 -11
- package/kb/site/reference/subsystems/persistence.md +22 -3
- package/kb/site/reference/subsystems/plan.md +1 -1
- package/kb/site/reference/subsystems/session-projection.md +74 -33
- package/kb/site/reference/subsystems/session-query.md +9 -1
- package/kb/site/reference/subsystems/session-reference.md +28 -7
- package/kb/site/reference/subsystems/session-telemetry.md +2 -3
- package/kb/site/reference/subsystems/session.md +260 -41
- package/kb/site/reference/subsystems/settings.md +78 -1
- package/kb/site/reference/subsystems/skills.md +23 -0
- package/kb/site/reference/subsystems/slots.md +177 -0
- package/kb/site/reference/subsystems/spill.md +2 -2
- package/kb/site/reference/subsystems/storage.md +9 -1
- package/kb/site/reference/subsystems/subagent.md +90 -23
- package/kb/site/reference/subsystems/system-prompt.md +4 -4
- package/kb/site/reference/subsystems/token-meter.md +25 -10
- package/kb/site/reference/subsystems/tools.md +39 -39
- package/kb/site/reference/subsystems/typert.md +44 -37
- package/kb/site/reference/subsystems/user-questions.md +33 -33
- package/kb/site/reference/subsystems/web-client.md +98 -0
- package/kb/site/reference/subsystems/web-server.md +11 -5
- package/kb/site/reference/subsystems/web.md +7 -1
- package/kb/site/reference/subsystems/workspace.md +95 -2
- package/kb/site/reference/tool-catalog.md +76 -18
- package/kb/site/reference/tool-execution-pipeline.md +1 -1
- package/package.json +2 -2
- package/skills/dsh-plugin-dev-kb.md +8 -6
|
@@ -120,13 +120,13 @@ Ownership truth is the record's ordered `sessionIds`, never derived from session
|
|
|
120
120
|
|
|
121
121
|
## The registry: `ctx.workspaceRegistry`
|
|
122
122
|
|
|
123
|
-
`WorkspaceRegistry` ([signatures](#ctxworkspaceregistry--workspaceregistry)) owns registration and resolution. `create(path, title?)` canonicalizes the path, rejects a nonexistent path (the original `ENOENT`) or a non-directory, returns the existing entity unchanged when the canonical path is already owned, and otherwise creates a record with `title ?? basename(path)` prepended to the durable registry order
|
|
123
|
+
`WorkspaceRegistry` ([signatures](#ctxworkspaceregistry--workspaceregistry)) owns registration and resolution. `create(path, title?)` canonicalizes the path, rejects a nonexistent path (the original `ENOENT`) or a non-directory, returns the existing entity unchanged when the canonical path is already owned, and otherwise creates a record with `title ?? basename(path)` prepended to the durable registry order (different canonical paths may share a display title). `get(id)` and the ordered `list()` are synchronous cache reads; `resolveByPath(path)` applies the same realpath canon without creating. `delete(id)` removes only the registration, order entry, and session account — the directory, user files, live sessions, and persisted logs are never touched, so those sessions become Ungrouped ([decision](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/feature/2026-07-27-workspace-registration-deletion.md)); unknown ids return `false`. Create and delete persist a pending-mutation marker before their two writes (record + order) can diverge; startup resolves exactly the marked mutation — by deleting the marked table row, which completes an interrupted delete and rolls back an interrupted create (the registration is re-creatable, so rollback is the safe direction) — and an unmarked order/table mismatch fails loud as corruption.
|
|
124
124
|
|
|
125
125
|
Sessions get their cwd at create time from whoever creates them, not from this registry — the API gateway resolves a new session's cwd from the chosen workspace's `path` (falling back to an explicit or default cwd), creates the session so the cwd lands in its immutable [`SessionHeader`](./persistence.md#sessionheader--metadata-beside-the-log), then calls `attachSession`, which re-validates that stored header cwd against the workspace path. On the first successful start, the registry bootstraps history from persisted headers alone (`id`, `cwd`, `createdAt` — never event bodies), grouping sessions with a valid canonical cwd into per-directory workspaces, newest first; the initialized marker is written last so an interrupted bootstrap resumes safely. The bootstrap is one-time: cwd-less legacy sessions stay Ungrouped, and sessions created afterwards join a workspace only through `attachSession`.
|
|
126
126
|
|
|
127
127
|
## Consumers
|
|
128
128
|
|
|
129
|
-
[dsh-
|
|
129
|
+
[`dsh-workspace-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/workspace-controller) serves workspace CRUD to GUI clients over `ctx.workspaceRegistry`, and [`dsh-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller) performs the create-session-then-attach flow above. [dsh-agent-instructions](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/context/agent-instructions) is **not** a consumer despite the name: it discovers AGENTS.md-style instruction files under an agent's own cwd and never touches `ctx.workspaceRegistry` — the shared word refers to the user's working directory, not to this registry's entities.
|
|
130
130
|
|
|
131
131
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
132
132
|
|
|
@@ -152,6 +152,99 @@ abstract capability(): DirectoryPickerCapability
|
|
|
152
152
|
|
|
153
153
|
Source: [`packages/host/directory-picker/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/host/directory-picker/src/index.ts)
|
|
154
154
|
|
|
155
|
+
<a id="ctxdirectorypickercontroller--directorypickercontroller"></a>
|
|
156
|
+
|
|
157
|
+
### `ctx.directoryPickerController` — `DirectoryPickerController`
|
|
158
|
+
|
|
159
|
+
Host service backing the generated `ctx.remote.directoryPicker` namespace. The seam it exports is abstract and therefore never a Loader entry of its own, so this controller carries the wire verbs: one composed backend serves either the native chooser or the browse primitives, and a verb the composition cannot serve is refused rather than approximated.
|
|
160
|
+
|
|
161
|
+
```ts cordis-catalog
|
|
162
|
+
/**
|
|
163
|
+
* Open the host's OS chooser for a Remote caller.
|
|
164
|
+
* @param signal - caller lifetime; abort terminates the chooser.
|
|
165
|
+
* @returns the chosen absolute path, or null when the operator cancels.
|
|
166
|
+
*/
|
|
167
|
+
@Remote('pick') async pick(signal: AbortSignal): Promise<string | null>
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* List one directory level for a Remote caller's in-app browser.
|
|
171
|
+
* @param path - absolute directory to list; absent lists the home directory.
|
|
172
|
+
* @param signal - caller lifetime; abort stops the backend's scan instead of
|
|
173
|
+
* letting it outlive a disconnected caller.
|
|
174
|
+
* @returns the level's listing with its ancestry.
|
|
175
|
+
*/
|
|
176
|
+
@Remote('list') async list(path: string | undefined, signal: AbortSignal): Promise<DirectoryListing>
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Create one child directory for a Remote caller's in-app browser.
|
|
180
|
+
* @param path - absolute existing parent directory.
|
|
181
|
+
* @param name - single non-blank path segment.
|
|
182
|
+
* @returns the created directory's absolute path.
|
|
183
|
+
*/
|
|
184
|
+
@Remote('createDirectory') async createDirectory(path: string, name: string): Promise<string>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Source: [`packages/api/workspace-controller/src/directory-picker.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/workspace-controller/src/directory-picker.ts)
|
|
188
|
+
|
|
189
|
+
<a id="ctxworkspacecontroller--workspacecontroller"></a>
|
|
190
|
+
|
|
191
|
+
### `ctx.workspaceController` — `WorkspaceController`
|
|
192
|
+
|
|
193
|
+
Host service backing the generated `ctx.remote.workspace` namespace.
|
|
194
|
+
|
|
195
|
+
```ts cordis-catalog
|
|
196
|
+
/**
|
|
197
|
+
* Create or idempotently resolve one Workspace over an existing directory.
|
|
198
|
+
* @param request - directory path to register.
|
|
199
|
+
* @returns the Workspace and whether this call created it.
|
|
200
|
+
*/
|
|
201
|
+
@Remote('create') create(request: WorkspaceCreateRequest): Promise<WorkspaceCreateValue>
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Rename one Workspace to a unique non-blank title.
|
|
205
|
+
* @param request - Workspace identity and proposed title.
|
|
206
|
+
* @returns the updated Workspace projection.
|
|
207
|
+
*/
|
|
208
|
+
@Remote('rename') rename(request: WorkspaceRenameRequest): Promise<WorkspaceValue>
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Remove one Workspace registration while retaining files and Sessions.
|
|
212
|
+
* @param request - Workspace identity to remove.
|
|
213
|
+
* @returns deletion confirmation.
|
|
214
|
+
*/
|
|
215
|
+
@Remote('delete') delete(request: WorkspaceDeleteRequest): Promise<WorkspaceDeleteValue>
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Move one Workspace within the registry display order.
|
|
219
|
+
* @param request - moved Workspace and optional anchor.
|
|
220
|
+
* @returns the complete resulting Workspace order.
|
|
221
|
+
*/
|
|
222
|
+
@Remote('insertBefore') insertBefore(request: WorkspaceInsertBeforeRequest): Promise<WorkspaceOrderValue>
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Move one accounted Session within a Workspace.
|
|
226
|
+
* @param request - Workspace, Session, and optional anchor identities.
|
|
227
|
+
* @returns the updated Workspace projection.
|
|
228
|
+
*/
|
|
229
|
+
@Remote('insertSessionBefore') insertSessionBefore(request: WorkspaceInsertSessionBeforeRequest): Promise<WorkspaceValue>
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Hide one known Session from Workspace grouping surfaces.
|
|
233
|
+
* @param request - Session identity to archive.
|
|
234
|
+
* @returns the complete resulting archive set.
|
|
235
|
+
*/
|
|
236
|
+
@Remote('archiveSession') archiveSession(request: WorkspaceArchiveSessionRequest): Promise<WorkspaceArchiveValue>
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Stream a complete Workspace baseline followed by ordered increments.
|
|
240
|
+
* @param signal - generation cancellation.
|
|
241
|
+
* @returns baseline followed by ordered Workspace increments.
|
|
242
|
+
*/
|
|
243
|
+
@Remote({ mode: 'stream' }) follow(signal: AbortSignal): AsyncIterable<WorkspaceFollowFrame>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Source: [`packages/api/workspace-controller/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/workspace-controller/src/index.ts)
|
|
247
|
+
|
|
155
248
|
<a id="ctxworkspaceregistry--workspaceregistry"></a>
|
|
156
249
|
|
|
157
250
|
### `ctx.workspaceRegistry` — `WorkspaceRegistry`
|
|
@@ -20,7 +20,7 @@ This table connects model-visible tool names to the plugin package and service s
|
|
|
20
20
|
| Tool package | Model-visible names | Requires | Writes / affects | Shipped aliases | Deployment note |
|
|
21
21
|
| --- | --- | --- | --- | --- | --- |
|
|
22
22
|
| `@deepseek-ai/dsh-tool-ask-user` | `ask_user_question` | `ctx.tools`, `ctx.userQuestions` | `tool/call`, `tool/result after a UI/provider answers the question` | - | ask_user_question pauses the tool call until the active UI provider returns a human answer. |
|
|
23
|
-
| `@deepseek-ai/dsh-tools` | `run_code` | `ctx.tools`, `ctx.codeRuntime (execution time)`, `ctx.systemPrompt` | `tool/call`, `one tool/code-dispatch-start + tool/code-dispatch pair per bridged sub-call`, `tool/result` | - | Owned by the tool registry as a reserved transport outside filterable capability layers under `mode:
|
|
23
|
+
| `@deepseek-ai/dsh-tools` | `run_code` | `ctx.tools`, `ctx.codeRuntime (execution time)`, `ctx.systemPrompt` | `tool/call`, `one tool/code-dispatch-start + tool/code-dispatch pair per bridged sub-call`, `tool/result` | - | Owned by the tool registry as a reserved transport outside filterable capability layers under `mode: ptc` / `mode: both` (see the PTC mode Agent Note). Under `ptc` it is the registry's only wire contribution; the other visible capabilities are declared in a generated SDK section in the loaded runtime's language, and a program calls them through bindings scheduled under the native concurrency contract (submission-ordered starts and policy; concurrency-safe bodies overlap up to `maxParallelSubCalls`) that re-enter the complete guarded tool pipeline and link each nested execution to this outer result. |
|
|
24
24
|
| `@deepseek-ai/dsh-plan-mode` | `exit_plan_mode` | `ctx.tools`, `ctx.systemPrompt`, `ctx.userQuestions (execution time, opportunistic)` | `tool/call`, `plan/mode inactive on an approved review`, `tool/result` | - | exit_plan_mode stays in the model-facing schema while planning is inactive so transitions add no tool-catalog churn on top of the plan-policy change. Its execute path rejects calls outside plan mode; in plan mode it presents the plan over the user-questions seam (approve / keep planning with feedback), and approval logs plan mode inactive at the step boundary. |
|
|
25
25
|
| `@deepseek-ai/dsh-tool-bash` | `bash` | `ctx.tools`, `ctx.shell`, `ctx.systemPrompt`, `ctx.shellEnv`, `ctx.jobs at call time for run_in_background` | `tool/call`, `tool/result` | - | The bash tool is the model-facing consumer of the bash executor seam. A `run_in_background` run registers with the generic `ctx.jobs` runtime and is collected/stopped through the `job_*` tools from `@deepseek-ai/dsh-tool-jobs`; the `enableRunInBackground` config (default true) removes the parameter entirely when disabled. |
|
|
26
26
|
| `@deepseek-ai/dsh-tool-pwsh` | `pwsh` | `ctx.tools`, `ctx.shell`, `ctx.systemPrompt`, `ctx.shellEnv`, `ctx.jobs at call time for run_in_background` | `tool/call`, `tool/result` | - | The pwsh tool is the PowerShell-dialect consumer of the bash executor seam for Windows compositions (a PowerShell executor such as `@deepseek-ai/dsh-pwsh-local` backs `ctx.shell`); it mirrors the bash tool call-for-call minus sandbox controls — `run_in_background` runs register with the generic `ctx.jobs` runtime and are collected/stopped through the `job_*` tools, and the managed `DSH_*` environment comes from `@deepseek-ai/dsh-shell-env`. Each call runs in a fresh process (no persistent PTY session), with native `C:\...` paths and `$env:NAME` variables. |
|
|
@@ -37,7 +37,7 @@ This table connects model-visible tool names to the plugin package and service s
|
|
|
37
37
|
| `@deepseek-ai/dsh-tool-ralph` | `ralph` | `ctx.tools`, `ctx.workflowEngine`, `ctx.subagents`, `ctx.systemPrompt`, `a calling Agent (exec.agent parents every fresh round)` | `tool/call`, `tool/result`, `workflow and child session events during execution` | - | A fixed foreground workflow starts one fresh structured child per round; the model selects only the immutable objective and an optional round cap. |
|
|
38
38
|
| `@deepseek-ai/dsh-tool-skill` | `skill` | `ctx.tools`, `ctx.agents`, `ctx.skills` | `tool/call`, `tool/result`, `user/message replacement catalogs via agent.inject()` | - | - |
|
|
39
39
|
| `@deepseek-ai/dsh-tool-session-query` | `session_event_read`, `session_event_search`, `session_event_trace`, `session_search`, `session_trace` | `ctx.tools`, `ctx.systemPrompt`, `ctx.sessionQuery`, `a calling Agent for workspace authority` | `tool/call`, `tool/result` | - | The five read-only tools hide provider cursors and authorize every result from the immutable calling agent session. The package is opt-in; compositions that need enforced deadlines or bounded inline output also mount the generic timeout or spill policies. |
|
|
40
|
-
| `@deepseek-ai/dsh-tool-subagent` | `subagent` | `ctx.tools`, `ctx.subagents`, `ctx.systemPrompt` | `tool/call`, `tool/result`, `child session events through the chosen provider` | `subagent`, `subagent_fork` | The registered
|
|
40
|
+
| `@deepseek-ai/dsh-tool-subagent` | `list_subagent_models`, `subagent` | `ctx.tools`, `ctx.subagents`, `ctx.systemPrompt`, `ctx.llm for model discovery and selected-route validation` | `tool/call`, `tool/result`, `child session events through the chosen provider` | `subagent`, `subagent_fork` | The registered delegation name is the load-time `toolName` config (default `subagent`); the default schema above has model selection off, while the discovery schema is shown as the fixed companion available in an enabled Session. Web presets sample the Plugins preference for each new top-level Session and preserve that decision for its child Sessions; `subagent_fork` remains fixed-route. Each instance independently controls whether it reads model-selection settings and its background behavior through `modelSelectionSettings`, `backgroundMode`, and `enableRunInBackground`. |
|
|
41
41
|
| `@deepseek-ai/dsh-tool-subagent-control` | `interrupt_agent`, `list_agents`, `send_message` | `ctx.tools`, `ctx.subagents`, `ctx.agents and ctx.sessionProjections (list_agents only)` | `tool/call`, `tool/result`, `child session events through ctx.subagents` | - | The globally named control tools over continuable background subagents: provider-bound `tool-subagent` instances register distinct delegation tools, while this package registers `send_message` and `interrupt_agent` once, plus `list_agents` from its separately loaded `/list-agents` plugin (whose catalog rows use the sessionProjections and live Agent registries). |
|
|
42
42
|
| `@deepseek-ai/dsh-tool-subagent-report` | `report` | `ctx.subagents`, `ctx.systemPrompt`, `a live continuable in-process child Agent` | `tool/call`, `tool/result`, `a user-role message in the direct parent session` | - | Registered per continuable in-process child rather than globally, so this schema is visible only inside such a child and survives its global `toolFilter`. The same contribution installs the child-scoped `tool:report` prompt section, which this catalog does not render. The parent-facing `send_message` tool is installed independently. |
|
|
43
43
|
| `@deepseek-ai/dsh-tool-jobs` | `job_kill`, `job_list`, `job_output` | `ctx.tools`, `ctx.jobs`, `ctx.systemPrompt` | `tool/call`, `tool/result`, `user/message via agent.inject() for background completion notices` | - | The kind-agnostic background-job controller: background bash commands, PTY sends, and subagents are read, listed, and killed through the same three tools. Loading the plugin attaches the controller that arms producers' `ctx.jobs.start()`. |
|
|
@@ -148,9 +148,9 @@ Execute a TypeScript program against the available tools. Takes two required arg
|
|
|
148
148
|
}
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
Source: [`packages/core/tools/src/
|
|
151
|
+
Source: [`packages/core/tools/src/ptc.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/ptc.ts)
|
|
152
152
|
|
|
153
|
-
Owned by the tool registry as a reserved transport outside filterable capability layers under `mode:
|
|
153
|
+
Owned by the tool registry as a reserved transport outside filterable capability layers under `mode: ptc` / `mode: both` (see the PTC mode Agent Note). Under `ptc` it is the registry's only wire contribution; the other visible capabilities are declared in a generated SDK section in the loaded runtime's language, and a program calls them through bindings scheduled under the native concurrency contract (submission-ordered starts and policy; concurrency-safe bodies overlap up to `maxParallelSubCalls`) that re-enter the complete guarded tool pipeline and link each nested execution to this outer result.
|
|
154
154
|
|
|
155
155
|
<a id="deepseek-aidsh-plan-mode"></a>
|
|
156
156
|
|
|
@@ -570,6 +570,7 @@ Custom editing tool for viewing, creating and editing files
|
|
|
570
570
|
* If `path` is a file, `view` displays the result of applying `cat -n`. If `path` is a directory, `view` lists non-hidden files and directories up to 2 levels deep
|
|
571
571
|
* The `create` command cannot be used if the specified `path` already exists as a file
|
|
572
572
|
* If a `command` generates a long output, it will be truncated and marked with `<response clipped>`
|
|
573
|
+
* A null placeholder for a parameter unused by the selected command is treated as omitted. Required parameters still need values; omit `str_replace.new_str` rather than setting it to null when deleting a match
|
|
573
574
|
|
|
574
575
|
Notes for using the `str_replace` command:
|
|
575
576
|
* The `old_str` parameter should match EXACTLY one or more consecutive lines from the original file. Be mindful of whitespaces!
|
|
@@ -595,27 +596,62 @@ Notes for using the `str_replace` command:
|
|
|
595
596
|
"description": "Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`."
|
|
596
597
|
},
|
|
597
598
|
"file_text": {
|
|
598
|
-
"
|
|
599
|
-
|
|
599
|
+
"oneOf": [
|
|
600
|
+
{
|
|
601
|
+
"type": "string"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"type": "null"
|
|
605
|
+
}
|
|
606
|
+
],
|
|
607
|
+
"description": "Required string parameter of `create` command, with the content of the file to be created. A null placeholder is treated as omitted by commands that do not use this parameter."
|
|
600
608
|
},
|
|
601
609
|
"insert_line": {
|
|
602
|
-
"
|
|
603
|
-
|
|
610
|
+
"oneOf": [
|
|
611
|
+
{
|
|
612
|
+
"type": "integer"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"type": "null"
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
"description": "Required integer parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`. A null placeholder is treated as omitted by commands that do not use this parameter."
|
|
604
619
|
},
|
|
605
620
|
"new_str": {
|
|
606
|
-
"
|
|
607
|
-
|
|
621
|
+
"oneOf": [
|
|
622
|
+
{
|
|
623
|
+
"type": "string"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"type": "null"
|
|
627
|
+
}
|
|
628
|
+
],
|
|
629
|
+
"description": "Optional string parameter of `str_replace` command containing the new string (if omitted, no string will be added). Required string parameter of `insert` command containing the string to insert. A null placeholder is accepted only by commands that do not use this parameter."
|
|
608
630
|
},
|
|
609
631
|
"old_str": {
|
|
610
|
-
"
|
|
611
|
-
|
|
632
|
+
"oneOf": [
|
|
633
|
+
{
|
|
634
|
+
"type": "string"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"type": "null"
|
|
638
|
+
}
|
|
639
|
+
],
|
|
640
|
+
"description": "Required string parameter of `str_replace` command containing the string in `path` to replace. A null placeholder is treated as omitted by commands that do not use this parameter."
|
|
612
641
|
},
|
|
613
642
|
"view_range": {
|
|
614
|
-
"
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
643
|
+
"oneOf": [
|
|
644
|
+
{
|
|
645
|
+
"type": "array",
|
|
646
|
+
"items": {
|
|
647
|
+
"type": "integer"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"type": "null"
|
|
652
|
+
}
|
|
653
|
+
],
|
|
654
|
+
"description": "Optional parameter of `view` command when `path` points to a file. If omitted or null, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file."
|
|
619
655
|
}
|
|
620
656
|
},
|
|
621
657
|
"required": [
|
|
@@ -1505,6 +1541,28 @@ The five read-only tools hide provider cursors and authorize every result from t
|
|
|
1505
1541
|
|
|
1506
1542
|
## `@deepseek-ai/dsh-tool-subagent`
|
|
1507
1543
|
|
|
1544
|
+
### `list_subagent_models`
|
|
1545
|
+
|
|
1546
|
+
Discover LLM routes for subagents without changing the current Agent. Call with no arguments to list registered providers, with `provider` to list its advertised models, or with `provider` and `model` to inspect that exact model and its reasoning efforts. Catalog membership is advisory: an adapter may accept an unlisted model id. Use the returned ids with a delegation tool's `provider`, `model`, and `reasoning_effort` fields.
|
|
1547
|
+
|
|
1548
|
+
```json
|
|
1549
|
+
{
|
|
1550
|
+
"type": "object",
|
|
1551
|
+
"properties": {
|
|
1552
|
+
"provider": {
|
|
1553
|
+
"type": "string",
|
|
1554
|
+
"description": "Registered LLM provider id. Omit to list providers."
|
|
1555
|
+
},
|
|
1556
|
+
"model": {
|
|
1557
|
+
"type": "string",
|
|
1558
|
+
"description": "Exact model id to inspect. Requires provider; omit to list that provider's advertised models."
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
```
|
|
1563
|
+
|
|
1564
|
+
Source: [`packages/subagent/tool-subagent/src/list-models.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent/src/list-models.ts)
|
|
1565
|
+
|
|
1508
1566
|
### `subagent`
|
|
1509
1567
|
|
|
1510
1568
|
Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. Give it a complete, standalone prompt: it does not see this conversation. This call waits for the result by default. Set `run_in_background: true` to return a job id; collect with `job_output` and stop with `job_kill`.
|
|
@@ -1535,7 +1593,7 @@ Delegate a self-contained task to a subagent (a separate agent that works in its
|
|
|
1535
1593
|
|
|
1536
1594
|
Source: [`packages/subagent/tool-subagent/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent/src/index.ts)
|
|
1537
1595
|
|
|
1538
|
-
The registered
|
|
1596
|
+
The registered delegation name is the load-time `toolName` config (default `subagent`); the default schema above has model selection off, while the discovery schema is shown as the fixed companion available in an enabled Session. Web presets sample the Plugins preference for each new top-level Session and preserve that decision for its child Sessions; `subagent_fork` remains fixed-route. Each instance independently controls whether it reads model-selection settings and its background behavior through `modelSelectionSettings`, `backgroundMode`, and `enableRunInBackground`.
|
|
1539
1597
|
|
|
1540
1598
|
<a id="deepseek-aidsh-tool-subagent-control"></a>
|
|
1541
1599
|
|
|
@@ -61,6 +61,6 @@ flowchart TD
|
|
|
61
61
|
allResults --> context
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Filesystem read-before-edit checks stay below `tool-fs` on `fs/*` events. Generic pre/post waterfalls host hooks and approval policy; `ctx.approval` resolves asks before monotonic guards, and owner policy that must not be reordered remains a registered guard. Around-dispatch concerns such as timeouts wrap `tools/execute`. The registry losslessly snapshots the candidate result and normalizes a snapshot failure before the visible definition's snapshotted `finalizeContent` callback enforces its synchronous content-only invariant. `tools/result` then observes the immutable, lossless-JSON outcome. This lets hooks span tool families without coupling the tools to one policy service.
|
|
64
|
+
Filesystem read-before-edit checks stay below `tool-fs` on `fs/*` events. Generic pre/post waterfalls host hooks and approval policy; `ctx.approval` resolves asks before monotonic guards, and owner policy that must not be reordered remains a registered guard. Around-dispatch concerns such as timeouts wrap `tools/execute`. The registry losslessly snapshots the candidate result and normalizes a snapshot failure before the visible definition's snapshotted `finalizeContent` callback enforces its synchronous content-only invariant. `tools/result` then observes the immutable, lossless-JSON outcome. This lets hooks span tool families without coupling the tools to one policy service. PTC mode sends both the reserved `run_code` transport and its serialized sub-calls through the pipeline; sub-calls carry the parent token, log `tool/code-dispatch`, return denials as binding rejections, and omit `additionalContexts` to preserve call/result adjacency.
|
|
65
65
|
|
|
66
66
|
Maintenance mode: curated Mermaid flow; exact tool schemas and event signatures live in generated catalogs.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
editSource: "docs/user/guide/github-review.zh.md"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 通过 GitHub Webhook 创建评审会话
|
|
6
|
+
|
|
7
|
+
此可选 overlay 会为 `dsh web` 增加一个签名 GitHub 端点。当已配置仓库中的 pull request 从 draft 变为 ready for review 时,规则会在该仓库的 Web Workspace 下创建带标题的根 Session,并启动只读评审提示词。
|
|
8
|
+
|
|
9
|
+
## 前置条件
|
|
10
|
+
|
|
11
|
+
- 一个可由 DSH 注册为 Web Workspace 的本地 checkout。
|
|
12
|
+
- 一个可通过 `DSH_GITHUB_WEBHOOK_SECRET` 凭据引用访问的高熵 GitHub webhook 密钥。
|
|
13
|
+
- 一个可以把单个公共 URL 转发到 loopback 监听器的 TLS 反向代理或 tunnel。
|
|
14
|
+
- GitHub webhook 订阅 Pull requests 事件,且 content type 为 `application/json`。
|
|
15
|
+
|
|
16
|
+
overlay 默认使用启动目录作为 Workspace,并监听 `127.0.0.1:3081`。可通过 `DSH_GITHUB_REVIEW_WORKSPACE` 与 `DSH_GITHUB_WEBHOOK_PORT` 覆盖它们。
|
|
17
|
+
|
|
18
|
+
## 启动 DSH
|
|
19
|
+
|
|
20
|
+
生成密钥,并在重启后继续使用同一值:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
export DSH_GITHUB_WEBHOOK_SECRET="$(openssl rand -hex 32)"
|
|
24
|
+
printf '%s\n' "$DSH_GITHUB_WEBHOOK_SECRET"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
在开发 checkout 中运行:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
export DSH_GITHUB_REVIEW_WORKSPACE=/path/to/deepseek-harness
|
|
31
|
+
pnpm dsh web --patch apps/cli/config/examples/github-review/cordis.yml
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
安装版 DSH 通过绝对路径使用同一 overlay:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
dsh web --patch /absolute/path/to/github-review/cordis.yml
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
对于永久 profile,把 `github-ready-review-rule.mjs` 放在 `$DSH_HOME/profiles/web/cordis.patch.yml` 旁边,把 `cordis.yml` 中的行追加到该 patch,然后运行 `dsh web`。随附 CLI 已经包含两个 webhook 包;只需 overlay 即可激活它们。
|
|
41
|
+
|
|
42
|
+
## 暴露专用端点
|
|
43
|
+
|
|
44
|
+
主 Web UI 与 `/api` 继续位于端口 3080。overlay 会在隔离 realm 中挂载第二个 WebServer;其中只注册 `POST /github`,其他路径均返回 `404`。
|
|
45
|
+
|
|
46
|
+
Caddy 配置可以只暴露该监听器:
|
|
47
|
+
|
|
48
|
+
```caddyfile
|
|
49
|
+
hooks.example.com {
|
|
50
|
+
route {
|
|
51
|
+
@github path /github
|
|
52
|
+
reverse_proxy @github 127.0.0.1:3081
|
|
53
|
+
respond 404
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
GitHub 配置如下:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
Payload URL: https://hooks.example.com/github
|
|
62
|
+
Content type: application/json
|
|
63
|
+
Secret: DSH_GITHUB_WEBHOOK_SECRET value
|
|
64
|
+
Events: Pull requests
|
|
65
|
+
Active: yes
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## 规则行为
|
|
69
|
+
|
|
70
|
+
规则只接受来源 `primary-github`、仓库 `deepseek-harness/deepseek-harness`、事件 `pull_request` 与动作 `ready_for_review`。它会把精确 head SHA 和选定 PR 字段传给评审提示词,把 JSON 标为不受信任的元数据,并禁止修改文件、分支、PR 或 GitHub 状态。
|
|
71
|
+
|
|
72
|
+
Session 请求选择 `standard` agent preset 与 `read-only` permission preset。`workspacePath` 通过 `WorkspaceRegistry.create()` 规范化,因此第一次匹配交付会在 Workspace 不存在时创建它,后续交付会复用它。
|
|
73
|
+
|
|
74
|
+
HTTP 响应刻意弱于 Agent 结果:`202` 表示签名与 JSON 已被接受,规则调用已在内存中调度。它不表示此规则已经匹配,也不表示已创建 Session。
|
|
75
|
+
|
|
76
|
+
## 程序化扩展
|
|
77
|
+
|
|
78
|
+
`run()` 是普通受信任 JavaScript。部署可以在返回 Session 请求前查询内部策略服务:
|
|
79
|
+
|
|
80
|
+
```js
|
|
81
|
+
const response = await fetch('https://policy.internal/pr-review', {
|
|
82
|
+
method: 'POST',
|
|
83
|
+
headers: { 'content-type': 'application/json' },
|
|
84
|
+
body: JSON.stringify({ repository: payload.repository.full_name }),
|
|
85
|
+
signal,
|
|
86
|
+
})
|
|
87
|
+
if (!response.ok || (await response.json()).automaticReview !== true) return null
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
它还可以把仓库映射到不同本地路径:
|
|
91
|
+
|
|
92
|
+
```js
|
|
93
|
+
const workspacePath = {
|
|
94
|
+
'deepseek-harness/deepseek-harness': '/path/to/deepseek-harness',
|
|
95
|
+
'deepseek-harness/dsh-sdk': '/path/to/dsh-sdk',
|
|
96
|
+
}[payload.repository.full_name]
|
|
97
|
+
if (workspacePath === undefined) return null
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 交付语义
|
|
101
|
+
|
|
102
|
+
webhook runtime 不存储交付或执行状态。重复交付会运行规则,并可能创建另一个 Session。崩溃会丢失尚未接纳提示词的规则调用。提示词接纳后,工作由普通 Session 日志、persistence、Workspace 与 Agent 生命周期拥有。
|
|
103
|
+
|
|
104
|
+
webhook 密钥只验证入站 GitHub 数据。它不会向规则代码或所创建 Agent 授予出站 GitHub 访问权;规则或 Agent 需要时应单独配置该权限。
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
editSource: "docs/user/guide/mcp-memory.zh.md"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 连接第三方记忆 MCP 服务
|
|
6
|
+
|
|
7
|
+
这三份**默认关闭的参考配置**通过 [`@deepseek-ai/dsh-mcp-client`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/mcp/mcp-client/README.zh.md) 将一个记忆系统连接到 DSH。请选择其中一份,或复制相同的通用 MCP 配置项来连接其他服务器。
|
|
8
|
+
|
|
9
|
+
这些第三方配置仅作为互操作参考;收录不代表 DeepSeek 的认可、推荐、合作关系或持续支持承诺。
|
|
10
|
+
|
|
11
|
+
## DSH 负责什么
|
|
12
|
+
|
|
13
|
+
DSH 解析选中的 Cordis overlay,启动已配置的 stdio 命令或连接已配置的 Streamable HTTP URL,发现 MCP 工具,并以 `mcp__<serverName>__<tool>` 的形式公开这些工具。DSH **不负责** 下载服务器、初始化其数据库、选择模型或 embedding 提供方、创建云端账户、迁移提供方数据,也不监管独立的 HTTP 服务。对于 stdio,通用客户端会随 DSH 插件生命周期启动和停止子进程;对于 HTTP,上游服务必须已经运行。
|
|
14
|
+
|
|
15
|
+
stdio 桥接器在启动子进程前会主动移除环境中名称通常表示凭据的变量和所有 `DSH_*` 变量;其余环境变量仍会继承。每份示例仅添加其基线所需的覆盖项。如果某个可选的上游功能还需要其他密钥,请将该变量添加到配置项的 `config.env`,不要把密钥直接写进 YAML。
|
|
16
|
+
|
|
17
|
+
## 选择一个
|
|
18
|
+
|
|
19
|
+
| 系统 | 已测试版本 | 传输方式 | 上游前置条件 |
|
|
20
|
+
|---|---:|---|---|
|
|
21
|
+
| [Memorix](https://github.com/AVIDS2/memorix) | `memorix@1.3.0`(`500792cad3144142293bfbb20acb4841c9f7fcfa`) | stdio | Node 22.18+,并执行 `npm install --global memorix@1.3.0` |
|
|
22
|
+
| [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` |
|
|
23
|
+
| [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`,或安装匹配的发布版二进制文件 |
|
|
24
|
+
|
|
25
|
+
## 启用一个
|
|
26
|
+
|
|
27
|
+
将一份 overlay 传给 DSH:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/memorix.cordis.yml"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
请将文件名替换为 `mcp-reference-memory.cordis.yml` 或 `engram.cordis.yml`。该路径可以指向磁盘任意位置的一份复制文件。交付组合不包含任何记忆服务器,因此不传 `--patch` 就会让这三项全部保持关闭。
|
|
34
|
+
|
|
35
|
+
如果要跨次运行保留所选配置,请将对应文件中的单个 `insert` patch 合并到用户 patch 层:只对一个 profile 生效则写入 `$DSH_HOME/profiles/<name>/cordis.patch.yml`,对本机所有 profile 生效则写入 `$DSH_HOME/cordis.patch.yml`。不要覆盖已有文件,其中可能已经包含无关的用户 patch。
|
|
36
|
+
|
|
37
|
+
## 提供方设置
|
|
38
|
+
|
|
39
|
+
### Memorix
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npm install --global memorix@1.3.0
|
|
43
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/memorix.cordis.yml"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Memorix 无需 LLM(大语言模型)或 embedding 服务,即可在本地启发式模式下运行。请在 Memorix 自己的 `~/.memorix/config.toml` 或项目 `memorix.toml` 中配置可选提供方。该示例沿用 DSH 工作目录中的 Git 项目标识,并使用 Memorix 自身的默认目录 `~/.memorix/data`。若要覆盖该目录,请在启动 DSH 前设置 `MEMORIX_DATA_DIR`。
|
|
47
|
+
|
|
48
|
+
### MCP Reference Memory
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npm install --global @modelcontextprotocol/server-memory@2026.7.4
|
|
52
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/mcp-reference-memory.cordis.yml"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
该参考服务器存储本地知识图谱,并公开实体、关系、观察、读取、搜索和打开工具。它不需要模型或 embedding 服务。该示例将 JSONL 存储在 `$HOME/.dsh-mcp-reference-memory.jsonl`,而不是已安装的 npm 包目录中。若要覆盖该路径,请在启动 DSH 前设置 `MEMORY_FILE_PATH`。
|
|
56
|
+
|
|
57
|
+
搜索只对实体名称、类型和观察进行不区分大小写的子字符串匹配,不是语义检索。该服务器不提供 embedding、自动摘要、冲突消解或遗忘策略。
|
|
58
|
+
|
|
59
|
+
### Engram
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
go install github.com/Gentleman-Programming/engram/cmd/engram@v1.20.0
|
|
63
|
+
dsh web --patch "$PWD/apps/cli/config/examples/mcp-memory/engram.cordis.yml"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Engram 负责存储和项目选择:它默认使用 `~/.engram`,从 DSH 工作目录检测 Git 项目,并接受 `ENGRAM_DATA_DIR` 或 `ENGRAM_PROJECT` 作为环境覆盖项。
|
|
67
|
+
|
|
68
|
+
## 可选的共用模型指令
|
|
69
|
+
|
|
70
|
+
如果服务器的工具描述无法可靠触发记忆使用,请将以下简短、与提供方无关的指令添加到你现有的模型指令中:
|
|
71
|
+
|
|
72
|
+
> 用户要求记住某事时调用记忆写入工具;历史信息可能相关时,检索记忆并使用相关结果。
|
|
73
|
+
|
|
74
|
+
这只是附加指导。示例不会替换 DSH 系统提示词中的 persona。
|
|
75
|
+
|
|
76
|
+
## 验证写入、新会话召回和使用
|
|
77
|
+
|
|
78
|
+
请在整个过程中使用一个唯一值,并保持提供方的存储范围不变:
|
|
79
|
+
|
|
80
|
+
1. 在 DSH 会话 A 中提出:`Remember that my validation drink is lapsang-<unique suffix>.`。确认模型调用了提供方的写入工具,并且工具返回成功。
|
|
81
|
+
2. 在同一个仍在运行的 Host 中创建 DSH 会话 B。不要复制会话 A 的对话。提出:`What is my validation drink? Check memory.`。确认模型调用了提供方的搜索或召回工具,并返回该值。
|
|
82
|
+
3. 继续在会话 B 中提出:`Use that preference to suggest one drink for the meeting.`。确认回答使用了召回的值。
|
|
83
|
+
|
|
84
|
+
必须新建 DSH 会话,但不需要重启 Host。MCP 子进程崩溃后会触发带退避的自动重连与工具重新同步;停机期间工具仍保持列出,调用只在停机期间失败;重连预算耗尽后工具会被注销,重连停止,直到重新加载或重启。初始发现过程是异步的,因此发送第一条验证提示词前,请等待提供方的 `mcp__...` 工具出现。
|
|
85
|
+
|
|
86
|
+
## 接入其他 MCP 服务器
|
|
87
|
+
|
|
88
|
+
复制相同的条目字段,并使用唯一的 `id` 和 `serverName`:
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
- insert:
|
|
92
|
+
- id: memory-my-server
|
|
93
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
94
|
+
config:
|
|
95
|
+
serverName: my-memory
|
|
96
|
+
transport: stdio
|
|
97
|
+
command: my-memory-mcp
|
|
98
|
+
args: []
|
|
99
|
+
env: {}
|
|
100
|
+
cwd: !!js process.cwd()
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
对于远程服务器,请改用 `transport: streamable-http`、`url` 和 `headers`。提供方专属的安装、身份、认证、模型、embedding、持久化和许可仍由提供方负责。
|