dsh-plugin-dev-kb 1.0.9 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.en.md +14 -8
- package/README.md +14 -8
- package/docs/banner.svg +25 -0
- package/kb/INDEX.md +8 -2
- package/kb/README.md +4 -4
- package/kb/extra/AGENTS.md +3 -3
- package/kb/extra/cookbook/adding-a-remote-api.md +197 -0
- package/kb/extra/cookbook/adding-a-remote-api.zh.md +197 -0
- package/kb/extra/cookbook/adding-a-session-format-version.md +109 -0
- package/kb/extra/cookbook/adding-a-session-format-version.zh.md +109 -0
- package/kb/extra/cookbook/adding-a-vendored-package.md +1 -1
- package/kb/extra/cookbook/adding-a-vendored-package.zh.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
- package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
- package/kb/extra/deepseek-llm-api-wire-extensions.md +19 -15
- package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +19 -15
- package/kb/extra/development.md +13 -3
- package/kb/extra/development.zh.md +13 -3
- package/kb/extra/event-producer-consumer.md +49 -46
- package/kb/extra/event-producer-consumer.zh.md +52 -49
- package/kb/extra/i18n/README.md +2 -1
- package/kb/extra/i18n/README.zh.md +3 -2
- package/kb/extra/i18n/style-samples.md +2 -2
- package/kb/extra/i18n/translation-prompt.md +1 -1
- package/kb/extra/module-graph.md +493 -1002
- package/kb/extra/module-graph.zh.md +495 -1004
- package/kb/extra/rescope.md +1 -1
- package/kb/extra/rescope.zh.md +1 -1
- package/kb/extra/session-format-status.md +47 -0
- package/kb/extra/session-format-status.zh.md +47 -0
- package/kb/extra/subsystems/agent-team.md +3 -2
- package/kb/extra/subsystems/agent-team.zh.md +3 -2
- package/kb/extra/subsystems/attachment.md +157 -4
- package/kb/extra/subsystems/attachment.zh.md +157 -4
- package/kb/extra/subsystems/feedback.md +164 -30
- package/kb/extra/subsystems/feedback.zh.md +164 -30
- package/kb/extra/testing.md +9 -4
- package/kb/extra/testing.zh.md +9 -4
- package/kb/extra/web-styling.md +5 -0
- package/kb/extra/web-styling.zh.md +5 -0
- package/kb/meta/search-index.json +223 -151
- package/kb/meta/site-pages.txt +187 -181
- package/kb/meta/source.json +5 -5
- package/kb/meta/topics.md +5 -5
- package/kb/site/develop/basic/publish.md +1 -1
- package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +3 -2
- package/kb/site/develop/practice/llm-adapter.md +4 -3
- package/kb/site/en/develop/basic/publish.md +1 -1
- package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +3 -2
- package/kb/site/en/develop/practice/llm-adapter.md +4 -3
- package/kb/site/en/guide/network-proxy.md +87 -0
- package/kb/site/en/guide/providers.md +70 -17
- package/kb/site/en/guide/python-sdk.md +19 -3
- package/kb/site/en/guide/schedule.md +2 -0
- package/kb/site/en/reference/agent-lifecycle.md +17 -8
- package/kb/site/en/reference/api-gateway.md +2 -2
- package/kb/site/en/reference/capability-seams.md +24 -10
- package/kb/site/en/reference/config-catalog.md +322 -264
- package/kb/site/en/reference/cookbook/adding-a-package.md +1 -2
- package/kb/site/en/reference/cookbook/adding-a-settings-card.md +10 -8
- package/kb/site/en/reference/cookbook/adding-a-tool.md +1 -1
- package/kb/site/en/reference/cookbook/extension-cookbook.md +16 -13
- package/kb/site/en/reference/index.md +26 -9
- package/kb/site/en/reference/persistence-catalog.md +189 -95
- package/kb/site/en/reference/subsystems/approval.md +1 -1
- package/kb/site/en/reference/subsystems/client-modules.md +9 -0
- package/kb/site/en/reference/subsystems/client-resources.md +94 -0
- package/kb/site/en/reference/subsystems/code-runtime.md +7 -3
- package/kb/site/en/reference/subsystems/commands.md +25 -16
- package/kb/site/en/reference/subsystems/compaction.md +10 -10
- package/kb/site/en/reference/subsystems/conversation.md +11 -4
- package/kb/site/en/reference/subsystems/core.md +173 -29
- package/kb/site/en/reference/subsystems/credentials.md +5 -4
- package/kb/site/en/reference/subsystems/filesystem.md +15 -0
- package/kb/site/en/reference/subsystems/goal.md +38 -2
- package/kb/site/en/reference/subsystems/index.md +3 -1
- package/kb/site/en/reference/subsystems/invariants.md +1 -1
- package/kb/site/en/reference/subsystems/llm-streaming.md +43 -12
- package/kb/site/en/reference/subsystems/lsp.md +1 -1
- package/kb/site/en/reference/subsystems/permission-presets.md +5 -5
- package/kb/site/en/reference/subsystems/persistence.md +211 -199
- package/kb/site/en/reference/subsystems/plan.md +3 -3
- package/kb/site/en/reference/subsystems/sandbox.md +2 -0
- package/kb/site/en/reference/subsystems/schedule.md +9 -3
- package/kb/site/en/reference/subsystems/scope.md +1 -1
- package/kb/site/en/reference/subsystems/session-projection.md +50 -24
- package/kb/site/en/reference/subsystems/session-query.md +19 -13
- package/kb/site/en/reference/subsystems/session-reference.md +29 -1
- package/kb/site/en/reference/subsystems/session-telemetry.md +27 -10
- package/kb/site/en/reference/subsystems/session-title.md +6 -6
- package/kb/site/en/reference/subsystems/session.md +208 -103
- package/kb/site/en/reference/subsystems/settings.md +30 -12
- package/kb/site/en/reference/subsystems/shell.md +9 -6
- package/kb/site/en/reference/subsystems/sidebar-right.md +151 -0
- package/kb/site/en/reference/subsystems/skills.md +1 -1
- package/kb/site/en/reference/subsystems/slots.md +41 -32
- package/kb/site/en/reference/subsystems/spill.md +13 -6
- package/kb/site/en/reference/subsystems/storage.md +28 -5
- package/kb/site/en/reference/subsystems/subagent.md +58 -105
- package/kb/site/en/reference/subsystems/subprocess.md +25 -26
- package/kb/site/en/reference/subsystems/system-prompt.md +18 -3
- package/kb/site/en/reference/subsystems/token-meter.md +4 -3
- package/kb/site/en/reference/subsystems/tools.md +5 -5
- package/kb/site/en/reference/subsystems/typert.md +18 -18
- package/kb/site/en/reference/subsystems/web-client.md +1 -1
- package/kb/site/en/reference/subsystems/workspace.md +88 -9
- package/kb/site/en/reference/tool-catalog.md +56 -66
- package/kb/site/en/reference/tool-execution-pipeline.md +2 -2
- package/kb/site/guide/network-proxy.md +87 -0
- package/kb/site/guide/providers.md +70 -17
- package/kb/site/guide/python-sdk.md +19 -3
- package/kb/site/guide/schedule.md +2 -0
- package/kb/site/reference/agent-lifecycle.md +17 -8
- package/kb/site/reference/api-gateway.md +2 -2
- package/kb/site/reference/capability-seams.md +24 -10
- package/kb/site/reference/config-catalog.md +321 -263
- package/kb/site/reference/cookbook/adding-a-package.md +1 -2
- package/kb/site/reference/cookbook/adding-a-settings-card.md +10 -8
- package/kb/site/reference/cookbook/adding-a-tool.md +1 -1
- package/kb/site/reference/cookbook/extension-cookbook.md +16 -13
- package/kb/site/reference/index.md +26 -9
- package/kb/site/reference/persistence-catalog.md +190 -96
- package/kb/site/reference/subsystems/approval.md +1 -1
- package/kb/site/reference/subsystems/client-modules.md +9 -0
- package/kb/site/reference/subsystems/client-resources.md +94 -0
- package/kb/site/reference/subsystems/code-runtime.md +7 -3
- package/kb/site/reference/subsystems/commands.md +25 -16
- package/kb/site/reference/subsystems/compaction.md +10 -10
- package/kb/site/reference/subsystems/conversation.md +11 -4
- package/kb/site/reference/subsystems/core.md +173 -29
- package/kb/site/reference/subsystems/credentials.md +5 -4
- package/kb/site/reference/subsystems/filesystem.md +15 -0
- package/kb/site/reference/subsystems/goal.md +38 -2
- package/kb/site/reference/subsystems/index.md +14 -12
- package/kb/site/reference/subsystems/invariants.md +1 -1
- package/kb/site/reference/subsystems/llm-streaming.md +43 -12
- package/kb/site/reference/subsystems/lsp.md +1 -1
- package/kb/site/reference/subsystems/permission-presets.md +5 -5
- package/kb/site/reference/subsystems/persistence.md +210 -198
- package/kb/site/reference/subsystems/plan.md +3 -3
- package/kb/site/reference/subsystems/schedule.md +9 -3
- package/kb/site/reference/subsystems/scope.md +1 -1
- package/kb/site/reference/subsystems/session-projection.md +50 -24
- package/kb/site/reference/subsystems/session-query.md +19 -13
- package/kb/site/reference/subsystems/session-reference.md +29 -1
- package/kb/site/reference/subsystems/session-telemetry.md +27 -10
- package/kb/site/reference/subsystems/session-title.md +6 -6
- package/kb/site/reference/subsystems/session.md +208 -103
- package/kb/site/reference/subsystems/settings.md +30 -12
- package/kb/site/reference/subsystems/shell.md +9 -6
- package/kb/site/reference/subsystems/sidebar-right.md +151 -0
- package/kb/site/reference/subsystems/skills.md +1 -1
- package/kb/site/reference/subsystems/slots.md +41 -32
- package/kb/site/reference/subsystems/spill.md +13 -6
- package/kb/site/reference/subsystems/storage.md +28 -5
- package/kb/site/reference/subsystems/subagent.md +58 -105
- package/kb/site/reference/subsystems/subprocess.md +25 -26
- package/kb/site/reference/subsystems/system-prompt.md +18 -3
- package/kb/site/reference/subsystems/token-meter.md +4 -3
- package/kb/site/reference/subsystems/tools.md +5 -5
- package/kb/site/reference/subsystems/typert.md +18 -18
- package/kb/site/reference/subsystems/web-client.md +1 -1
- package/kb/site/reference/subsystems/workspace.md +88 -9
- package/kb/site/reference/tool-catalog.md +55 -65
- package/kb/site/reference/tool-execution-pipeline.md +2 -2
- package/lib/index.js +25 -44
- package/package.json +3 -2
- package/skills/dsh-plugin-dev-kb.md +4 -4
|
@@ -10,9 +10,9 @@ outline: "deep"
|
|
|
10
10
|
|
|
11
11
|
会话持久事件日志中可能出现的所有事件类型:完整持久化的 `SessionEvent` 信封,以及可通过合并扩展的 `SessionEventMap` 中的每个成员,包括 `@deepseek-ai/dsh-session` 所属的词汇和本仓库中每个插件对 `@deepseek-ai/dsh-session/types` 的声明合并,并附有源 JSDoc、完整 payload 声明、surface 标记和声明位置。本文档是 [session.md](./subsystems/session.md)(surface 排序与 `deriveMessages()` 投影)、[persistence.md](./subsystems/persistence.md)(如何让日志持久化)和 [session.md](./subsystems/session.md#cordis-surface) 中生成区域(实时总线接线;日志事件**不是** cordis 事件,它通过唯一的 `session/event` emit 到达监听器)的补充。
|
|
12
12
|
|
|
13
|
-
英文源文件根据源码生成(`scripts/gen-persistence-catalog.ts`),并由 `pnpm run verify-persistence-catalog`(`doc-sync`(文档同步门禁)的一部分)验证新鲜度;本中文文件作为经评审对侧通过双语配对维护。声明块保留源码声明和嵌套属性的 JSDoc,只移除其所在接口/模块带来的缩进,并使用 `ts persistence-catalog` 围栏(doc-typecheck 会跳过这些围栏,因为声明引用了其所属模块中的类型)。payload
|
|
13
|
+
英文源文件根据源码生成(`scripts/gen-persistence-catalog.ts`),并由 `pnpm run verify-persistence-catalog`(`doc-sync`(文档同步门禁)的一部分)验证新鲜度;本中文文件作为经评审对侧通过双语配对维护。声明块保留源码声明和嵌套属性的 JSDoc,只移除其所在接口/模块带来的缩进,并使用 `ts persistence-catalog` 围栏(doc-typecheck 会跳过这些围栏,因为声明引用了其所属模块中的类型)。payload 中的类型名称会链接到记录该类型的页面。已归档的 [persistence-log-catalog 记录](https://github.com/deepseek-ai/deepseek-harness/blob/master/.agents/notes/archived/process/2026-07-04-persistence-log-catalog.md)记载了最初的目录决策。
|
|
14
14
|
|
|
15
|
-
以下信封声明组合了每个事件的 `type`、单调递增的 `seq`、以 epoch 毫秒表示的 `time`、`data`,以及条件字段 `surfaceOp`/`sourceEventSeqs`。**surface** 表示 `SurfaceEventType` 成员:它会生成一条 LLM(大语言模型)消息,并声明该事件如何加入 surface 列表。**log-only** 表示其他所有事件:这类记录可持久化、可回放,但不参与派生历史。每个 payload 均可进行 JSON 序列化(在 `Session.append`
|
|
15
|
+
以下信封声明组合了每个事件的 `type`、单调递增的 `seq`、以 epoch 毫秒表示的 `time`、`data`、可选的未知类型跳过标记 `ignorable`,以及条件字段 `surfaceOp`/`sourceEventSeqs`。**surface** 表示 `SurfaceEventType` 成员:它会生成一条 LLM(大语言模型)消息,并声明该事件如何加入 surface 列表。**log-only** 表示其他所有事件:这类记录可持久化、可回放,但不参与派生历史。每个 payload 均可进行 JSON 序列化(在 `Session.append` 处强制执行)。当前 writer 会写入 `SESSION_FORMAT_VERSION`;受支持的历史产物通过构建期静态相邻迁移目录进入这套当前词汇(参见[版本生命周期](./subsystems/persistence.md))。范围仅限本仓库中的包;下游插件可以继续合并其他当前版本事件类型,这些类型按设计不属于本目录,并且在后续格式迁移边中需要显式 disposition。
|
|
16
16
|
|
|
17
17
|
## 事件信封
|
|
18
18
|
|
|
@@ -23,9 +23,11 @@ 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}; system, user, and tool events may also cite
|
|
27
|
+
* earlier sources through {@link SessionEvent.sourceEventSeqs}.
|
|
27
28
|
*/
|
|
28
29
|
export type SurfaceEventType =
|
|
30
|
+
| 'system/message'
|
|
29
31
|
| 'user/message'
|
|
30
32
|
| 'assistant/message'
|
|
31
33
|
| 'tool/result'
|
|
@@ -36,16 +38,16 @@ export type SurfaceEventType =
|
|
|
36
38
|
*
|
|
37
39
|
* - `'append'`: added to the tail — normal path for user/assistant/tool
|
|
38
40
|
* messages.
|
|
39
|
-
* - `{ op: 'replace',
|
|
40
|
-
* (inclusive) through `
|
|
41
|
-
* surface nodes in the current surface. `
|
|
41
|
+
* - `{ op: 'replace', startSeq, endSeq }`: replaces surface nodes from `startSeq`
|
|
42
|
+
* (inclusive) through `endSeq` (inclusive) with this node. Both must exist as
|
|
43
|
+
* surface nodes in the current surface. `startSeq === endSeq` replaces a single
|
|
42
44
|
* node. The node's {@link SessionEvent.sourceEventSeqs} must include every
|
|
43
45
|
* shadowed surface node. Used by compaction; any surface-replacing producer
|
|
44
46
|
* may use it.
|
|
45
47
|
*/
|
|
46
48
|
export type SurfaceOp =
|
|
47
49
|
| 'append'
|
|
48
|
-
| { op: 'replace';
|
|
50
|
+
| { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq }
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
53
|
* One immutable entry in the session log.
|
|
@@ -54,9 +56,9 @@ export type SurfaceOp =
|
|
|
54
56
|
* unions), so `switch (event.type)` narrows `event.data` without casts.
|
|
55
57
|
*
|
|
56
58
|
* The {@link sourceEventSeqs} and {@link surfaceOp} fields are conditional:
|
|
57
|
-
* they only exist on {@link SurfaceEventType} variants (`user/message`,
|
|
59
|
+
* they only exist on {@link SurfaceEventType} variants (`system/message`, `user/message`,
|
|
58
60
|
* `assistant/message`, `tool/result`).
|
|
59
|
-
* Non-surface events (boundary markers,
|
|
61
|
+
* Non-surface events (boundary markers, attempts, errors) never carry
|
|
60
62
|
* surface metadata — the compiler enforces this at `Session.append()`
|
|
61
63
|
* call sites.
|
|
62
64
|
*/
|
|
@@ -64,27 +66,29 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
64
66
|
[K in SessionEventType]: {
|
|
65
67
|
type: K
|
|
66
68
|
/** Monotonic sequence number within the session. */
|
|
67
|
-
seq:
|
|
69
|
+
seq: SessionSeq
|
|
68
70
|
/** Unix epoch milliseconds. */
|
|
69
71
|
time: number
|
|
70
72
|
data: SessionEventMap[K]
|
|
71
|
-
} & (K extends SurfaceEventType ? {
|
|
72
73
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
74
|
+
* Marks an event a reader may safely skip when it does not recognize
|
|
75
|
+
* `type`. Absent means required: a reader meeting an unrecognized type
|
|
76
|
+
* without this marker MUST refuse to reconstruct the session instead of
|
|
77
|
+
* silently dropping the event, because an unrecognized required event may
|
|
78
|
+
* change how the rest of the log is interpreted. A writer sets `true` only
|
|
79
|
+
* on purely informational records whose loss cannot affect reconstruction;
|
|
80
|
+
* defaulting to required means a forgotten marker over-refuses (an
|
|
81
|
+
* inconvenience) rather than silently resuming a gutted session.
|
|
79
82
|
*/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
surfaceOp?:
|
|
83
|
-
|
|
83
|
+
ignorable?: true
|
|
84
|
+
} & (K extends SurfaceEventType ? SurfaceIntent<K> : {
|
|
85
|
+
surfaceOp?: never
|
|
86
|
+
sourceEventSeqs?: never
|
|
87
|
+
})
|
|
84
88
|
}[T]
|
|
85
89
|
```
|
|
86
90
|
|
|
87
|
-
来源:[`packages/core/session/src/types.ts:
|
|
91
|
+
来源:[`packages/core/session/src/types.ts:404`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:412`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:434`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts) · [`packages/core/session/src/types.ts:465`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
88
92
|
|
|
89
93
|
## 事件
|
|
90
94
|
|
|
@@ -97,8 +101,8 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
97
101
|
```ts persistence-catalog
|
|
98
102
|
/**
|
|
99
103
|
* One normalized mutation of an agent's durable pending-message lists.
|
|
100
|
-
*
|
|
101
|
-
*
|
|
104
|
+
* The session-projection registry applies the committed event before
|
|
105
|
+
* `Session.append()` returns; Inbox live notifications follow that commit.
|
|
102
106
|
*/
|
|
103
107
|
'agent/inbox/spliced': {
|
|
104
108
|
target: InboxTarget
|
|
@@ -109,7 +113,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
109
113
|
}
|
|
110
114
|
```
|
|
111
115
|
|
|
112
|
-
来源:[`packages/core/agent/src/types.ts:
|
|
116
|
+
来源:[`packages/core/agent/src/types.ts:87`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/agent/src/types.ts)
|
|
113
117
|
|
|
114
118
|
### `agent-preset/*`
|
|
115
119
|
|
|
@@ -183,7 +187,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
183
187
|
* The session's approval policy was switched — log-only, durable,
|
|
184
188
|
* replayable, never in the model transcript (the model learns the policy
|
|
185
189
|
* from the runtime-context snapshot and live switch notices). The LAST
|
|
186
|
-
* such event is the session's override
|
|
190
|
+
* such event is the session's override.
|
|
187
191
|
* `source: 'delegation'` marks an override seeded into a child; an absent
|
|
188
192
|
* source is a runtime switch.
|
|
189
193
|
*/
|
|
@@ -194,22 +198,24 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
194
198
|
}
|
|
195
199
|
```
|
|
196
200
|
|
|
197
|
-
来源:[`packages/interaction/user-approval/src/index.ts:
|
|
201
|
+
来源:[`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
202
|
|
|
199
203
|
### `assistant/*`
|
|
200
204
|
|
|
201
|
-
<a id="
|
|
205
|
+
<a id="assistantattempt--log-only"></a>
|
|
202
206
|
|
|
203
|
-
#### `assistant/
|
|
207
|
+
#### `assistant/attempt` — log-only
|
|
204
208
|
|
|
205
209
|
```ts persistence-catalog
|
|
206
|
-
/**
|
|
207
|
-
|
|
210
|
+
/**
|
|
211
|
+
* One model attempt that committed no surface message. The embedded stream
|
|
212
|
+
* preserves a failed, retried, cancelled, or stream-error attempt that
|
|
213
|
+
* reached settlement without fabricating model-visible history.
|
|
214
|
+
*/
|
|
215
|
+
'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[] }
|
|
208
216
|
```
|
|
209
217
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
来源:[`packages/core/session/src/types.ts:249`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
218
|
+
来源:[`packages/core/session/src/types.ts:335`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
213
219
|
|
|
214
220
|
<a id="assistantmessage--surface"></a>
|
|
215
221
|
|
|
@@ -226,12 +232,20 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
226
232
|
* marker distinguishes that prefix without re-deriving interruption from turn
|
|
227
233
|
* boundaries. An aborted turn with no such event streamed no visible content.
|
|
228
234
|
*/
|
|
229
|
-
'assistant/message': {
|
|
235
|
+
'assistant/message': {
|
|
236
|
+
turn: number
|
|
237
|
+
step: number
|
|
238
|
+
message: AssistantMessage
|
|
239
|
+
/** Exact timed model stream, compacted without joining delta boundaries. */
|
|
240
|
+
stream: AssistantStreamRecord[]
|
|
241
|
+
usage?: TokenUsage
|
|
242
|
+
interrupted?: true
|
|
243
|
+
}
|
|
230
244
|
```
|
|
231
245
|
|
|
232
246
|
类型:[TokenUsage](./subsystems/llm-streaming.md)
|
|
233
247
|
|
|
234
|
-
来源:[`packages/core/session/src/types.ts:
|
|
248
|
+
来源:[`packages/core/session/src/types.ts:321`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
235
249
|
|
|
236
250
|
### `command/*`
|
|
237
251
|
|
|
@@ -250,11 +264,11 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
250
264
|
commandId: CommandId
|
|
251
265
|
kind: 'success' | 'error'
|
|
252
266
|
text?: string
|
|
253
|
-
sourceEventSeq?:
|
|
267
|
+
sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq
|
|
254
268
|
}
|
|
255
269
|
```
|
|
256
270
|
|
|
257
|
-
来源:[`packages/interaction/commands/src/types.ts:
|
|
271
|
+
来源:[`packages/interaction/commands/src/types.ts:110`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/commands/src/types.ts)
|
|
258
272
|
|
|
259
273
|
<a id="commandrun--log-only"></a>
|
|
260
274
|
|
|
@@ -274,7 +288,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
274
288
|
'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource }
|
|
275
289
|
```
|
|
276
290
|
|
|
277
|
-
来源:[`packages/interaction/commands/src/types.ts:
|
|
291
|
+
来源:[`packages/interaction/commands/src/types.ts:103`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/interaction/commands/src/types.ts)
|
|
278
292
|
|
|
279
293
|
### `compaction/*`
|
|
280
294
|
|
|
@@ -290,7 +304,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
290
304
|
'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string }
|
|
291
305
|
```
|
|
292
306
|
|
|
293
|
-
来源:[`packages/compaction/compaction/src/types.ts:
|
|
307
|
+
来源:[`packages/compaction/compaction/src/types.ts:72`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/compaction/compaction/src/types.ts)
|
|
294
308
|
|
|
295
309
|
<a id="compactionprune--log-only"></a>
|
|
296
310
|
|
|
@@ -308,15 +322,15 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
308
322
|
*/
|
|
309
323
|
'compaction/prune': {
|
|
310
324
|
/** The replaced range's first and last surface-node seqs (a surface-position span, like {@link CompactionResult.shadowedRange}). */
|
|
311
|
-
shadowedRange: { start:
|
|
325
|
+
shadowedRange: { start: SessionSeq; end: SessionSeq }
|
|
312
326
|
/** The seqs of all shadowed surface nodes, in surface order. */
|
|
313
|
-
shadowedSeqs:
|
|
327
|
+
shadowedSeqs: SessionSeq[]
|
|
314
328
|
/** Heuristic price of the shadowed content under the token-meter's fixed estimator. */
|
|
315
329
|
shadowedTokenCount: number
|
|
316
330
|
}
|
|
317
331
|
```
|
|
318
332
|
|
|
319
|
-
来源:[`packages/compaction/compaction/src/types.ts:
|
|
333
|
+
来源:[`packages/compaction/compaction/src/types.ts:82`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/compaction/compaction/src/types.ts)
|
|
320
334
|
|
|
321
335
|
<a id="compactionstart--log-only"></a>
|
|
322
336
|
|
|
@@ -331,7 +345,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
331
345
|
'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null }
|
|
332
346
|
```
|
|
333
347
|
|
|
334
|
-
来源:[`packages/compaction/compaction/src/types.ts:
|
|
348
|
+
来源:[`packages/compaction/compaction/src/types.ts:24`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/compaction/compaction/src/types.ts)
|
|
335
349
|
|
|
336
350
|
<a id="compactionsummary--log-only"></a>
|
|
337
351
|
|
|
@@ -351,8 +365,8 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
351
365
|
compactionId: CompactionId
|
|
352
366
|
sourceCommandId?: CommandId
|
|
353
367
|
summary: ContentBlock[]
|
|
354
|
-
shadowedRange: { start:
|
|
355
|
-
shadowedSeqs:
|
|
368
|
+
shadowedRange: { start: SessionSeq; end: SessionSeq }
|
|
369
|
+
shadowedSeqs: SessionSeq[]
|
|
356
370
|
shadowedTokenCount: number
|
|
357
371
|
/** The provider route that wrote the summary. */
|
|
358
372
|
provider: string
|
|
@@ -385,10 +399,47 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
385
399
|
|
|
386
400
|
类型:[ContentBlock](./subsystems/core.md) · [TokenUsage](./subsystems/llm-streaming.md)
|
|
387
401
|
|
|
388
|
-
来源:[`packages/compaction/compaction/src/types.ts:
|
|
402
|
+
来源:[`packages/compaction/compaction/src/types.ts:34`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/compaction/compaction/src/types.ts)
|
|
403
|
+
|
|
404
|
+
### `deliverables/*`
|
|
405
|
+
|
|
406
|
+
<a id="deliverablespresented--log-only"></a>
|
|
407
|
+
|
|
408
|
+
#### `deliverables/presented` — 仅日志
|
|
409
|
+
|
|
410
|
+
```ts persistence-catalog
|
|
411
|
+
/** Declared filesystem files from a successful final present result, including nested calls. */
|
|
412
|
+
'deliverables/presented': { turn: number; callId: ToolCallId; files: PresentedFile[] }
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
类型: [ToolCallId](./subsystems/core.md)
|
|
416
|
+
|
|
417
|
+
来源: [`packages/fs/tool-present/src/types.ts:15`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/fs/tool-present/src/types.ts)
|
|
389
418
|
|
|
390
419
|
### `feedback/*`
|
|
391
420
|
|
|
421
|
+
<a id="feedbackmessage-delete--log-only"></a>
|
|
422
|
+
|
|
423
|
+
#### `feedback/message-delete` — log-only
|
|
424
|
+
|
|
425
|
+
```ts persistence-catalog
|
|
426
|
+
/** Log-only deletion; earlier ratings and notes remain in the log. */
|
|
427
|
+
'feedback/message-delete': MessageFeedbackDelete
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
来源:[`packages/feedback/message-feedback/src/types.ts:55`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/feedback/message-feedback/src/types.ts)
|
|
431
|
+
|
|
432
|
+
<a id="feedbackmessage-put--log-only"></a>
|
|
433
|
+
|
|
434
|
+
#### `feedback/message-put` — log-only
|
|
435
|
+
|
|
436
|
+
```ts persistence-catalog
|
|
437
|
+
/** Log-only human feedback; never enters model history. */
|
|
438
|
+
'feedback/message-put': MessageFeedbackPut
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
来源:[`packages/feedback/message-feedback/src/types.ts:53`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/feedback/message-feedback/src/types.ts)
|
|
442
|
+
|
|
392
443
|
<a id="feedbackrecord--log-only"></a>
|
|
393
444
|
|
|
394
445
|
#### `feedback/record` — log-only
|
|
@@ -398,10 +449,10 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
398
449
|
* One recorded human remark about this session. Log-only and independent
|
|
399
450
|
* of its trigger; it never enters model context or derived history.
|
|
400
451
|
*/
|
|
401
|
-
'feedback/record':
|
|
452
|
+
'feedback/record': FeedbackRecord
|
|
402
453
|
```
|
|
403
454
|
|
|
404
|
-
来源:[`packages/feedback/command-feedback/src/
|
|
455
|
+
来源:[`packages/feedback/command-feedback/src/types.ts:40`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/feedback/command-feedback/src/types.ts)
|
|
405
456
|
|
|
406
457
|
### `goal/*`
|
|
407
458
|
|
|
@@ -506,7 +557,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
506
557
|
'model/selection': ModelSelection
|
|
507
558
|
```
|
|
508
559
|
|
|
509
|
-
来源:[`packages/api/session-controller/src/types.ts:
|
|
560
|
+
来源:[`packages/api/session-controller/src/types.ts:40`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/api/session-controller/src/types.ts)
|
|
510
561
|
|
|
511
562
|
### `permission/*`
|
|
512
563
|
|
|
@@ -518,13 +569,13 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
518
569
|
/**
|
|
519
570
|
* Records the selected preset as durable, log-only user intent. The knob
|
|
520
571
|
* events follow in the same turn and control execution; this event stays
|
|
521
|
-
* out of the model transcript and lets
|
|
572
|
+
* out of the model transcript and lets the permission projection unit
|
|
522
573
|
* preserve a selection when bundles match.
|
|
523
574
|
*/
|
|
524
575
|
'permission/preset': { preset: string }
|
|
525
576
|
```
|
|
526
577
|
|
|
527
|
-
来源:[`packages/interaction/permission-presets/src/index.ts:
|
|
578
|
+
来源:[`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
579
|
|
|
529
580
|
### `plan/*`
|
|
530
581
|
|
|
@@ -536,12 +587,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
536
587
|
/**
|
|
537
588
|
* Whether plan mode is in force from this point on: log-only, non-surface,
|
|
538
589
|
* whole-value replace. The last `plan/mode` wins; a log with none folds to
|
|
539
|
-
* inactive through
|
|
590
|
+
* inactive through the projection unit's fold.
|
|
540
591
|
*/
|
|
541
592
|
'plan/mode': { active: boolean }
|
|
542
593
|
```
|
|
543
594
|
|
|
544
|
-
来源:[`packages/plan/plan-mode/src/index.ts:
|
|
595
|
+
来源:[`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
596
|
|
|
546
597
|
### `request/*`
|
|
547
598
|
|
|
@@ -551,13 +602,15 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
551
602
|
|
|
552
603
|
```ts persistence-catalog
|
|
553
604
|
/**
|
|
554
|
-
* Route metadata for the next request, logged only when the route
|
|
555
|
-
* changes. It does not participate in request
|
|
605
|
+
* Route metadata for the next request, logged only when the route, capacity,
|
|
606
|
+
* or system prompt update mode changes. It does not participate in request
|
|
607
|
+
* reconstruction or header equality. Prompt admission uses the bound prepared
|
|
608
|
+
* call's capability, not this snapshot from an earlier request.
|
|
556
609
|
*/
|
|
557
610
|
'request/context': RequestContext
|
|
558
611
|
```
|
|
559
612
|
|
|
560
|
-
来源:[`packages/core/session/src/types.ts:
|
|
613
|
+
来源:[`packages/core/session/src/types.ts:377`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
561
614
|
|
|
562
615
|
<a id="requestheader--log-only"></a>
|
|
563
616
|
|
|
@@ -576,7 +629,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
576
629
|
}
|
|
577
630
|
```
|
|
578
631
|
|
|
579
|
-
来源:[`packages/core/session/src/types.ts:
|
|
632
|
+
来源:[`packages/core/session/src/types.ts:365`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
580
633
|
|
|
581
634
|
### `sandbox/*`
|
|
582
635
|
|
|
@@ -589,7 +642,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
589
642
|
* The session's sandbox mode was switched — log-only (like `approval/*`;
|
|
590
643
|
* NOT a surface event, carries no `surfaceOp`): durable and replayable,
|
|
591
644
|
* never in the model transcript. The LAST such event is the session's
|
|
592
|
-
* override (
|
|
645
|
+
* override (folded by the sandboxMode projection unit). `source: 'delegation'` marks
|
|
593
646
|
* an override seeded into a child; an absent source is a runtime switch.
|
|
594
647
|
*/
|
|
595
648
|
'sandbox/mode': {
|
|
@@ -630,12 +683,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
630
683
|
* Marks the end of a constructor seed. Events before it have smaller seq
|
|
631
684
|
* values and came from the seed (resume, fork, or replay); this lifecycle
|
|
632
685
|
* produced none of them. This log-only event is the durable projection of
|
|
633
|
-
* {@link Session.firstLiveSeq}.
|
|
634
|
-
* carry the meaning.
|
|
686
|
+
* {@link Session.firstLiveSeq}.
|
|
635
687
|
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
688
|
+
* A fresh fork child owns one `{ inherited: true }` marker at its exact
|
|
689
|
+
* inherited-prefix cut, even when that prefix ends in an ancestor marker.
|
|
690
|
+
* The last tagged marker is the current Session's cut; untagged markers keep
|
|
691
|
+
* ordinary restore and replay lifecycle boundaries.
|
|
639
692
|
*
|
|
640
693
|
* `Session`'s constructor is the only legitimate writer. The invariant
|
|
641
694
|
* companion deliberately constrains nothing here, so a plugin appending one
|
|
@@ -648,10 +701,10 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
648
701
|
* writers — a concurrently live session holds its own boundary elsewhere,
|
|
649
702
|
* so tolerating concurrent writers needs a signal beyond the log.
|
|
650
703
|
*/
|
|
651
|
-
'session/end-seed':
|
|
704
|
+
'session/end-seed': { inherited?: true }
|
|
652
705
|
```
|
|
653
706
|
|
|
654
|
-
来源:[`packages/core/session/src/types.ts:
|
|
707
|
+
来源:[`packages/core/session/src/types.ts:400`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
655
708
|
|
|
656
709
|
<a id="sessiontitle--log-only"></a>
|
|
657
710
|
|
|
@@ -667,7 +720,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
667
720
|
|
|
668
721
|
类型:[SessionTitleEventData](./subsystems/session-title.md)
|
|
669
722
|
|
|
670
|
-
来源:[`packages/session/session-title/src/index.ts:
|
|
723
|
+
来源:[`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
724
|
|
|
672
725
|
<a id="sessiontitle-llm-request--log-only"></a>
|
|
673
726
|
|
|
@@ -680,7 +733,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
680
733
|
|
|
681
734
|
类型:[SessionTitleLlmRequestEventData](./subsystems/session-title.md)
|
|
682
735
|
|
|
683
|
-
来源:[`packages/session/session-title-llm/src/index.ts:
|
|
736
|
+
来源:[`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
737
|
|
|
685
738
|
### `session-log-deepseek/*`
|
|
686
739
|
|
|
@@ -693,12 +746,14 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
693
746
|
'session-log-deepseek/delivery-accepted': {
|
|
694
747
|
/** Session identity the accepted delivery carried; inherited fork markers retain the parent's id. */
|
|
695
748
|
sessionId: import('@deepseek-ai/dsh-session/types').SessionId
|
|
749
|
+
/** Accepted Session format generation; absence identifies version 0. */
|
|
750
|
+
sessionFormatVersion?: number
|
|
696
751
|
/** Last canonical event included in the accepted request. */
|
|
697
|
-
throughSeq:
|
|
752
|
+
throughSeq: import('@deepseek-ai/dsh-session/types').SessionSeq
|
|
698
753
|
}
|
|
699
754
|
```
|
|
700
755
|
|
|
701
|
-
来源:[`packages/session/session-log-deepseek/src/types.ts:
|
|
756
|
+
来源:[`packages/session/session-log-deepseek/src/types.ts:81`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/session/session-log-deepseek/src/types.ts)
|
|
702
757
|
|
|
703
758
|
### `step/*`
|
|
704
759
|
|
|
@@ -711,7 +766,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
711
766
|
'step/end': { turn: number; step: number }
|
|
712
767
|
```
|
|
713
768
|
|
|
714
|
-
来源:[`packages/core/session/src/types.ts:
|
|
769
|
+
来源:[`packages/core/session/src/types.ts:289`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
715
770
|
|
|
716
771
|
<a id="stepstart--log-only"></a>
|
|
717
772
|
|
|
@@ -722,10 +777,24 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
722
777
|
'step/start': { turn: number; step: number }
|
|
723
778
|
```
|
|
724
779
|
|
|
725
|
-
来源:[`packages/core/session/src/types.ts:
|
|
780
|
+
来源:[`packages/core/session/src/types.ts:287`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
726
781
|
|
|
727
782
|
### `subagent/*`
|
|
728
783
|
|
|
784
|
+
<a id="subagentcatalog--log-only"></a>
|
|
785
|
+
|
|
786
|
+
#### `subagent/catalog` — log-only
|
|
787
|
+
|
|
788
|
+
```ts persistence-catalog
|
|
789
|
+
/**
|
|
790
|
+
* A direct child's complete discovery fact.
|
|
791
|
+
* @param data - versioned parent-owned catalog entry.
|
|
792
|
+
*/
|
|
793
|
+
'subagent/catalog': SubagentCatalogEvent
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
来源:[`packages/subagent/subagent/src/catalog.ts:40`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/subagent/subagent/src/catalog.ts)
|
|
797
|
+
|
|
729
798
|
<a id="subagentdescriptor--log-only"></a>
|
|
730
799
|
|
|
731
800
|
#### `subagent/descriptor` — log-only
|
|
@@ -760,7 +829,31 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
760
829
|
}
|
|
761
830
|
```
|
|
762
831
|
|
|
763
|
-
来源:[`packages/subagent/tool-subagent/src/model-selection-state.ts:
|
|
832
|
+
来源:[`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)
|
|
833
|
+
|
|
834
|
+
### `system/*`
|
|
835
|
+
|
|
836
|
+
<a id="systemmessage--surface"></a>
|
|
837
|
+
|
|
838
|
+
#### `system/message` — surface
|
|
839
|
+
|
|
840
|
+
```ts persistence-catalog
|
|
841
|
+
/**
|
|
842
|
+
* The rendered system prompt on the model-visible surface. The loop appends
|
|
843
|
+
* the first one as surface node 0 before the step's first `user/message`.
|
|
844
|
+
* A prepared in-history route can append nonempty changes in a continuing
|
|
845
|
+
* series. An incapable route or new series normalizes text to the first system
|
|
846
|
+
* node. Normalization empties nonempty later nodes, then rewrites the head if
|
|
847
|
+
* needed, through logged per-node replacements. An empty rendering always
|
|
848
|
+
* clears all active system nodes, leaving no older instructions model-visible.
|
|
849
|
+
* Empty later nodes are dormant and project to no message; an empty head with
|
|
850
|
+
* no active later node records "no system prompt". Restored nonempty text follows
|
|
851
|
+
* the same route and series rule; empty nodes never restore older text.
|
|
852
|
+
*/
|
|
853
|
+
'system/message': { turn: number; step: number; message: SystemMessage }
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
来源:[`packages/core/session/src/types.ts:310`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
764
857
|
|
|
765
858
|
### `team/*`
|
|
766
859
|
|
|
@@ -770,12 +863,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
770
863
|
|
|
771
864
|
```ts persistence-catalog
|
|
772
865
|
/** Whole teammate lifecycle value, stored only in the Team Lead Session. */
|
|
773
|
-
'team/member': { version:
|
|
866
|
+
'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot }
|
|
774
867
|
```
|
|
775
868
|
|
|
776
869
|
类型:[TeamId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.zh.md) · [TeamMemberSnapshot](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.zh.md)
|
|
777
870
|
|
|
778
|
-
来源:[`packages/experimental/agent-team/src/types.ts:
|
|
871
|
+
来源:[`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
872
|
|
|
780
873
|
<a id="teammessagedelivered--log-only"></a>
|
|
781
874
|
|
|
@@ -784,7 +877,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
784
877
|
```ts persistence-catalog
|
|
785
878
|
/** Durable acknowledgement that the target Session recorded the message. */
|
|
786
879
|
'team/message/delivered': {
|
|
787
|
-
version:
|
|
880
|
+
version: 2
|
|
788
881
|
teamId: TeamId
|
|
789
882
|
messageId: TeamMessageId
|
|
790
883
|
targetId: SessionId
|
|
@@ -793,7 +886,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
793
886
|
|
|
794
887
|
类型:[TeamId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.zh.md) · [TeamMessageId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.zh.md)
|
|
795
888
|
|
|
796
|
-
来源:[`packages/experimental/agent-team/src/types.ts:
|
|
889
|
+
来源:[`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
890
|
|
|
798
891
|
<a id="teammessagequeued--log-only"></a>
|
|
799
892
|
|
|
@@ -801,12 +894,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
801
894
|
|
|
802
895
|
```ts persistence-catalog
|
|
803
896
|
/** Durable mailbox enqueue, stored before delivery is attempted. */
|
|
804
|
-
'team/message/queued': { version:
|
|
897
|
+
'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot }
|
|
805
898
|
```
|
|
806
899
|
|
|
807
900
|
类型:[TeamId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.zh.md) · [TeamMessageSnapshot](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.zh.md)
|
|
808
901
|
|
|
809
|
-
来源:[`packages/experimental/agent-team/src/types.ts:
|
|
902
|
+
来源:[`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
903
|
|
|
811
904
|
<a id="teamtask--log-only"></a>
|
|
812
905
|
|
|
@@ -814,12 +907,12 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
814
907
|
|
|
815
908
|
```ts persistence-catalog
|
|
816
909
|
/** Whole shared-task value, stored only in the Team Lead Session. */
|
|
817
|
-
'team/task': { version:
|
|
910
|
+
'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot }
|
|
818
911
|
```
|
|
819
912
|
|
|
820
913
|
类型:[TeamId](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.zh.md) · [TeamTaskSnapshot](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/agent-team.zh.md)
|
|
821
914
|
|
|
822
|
-
来源:[`packages/experimental/agent-team/src/types.ts:
|
|
915
|
+
来源:[`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
916
|
|
|
824
917
|
### `todo/*`
|
|
825
918
|
|
|
@@ -853,16 +946,16 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
853
946
|
|
|
854
947
|
类型:[ToolCallId](./subsystems/core.md)
|
|
855
948
|
|
|
856
|
-
来源:[`packages/core/session/src/types.ts:
|
|
949
|
+
来源:[`packages/core/session/src/types.ts:341`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
857
950
|
|
|
858
|
-
<a id="
|
|
951
|
+
<a id="toolptc-dispatch--log-only"></a>
|
|
859
952
|
|
|
860
|
-
#### `tool/
|
|
953
|
+
#### `tool/ptc-dispatch` — log-only
|
|
861
954
|
|
|
862
955
|
```ts persistence-catalog
|
|
863
956
|
/**
|
|
864
957
|
* One bridged sub-dispatch SETTLING: the pairing ids (matching the
|
|
865
|
-
* `tool/
|
|
958
|
+
* `tool/ptc-dispatch-start` with the same `subCallId`), the tool `name`
|
|
866
959
|
* with the same JSON-normalized `arguments`, and the sub-call's complete
|
|
867
960
|
* model-facing outcome in `tool/result`'s own vocabulary
|
|
868
961
|
* (`content` + `isError`), so UIs render a sub-call through the exact
|
|
@@ -875,30 +968,30 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
875
968
|
* before returning), so its execution-enclosure relation holds by
|
|
876
969
|
* construction.
|
|
877
970
|
*/
|
|
878
|
-
'tool/
|
|
971
|
+
'tool/ptc-dispatch': PtcDispatchEventData
|
|
879
972
|
```
|
|
880
973
|
|
|
881
974
|
来源:[`packages/core/tools/src/types.ts:56`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/types.ts)
|
|
882
975
|
|
|
883
|
-
<a id="
|
|
976
|
+
<a id="toolptc-dispatch-start--log-only"></a>
|
|
884
977
|
|
|
885
|
-
#### `tool/
|
|
978
|
+
#### `tool/ptc-dispatch-start` — log-only
|
|
886
979
|
|
|
887
980
|
```ts persistence-catalog
|
|
888
981
|
/**
|
|
889
982
|
* One sub-dispatch STARTING inside a `run_code` program: the parent
|
|
890
|
-
* `run_code` call id, the
|
|
891
|
-
* numbered in submission order), and the tool `name` with its
|
|
983
|
+
* `run_code` call id, the opaque sub-call id (new calls use
|
|
984
|
+
* `<parent>:ptc:<n>`, numbered in submission order), and the tool `name` with its
|
|
892
985
|
* JSON-normalized `arguments` — the exact value dispatched, normalized
|
|
893
986
|
* BEFORE dispatch, so this append can never fail on payload shape.
|
|
894
987
|
* Appended when the scheduler actually starts the call (not at
|
|
895
988
|
* submission), so a start means the tool body pipeline was entered; a
|
|
896
989
|
* call abandoned in the queue logs nothing. Log-only: `deriveMessages()`
|
|
897
990
|
* ignores it; UIs use it for live per-sub-call running state and pair it
|
|
898
|
-
* with `tool/
|
|
991
|
+
* with `tool/ptc-dispatch` by `subCallId` (timing = the two events'
|
|
899
992
|
* `time` fields).
|
|
900
993
|
*/
|
|
901
|
-
'tool/
|
|
994
|
+
'tool/ptc-dispatch-start': PtcDispatchStartEventData
|
|
902
995
|
```
|
|
903
996
|
|
|
904
997
|
来源:[`packages/core/tools/src/types.ts:40`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/tools/src/types.ts)
|
|
@@ -923,12 +1016,13 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
923
1016
|
turn: number
|
|
924
1017
|
step: number
|
|
925
1018
|
message: ToolResultMessage
|
|
1019
|
+
/** Optional failure identity; allowed only when the tool-result block has `isError: true`. */
|
|
926
1020
|
error?: { name: string; code: string }
|
|
927
1021
|
meta?: JsonValue
|
|
928
1022
|
}
|
|
929
1023
|
```
|
|
930
1024
|
|
|
931
|
-
来源:[`packages/core/session/src/types.ts:
|
|
1025
|
+
来源:[`packages/core/session/src/types.ts:353`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
932
1026
|
|
|
933
1027
|
### `tool-workflow/*`
|
|
934
1028
|
|
|
@@ -1008,7 +1102,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
1008
1102
|
|
|
1009
1103
|
类型:[TurnEndReason](./subsystems/session.md)
|
|
1010
1104
|
|
|
1011
|
-
来源:[`packages/core/session/src/types.ts:
|
|
1105
|
+
来源:[`packages/core/session/src/types.ts:285`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
1012
1106
|
|
|
1013
1107
|
<a id="turnstart--log-only"></a>
|
|
1014
1108
|
|
|
@@ -1024,7 +1118,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
1024
1118
|
'turn/start': { turn: number }
|
|
1025
1119
|
```
|
|
1026
1120
|
|
|
1027
|
-
来源:[`packages/core/session/src/types.ts:
|
|
1121
|
+
来源:[`packages/core/session/src/types.ts:276`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
1028
1122
|
|
|
1029
1123
|
### `user/*`
|
|
1030
1124
|
|
|
@@ -1043,7 +1137,7 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
|
|
|
1043
1137
|
'user/message': UserMessage
|
|
1044
1138
|
```
|
|
1045
1139
|
|
|
1046
|
-
来源:[`packages/core/session/src/types.ts:
|
|
1140
|
+
来源:[`packages/core/session/src/types.ts:297`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/core/session/src/types.ts)
|
|
1047
1141
|
|
|
1048
1142
|
### `web/*`
|
|
1049
1143
|
|