dsh-plugin-dev-kb 1.0.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.en.md +6 -6
- package/README.md +6 -6
- package/kb/INDEX.md +21 -5
- package/kb/README.md +11 -10
- package/kb/extra/AGENTS.md +4 -4
- package/kb/extra/cookbook/adding-a-remote-api.md +197 -0
- package/kb/extra/cookbook/adding-a-remote-api.zh.md +197 -0
- 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 +163 -0
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +163 -0
- package/kb/extra/development.md +8 -14
- package/kb/extra/development.zh.md +8 -14
- package/kb/extra/event-producer-consumer.md +55 -48
- package/kb/extra/event-producer-consumer.zh.md +58 -51
- 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/i18n/style-samples.md +2 -2
- package/kb/extra/module-graph.md +646 -926
- package/kb/extra/module-graph.zh.md +648 -928
- 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 +28 -4
- package/kb/extra/subsystems/agent-team.zh.md +28 -4
- package/kb/extra/subsystems/attachment.md +168 -7
- package/kb/extra/subsystems/attachment.zh.md +168 -7
- package/kb/extra/subsystems/extensions.md +18 -0
- package/kb/extra/subsystems/extensions.zh.md +18 -0
- package/kb/extra/subsystems/feedback.md +4 -4
- package/kb/extra/subsystems/feedback.zh.md +4 -4
- 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 +15 -10
- package/kb/extra/testing.zh.md +13 -8
- package/kb/extra/web-styling.md +4 -0
- package/kb/extra/web-styling.zh.md +4 -0
- package/kb/meta/search-index.json +309 -177
- package/kb/meta/site-pages.txt +183 -167
- 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 +5 -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 +4 -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 +5 -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 +4 -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/network-proxy.md +87 -0
- package/kb/site/en/guide/providers.md +70 -17
- package/kb/site/en/guide/python-sdk.md +80 -34
- package/kb/site/en/guide/schedule.md +23 -0
- package/kb/site/en/reference/agent-lifecycle.md +6 -4
- package/kb/{extra → site/en/reference}/api-gateway.md +12 -10
- package/kb/site/en/reference/capability-seams.md +128 -73
- package/kb/site/en/reference/config-catalog.md +481 -360
- package/kb/site/en/reference/cookbook/adding-a-package.md +3 -4
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +12 -10
- 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 +20 -17
- 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 +30 -11
- package/kb/site/en/reference/persistence-catalog.md +148 -80
- 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 +10 -6
- package/kb/site/en/reference/subsystems/commands.md +25 -16
- package/kb/site/en/reference/subsystems/compaction.md +11 -11
- package/kb/site/en/reference/{cookbook/adding-a-conversation-node.md → subsystems/conversation.md} +50 -24
- package/kb/site/en/reference/subsystems/core.md +156 -17
- package/kb/site/en/reference/subsystems/credentials.md +44 -3
- package/kb/site/en/reference/subsystems/filesystem.md +12 -2
- package/kb/site/en/reference/subsystems/goal.md +1 -1
- package/kb/site/en/reference/subsystems/index.md +7 -2
- package/kb/site/en/reference/subsystems/jobs.md +1 -1
- package/kb/site/en/reference/subsystems/llm-streaming.md +154 -12
- package/kb/site/en/reference/subsystems/permission-presets.md +6 -6
- package/kb/site/en/reference/subsystems/persistence.md +185 -175
- package/kb/site/en/reference/subsystems/plan.md +2 -2
- package/kb/site/en/reference/subsystems/sandbox.md +2 -0
- package/kb/site/en/reference/subsystems/schedule.md +9 -3
- package/kb/site/en/reference/subsystems/session-projection.md +115 -48
- package/kb/site/en/reference/subsystems/session-query.md +28 -14
- package/kb/site/en/reference/subsystems/session-reference.md +53 -8
- package/kb/site/en/reference/subsystems/session-telemetry.md +8 -8
- package/kb/site/en/reference/subsystems/session-title.md +6 -6
- package/kb/site/en/reference/subsystems/session.md +401 -99
- package/kb/site/en/reference/subsystems/settings.md +101 -6
- package/kb/site/en/reference/subsystems/skills.md +23 -0
- package/kb/site/en/reference/subsystems/slots.md +178 -0
- package/kb/site/en/reference/subsystems/spill.md +2 -2
- package/kb/site/en/reference/subsystems/storage.md +34 -3
- package/kb/site/en/reference/subsystems/subagent.md +122 -109
- package/kb/site/en/reference/subsystems/system-prompt.md +17 -4
- package/kb/site/en/reference/subsystems/token-meter.md +27 -12
- package/kb/site/en/reference/subsystems/tools.md +39 -39
- package/kb/site/en/reference/subsystems/typert.md +62 -55
- 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 +102 -9
- package/kb/site/en/reference/tool-catalog.md +86 -82
- 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/network-proxy.md +87 -0
- package/kb/site/guide/providers.md +70 -17
- package/kb/site/guide/python-sdk.md +87 -41
- package/kb/site/guide/schedule.md +23 -0
- package/kb/site/reference/agent-lifecycle.md +6 -4
- package/kb/{extra/api-gateway.zh.md → site/reference/api-gateway.md} +12 -10
- package/kb/site/reference/capability-seams.md +128 -73
- package/kb/site/reference/config-catalog.md +481 -360
- package/kb/site/reference/cookbook/adding-a-package.md +3 -4
- package/kb/site/reference/cookbook/adding-a-settings-card.md +12 -10
- 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 +20 -17
- 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 +30 -11
- package/kb/site/reference/persistence-catalog.md +148 -80
- 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 +10 -6
- package/kb/site/reference/subsystems/commands.md +25 -16
- package/kb/site/reference/subsystems/compaction.md +11 -11
- package/kb/site/reference/{cookbook/adding-a-conversation-node.md → subsystems/conversation.md} +50 -24
- package/kb/site/reference/subsystems/core.md +156 -17
- package/kb/site/reference/subsystems/credentials.md +44 -3
- package/kb/site/reference/subsystems/filesystem.md +12 -2
- package/kb/site/reference/subsystems/goal.md +1 -1
- package/kb/site/reference/subsystems/index.md +7 -2
- package/kb/site/reference/subsystems/jobs.md +1 -1
- package/kb/site/reference/subsystems/llm-streaming.md +154 -12
- package/kb/site/reference/subsystems/permission-presets.md +5 -5
- package/kb/site/reference/subsystems/persistence.md +184 -174
- package/kb/site/reference/subsystems/plan.md +2 -2
- package/kb/site/reference/subsystems/schedule.md +9 -3
- package/kb/site/reference/subsystems/session-projection.md +115 -48
- package/kb/site/reference/subsystems/session-query.md +28 -14
- package/kb/site/reference/subsystems/session-reference.md +53 -8
- package/kb/site/reference/subsystems/session-telemetry.md +8 -8
- package/kb/site/reference/subsystems/session-title.md +6 -6
- package/kb/site/reference/subsystems/session.md +401 -99
- package/kb/site/reference/subsystems/settings.md +101 -6
- package/kb/site/reference/subsystems/skills.md +23 -0
- package/kb/site/reference/subsystems/slots.md +178 -0
- package/kb/site/reference/subsystems/spill.md +2 -2
- package/kb/site/reference/subsystems/storage.md +34 -3
- package/kb/site/reference/subsystems/subagent.md +122 -109
- package/kb/site/reference/subsystems/system-prompt.md +17 -4
- package/kb/site/reference/subsystems/token-meter.md +27 -12
- package/kb/site/reference/subsystems/tools.md +39 -39
- package/kb/site/reference/subsystems/typert.md +62 -55
- 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 +102 -9
- package/kb/site/reference/tool-catalog.md +85 -81
- package/kb/site/reference/tool-execution-pipeline.md +1 -1
- package/package.json +2 -2
- package/skills/dsh-plugin-dev-kb.md +8 -6
|
@@ -43,7 +43,7 @@ interface Workspace {
|
|
|
43
43
|
*/
|
|
44
44
|
readonly path: string
|
|
45
45
|
|
|
46
|
-
/** Display title. Defaults to
|
|
46
|
+
/** Display title. Defaults to the final path segment, or a filesystem root's own spelling; duplicates are allowed. */
|
|
47
47
|
readonly title: string
|
|
48
48
|
|
|
49
49
|
/** ISO-8601 creation instant, stamped at create and never rewritten. */
|
|
@@ -120,13 +120,13 @@ interface Workspace {
|
|
|
120
120
|
|
|
121
121
|
## 注册表:`ctx.workspaceRegistry`
|
|
122
122
|
|
|
123
|
-
`WorkspaceRegistry`([签名](#ctxworkspaceregistry--workspaceregistry))拥有注册与解析。`create(path, title?)`
|
|
123
|
+
`WorkspaceRegistry`([签名](#ctxworkspaceregistry--workspaceregistry))拥有注册与解析。`create(path, title?)` 要求完全限定路径并将其规范化,拒绝不存在的路径(原样传出原始 `ENOENT`)或非目录;当规范路径已被拥有时原样返回既有实体;否则创建一条标题为 `title ?? defaultWorkspaceTitle(path)` 的记录并前插到持久的注册表顺序中(不同规范路径可以共享同一显示标题,没有最终路径段时使用根路径拼写)。`get(id)` 与有序的 `list()` 是同步缓存读取;`resolveByPath(path)` 应用同一套完全限定 realpath 规范但不创建。`delete(id)` 只移除注册记录、顺序条目和会话账本——目录、用户文件、实时会话和已持久化日志一概不动,因此这些会话变为 Ungrouped([决策](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/implemented/feature/2026-07-27-workspace-registration-deletion.zh.md));未知 id 返回 `false`。create 与 delete 会在其两次写入(记录 + 顺序)可能分叉之前先持久写入一个待定变更标记;启动时恰好解决被标记的那次变更——通过删除被标记的表行:这会补完被中断的 delete,并回滚被中断的 create(注册可以重建,因此回滚是安全方向)——而没有标记的顺序/表不一致则作为损坏大声失败。
|
|
124
124
|
|
|
125
125
|
会话的 cwd 在创建时由创建者赋予,而不是由本注册表赋予——API 网关从所选工作区的 `path` 解析新会话的 cwd(回退到显式或默认 cwd),先创建会话使 cwd 落入其不可变的 [`SessionHeader`](./persistence.md#sessionheader--metadata-beside-the-log),再调用 `attachSession`,后者会把已存储的 header cwd 与工作区路径重新校验一遍。首次成功启动时,注册表仅凭已持久化的 header(`id`、`cwd`、`createdAt`——绝不读事件正文)引导历史:把规范 cwd 有效的会话按目录分组为工作区,最新的排在最前;「已初始化」标记最后写入,因此被中断的引导可以安全续跑。引导只发生这一次:没有 cwd 的历史遗留会话保持 Ungrouped,此后创建的会话只能通过 `attachSession` 加入工作区。
|
|
126
126
|
|
|
127
127
|
## 消费方
|
|
128
128
|
|
|
129
|
-
[dsh-
|
|
129
|
+
[`dsh-workspace-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/workspace-controller) 经 `ctx.workspaceRegistry` 向 GUI 客户端提供工作区 CRUD,[`dsh-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller) 执行上文「先建会话再 attach」的流程。[dsh-agent-instructions](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/context/agent-instructions) 尽管名字如此,却**不是**消费方:它在 agent 自己的 cwd 下发现 AGENTS.md 风格的指令文件,从不触碰 `ctx.workspaceRegistry`——两者共用的这个词指的是用户的工作目录,而非本注册表的实体。
|
|
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`
|
|
@@ -160,13 +253,13 @@ Durable workspace registry. Startup waits for `sessionPersistence`, builds one c
|
|
|
160
253
|
|
|
161
254
|
```ts cordis-catalog
|
|
162
255
|
/**
|
|
163
|
-
* Create or reuse a workspace for an existing directory. The
|
|
164
|
-
* canonicalized through `fs.realpath`; a nonexistent
|
|
165
|
-
*
|
|
166
|
-
*
|
|
256
|
+
* Create or reuse a workspace for an existing directory. The fully qualified
|
|
257
|
+
* path is canonicalized through `fs.realpath`; a relative, nonexistent, or
|
|
258
|
+
* non-directory path rejects. Repeated calls for the same canonical path
|
|
259
|
+
* return the existing entity without changing its title.
|
|
167
260
|
* A newly created workspace is prepended to the durable registry order.
|
|
168
261
|
* Different canonical paths may share a display title.
|
|
169
|
-
* @param path - Existing directory to own, in
|
|
262
|
+
* @param path - Existing directory to own, in a fully qualified path spelling.
|
|
170
263
|
* @param title - Display title used only when a new record is created.
|
|
171
264
|
* @returns the existing or newly durable workspace.
|
|
172
265
|
*/
|
|
@@ -219,7 +312,7 @@ archiveSession(sessionId: SessionId): Promise<void>
|
|
|
219
312
|
* Resolve by canonical directory path without creating or mutating a
|
|
220
313
|
* workspace. A missing path rejects during `realpath`; an existing unowned
|
|
221
314
|
* directory returns `undefined`.
|
|
222
|
-
* @param path - Existing directory path in
|
|
315
|
+
* @param path - Existing directory path in a fully qualified spelling.
|
|
223
316
|
* @returns the workspace owning the canonical path, when one exists.
|
|
224
317
|
*/
|
|
225
318
|
async resolveByPath(path: string): Promise<Workspace | undefined>
|
|
@@ -22,7 +22,7 @@ editSource: "docs/tool-catalog.zh.md"
|
|
|
22
22
|
| 工具包 | 模型可见名称 | 依赖 | 写入/影响 | 随产品发布的别名 | 部署说明 |
|
|
23
23
|
| --- | --- | --- | --- | --- | --- |
|
|
24
24
|
| `@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 会暂停工具调用,直到当前 UI 提供方返回人类答案。 |
|
|
25
|
-
| `@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` | - | 在 `mode:
|
|
25
|
+
| `@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` | - | 在 `mode: ptc`/`mode: both` 下,它由工具注册表所有,作为可过滤能力层之外的保留传输机制(参见 PTC mode Agent Note)。在 `ptc` 下,它是注册表对协议格式(wire format)的唯一贡献;其他可见能力在使用已加载运行时语言生成的 SDK 章节中声明。程序通过 binding 调用这些能力,调用按照原生并发约定调度:启动顺序和策略遵循提交顺序,并发安全的函数体最多重叠执行 `maxParallelSubCalls` 个。调用会重新进入完整且受守卫保护的工具流水线,并将每个嵌套执行关联到此外层结果。 |
|
|
26
26
|
| `@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 仍保留在面向模型的 schema 中,这样状态转换不会在规划策略变更之外额外造成工具目录变动。其执行路径会拒绝规划模式之外的调用;在规划模式下,它通过用户交互 seam 提交计划(批准/根据反馈继续规划),批准后会在步骤边界记录规划模式已停用。 |
|
|
27
27
|
| `@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` | - | bash 工具是 bash 执行器 seam 面向模型的消费方。使用 `run_in_background` 的运行会注册到通用 `ctx.jobs` 运行时,并通过 `job_*` 工具(来自 `@deepseek-ai/dsh-tool-jobs`)收集/停止;禁用 `enableRunInBackground` 配置(默认为 true)后,该参数会被完全移除。 |
|
|
28
28
|
| `@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` | - | pwsh 工具是 Windows 组合中 bash 执行器 seam 的 PowerShell 方言消费方(由 `@deepseek-ai/dsh-pwsh-local` 等 PowerShell 执行器为 `ctx.shell` 提供后端);除沙箱接口外,它逐项对应 bash 工具调用。使用 `run_in_background` 的运行会注册到通用 `ctx.jobs` 运行时,并通过 `job_*` 工具收集/停止;托管的 `DSH_*` 环境来自 `@deepseek-ai/dsh-shell-env`。每次调用都在新进程中运行,不使用持久 PTY 会话。路径采用原生 `C:\...` 形式,变量采用 `$env:NAME`。 |
|
|
@@ -39,11 +39,10 @@ editSource: "docs/tool-catalog.zh.md"
|
|
|
39
39
|
| `@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` | - | 固定的前台工作流会在每个 Round 启动一个全新的结构化子级;模型只能选择不可变目标和可选的 Round 上限。 |
|
|
40
40
|
| `@deepseek-ai/dsh-tool-skill` | `skill` | `ctx.tools`、`ctx.agents`、`ctx.skills` | `tool/call`、`tool/result`、`user/message replacement catalogs via agent.inject()` | - | - |
|
|
41
41
|
| `@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` | - | 这 5 个只读工具会隐藏提供方游标,并根据不可变的调用 agent 会话为每个结果授权。该包需要选择启用;需要强制截止时间或限制行内输出的组合还会挂载通用超时或 spill 策略。 |
|
|
42
|
-
| `@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` |
|
|
42
|
+
| `@deepseek-ai/dsh-tool-subagent` | `list_subagent_models`、`subagent` | `ctx.tools`、`ctx.subagents`、`ctx.systemPrompt`、`用于模型发现和所选路由校验的 ctx.llm` | `tool/call`、`tool/result`、`child session events through the chosen provider` | `subagent`、`subagent_fork` | 注册的委派工具名称取决于加载时 `toolName` 配置(默认为 `subagent`);上述默认 schema 关闭模型选择,而发现 schema 则展示为已启用 Session 中可用的固定配套工具。Web preset 会在每个新顶层 Session 创建时读取插件页偏好,并为其子 Session 保留该决定;`subagent_fork` 始终使用固定路由。每个实例通过 `modelSelectionSettings`、`backgroundMode` 与 `enableRunInBackground` 独立控制是否读取模型选择设置及其后台行为。 |
|
|
43
43
|
| `@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` | - | 这些是控制可继续后台 subagent 的全局命名工具:绑定提供方的 `tool-subagent` 实例注册不同的委派工具;本包注册一次 `send_message` 和 `interrupt_agent`,另由 `list_agents` 通过单独加载的 `/list-agents` 插件提供,其目录行使用 sessionProjections 和实时 Agent 注册表。 |
|
|
44
|
-
| `@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` | - | 按可继续的进程内子级注册,而非全局注册,因此该 schema 仅在这种子级内部可见,并且不受其全局 `toolFilter` 影响。同一份贡献还会安装子级作用域的 `tool:report` 系统提示词 section,本目录不渲染该 section。面向父级的 `send_message` 工具单独安装。 |
|
|
45
44
|
| `@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` | - | 与任务种类无关的后台任务控制器:后台 bash 命令、PTY 发送和 subagent 都通过相同的 3 个工具读取、列出和终止。加载该插件会挂接控制器,从而启用生产方的 `ctx.jobs.start()`。 |
|
|
46
|
-
| `@deepseek-ai/dsh-experimental-tool-agent-team` | `
|
|
45
|
+
| `@deepseek-ai/dsh-experimental-tool-agent-team` | `interrupt_agent`、`list_agents`、`send_message`、`spawn_teammate`、`team_task_create`、`team_task_get`、`team_task_list`、`team_task_update`、`wait_agent` | `ctx.tools`、`ctx.systemPrompt`、`ctx.agentTeams`、`an exact live Team member Agent` | `tool/call`、`team/member`、`team/message/queued`、`team/message/delivered`、`team/task`、`tool/result` | - | 这 9 个工具限定于隐式 Team Lead 与持久 teammate 作用域。随产品发布的 dsh-base bundle 默认禁用该包;文档中的 Agent Teams profile patch 会启用它,并禁用旧 continuable child 的同名控制工具。 |
|
|
47
46
|
| `@deepseek-ai/dsh-tool-todo` | `todo_write` | `ctx.tools`、`owning Agent session` | `tool/call`、`todo/write`、`tool/result` | - | todo_write 是会话所有的状态;UI 将最新的 todo/write 事件渲染为检查清单。`allowParallelInProgress` 是没有默认值的必填项,因此本目录明确选择 `true`,对应描述允许同时存在多个 `in_progress` 项。选择 `false` 的部署会获得同一工具,但描述会要求只能有 1 个活动任务。 |
|
|
48
47
|
| `@deepseek-ai/dsh-tool-workflow` | `workflow` | `ctx.tools`、`ctx.workflowEngine`、`ctx.systemPrompt`、`a calling Agent (exec.agent parents the script children)` | `tool/call`、`tool/result` | - | - |
|
|
49
48
|
| `@deepseek-ai/dsh-tool-web` | `web_fetch`、`web_search` | `ctx.tools`、`ctx.web`、`ctx.systemPrompt` | `tool/call`、`tool/result` | - | web_search 和 web_fetch 将提供方选择置于 ctx.web 之后,使模型可见 schema 在更换后端时保持稳定。 |
|
|
@@ -150,9 +149,9 @@ ask_user_question 会暂停工具调用,直到当前 UI 提供方返回人类
|
|
|
150
149
|
}
|
|
151
150
|
```
|
|
152
151
|
|
|
153
|
-
来源:[`packages/core/tools/src/
|
|
152
|
+
来源:[`packages/core/tools/src/ptc.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/ptc.ts)
|
|
154
153
|
|
|
155
|
-
在 `mode:
|
|
154
|
+
在 `mode: ptc`/`mode: both` 下,它由工具注册表所有,作为可过滤能力层之外的保留传输机制(参见 PTC mode Agent Note)。在 `ptc` 下,它是注册表对协议格式的唯一贡献;其他可见能力在使用已加载运行时语言生成的 SDK 章节中声明。程序通过 binding 调用这些能力,调用按照原生并发约定调度:启动顺序和策略遵循提交顺序,并发安全的函数体最多重叠执行 `maxParallelSubCalls` 个。调用会重新进入完整且受守卫保护的工具流水线,并将每个嵌套执行关联到此外层结果。
|
|
156
155
|
|
|
157
156
|
<a id="deepseek-aidsh-plan-mode"></a>
|
|
158
157
|
|
|
@@ -573,6 +572,7 @@ pwsh 工具是 Windows 组合中 bash 执行器 seam 的 PowerShell 方言消费
|
|
|
573
572
|
* 如果 `path` 是文件,`view` 会显示应用 `cat -n` 后的结果。如果 `path` 是目录,`view` 会列出最多向下 2 层的非隐藏文件和目录
|
|
574
573
|
* 如果指定的 `create` 命令目标 `path` 已作为文件存在,则不能使用该命令
|
|
575
574
|
* 如果 `command` 产生较长输出,输出会被截断并标记为 `<response clipped>`
|
|
575
|
+
* 当前命令不使用某个参数时,值为 `null` 的占位参数视为未提供。必填参数仍须提供值;删除匹配内容时应省略 `str_replace.new_str`,而不是将其设为 `null`
|
|
576
576
|
|
|
577
577
|
使用 `str_replace` 命令时请注意:
|
|
578
578
|
|
|
@@ -599,27 +599,62 @@ pwsh 工具是 Windows 组合中 bash 执行器 seam 的 PowerShell 方言消费
|
|
|
599
599
|
"description": "Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`."
|
|
600
600
|
},
|
|
601
601
|
"file_text": {
|
|
602
|
-
"
|
|
603
|
-
|
|
602
|
+
"oneOf": [
|
|
603
|
+
{
|
|
604
|
+
"type": "string"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"type": "null"
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
"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."
|
|
604
611
|
},
|
|
605
612
|
"insert_line": {
|
|
606
|
-
"
|
|
607
|
-
|
|
613
|
+
"oneOf": [
|
|
614
|
+
{
|
|
615
|
+
"type": "integer"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"type": "null"
|
|
619
|
+
}
|
|
620
|
+
],
|
|
621
|
+
"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."
|
|
608
622
|
},
|
|
609
623
|
"new_str": {
|
|
610
|
-
"
|
|
611
|
-
|
|
624
|
+
"oneOf": [
|
|
625
|
+
{
|
|
626
|
+
"type": "string"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"type": "null"
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
"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."
|
|
612
633
|
},
|
|
613
634
|
"old_str": {
|
|
614
|
-
"
|
|
615
|
-
|
|
635
|
+
"oneOf": [
|
|
636
|
+
{
|
|
637
|
+
"type": "string"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"type": "null"
|
|
641
|
+
}
|
|
642
|
+
],
|
|
643
|
+
"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."
|
|
616
644
|
},
|
|
617
645
|
"view_range": {
|
|
618
|
-
"
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
646
|
+
"oneOf": [
|
|
647
|
+
{
|
|
648
|
+
"type": "array",
|
|
649
|
+
"items": {
|
|
650
|
+
"type": "integer"
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"type": "null"
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
"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."
|
|
623
658
|
}
|
|
624
659
|
},
|
|
625
660
|
"required": [
|
|
@@ -703,7 +738,7 @@ pwsh 工具是 Windows 组合中 bash 执行器 seam 的 PowerShell 方言消费
|
|
|
703
738
|
|
|
704
739
|
### `read_image`
|
|
705
740
|
|
|
706
|
-
读取 PNG/JPEG/WebP/GIF
|
|
741
|
+
读取 PNG/JPEG/WebP/GIF 文件并返回图像本身。无扩展名的路径同样被接受;格式按文件内容检测,因此规范化附件路径可以直接传入,无需复制或重命名。Harness 会在下一次模型请求前校验并缩小受支持的大图,因此仅为查看图片时应直接使用此工具,无需安装图片库或创建缩略图。可以用小批次并发读取彼此独立的文件。要求当前模型接受图像输入。
|
|
707
742
|
|
|
708
743
|
```json
|
|
709
744
|
{
|
|
@@ -1509,6 +1544,28 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
|
|
|
1509
1544
|
|
|
1510
1545
|
## `@deepseek-ai/dsh-tool-subagent`
|
|
1511
1546
|
|
|
1547
|
+
### `list_subagent_models`
|
|
1548
|
+
|
|
1549
|
+
发现 subagent 可用的 LLM 路由,不更改当前 Agent。无参数调用会列出已注册提供方;提供 `provider` 时会列出其公布的模型;同时提供 `provider` 和 `model` 时会检查该精确模型及其推理强度。目录条目只提供建议:adapter 可能接受未列出的模型 id。把返回的 id 用于委派工具的 `provider`、`model` 与 `reasoning_effort` 字段。
|
|
1550
|
+
|
|
1551
|
+
```json
|
|
1552
|
+
{
|
|
1553
|
+
"type": "object",
|
|
1554
|
+
"properties": {
|
|
1555
|
+
"provider": {
|
|
1556
|
+
"type": "string",
|
|
1557
|
+
"description": "Registered LLM provider id. Omit to list providers."
|
|
1558
|
+
},
|
|
1559
|
+
"model": {
|
|
1560
|
+
"type": "string",
|
|
1561
|
+
"description": "Exact model id to inspect. Requires provider; omit to list that provider's advertised models."
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
```
|
|
1566
|
+
|
|
1567
|
+
来源:[`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)
|
|
1568
|
+
|
|
1512
1569
|
### `subagent`
|
|
1513
1570
|
|
|
1514
1571
|
将一项自包含任务委派给 subagent(在自身上下文中工作的独立 agent),用它卸载聚焦且独立的工作,例如研究、限定范围的实现或分析,以免消耗当前对话的上下文。subagent 会返回结果,但不会返回中间步骤。请提供完整、独立的提示词,因为它看不到当前对话。此调用默认等待结果。设置 `run_in_background: true` 可返回 job id;使用 `job_output` 收集结果,使用 `job_kill` 停止任务。
|
|
@@ -1539,7 +1596,7 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
|
|
|
1539
1596
|
|
|
1540
1597
|
来源:[`packages/subagent/tool-subagent/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent/src/index.ts)
|
|
1541
1598
|
|
|
1542
|
-
|
|
1599
|
+
注册的委派工具名称取决于加载时 `toolName` 配置(默认为 `subagent`);上述默认 schema 关闭模型选择,而发现 schema 则展示为已启用 Session 中可用的固定配套工具。Web preset 会在每个新顶层 Session 创建时读取插件页偏好,并为其子 Session 保留该决定;`subagent_fork` 始终使用固定路由。每个实例通过 `modelSelectionSettings`、`backgroundMode` 与 `enableRunInBackground` 独立控制是否读取模型选择设置及其后台行为。
|
|
1543
1600
|
|
|
1544
1601
|
<a id="deepseek-aidsh-tool-subagent-control"></a>
|
|
1545
1602
|
|
|
@@ -1568,7 +1625,7 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
|
|
|
1568
1625
|
|
|
1569
1626
|
### `list_agents`
|
|
1570
1627
|
|
|
1571
|
-
按持久 id 和标签列出你的可继续后台 subagent。用它回忆你启动过哪些 subagent,而不是轮询完成情况——subagent 完成时你会被告知。状态来自实时注册表:running 表示 agent 此刻正在工作;idle 表示已加载但处于轮次之间,可能正在等待它启动的 agent;ready 表示它只存在于存储中——可恢复而非终态,也不表示有结果等待收集;`send_message`
|
|
1628
|
+
按持久 id 和标签列出你的可继续后台 subagent。用它回忆你启动过哪些 subagent,而不是轮询完成情况——subagent 完成时你会被告知。状态来自实时注册表:running 表示 agent 此刻正在工作;idle 表示已加载但处于轮次之间,可能正在等待它启动的 agent;ready 表示它只存在于存储中——可恢复而非终态,也不表示有结果等待收集;`send_message` 会在运行中 child 的最近 step 边界 steer 消息,或为 idle、ready child 启动轮次,且无论处于哪种状态,直接子级都仍可作为 `send_message` 的目标。该快照并非投递承诺;`send_message` 会执行权威检查,仍可能失败。无法读取的子级会作为诊断信息报告,而不会被静默丢弃。`descendants` 作用域会按稳定的前序顺序遍历你下方的整棵树,并为每个条目标注其持久的直接父会话 id 和深度。只有深度为 1 的条目可以使用 `send_message`;更深的条目只能作为 `interrupt_agent` 的候选目标。
|
|
1572
1629
|
|
|
1573
1630
|
```json
|
|
1574
1631
|
{
|
|
@@ -1590,23 +1647,23 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
|
|
|
1590
1647
|
|
|
1591
1648
|
### `send_message`
|
|
1592
1649
|
|
|
1593
|
-
根据
|
|
1650
|
+
根据 agent id 向直接可继续 child 发送消息。如果你是驻留的可继续 child,也可以把自己的直接 parent 作为目标。如果目标仍在工作,消息会 steer 其最近的 step;如果目标处于 idle,消息会启动一个轮次。此调用不会返回该 agent 的答案,只会确认消息已投递。调用失败表示消息**未**投递。
|
|
1594
1651
|
|
|
1595
1652
|
```json
|
|
1596
1653
|
{
|
|
1597
1654
|
"type": "object",
|
|
1598
1655
|
"properties": {
|
|
1599
|
-
"
|
|
1656
|
+
"agent_id": {
|
|
1600
1657
|
"type": "string",
|
|
1601
|
-
"description": "The
|
|
1658
|
+
"description": "The agent id of your direct continuable child, or your direct parent when you are a resident continuable child."
|
|
1602
1659
|
},
|
|
1603
1660
|
"message": {
|
|
1604
1661
|
"type": "string",
|
|
1605
|
-
"description": "The message to deliver to the
|
|
1662
|
+
"description": "The message to deliver to the agent."
|
|
1606
1663
|
}
|
|
1607
1664
|
},
|
|
1608
1665
|
"required": [
|
|
1609
|
-
"
|
|
1666
|
+
"agent_id",
|
|
1610
1667
|
"message"
|
|
1611
1668
|
]
|
|
1612
1669
|
}
|
|
@@ -1616,33 +1673,6 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
|
|
|
1616
1673
|
|
|
1617
1674
|
这些是控制可继续后台 subagent 的全局命名工具:绑定提供方的 `tool-subagent` 实例注册不同的委派工具;本包注册一次 `send_message` 和 `interrupt_agent`,另由 `list_agents` 通过单独加载的 `/list-agents` 插件提供,其目录行使用 sessionProjections 和实时 Agent 注册表。
|
|
1618
1675
|
|
|
1619
|
-
<a id="deepseek-aidsh-tool-subagent-report"></a>
|
|
1620
|
-
|
|
1621
|
-
## `@deepseek-ai/dsh-tool-subagent-report`
|
|
1622
|
-
|
|
1623
|
-
### `report`
|
|
1624
|
-
|
|
1625
|
-
向启动你的 agent 报告选定内容。在你结束前调用一次,给出自包含的最终结果;当进度或发现会改变该 agent 接下来的行动时,也可以更早调用。该 agent 与你共享工作区,但不会自动收到你的 transcript(文本记录)、工具输出或推理,因此完成你的工作本身并不等于交出结果。报告不会结束你的轮次或完成你的工作,且只有直接父级会收到。失败的调用仍可能已经送达,因此不要盲目重复。
|
|
1626
|
-
|
|
1627
|
-
```json
|
|
1628
|
-
{
|
|
1629
|
-
"type": "object",
|
|
1630
|
-
"properties": {
|
|
1631
|
-
"output": {
|
|
1632
|
-
"type": "string",
|
|
1633
|
-
"description": "Actionable content for your parent; summarize conclusions and reference relevant shared paths."
|
|
1634
|
-
}
|
|
1635
|
-
},
|
|
1636
|
-
"required": [
|
|
1637
|
-
"output"
|
|
1638
|
-
]
|
|
1639
|
-
}
|
|
1640
|
-
```
|
|
1641
|
-
|
|
1642
|
-
来源:[`packages/subagent/tool-subagent-report/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent-report/src/index.ts)
|
|
1643
|
-
|
|
1644
|
-
按可继续的进程内子级注册,而非全局注册,因此该 schema 仅在这种子级内部可见,并且不受其全局 `toolFilter` 影响。同一份贡献还会安装子级作用域的 `tool:report` 系统提示词 section,本目录不渲染该 section。面向父级的 `send_message` 工具单独安装。
|
|
1645
|
-
|
|
1646
1676
|
<a id="deepseek-aidsh-tool-jobs"></a>
|
|
1647
1677
|
|
|
1648
1678
|
## `@deepseek-ai/dsh-tool-jobs`
|
|
@@ -1720,32 +1750,6 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
|
|
|
1720
1750
|
|
|
1721
1751
|
## `@deepseek-ai/dsh-experimental-tool-agent-team`
|
|
1722
1752
|
|
|
1723
|
-
### `followup_task`
|
|
1724
|
-
|
|
1725
|
-
向另一名 Team member 发送持久 follow-up task,并在需要时启动一个 turn。
|
|
1726
|
-
|
|
1727
|
-
```json
|
|
1728
|
-
{
|
|
1729
|
-
"type": "object",
|
|
1730
|
-
"properties": {
|
|
1731
|
-
"target": {
|
|
1732
|
-
"type": "string",
|
|
1733
|
-
"description": "Team member name, or lead."
|
|
1734
|
-
},
|
|
1735
|
-
"message": {
|
|
1736
|
-
"type": "string",
|
|
1737
|
-
"description": "Self-contained message for the target."
|
|
1738
|
-
}
|
|
1739
|
-
},
|
|
1740
|
-
"required": [
|
|
1741
|
-
"target",
|
|
1742
|
-
"message"
|
|
1743
|
-
]
|
|
1744
|
-
}
|
|
1745
|
-
```
|
|
1746
|
-
|
|
1747
|
-
来源:[`packages/experimental/tool-agent-team/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/tool-agent-team/src/index.ts)
|
|
1748
|
-
|
|
1749
1753
|
### `interrupt_agent`
|
|
1750
1754
|
|
|
1751
1755
|
中断一名 teammate 的当前 turn,同时保留其待处理 inbox。仅 Team Lead 可用。
|
|
@@ -1782,7 +1786,7 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
|
|
|
1782
1786
|
|
|
1783
1787
|
### `send_message`
|
|
1784
1788
|
|
|
1785
|
-
向另一名 Team member
|
|
1789
|
+
向另一名 Team member 发送一条持久消息。running target 会在最近的步骤边界收到消息;idle target 会启动一个 turn;inactive teammate 会冷恢复。
|
|
1786
1790
|
|
|
1787
1791
|
```json
|
|
1788
1792
|
{
|
|
@@ -61,6 +61,6 @@ flowchart TD
|
|
|
61
61
|
allResults --> context
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
文件系统的先读后编辑检查位于 `tool-fs` 之下,通过 `fs/*` 事件实现。通用的前置/后置 waterfall 承载钩子与审批策略;`ctx.approval` 在单调守卫之前处理询问,而不得重新排序的所有者策略仍作为已注册的守卫。超时等环绕分发关注点对 `tools/execute` 进行包装。注册表会对候选结果进行无损快照;如果快照失败,则会先将失败规范化,之后再由可见定义中已随快照固定的 `finalizeContent` 回调强制执行其同步且仅限内容的不变式。随后,`tools/result` 会观察不可变、可由 JSON 无损表示的结果。这样一来,钩子便可跨越不同工具系列,而无需让工具与某个策略服务耦合。
|
|
64
|
+
文件系统的先读后编辑检查位于 `tool-fs` 之下,通过 `fs/*` 事件实现。通用的前置/后置 waterfall 承载钩子与审批策略;`ctx.approval` 在单调守卫之前处理询问,而不得重新排序的所有者策略仍作为已注册的守卫。超时等环绕分发关注点对 `tools/execute` 进行包装。注册表会对候选结果进行无损快照;如果快照失败,则会先将失败规范化,之后再由可见定义中已随快照固定的 `finalizeContent` 回调强制执行其同步且仅限内容的不变式。随后,`tools/result` 会观察不可变、可由 JSON 无损表示的结果。这样一来,钩子便可跨越不同工具系列,而无需让工具与某个策略服务耦合。PTC mode 会将保留的 `run_code` 传输及其序列化子调用都送入流水线;子调用携带父级 token、记录 `tool/code-dispatch`、将拒绝呈现为具有约束力的驳回,并省略 `additionalContexts`,以保持调用与结果相邻。
|
|
65
65
|
|
|
66
66
|
维护模式:英文源文件包含人工维护的 Mermaid 流程图,并由生成器写出;本中文文件作为经评审对侧通过双语配对维护。确切的工具 schema 与事件签名位于生成的目录中。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-dev-kb",
|
|
3
|
-
"description": "dsh 插件开发知识库:DeepSeek Harness 官方文档站完整 Markdown 镜像(中英双语
|
|
4
|
-
"version": "1.0
|
|
3
|
+
"description": "dsh 插件开发知识库:DeepSeek Harness 官方文档站完整 Markdown 镜像(中英双语 184 页)+ 58 篇仓库补充开发参考 + 主题导航与 245 文件全量搜索索引;以 dsh-plugin-dev-kb 技能让 agent 在插件开发任务中自动加载定位文档。纯数据插件,零运行时依赖。",
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -16,18 +16,18 @@ whenToUse: 开发 dsh 插件、查询 dsh 能力与 API、写 Tool、配置 cord
|
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
kb/
|
|
19
|
-
├── site/
|
|
20
|
-
│ ├── guide/ 入门:quickstart / providers / python-sdk
|
|
19
|
+
├── site/ 线上站点完整镜像(中英双语 184 页,优先读这里)
|
|
20
|
+
│ ├── guide/ 入门:quickstart / providers / python-sdk / github-review / schedule / mcp-memory / network-proxy
|
|
21
21
|
│ ├── develop/ basic(第一个插件/tool/config/publish)、framework(生命周期/服务/事件)、
|
|
22
|
-
│ │ practice(能力分层/LLM
|
|
22
|
+
│ │ practice(能力分层/LLM适配器/动态装配)、cordis-tutorial(7章)
|
|
23
23
|
│ ├── reference/ index(架构)、cordis-primer、capability-seams、agent-lifecycle、
|
|
24
|
-
│ │ config-catalog、tool-catalog、cordis-api/(6)、cookbook/(
|
|
24
|
+
│ │ config-catalog、tool-catalog、api-gateway、cordis-api/(6)、cookbook/(5)、subsystems/(46)
|
|
25
25
|
│ └── en/ 英文站镜像(结构与中文站一致)
|
|
26
|
-
├── extra/
|
|
26
|
+
├── extra/ 仓库内未发布到站点的补充文档(58 篇):glossary、defensive-patterns、
|
|
27
27
|
│ module-graph、testing、postmortem/(4)、i18n/、cookbook 与 subsystems 扩展
|
|
28
28
|
├── meta/
|
|
29
29
|
│ ├── topics.md ★ 主题导航:任务场景 → 要读的文件(先用这个)
|
|
30
|
-
│ ├── search-index.json 全量检索索引(
|
|
30
|
+
│ ├── search-index.json 全量检索索引(245 文件:path/url/title/字符数)
|
|
31
31
|
│ ├── source.json 来源信息(commit/时间/统计)
|
|
32
32
|
│ └── site-pages.txt 线上站点页面清单
|
|
33
33
|
├── INDEX.md 全部 站点 URL ↔ 本地文件 对照
|
|
@@ -59,6 +59,8 @@ kb/
|
|
|
59
59
|
| 打包发布 | `site/develop/basic/publish.md` |
|
|
60
60
|
| LLM 适配器 | `site/develop/practice/llm-adapter.md` |
|
|
61
61
|
| 能力扩展 | `site/develop/practice/index.md` + `site/reference/capability-seams.md` |
|
|
62
|
+
| 动态装配 Cordis | `site/develop/practice/dynamic-cordis.md` |
|
|
63
|
+
| API Gateway / Remote 方法 | `site/reference/api-gateway.md` |
|
|
62
64
|
| 子系统能力 | `site/reference/subsystems/index.md` → 对应子系统页 |
|
|
63
65
|
|
|
64
66
|
## 5. 更新知识库
|