@deepseek-ai/dsh-session-snapshot 0.1.2-alpha.3 → 0.1.2-alpha.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 +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/index.js +5 -5
- package/package.json +13 -20
- package/lib/invariant.js +0 -23
- package/lib/types/invariant.d.ts +0 -16
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/test-support/session-snapshot/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 0e099dba28f45031bdaa3c187f3e3ffce5b3b2b9
|
|
6
|
+
README.zh.md: f81b3038b14b94716f4f045aee2d70daa27930dc
|
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ The shared core owns manifests, workspace setup/comparison, typed identity mappi
|
|
|
116
116
|
| [`src/workspace.ts`](src/workspace.ts) | Scenario workspace setup and complete expected-state comparison |
|
|
117
117
|
| [`src/suite.ts`](src/suite.ts) | Scenario-table suite factory, fixture guards, record/refresh write-back |
|
|
118
118
|
| [`src/index.ts`](src/index.ts) | Package entry re-exporting the four layers |
|
|
119
|
-
|
|
|
119
|
+
| — | No runtime invariant companion is published; this test-support package owns no production event stream or mutable data; consuming test suites exercise its behavior. |
|
|
120
120
|
|
|
121
121
|
### Data flow
|
|
122
122
|
|
package/README.zh.md
CHANGED
|
@@ -116,7 +116,7 @@ defineAcpSnapshotSuite({
|
|
|
116
116
|
| [`src/workspace.ts`](src/workspace.ts) | 场景 workspace 设置与完整预期状态比较 |
|
|
117
117
|
| [`src/suite.ts`](src/suite.ts) | 场景表套件工厂、fixture 保护、录制/刷新回写 |
|
|
118
118
|
| [`src/index.ts`](src/index.ts) | 再导出四个层的包入口 |
|
|
119
|
-
|
|
|
119
|
+
| — | 不发布运行时不变式伴生入口;消费它的测试套件会检验该工具包。 |
|
|
120
120
|
|
|
121
121
|
### 数据流
|
|
122
122
|
|
package/lib/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { pathToFileURL } from "node:url";
|
|
|
12
12
|
import * as yaml from "js-yaml";
|
|
13
13
|
import { entryListSchema } from "@deepseek-ai/cordis-plugin-include";
|
|
14
14
|
import { resolveExampleLaunch } from "@deepseek-ai/dsh-loader-smoke";
|
|
15
|
-
import { decodeSeqRanges, decodeStorageRecord, packChunkRuns } from "@deepseek-ai/dsh-session";
|
|
15
|
+
import { SessionLogOffset, SessionSeq, decodeSeqRanges, decodeStorageRecord, packChunkRuns } from "@deepseek-ai/dsh-session";
|
|
16
16
|
import { isSurfaceEligibleType } from "@deepseek-ai/dsh-session/surface";
|
|
17
17
|
//#region lib/types/identity.js
|
|
18
18
|
/** Relationship-preserving identity redaction for committed session snapshots. */
|
|
@@ -1197,7 +1197,7 @@ function normalizeSessionLog(rawLog, ctx, options = {}) {
|
|
|
1197
1197
|
function repackSessionSnapshot(rawLog) {
|
|
1198
1198
|
const lines = rawLog.split("\n").filter((line) => line.trim().length > 0);
|
|
1199
1199
|
const header = lines.shift();
|
|
1200
|
-
let nextSeq = 0;
|
|
1200
|
+
let nextSeq = SessionLogOffset(0);
|
|
1201
1201
|
return [
|
|
1202
1202
|
header,
|
|
1203
1203
|
...packChunkRuns(lines.flatMap((line) => {
|
|
@@ -1208,15 +1208,15 @@ function repackSessionSnapshot(rawLog) {
|
|
|
1208
1208
|
seq0: nextSeq,
|
|
1209
1209
|
time0: 0
|
|
1210
1210
|
});
|
|
1211
|
-
nextSeq
|
|
1211
|
+
nextSeq = SessionLogOffset(nextSeq + decoded.length);
|
|
1212
1212
|
return decoded;
|
|
1213
1213
|
}
|
|
1214
1214
|
const event = {
|
|
1215
1215
|
...record,
|
|
1216
|
-
seq: nextSeq,
|
|
1216
|
+
seq: SessionSeq(nextSeq),
|
|
1217
1217
|
time: 0
|
|
1218
1218
|
};
|
|
1219
|
-
nextSeq
|
|
1219
|
+
nextSeq = SessionLogOffset(nextSeq + 1);
|
|
1220
1220
|
return [event];
|
|
1221
1221
|
})).map((stored) => {
|
|
1222
1222
|
const projected = { ...stored };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-session-snapshot",
|
|
3
3
|
"description": "Session-log snapshot core with an ACP protocol adapter, expected-output normalization, and fixture invariants",
|
|
4
|
-
"version": "0.1.2-alpha.
|
|
4
|
+
"version": "0.1.2-alpha.5",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,16 +18,11 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./src/*": "./src/*",
|
|
26
22
|
"./package.json": "./package.json"
|
|
27
23
|
},
|
|
28
24
|
"files": [
|
|
29
25
|
"lib/index.js",
|
|
30
|
-
"lib/invariant.js",
|
|
31
26
|
"lib/types/**/*.d.ts"
|
|
32
27
|
],
|
|
33
28
|
"license": "MIT",
|
|
@@ -36,26 +31,24 @@
|
|
|
36
31
|
"js-yaml": "^4.2.0",
|
|
37
32
|
"vitest": "^4.1.8",
|
|
38
33
|
"@deepseek-ai/cordis-plugin-include": "1.0.7",
|
|
39
|
-
"@deepseek-ai/dsh-loader-smoke": "0.1.2-alpha.
|
|
34
|
+
"@deepseek-ai/dsh-loader-smoke": "0.1.2-alpha.5"
|
|
40
35
|
},
|
|
41
36
|
"peerDependencies": {
|
|
42
37
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
43
|
-
"@deepseek-ai/dsh-
|
|
44
|
-
"@deepseek-ai/dsh-session": "^0.1.2-alpha.3"
|
|
38
|
+
"@deepseek-ai/dsh-session": "^0.1.2-alpha.5"
|
|
45
39
|
},
|
|
46
40
|
"devDependencies": {
|
|
47
41
|
"@types/js-yaml": "^4.0.9",
|
|
48
42
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
49
|
-
"@deepseek-ai/dsh-agent
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-sandbox": "^0.1.2-alpha.
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-user-questions": "^0.1.2-alpha.3"
|
|
43
|
+
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.5",
|
|
44
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.2-alpha.5",
|
|
45
|
+
"@deepseek-ai/dsh-compaction": "^0.1.2-alpha.5",
|
|
46
|
+
"@deepseek-ai/dsh-llm": "^0.1.2-alpha.5",
|
|
47
|
+
"@deepseek-ai/dsh-sandbox": "^0.1.2-alpha.5",
|
|
48
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.1.2-alpha.5",
|
|
49
|
+
"@deepseek-ai/dsh-subagent": "^0.1.2-alpha.5",
|
|
50
|
+
"@deepseek-ai/dsh-session": "^0.1.2-alpha.5",
|
|
51
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.5",
|
|
52
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.2-alpha.5"
|
|
60
53
|
}
|
|
61
54
|
}
|
package/lib/invariant.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
/**
|
|
3
|
-
* Package-owned invariant companion for `@deepseek-ai/dsh-session-snapshot`.
|
|
4
|
-
* @module @deepseek-ai/dsh-session-snapshot/invariant
|
|
5
|
-
*/
|
|
6
|
-
const PACKAGE_NAME = "@deepseek-ai/dsh-session-snapshot";
|
|
7
|
-
/** Cordis companion plugin name. */
|
|
8
|
-
const name = "session-snapshot-invariant";
|
|
9
|
-
/** Service required before the companion can reserve package ownership. */
|
|
10
|
-
const inject = ["invariants"];
|
|
11
|
-
/**
|
|
12
|
-
* No runtime invariant: this test-support package owns no production event stream or mutable data;
|
|
13
|
-
* consuming test suites exercise its behavior.
|
|
14
|
-
*/
|
|
15
|
-
const install = () => {};
|
|
16
|
-
/**
|
|
17
|
-
* Register this package's invariant companion.
|
|
18
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
19
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
20
|
-
*/
|
|
21
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
22
|
-
//#endregion
|
|
23
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Package-owned invariant companion for `@deepseek-ai/dsh-session-snapshot`.
|
|
3
|
-
* @module @deepseek-ai/dsh-session-snapshot/invariant
|
|
4
|
-
*/
|
|
5
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
6
|
-
/** Cordis companion plugin name. */
|
|
7
|
-
export declare const name = "session-snapshot-invariant";
|
|
8
|
-
/** Service required before the companion can reserve package ownership. */
|
|
9
|
-
export declare const inject: string[];
|
|
10
|
-
/**
|
|
11
|
-
* Register this package's invariant companion.
|
|
12
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
-
*/
|
|
15
|
-
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
16
|
-
//# sourceMappingURL=invariant.d.ts.map
|