@deepseek-ai/dsh-session-projection-cache 0.0.1-rc.2 → 0.0.1-rc.5

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
@@ -3,4 +3,4 @@
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/session/session-projection-cache/README.md
5
5
  README.md: 5d4ad07fab6648acdb40c6aa86d32cc78b4c016e
6
- README.zh.md: 9dfcd645097cc8390812be3aef82b9535fa953eb
6
+ README.zh.md: 5e38ee98b04bc8f856538112d2922b64cadce4d5
package/README.zh.md CHANGED
@@ -7,8 +7,8 @@
7
7
  一条存储行 `(key → {ver, seq, val})` 是折叠捷径,绝不是权威:可能陈旧(`seq` 精确说明陈旧到哪),但绝不会错。实现据此承诺:
8
8
 
9
9
  - **每次后台写入都 fail-soft。** 持久写失败只记一条警告并保持缓存陈旧;下一次写入或冷读自愈。两次写之间崩溃的代价是更长的尾部回放,绝不是错误的值。
10
- - **`ver` 与活单元 `stateVersion` 不匹配即丢弃,绝不迁移。** 单元递增版本会在读取时使其行失效;该 key 从日志重新折叠。
11
- - **整记录写入。** 每次写入替换该会话的完整检查点(注册表切面始终是完整的),并经无损 JSON 边界快照——违反纯 JSON 约定的单元状态会大声失败。
10
+ - **`ver` 与当前运行单元的 `stateVersion` 不匹配即丢弃,绝不迁移。** 单元递增版本会在读取时使其行失效;该 key 从日志重新折叠。
11
+ - **整记录写入。** 每次写入替换该会话的完整检查点(注册表切面始终是完整的),并经无损 JSON 边界快照——违反纯 JSON 约定的单元状态会显式失败并报错。
12
12
  - **记录绑定到日志生命周期,而不只是 id。** 每条记录存储其折叠来源的 header 身份(`createdAt`、`cwd`);每次读取先以活 header 或存储 header 为证验证它,再接受任何行——被删后重建的 id、或缓存幸存而持久化存储被换掉时,无关记录被整体丢弃,绝不播种幻影值。
13
13
  - **日志领先,缓存跟随。** 活会话检查点先把缓冲事件持久 flush,缓存行才落地,因此崩溃只会让缓存落后于日志(更长的尾部回放),绝不领先于它。
14
14
 
@@ -19,7 +19,7 @@
19
19
  | 触发 | 性质 |
20
20
  |---|---|
21
21
  | `turn/end` | 必写——冷读要的正是轮次终值。 |
22
- | 会话销毁(detach) | 必写——live 转 cold 的时刻;此后冷读阶梯接管该会话。 |
22
+ | 会话释放(detach) | 必写——live 转 cold 的时刻;此后冷读阶梯接管该会话。 |
23
23
  | 累计 `writeEveryEvents` 个已提交事件 | 配置节流(条数)。 |
24
24
  | 距首个脏事件 `writeIntervalMs` 毫秒 | 配置节流(间隔)。 |
25
25
 
@@ -57,6 +57,6 @@
57
57
 
58
58
  ## 已知局限与延后工作
59
59
 
60
- - **没有淘汰或保留面**——记录按会话累积;清理存储的检查点是带外维护,与会话持久化本身同一立场。
61
- - **间隔节流按会话粗粒度**——计时器在一次干净写入后的首个脏事件时武装;持续的低于阈值的涓流每个间隔写一次,不是滑动窗口。
60
+ - **不提供淘汰或保留接口**:记录会按会话持续累积;清理已存储的检查点属于带外维护,与会话持久化采用相同策略。
61
+ - **间隔节流采用按会话的粗粒度控制**:一次无脏数据的写入完成后,计时器会在首个脏事件到达时启动;对于持续但未达到条数阈值的事件流,系统每个间隔写入一次,而不采用滑动窗口。
62
62
  - **`coldSnapshot` 读取不去重**——同一会话的两个并发冷读各跑一遍阶梯;写回最后者胜(行等价),对列表级调用频率可接受。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-session-projection-cache",
3
3
  "description": "Persisted projection cache (ctx.sessionProjectionCache): durable per-session projection checkpoints over the domain data form, throttled write-behind, and the cold-read ladder (cache row + persistence tail replay)",
4
- "version": "0.0.1-rc.2",
4
+ "version": "0.0.1-rc.5",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -33,23 +33,23 @@
33
33
  "license": "BSD-3-Clause",
34
34
  "dependencies": {
35
35
  "zod": "^4.4.3",
36
- "@deepseek-ai/schemastery": "^3.18.1-rc.1"
36
+ "@deepseek-ai/schemastery": "^3.18.1-rc.4"
37
37
  },
38
38
  "peerDependencies": {
39
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
40
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
41
- "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.2",
42
- "@deepseek-ai/dsh-storage-domain": "^0.0.1-rc.2",
43
- "@deepseek-ai/dsh-session-persistence": "^0.0.1-rc.2",
44
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
39
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
40
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.5",
41
+ "@deepseek-ai/dsh-session-persistence": "^0.0.1-rc.5",
42
+ "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.5",
43
+ "@deepseek-ai/dsh-storage-domain": "^0.0.1-rc.5",
44
+ "@deepseek-ai/cordis": "^4.0.1-rc.4"
45
45
  },
46
46
  "devDependencies": {
47
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
48
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
49
- "@deepseek-ai/dsh-session-persistence": "^0.0.1-rc.2",
50
- "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.2",
51
- "@deepseek-ai/dsh-storage": "^0.0.1-rc.2",
52
- "@deepseek-ai/dsh-storage-domain": "^0.0.1-rc.2",
53
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
47
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
48
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.5",
49
+ "@deepseek-ai/dsh-session-persistence": "^0.0.1-rc.5",
50
+ "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.5",
51
+ "@deepseek-ai/dsh-storage": "^0.0.1-rc.5",
52
+ "@deepseek-ai/dsh-storage-domain": "^0.0.1-rc.5",
53
+ "@deepseek-ai/cordis": "^4.0.1-rc.4"
54
54
  }
55
55
  }