dsh-plugin-guide 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.es.md +5 -1
- package/README.hi.md +5 -1
- package/README.md +5 -1
- package/README.pt.md +5 -1
- package/README.zh.md +5 -1
- package/dist/dsh-plugin-dev.js +3 -3
- package/guide/plugin-dev-guide.md +2 -2
- package/guide/quick-reference.es.md +2 -2
- package/guide/quick-reference.hi.md +1 -1
- package/guide/quick-reference.md +2 -2
- package/guide/quick-reference.pt.md +2 -2
- package/guide/quick-reference.zh-CN.md +2 -2
- package/package.json +3 -3
- package/references/official-docs/AGENTS.md +3 -3
- package/references/official-docs/SNAPSHOT.md +4 -4
- package/references/official-docs/THIRD_PARTY_NOTICES.md +4 -6
- package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
- package/references/official-docs/docs/agent-lifecycle.md +5 -3
- package/references/official-docs/docs/agent-lifecycle.zh.md +5 -3
- package/references/official-docs/docs/architecture.i18n.yaml +2 -2
- package/references/official-docs/docs/architecture.md +9 -4
- package/references/official-docs/docs/architecture.zh.md +9 -4
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +8 -1
- package/references/official-docs/docs/capability-seams.zh.md +8 -1
- package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/config-catalog.md +104 -68
- package/references/official-docs/docs/config-catalog.zh.md +101 -65
- package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/adding-a-package.md +1 -1
- package/references/official-docs/docs/cookbook/adding-a-package.zh.md +1 -1
- package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
- package/references/official-docs/docs/cookbook/extension-cookbook.md +12 -10
- package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +12 -10
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +2 -2
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +16 -12
- package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +16 -12
- package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
- package/references/official-docs/docs/event-producer-consumer.md +30 -29
- package/references/official-docs/docs/event-producer-consumer.zh.md +35 -34
- package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
- package/references/official-docs/docs/module-graph.md +214 -360
- package/references/official-docs/docs/module-graph.zh.md +214 -360
- package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/persistence-catalog.md +74 -64
- package/references/official-docs/docs/persistence-catalog.zh.md +72 -62
- package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/agent-team.md +4 -3
- package/references/official-docs/docs/subsystems/agent-team.zh.md +4 -3
- package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/attachment.md +157 -4
- package/references/official-docs/docs/subsystems/attachment.zh.md +157 -4
- package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/code-runtime.md +7 -3
- package/references/official-docs/docs/subsystems/code-runtime.zh.md +7 -3
- package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/commands.md +25 -16
- package/references/official-docs/docs/subsystems/commands.zh.md +25 -16
- package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/compaction.md +9 -9
- package/references/official-docs/docs/subsystems/compaction.zh.md +9 -9
- package/references/official-docs/docs/subsystems/conversation.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/conversation.md +4 -4
- package/references/official-docs/docs/subsystems/conversation.zh.md +4 -4
- package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/core.md +66 -4
- package/references/official-docs/docs/subsystems/core.zh.md +66 -4
- package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/feedback.md +2 -2
- package/references/official-docs/docs/subsystems/feedback.zh.md +2 -2
- package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/llm-streaming.md +23 -2
- package/references/official-docs/docs/subsystems/llm-streaming.zh.md +23 -2
- package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/persistence.md +183 -191
- package/references/official-docs/docs/subsystems/persistence.zh.md +183 -191
- package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/schedule.md +1 -1
- package/references/official-docs/docs/subsystems/schedule.zh.md +1 -1
- package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-projection.md +40 -17
- package/references/official-docs/docs/subsystems/session-projection.zh.md +40 -17
- package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-query.md +19 -13
- package/references/official-docs/docs/subsystems/session-query.zh.md +19 -13
- package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-reference.md +25 -1
- package/references/official-docs/docs/subsystems/session-reference.zh.md +25 -1
- package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-telemetry.md +6 -5
- package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -5
- package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session-title.md +5 -5
- package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
- package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/session.md +143 -71
- package/references/official-docs/docs/subsystems/session.zh.md +143 -71
- package/references/official-docs/docs/subsystems/slots.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/slots.md +1 -0
- package/references/official-docs/docs/subsystems/slots.zh.md +1 -0
- package/references/official-docs/docs/subsystems/storage.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/storage.md +28 -5
- package/references/official-docs/docs/subsystems/storage.zh.md +28 -5
- package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/subagent.md +32 -88
- package/references/official-docs/docs/subsystems/subagent.zh.md +31 -87
- package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/token-meter.md +2 -2
- package/references/official-docs/docs/subsystems/token-meter.zh.md +2 -2
- package/references/official-docs/docs/subsystems/web-client.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/web-client.md +1 -1
- package/references/official-docs/docs/subsystems/web-client.zh.md +1 -1
- package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/workspace.md +8 -8
- package/references/official-docs/docs/subsystems/workspace.zh.md +8 -8
- package/references/official-docs/docs/testing.i18n.yaml +2 -2
- package/references/official-docs/docs/testing.md +2 -2
- package/references/official-docs/docs/testing.zh.md +2 -2
- package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-catalog.md +9 -63
- package/references/official-docs/docs/tool-catalog.zh.md +8 -62
- package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +6 -0
- package/references/official-docs/docs/user/guide/network-proxy.md +85 -0
- package/references/official-docs/docs/user/guide/network-proxy.zh.md +85 -0
- package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
- package/references/official-docs/docs/user/guide/providers.md +70 -17
- package/references/official-docs/docs/user/guide/providers.zh.md +70 -17
- package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
- package/references/official-docs/docs/web-styling.md +4 -0
- package/references/official-docs/docs/web-styling.zh.md +4 -0
- package/references/official-docs/packages/AGENTS.md +2 -2
- package/references/official-docs/website-docs.ts +8 -0
- package/templates/js/README.es.md +1 -1
- package/templates/js/README.hi.md +1 -1
- package/templates/js/README.md +1 -1
- package/templates/js/README.pt.md +1 -1
- package/templates/js/README.zh.md +1 -1
- package/templates/ts/README.es.md +1 -1
- package/templates/ts/README.hi.md +1 -1
- package/templates/ts/README.md +1 -1
- package/templates/ts/README.pt.md +1 -1
- package/templates/ts/README.zh.md +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
英文源文件根据源码生成(`scripts/gen-persistence-catalog.ts`),并由 `pnpm run verify-persistence-catalog`(`doc-sync`(文档同步门禁)的一部分)验证新鲜度;本中文文件作为经评审对侧通过双语配对维护。声明块保留源码声明和嵌套属性的 JSDoc,只移除其所在接口/模块带来的缩进,并使用 `ts persistence-catalog` 围栏(doc-typecheck 会跳过这些围栏,因为声明引用了其所属模块中的类型)。payload 中的类型名称会链接到记录该类型的页面。参见 [persistence-log-catalog Agent Note](../.agents/notes/archived/process/2026-07-04-persistence-log-catalog.md)。
|
|
11
11
|
|
|
12
|
-
以下信封声明组合了每个事件的 `type`、单调递增的 `seq`、以 epoch 毫秒表示的 `time`、`data`、可选的未知类型跳过标记 `ignorable`,以及条件字段 `surfaceOp`/`sourceEventSeqs`。**surface** 表示 `SurfaceEventType` 成员:它会生成一条 LLM(大语言模型)消息,并声明该事件如何加入 surface 列表。**log-only** 表示其他所有事件:这类记录可持久化、可回放,但不参与派生历史。每个 payload 均可进行 JSON 序列化(在 `Session.append`
|
|
12
|
+
以下信封声明组合了每个事件的 `type`、单调递增的 `seq`、以 epoch 毫秒表示的 `time`、`data`、可选的未知类型跳过标记 `ignorable`,以及条件字段 `surfaceOp`/`sourceEventSeqs`。**surface** 表示 `SurfaceEventType` 成员:它会生成一条 LLM(大语言模型)消息,并声明该事件如何加入 surface 列表。**log-only** 表示其他所有事件:这类记录可持久化、可回放,但不参与派生历史。每个 payload 均可进行 JSON 序列化(在 `Session.append` 处强制执行)。当前 writer 会写入 `SESSION_FORMAT_VERSION`;受支持的历史产物通过构建期静态相邻迁移目录进入这套当前词汇(参见[版本生命周期](subsystems/persistence.zh.md))。范围仅限本仓库中的包;下游插件可以继续合并其他当前版本事件类型,这些类型按设计不属于本目录,并且在后续格式迁移边中需要显式 disposition。
|
|
13
13
|
|
|
14
14
|
## 事件信封
|
|
15
15
|
|
|
@@ -20,7 +20,8 @@ export type SessionEventType = keyof SessionEventMap
|
|
|
20
20
|
/**
|
|
21
21
|
* The subset of {@link SessionEventType} values whose events produce LLM
|
|
22
22
|
* messages and are eligible to appear on the ordered surface. Only these
|
|
23
|
-
* event types may carry {@link SurfaceOp} and
|
|
23
|
+
* event types may carry {@link SurfaceOp}; user and tool events may also cite
|
|
24
|
+
* earlier sources through {@link SessionEvent.sourceEventSeqs}.
|
|
24
25
|
*/
|
|
25
26
|
export type SurfaceEventType =
|
|
26
27
|
| 'user/message'
|
|
@@ -42,7 +43,7 @@ export type SurfaceEventType =
|
|
|
42
43
|
*/
|
|
43
44
|
export type SurfaceOp =
|
|
44
45
|
| 'append'
|
|
45
|
-
| { op: 'replace'; start:
|
|
46
|
+
| { op: 'replace'; start: SessionSeq; end: SessionSeq }
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
49
|
* One immutable entry in the session log.
|
|
@@ -53,7 +54,7 @@ export type SurfaceOp =
|
|
|
53
54
|
* The {@link sourceEventSeqs} and {@link surfaceOp} fields are conditional:
|
|
54
55
|
* they only exist on {@link SurfaceEventType} variants (`user/message`,
|
|
55
56
|
* `assistant/message`, `tool/result`).
|
|
56
|
-
* Non-surface events (boundary markers,
|
|
57
|
+
* Non-surface events (boundary markers, attempts, errors) never carry
|
|
57
58
|
* surface metadata — the compiler enforces this at `Session.append()`
|
|
58
59
|
* call sites.
|
|
59
60
|
*/
|
|
@@ -61,7 +62,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
61
62
|
[K in SessionEventType]: {
|
|
62
63
|
type: K
|
|
63
64
|
/** Monotonic sequence number within the session. */
|
|
64
|
-
seq:
|
|
65
|
+
seq: SessionSeq
|
|
65
66
|
/** Unix epoch milliseconds. */
|
|
66
67
|
time: number
|
|
67
68
|
data: SessionEventMap[K]
|
|
@@ -78,21 +79,18 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
78
79
|
ignorable?: true
|
|
79
80
|
} & (K extends SurfaceEventType ? {
|
|
80
81
|
/**
|
|
81
|
-
* Seq numbers of earlier events that this event cites as sources
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* `assistant/message` may carry a present empty array for a known empty
|
|
85
|
-
* provider stream; when the field is absent, the event does not record which
|
|
86
|
-
* earlier events produced the message.
|
|
82
|
+
* Seq numbers of earlier events that this event cites as sources, such as
|
|
83
|
+
* the surface nodes shadowed by a compaction replacement. A v2
|
|
84
|
+
* `assistant/message` embeds its provider stream and cannot carry this field.
|
|
87
85
|
*/
|
|
88
|
-
sourceEventSeqs?:
|
|
86
|
+
sourceEventSeqs?: SessionSeq[]
|
|
89
87
|
/** How this event entered the surface; absent for non-surface events. */
|
|
90
88
|
surfaceOp?: SurfaceOp
|
|
91
89
|
} : object)
|
|
92
90
|
}[T]
|
|
93
91
|
```
|
|
94
92
|
|
|
95
|
-
来源:[`packages/core/session/src/types.ts:
|
|
93
|
+
来源:[`packages/core/session/src/types.ts:379`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:387`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:416`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:447`](../packages/core/session/src/types.ts)
|
|
96
94
|
|
|
97
95
|
## 事件
|
|
98
96
|
|
|
@@ -191,7 +189,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
191
189
|
* The session's approval policy was switched — log-only, durable,
|
|
192
190
|
* replayable, never in the model transcript (the model learns the policy
|
|
193
191
|
* from the runtime-context snapshot and live switch notices). The LAST
|
|
194
|
-
* such event is the session's override
|
|
192
|
+
* such event is the session's override.
|
|
195
193
|
* `source: 'delegation'` marks an override seeded into a child; an absent
|
|
196
194
|
* source is a runtime switch.
|
|
197
195
|
*/
|
|
@@ -206,18 +204,20 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
206
204
|
|
|
207
205
|
### `assistant/*`
|
|
208
206
|
|
|
209
|
-
<a id="
|
|
207
|
+
<a id="assistantattempt--log-only"></a>
|
|
210
208
|
|
|
211
|
-
#### `assistant/
|
|
209
|
+
#### `assistant/attempt` — log-only
|
|
212
210
|
|
|
213
211
|
```ts persistence-catalog
|
|
214
|
-
/**
|
|
215
|
-
|
|
212
|
+
/**
|
|
213
|
+
* One model attempt that committed no surface message. The embedded stream
|
|
214
|
+
* preserves a failed, retried, cancelled, or stream-error attempt that
|
|
215
|
+
* reached settlement without fabricating model-visible history.
|
|
216
|
+
*/
|
|
217
|
+
'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[] }
|
|
216
218
|
```
|
|
217
219
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
来源:[`packages/core/session/src/types.ts:246`](../packages/core/session/src/types.ts)
|
|
220
|
+
来源:[`packages/core/session/src/types.ts:313`](../packages/core/session/src/types.ts)
|
|
221
221
|
|
|
222
222
|
<a id="assistantmessage--surface"></a>
|
|
223
223
|
|
|
@@ -234,12 +234,20 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
234
234
|
* marker distinguishes that prefix without re-deriving interruption from turn
|
|
235
235
|
* boundaries. An aborted turn with no such event streamed no visible content.
|
|
236
236
|
*/
|
|
237
|
-
'assistant/message': {
|
|
237
|
+
'assistant/message': {
|
|
238
|
+
turn: number
|
|
239
|
+
step: number
|
|
240
|
+
message: AssistantMessage
|
|
241
|
+
/** Exact timed model stream, compacted without joining delta boundaries. */
|
|
242
|
+
stream: AssistantStreamRecord[]
|
|
243
|
+
usage?: TokenUsage
|
|
244
|
+
interrupted?: true
|
|
245
|
+
}
|
|
238
246
|
```
|
|
239
247
|
|
|
240
248
|
类型:[TokenUsage](subsystems/llm-streaming.zh.md)
|
|
241
249
|
|
|
242
|
-
来源:[`packages/core/session/src/types.ts:
|
|
250
|
+
来源:[`packages/core/session/src/types.ts:299`](../packages/core/session/src/types.ts)
|
|
243
251
|
|
|
244
252
|
### `command/*`
|
|
245
253
|
|
|
@@ -258,11 +266,11 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
258
266
|
commandId: CommandId
|
|
259
267
|
kind: 'success' | 'error'
|
|
260
268
|
text?: string
|
|
261
|
-
sourceEventSeq?:
|
|
269
|
+
sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq
|
|
262
270
|
}
|
|
263
271
|
```
|
|
264
272
|
|
|
265
|
-
来源:[`packages/interaction/commands/src/types.ts:
|
|
273
|
+
来源:[`packages/interaction/commands/src/types.ts:110`](../packages/interaction/commands/src/types.ts)
|
|
266
274
|
|
|
267
275
|
<a id="commandrun--log-only"></a>
|
|
268
276
|
|
|
@@ -282,7 +290,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
282
290
|
'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource }
|
|
283
291
|
```
|
|
284
292
|
|
|
285
|
-
来源:[`packages/interaction/commands/src/types.ts:
|
|
293
|
+
来源:[`packages/interaction/commands/src/types.ts:103`](../packages/interaction/commands/src/types.ts)
|
|
286
294
|
|
|
287
295
|
### `compaction/*`
|
|
288
296
|
|
|
@@ -298,7 +306,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
298
306
|
'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string }
|
|
299
307
|
```
|
|
300
308
|
|
|
301
|
-
来源:[`packages/compaction/compaction/src/types.ts:
|
|
309
|
+
来源:[`packages/compaction/compaction/src/types.ts:72`](../packages/compaction/compaction/src/types.ts)
|
|
302
310
|
|
|
303
311
|
<a id="compactionprune--log-only"></a>
|
|
304
312
|
|
|
@@ -316,15 +324,15 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
316
324
|
*/
|
|
317
325
|
'compaction/prune': {
|
|
318
326
|
/** The replaced range's first and last surface-node seqs (a surface-position span, like {@link CompactionResult.shadowedRange}). */
|
|
319
|
-
shadowedRange: { start:
|
|
327
|
+
shadowedRange: { start: SessionSeq; end: SessionSeq }
|
|
320
328
|
/** The seqs of all shadowed surface nodes, in surface order. */
|
|
321
|
-
shadowedSeqs:
|
|
329
|
+
shadowedSeqs: SessionSeq[]
|
|
322
330
|
/** Heuristic price of the shadowed content under the token-meter's fixed estimator. */
|
|
323
331
|
shadowedTokenCount: number
|
|
324
332
|
}
|
|
325
333
|
```
|
|
326
334
|
|
|
327
|
-
来源:[`packages/compaction/compaction/src/types.ts:
|
|
335
|
+
来源:[`packages/compaction/compaction/src/types.ts:82`](../packages/compaction/compaction/src/types.ts)
|
|
328
336
|
|
|
329
337
|
<a id="compactionstart--log-only"></a>
|
|
330
338
|
|
|
@@ -339,7 +347,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
339
347
|
'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null }
|
|
340
348
|
```
|
|
341
349
|
|
|
342
|
-
来源:[`packages/compaction/compaction/src/types.ts:
|
|
350
|
+
来源:[`packages/compaction/compaction/src/types.ts:24`](../packages/compaction/compaction/src/types.ts)
|
|
343
351
|
|
|
344
352
|
<a id="compactionsummary--log-only"></a>
|
|
345
353
|
|
|
@@ -359,8 +367,8 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
359
367
|
compactionId: CompactionId
|
|
360
368
|
sourceCommandId?: CommandId
|
|
361
369
|
summary: ContentBlock[]
|
|
362
|
-
shadowedRange: { start:
|
|
363
|
-
shadowedSeqs:
|
|
370
|
+
shadowedRange: { start: SessionSeq; end: SessionSeq }
|
|
371
|
+
shadowedSeqs: SessionSeq[]
|
|
364
372
|
shadowedTokenCount: number
|
|
365
373
|
/** The provider route that wrote the summary. */
|
|
366
374
|
provider: string
|
|
@@ -393,7 +401,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
393
401
|
|
|
394
402
|
类型:[ContentBlock](subsystems/core.zh.md) · [TokenUsage](subsystems/llm-streaming.zh.md)
|
|
395
403
|
|
|
396
|
-
来源:[`packages/compaction/compaction/src/types.ts:
|
|
404
|
+
来源:[`packages/compaction/compaction/src/types.ts:34`](../packages/compaction/compaction/src/types.ts)
|
|
397
405
|
|
|
398
406
|
### `feedback/*`
|
|
399
407
|
|
|
@@ -565,7 +573,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
565
573
|
'request/context': RequestContext
|
|
566
574
|
```
|
|
567
575
|
|
|
568
|
-
来源:[`packages/core/session/src/types.ts:
|
|
576
|
+
来源:[`packages/core/session/src/types.ts:341`](../packages/core/session/src/types.ts)
|
|
569
577
|
|
|
570
578
|
<a id="requestheader--log-only"></a>
|
|
571
579
|
|
|
@@ -584,7 +592,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
584
592
|
}
|
|
585
593
|
```
|
|
586
594
|
|
|
587
|
-
来源:[`packages/core/session/src/types.ts:
|
|
595
|
+
来源:[`packages/core/session/src/types.ts:331`](../packages/core/session/src/types.ts)
|
|
588
596
|
|
|
589
597
|
### `sandbox/*`
|
|
590
598
|
|
|
@@ -638,12 +646,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
638
646
|
* Marks the end of a constructor seed. Events before it have smaller seq
|
|
639
647
|
* values and came from the seed (resume, fork, or replay); this lifecycle
|
|
640
648
|
* produced none of them. This log-only event is the durable projection of
|
|
641
|
-
* {@link Session.firstLiveSeq}.
|
|
642
|
-
* carry the meaning.
|
|
649
|
+
* {@link Session.firstLiveSeq}.
|
|
643
650
|
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
651
|
+
* A fresh fork child owns one `{ inherited: true }` marker at its exact
|
|
652
|
+
* inherited-prefix cut, even when that prefix ends in an ancestor marker.
|
|
653
|
+
* The last tagged marker is the current Session's cut; untagged markers keep
|
|
654
|
+
* ordinary restore and replay lifecycle boundaries.
|
|
647
655
|
*
|
|
648
656
|
* `Session`'s constructor is the only legitimate writer. The invariant
|
|
649
657
|
* companion deliberately constrains nothing here, so a plugin appending one
|
|
@@ -656,10 +664,10 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
656
664
|
* writers — a concurrently live session holds its own boundary elsewhere,
|
|
657
665
|
* so tolerating concurrent writers needs a signal beyond the log.
|
|
658
666
|
*/
|
|
659
|
-
'session/end-seed':
|
|
667
|
+
'session/end-seed': { inherited?: true }
|
|
660
668
|
```
|
|
661
669
|
|
|
662
|
-
来源:[`packages/core/session/src/types.ts:
|
|
670
|
+
来源:[`packages/core/session/src/types.ts:375`](../packages/core/session/src/types.ts)
|
|
663
671
|
|
|
664
672
|
<a id="sessiontitle--log-only"></a>
|
|
665
673
|
|
|
@@ -675,7 +683,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
675
683
|
|
|
676
684
|
类型:[SessionTitleEventData](subsystems/session-title.zh.md)
|
|
677
685
|
|
|
678
|
-
来源:[`packages/session/session-title/src/index.ts:
|
|
686
|
+
来源:[`packages/session/session-title/src/index.ts:77`](../packages/session/session-title/src/index.ts)
|
|
679
687
|
|
|
680
688
|
<a id="sessiontitle-llm-request--log-only"></a>
|
|
681
689
|
|
|
@@ -688,7 +696,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
688
696
|
|
|
689
697
|
类型:[SessionTitleLlmRequestEventData](subsystems/session-title.zh.md)
|
|
690
698
|
|
|
691
|
-
来源:[`packages/session/session-title-llm/src/index.ts:
|
|
699
|
+
来源:[`packages/session/session-title-llm/src/index.ts:45`](../packages/session/session-title-llm/src/index.ts)
|
|
692
700
|
|
|
693
701
|
### `session-log-deepseek/*`
|
|
694
702
|
|
|
@@ -701,12 +709,14 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
701
709
|
'session-log-deepseek/delivery-accepted': {
|
|
702
710
|
/** Session identity the accepted delivery carried; inherited fork markers retain the parent's id. */
|
|
703
711
|
sessionId: import('@deepseek-ai/dsh-session/types').SessionId
|
|
712
|
+
/** Accepted Session format generation; absence identifies version 0. */
|
|
713
|
+
sessionFormatVersion?: number
|
|
704
714
|
/** Last canonical event included in the accepted request. */
|
|
705
|
-
throughSeq:
|
|
715
|
+
throughSeq: import('@deepseek-ai/dsh-session/types').SessionSeq
|
|
706
716
|
}
|
|
707
717
|
```
|
|
708
718
|
|
|
709
|
-
来源:[`packages/session/session-log-deepseek/src/types.ts:
|
|
719
|
+
来源:[`packages/session/session-log-deepseek/src/types.ts:59`](../packages/session/session-log-deepseek/src/types.ts)
|
|
710
720
|
|
|
711
721
|
### `step/*`
|
|
712
722
|
|
|
@@ -719,7 +729,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
719
729
|
'step/end': { turn: number; step: number }
|
|
720
730
|
```
|
|
721
731
|
|
|
722
|
-
来源:[`packages/core/session/src/types.ts:
|
|
732
|
+
来源:[`packages/core/session/src/types.ts:281`](../packages/core/session/src/types.ts)
|
|
723
733
|
|
|
724
734
|
<a id="stepstart--log-only"></a>
|
|
725
735
|
|
|
@@ -730,7 +740,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
730
740
|
'step/start': { turn: number; step: number }
|
|
731
741
|
```
|
|
732
742
|
|
|
733
|
-
来源:[`packages/core/session/src/types.ts:
|
|
743
|
+
来源:[`packages/core/session/src/types.ts:279`](../packages/core/session/src/types.ts)
|
|
734
744
|
|
|
735
745
|
### `subagent/*`
|
|
736
746
|
|
|
@@ -778,12 +788,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
778
788
|
|
|
779
789
|
```ts persistence-catalog
|
|
780
790
|
/** Whole teammate lifecycle value, stored only in the Team Lead Session. */
|
|
781
|
-
'team/member': { version:
|
|
791
|
+
'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot }
|
|
782
792
|
```
|
|
783
793
|
|
|
784
794
|
类型:[TeamId](subsystems/agent-team.zh.md) · [TeamMemberSnapshot](subsystems/agent-team.zh.md)
|
|
785
795
|
|
|
786
|
-
来源:[`packages/experimental/agent-team/src/types.ts:
|
|
796
|
+
来源:[`packages/experimental/agent-team/src/types.ts:204`](../packages/experimental/agent-team/src/types.ts)
|
|
787
797
|
|
|
788
798
|
<a id="teammessagedelivered--log-only"></a>
|
|
789
799
|
|
|
@@ -792,7 +802,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
792
802
|
```ts persistence-catalog
|
|
793
803
|
/** Durable acknowledgement that the target Session recorded the message. */
|
|
794
804
|
'team/message/delivered': {
|
|
795
|
-
version:
|
|
805
|
+
version: 2
|
|
796
806
|
teamId: TeamId
|
|
797
807
|
messageId: TeamMessageId
|
|
798
808
|
targetId: SessionId
|
|
@@ -801,7 +811,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
801
811
|
|
|
802
812
|
类型:[TeamId](subsystems/agent-team.zh.md) · [TeamMessageId](subsystems/agent-team.zh.md)
|
|
803
813
|
|
|
804
|
-
来源:[`packages/experimental/agent-team/src/types.ts:
|
|
814
|
+
来源:[`packages/experimental/agent-team/src/types.ts:210`](../packages/experimental/agent-team/src/types.ts)
|
|
805
815
|
|
|
806
816
|
<a id="teammessagequeued--log-only"></a>
|
|
807
817
|
|
|
@@ -809,12 +819,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
809
819
|
|
|
810
820
|
```ts persistence-catalog
|
|
811
821
|
/** Durable mailbox enqueue, stored before delivery is attempted. */
|
|
812
|
-
'team/message/queued': { version:
|
|
822
|
+
'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot }
|
|
813
823
|
```
|
|
814
824
|
|
|
815
825
|
类型:[TeamId](subsystems/agent-team.zh.md) · [TeamMessageSnapshot](subsystems/agent-team.zh.md)
|
|
816
826
|
|
|
817
|
-
来源:[`packages/experimental/agent-team/src/types.ts:
|
|
827
|
+
来源:[`packages/experimental/agent-team/src/types.ts:208`](../packages/experimental/agent-team/src/types.ts)
|
|
818
828
|
|
|
819
829
|
<a id="teamtask--log-only"></a>
|
|
820
830
|
|
|
@@ -822,12 +832,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
822
832
|
|
|
823
833
|
```ts persistence-catalog
|
|
824
834
|
/** Whole shared-task value, stored only in the Team Lead Session. */
|
|
825
|
-
'team/task': { version:
|
|
835
|
+
'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot }
|
|
826
836
|
```
|
|
827
837
|
|
|
828
838
|
类型:[TeamId](subsystems/agent-team.zh.md) · [TeamTaskSnapshot](subsystems/agent-team.zh.md)
|
|
829
839
|
|
|
830
|
-
来源:[`packages/experimental/agent-team/src/types.ts:
|
|
840
|
+
来源:[`packages/experimental/agent-team/src/types.ts:206`](../packages/experimental/agent-team/src/types.ts)
|
|
831
841
|
|
|
832
842
|
### `todo/*`
|
|
833
843
|
|
|
@@ -861,7 +871,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
861
871
|
|
|
862
872
|
类型:[ToolCallId](subsystems/core.zh.md)
|
|
863
873
|
|
|
864
|
-
来源:[`packages/core/session/src/types.ts:
|
|
874
|
+
来源:[`packages/core/session/src/types.ts:308`](../packages/core/session/src/types.ts)
|
|
865
875
|
|
|
866
876
|
<a id="toolcode-dispatch--log-only"></a>
|
|
867
877
|
|
|
@@ -936,7 +946,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
936
946
|
}
|
|
937
947
|
```
|
|
938
948
|
|
|
939
|
-
来源:[`packages/core/session/src/types.ts:
|
|
949
|
+
来源:[`packages/core/session/src/types.ts:320`](../packages/core/session/src/types.ts)
|
|
940
950
|
|
|
941
951
|
### `tool-workflow/*`
|
|
942
952
|
|
|
@@ -1016,7 +1026,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
1016
1026
|
|
|
1017
1027
|
类型:[TurnEndReason](subsystems/session.zh.md)
|
|
1018
1028
|
|
|
1019
|
-
来源:[`packages/core/session/src/types.ts:
|
|
1029
|
+
来源:[`packages/core/session/src/types.ts:277`](../packages/core/session/src/types.ts)
|
|
1020
1030
|
|
|
1021
1031
|
<a id="turnstart--log-only"></a>
|
|
1022
1032
|
|
|
@@ -1032,7 +1042,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
1032
1042
|
'turn/start': { turn: number }
|
|
1033
1043
|
```
|
|
1034
1044
|
|
|
1035
|
-
来源:[`packages/core/session/src/types.ts:
|
|
1045
|
+
来源:[`packages/core/session/src/types.ts:268`](../packages/core/session/src/types.ts)
|
|
1036
1046
|
|
|
1037
1047
|
### `user/*`
|
|
1038
1048
|
|
|
@@ -1051,7 +1061,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
1051
1061
|
'user/message': UserMessage
|
|
1052
1062
|
```
|
|
1053
1063
|
|
|
1054
|
-
来源:[`packages/core/session/src/types.ts:
|
|
1064
|
+
来源:[`packages/core/session/src/types.ts:289`](../packages/core/session/src/types.ts)
|
|
1055
1065
|
|
|
1056
1066
|
### `web/*`
|
|
1057
1067
|
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/agent-team.md
|
|
5
|
-
agent-team.md:
|
|
6
|
-
agent-team.zh.md:
|
|
5
|
+
agent-team.md: 201123ea94499ff20cae25d68b1f7a826439d143
|
|
6
|
+
agent-team.zh.md: d6973ae6899c1d884dc51bd71afbd36a41895527
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](agent-team.zh.md)
|
|
4
4
|
|
|
5
|
-
Types shared by the experimental implicit-root Team domain, model tools, and host adapters. The [Agent Teams Agent Note](../../.agents/notes/implemented/feature/2026-08-05-agent-teams.md) owns identity, mailbox, task, and shared-checkout decisions; this page records the literal durable forms from [`packages/experimental/agent-team/src/types.ts`](../../packages/experimental/agent-team/src/types.ts).
|
|
5
|
+
Types shared by the experimental implicit-root Team domain, model tools, and host adapters. The [Agent Teams Agent Note](../../.agents/notes/implemented/feature/2026-08-05-agent-teams.md) owns identity, mailbox, task, and shared-checkout decisions; the [Team Steer messaging Agent Note](../../.agents/notes/implemented/simplification/2026-08-30-team-send-message-steer.md) owns message scheduling; this page records the literal durable forms from [`packages/experimental/agent-team/src/types.ts`](../../packages/experimental/agent-team/src/types.ts).
|
|
6
6
|
|
|
7
7
|
## Identity and roster
|
|
8
8
|
|
|
@@ -34,11 +34,12 @@ interface TeamMessageSnapshot {
|
|
|
34
34
|
readonly senderId: SessionId
|
|
35
35
|
readonly senderName: string
|
|
36
36
|
readonly targetId: SessionId
|
|
37
|
-
readonly delivery: 'quiet' | 'wakeup'
|
|
38
37
|
readonly content: ContentBlock[]
|
|
39
38
|
}
|
|
40
39
|
```
|
|
41
40
|
|
|
41
|
+
Every message attempts Steer delivery. A running target receives it at the nearest step boundary, an idle target starts a turn, and an inactive teammate cold-resumes. Scheduling is not stored in the durable record because callers cannot select another mode.
|
|
42
|
+
|
|
42
43
|
The target Session keeps message identity and sender attribution on both the pending inbox item and the eventual user message. Folding that source across inbox and history is the target-side de-duplication key; the model-visible framing repeats the id and sender.
|
|
43
44
|
|
|
44
45
|
```ts type-equiv
|
|
@@ -116,7 +117,7 @@ async spawnTeammate(caller: Agent, request: SpawnTeammateRequest): Promise<Spawn
|
|
|
116
117
|
/**
|
|
117
118
|
* Queue one durable peer message, then attempt immediate delivery.
|
|
118
119
|
* @param caller - exact live sending Team member.
|
|
119
|
-
* @param request - target name, content,
|
|
120
|
+
* @param request - target name, content, and pre-queue cancellation.
|
|
120
121
|
* @returns durable message identity and immediate-delivery observation.
|
|
121
122
|
*/
|
|
122
123
|
async sendMessage(caller: Agent, request: SendTeamMessageRequest): Promise<SendTeamMessageResult>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](agent-team.md) | 中文
|
|
4
4
|
|
|
5
|
-
实验性隐式 Root Team 领域、模型工具与宿主适配器共享的类型。[Agent Teams Agent Note](../../.agents/notes/implemented/feature/2026-08-05-agent-teams.zh.md)负责身份、mailbox、task 与共享 checkout
|
|
5
|
+
实验性隐式 Root Team 领域、模型工具与宿主适配器共享的类型。[Agent Teams Agent Note](../../.agents/notes/implemented/feature/2026-08-05-agent-teams.zh.md)负责身份、mailbox、task 与共享 checkout 决策;[Team Steer 消息 Agent Note](../../.agents/notes/implemented/simplification/2026-08-30-team-send-message-steer.zh.md)负责消息调度;本页记录 [`packages/experimental/agent-team/src/types.ts`](../../packages/experimental/agent-team/src/types.ts) 中的字面持久形式。
|
|
6
6
|
|
|
7
7
|
## 身份与 roster
|
|
8
8
|
|
|
@@ -34,11 +34,12 @@ interface TeamMessageSnapshot {
|
|
|
34
34
|
readonly senderId: SessionId
|
|
35
35
|
readonly senderName: string
|
|
36
36
|
readonly targetId: SessionId
|
|
37
|
-
readonly delivery: 'quiet' | 'wakeup'
|
|
38
37
|
readonly content: ContentBlock[]
|
|
39
38
|
}
|
|
40
39
|
```
|
|
41
40
|
|
|
41
|
+
每条消息都会尝试 Steer 投递。running target 在最近的步骤边界收到消息,idle target 启动一个轮次,inactive teammate 则冷恢复。调用方不能选择其他模式,因此持久记录不存储调度方式。
|
|
42
|
+
|
|
42
43
|
target Session 会在 pending inbox 条目和最终用户消息上保留消息身份与发送者归因。跨 inbox 与历史折叠该 source 构成 target 侧去重键;模型可见的 framing 会重复 id 和发送者。
|
|
43
44
|
|
|
44
45
|
```ts type-equiv
|
|
@@ -116,7 +117,7 @@ async spawnTeammate(caller: Agent, request: SpawnTeammateRequest): Promise<Spawn
|
|
|
116
117
|
/**
|
|
117
118
|
* Queue one durable peer message, then attempt immediate delivery.
|
|
118
119
|
* @param caller - exact live sending Team member.
|
|
119
|
-
* @param request - target name, content,
|
|
120
|
+
* @param request - target name, content, and pre-queue cancellation.
|
|
120
121
|
* @returns durable message identity and immediate-delivery observation.
|
|
121
122
|
*/
|
|
122
123
|
async sendMessage(caller: Agent, request: SendTeamMessageRequest): Promise<SendTeamMessageResult>
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write docs/subsystems/attachment.md
|
|
5
|
-
attachment.md:
|
|
6
|
-
attachment.zh.md:
|
|
5
|
+
attachment.md: 53b3e51e5b1c87625256178287061386342bc055
|
|
6
|
+
attachment.zh.md: 549c06cc5abe542e5d6feeba10b24ebf6ba8dfd1
|