@deepseek-ai/dsh-session-format-v3-to-v4 0.2.0-rc.2 → 0.2.1-alpha.2

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 CHANGED
@@ -33,8 +33,8 @@
33
33
  en: 83df80655a2ea5ab
34
34
  zh: be1dd03bc0464fce
35
35
  /deepseek-ai-dsh-session-format-v3-to-v4/v3-to-v4-specification/parent-catalog-prerequisites:
36
- en: 06093e37658e414b
37
- zh: 2480e78d405af862
36
+ en: bf7125343985f83c
37
+ zh: 47595e1fafc2c7b4
38
38
  /deepseek-ai-dsh-session-format-v3-to-v4/v3-to-v4-specification/sequence-references-and-inheritance:
39
39
  en: 8543a15b3c24cd43
40
40
  zh: 5eacb6ffd009d1bc
@@ -51,8 +51,8 @@
51
51
  en: 610f35b8c44538a2
52
52
  zh: 17e5c07f09783106
53
53
  /deepseek-ai-dsh-session-format-v3-to-v4/native-v4-admission/lifecycle-and-reference-relationships:
54
- en: 74f51036958ba3bc
55
- zh: 6eeb65f15bb33e56
54
+ en: bae15764867cf91c
55
+ zh: 09a56ed1a8c9622a
56
56
  /deepseek-ai-dsh-session-format-v3-to-v4/native-v4-admission/developer-changes-and-deferred-schemas:
57
57
  en: 471f0e087806057a
58
58
  zh: 76b2ee1f58118d71
@@ -63,8 +63,8 @@
63
63
  en: 1d6db95cf7a82846
64
64
  zh: 837c690fe87f47db
65
65
  /deepseek-ai-dsh-session-format-v3-to-v4/understand-the-implementation:
66
- en: d27e081c4e2ecd86
67
- zh: 0dd639484f67dba9
66
+ en: bd4d2271b5844ca1
67
+ zh: b5d00e78d6085a25
68
68
  /deepseek-ai-dsh-session-format-v3-to-v4/further-exploration:
69
69
  en: d54326f96c09a0a0
70
70
  zh: 862147d701ce9049
package/README.md CHANGED
@@ -150,7 +150,7 @@ There is no recursive source search. Captured request text, assistant replay sta
150
150
  | Missing own parent entry with complete supported evidence | Append a version-0 catalog fact with child id, creation time, mode, and optional label. |
151
151
  | Missing own parent entry without complete evidence | Append a version-1 `subagent/catalog` with header identity and unknown mode, without inventing a label. |
152
152
 
153
- Catalog versions 0 and 1 require string `childId`, nonnegative safe-integer `childCreatedAt`, mode `continuable` or `one-shot` (version 1 additionally accepts `unknown`), and a string label for continuable mode; a present label in any mode must also be a string. Duplicate own child ids are refused. Existing entries without a corresponding retained child remain in the parent. Descriptor collection does not restore a child's old continuation composition or recover deleted children from tool arguments. Unknown-mode entries retain header identity without asserting a supported child descriptor.
153
+ Catalog versions 0 and 1 require string `childId`, nonnegative safe-integer `childCreatedAt`, mode `continuable` or `one-shot` (version 1 additionally accepts `unknown`), and a string label for continuable mode; a present label in any mode must also be a string. Version 2 accepts only `external` mode with an optional string label. Duplicate own child ids are refused. Existing entries without a corresponding retained child remain in the parent. Descriptor collection does not restore a child's old continuation composition or recover deleted children from tool arguments. Unknown-mode entries retain header identity without asserting a supported child descriptor.
154
154
 
155
155
  The stage considers parent catalog records only after the final inherited cut. Every inherited marker discards earlier catalog candidates without interpreting their payloads. Missing entries append after all source events, sorted by creation time then child id, with dense new sequences. Their time is the final source event's time, or header creation time for an empty log. They neither enter the model surface nor change the inherited count.
156
156
 
@@ -245,7 +245,7 @@ Current common admission does not validate each user/tool/developer content bloc
245
245
  | `compaction/start`, `compaction/summary`, `compaction/end` | Match compaction id, source command, and the active turn context. Summary spans name exact current-surface nodes and exclude the protected head; successful completion has one summary. Inherited unfinished compactions expire at the end-seed marker. |
246
246
  | `compaction/prune` | Its span names exact current-surface nodes and excludes the protected head; it does not require a compaction transaction or its owner fields. |
247
247
  | Compact checkpoint replacement | Its `compact-checkpoint` source identifies the active compaction. |
248
- | Native `subagent/catalog` | Check own version-0/version-1 payload fields and unique child ids after the inherited cut. Native reads neither collect child logs nor compare their physical facts; inherited entries do not establish own membership. |
248
+ | Native `subagent/catalog` | Validates own version-0/version-1/version-2 payloads after the inherited cut. Each child id must be unique. Native reads neither collect child logs nor compare their physical facts; inherited entries do not establish own membership. |
249
249
  | Inherited cut and delivery | Apply the marker, coordinate, and generation-ownership rules stated above. |
250
250
 
251
251
  These checks are generation-owned in [relationships.ts](src/relationships.ts). Full common message/envelope acceptance and plugin-owned message projections additionally use the installed Session; the exported V4 restorer alone is not a replacement for complete catalog restoration.
@@ -294,7 +294,7 @@ Unknown required events are refused by vocabulary-aware restoration. Unknown ign
294
294
 
295
295
  The migration declaration creates independent streaming stages. Compact runs expand as iterables without an intermediate event array. The V3-to-V4 stage rewrites historical message sources, lifts historical tool-result wrappers, and inserts evidenced interrupted turn endings while emitting V4 events. It retains one source-to-target sequence entry per source event for local reference remapping. The V4 codec uses the released V2 codec only for physical header and source-range framing, and validates native tool-role rows directly; it does not invoke the released V3 validator or source-conversion views. JSONL scanners call `assertV4RowAdmission` before suppressing recoverable rows and the shared mandatory relationship validator before returning the completed logical prefix.
296
296
 
297
- The target restorer validates native fields and mandatory cross-event relationships, then returns the original artifact. Unknown ignorable events remain opaque, and unfinished inherited compactions expire at the end-seed marker. No runtime invariant companion is published because this pure library owns no independently maintained runtime observations.
297
+ The target restorer validates native fields and mandatory cross-event relationships, then returns the original artifact. Unknown ignorable events remain opaque, and unfinished inherited compactions expire at the end-seed marker.
298
298
 
299
299
  </details>
300
300
 
package/README.zh.md CHANGED
@@ -150,7 +150,7 @@ V3 未知内容标签变为 `plugin:<original-type>`,其他字段原样保留
150
150
  | 缺少自身父目录项,且受支持证据完整 | 追加带 child id、创建时间、mode 和可选 label 的 version-0 目录事实。 |
151
151
  | 缺少自身父目录项,且证据不完整 | 追加 version-1 `subagent/catalog`,记录 header 身份和未知模式,不编造标签。 |
152
152
 
153
- Catalog version 0 和 1 要求字符串 `childId`、非负安全整数 `childCreatedAt`、`continuable` 或 `one-shot` mode(version 1 还接受 `unknown`),以及 continuable mode 下的字符串 label;任何 mode 下存在的 label 都必须是字符串。重复的自身 child id 被拒绝。没有对应保留子日志的已有条目仍保留在父日志中。Descriptor 收集不恢复子级的旧 continuation composition,也不从工具参数恢复已删除子级。未知模式条目保留 header 身份信息,不声明子 descriptor 受支持。
153
+ Catalog version 0 和 1 要求字符串 `childId`、非负安全整数 `childCreatedAt`、`continuable` 或 `one-shot` mode(version 1 还接受 `unknown`),以及 continuable mode 下的字符串 label;任何 mode 下存在的 label 都必须是字符串。Version 2 只接受 `external` mode,label 为可选字符串。重复的自身 child id 被拒绝。没有对应保留子日志的已有条目仍保留在父日志中。Descriptor 收集不恢复子级的旧 continuation composition,也不从工具参数恢复已删除子级。未知模式条目保留 header 身份信息,不声明子 descriptor 受支持。
154
154
 
155
155
  Stage 只把最终继承截点之后的父目录记录作为候选。每个 inherited marker 都会丢弃更早的目录候选,不解释其载荷。缺失项追加在所有源事件之后,按创建时间、child id 排序,并使用连续的新序号。时间取最后一个源事件的 time;空日志则取 header 创建时间。这些记录既不进入模型表面,也不改变继承计数。
156
156
 
@@ -245,7 +245,7 @@ System image 接纳要求非空 attachment id、PNG/JPEG/WebP/GIF MIME 类
245
245
  | `compaction/start`、`compaction/summary`、`compaction/end` | 匹配 compaction id、源 command 和活动 turn 上下文。Summary 区间引用精确的当前表面节点且排除 protected head;成功完成需要一个 summary。继承的未完成 compaction 在 end-seed marker 处过期。 |
246
246
  | `compaction/prune` | 其区间引用精确的当前表面节点且排除 protected head;它不要求存在 compaction 事务或其所有者字段。 |
247
247
  | Compact checkpoint 替换 | 其 `compact-checkpoint` 来源标识活动 compaction。 |
248
- | 原生 `subagent/catalog` | 检查继承截点之后的自身 version-0/version-1 载荷字段与 child id 唯一性。原生读取既不收集子日志,也不比较其物理事实;继承项不建立自身成员关系。 |
248
+ | 原生 `subagent/catalog` | 校验继承截点之后的自身 version-0/version-1/version-2 载荷。每个子 id 必须唯一。原生读取不收集子日志,也不比较其物理事实;继承条目不建立自身成员关系。 |
249
249
  | 继承截点与 delivery | 应用上文的 marker、坐标及代际归属规则。 |
250
250
 
251
251
  这些检查由 [relationships.ts](src/relationships.ts) 按代际拥有。完整的通用消息/信封接纳与插件拥有的消息投影还使用已安装 Session;单独的导出 V4 恢复器不能替代完整 catalog 恢复。
@@ -294,7 +294,7 @@ Fork 种子构造归核心 Session 所有,不属于此迁移。原生 V4 接
294
294
 
295
295
  迁移声明创建相互独立的流式 Stage。紧凑事件段通过迭代器展开,不生成中间事件数组。V3 到 V4 Stage 在发出 V4 事件时重写历史消息来源、提升历史工具结果包装,并插入有明确证据的中断回合结束事件。它为每个源事件保留一个源到目标的序号映射项,用于本地引用重映射。V4 编解码器只为物理头部和源范围分帧使用已发布 V2 编解码器,并直接校验原生工具角色行;它不会调用已发布 V3 校验器或源转换视图。JSONL 扫描器在抑制可恢复行之前调用 `assertV4RowAdmission`,并在返回完整逻辑前缀之前调用共用的强制关系校验器。
296
296
 
297
- 目标恢复器校验原生字段和强制跨事件关系,然后返回原始产物。未知的可忽略事件保持不透明,未完成的继承压缩事务在 end-seed 标记处结束。本包不发布运行时不变量伴随插件,因为这个纯函数库不拥有独立维护的运行时观测。
297
+ 目标恢复器校验原生字段和强制跨事件关系,然后返回原始产物。未知的可忽略事件保持不透明,未完成的继承压缩事务在 end-seed 标记处结束。
298
298
 
299
299
  </details>
300
300
 
package/lib/index.js CHANGED
@@ -924,7 +924,7 @@ function childCatalogFact(source) {
924
924
  * @returns validated catalog payload.
925
925
  */
926
926
  function catalogFact(value, subject = "subagent/catalog") {
927
- if (!isSessionFormatJsonObject(value) || value["version"] !== 0 && value["version"] !== 1 || typeof value["childId"] !== "string" || value["mode"] !== "continuable" && value["mode"] !== "one-shot" && value["mode"] !== "unknown" || value["version"] === 0 && value["mode"] === "unknown" || value["mode"] === "continuable" && typeof value["label"] !== "string" || value["label"] !== void 0 && typeof value["label"] !== "string") throw new SessionFormatError(`${subject} requires a supported versioned catalog fact`);
927
+ if (!isSessionFormatJsonObject(value) || value["version"] !== 0 && value["version"] !== 1 && value["version"] !== 2 || typeof value["childId"] !== "string" || value["mode"] !== "continuable" && value["mode"] !== "one-shot" && value["mode"] !== "external" && value["mode"] !== "unknown" || value["version"] === 2 !== (value["mode"] === "external") || value["version"] === 0 && value["mode"] === "unknown" || value["mode"] === "continuable" && typeof value["label"] !== "string" || value["label"] !== void 0 && typeof value["label"] !== "string") throw new SessionFormatError(`${subject} requires a supported versioned catalog fact`);
928
928
  sessionFormatCount(value["childCreatedAt"], "catalog child creation time");
929
929
  return value;
930
930
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-session-format-v3-to-v4",
3
3
  "description": "Streaming tool-role migration and delivery validation from Session V3 to V4",
4
- "version": "0.2.0-rc.2",
4
+ "version": "0.2.1-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -39,13 +39,13 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@deepseek-ai/dsh-session-format-v2-to-v3": "0.2.0-rc.2",
43
- "@deepseek-ai/dsh-session-format": "0.2.0-rc.2"
42
+ "@deepseek-ai/dsh-session-format": "0.2.1-alpha.2",
43
+ "@deepseek-ai/dsh-session-format-v2-to-v3": "0.2.1-alpha.2"
44
44
  },
45
45
  "peerDependencies": {
46
- "@deepseek-ai/cordis": "~4.0.4"
46
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@deepseek-ai/cordis": "~4.0.4"
49
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
50
50
  }
51
51
  }