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.
Files changed (142) hide show
  1. package/README.es.md +5 -1
  2. package/README.hi.md +5 -1
  3. package/README.md +5 -1
  4. package/README.pt.md +5 -1
  5. package/README.zh.md +5 -1
  6. package/dist/dsh-plugin-dev.js +3 -3
  7. package/guide/plugin-dev-guide.md +2 -2
  8. package/guide/quick-reference.es.md +2 -2
  9. package/guide/quick-reference.hi.md +1 -1
  10. package/guide/quick-reference.md +2 -2
  11. package/guide/quick-reference.pt.md +2 -2
  12. package/guide/quick-reference.zh-CN.md +2 -2
  13. package/package.json +3 -3
  14. package/references/official-docs/AGENTS.md +3 -3
  15. package/references/official-docs/SNAPSHOT.md +4 -4
  16. package/references/official-docs/THIRD_PARTY_NOTICES.md +4 -6
  17. package/references/official-docs/docs/agent-lifecycle.i18n.yaml +2 -2
  18. package/references/official-docs/docs/agent-lifecycle.md +5 -3
  19. package/references/official-docs/docs/agent-lifecycle.zh.md +5 -3
  20. package/references/official-docs/docs/architecture.i18n.yaml +2 -2
  21. package/references/official-docs/docs/architecture.md +9 -4
  22. package/references/official-docs/docs/architecture.zh.md +9 -4
  23. package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
  24. package/references/official-docs/docs/capability-seams.md +8 -1
  25. package/references/official-docs/docs/capability-seams.zh.md +8 -1
  26. package/references/official-docs/docs/config-catalog.i18n.yaml +2 -2
  27. package/references/official-docs/docs/config-catalog.md +104 -68
  28. package/references/official-docs/docs/config-catalog.zh.md +101 -65
  29. package/references/official-docs/docs/cookbook/adding-a-package.i18n.yaml +2 -2
  30. package/references/official-docs/docs/cookbook/adding-a-package.md +1 -1
  31. package/references/official-docs/docs/cookbook/adding-a-package.zh.md +1 -1
  32. package/references/official-docs/docs/cookbook/extension-cookbook.i18n.yaml +2 -2
  33. package/references/official-docs/docs/cookbook/extension-cookbook.md +12 -10
  34. package/references/official-docs/docs/cookbook/extension-cookbook.zh.md +12 -10
  35. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.i18n.yaml +2 -2
  36. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.md +16 -12
  37. package/references/official-docs/docs/deepseek-llm-api-wire-extensions.zh.md +16 -12
  38. package/references/official-docs/docs/event-producer-consumer.i18n.yaml +2 -2
  39. package/references/official-docs/docs/event-producer-consumer.md +30 -29
  40. package/references/official-docs/docs/event-producer-consumer.zh.md +35 -34
  41. package/references/official-docs/docs/module-graph.i18n.yaml +2 -2
  42. package/references/official-docs/docs/module-graph.md +214 -360
  43. package/references/official-docs/docs/module-graph.zh.md +214 -360
  44. package/references/official-docs/docs/persistence-catalog.i18n.yaml +2 -2
  45. package/references/official-docs/docs/persistence-catalog.md +74 -64
  46. package/references/official-docs/docs/persistence-catalog.zh.md +72 -62
  47. package/references/official-docs/docs/subsystems/agent-team.i18n.yaml +2 -2
  48. package/references/official-docs/docs/subsystems/agent-team.md +4 -3
  49. package/references/official-docs/docs/subsystems/agent-team.zh.md +4 -3
  50. package/references/official-docs/docs/subsystems/attachment.i18n.yaml +2 -2
  51. package/references/official-docs/docs/subsystems/attachment.md +157 -4
  52. package/references/official-docs/docs/subsystems/attachment.zh.md +157 -4
  53. package/references/official-docs/docs/subsystems/code-runtime.i18n.yaml +2 -2
  54. package/references/official-docs/docs/subsystems/code-runtime.md +7 -3
  55. package/references/official-docs/docs/subsystems/code-runtime.zh.md +7 -3
  56. package/references/official-docs/docs/subsystems/commands.i18n.yaml +2 -2
  57. package/references/official-docs/docs/subsystems/commands.md +25 -16
  58. package/references/official-docs/docs/subsystems/commands.zh.md +25 -16
  59. package/references/official-docs/docs/subsystems/compaction.i18n.yaml +2 -2
  60. package/references/official-docs/docs/subsystems/compaction.md +9 -9
  61. package/references/official-docs/docs/subsystems/compaction.zh.md +9 -9
  62. package/references/official-docs/docs/subsystems/conversation.i18n.yaml +2 -2
  63. package/references/official-docs/docs/subsystems/conversation.md +4 -4
  64. package/references/official-docs/docs/subsystems/conversation.zh.md +4 -4
  65. package/references/official-docs/docs/subsystems/core.i18n.yaml +2 -2
  66. package/references/official-docs/docs/subsystems/core.md +66 -4
  67. package/references/official-docs/docs/subsystems/core.zh.md +66 -4
  68. package/references/official-docs/docs/subsystems/feedback.i18n.yaml +2 -2
  69. package/references/official-docs/docs/subsystems/feedback.md +2 -2
  70. package/references/official-docs/docs/subsystems/feedback.zh.md +2 -2
  71. package/references/official-docs/docs/subsystems/llm-streaming.i18n.yaml +2 -2
  72. package/references/official-docs/docs/subsystems/llm-streaming.md +23 -2
  73. package/references/official-docs/docs/subsystems/llm-streaming.zh.md +23 -2
  74. package/references/official-docs/docs/subsystems/persistence.i18n.yaml +2 -2
  75. package/references/official-docs/docs/subsystems/persistence.md +183 -191
  76. package/references/official-docs/docs/subsystems/persistence.zh.md +183 -191
  77. package/references/official-docs/docs/subsystems/schedule.i18n.yaml +2 -2
  78. package/references/official-docs/docs/subsystems/schedule.md +1 -1
  79. package/references/official-docs/docs/subsystems/schedule.zh.md +1 -1
  80. package/references/official-docs/docs/subsystems/session-projection.i18n.yaml +2 -2
  81. package/references/official-docs/docs/subsystems/session-projection.md +40 -17
  82. package/references/official-docs/docs/subsystems/session-projection.zh.md +40 -17
  83. package/references/official-docs/docs/subsystems/session-query.i18n.yaml +2 -2
  84. package/references/official-docs/docs/subsystems/session-query.md +19 -13
  85. package/references/official-docs/docs/subsystems/session-query.zh.md +19 -13
  86. package/references/official-docs/docs/subsystems/session-reference.i18n.yaml +2 -2
  87. package/references/official-docs/docs/subsystems/session-reference.md +25 -1
  88. package/references/official-docs/docs/subsystems/session-reference.zh.md +25 -1
  89. package/references/official-docs/docs/subsystems/session-telemetry.i18n.yaml +2 -2
  90. package/references/official-docs/docs/subsystems/session-telemetry.md +6 -5
  91. package/references/official-docs/docs/subsystems/session-telemetry.zh.md +6 -5
  92. package/references/official-docs/docs/subsystems/session-title.i18n.yaml +2 -2
  93. package/references/official-docs/docs/subsystems/session-title.md +5 -5
  94. package/references/official-docs/docs/subsystems/session-title.zh.md +5 -5
  95. package/references/official-docs/docs/subsystems/session.i18n.yaml +2 -2
  96. package/references/official-docs/docs/subsystems/session.md +143 -71
  97. package/references/official-docs/docs/subsystems/session.zh.md +143 -71
  98. package/references/official-docs/docs/subsystems/slots.i18n.yaml +2 -2
  99. package/references/official-docs/docs/subsystems/slots.md +1 -0
  100. package/references/official-docs/docs/subsystems/slots.zh.md +1 -0
  101. package/references/official-docs/docs/subsystems/storage.i18n.yaml +2 -2
  102. package/references/official-docs/docs/subsystems/storage.md +28 -5
  103. package/references/official-docs/docs/subsystems/storage.zh.md +28 -5
  104. package/references/official-docs/docs/subsystems/subagent.i18n.yaml +2 -2
  105. package/references/official-docs/docs/subsystems/subagent.md +32 -88
  106. package/references/official-docs/docs/subsystems/subagent.zh.md +31 -87
  107. package/references/official-docs/docs/subsystems/token-meter.i18n.yaml +2 -2
  108. package/references/official-docs/docs/subsystems/token-meter.md +2 -2
  109. package/references/official-docs/docs/subsystems/token-meter.zh.md +2 -2
  110. package/references/official-docs/docs/subsystems/web-client.i18n.yaml +2 -2
  111. package/references/official-docs/docs/subsystems/web-client.md +1 -1
  112. package/references/official-docs/docs/subsystems/web-client.zh.md +1 -1
  113. package/references/official-docs/docs/subsystems/workspace.i18n.yaml +2 -2
  114. package/references/official-docs/docs/subsystems/workspace.md +8 -8
  115. package/references/official-docs/docs/subsystems/workspace.zh.md +8 -8
  116. package/references/official-docs/docs/testing.i18n.yaml +2 -2
  117. package/references/official-docs/docs/testing.md +2 -2
  118. package/references/official-docs/docs/testing.zh.md +2 -2
  119. package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
  120. package/references/official-docs/docs/tool-catalog.md +9 -63
  121. package/references/official-docs/docs/tool-catalog.zh.md +8 -62
  122. package/references/official-docs/docs/user/guide/network-proxy.i18n.yaml +6 -0
  123. package/references/official-docs/docs/user/guide/network-proxy.md +85 -0
  124. package/references/official-docs/docs/user/guide/network-proxy.zh.md +85 -0
  125. package/references/official-docs/docs/user/guide/providers.i18n.yaml +2 -2
  126. package/references/official-docs/docs/user/guide/providers.md +70 -17
  127. package/references/official-docs/docs/user/guide/providers.zh.md +70 -17
  128. package/references/official-docs/docs/web-styling.i18n.yaml +2 -2
  129. package/references/official-docs/docs/web-styling.md +4 -0
  130. package/references/official-docs/docs/web-styling.zh.md +4 -0
  131. package/references/official-docs/packages/AGENTS.md +2 -2
  132. package/references/official-docs/website-docs.ts +8 -0
  133. package/templates/js/README.es.md +1 -1
  134. package/templates/js/README.hi.md +1 -1
  135. package/templates/js/README.md +1 -1
  136. package/templates/js/README.pt.md +1 -1
  137. package/templates/js/README.zh.md +1 -1
  138. package/templates/ts/README.es.md +1 -1
  139. package/templates/ts/README.hi.md +1 -1
  140. package/templates/ts/README.md +1 -1
  141. package/templates/ts/README.pt.md +1 -1
  142. 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` 处强制执行),整个格式固定为 `SESSION_FORMAT_VERSION = 0`:这是预发布格式,不暗示任何兼容性(参见[版本立场](subsystems/persistence.zh.md))。范围仅限本仓库中的包;下游插件可以继续合并其他事件类型,而这些类型按设计不属于本目录。
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 {@link SessionEvent.sourceEventSeqs}.
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: number; end: number }
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, chunks, usage, errors) never carry
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: number
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
- * (e.g. the `assistant/chunk` seqs that built an `assistant/message`,
83
- * or the surface nodes shadowed by a compaction replace node). An
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?: number[]
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:323`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:330`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:359`](../packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:391`](../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 ({@link effectiveApprovalPolicy}).
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="assistantchunk--log-only"></a>
207
+ <a id="assistantattempt--log-only"></a>
210
208
 
211
- #### `assistant/chunk` — log-only
209
+ #### `assistant/attempt` — log-only
212
210
 
213
211
  ```ts persistence-catalog
214
- /** Raw stream chunk — token-level replay fidelity. */
215
- 'assistant/chunk': { turn: number; step: number; chunk: StreamChunk }
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
- 类型:[StreamChunk](subsystems/llm-streaming.zh.md)
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': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true }
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:257`](../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?: number
269
+ sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq
262
270
  }
263
271
  ```
264
272
 
265
- 来源:[`packages/interaction/commands/src/types.ts:103`](../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:96`](../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:71`](../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: number; end: number }
327
+ shadowedRange: { start: SessionSeq; end: SessionSeq }
320
328
  /** The seqs of all shadowed surface nodes, in surface order. */
321
- shadowedSeqs: number[]
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:81`](../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:23`](../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: number; end: number }
363
- shadowedSeqs: number[]
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:33`](../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:296`](../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:286`](../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}. Its payload is empty — position and `time`
642
- * carry the meaning.
649
+ * {@link Session.firstLiveSeq}.
643
650
  *
644
- * Locate the LAST one in stored history. A seed already ending in one is not
645
- * re-marked, so reopening an untouched session does not grow its log per
646
- * pickup and the event need not be at the current `firstLiveSeq`.
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': Record<string, never>
667
+ 'session/end-seed': { inherited?: true }
660
668
  ```
661
669
 
662
- 来源:[`packages/core/session/src/types.ts:319`](../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:76`](../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:44`](../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: number
715
+ throughSeq: import('@deepseek-ai/dsh-session/types').SessionSeq
706
716
  }
707
717
  ```
708
718
 
709
- 来源:[`packages/session/session-log-deepseek/src/types.ts:26`](../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:236`](../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:234`](../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: 1; teamId: TeamId; member: TeamMemberSnapshot }
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:206`](../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: 1
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:212`](../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: 1; teamId: TeamId; message: TeamMessageSnapshot }
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:210`](../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: 1; teamId: TeamId; task: TeamTaskSnapshot }
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:208`](../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:263`](../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:275`](../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:232`](../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:223`](../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:244`](../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: e3a746734b067bb7ef8f083c5c9af9cb3707dcf7
6
- agent-team.zh.md: 1f885a73861c091b50d27d15080ebc09f6d382ec
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, scheduling mode, and pre-queue cancellation.
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 决策;本页记录 [`packages/experimental/agent-team/src/types.ts`](../../packages/experimental/agent-team/src/types.ts) 中的字面持久形式。
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, scheduling mode, and pre-queue cancellation.
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: 15daa2b8d541ba847d48f5c43a06c1c537df6d11
6
- attachment.zh.md: c74a18f6bec63e117afcdb141512be04f8d75f9a
5
+ attachment.md: 53b3e51e5b1c87625256178287061386342bc055
6
+ attachment.zh.md: 549c06cc5abe542e5d6feeba10b24ebf6ba8dfd1