@x1a0f3n9/dsh-session-persistence 0.1.7-rc.3 → 0.2.1-rc.3

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
@@ -5,75 +5,75 @@
5
5
  /:
6
6
  en: 99acbd5c1e2a16ce
7
7
  zh: 31342508a4e1bf09
8
- /x1a0f3n9-dsh-session-persistence:
9
- en: 32b6f9d3ae040cb3
10
- zh: d2cef0ca9eed67e2
11
- /x1a0f3n9-dsh-session-persistence/summary:
8
+ /deepseek-ai-dsh-session-persistence:
9
+ en: e80e5f59ceadaa37
10
+ zh: f80ca64a74ca6e21
11
+ /deepseek-ai-dsh-session-persistence/summary:
12
12
  en: 31d5eec7694aa83f
13
13
  zh: b91ea5b6daaec8a5
14
- /x1a0f3n9-dsh-session-persistence/table-of-contents:
14
+ /deepseek-ai-dsh-session-persistence/table-of-contents:
15
15
  en: d152484eb41ac6b4
16
16
  zh: 09388d293f9be9cb
17
- /x1a0f3n9-dsh-session-persistence/use-this-package:
17
+ /deepseek-ai-dsh-session-persistence/use-this-package:
18
18
  en: bd48e96d14122170
19
19
  zh: f8a06e7246b55a6f
20
- /x1a0f3n9-dsh-session-persistence/use-this-package/choosing-a-backend:
20
+ /deepseek-ai-dsh-session-persistence/use-this-package/choosing-a-backend:
21
21
  en: 170892270261aae0
22
22
  zh: 7daf1edd4f764409
23
- /x1a0f3n9-dsh-session-persistence/use-this-package/what-the-service-provides:
23
+ /deepseek-ai-dsh-session-persistence/use-this-package/what-the-service-provides:
24
24
  en: c10b9c7d9bad305c
25
25
  zh: 0e9c391e9df37da6
26
- /x1a0f3n9-dsh-session-persistence/use-this-package/ownership-and-visibility:
26
+ /deepseek-ai-dsh-session-persistence/use-this-package/ownership-and-visibility:
27
27
  en: 16d4abbb05a67360
28
28
  zh: fc91863169570795
29
- /x1a0f3n9-dsh-session-persistence/use-this-package/the-live-write-path-and-shutdown-drain:
29
+ /deepseek-ai-dsh-session-persistence/use-this-package/the-live-write-path-and-shutdown-drain:
30
30
  en: 282c5bc8a391159f
31
31
  zh: 96682e345ef301f6
32
- /x1a0f3n9-dsh-session-persistence/use-this-package/resuming-and-crash-recovery:
32
+ /deepseek-ai-dsh-session-persistence/use-this-package/resuming-and-crash-recovery:
33
33
  en: 08b09dce0bcf47c8
34
34
  zh: b6c5926d6e440a7b
35
- /x1a0f3n9-dsh-session-persistence/use-this-package/failures-and-recovery:
36
- en: 6d8beec038b1121a
37
- zh: 1f02952eb2a0b386
38
- /x1a0f3n9-dsh-session-persistence/understand-the-implementation:
35
+ /deepseek-ai-dsh-session-persistence/use-this-package/failures-and-recovery:
36
+ en: 18a5cfd4cfa07751
37
+ zh: 0c9bf65c4a40d599
38
+ /deepseek-ai-dsh-session-persistence/understand-the-implementation:
39
39
  en: 9e303bd09a71fef1
40
40
  zh: 1f631925081ae101
41
- /x1a0f3n9-dsh-session-persistence/understand-the-implementation/design-concept:
41
+ /deepseek-ai-dsh-session-persistence/understand-the-implementation/design-concept:
42
42
  en: 3d21cded1f7e74ff
43
43
  zh: 5f624aefebb1f63d
44
- /x1a0f3n9-dsh-session-persistence/understand-the-implementation/the-invariants-every-backend-honors:
45
- en: ab77c11245363282
46
- zh: 8f3d08304c967325
47
- /x1a0f3n9-dsh-session-persistence/understand-the-implementation/source-map:
48
- en: 3868942fde28ff0a
49
- zh: 865208afd7d04b49
50
- /x1a0f3n9-dsh-session-persistence/understand-the-implementation/the-write-path-at-a-glance:
44
+ /deepseek-ai-dsh-session-persistence/understand-the-implementation/the-invariants-every-backend-honors:
45
+ en: a3b5e0e6747f5ab4
46
+ zh: fcbcc16c04e15edb
47
+ /deepseek-ai-dsh-session-persistence/understand-the-implementation/source-map:
48
+ en: 206eaa18456c97ff
49
+ zh: 40afc55b378ec11b
50
+ /deepseek-ai-dsh-session-persistence/understand-the-implementation/the-write-path-at-a-glance:
51
51
  en: c920cf9262f4a563
52
52
  zh: 0f8e3ff17e39c861
53
- /x1a0f3n9-dsh-session-persistence/understand-the-implementation/stored-record-validation:
53
+ /deepseek-ai-dsh-session-persistence/understand-the-implementation/stored-record-validation:
54
54
  en: b93ec8187f7f86b0
55
55
  zh: 578aa5c6cadafd5a
56
- /x1a0f3n9-dsh-session-persistence/further-exploration:
56
+ /deepseek-ai-dsh-session-persistence/further-exploration:
57
57
  en: eae3982f64497a9c
58
58
  zh: bfca52edcaeff828
59
- /x1a0f3n9-dsh-session-persistence/model-experience:
59
+ /deepseek-ai-dsh-session-persistence/model-experience:
60
60
  en: 215e7ba838619b7b
61
61
  zh: a311da3843709f90
62
- /x1a0f3n9-dsh-session-persistence/model-experience/resumed-conversation-history:
62
+ /deepseek-ai-dsh-session-persistence/model-experience/resumed-conversation-history:
63
63
  en: 062875aab7f3f138
64
64
  zh: c7285918227e6f5c
65
- /x1a0f3n9-dsh-session-persistence/model-experience/resumed-conversation-history/what-the-model-sees:
65
+ /deepseek-ai-dsh-session-persistence/model-experience/resumed-conversation-history/what-the-model-sees:
66
66
  en: f697ddcf1a13c439
67
67
  zh: a3b5050484be4b9b
68
- /x1a0f3n9-dsh-session-persistence/model-experience/resumed-conversation-history/token-effect:
68
+ /deepseek-ai-dsh-session-persistence/model-experience/resumed-conversation-history/token-effect:
69
69
  en: 375253768652244e
70
70
  zh: c5bf6c3dcf707ab2
71
- /x1a0f3n9-dsh-session-persistence/model-experience/resumed-conversation-history/kv-cache-effect:
71
+ /deepseek-ai-dsh-session-persistence/model-experience/resumed-conversation-history/kv-cache-effect:
72
72
  en: 70a8139de5fd1cec
73
73
  zh: 66dfba4b93e63c55
74
- /x1a0f3n9-dsh-session-persistence/known-limitations-and-deferred-work:
74
+ /deepseek-ai-dsh-session-persistence/known-limitations-and-deferred-work:
75
75
  en: 97296c31399996e4
76
76
  zh: 86a5c1e771415e99
77
- /x1a0f3n9-dsh-session-persistence/known-limitations-and-deferred-work/dev-note:
77
+ /deepseek-ai-dsh-session-persistence/known-limitations-and-deferred-work/dev-note:
78
78
  en: e67f633dc6fe7773
79
79
  zh: 3bb0c20c93f16f98
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": "@x1a0f3n9/dsh-session-persistence",
3
3
  "description": "Abstract durable session persistence seam (ctx.sessionPersistence) for the DeepSeek Harness",
4
- "version": "0.1.7-rc.3",
4
+ "version": "0.2.1-rc.3",
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
- "@x1a0f3n9/dsh-brand": "0.1.7-rc.3",
32
- "@x1a0f3n9/dsh-session": "0.1.7-rc.3",
33
- "@x1a0f3n9/dsh-timeout": "0.1.7-rc.3"
30
+ "@deepseek-ai/cordis": "~4.0.5",
31
+ "@x1a0f3n9/dsh-brand": "0.2.1-rc.3",
32
+ "@x1a0f3n9/dsh-session": "0.2.1-rc.3",
33
+ "@x1a0f3n9/dsh-timeout": "0.2.1-rc.3"
34
34
  },
35
35
  "devDependencies": {
36
- "@deepseek-ai/cordis": "~4.0.4",
37
- "@x1a0f3n9/dsh-brand": "0.1.7-rc.3",
38
- "@x1a0f3n9/dsh-scope": "0.1.7-rc.3",
39
- "@x1a0f3n9/dsh-session": "0.1.7-rc.3",
40
- "@x1a0f3n9/dsh-timeout": "0.1.7-rc.3"
36
+ "@deepseek-ai/cordis": "~4.0.5",
37
+ "@x1a0f3n9/dsh-brand": "0.2.1-rc.3",
38
+ "@x1a0f3n9/dsh-scope": "0.2.1-rc.3",
39
+ "@x1a0f3n9/dsh-session": "0.2.1-rc.3",
40
+ "@x1a0f3n9/dsh-timeout": "0.2.1-rc.3"
41
41
  },
42
42
  "dependencies": {
43
- "@x1a0f3n9/dsh-util-values": "0.1.7-rc.3"
43
+ "@x1a0f3n9/dsh-util-values": "0.2.1-rc.3"
44
44
  }
45
45
  }