@deepseek-ai/dsh-session-persistence 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: 08b09dce0bcf47c8
34
34
  zh: b6c5926d6e440a7b
35
35
  /deepseek-ai-dsh-session-persistence/use-this-package/failures-and-recovery:
36
- en: 6d8beec038b1121a
37
- zh: 1f02952eb2a0b386
36
+ en: 18a5cfd4cfa07751
37
+ zh: 0c9bf65c4a40d599
38
38
  /deepseek-ai-dsh-session-persistence/understand-the-implementation:
39
39
  en: 9e303bd09a71fef1
40
40
  zh: 1f631925081ae101
@@ -45,8 +45,8 @@
45
45
  en: a3b5e0e6747f5ab4
46
46
  zh: fcbcc16c04e15edb
47
47
  /deepseek-ai-dsh-session-persistence/understand-the-implementation/source-map:
48
- en: 3868942fde28ff0a
49
- zh: 865208afd7d04b49
48
+ en: 206eaa18456c97ff
49
+ zh: 40afc55b378ec11b
50
50
  /deepseek-ai-dsh-session-persistence/understand-the-implementation/the-write-path-at-a-glance:
51
51
  en: c920cf9262f4a563
52
52
  zh: 0f8e3ff17e39c861
package/README.md CHANGED
@@ -62,6 +62,8 @@ Persistence returns the physically valid log; semantic repair belongs to the rea
62
62
 
63
63
  ### Failures and recovery
64
64
 
65
+ For versioned artifacts, `stat` and `list` expose `formatStatus` as `current` or `migration-required`. The separate `header` remains current logical metadata. This status describes storage, not an in-memory preparation or migration task; providers without this information omit it.
66
+
65
67
  A stored log the current build cannot faithfully interpret is refused with a direction-aware error, never misread. `SessionHandle` exposes only current logical records identified by `SESSION_FORMAT_VERSION`; a provider must convert any supported historical storage before returning a handle, and the shipped JSONL provider migrates supported historical generations through its static catalog. A newer format instructs the operator to upgrade the harness. An event type unknown to this build refuses unless its envelope marks it `ignorable`, and committed-prefix corruption rejects as `SessionPersistenceCorruptionError`.
66
68
 
67
69
  -----
@@ -96,7 +98,6 @@ The package is a seam, not a backend framework: it exports the abstract `Session
96
98
  | [`src/storage-contract.ts`](src/storage-contract.ts) | Shared validation: version gate, fail-closed vocabulary, batch materialization, contiguity |
97
99
  | [`src/errors.ts`](src/errors.ts) | Stable handle/ownership failures and format refusals |
98
100
  | [`src/revision.ts`](src/revision.ts) | The branded opaque revision token |
99
- | — | No runtime invariant companion is published; persistence correctness requires backend round-trip and crash-tail tests; this package exposes no continuously observable in-process relation. |
100
101
 
101
102
  ### The write path at a glance
102
103
 
package/README.zh.md CHANGED
@@ -62,6 +62,8 @@ await ctx.sessionPersistence.flush() // backend-wide d
62
62
 
63
63
  ### 失败与恢复
64
64
 
65
+ 对于版本化产物,`stat` 与 `list` 通过 `formatStatus` 暴露 `current` 或 `migration-required`。独立的 `header` 仍是当前逻辑元数据。该状态描述存储,不描述内存准备或迁移任务;没有这项信息的提供方省略该字段。
66
+
65
67
  当前构建无法忠实解读的存储日志会被拒绝,并返回指明拒绝方向的错误,绝不会被误读。`SessionHandle` 只暴露由 `SESSION_FORMAT_VERSION` 标识的当前逻辑记录;提供方必须在返回句柄前转换任何受支持的历史存储,随产品交付的 JSONL 提供方会通过静态 catalog 迁移受支持的历史代际。更新的格式会要求操作者升级 harness。本构建不认识的事件类型会被拒绝,除非其信封标记为 `ignorable`;已提交前缀中的损坏以 `SessionPersistenceCorruptionError` 拒绝。
66
68
 
67
69
  -----
@@ -96,7 +98,6 @@ await ctx.sessionPersistence.flush() // backend-wide d
96
98
  | [`src/storage-contract.ts`](src/storage-contract.ts) | 共享校验:版本门禁、未知事件词汇拒绝、批次实体化、连续性 |
97
99
  | [`src/errors.ts`](src/errors.ts) | 稳定的句柄/所有权失败与格式拒绝 |
98
100
  | [`src/revision.ts`](src/revision.ts) | 带品牌类型的不透明修订值 token |
99
- | — | 不发布运行时不变式伴生入口;持久化正确性需要后端往返与崩溃尾部测试;本包不暴露可持续观察的进程内关系。 |
100
101
 
101
102
  ### 写入路径概览
102
103
 
@@ -22,6 +22,8 @@ export { assertContiguous, assertStoredId, assertVersion, materializeAppendBatch
22
22
  export interface SessionPersistenceSnapshot {
23
23
  /** Detached metadata for one stored session. */
24
24
  readonly header: SessionHeader;
25
+ /** Header-only format classification; absent without versioned artifact metadata. */
26
+ readonly formatStatus?: 'current' | 'migration-required';
25
27
  /** Opaque change token; see {@link SessionPersistence.stat}. */
26
28
  readonly revision: SessionPersistenceRevision;
27
29
  /** Logical event count, when the backend can provide it cheaply from metadata; otherwise absent. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-session-persistence",
3
3
  "description": "Abstract durable session persistence seam (ctx.sessionPersistence) for the DeepSeek Harness",
4
- "version": "0.2.0-rc.2",
4
+ "version": "0.2.1-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,19 +27,19 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
- "@deepseek-ai/cordis": "~4.0.4",
31
- "@deepseek-ai/dsh-brand": "0.2.0-rc.2",
32
- "@deepseek-ai/dsh-session": "0.2.0-rc.2",
33
- "@deepseek-ai/dsh-timeout": "0.2.0-rc.2"
30
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
31
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.2",
32
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
33
+ "@deepseek-ai/dsh-timeout": "0.2.1-alpha.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@deepseek-ai/cordis": "~4.0.4",
37
- "@deepseek-ai/dsh-brand": "0.2.0-rc.2",
38
- "@deepseek-ai/dsh-scope": "0.2.0-rc.2",
39
- "@deepseek-ai/dsh-session": "0.2.0-rc.2",
40
- "@deepseek-ai/dsh-timeout": "0.2.0-rc.2"
36
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
37
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.2",
38
+ "@deepseek-ai/dsh-scope": "0.2.1-alpha.2",
39
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
40
+ "@deepseek-ai/dsh-timeout": "0.2.1-alpha.2"
41
41
  },
42
42
  "dependencies": {
43
- "@deepseek-ai/dsh-util-values": "0.2.0-rc.2"
43
+ "@deepseek-ai/dsh-util-values": "0.2.1-alpha.2"
44
44
  }
45
45
  }