@deepseek-ai/dsh-session 0.1.0-rc.7 → 0.1.0-rc.8
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.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/index.js +4 -0
- package/lib/types/known-event-types.js +4 -0
- package/lib/types/types.d.ts +6 -1
- package/package.json +12 -12
package/README.i18n.yaml
CHANGED
|
@@ -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 packages/core/session/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: c62668167f4e0dfda822c7b82add3b4d8eb3d635
|
|
6
|
+
README.zh.md: 67de260e1ecb59f61a2e7b2eb1f6e665f06190a4
|
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ Every `SessionEvent` carries three optional top-level fields (structural metadat
|
|
|
98
98
|
|
|
99
99
|
#### What the model sees
|
|
100
100
|
|
|
101
|
-
The model receives the complete messages from `user/message`, `assistant/message`, and `tool/result` surface entries verbatim. Their identities, roles, sources, and content blocks are the same values established at creation; projections do not mint identities. A prompt envelope changes only human presentation; its prefix context and request delimiter are already present in the event content. Tool calls live inside assistant messages. Chunks, boundaries, usage, hook records, todo records, and other log-only events add no message.
|
|
101
|
+
The model receives the complete messages from `user/message`, `assistant/message`, and `tool/result` surface entries verbatim. Their identities, roles, sources, and content blocks are the same values established at creation; projections do not mint identities. Direct prompts and injected context remain separate `user/message` events whose sources preserve their provenance. A prompt envelope changes only human presentation; its prefix context and request delimiter are already present in the event content. Tool calls live inside assistant messages. Chunks, boundaries, usage, hook records, todo records, and other log-only events add no message.
|
|
102
102
|
|
|
103
103
|
#### Token effect
|
|
104
104
|
|
package/README.zh.md
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
|
|
99
99
|
#### 模型看到的内容
|
|
100
100
|
|
|
101
|
-
模型会原样接收 `user/message`、`assistant/message` 和 `tool/result` surface
|
|
101
|
+
模型会原样接收 `user/message`、`assistant/message` 和 `tool/result` surface 条目中的完整消息。其标识、角色、来源和内容块都与创建时确定的值相同;投影不会生成标识。直接提示词与注入上下文仍是彼此独立的 `user/message` 事件,各事件的来源会保留其出处。提示词封装只改变面向人的呈现;其前缀上下文和请求分隔符已经位于事件内容中。工具调用包含在 assistant 消息内。分片、边界、用量、钩子记录、todo 记录以及其他仅日志事件不会添加消息。
|
|
102
102
|
|
|
103
103
|
#### Token 影响
|
|
104
104
|
|
package/lib/index.js
CHANGED
|
@@ -1083,6 +1083,10 @@ const KNOWN_SESSION_EVENT_TYPES = new Set([
|
|
|
1083
1083
|
"step/end",
|
|
1084
1084
|
"step/start",
|
|
1085
1085
|
"subagent/descriptor",
|
|
1086
|
+
"team/member",
|
|
1087
|
+
"team/message/delivered",
|
|
1088
|
+
"team/message/queued",
|
|
1089
|
+
"team/task",
|
|
1086
1090
|
"todo/write",
|
|
1087
1091
|
"tool-workflow/agent-end",
|
|
1088
1092
|
"tool-workflow/agent-start",
|
|
@@ -47,6 +47,10 @@ export const KNOWN_SESSION_EVENT_TYPES = new Set([
|
|
|
47
47
|
'step/end',
|
|
48
48
|
'step/start',
|
|
49
49
|
'subagent/descriptor',
|
|
50
|
+
'team/member',
|
|
51
|
+
'team/message/delivered',
|
|
52
|
+
'team/message/queued',
|
|
53
|
+
'team/task',
|
|
50
54
|
'todo/write',
|
|
51
55
|
'tool-workflow/agent-end',
|
|
52
56
|
'tool-workflow/agent-start',
|
package/lib/types/types.d.ts
CHANGED
|
@@ -270,13 +270,18 @@ export interface SessionEventMap {
|
|
|
270
270
|
* Assembled assistant message for one step (derived history uses this).
|
|
271
271
|
* Carries the step's `usage` when the adapter reported token accounting, so
|
|
272
272
|
* the model output and its accounting travel together (there is no separate
|
|
273
|
-
* usage record). `usage` is absent when the adapter reported none.
|
|
273
|
+
* usage record). `usage` is absent when the adapter reported none. A turn
|
|
274
|
+
* cancelled mid-stream finalizes its delivered text/reasoning prefix as this
|
|
275
|
+
* event with `interrupted: true`; undispatched tool calls are absent. The
|
|
276
|
+
* marker distinguishes that prefix without re-deriving interruption from turn
|
|
277
|
+
* boundaries. An aborted turn with no such event streamed no visible content.
|
|
274
278
|
*/
|
|
275
279
|
'assistant/message': {
|
|
276
280
|
turn: number;
|
|
277
281
|
step: number;
|
|
278
282
|
message: AssistantMessage;
|
|
279
283
|
usage?: TokenUsage;
|
|
284
|
+
interrupted?: true;
|
|
280
285
|
};
|
|
281
286
|
/**
|
|
282
287
|
* The model requested one tool invocation: `name` with the raw `arguments`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-session",
|
|
3
3
|
"description": "Event-sourced session store for the DeepSeek Harness",
|
|
4
|
-
"version": "0.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.8",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -41,20 +41,20 @@
|
|
|
41
41
|
],
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@deepseek-ai/dsh-brand": "^0.1.0-rc.
|
|
45
|
-
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.
|
|
46
|
-
"@deepseek-ai/dsh-llm": "^0.1.0-rc.
|
|
47
|
-
"@deepseek-ai/dsh-scope": "^0.1.0-rc.
|
|
48
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.
|
|
44
|
+
"@deepseek-ai/dsh-brand": "^0.1.0-rc.8",
|
|
45
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.8",
|
|
46
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.8",
|
|
47
|
+
"@deepseek-ai/dsh-scope": "^0.1.0-rc.8",
|
|
48
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.8",
|
|
49
49
|
"@deepseek-ai/cordis": "^4.0.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@deepseek-ai/dsh-brand": "^0.1.0-rc.
|
|
53
|
-
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
52
|
+
"@deepseek-ai/dsh-brand": "^0.1.0-rc.8",
|
|
53
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.8",
|
|
54
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.8",
|
|
55
|
+
"@deepseek-ai/dsh-typert-registry": "^0.1.0-rc.8",
|
|
56
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.8",
|
|
57
|
+
"@deepseek-ai/dsh-scope": "^0.1.0-rc.8",
|
|
58
58
|
"@deepseek-ai/cordis": "^4.0.1"
|
|
59
59
|
}
|
|
60
60
|
}
|