dsh-plugin-dev-kb 1.0.9 → 1.3.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 +26 -0
- package/README.en.md +14 -8
- package/README.md +14 -8
- package/docs/banner.svg +25 -0
- package/kb/INDEX.md +8 -2
- package/kb/README.md +4 -4
- package/kb/extra/AGENTS.md +3 -3
- 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-session-format-version.md +109 -0
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +109 -0
- package/kb/extra/cookbook/adding-a-vendored-package.md +1 -1
- package/kb/extra/cookbook/adding-a-vendored-package.zh.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/kb/extra/deepseek-llm-api-wire-extensions.md +19 -15
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +19 -15
- package/kb/extra/development.md +13 -3
- package/kb/extra/development.zh.md +13 -3
- package/kb/extra/event-producer-consumer.md +49 -46
- package/kb/extra/event-producer-consumer.zh.md +52 -49
- package/kb/extra/i18n/README.md +2 -1
- package/kb/extra/i18n/README.zh.md +3 -2
- package/kb/extra/i18n/style-samples.md +2 -2
- package/kb/extra/i18n/translation-prompt.md +1 -1
- package/kb/extra/module-graph.md +493 -1002
- package/kb/extra/module-graph.zh.md +495 -1004
- package/kb/extra/rescope.md +1 -1
- package/kb/extra/rescope.zh.md +1 -1
- package/kb/extra/session-format-status.md +47 -0
- package/kb/extra/session-format-status.zh.md +47 -0
- package/kb/extra/subsystems/agent-team.md +3 -2
- package/kb/extra/subsystems/agent-team.zh.md +3 -2
- package/kb/extra/subsystems/attachment.md +157 -4
- package/kb/extra/subsystems/attachment.zh.md +157 -4
- package/kb/extra/subsystems/feedback.md +164 -30
- package/kb/extra/subsystems/feedback.zh.md +164 -30
- package/kb/extra/testing.md +9 -4
- package/kb/extra/testing.zh.md +9 -4
- package/kb/extra/web-styling.md +5 -0
- package/kb/extra/web-styling.zh.md +5 -0
- package/kb/meta/search-index.json +223 -151
- package/kb/meta/site-pages.txt +187 -181
- package/kb/meta/source.json +5 -5
- package/kb/meta/topics.md +5 -5
- package/kb/site/develop/basic/publish.md +1 -1
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +3 -2
- package/kb/site/develop/practice/llm-adapter.md +4 -3
- package/kb/site/en/develop/basic/publish.md +1 -1
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +3 -2
- package/kb/site/en/develop/practice/llm-adapter.md +4 -3
- 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 +19 -3
- package/kb/site/en/guide/schedule.md +2 -0
- package/kb/site/en/reference/agent-lifecycle.md +17 -8
- package/kb/site/en/reference/api-gateway.md +2 -2
- package/kb/site/en/reference/capability-seams.md +24 -10
- package/kb/site/en/reference/config-catalog.md +322 -264
- package/kb/site/en/reference/cookbook/adding-a-package.md +1 -2
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +10 -8
- package/kb/site/en/reference/cookbook/adding-a-tool.md +1 -1
- package/kb/site/en/reference/cookbook/extension-cookbook.md +16 -13
- package/kb/site/en/reference/index.md +26 -9
- package/kb/site/en/reference/persistence-catalog.md +189 -95
- package/kb/site/en/reference/subsystems/approval.md +1 -1
- package/kb/site/en/reference/subsystems/client-modules.md +9 -0
- package/kb/site/en/reference/subsystems/client-resources.md +94 -0
- package/kb/site/en/reference/subsystems/code-runtime.md +7 -3
- package/kb/site/en/reference/subsystems/commands.md +25 -16
- package/kb/site/en/reference/subsystems/compaction.md +10 -10
- package/kb/site/en/reference/subsystems/conversation.md +11 -4
- package/kb/site/en/reference/subsystems/core.md +173 -29
- package/kb/site/en/reference/subsystems/credentials.md +5 -4
- package/kb/site/en/reference/subsystems/filesystem.md +15 -0
- package/kb/site/en/reference/subsystems/goal.md +38 -2
- package/kb/site/en/reference/subsystems/index.md +3 -1
- package/kb/site/en/reference/subsystems/invariants.md +1 -1
- package/kb/site/en/reference/subsystems/llm-streaming.md +43 -12
- package/kb/site/en/reference/subsystems/lsp.md +1 -1
- package/kb/site/en/reference/subsystems/permission-presets.md +5 -5
- package/kb/site/en/reference/subsystems/persistence.md +211 -199
- package/kb/site/en/reference/subsystems/plan.md +3 -3
- 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/scope.md +1 -1
- package/kb/site/en/reference/subsystems/session-projection.md +50 -24
- package/kb/site/en/reference/subsystems/session-query.md +19 -13
- package/kb/site/en/reference/subsystems/session-reference.md +29 -1
- package/kb/site/en/reference/subsystems/session-telemetry.md +27 -10
- package/kb/site/en/reference/subsystems/session-title.md +6 -6
- package/kb/site/en/reference/subsystems/session.md +208 -103
- package/kb/site/en/reference/subsystems/settings.md +30 -12
- package/kb/site/en/reference/subsystems/shell.md +9 -6
- package/kb/site/en/reference/subsystems/sidebar-right.md +151 -0
- package/kb/site/en/reference/subsystems/skills.md +1 -1
- package/kb/site/en/reference/subsystems/slots.md +41 -32
- package/kb/site/en/reference/subsystems/spill.md +13 -6
- package/kb/site/en/reference/subsystems/storage.md +28 -5
- package/kb/site/en/reference/subsystems/subagent.md +58 -105
- package/kb/site/en/reference/subsystems/subprocess.md +25 -26
- package/kb/site/en/reference/subsystems/system-prompt.md +18 -3
- package/kb/site/en/reference/subsystems/token-meter.md +4 -3
- package/kb/site/en/reference/subsystems/tools.md +5 -5
- package/kb/site/en/reference/subsystems/typert.md +18 -18
- package/kb/site/en/reference/subsystems/web-client.md +1 -1
- package/kb/site/en/reference/subsystems/workspace.md +88 -9
- package/kb/site/en/reference/tool-catalog.md +56 -66
- package/kb/site/en/reference/tool-execution-pipeline.md +2 -2
- package/kb/site/guide/network-proxy.md +87 -0
- package/kb/site/guide/providers.md +70 -17
- package/kb/site/guide/python-sdk.md +19 -3
- package/kb/site/guide/schedule.md +2 -0
- package/kb/site/reference/agent-lifecycle.md +17 -8
- package/kb/site/reference/api-gateway.md +2 -2
- package/kb/site/reference/capability-seams.md +24 -10
- package/kb/site/reference/config-catalog.md +321 -263
- package/kb/site/reference/cookbook/adding-a-package.md +1 -2
- package/kb/site/reference/cookbook/adding-a-settings-card.md +10 -8
- package/kb/site/reference/cookbook/adding-a-tool.md +1 -1
- package/kb/site/reference/cookbook/extension-cookbook.md +16 -13
- package/kb/site/reference/index.md +26 -9
- package/kb/site/reference/persistence-catalog.md +190 -96
- package/kb/site/reference/subsystems/approval.md +1 -1
- package/kb/site/reference/subsystems/client-modules.md +9 -0
- package/kb/site/reference/subsystems/client-resources.md +94 -0
- package/kb/site/reference/subsystems/code-runtime.md +7 -3
- package/kb/site/reference/subsystems/commands.md +25 -16
- package/kb/site/reference/subsystems/compaction.md +10 -10
- package/kb/site/reference/subsystems/conversation.md +11 -4
- package/kb/site/reference/subsystems/core.md +173 -29
- package/kb/site/reference/subsystems/credentials.md +5 -4
- package/kb/site/reference/subsystems/filesystem.md +15 -0
- package/kb/site/reference/subsystems/goal.md +38 -2
- package/kb/site/reference/subsystems/index.md +14 -12
- package/kb/site/reference/subsystems/invariants.md +1 -1
- package/kb/site/reference/subsystems/llm-streaming.md +43 -12
- package/kb/site/reference/subsystems/lsp.md +1 -1
- package/kb/site/reference/subsystems/permission-presets.md +5 -5
- package/kb/site/reference/subsystems/persistence.md +210 -198
- package/kb/site/reference/subsystems/plan.md +3 -3
- package/kb/site/reference/subsystems/schedule.md +9 -3
- package/kb/site/reference/subsystems/scope.md +1 -1
- package/kb/site/reference/subsystems/session-projection.md +50 -24
- package/kb/site/reference/subsystems/session-query.md +19 -13
- package/kb/site/reference/subsystems/session-reference.md +29 -1
- package/kb/site/reference/subsystems/session-telemetry.md +27 -10
- package/kb/site/reference/subsystems/session-title.md +6 -6
- package/kb/site/reference/subsystems/session.md +208 -103
- package/kb/site/reference/subsystems/settings.md +30 -12
- package/kb/site/reference/subsystems/shell.md +9 -6
- package/kb/site/reference/subsystems/sidebar-right.md +151 -0
- package/kb/site/reference/subsystems/skills.md +1 -1
- package/kb/site/reference/subsystems/slots.md +41 -32
- package/kb/site/reference/subsystems/spill.md +13 -6
- package/kb/site/reference/subsystems/storage.md +28 -5
- package/kb/site/reference/subsystems/subagent.md +58 -105
- package/kb/site/reference/subsystems/subprocess.md +25 -26
- package/kb/site/reference/subsystems/system-prompt.md +18 -3
- package/kb/site/reference/subsystems/token-meter.md +4 -3
- package/kb/site/reference/subsystems/tools.md +5 -5
- package/kb/site/reference/subsystems/typert.md +18 -18
- package/kb/site/reference/subsystems/web-client.md +1 -1
- package/kb/site/reference/subsystems/workspace.md +88 -9
- package/kb/site/reference/tool-catalog.md +55 -65
- package/kb/site/reference/tool-execution-pipeline.md +2 -2
- package/lib/index.js +25 -44
- package/package.json +3 -2
- package/skills/dsh-plugin-dev-kb.md +4 -4
|
@@ -142,7 +142,7 @@ interface TypertRemoteNamespaceMap {}
|
|
|
142
142
|
|
|
143
143
|
## Host Gateway
|
|
144
144
|
|
|
145
|
-
Connection decodes its carrier envelope before calling `ctx.typertGateway`. The request carries exact named wire fields and the carrier's cancellation signal separately; infrastructure and boundary failures
|
|
145
|
+
Connection decodes its carrier envelope before calling `ctx.typertGateway`. The request carries exact named wire fields and the carrier's cancellation signal separately; infrastructure and boundary failures ride `TypertGatewayError`, whose `gateway/*` codes are ordinary `RemoteError` codes, so the RPC adapter passes every structurally identified `RemoteError` through with its code and details intact and folds only unrecognized exceptions into `gateway/internal`.
|
|
146
146
|
|
|
147
147
|
```ts type-equiv
|
|
148
148
|
/** One Remote method request after a carrier has decoded its envelope. */
|
|
@@ -161,23 +161,23 @@ interface InvokeRemoteRequest {
|
|
|
161
161
|
```ts type-equiv
|
|
162
162
|
/** Stable infrastructure and boundary failures emitted before or after business execution. */
|
|
163
163
|
type TypertGatewayErrorCode =
|
|
164
|
-
| 'ambiguous-endpoint'
|
|
165
|
-
| 'arguments-invalid'
|
|
166
|
-
| 'binding-invalid'
|
|
167
|
-
| 'context-failed'
|
|
168
|
-
| 'context-not-found'
|
|
169
|
-
| 'context-unavailable'
|
|
170
|
-
| 'definition-unavailable'
|
|
171
|
-
| 'input-invalid'
|
|
172
|
-
| 'invocation-unavailable'
|
|
173
|
-
| 'lookup-failed'
|
|
174
|
-
| 'lookup-not-found'
|
|
175
|
-
| 'lookup-unavailable'
|
|
176
|
-
| 'method-unavailable'
|
|
177
|
-
| 'provider-mismatch'
|
|
178
|
-
| 'result-invalid'
|
|
179
|
-
| 'service-unavailable'
|
|
180
|
-
| 'signature-invalid'
|
|
164
|
+
| 'gateway/ambiguous-endpoint'
|
|
165
|
+
| 'gateway/arguments-invalid'
|
|
166
|
+
| 'gateway/binding-invalid'
|
|
167
|
+
| 'gateway/context-failed'
|
|
168
|
+
| 'gateway/context-not-found'
|
|
169
|
+
| 'gateway/context-unavailable'
|
|
170
|
+
| 'gateway/definition-unavailable'
|
|
171
|
+
| 'gateway/input-invalid'
|
|
172
|
+
| 'gateway/invocation-unavailable'
|
|
173
|
+
| 'gateway/lookup-failed'
|
|
174
|
+
| 'gateway/lookup-not-found'
|
|
175
|
+
| 'gateway/lookup-unavailable'
|
|
176
|
+
| 'gateway/method-unavailable'
|
|
177
|
+
| 'gateway/provider-mismatch'
|
|
178
|
+
| 'gateway/result-invalid'
|
|
179
|
+
| 'gateway/service-unavailable'
|
|
180
|
+
| 'gateway/signature-invalid'
|
|
181
181
|
```
|
|
182
182
|
|
|
183
183
|
```ts type-equiv
|
|
@@ -58,7 +58,7 @@ This pairing is not a second source of business truth. Host controllers decide d
|
|
|
58
58
|
|
|
59
59
|
`ui-session` installs the `session` scope adapter and publishes `useSessions`, `useSession`, `sessionId`, and `useProjection`. Domain adapters add further standard sources without putting React hooks on the model objects.
|
|
60
60
|
|
|
61
|
-
`ui-conversation` binds once to each `SessionBinding.eventSource`. Its event registry correlates
|
|
61
|
+
`ui-conversation` binds once to each `SessionBinding.eventSource`. Its event registry correlates durable Session events and Client-only `assistant/live-chunk` updates into stable business Contexts, and its view registry materializes target snapshots. Chat Assistant, Trajectory Assistant, and Turn Tail interpret both live chunks and the compact streams embedded in durable settlements, so reconnect and paged history reproduce the same Assistant state without durable token rows. `ui-chat` and `ui-trajectory` register separate Definitions and builders: they may interpret the same event family, but they do not import or share each other's final display model. The shell selects a registered view and passes its snapshot through standard hooks and Slots. [Conversation](./conversation.md) defines Context identity, replay, Location data, target builders, and keyed renderers.
|
|
62
62
|
|
|
63
63
|
`ui-slots` provides the typed registry and lifecycle ledger; `ui-renderer` is the only package that binds bare observables through `useSyncExternalStore`, owns React contexts, and renders the root tree. Feature components receive framework hooks, owner props, store actions, and explicit injection through their derived props. [Web Client Slots](./slots.md) lists those inputs, extension APIs, and the current Slot hierarchy.
|
|
64
64
|
|
|
@@ -5,7 +5,7 @@ outline: [2,3]
|
|
|
5
5
|
|
|
6
6
|
# Workspaces
|
|
7
7
|
|
|
8
|
-
A workspace is the persistent record of a directory the user works in: a stable id over a canonical path, a display title, and the ordered account of sessions that belong to it. The subsystem is one package ([dsh-workspace](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workspace/workspace), `ctx.workspaceRegistry`) — an optional host-side capability, not part of the agent-loop spine, and invisible to models (no tools, no prompt text, no session events). It stores its records through the [storage domain form](./storage.md) and validates session membership against [`SessionHeader.cwd`](./persistence.md#sessionheader--metadata-beside-the-log), so `storageDomain` and `sessionPersistence` are mandatory startup dependencies: an unavailable persistence peer leaves the plugin pending rather than being mistaken for an empty history. Design record: [domain KV storage Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/proposed/architecture/2026-07-24-domain-kv-storage-and-workspace.md); bootstrap and GUI ordering: [Workspace UI product-flow Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/
|
|
8
|
+
A workspace is the persistent record of a directory the user works in: a stable id over a canonical path, a display title, and the ordered account of sessions that belong to it. The subsystem is one package ([dsh-workspace](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workspace/workspace), `ctx.workspaceRegistry`) — an optional host-side capability, not part of the agent-loop spine, and invisible to models (no tools, no prompt text, no session events). It stores its records through the [storage domain form](./storage.md) and validates session membership against [`SessionHeader.cwd`](./persistence.md#sessionheader--metadata-beside-the-log), so `storageDomain` and `sessionPersistence` are mandatory startup dependencies: an unavailable persistence peer leaves the plugin pending rather than being mistaken for an empty history. Design record: [domain KV storage Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/proposed/architecture/2026-07-24-domain-kv-storage-and-workspace.md); bootstrap and GUI ordering: [Workspace UI product-flow Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/archived/feature/2026-07-25-workspace-ui-product-flow.md).
|
|
9
9
|
|
|
10
10
|
Source: [`packages/workspace/workspace/src/types.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/workspace/workspace/src/types.ts)
|
|
11
11
|
|
|
@@ -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,7 +120,7 @@ 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?)`
|
|
123
|
+
`WorkspaceRegistry` ([signatures](#ctxworkspaceregistry--workspaceregistry)) owns registration and resolution. `create(path, title?)` requires a fully qualified path, canonicalizes it, 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 ?? defaultWorkspaceTitle(path)` prepended to the durable registry order (different canonical paths may share a display title, and a path with no final segment uses its root spelling). `get(id)` and the ordered `list()` are synchronous cache reads; `resolveByPath(path)` applies the same fully qualified 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
|
|
|
@@ -245,6 +245,85 @@ Host service backing the generated `ctx.remote.workspace` namespace.
|
|
|
245
245
|
|
|
246
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
247
|
|
|
248
|
+
<a id="ctxworkspacefiles--workspacefiles"></a>
|
|
249
|
+
|
|
250
|
+
### `ctx.workspaceFiles` — `WorkspaceFiles`
|
|
251
|
+
|
|
252
|
+
Host Remote file reads and workspace directory observations over the composed filesystem.
|
|
253
|
+
|
|
254
|
+
```ts cordis-catalog
|
|
255
|
+
/**
|
|
256
|
+
* Read one page of lines from a UTF-8 file readable by the filesystem backend.
|
|
257
|
+
* @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
|
|
258
|
+
* @param path - absolute path or path relative to the workspace root; files outside it are allowed.
|
|
259
|
+
* @param range - the line window; omitted fields take the page defaults.
|
|
260
|
+
* @param signal - caller cancellation.
|
|
261
|
+
* @returns the page, the file's version at the stat before it, and whether it reaches the last line.
|
|
262
|
+
*/
|
|
263
|
+
@Remote async read( workspaceFileScope: WorkspaceFileScope, path: string, range: WorkspaceFileRange, signal: AbortSignal, ): Promise<WorkspaceFileText>
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Read one byte window of a regular file readable by the filesystem backend: raw
|
|
267
|
+
* bytes, no text decoding and no binary rejection.
|
|
268
|
+
* @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
|
|
269
|
+
* @param path - absolute path or path relative to the workspace root; files outside it are allowed.
|
|
270
|
+
* @param range - the byte window; omitted fields take the window defaults.
|
|
271
|
+
* @param signal - caller cancellation.
|
|
272
|
+
* @returns the window in base64, the file's version and size at the stat before it, and whether it reaches the last byte.
|
|
273
|
+
*/
|
|
274
|
+
@Remote async readBytes( workspaceFileScope: WorkspaceFileScope, path: string, range: WorkspaceByteRange, signal: AbortSignal, ): Promise<WorkspaceFileBytes>
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Read a complete regular file as bytes, subject to the configured full-file cap.
|
|
278
|
+
* @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
|
|
279
|
+
* @param path - absolute or workspace-relative file path.
|
|
280
|
+
* @param signal - caller cancellation.
|
|
281
|
+
* @returns one complete base64 window with offset zero and eof true; oversized files fail with too-large.
|
|
282
|
+
*/
|
|
283
|
+
@Remote async readAll(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): Promise<WorkspaceFileBytes>
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Read a complete file relative to another file's directory, including outside the workspace.
|
|
287
|
+
* @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
|
|
288
|
+
* @param path - base file, absolute or workspace-relative.
|
|
289
|
+
* @param relativePath - relative filesystem path, not a URL or absolute path.
|
|
290
|
+
* @param signal - caller cancellation.
|
|
291
|
+
* @returns the complete related file using the ordinary file-size and access checks.
|
|
292
|
+
*/
|
|
293
|
+
@Remote async readRelated( workspaceFileScope: WorkspaceFileScope, path: string, relativePath: string, signal: AbortSignal, ): Promise<WorkspaceFileBytes>
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Report one regular file's identity, version, and size without its content.
|
|
297
|
+
* @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
|
|
298
|
+
* @param path - absolute path or path relative to the workspace root; files outside it are allowed.
|
|
299
|
+
* @param signal - caller cancellation.
|
|
300
|
+
* @returns the file's absolute path, current version, and byte size.
|
|
301
|
+
*/
|
|
302
|
+
@Remote async stat(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): Promise<WorkspaceFileStat>
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* List the direct children of one directory inside the Session's workspace.
|
|
306
|
+
* @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
|
|
307
|
+
* @param path - workspace path, absolute or relative to the workspace root.
|
|
308
|
+
* @param signal - caller cancellation.
|
|
309
|
+
* @returns the directory's children in the backend's stable name order, bounded by the entry cap.
|
|
310
|
+
*/
|
|
311
|
+
@Remote async list(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): Promise<WorkspaceDirectoryListing>
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Stream every `fs/observed` observation of a file inside the Session's
|
|
315
|
+
* workspace. Only instrumented filesystem operations report here; the OS is
|
|
316
|
+
* not watched.
|
|
317
|
+
* @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.
|
|
318
|
+
* @param signal - generation cancellation.
|
|
319
|
+
* @returns `ready` once the Host observation queue is active and the workspace
|
|
320
|
+
* root is resolved, then queued and live observations in emission order.
|
|
321
|
+
*/
|
|
322
|
+
@Remote({ mode: 'stream' }) changes(workspaceFileScope: WorkspaceFileScope, signal: AbortSignal): AsyncIterable<WorkspaceFileWatchFrame>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Source: [`packages/api/workspace-files/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/workspace-files/src/index.ts)
|
|
326
|
+
|
|
248
327
|
<a id="ctxworkspaceregistry--workspaceregistry"></a>
|
|
249
328
|
|
|
250
329
|
### `ctx.workspaceRegistry` — `WorkspaceRegistry`
|
|
@@ -253,13 +332,13 @@ Durable workspace registry. Startup waits for `sessionPersistence`, builds one c
|
|
|
253
332
|
|
|
254
333
|
```ts cordis-catalog
|
|
255
334
|
/**
|
|
256
|
-
* Create or reuse a workspace for an existing directory. The
|
|
257
|
-
* canonicalized through `fs.realpath`; a nonexistent
|
|
258
|
-
*
|
|
259
|
-
*
|
|
335
|
+
* Create or reuse a workspace for an existing directory. The fully qualified
|
|
336
|
+
* path is canonicalized through `fs.realpath`; a relative, nonexistent, or
|
|
337
|
+
* non-directory path rejects. Repeated calls for the same canonical path
|
|
338
|
+
* return the existing entity without changing its title.
|
|
260
339
|
* A newly created workspace is prepended to the durable registry order.
|
|
261
340
|
* Different canonical paths may share a display title.
|
|
262
|
-
* @param path - Existing directory to own, in
|
|
341
|
+
* @param path - Existing directory to own, in a fully qualified path spelling.
|
|
263
342
|
* @param title - Display title used only when a new record is created.
|
|
264
343
|
* @returns the existing or newly durable workspace.
|
|
265
344
|
*/
|
|
@@ -312,7 +391,7 @@ archiveSession(sessionId: SessionId): Promise<void>
|
|
|
312
391
|
* Resolve by canonical directory path without creating or mutating a
|
|
313
392
|
* workspace. A missing path rejects during `realpath`; an existing unowned
|
|
314
393
|
* directory returns `undefined`.
|
|
315
|
-
* @param path - Existing directory path in
|
|
394
|
+
* @param path - Existing directory path in a fully qualified spelling.
|
|
316
395
|
* @returns the workspace owning the canonical path, when one exists.
|
|
317
396
|
*/
|
|
318
397
|
async resolveByPath(path: string): Promise<Workspace | undefined>
|
|
@@ -9,7 +9,7 @@ editSource: "docs/tool-catalog.md"
|
|
|
9
9
|
|
|
10
10
|
Every model-facing tool a shipped plugin contributes to `ctx.tools`: the `name`, `description`, and JSON-Schema `parameters` the model receives via the system-prompt assembly. It complements the [subsystem pages](./subsystems/core.md) (the types plus each page's generated Cordis API region) — this page is the *tools* the agent is offered.
|
|
11
11
|
|
|
12
|
-
This file is GENERATED and verified fresh by `pnpm run verify-tool-catalog` (part of `doc-sync`) — do not edit it by hand. Unlike the cordis catalog (a pure source-AST pass), this generator BOOTS each tool plugin on a real context and reads `ctx.tools.schemas()`, because a tool schema is not statically knowable (runtime-spread enums, concatenated descriptions, config-driven names, raw-JSON-Schema MCP tools). A completeness guard globs `packages/*/tool-*` and fails if any package is missing from the generator's boot manifest, so a new tool cannot be silently undocumented.
|
|
12
|
+
This file is GENERATED and verified fresh by `pnpm run verify-tool-catalog` (part of `doc-sync`) — do not edit it by hand. Unlike the cordis catalog (a pure source-AST pass), this generator BOOTS each tool plugin on a real context and reads `ctx.tools.schemas()`, because a tool schema is not statically knowable (runtime-spread enums, concatenated descriptions, config-driven names, raw-JSON-Schema MCP tools). A completeness guard globs `packages/*/tool-*` and fails if any package is missing from the generator's boot manifest, so a new tool cannot be silently undocumented.
|
|
13
13
|
|
|
14
14
|
Scope: shipped product tools under `packages/*/tool-*`, each booted with its DEFAULT config, except where a Config field is REQUIRED with no default — there the generator must choose, and the per-package note records which branch this page shows. The registered tool NAME can be a load-time config (e.g. `tool-subagent`'s `toolName`), so a deployment may expose a package under a different or additional name — a per-package note records those shipped aliases where they exist. The `examples/` demo tools (e.g. `echo`) are excluded, matching the cordis catalog's packages-only scope.
|
|
15
15
|
|
|
@@ -20,9 +20,10 @@ 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/
|
|
23
|
+
| `@deepseek-ai/dsh-tools` | `run_code` | `ctx.tools`, `ctx.codeRuntime (execution time)`, `ctx.systemPrompt` | `tool/call`, `one tool/ptc-dispatch-start + tool/ptc-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
|
+
| `@deepseek-ai/dsh-tool-present` | `present` | `ctx.tools`, `ctx.fs`, `ctx.sessionProjections` | `tool/call`, `deliverables/presented after a successful final result`, `tool/result` | - | Deliveries belong to the calling Session; Web ui-deliverables supplies source-file opening and cards. |
|
|
26
27
|
| `@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. |
|
|
27
28
|
| `@deepseek-ai/dsh-tool-cordis` | `cordis_define`, `cordis_inspect_list`, `cordis_inspect_query`, `cordis_inspect_self`, `cordis_run`, `cordis_stop`, `cordis_undefine` | `ctx.tools`, `ctx.dynamicCordisRunner` | `tool/call`, `tool/result`, `process-local dynamic package lifecycle` | - | Not in any shipped tree (a deliberate opt-in — dynamic package code reaches the real runtime, see .agents/notes/implemented/feature/2026-07-08-self-referential-cordis-toolset.md). The toolset injects `ctx.dynamicCordisRunner` from `@deepseek-ai/dsh-cordis-host-runner`, which owns the definition registry and the vm sandbox; a composition missing it never activates the tools. A running package may register ADDITIONAL model-visible tools until it is stopped, undefined, or DSH restarts; a full changed request header logs those tool-set changes. |
|
|
28
29
|
| `@deepseek-ai/dsh-tool-bash-persistent` | `bash` | `ctx.tools`, `ctx.terminals`, `an owning Agent at execution time` | `tool/call`, `PTY shell state`, `tool/result` | - | One owner-isolated persistent bash tool; deployment composition supplies the PTY backend and may override the model-facing environment description. |
|
|
@@ -39,9 +40,8 @@ This table connects model-visible tool names to the plugin package and service s
|
|
|
39
40
|
| `@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
41
|
| `@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
42
|
| `@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
|
-
| `@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()`. |
|
|
44
|
-
| `@deepseek-ai/dsh-experimental-tool-agent-team` | `
|
|
44
|
+
| `@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` | - | All nine tools are scoped to implicit Team Leads and durable teammates. The shipped dsh-base bundle keeps the package disabled; the documented Agent Teams profile patch enables it while disabling the legacy continuable-child control names. |
|
|
45
45
|
| `@deepseek-ai/dsh-tool-todo` | `todo_write` | `ctx.tools`, `owning Agent session` | `tool/call`, `todo/write`, `tool/result` | - | todo_write is session-owned state; UIs render the latest todo/write event as a checklist. `allowParallelInProgress` is required with no default, so the catalog states its choice: `true`, whose description invites several `in_progress` items. A deployment choosing `false` receives the same tool with a description asking for exactly one active task. |
|
|
46
46
|
| `@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` | - | - |
|
|
47
47
|
| `@deepseek-ai/dsh-tool-web` | `web_fetch`, `web_search` | `ctx.tools`, `ctx.web`, `ctx.systemPrompt` | `tool/call`, `tool/result` | - | web_search and web_fetch keep provider selection behind ctx.web so model-visible schemas stay stable across backend swaps. |
|
|
@@ -223,6 +223,49 @@ Source: [`packages/shell/tool-bash/src/index.ts`](https://github.com/deepseek-ai
|
|
|
223
223
|
|
|
224
224
|
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.
|
|
225
225
|
|
|
226
|
+
<a id="deepseek-aidsh-tool-present"></a>
|
|
227
|
+
|
|
228
|
+
## `@deepseek-ai/dsh-tool-present`
|
|
229
|
+
|
|
230
|
+
### `present`
|
|
231
|
+
|
|
232
|
+
Declare existing files accessible through the Session filesystem as final deliverables. When a file you create or update is an output the user asked to receive, you must call present after writing it and before your final response, including files created through Bash or code execution. Mentioning its path in your reply does not replace this call. The files must already exist. The user opens the current source files; their contents are not copied or preserved.
|
|
233
|
+
|
|
234
|
+
```json
|
|
235
|
+
{
|
|
236
|
+
"type": "object",
|
|
237
|
+
"properties": {
|
|
238
|
+
"files": {
|
|
239
|
+
"type": "array",
|
|
240
|
+
"items": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"additionalProperties": false,
|
|
243
|
+
"properties": {
|
|
244
|
+
"path": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Path of an existing regular file. Relative paths use the Session working directory."
|
|
247
|
+
},
|
|
248
|
+
"description": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"description": "Brief description for the user."
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"required": [
|
|
254
|
+
"path"
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"required": [
|
|
260
|
+
"files"
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Source: [`packages/fs/tool-present/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/fs/tool-present/src/index.ts)
|
|
266
|
+
|
|
267
|
+
Deliveries belong to the calling Session; Web ui-deliverables supplies source-file opening and cards.
|
|
268
|
+
|
|
226
269
|
<a id="deepseek-aidsh-tool-pwsh"></a>
|
|
227
270
|
|
|
228
271
|
## `@deepseek-ai/dsh-tool-pwsh`
|
|
@@ -735,7 +778,7 @@ Source: [`packages/fs/tool-fs/src/index.ts`](https://github.com/deepseek-ai/deep
|
|
|
735
778
|
|
|
736
779
|
### `read_image`
|
|
737
780
|
|
|
738
|
-
Read a PNG/JPEG/WebP/GIF file and return the image itself. Harness validates and downscales large supported images before the next model request, so use this tool directly instead of installing image libraries or creating thumbnails merely to inspect an image. Independent files may be read concurrently in small batches. Requires the current model to accept image input.
|
|
781
|
+
Read a PNG/JPEG/WebP/GIF file and return the image itself. A path without a file extension is accepted; the format is detected from the file content, so normalized attachment paths can be passed directly without copying or renaming. Harness validates and downscales large supported images before the next model request, so use this tool directly instead of installing image libraries or creating thumbnails merely to inspect an image. Independent files may be read concurrently in small batches. Requires the current model to accept image input.
|
|
739
782
|
|
|
740
783
|
```json
|
|
741
784
|
{
|
|
@@ -1622,7 +1665,7 @@ Source: [`packages/subagent/tool-subagent-control/src/index.ts`](https://github.
|
|
|
1622
1665
|
|
|
1623
1666
|
### `list_agents`
|
|
1624
1667
|
|
|
1625
|
-
List your continuable background subagents by durable id and label. Use it to recall which ones you started, not to poll for completion — you are told when one finishes. Status comes from the live registry: running means the agent is working right now, idle means it is loaded but between turns (it may be waiting on agents it started), and ready means it exists only in storage — resumable, not terminal, and not a result waiting to be collected; a `send_message` starts a
|
|
1668
|
+
List your continuable background subagents by durable id and label. Use it to recall which ones you started, not to poll for completion — you are told when one finishes. Status comes from the live registry: running means the agent is working right now, idle means it is loaded but between turns (it may be waiting on agents it started), and ready means it exists only in storage — resumable, not terminal, and not a result waiting to be collected; a `send_message` steers a running child at its nearest step boundary or starts a turn for an idle or ready child, and a direct child remains a `send_message` candidate in every status. The snapshot is not a delivery promise — `send_message` performs the authoritative check and may still fail. Children that could not be read are reported as diagnostics instead of being silently dropped. Scope `descendants` walks the whole tree below you in stable pre-order, annotating each entry with its durable direct-parent session id and depth. You may use `send_message` only for depth-1 entries; deeper entries are candidates for `interrupt_agent` only.
|
|
1626
1669
|
|
|
1627
1670
|
```json
|
|
1628
1671
|
{
|
|
@@ -1644,23 +1687,23 @@ Source: [`packages/subagent/tool-subagent-control/src/list-agents.ts`](https://g
|
|
|
1644
1687
|
|
|
1645
1688
|
### `send_message`
|
|
1646
1689
|
|
|
1647
|
-
Send a message to a
|
|
1690
|
+
Send a message to a direct continuable child by its agent id. If you are a resident continuable child, you may also target your direct parent. If the target is still working, the message steers its nearest step; if it is idle, the message starts a turn. This call returns no answer from the agent — only confirmation that the message was delivered. A failure means the message was NOT delivered.
|
|
1648
1691
|
|
|
1649
1692
|
```json
|
|
1650
1693
|
{
|
|
1651
1694
|
"type": "object",
|
|
1652
1695
|
"properties": {
|
|
1653
|
-
"
|
|
1696
|
+
"agent_id": {
|
|
1654
1697
|
"type": "string",
|
|
1655
|
-
"description": "The
|
|
1698
|
+
"description": "The agent id of your direct continuable child, or your direct parent when you are a resident continuable child."
|
|
1656
1699
|
},
|
|
1657
1700
|
"message": {
|
|
1658
1701
|
"type": "string",
|
|
1659
|
-
"description": "The message to deliver to the
|
|
1702
|
+
"description": "The message to deliver to the agent."
|
|
1660
1703
|
}
|
|
1661
1704
|
},
|
|
1662
1705
|
"required": [
|
|
1663
|
-
"
|
|
1706
|
+
"agent_id",
|
|
1664
1707
|
"message"
|
|
1665
1708
|
]
|
|
1666
1709
|
}
|
|
@@ -1670,33 +1713,6 @@ Source: [`packages/subagent/tool-subagent-control/src/index.ts`](https://github.
|
|
|
1670
1713
|
|
|
1671
1714
|
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).
|
|
1672
1715
|
|
|
1673
|
-
<a id="deepseek-aidsh-tool-subagent-report"></a>
|
|
1674
|
-
|
|
1675
|
-
## `@deepseek-ai/dsh-tool-subagent-report`
|
|
1676
|
-
|
|
1677
|
-
### `report`
|
|
1678
|
-
|
|
1679
|
-
Report selected content to the agent that started you. Call this once before you finish, with a self-contained final result, and earlier for progress or findings that change what that agent does next. That agent shares your workspace but does not automatically receive your transcript, tool output, or reasoning, so finishing your work is not itself a result. Reporting does not end your turn or finish your work, and only your direct parent receives it. A failed call may still have arrived, so do not blindly repeat it.
|
|
1680
|
-
|
|
1681
|
-
```json
|
|
1682
|
-
{
|
|
1683
|
-
"type": "object",
|
|
1684
|
-
"properties": {
|
|
1685
|
-
"output": {
|
|
1686
|
-
"type": "string",
|
|
1687
|
-
"description": "Actionable content for your parent; summarize conclusions and reference relevant shared paths."
|
|
1688
|
-
}
|
|
1689
|
-
},
|
|
1690
|
-
"required": [
|
|
1691
|
-
"output"
|
|
1692
|
-
]
|
|
1693
|
-
}
|
|
1694
|
-
```
|
|
1695
|
-
|
|
1696
|
-
Source: [`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)
|
|
1697
|
-
|
|
1698
|
-
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.
|
|
1699
|
-
|
|
1700
1716
|
<a id="deepseek-aidsh-tool-jobs"></a>
|
|
1701
1717
|
|
|
1702
1718
|
## `@deepseek-ai/dsh-tool-jobs`
|
|
@@ -1774,32 +1790,6 @@ The kind-agnostic background-job controller: background bash commands, PTY sends
|
|
|
1774
1790
|
|
|
1775
1791
|
## `@deepseek-ai/dsh-experimental-tool-agent-team`
|
|
1776
1792
|
|
|
1777
|
-
### `followup_task`
|
|
1778
|
-
|
|
1779
|
-
Send a durable follow-up task to another Team member and start a turn when needed.
|
|
1780
|
-
|
|
1781
|
-
```json
|
|
1782
|
-
{
|
|
1783
|
-
"type": "object",
|
|
1784
|
-
"properties": {
|
|
1785
|
-
"target": {
|
|
1786
|
-
"type": "string",
|
|
1787
|
-
"description": "Team member name, or lead."
|
|
1788
|
-
},
|
|
1789
|
-
"message": {
|
|
1790
|
-
"type": "string",
|
|
1791
|
-
"description": "Self-contained message for the target."
|
|
1792
|
-
}
|
|
1793
|
-
},
|
|
1794
|
-
"required": [
|
|
1795
|
-
"target",
|
|
1796
|
-
"message"
|
|
1797
|
-
]
|
|
1798
|
-
}
|
|
1799
|
-
```
|
|
1800
|
-
|
|
1801
|
-
Source: [`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)
|
|
1802
|
-
|
|
1803
1793
|
### `interrupt_agent`
|
|
1804
1794
|
|
|
1805
1795
|
Interrupt one teammate's current turn while preserving its pending inbox. Team Lead only.
|
|
@@ -1836,7 +1826,7 @@ Source: [`packages/experimental/tool-agent-team/src/index.ts`](https://github.co
|
|
|
1836
1826
|
|
|
1837
1827
|
### `send_message`
|
|
1838
1828
|
|
|
1839
|
-
Send durable
|
|
1829
|
+
Send one durable message to another Team member. A running target receives it at the nearest step boundary; an idle target starts a turn; an inactive teammate cold-resumes.
|
|
1840
1830
|
|
|
1841
1831
|
```json
|
|
1842
1832
|
{
|
|
@@ -2084,7 +2074,7 @@ Wait for the next teammate status, mailbox, or shared-task change after this cal
|
|
|
2084
2074
|
|
|
2085
2075
|
Source: [`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)
|
|
2086
2076
|
|
|
2087
|
-
All
|
|
2077
|
+
All nine tools are scoped to implicit Team Leads and durable teammates. The shipped dsh-base bundle keeps the package disabled; the documented Agent Teams profile patch enables it while disabling the legacy continuable-child control names.
|
|
2088
2078
|
|
|
2089
2079
|
<a id="deepseek-aidsh-tool-todo"></a>
|
|
2090
2080
|
|
|
@@ -21,7 +21,7 @@ flowchart TD
|
|
|
21
21
|
around["<code>tools/execute</code> waterfall<br/>timeout, retry, metrics (around dispatch)"]
|
|
22
22
|
toolBody["Registered tool execute() body"]
|
|
23
23
|
fsGate["<code>fs/write-intent</code> or <code>fs/edit-intent</code><br/>tool-fs mutations only"]
|
|
24
|
-
owned["Tool-owned session events<br/><code>todo/write</code>, <code>fs/observed</code>, <code>hook/invoked</code>, <code>hook/result</code>, <code>tool/
|
|
24
|
+
owned["Tool-owned session events<br/><code>todo/write</code>, <code>fs/observed</code>, <code>hook/invoked</code>, <code>hook/result</code>, <code>tool/ptc-dispatch</code>"]
|
|
25
25
|
post["<code>tools/post-execute</code> waterfall<br/>accept, block, replace, add context"]
|
|
26
26
|
normalized["Registry outer normalization<br/>pipeline/result snapshot throws become isError"]
|
|
27
27
|
finalize["ToolDefinition.finalizeContent<br/>last content-only invariant"]
|
|
@@ -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. 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/
|
|
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/ptc-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,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
editSource: "docs/user/guide/network-proxy.zh.md"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 在网络代理后面运行 DSH
|
|
6
|
+
|
|
7
|
+
DSH 会把自身的出站请求——模型调用、web 搜索、页面抓取、走 HTTP 的 MCP 服务器——都经由标准代理环境变量所指定的代理发出。它在启动时读取这些变量,不需要其他配置。有几条路径出于设计或运行时限制保持直连,下文"哪些保持直连"一节列出了它们。
|
|
8
|
+
|
|
9
|
+
## 导出环境变量
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
export HTTPS_PROXY=http://127.0.0.1:7890
|
|
13
|
+
export HTTP_PROXY=http://127.0.0.1:7890
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
把这两行写进 shell 配置,这样每次调用 `dsh` 都会继承它们;也可以写进 `$DSH_HOME/.env`(默认 `~/.dsh/.env`),和 API key 放在一起;导出的环境变量始终优先于该文件。项目自己的 `.env` 不能设置它们:它随 `git clone` 一起到来,DSH 宁可拒绝启动,也不让一个仓库决定你的流量去向。
|
|
17
|
+
|
|
18
|
+
需要凭据的代理把凭据写在 URL 里:`http://user:password@proxy.example:8080`。DSH 绝不会回显这个 URL:诊断只点名被拒绝的变量,因此用户名和密码都不会出现在任何地方。
|
|
19
|
+
|
|
20
|
+
## 为什么浏览器走代理、终端却不走
|
|
21
|
+
|
|
22
|
+
这是最常见的意外,而且并非 DSH 特有。**根本不存在一个所有软件都遵循的"系统代理"**——实际上有三套互不相干的机制:
|
|
23
|
+
|
|
24
|
+
| 机制 | 谁会遵循 |
|
|
25
|
+
|---|---|
|
|
26
|
+
| 操作系统的代理设置 | Safari、绝大多数 macOS 原生应用、Chrome 与 Edge |
|
|
27
|
+
| `HTTP_PROXY` / `HTTPS_PROXY` 环境变量 | `curl`、`git`、`npm`、`pip` 以及 DSH |
|
|
28
|
+
| TUN 模式(虚拟网卡) | 所有程序,且对应用透明 |
|
|
29
|
+
|
|
30
|
+
Clash 这类代理软件里的"系统代理"开关只写第一套。浏览器会读到它,命令行工具则永远看不到。这就是为什么导出环境变量是一个独立步骤,也是为什么打开 TUN 模式后两者都能工作、且完全不需要变量。
|
|
31
|
+
|
|
32
|
+
DSH 不读取操作系统的代理设置。请导出环境变量,或使用 TUN 模式。
|
|
33
|
+
|
|
34
|
+
## 指定哪些目标保持直连
|
|
35
|
+
|
|
36
|
+
`NO_PROXY` 列出需要直连的主机:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
export NO_PROXY=internal.example.com,.corp.example.com,registry.local
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
一个条目写的是主机名,它连同其下所有子域名一起匹配:`NO_PROXY=example.com` 也会让 `api.example.com` 直连。前缀 `.` 或 `*.` 可以写,含义相同。条目可带 `:port`,`*` 则放行全部。
|
|
43
|
+
|
|
44
|
+
**CIDR 网段不生效。** 操作系统的绕过列表常含 `10.0.0.0/8` 或 `192.168.0.0/16` 这类条目;把它们复制进 `NO_PROXY` 不会有任何效果。请改用主机名或域名后缀。
|
|
45
|
+
|
|
46
|
+
不需要列出 `localhost` 或 `127.0.0.1`。DSH 始终绕过 loopback,否则它自己的 Web UI 与本地服务器都会经由代理并形成回环。
|
|
47
|
+
|
|
48
|
+
## 值得知道的限制
|
|
49
|
+
|
|
50
|
+
**不支持 SOCKS 代理。** `socks5://` 形式的值会在启动时被报告并跳过,指定它的那个 scheme 转为直连——把 `HTTPS_PROXY=socks5://…` 与一个可用的 `HTTP_PROXY` 一起设置时,`https:` 会保持直连,而不会去借用 HTTP 代理。请把变量指向代理软件的 HTTP 端口——多数软件两者都提供,且 HTTP 端口通常就在相邻的端口号上。
|
|
51
|
+
|
|
52
|
+
**只设 `ALL_PROXY` 也够用。** DSH 会用它为两种协议兜底,尽管 Node 与 curl 在这一点上并不一致。显式设置 `HTTPS_PROXY` 仍然更清楚。
|
|
53
|
+
|
|
54
|
+
**做 TLS 拦截的企业代理需要它的证书。** 如果代理已经可达但请求仍报证书错误,请在启动前把 Node 指向你所在组织的 CA 包:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Node 只在进程启动时读取该变量,所以要在运行 `dsh` 之前导出。
|
|
61
|
+
|
|
62
|
+
**DSH 替你运行的工具遵循同一个代理。** bash 工具里的命令、`git`、`gh`,以及作为子进程启动的 MCP 服务器都会继承这些变量。子进程若本身是 Node 程序,则需 Node 22.21 或更高版本才会遵循;更旧的 Node 会直连。如果你的某个代理变量是 DSH 拒绝的值——比如 SOCKS URL——基于 Node 的工具同样直连而不是起不来,`curl` 与 `git` 则仍会读取那个值。
|
|
63
|
+
|
|
64
|
+
**代理 URL 里的密码同样会到达这些工具。** `HTTPS_PROXY=http://alice:s3cret@proxy.example:8080` 就是一个普通环境变量,因此 DSH 运行的每一条命令——包括模型编写的那些——都能读到它,而打印环境的命令会把密码写进被保留的输出。这与该变量在你 shell 里对其他一切程序的行为一致。若这一点重要,请为代理提供一个无需凭据的入口,或改用 URL 之外的方式认证。
|
|
65
|
+
|
|
66
|
+
## 哪些保持直连
|
|
67
|
+
|
|
68
|
+
并非 DSH 发出的每个请求都会走代理:
|
|
69
|
+
|
|
70
|
+
- **本机上的一切。** loopback 始终直连:`localhost`、整个 `127.0.0.0/8` 段、`::1` 与 `0.0.0.0`。代理无法有意义地访问一个只在本地监听的服务。
|
|
71
|
+
- **模型编写的代码。** workflow 与 code-runtime worker 从不接收代理配置,因此模型编写的脚本读不到可能携带密码的代理 URL。这类脚本只有自行配置才能联网。
|
|
72
|
+
- **使用情况遥测。** OTLP 导出器用的是 Node 自带的 HTTP 客户端,而不是代理所配置的那个,因此遥测直连;在禁止直连出网的环境里它只会失败。DSH 的任何功能都不依赖它。设 `DSH_TELEMETRY_MODE=DISABLED` 可完全关闭。
|
|
73
|
+
- **`web_fetch` 访问字面量私网地址。** 形如 `http://10.0.0.5/` 的 URL 会被拒绝而非交给代理,与未配置代理时得到的拒绝相同。
|
|
74
|
+
|
|
75
|
+
## 验证是否生效
|
|
76
|
+
|
|
77
|
+
让 agent 抓取一个页面,同时观察代理软件的连接日志:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
dsh --profile headless "fetch https://example.com and tell me the page title"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
如果请求没有出现在那里,确认变量确实进入了 DSH 自己的环境:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
env | grep -i proxy
|
|
87
|
+
```
|