dsh-plugin-dev-kb 1.0.9 → 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 +10 -0
- package/README.en.md +6 -6
- package/README.md +6 -6
- package/kb/INDEX.md +4 -2
- package/kb/README.md +4 -4
- package/kb/extra/AGENTS.md +1 -1
- 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/deepseek-llm-api-wire-extensions.md +18 -14
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +18 -14
- package/kb/extra/event-producer-consumer.md +44 -43
- package/kb/extra/event-producer-consumer.zh.md +47 -46
- package/kb/extra/i18n/style-samples.md +2 -2
- package/kb/extra/module-graph.md +444 -991
- package/kb/extra/module-graph.zh.md +446 -993
- package/kb/extra/subsystems/agent-team.md +4 -3
- package/kb/extra/subsystems/agent-team.zh.md +4 -3
- package/kb/extra/subsystems/attachment.md +157 -4
- package/kb/extra/subsystems/attachment.zh.md +157 -4
- package/kb/extra/subsystems/feedback.md +2 -2
- package/kb/extra/subsystems/feedback.zh.md +2 -2
- package/kb/extra/testing.md +6 -2
- package/kb/extra/testing.zh.md +6 -2
- package/kb/extra/web-styling.md +4 -0
- package/kb/extra/web-styling.zh.md +4 -0
- package/kb/meta/search-index.json +135 -111
- package/kb/meta/site-pages.txt +184 -182
- package/kb/meta/source.json +5 -5
- package/kb/meta/topics.md +4 -4
- 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/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/schedule.md +2 -0
- package/kb/site/en/reference/agent-lifecycle.md +5 -3
- package/kb/site/en/reference/api-gateway.md +2 -2
- package/kb/site/en/reference/capability-seams.md +14 -7
- package/kb/site/en/reference/config-catalog.md +157 -230
- 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/extension-cookbook.md +15 -12
- package/kb/site/en/reference/index.md +11 -4
- package/kb/site/en/reference/persistence-catalog.md +91 -70
- 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 +9 -9
- package/kb/site/en/reference/subsystems/conversation.md +11 -4
- package/kb/site/en/reference/subsystems/core.md +96 -15
- package/kb/site/en/reference/subsystems/credentials.md +5 -4
- package/kb/site/en/reference/subsystems/goal.md +1 -1
- package/kb/site/en/reference/subsystems/index.md +1 -1
- package/kb/site/en/reference/subsystems/llm-streaming.md +24 -3
- package/kb/site/en/reference/subsystems/permission-presets.md +5 -5
- package/kb/site/en/reference/subsystems/persistence.md +185 -194
- 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/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 +25 -1
- package/kb/site/en/reference/subsystems/session-telemetry.md +6 -5
- package/kb/site/en/reference/subsystems/session-title.md +6 -6
- package/kb/site/en/reference/subsystems/session.md +156 -73
- package/kb/site/en/reference/subsystems/settings.md +30 -12
- package/kb/site/en/reference/subsystems/skills.md +1 -1
- package/kb/site/en/reference/subsystems/slots.md +1 -0
- package/kb/site/en/reference/subsystems/storage.md +28 -5
- package/kb/site/en/reference/subsystems/subagent.md +43 -97
- package/kb/site/en/reference/subsystems/system-prompt.md +16 -3
- package/kb/site/en/reference/subsystems/token-meter.md +2 -2
- 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 +8 -8
- package/kb/site/en/reference/tool-catalog.md +10 -64
- package/kb/site/guide/network-proxy.md +87 -0
- package/kb/site/guide/providers.md +70 -17
- package/kb/site/guide/schedule.md +2 -0
- package/kb/site/reference/agent-lifecycle.md +5 -3
- package/kb/site/reference/api-gateway.md +2 -2
- package/kb/site/reference/capability-seams.md +14 -7
- package/kb/site/reference/config-catalog.md +156 -229
- 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/extension-cookbook.md +15 -12
- package/kb/site/reference/index.md +11 -4
- package/kb/site/reference/persistence-catalog.md +91 -70
- 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 +9 -9
- package/kb/site/reference/subsystems/conversation.md +11 -4
- package/kb/site/reference/subsystems/core.md +96 -15
- package/kb/site/reference/subsystems/credentials.md +5 -4
- package/kb/site/reference/subsystems/goal.md +1 -1
- package/kb/site/reference/subsystems/index.md +1 -1
- package/kb/site/reference/subsystems/llm-streaming.md +24 -3
- package/kb/site/reference/subsystems/permission-presets.md +5 -5
- package/kb/site/reference/subsystems/persistence.md +184 -193
- package/kb/site/reference/subsystems/plan.md +3 -3
- package/kb/site/reference/subsystems/schedule.md +9 -3
- 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 +25 -1
- package/kb/site/reference/subsystems/session-telemetry.md +6 -5
- package/kb/site/reference/subsystems/session-title.md +6 -6
- package/kb/site/reference/subsystems/session.md +156 -73
- package/kb/site/reference/subsystems/settings.md +30 -12
- package/kb/site/reference/subsystems/skills.md +1 -1
- package/kb/site/reference/subsystems/slots.md +1 -0
- package/kb/site/reference/subsystems/storage.md +28 -5
- package/kb/site/reference/subsystems/subagent.md +43 -97
- package/kb/site/reference/subsystems/system-prompt.md +16 -3
- package/kb/site/reference/subsystems/token-meter.md +2 -2
- 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 +8 -8
- package/kb/site/reference/tool-catalog.md +9 -63
- package/package.json +2 -2
- package/skills/dsh-plugin-dev-kb.md +4 -4
|
@@ -12,7 +12,7 @@ Every event type that can appear in a session's durable event log: the complete
|
|
|
12
12
|
|
|
13
13
|
This file is GENERATED from source (`scripts/gen-persistence-catalog.ts`) and verified fresh by `pnpm run verify-persistence-catalog` (part of `doc-sync`) — do not edit it by hand. Declaration blocks retain the source declaration and nested property JSDoc, removing only the indentation imposed by a containing interface/module, and use a `ts persistence-catalog` fence (skipped by doc-typecheck because declarations reference types from their owning modules). Type names in a payload link to the page that documents them. See [the persistence-log-catalog Agent Note](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/archived/process/2026-07-04-persistence-log-catalog.md).
|
|
14
14
|
|
|
15
|
-
The envelope declarations below compose each event's `type`, monotonic `seq`, epoch-ms `time`, `data`, and the conditional `surfaceOp`/`sourceEventSeqs` fields. **surface** marks a `SurfaceEventType` member: it produces an LLM message and declares how it joins the surface list. **log-only** marks everything else: a durable, replayable record with no derived-history contribution. Every payload is JSON-serializable (enforced at `Session.append`)
|
|
15
|
+
The envelope declarations below compose each event's `type`, monotonic `seq`, epoch-ms `time`, `data`, the optional `ignorable` unknown-type skip marker, and the conditional `surfaceOp`/`sourceEventSeqs` fields. **surface** marks a `SurfaceEventType` member: it produces an LLM message and declares how it joins the surface list. **log-only** marks everything else: a durable, replayable record with no derived-history contribution. Every payload is JSON-serializable (enforced at `Session.append`). Current writers stamp `SESSION_FORMAT_VERSION`; supported historical artifacts reach this current vocabulary through the build-static adjacent migration catalog ([the version lifecycle](./subsystems/persistence.md)). Scope: the packages in this repo; a downstream plugin can merge further current-version event types, which are outside this catalog by construction and require an explicit disposition at a later format edge.
|
|
16
16
|
|
|
17
17
|
## Event envelope
|
|
18
18
|
|
|
@@ -23,7 +23,8 @@ export type SessionEventType = keyof SessionEventMap
|
|
|
23
23
|
/**
|
|
24
24
|
* The subset of {@link SessionEventType} values whose events produce LLM
|
|
25
25
|
* messages and are eligible to appear on the ordered surface. Only these
|
|
26
|
-
* event types may carry {@link SurfaceOp} and
|
|
26
|
+
* event types may carry {@link SurfaceOp}; user and tool events may also cite
|
|
27
|
+
* earlier sources through {@link SessionEvent.sourceEventSeqs}.
|
|
27
28
|
*/
|
|
28
29
|
export type SurfaceEventType =
|
|
29
30
|
| 'user/message'
|
|
@@ -45,7 +46,7 @@ export type SurfaceEventType =
|
|
|
45
46
|
*/
|
|
46
47
|
export type SurfaceOp =
|
|
47
48
|
| 'append'
|
|
48
|
-
| { op: 'replace'; start:
|
|
49
|
+
| { op: 'replace'; start: SessionSeq; end: SessionSeq }
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* One immutable entry in the session log.
|
|
@@ -56,7 +57,7 @@ export type SurfaceOp =
|
|
|
56
57
|
* The {@link sourceEventSeqs} and {@link surfaceOp} fields are conditional:
|
|
57
58
|
* they only exist on {@link SurfaceEventType} variants (`user/message`,
|
|
58
59
|
* `assistant/message`, `tool/result`).
|
|
59
|
-
* Non-surface events (boundary markers,
|
|
60
|
+
* Non-surface events (boundary markers, attempts, errors) never carry
|
|
60
61
|
* surface metadata — the compiler enforces this at `Session.append()`
|
|
61
62
|
* call sites.
|
|
62
63
|
*/
|
|
@@ -64,27 +65,35 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
64
65
|
[K in SessionEventType]: {
|
|
65
66
|
type: K
|
|
66
67
|
/** Monotonic sequence number within the session. */
|
|
67
|
-
seq:
|
|
68
|
+
seq: SessionSeq
|
|
68
69
|
/** Unix epoch milliseconds. */
|
|
69
70
|
time: number
|
|
70
71
|
data: SessionEventMap[K]
|
|
72
|
+
/**
|
|
73
|
+
* Marks an event a reader may safely skip when it does not recognize
|
|
74
|
+
* `type`. Absent means required: a reader meeting an unrecognized type
|
|
75
|
+
* without this marker MUST refuse to reconstruct the session instead of
|
|
76
|
+
* silently dropping the event, because an unrecognized required event may
|
|
77
|
+
* change how the rest of the log is interpreted. A writer sets `true` only
|
|
78
|
+
* on purely informational records whose loss cannot affect reconstruction;
|
|
79
|
+
* defaulting to required means a forgotten marker over-refuses (an
|
|
80
|
+
* inconvenience) rather than silently resuming a gutted session.
|
|
81
|
+
*/
|
|
82
|
+
ignorable?: true
|
|
71
83
|
} & (K extends SurfaceEventType ? {
|
|
72
84
|
/**
|
|
73
|
-
* Seq numbers of earlier events that this event cites as sources
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* `assistant/message` may carry a present empty array for a known empty
|
|
77
|
-
* provider stream; when the field is absent, the event does not record which
|
|
78
|
-
* earlier events produced the message.
|
|
85
|
+
* Seq numbers of earlier events that this event cites as sources, such as
|
|
86
|
+
* the surface nodes shadowed by a compaction replacement. A v2
|
|
87
|
+
* `assistant/message` embeds its provider stream and cannot carry this field.
|
|
79
88
|
*/
|
|
80
|
-
sourceEventSeqs?:
|
|
89
|
+
sourceEventSeqs?: SessionSeq[]
|
|
81
90
|
/** How this event entered the surface; absent for non-surface events. */
|
|
82
91
|
surfaceOp?: SurfaceOp
|
|
83
92
|
} : object)
|
|
84
93
|
}[T]
|
|
85
94
|
```
|
|
86
95
|
|
|
87
|
-
Sources: [`packages/core/session/src/types.ts:
|
|
96
|
+
Sources: [`packages/core/session/src/types.ts:379`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:387`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:416`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:447`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
88
97
|
|
|
89
98
|
## Events
|
|
90
99
|
|
|
@@ -109,7 +118,7 @@ Sources: [`packages/core/session/src/types.ts:328`](https://github.com/deepseek-
|
|
|
109
118
|
}
|
|
110
119
|
```
|
|
111
120
|
|
|
112
|
-
Source: [`packages/core/agent/src/types.ts:
|
|
121
|
+
Source: [`packages/core/agent/src/types.ts:58`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent/src/types.ts)
|
|
113
122
|
|
|
114
123
|
### `agent-preset/*`
|
|
115
124
|
|
|
@@ -183,7 +192,7 @@ Source: [`packages/interaction/user-approval/src/types.ts:55`](https://github.co
|
|
|
183
192
|
* The session's approval policy was switched — log-only, durable,
|
|
184
193
|
* replayable, never in the model transcript (the model learns the policy
|
|
185
194
|
* from the runtime-context snapshot and live switch notices). The LAST
|
|
186
|
-
* such event is the session's override
|
|
195
|
+
* such event is the session's override.
|
|
187
196
|
* `source: 'delegation'` marks an override seeded into a child; an absent
|
|
188
197
|
* source is a runtime switch.
|
|
189
198
|
*/
|
|
@@ -194,22 +203,24 @@ Source: [`packages/interaction/user-approval/src/types.ts:55`](https://github.co
|
|
|
194
203
|
}
|
|
195
204
|
```
|
|
196
205
|
|
|
197
|
-
Source: [`packages/interaction/user-approval/src/index.ts:
|
|
206
|
+
Source: [`packages/interaction/user-approval/src/index.ts:33`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/user-approval/src/index.ts)
|
|
198
207
|
|
|
199
208
|
### `assistant/*`
|
|
200
209
|
|
|
201
|
-
<a id="
|
|
210
|
+
<a id="assistantattempt--log-only"></a>
|
|
202
211
|
|
|
203
|
-
#### `assistant/
|
|
212
|
+
#### `assistant/attempt` — log-only
|
|
204
213
|
|
|
205
214
|
```ts persistence-catalog
|
|
206
|
-
/**
|
|
207
|
-
|
|
215
|
+
/**
|
|
216
|
+
* One model attempt that committed no surface message. The embedded stream
|
|
217
|
+
* preserves a failed, retried, cancelled, or stream-error attempt that
|
|
218
|
+
* reached settlement without fabricating model-visible history.
|
|
219
|
+
*/
|
|
220
|
+
'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[] }
|
|
208
221
|
```
|
|
209
222
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
Source: [`packages/core/session/src/types.ts:251`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
223
|
+
Source: [`packages/core/session/src/types.ts:313`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
213
224
|
|
|
214
225
|
<a id="assistantmessage--surface"></a>
|
|
215
226
|
|
|
@@ -226,12 +237,20 @@ Source: [`packages/core/session/src/types.ts:251`](https://github.com/deepseek-a
|
|
|
226
237
|
* marker distinguishes that prefix without re-deriving interruption from turn
|
|
227
238
|
* boundaries. An aborted turn with no such event streamed no visible content.
|
|
228
239
|
*/
|
|
229
|
-
'assistant/message': {
|
|
240
|
+
'assistant/message': {
|
|
241
|
+
turn: number
|
|
242
|
+
step: number
|
|
243
|
+
message: AssistantMessage
|
|
244
|
+
/** Exact timed model stream, compacted without joining delta boundaries. */
|
|
245
|
+
stream: AssistantStreamRecord[]
|
|
246
|
+
usage?: TokenUsage
|
|
247
|
+
interrupted?: true
|
|
248
|
+
}
|
|
230
249
|
```
|
|
231
250
|
|
|
232
251
|
Types: [TokenUsage](./subsystems/llm-streaming.md)
|
|
233
252
|
|
|
234
|
-
Source: [`packages/core/session/src/types.ts:
|
|
253
|
+
Source: [`packages/core/session/src/types.ts:299`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
235
254
|
|
|
236
255
|
### `command/*`
|
|
237
256
|
|
|
@@ -250,11 +269,11 @@ Source: [`packages/core/session/src/types.ts:262`](https://github.com/deepseek-a
|
|
|
250
269
|
commandId: CommandId
|
|
251
270
|
kind: 'success' | 'error'
|
|
252
271
|
text?: string
|
|
253
|
-
sourceEventSeq?:
|
|
272
|
+
sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq
|
|
254
273
|
}
|
|
255
274
|
```
|
|
256
275
|
|
|
257
|
-
Source: [`packages/interaction/commands/src/types.ts:
|
|
276
|
+
Source: [`packages/interaction/commands/src/types.ts:110`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/commands/src/types.ts)
|
|
258
277
|
|
|
259
278
|
<a id="commandrun--log-only"></a>
|
|
260
279
|
|
|
@@ -274,7 +293,7 @@ Source: [`packages/interaction/commands/src/types.ts:103`](https://github.com/de
|
|
|
274
293
|
'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource }
|
|
275
294
|
```
|
|
276
295
|
|
|
277
|
-
Source: [`packages/interaction/commands/src/types.ts:
|
|
296
|
+
Source: [`packages/interaction/commands/src/types.ts:103`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/commands/src/types.ts)
|
|
278
297
|
|
|
279
298
|
### `compaction/*`
|
|
280
299
|
|
|
@@ -290,7 +309,7 @@ Source: [`packages/interaction/commands/src/types.ts:96`](https://github.com/dee
|
|
|
290
309
|
'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string }
|
|
291
310
|
```
|
|
292
311
|
|
|
293
|
-
Source: [`packages/compaction/compaction/src/types.ts:
|
|
312
|
+
Source: [`packages/compaction/compaction/src/types.ts:72`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/compaction/compaction/src/types.ts)
|
|
294
313
|
|
|
295
314
|
<a id="compactionprune--log-only"></a>
|
|
296
315
|
|
|
@@ -308,15 +327,15 @@ Source: [`packages/compaction/compaction/src/types.ts:71`](https://github.com/de
|
|
|
308
327
|
*/
|
|
309
328
|
'compaction/prune': {
|
|
310
329
|
/** The replaced range's first and last surface-node seqs (a surface-position span, like {@link CompactionResult.shadowedRange}). */
|
|
311
|
-
shadowedRange: { start:
|
|
330
|
+
shadowedRange: { start: SessionSeq; end: SessionSeq }
|
|
312
331
|
/** The seqs of all shadowed surface nodes, in surface order. */
|
|
313
|
-
shadowedSeqs:
|
|
332
|
+
shadowedSeqs: SessionSeq[]
|
|
314
333
|
/** Heuristic price of the shadowed content under the token-meter's fixed estimator. */
|
|
315
334
|
shadowedTokenCount: number
|
|
316
335
|
}
|
|
317
336
|
```
|
|
318
337
|
|
|
319
|
-
Source: [`packages/compaction/compaction/src/types.ts:
|
|
338
|
+
Source: [`packages/compaction/compaction/src/types.ts:82`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/compaction/compaction/src/types.ts)
|
|
320
339
|
|
|
321
340
|
<a id="compactionstart--log-only"></a>
|
|
322
341
|
|
|
@@ -331,7 +350,7 @@ Source: [`packages/compaction/compaction/src/types.ts:81`](https://github.com/de
|
|
|
331
350
|
'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null }
|
|
332
351
|
```
|
|
333
352
|
|
|
334
|
-
Source: [`packages/compaction/compaction/src/types.ts:
|
|
353
|
+
Source: [`packages/compaction/compaction/src/types.ts:24`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/compaction/compaction/src/types.ts)
|
|
335
354
|
|
|
336
355
|
<a id="compactionsummary--log-only"></a>
|
|
337
356
|
|
|
@@ -351,8 +370,8 @@ Source: [`packages/compaction/compaction/src/types.ts:23`](https://github.com/de
|
|
|
351
370
|
compactionId: CompactionId
|
|
352
371
|
sourceCommandId?: CommandId
|
|
353
372
|
summary: ContentBlock[]
|
|
354
|
-
shadowedRange: { start:
|
|
355
|
-
shadowedSeqs:
|
|
373
|
+
shadowedRange: { start: SessionSeq; end: SessionSeq }
|
|
374
|
+
shadowedSeqs: SessionSeq[]
|
|
356
375
|
shadowedTokenCount: number
|
|
357
376
|
/** The provider route that wrote the summary. */
|
|
358
377
|
provider: string
|
|
@@ -385,7 +404,7 @@ Source: [`packages/compaction/compaction/src/types.ts:23`](https://github.com/de
|
|
|
385
404
|
|
|
386
405
|
Types: [ContentBlock](./subsystems/core.md) · [TokenUsage](./subsystems/llm-streaming.md)
|
|
387
406
|
|
|
388
|
-
Source: [`packages/compaction/compaction/src/types.ts:
|
|
407
|
+
Source: [`packages/compaction/compaction/src/types.ts:34`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/compaction/compaction/src/types.ts)
|
|
389
408
|
|
|
390
409
|
### `feedback/*`
|
|
391
410
|
|
|
@@ -518,13 +537,13 @@ Source: [`packages/api/session-controller/src/types.ts:40`](https://github.com/d
|
|
|
518
537
|
/**
|
|
519
538
|
* Records the selected preset as durable, log-only user intent. The knob
|
|
520
539
|
* events follow in the same turn and control execution; this event stays
|
|
521
|
-
* out of the model transcript and lets
|
|
540
|
+
* out of the model transcript and lets the permission projection unit
|
|
522
541
|
* preserve a selection when bundles match.
|
|
523
542
|
*/
|
|
524
543
|
'permission/preset': { preset: string }
|
|
525
544
|
```
|
|
526
545
|
|
|
527
|
-
Source: [`packages/interaction/permission-presets/src/index.ts:
|
|
546
|
+
Source: [`packages/interaction/permission-presets/src/index.ts:53`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/permission-presets/src/index.ts)
|
|
528
547
|
|
|
529
548
|
### `plan/*`
|
|
530
549
|
|
|
@@ -536,12 +555,12 @@ Source: [`packages/interaction/permission-presets/src/index.ts:50`](https://gith
|
|
|
536
555
|
/**
|
|
537
556
|
* Whether plan mode is in force from this point on: log-only, non-surface,
|
|
538
557
|
* whole-value replace. The last `plan/mode` wins; a log with none folds to
|
|
539
|
-
* inactive through
|
|
558
|
+
* inactive through the projection unit's fold.
|
|
540
559
|
*/
|
|
541
560
|
'plan/mode': { active: boolean }
|
|
542
561
|
```
|
|
543
562
|
|
|
544
|
-
Source: [`packages/plan/plan-mode/src/index.ts:
|
|
563
|
+
Source: [`packages/plan/plan-mode/src/index.ts:46`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/plan/plan-mode/src/index.ts)
|
|
545
564
|
|
|
546
565
|
### `request/*`
|
|
547
566
|
|
|
@@ -557,7 +576,7 @@ Source: [`packages/plan/plan-mode/src/index.ts:53`](https://github.com/deepseek-
|
|
|
557
576
|
'request/context': RequestContext
|
|
558
577
|
```
|
|
559
578
|
|
|
560
|
-
Source: [`packages/core/session/src/types.ts:
|
|
579
|
+
Source: [`packages/core/session/src/types.ts:352`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
561
580
|
|
|
562
581
|
<a id="requestheader--log-only"></a>
|
|
563
582
|
|
|
@@ -576,7 +595,7 @@ Source: [`packages/core/session/src/types.ts:301`](https://github.com/deepseek-a
|
|
|
576
595
|
}
|
|
577
596
|
```
|
|
578
597
|
|
|
579
|
-
Source: [`packages/core/session/src/types.ts:
|
|
598
|
+
Source: [`packages/core/session/src/types.ts:342`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
580
599
|
|
|
581
600
|
### `sandbox/*`
|
|
582
601
|
|
|
@@ -589,7 +608,7 @@ Source: [`packages/core/session/src/types.ts:291`](https://github.com/deepseek-a
|
|
|
589
608
|
* The session's sandbox mode was switched — log-only (like `approval/*`;
|
|
590
609
|
* NOT a surface event, carries no `surfaceOp`): durable and replayable,
|
|
591
610
|
* never in the model transcript. The LAST such event is the session's
|
|
592
|
-
* override (
|
|
611
|
+
* override (folded by the sandboxMode projection unit). `source: 'delegation'` marks
|
|
593
612
|
* an override seeded into a child; an absent source is a runtime switch.
|
|
594
613
|
*/
|
|
595
614
|
'sandbox/mode': {
|
|
@@ -630,12 +649,12 @@ Source: [`packages/schedule/schedule/src/types.ts:219`](https://github.com/deeps
|
|
|
630
649
|
* Marks the end of a constructor seed. Events before it have smaller seq
|
|
631
650
|
* values and came from the seed (resume, fork, or replay); this lifecycle
|
|
632
651
|
* produced none of them. This log-only event is the durable projection of
|
|
633
|
-
* {@link Session.firstLiveSeq}.
|
|
634
|
-
* carry the meaning.
|
|
652
|
+
* {@link Session.firstLiveSeq}.
|
|
635
653
|
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
654
|
+
* A fresh fork child owns one `{ inherited: true }` marker at its exact
|
|
655
|
+
* inherited-prefix cut, even when that prefix ends in an ancestor marker.
|
|
656
|
+
* The last tagged marker is the current Session's cut; untagged markers keep
|
|
657
|
+
* ordinary restore and replay lifecycle boundaries.
|
|
639
658
|
*
|
|
640
659
|
* `Session`'s constructor is the only legitimate writer. The invariant
|
|
641
660
|
* companion deliberately constrains nothing here, so a plugin appending one
|
|
@@ -648,10 +667,10 @@ Source: [`packages/schedule/schedule/src/types.ts:219`](https://github.com/deeps
|
|
|
648
667
|
* writers — a concurrently live session holds its own boundary elsewhere,
|
|
649
668
|
* so tolerating concurrent writers needs a signal beyond the log.
|
|
650
669
|
*/
|
|
651
|
-
'session/end-seed':
|
|
670
|
+
'session/end-seed': { inherited?: true }
|
|
652
671
|
```
|
|
653
672
|
|
|
654
|
-
Source: [`packages/core/session/src/types.ts:
|
|
673
|
+
Source: [`packages/core/session/src/types.ts:375`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
655
674
|
|
|
656
675
|
<a id="sessiontitle--log-only"></a>
|
|
657
676
|
|
|
@@ -667,7 +686,7 @@ Source: [`packages/core/session/src/types.ts:324`](https://github.com/deepseek-a
|
|
|
667
686
|
|
|
668
687
|
Types: [SessionTitleEventData](./subsystems/session-title.md)
|
|
669
688
|
|
|
670
|
-
Source: [`packages/session/session-title/src/index.ts:
|
|
689
|
+
Source: [`packages/session/session-title/src/index.ts:77`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-title/src/index.ts)
|
|
671
690
|
|
|
672
691
|
<a id="sessiontitle-llm-request--log-only"></a>
|
|
673
692
|
|
|
@@ -680,7 +699,7 @@ Source: [`packages/session/session-title/src/index.ts:100`](https://github.com/d
|
|
|
680
699
|
|
|
681
700
|
Types: [SessionTitleLlmRequestEventData](./subsystems/session-title.md)
|
|
682
701
|
|
|
683
|
-
Source: [`packages/session/session-title-llm/src/index.ts:
|
|
702
|
+
Source: [`packages/session/session-title-llm/src/index.ts:45`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-title-llm/src/index.ts)
|
|
684
703
|
|
|
685
704
|
### `session-log-deepseek/*`
|
|
686
705
|
|
|
@@ -693,12 +712,14 @@ Source: [`packages/session/session-title-llm/src/index.ts:43`](https://github.co
|
|
|
693
712
|
'session-log-deepseek/delivery-accepted': {
|
|
694
713
|
/** Session identity the accepted delivery carried; inherited fork markers retain the parent's id. */
|
|
695
714
|
sessionId: import('@deepseek-ai/dsh-session/types').SessionId
|
|
715
|
+
/** Accepted Session format generation; absence identifies version 0. */
|
|
716
|
+
sessionFormatVersion?: number
|
|
696
717
|
/** Last canonical event included in the accepted request. */
|
|
697
|
-
throughSeq:
|
|
718
|
+
throughSeq: import('@deepseek-ai/dsh-session/types').SessionSeq
|
|
698
719
|
}
|
|
699
720
|
```
|
|
700
721
|
|
|
701
|
-
Source: [`packages/session/session-log-deepseek/src/types.ts:
|
|
722
|
+
Source: [`packages/session/session-log-deepseek/src/types.ts:59`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-log-deepseek/src/types.ts)
|
|
702
723
|
|
|
703
724
|
### `step/*`
|
|
704
725
|
|
|
@@ -711,7 +732,7 @@ Source: [`packages/session/session-log-deepseek/src/types.ts:26`](https://github
|
|
|
711
732
|
'step/end': { turn: number; step: number }
|
|
712
733
|
```
|
|
713
734
|
|
|
714
|
-
Source: [`packages/core/session/src/types.ts:
|
|
735
|
+
Source: [`packages/core/session/src/types.ts:280`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
715
736
|
|
|
716
737
|
<a id="stepstart--log-only"></a>
|
|
717
738
|
|
|
@@ -722,7 +743,7 @@ Source: [`packages/core/session/src/types.ts:241`](https://github.com/deepseek-a
|
|
|
722
743
|
'step/start': { turn: number; step: number }
|
|
723
744
|
```
|
|
724
745
|
|
|
725
|
-
Source: [`packages/core/session/src/types.ts:
|
|
746
|
+
Source: [`packages/core/session/src/types.ts:278`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
726
747
|
|
|
727
748
|
### `subagent/*`
|
|
728
749
|
|
|
@@ -760,7 +781,7 @@ Source: [`packages/subagent/subagent/src/descriptor.ts:38`](https://github.com/d
|
|
|
760
781
|
}
|
|
761
782
|
```
|
|
762
783
|
|
|
763
|
-
Source: [`packages/subagent/tool-subagent/src/model-selection-state.ts:
|
|
784
|
+
Source: [`packages/subagent/tool-subagent/src/model-selection-state.ts:17`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/tool-subagent/src/model-selection-state.ts)
|
|
764
785
|
|
|
765
786
|
### `team/*`
|
|
766
787
|
|
|
@@ -770,12 +791,12 @@ Source: [`packages/subagent/tool-subagent/src/model-selection-state.ts:14`](http
|
|
|
770
791
|
|
|
771
792
|
```ts persistence-catalog
|
|
772
793
|
/** Whole teammate lifecycle value, stored only in the Team Lead Session. */
|
|
773
|
-
'team/member': { version:
|
|
794
|
+
'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot }
|
|
774
795
|
```
|
|
775
796
|
|
|
776
797
|
Types: [TeamId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.md) · [TeamMemberSnapshot](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.md)
|
|
777
798
|
|
|
778
|
-
Source: [`packages/experimental/agent-team/src/types.ts:
|
|
799
|
+
Source: [`packages/experimental/agent-team/src/types.ts:221`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/agent-team/src/types.ts)
|
|
779
800
|
|
|
780
801
|
<a id="teammessagedelivered--log-only"></a>
|
|
781
802
|
|
|
@@ -784,7 +805,7 @@ Source: [`packages/experimental/agent-team/src/types.ts:223`](https://github.com
|
|
|
784
805
|
```ts persistence-catalog
|
|
785
806
|
/** Durable acknowledgement that the target Session recorded the message. */
|
|
786
807
|
'team/message/delivered': {
|
|
787
|
-
version:
|
|
808
|
+
version: 2
|
|
788
809
|
teamId: TeamId
|
|
789
810
|
messageId: TeamMessageId
|
|
790
811
|
targetId: SessionId
|
|
@@ -793,7 +814,7 @@ Source: [`packages/experimental/agent-team/src/types.ts:223`](https://github.com
|
|
|
793
814
|
|
|
794
815
|
Types: [TeamId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.md) · [TeamMessageId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.md)
|
|
795
816
|
|
|
796
|
-
Source: [`packages/experimental/agent-team/src/types.ts:
|
|
817
|
+
Source: [`packages/experimental/agent-team/src/types.ts:227`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/agent-team/src/types.ts)
|
|
797
818
|
|
|
798
819
|
<a id="teammessagequeued--log-only"></a>
|
|
799
820
|
|
|
@@ -801,12 +822,12 @@ Source: [`packages/experimental/agent-team/src/types.ts:229`](https://github.com
|
|
|
801
822
|
|
|
802
823
|
```ts persistence-catalog
|
|
803
824
|
/** Durable mailbox enqueue, stored before delivery is attempted. */
|
|
804
|
-
'team/message/queued': { version:
|
|
825
|
+
'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot }
|
|
805
826
|
```
|
|
806
827
|
|
|
807
828
|
Types: [TeamId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.md) · [TeamMessageSnapshot](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.md)
|
|
808
829
|
|
|
809
|
-
Source: [`packages/experimental/agent-team/src/types.ts:
|
|
830
|
+
Source: [`packages/experimental/agent-team/src/types.ts:225`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/agent-team/src/types.ts)
|
|
810
831
|
|
|
811
832
|
<a id="teamtask--log-only"></a>
|
|
812
833
|
|
|
@@ -814,12 +835,12 @@ Source: [`packages/experimental/agent-team/src/types.ts:227`](https://github.com
|
|
|
814
835
|
|
|
815
836
|
```ts persistence-catalog
|
|
816
837
|
/** Whole shared-task value, stored only in the Team Lead Session. */
|
|
817
|
-
'team/task': { version:
|
|
838
|
+
'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot }
|
|
818
839
|
```
|
|
819
840
|
|
|
820
841
|
Types: [TeamId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.md) · [TeamTaskSnapshot](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.md)
|
|
821
842
|
|
|
822
|
-
Source: [`packages/experimental/agent-team/src/types.ts:
|
|
843
|
+
Source: [`packages/experimental/agent-team/src/types.ts:223`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/experimental/agent-team/src/types.ts)
|
|
823
844
|
|
|
824
845
|
### `todo/*`
|
|
825
846
|
|
|
@@ -853,7 +874,7 @@ Source: [`packages/todo/tool-todo/src/types.ts:31`](https://github.com/deepseek-
|
|
|
853
874
|
|
|
854
875
|
Types: [ToolCallId](./subsystems/core.md)
|
|
855
876
|
|
|
856
|
-
Source: [`packages/core/session/src/types.ts:
|
|
877
|
+
Source: [`packages/core/session/src/types.ts:319`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
857
878
|
|
|
858
879
|
<a id="toolcode-dispatch--log-only"></a>
|
|
859
880
|
|
|
@@ -928,7 +949,7 @@ Source: [`packages/core/tools/src/types.ts:40`](https://github.com/deepseek-ai/d
|
|
|
928
949
|
}
|
|
929
950
|
```
|
|
930
951
|
|
|
931
|
-
Source: [`packages/core/session/src/types.ts:
|
|
952
|
+
Source: [`packages/core/session/src/types.ts:331`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
932
953
|
|
|
933
954
|
### `tool-workflow/*`
|
|
934
955
|
|
|
@@ -1008,7 +1029,7 @@ Source: [`packages/workflow/tool-workflow/src/types.ts:47`](https://github.com/d
|
|
|
1008
1029
|
|
|
1009
1030
|
Types: [TurnEndReason](./subsystems/session.md)
|
|
1010
1031
|
|
|
1011
|
-
Source: [`packages/core/session/src/types.ts:
|
|
1032
|
+
Source: [`packages/core/session/src/types.ts:276`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
1012
1033
|
|
|
1013
1034
|
<a id="turnstart--log-only"></a>
|
|
1014
1035
|
|
|
@@ -1024,7 +1045,7 @@ Source: [`packages/core/session/src/types.ts:237`](https://github.com/deepseek-a
|
|
|
1024
1045
|
'turn/start': { turn: number }
|
|
1025
1046
|
```
|
|
1026
1047
|
|
|
1027
|
-
Source: [`packages/core/session/src/types.ts:
|
|
1048
|
+
Source: [`packages/core/session/src/types.ts:267`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
1028
1049
|
|
|
1029
1050
|
### `user/*`
|
|
1030
1051
|
|
|
@@ -1043,7 +1064,7 @@ Source: [`packages/core/session/src/types.ts:228`](https://github.com/deepseek-a
|
|
|
1043
1064
|
'user/message': UserMessage
|
|
1044
1065
|
```
|
|
1045
1066
|
|
|
1046
|
-
Source: [`packages/core/session/src/types.ts:
|
|
1067
|
+
Source: [`packages/core/session/src/types.ts:288`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
1047
1068
|
|
|
1048
1069
|
### `web/*`
|
|
1049
1070
|
|
|
@@ -55,7 +55,11 @@ interface CodeRunResult {
|
|
|
55
55
|
* rendered string; a failed or value-less run leaves this absent.
|
|
56
56
|
*/
|
|
57
57
|
value?: CodeJsonValue
|
|
58
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Captured text. Each source channel preserves emission order; interleaving
|
|
60
|
+
* across independent channels is backend-dependent. Bounded only as part of
|
|
61
|
+
* the outer result.
|
|
62
|
+
*/
|
|
59
63
|
logs: string[]
|
|
60
64
|
/** Present iff the run failed; see {@link CodeRunFailure} for the taxonomy. */
|
|
61
65
|
error?: CodeRunFailure
|
|
@@ -134,7 +138,7 @@ type CodeBindingFunction = (args: unknown) => Promise<CodeJsonValue>
|
|
|
134
138
|
|
|
135
139
|
## Captured output and the failure taxonomy
|
|
136
140
|
|
|
137
|
-
Logs are plain strings
|
|
141
|
+
Logs are plain strings. Each source channel preserves emission order, while interleaving across independent channels is backend-dependent because channel metadata is not part of the seam. The runtime captures the program's console and stream output, and consumers render only the text. Implementations cap the serialized outer log-array plus completion-value or failure-message payload; fixed result-envelope syntax and consumer presentation whitespace are not part of that variable-payload ledger. Overflow is an explicit failure rather than in-band value substitution.
|
|
138
142
|
|
|
139
143
|
Failure kinds are **orthogonal outcomes reported independently** (per [defensive-patterns](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/defensive-patterns.md)): a budget expiry is not an exception, an abort is not a timeout, and a substrate death (e.g. OOM) is neither:
|
|
140
144
|
|
|
@@ -161,7 +165,7 @@ interface CodeRunFailure {
|
|
|
161
165
|
|
|
162
166
|
## The service
|
|
163
167
|
|
|
164
|
-
`CodeRuntime` (`ctx.codeRuntime`, abstract — defined in [`packages/code-runtime/code-runtime/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/code-runtime/code-runtime/src/index.ts)) is `run(request)` plus two readonly descriptors: `language` (what the program must be written in — `'typescript'` and `'python'` are the well-known values, those `dsh-tools` presents, and
|
|
168
|
+
`CodeRuntime` (`ctx.codeRuntime`, abstract — defined in [`packages/code-runtime/code-runtime/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/code-runtime/code-runtime/src/index.ts)) is `run(request)` plus two readonly descriptors: `language` (what the program must be written in — `'typescript'` and `'python'` are the well-known values, those `dsh-tools` presents, the TypeScript backend released and the Python backend experimental and private (not published); a consumer generating language-specific presentation switches on it and fails loud on one it cannot present) and `isolation` (the execution substrate — `'worker-thread'`, `'process'`, `'container'`; a diagnostic label, **not a security claim**). Implementations must keep runs isolated from each other (no cross-run state) and dispose to quiescence: in-flight runs are terminated and awaited before teardown completes.
|
|
165
169
|
|
|
166
170
|
<!-- BEGIN GENERATED cordis-surface (gen-cordis-catalog.ts) — do not edit between markers -->
|
|
167
171
|
|
|
@@ -11,7 +11,7 @@ Source: [`packages/interaction/commands/src/index.ts`](https://github.com/deepse
|
|
|
11
11
|
|
|
12
12
|
## Input metadata
|
|
13
13
|
|
|
14
|
-
The service exposes one optional unstructured-input descriptor: a hint plus an
|
|
14
|
+
The service exposes one optional unstructured-input descriptor: a hint plus an attachment-acceptance flag. Command availability follows plugin composition: every adapter consuming the registry sees every effective definition.
|
|
15
15
|
|
|
16
16
|
```ts type-equiv
|
|
17
17
|
/** Immutable metadata for a command's optional unstructured input. */
|
|
@@ -19,13 +19,13 @@ interface CommandInputDescriptor {
|
|
|
19
19
|
/** Placeholder shown before the user supplies free-form input. */
|
|
20
20
|
readonly hint: string
|
|
21
21
|
/**
|
|
22
|
-
* Whether composer
|
|
23
|
-
* false = the executor rejects an invocation carrying
|
|
22
|
+
* Whether composer attachments may accompany an invocation. Absent or
|
|
23
|
+
* false = the executor rejects an invocation carrying attachments and capable
|
|
24
24
|
* composers refuse the submission before dispatch. A declaring command's
|
|
25
25
|
* handler receives the admitted durable blocks and owns every further
|
|
26
26
|
* grammar decision, including rejecting sub-commands that cannot use them.
|
|
27
27
|
*/
|
|
28
|
-
readonly
|
|
28
|
+
readonly attachments?: boolean
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -67,13 +67,13 @@ interface CommandInvocation {
|
|
|
67
67
|
/** Exact text following the registered command name, including separator whitespace. */
|
|
68
68
|
readonly rawInput: string
|
|
69
69
|
/**
|
|
70
|
-
* Durably admitted image blocks accompanying this invocation, in submission
|
|
71
|
-
* order; empty unless the definition declares `input.
|
|
70
|
+
* Durably admitted image and file blocks accompanying this invocation, in submission
|
|
71
|
+
* order; empty unless the definition declares `input.attachments`. The handler
|
|
72
72
|
* owns their model-visible use — the registry never schedules them itself —
|
|
73
73
|
* and a handler whose grammar cannot use them in this invocation returns an
|
|
74
74
|
* error so the dispatching composer retains the originals.
|
|
75
75
|
*/
|
|
76
|
-
readonly attachments: readonly ImageBlock[]
|
|
76
|
+
readonly attachments: readonly (ImageBlock | FileBlock)[]
|
|
77
77
|
/** Cancellation signal owned by the dispatching UI request. */
|
|
78
78
|
readonly signal: AbortSignal
|
|
79
79
|
}
|
|
@@ -86,7 +86,7 @@ type CommandResult =
|
|
|
86
86
|
readonly kind: 'success'
|
|
87
87
|
readonly text?: string
|
|
88
88
|
/** Earlier authoritative domain event that owns a richer presentation. */
|
|
89
|
-
readonly sourceEventSeq?:
|
|
89
|
+
readonly sourceEventSeq?: SessionSeq
|
|
90
90
|
}
|
|
91
91
|
| { readonly kind: 'error'; readonly text: string }
|
|
92
92
|
```
|
|
@@ -141,6 +141,13 @@ Human-command registry. Plain-context definitions are global; definitions regist
|
|
|
141
141
|
*/
|
|
142
142
|
register(definition: CommandDefinition): () => void
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Register the sole authority that resolves staged file receipts for command submissions.
|
|
146
|
+
* @param resolver - Session-aware receipt resolver.
|
|
147
|
+
* @returns disposer that removes this exact resolver.
|
|
148
|
+
*/
|
|
149
|
+
registerFileReceiptResolver(resolver: CommandFileReceiptResolver): () => void
|
|
150
|
+
|
|
144
151
|
/**
|
|
145
152
|
* List the effective immutable command descriptors for one agent.
|
|
146
153
|
* @param agent - exact receiving agent and scoped-layer key.
|
|
@@ -169,23 +176,25 @@ find(agent: Agent, name: string): CommandDefinition | undefined
|
|
|
169
176
|
* handler-failure path is contained so the handler's own error stays the
|
|
170
177
|
* reported failure.
|
|
171
178
|
*
|
|
172
|
-
*
|
|
173
|
-
* command that does not declare `input.
|
|
174
|
-
* and an exceeded
|
|
175
|
-
* the handler runs
|
|
179
|
+
* Attachment admission is enforced here, not in the composer: attachments sent to a
|
|
180
|
+
* command that does not declare `input.attachments`, an absent attachment store,
|
|
181
|
+
* and an exceeded image limit each settle as an error result before
|
|
182
|
+
* the handler runs. Validation rejection starts no attachment writes;
|
|
183
|
+
* a storage failure can leave only unreachable content-addressed objects
|
|
184
|
+
* for deferred collection.
|
|
176
185
|
*
|
|
177
186
|
* @param agent - exact receiving agent.
|
|
178
187
|
* @param line - complete slash-command line.
|
|
179
|
-
* @param
|
|
180
|
-
* submission order; empty for a plain invocation.
|
|
188
|
+
* @param submittedAttachments - encoded images and staged file receipts accompanying the line,
|
|
189
|
+
* in submission order; empty for a plain invocation.
|
|
181
190
|
* @param signal - cancellation signal owned by the UI request.
|
|
182
191
|
* @returns the settled execution (result + lifecycle pairing id), or
|
|
183
192
|
* `undefined` when syntax or name does not resolve.
|
|
184
193
|
*/
|
|
185
|
-
@Remote async execute( agent: Agent, line: string,
|
|
194
|
+
@Remote async execute( agent: Agent, line: string, submittedAttachments: readonly CommandSubmitAttachment[], signal: AbortSignal, ): Promise<CommandExecution | undefined>
|
|
186
195
|
```
|
|
187
196
|
|
|
188
|
-
Types: [Agent](./core.md)
|
|
197
|
+
Types: [Agent](./core.md)
|
|
189
198
|
|
|
190
199
|
Source: [`packages/interaction/commands/src/index.ts`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/commands/src/index.ts)
|
|
191
200
|
|