@deepseek-ai/dsh-session-persistence 0.1.5-alpha.1 → 0.1.5-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 +2 -2
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/lib/index.js +3 -3
- package/lib/types/storage-contract.d.ts +3 -3
- package/package.json +10 -10
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/session/session-persistence/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: f0243b7a38dda8d9296a0a1416c9c8a9a990df88
|
|
6
|
+
README.zh.md: 47c6f4e9a4fede80b2869ba6d1c986c9b144632a
|
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Persistence returns the physically valid log; semantic repair belongs to the rea
|
|
|
62
62
|
|
|
63
63
|
### Failures and recovery
|
|
64
64
|
|
|
65
|
-
A stored log the current build cannot faithfully interpret is refused with a direction-aware error, never misread. `SessionHandle` exposes only current logical
|
|
65
|
+
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
66
|
|
|
67
67
|
-----
|
|
68
68
|
|
|
@@ -104,7 +104,7 @@ Each `session/event` for the writer's session copies into that handle's internal
|
|
|
104
104
|
|
|
105
105
|
### Stored-record validation
|
|
106
106
|
|
|
107
|
-
The seam's shared helpers validate current logical
|
|
107
|
+
The seam's shared helpers validate current logical records identified by `SESSION_FORMAT_VERSION`, and appends write only the current format ([rationale](../../../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.md)). Historical decoding and immutable successor publication belong inside each provider before it returns a handle. Every backend runs `storage-contract` validation on handle reads and write-open priming, refusing an unknown event type as `SessionFormatUnsupportedError` and a malformed current record as `SessionPersistenceCorruptionError`, with the raw-log `SessionLocation` attached when the backend keeps one artifact per session.
|
|
108
108
|
|
|
109
109
|
</details>
|
|
110
110
|
-----
|
package/README.zh.md
CHANGED
|
@@ -62,7 +62,7 @@ await ctx.sessionPersistence.flush() // backend-wide d
|
|
|
62
62
|
|
|
63
63
|
### 失败与恢复
|
|
64
64
|
|
|
65
|
-
当前构建无法忠实解读的存储日志会以方向感知的错误被拒绝,绝不错读。`SessionHandle`
|
|
65
|
+
当前构建无法忠实解读的存储日志会以方向感知的错误被拒绝,绝不错读。`SessionHandle` 只暴露由 `SESSION_FORMAT_VERSION` 标识的当前逻辑记录;provider 必须在返回句柄前转换任何受支持的历史存储,随产品交付的 JSONL provider 会通过静态 catalog 迁移受支持的历史代际。更高格式会要求操作者升级 harness。本构建不认识的事件类型会被拒绝,除非其信封标记为 `ignorable`;已提交前缀中的损坏以 `SessionPersistenceCorruptionError` 拒绝。
|
|
66
66
|
|
|
67
67
|
-----
|
|
68
68
|
|
|
@@ -104,7 +104,7 @@ await ctx.sessionPersistence.flush() // backend-wide d
|
|
|
104
104
|
|
|
105
105
|
### 存储记录校验
|
|
106
106
|
|
|
107
|
-
seam
|
|
107
|
+
seam 的共享辅助函数校验由 `SESSION_FORMAT_VERSION` 标识的当前逻辑记录,append 只写当前格式([理由](../../../.agents/notes/implemented/architecture/2026-08-31-released-session-format-migrations.zh.md))。历史解码与不可变后继发布属于各 provider 内部,并在其返回句柄前完成。每个后端都在句柄读取与写 open 预热时运行 `storage-contract` 校验,把未知事件类型作为 `SessionFormatUnsupportedError` 拒绝,把 malformed 当前记录作为 `SessionPersistenceCorruptionError` 拒绝,并在后端为每个会话保留一份产物时附上原始日志的 `SessionLocation`。
|
|
108
108
|
|
|
109
109
|
</details>
|
|
110
110
|
-----
|
package/lib/index.js
CHANGED
|
@@ -158,7 +158,7 @@ function assertStoredId(id, meta) {
|
|
|
158
158
|
if (meta.id !== id) throw new Error(`stored session identity mismatch: requested "${id}", header contains "${meta.id}"`);
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
|
-
* Refuse a
|
|
161
|
+
* Refuse a header that has not been restored to the current logical format.
|
|
162
162
|
* @param meta - the stored header.
|
|
163
163
|
* @param location - the backend's artifact location for the refusal, when one exists.
|
|
164
164
|
*/
|
|
@@ -170,8 +170,8 @@ function assertVersion(meta, location) {
|
|
|
170
170
|
* record (validating and freezing it) and refuse any event type this build
|
|
171
171
|
* does not know, unless its writer marked it `ignorable: true` — silently
|
|
172
172
|
* skipping an unknown required event could reconstruct a wrong session (the
|
|
173
|
-
* envelope contract on `SessionEvent.ignorable`).
|
|
174
|
-
* retired pre-release shapes refuse here; this
|
|
173
|
+
* envelope contract on `SessionEvent.ignorable`). Unknown required types and
|
|
174
|
+
* retired pre-release shapes refuse here; this validator performs no migration.
|
|
175
175
|
* @param meta - the stored header the events belong to.
|
|
176
176
|
* @param events - exclusively owned decoded events; validated in place.
|
|
177
177
|
* @param location - the backend's artifact location for refusals, when one exists.
|
|
@@ -13,7 +13,7 @@ import { type SessionLocation } from './errors.ts';
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function assertStoredId(id: SessionId, meta: SessionHeader): void;
|
|
15
15
|
/**
|
|
16
|
-
* Refuse a
|
|
16
|
+
* Refuse a header that has not been restored to the current logical format.
|
|
17
17
|
* @param meta - the stored header.
|
|
18
18
|
* @param location - the backend's artifact location for the refusal, when one exists.
|
|
19
19
|
*/
|
|
@@ -26,8 +26,8 @@ export declare function assertVersion(meta: {
|
|
|
26
26
|
* record (validating and freezing it) and refuse any event type this build
|
|
27
27
|
* does not know, unless its writer marked it `ignorable: true` — silently
|
|
28
28
|
* skipping an unknown required event could reconstruct a wrong session (the
|
|
29
|
-
* envelope contract on `SessionEvent.ignorable`).
|
|
30
|
-
* retired pre-release shapes refuse here; this
|
|
29
|
+
* envelope contract on `SessionEvent.ignorable`). Unknown required types and
|
|
30
|
+
* retired pre-release shapes refuse here; this validator performs no migration.
|
|
31
31
|
* @param meta - the stored header the events belong to.
|
|
32
32
|
* @param events - exclusively owned decoded events; validated in place.
|
|
33
33
|
* @param location - the backend's artifact location for refusals, when one exists.
|
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.1.5-alpha.
|
|
4
|
+
"version": "0.1.5-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/
|
|
31
|
-
"@deepseek-ai/dsh-
|
|
32
|
-
"@deepseek-ai/dsh-
|
|
33
|
-
"@deepseek-ai/
|
|
30
|
+
"@deepseek-ai/dsh-brand": "^0.1.5-alpha.2",
|
|
31
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
|
|
32
|
+
"@deepseek-ai/dsh-timeout": "^0.1.5-alpha.2",
|
|
33
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-timeout": "^0.1.5-alpha.
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
37
|
+
"@deepseek-ai/dsh-brand": "^0.1.5-alpha.2",
|
|
38
|
+
"@deepseek-ai/dsh-scope": "^0.1.5-alpha.2",
|
|
39
|
+
"@deepseek-ai/dsh-timeout": "^0.1.5-alpha.2",
|
|
40
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@deepseek-ai/dsh-util-values": "^0.1.5-alpha.
|
|
43
|
+
"@deepseek-ai/dsh-util-values": "^0.1.5-alpha.2"
|
|
44
44
|
}
|
|
45
45
|
}
|