@deepseek-ai/dsh-session-snapshot 0.1.3-alpha.2 → 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 +13 -10
- package/README.zh.md +14 -11
- package/lib/index.js +239 -176
- package/lib/types/harness.d.ts +3 -2
- package/lib/types/index.d.ts +4 -4
- package/lib/types/manifest.d.ts +4 -2
- package/lib/types/normalize.d.ts +33 -32
- package/lib/types/session-files.d.ts +7 -0
- package/lib/types/suite.d.ts +56 -18
- package/package.json +17 -17
package/lib/types/harness.d.ts
CHANGED
|
@@ -39,7 +39,8 @@ export type { AgentUnderTest } from './launcher.ts';
|
|
|
39
39
|
* `waitForInboxMessage` waits for inserted inbox text containing a scenario marker.
|
|
40
40
|
* `waitForSubagentTurnEnd` waits until one background child has persisted a
|
|
41
41
|
* closed model-work turn after its own descriptor; child progress has no ACP
|
|
42
|
-
* update to wait on.
|
|
42
|
+
* update to wait on. Failures identify the child, turn, and deadline even if
|
|
43
|
+
* the first log read is still pending; the underlying failure is retained as cause.
|
|
43
44
|
* `waitForTitleAfterTurnEnd` additionally waits for a later durable title.
|
|
44
45
|
* `waitForEventAfterTurnEnd` waits until a complete record of the given event
|
|
45
46
|
* type follows the latest closed turn — for scenarios whose asserted state
|
|
@@ -219,7 +220,7 @@ export interface RunOptions {
|
|
|
219
220
|
configPath?: string;
|
|
220
221
|
}
|
|
221
222
|
/**
|
|
222
|
-
* Derive
|
|
223
|
+
* Derive the stable, fixed-length logical spill prefix; never allocate files here.
|
|
223
224
|
* Windows uses a two-character-shorter root because drive resolution adds its drive prefix.
|
|
224
225
|
* @param fixtureFile - The scenario fixture whose parent directory provides the stable identity.
|
|
225
226
|
* @param platform - the host platform, injectable for unit coverage.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* shared subprocess/client launcher ({@link launchAcpTestAgent}), the scripted
|
|
5
5
|
* scenario harness ({@link runScenario}), the pure expected-output normalizers
|
|
6
6
|
* ({@link normalizeStdout} / {@link normalizeSessionLog} /
|
|
7
|
-
* {@link
|
|
7
|
+
* {@link scrubModelRequestBulk} / {@link scrubSystemPrompts}), and the suite
|
|
8
8
|
* factory ({@link defineAcpSnapshotSuite}) that registers a scenario table as a
|
|
9
9
|
* full describe/it tree. Transport-neutral normalizers and fixture invariants
|
|
10
10
|
* remain reusable by other profile adapters. Ordinary ACP e2e tests can use the launcher directly;
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
export { redactSessionSnapshotIds, } from './identity.ts';
|
|
20
20
|
export { runScenario, snapshotSpillRoot, type HarvestedLog, type InputScript, type InputStep, type PermissionAnswer, type RunOptions, type RunResult, } from './harness.ts';
|
|
21
21
|
export { launchAcpTestAgent, materializeProfilePatch, type AcpTestLaunchOptions, type AgentUnderTest, type LaunchedAcpTestAgent, } from './launcher.ts';
|
|
22
|
-
export { extractSnapshotSpillPaths, normalizeSessionFormatProvenance, normalizeSessionLog, normalizeSessionSnapshot, normalizeSessionSnapshots, normalizeStdout,
|
|
22
|
+
export { extractSnapshotSpillPaths, normalizeSessionFormatProvenance, normalizeSessionLog, normalizeSessionSnapshot, normalizeSessionSnapshots, normalizeStdout, scrubModelRequestBulk, scrubSessionSnapshot, scrubSystemPrompts, scrubToolSchemas, tokenizeSessionFixtureCwd, type CwdPathMode, type NormalizeContext, type NormalizeOptions, } from './normalize.ts';
|
|
23
23
|
export { parseSnapshotManifest, writesCurrentSessionFixtures, type SnapshotHeaderManifest, type SnapshotInputAttachment, type SnapshotInputManifest, type SnapshotManifest, type SnapshotPermission, type SnapshotPlatform, type SnapshotProfile, type SnapshotRecording, type SnapshotReplayManifest, type SnapshotSessionReference, type SnapshotSessionFormatCoverage, type SnapshotSessionFormatManifest, type SnapshotSessionWriteMode, type SnapshotWorkspaceManifest, } from './manifest.ts';
|
|
24
|
-
export { assertPersistedSessionVersion, assertSessionFixtureVersion, latestPersistedSessionPaths, parsePersistedSessionFilename, parseSessionFixtureName, persistedSessionFilename, sessionFixtureFiles, sessionFixtureName, sessionFixtureNames, sessionHeaderVersion, type PersistedSessionFile, type SessionFixtureFile, } from './session-files.ts';
|
|
25
|
-
export { formatSystemPromptSnapshot, formatToolSchemasSnapshot, fixtureContext, headerChangeCount, defineAcpSnapshotSuite, normalizedHeaders, normalizedSystemPrompts, normalizedToolSchemas, parseToolSchemasSnapshot, refreshFixtureReplacements, restorePinnedToolSchemas, stabilizeFixtureMessageIds, stabilizeRefreshLog, type Scenario, type SnapshotSuiteOptions, } from './suite.ts';
|
|
24
|
+
export { assertPersistedSessionVersion, assertSessionFixtureVersion, latestPersistedSessionPaths, parsePersistedSessionFilename, parseSessionFixtureName, persistedSessionFilename, sessionFixtureFiles, sessionFixtureName, sessionFixtureNames, sessionHeaderVersion, writerSnapshotName, type PersistedSessionFile, type SessionFixtureFile, } from './session-files.ts';
|
|
25
|
+
export { formatSystemPromptSnapshot, formatToolSchemasSnapshot, fixtureContext, headerChangeCount, defineAcpSnapshotSuite, normalizedHeaders, normalizedSystemPrompts, normalizedToolSchemas, parseSystemPromptSnapshot, parseToolSchemasSnapshot, refreshFixtureReplacements, restorePinnedToolSchemas, stabilizeFixtureMessageIds, stabilizeRefreshLog, systemPromptPrecedesRequests, type Scenario, type SnapshotSuiteOptions, } from './suite.ts';
|
|
26
26
|
export { captureExpectedWorkspaceSnapshot, captureWorkspaceSnapshot, EMPTY_WORKSPACE_MARKER, type CaptureWorkspaceSnapshotOptions, type WorkspaceBinaryFileSnapshot, type WorkspaceEmptyDirectorySnapshot, type WorkspaceSnapshotEntry, type WorkspaceSymlinkSnapshot, type WorkspaceTextFileSnapshot, } from './workspace.ts';
|
|
27
27
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/manifest.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface SnapshotHeaderManifest {
|
|
|
19
19
|
childToolSchemas?: number[];
|
|
20
20
|
/** Legitimate changed-header count after the initial request header. */
|
|
21
21
|
changes?: number;
|
|
22
|
+
/** Legitimate later `system/message` count (replacements or in-history appends) after the initial system prompt. */
|
|
23
|
+
promptChanges?: number;
|
|
22
24
|
}
|
|
23
25
|
/** Replay facts that cannot be reconstructed from successful model chunks. */
|
|
24
26
|
export interface SnapshotReplayManifest {
|
|
@@ -35,8 +37,8 @@ export interface SnapshotWorkspaceManifest {
|
|
|
35
37
|
setup?: string;
|
|
36
38
|
/** Whether `workspace.expected/` owns the complete final world state. */
|
|
37
39
|
final?: true;
|
|
38
|
-
/** Place the generated cwd
|
|
39
|
-
parent?: '
|
|
40
|
+
/** Place the generated cwd outside automatically writable temporary roots. */
|
|
41
|
+
parent?: 'outside-temp';
|
|
40
42
|
}
|
|
41
43
|
/** Controller input that cannot enter a session because admission rejects it. */
|
|
42
44
|
export interface SnapshotInputAttachment {
|
package/lib/types/normalize.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pure ACP transcript and session-log normalizers. They scrub session ids, run cwd, RPC ids,
|
|
3
3
|
* timestamps, goal lifecycle clocks, and hook duration while preserving semantic payload values.
|
|
4
|
-
*
|
|
5
|
-
* tool-schema sidecars.
|
|
4
|
+
* The prompt-text and tool-schema scrubbers stay composable so one scenario per header class can
|
|
5
|
+
* pin prompt and tool-schema sidecars.
|
|
6
6
|
* @module @deepseek-ai/dsh-session-snapshot/normalize
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
@@ -56,8 +56,9 @@ export declare function normalizeStdout(rawStdout: string, ctx: NormalizeContext
|
|
|
56
56
|
/**
|
|
57
57
|
* Normalize a session JSONL log into a stable expected output: the header line's
|
|
58
58
|
* volatile fields (`createdAt`, `id`, `cwd`) are zeroed/scrubbed; event,
|
|
59
|
-
* historical packed-row, embedded Assistant-stream,
|
|
60
|
-
* are zeroed; and all volatile strings are
|
|
59
|
+
* historical packed-row, embedded Assistant-stream, goal lifecycle, and
|
|
60
|
+
* catalog child-creation clocks are zeroed; and all volatile strings are
|
|
61
|
+
* scrubbed. Projected inputs remain
|
|
61
62
|
* projected. Packed `data.dt` gaps are normalized even when the projected row
|
|
62
63
|
* omits its `time0` anchor.
|
|
63
64
|
* Output is JSONL in the same shape as the input — one compact record per
|
|
@@ -72,8 +73,9 @@ export declare function normalizeSessionLog(rawLog: string, ctx: NormalizeContex
|
|
|
72
73
|
/**
|
|
73
74
|
* Normalize and project persisted session JSONL for a committed fixture.
|
|
74
75
|
* This composes ordinary log normalization with request-header scrubbing and
|
|
75
|
-
* persistence-envelope projection, then writes the
|
|
76
|
-
* one record per event, independent of persistence flush boundaries.
|
|
76
|
+
* persistence-envelope projection, then writes the v3 logical event stream as
|
|
77
|
+
* one record per event, independent of persistence flush boundaries. Event order
|
|
78
|
+
* and source-event references are preserved.
|
|
77
79
|
*
|
|
78
80
|
* @param rawLog - persisted or already-projected session JSONL.
|
|
79
81
|
* @param ctx - the run's volatile values to scrub.
|
|
@@ -90,54 +92,53 @@ export declare function normalizeSessionSnapshot(rawLog: string, ctx: NormalizeC
|
|
|
90
92
|
*/
|
|
91
93
|
export declare function normalizeSessionSnapshots(rawLogs: readonly string[], ctx: NormalizeContext, options?: Omit<NormalizeOptions, 'identityMode'>): string[];
|
|
92
94
|
/**
|
|
93
|
-
* Omit
|
|
95
|
+
* Omit the artifact header generation after official migration for comparison.
|
|
96
|
+
* Delivery and captured-source generations retain their opaque recorded values.
|
|
94
97
|
* @param rawLog - Session records or events as compact JSON lines.
|
|
95
|
-
* @returns the same records
|
|
98
|
+
* @returns the same records with only the Session header version omitted.
|
|
96
99
|
*/
|
|
97
100
|
export declare function normalizeSessionFormatProvenance(rawLog: string): string;
|
|
98
101
|
/**
|
|
99
|
-
* Replace
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* idempotent.
|
|
102
|
+
* Replace the rendered prompt text of every `system/message` event with the
|
|
103
|
+
* `{{system}}` token. The text block keeps its position and type, so the
|
|
104
|
+
* fixture still shows one system node per prompt version; an empty `content`
|
|
105
|
+
* (no system prompt) stays empty. Request headers and every other line pass
|
|
106
|
+
* through byte-for-byte; the transform is idempotent.
|
|
105
107
|
*
|
|
106
108
|
* @param rawLog The raw session `.jsonl` content.
|
|
107
|
-
* @returns The JSONL with system-prompt
|
|
109
|
+
* @returns The JSONL with system-prompt text tokenized.
|
|
108
110
|
*/
|
|
109
111
|
export declare function scrubSystemPrompts(rawLog: string): string;
|
|
110
112
|
/**
|
|
111
113
|
* Replace tool schemas in full request-header snapshots with `{{tools}}`
|
|
112
|
-
* tokens while retaining field presence. System
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
114
|
+
* tokens while retaining field presence. System-prompt text stays verbatim so
|
|
115
|
+
* pinning fixtures can move only schema bulk into their dedicated JSON
|
|
116
|
+
* sidecar. Lines without a tool payload pass through byte-for-byte; the
|
|
117
|
+
* transform is idempotent.
|
|
116
118
|
*
|
|
117
119
|
* @param rawLog The raw session `.jsonl` content.
|
|
118
120
|
* @returns The JSONL with tool-schema content tokenized.
|
|
119
121
|
*/
|
|
120
122
|
export declare function scrubToolSchemas(rawLog: string): string;
|
|
121
123
|
/**
|
|
122
|
-
* Replace all bulky request
|
|
123
|
-
* tokens
|
|
124
|
-
* {@link scrubSystemPrompts}
|
|
125
|
-
*
|
|
126
|
-
* without content to scrub pass through byte-for-byte, and the
|
|
127
|
-
* idempotent.
|
|
124
|
+
* Replace all bulky model-request content in a session JSONL with stable
|
|
125
|
+
* tokens: the `system/message` prompt text handled by
|
|
126
|
+
* {@link scrubSystemPrompts} and the request-header tool schemas handled by
|
|
127
|
+
* {@link scrubToolSchemas}. Field presence, config, and reason are kept.
|
|
128
|
+
* Lines without content to scrub pass through byte-for-byte, and the
|
|
129
|
+
* transform is idempotent.
|
|
128
130
|
*
|
|
129
131
|
* @param rawLog The raw session `.jsonl` content.
|
|
130
|
-
* @returns The JSONL with
|
|
132
|
+
* @returns The JSONL with prompt text and schema bulk tokenized, other lines byte-identical.
|
|
131
133
|
*/
|
|
132
|
-
export declare function
|
|
134
|
+
export declare function scrubModelRequestBulk(rawLog: string): string;
|
|
133
135
|
/**
|
|
134
|
-
* Project a persisted session log while tokenizing
|
|
135
|
-
* Each non-empty line is parsed at most once; the session header stays
|
|
136
|
-
* byte-identical. Body records omit their persistence-only envelopes
|
|
137
|
-
* request-header payloads are tokenized.
|
|
136
|
+
* Project a persisted session log while tokenizing prompt text and schema
|
|
137
|
+
* bulk. Each non-empty line is parsed at most once; the session header stays
|
|
138
|
+
* byte-identical. Body records omit their persistence-only envelopes.
|
|
138
139
|
*
|
|
139
140
|
* @param rawLog - persisted or already-projected session JSONL.
|
|
140
|
-
* @returns committed snapshot JSONL with
|
|
141
|
+
* @returns committed snapshot JSONL with prompt text and tool schemas tokenized.
|
|
141
142
|
*/
|
|
142
143
|
export declare function scrubSessionSnapshot(rawLog: string): string;
|
|
143
144
|
//# sourceMappingURL=normalize.d.ts.map
|
|
@@ -25,6 +25,13 @@ export interface PersistedSessionFile {
|
|
|
25
25
|
* @returns The lowercase canonical JSONL filename.
|
|
26
26
|
*/
|
|
27
27
|
export declare function sessionFixtureName(index: number, version: number): string;
|
|
28
|
+
/**
|
|
29
|
+
* Name the native-writer oracle for a retained historical replay role.
|
|
30
|
+
* This expected output never participates in replay generation selection.
|
|
31
|
+
* @param index - Parent `0` or a positive child/ordinal slot.
|
|
32
|
+
* @returns The expected-output JSONL basename.
|
|
33
|
+
*/
|
|
34
|
+
export declare function writerSnapshotName(index: number): string;
|
|
28
35
|
/**
|
|
29
36
|
* Parse one canonical recorded-session fixture filename.
|
|
30
37
|
*
|
package/lib/types/suite.d.ts
CHANGED
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
* refresh stay serial while writing.
|
|
10
10
|
*
|
|
11
11
|
* Exactly one scenario per header-composition class pins the tokenized header
|
|
12
|
-
* sequence
|
|
13
|
-
* sidecars, each of which may be
|
|
14
|
-
*
|
|
12
|
+
* sequence and the tokenized `system/message` sequence. Its prompt and
|
|
13
|
+
* tool-schema sequences live in independent sidecars, each of which may be
|
|
14
|
+
* shared with another class pin when the bytes are identical. Every live
|
|
15
|
+
* header and system prompt is checked against the composed pin, so
|
|
15
16
|
* session-dependent composition must declare a separate class instead of
|
|
16
17
|
* escaping coverage.
|
|
17
18
|
* @module @deepseek-ai/dsh-session-snapshot/suite
|
|
@@ -64,13 +65,13 @@ export interface Scenario {
|
|
|
64
65
|
/**
|
|
65
66
|
* Header-pinning scenario whose `system-prompt.expected.md` this pin reuses.
|
|
66
67
|
* Defaults to this scenario. The source must own its prompt sidecar and
|
|
67
|
-
* declare the same {@link
|
|
68
|
+
* declare the same {@link expectedPromptChanges}; only valid on a pin.
|
|
68
69
|
*/
|
|
69
70
|
systemPromptSource?: string;
|
|
70
71
|
/**
|
|
71
72
|
* Header-pinning scenario whose `tool-schemas.expected.json` this pin reuses.
|
|
72
73
|
* Defaults to this scenario. The source must own its schema sidecar and
|
|
73
|
-
* declare the same {@link expectedHeaderChanges};
|
|
74
|
+
* declare the same {@link expectedHeaderChanges}; only valid on a pin.
|
|
74
75
|
*/
|
|
75
76
|
toolSchemasSource?: string;
|
|
76
77
|
/**
|
|
@@ -89,10 +90,18 @@ export interface Scenario {
|
|
|
89
90
|
pinsChildSystemPrompts?: readonly number[];
|
|
90
91
|
/**
|
|
91
92
|
* How many changed `request/header` snapshots this PINNING scenario's primary
|
|
92
|
-
* fixture legitimately carries (default 0).
|
|
93
|
-
* the
|
|
93
|
+
* fixture legitimately carries (default 0). Each change owns one more schema
|
|
94
|
+
* set in the structured JSON pin; any other count fails. Only valid on the pin.
|
|
94
95
|
*/
|
|
95
96
|
expectedHeaderChanges?: number;
|
|
97
|
+
/**
|
|
98
|
+
* How many later `system/message` events — replacements of surface node 0
|
|
99
|
+
* or in-history appends — this PINNING scenario's primary fixture
|
|
100
|
+
* legitimately carries after the initial prompt (default 0). Each change's
|
|
101
|
+
* full prompt text is kept in the readable Markdown pin; any other count
|
|
102
|
+
* fails. Only valid on the pin.
|
|
103
|
+
*/
|
|
104
|
+
expectedPromptChanges?: number;
|
|
96
105
|
/**
|
|
97
106
|
* Which header-composition class this scenario belongs to. Scenarios that
|
|
98
107
|
* boot the same config compose the same header; each class has exactly one
|
|
@@ -240,8 +249,7 @@ export declare function fixtureContext(fixture: string): NormalizeContext;
|
|
|
240
249
|
* The `data.header` payload of every `request/header` event in a session
|
|
241
250
|
* JSONL, in log order, with the log's volatile values scrubbed first
|
|
242
251
|
* ({@link normalizeSessionLog}) so headers harvested from different runs —
|
|
243
|
-
* each embedding its own generated cwd
|
|
244
|
-
* footing.
|
|
252
|
+
* each embedding its own generated cwd — compare on equal footing.
|
|
245
253
|
*
|
|
246
254
|
* @param rawLog The session `.jsonl` content to extract headers from.
|
|
247
255
|
* @param ctx The volatile values of the run that produced it.
|
|
@@ -249,15 +257,26 @@ export declare function fixtureContext(fixture: string): NormalizeContext;
|
|
|
249
257
|
*/
|
|
250
258
|
export declare function normalizedHeaders(rawLog: string, ctx: NormalizeContext): unknown[];
|
|
251
259
|
/**
|
|
252
|
-
* The normalized
|
|
253
|
-
*
|
|
254
|
-
*
|
|
260
|
+
* The normalized prompt text of every `system/message` event in a session
|
|
261
|
+
* JSONL, in log order: the first is the initial system prompt (surface node 0)
|
|
262
|
+
* and each later one replaced it or, on an in-history route, appended the
|
|
263
|
+
* changed prompt after the cached history. An empty `content` yields `''`; a
|
|
264
|
+
* `system/message` without a text block is omitted.
|
|
255
265
|
*
|
|
256
266
|
* @param rawLog The session `.jsonl` content to inspect.
|
|
257
267
|
* @param ctx The volatile values of the run that produced it.
|
|
258
|
-
* @returns The normalized system prompts, in
|
|
268
|
+
* @returns The normalized system prompts, in log order.
|
|
259
269
|
*/
|
|
260
270
|
export declare function normalizedSystemPrompts(rawLog: string, ctx: NormalizeContext): string[];
|
|
271
|
+
/**
|
|
272
|
+
* Whether every model request in a session JSONL is preceded by its system
|
|
273
|
+
* prompt: the log has no `request/header`, or a `system/message` event comes
|
|
274
|
+
* before its first `request/header`.
|
|
275
|
+
*
|
|
276
|
+
* @param rawLog The session `.jsonl` content to inspect.
|
|
277
|
+
* @returns True when the first `request/header` (if any) follows a `system/message`.
|
|
278
|
+
*/
|
|
279
|
+
export declare function systemPromptPrecedesRequests(rawLog: string): boolean;
|
|
261
280
|
/**
|
|
262
281
|
* The normalized tool-schema arrays carried by request headers in a session
|
|
263
282
|
* JSONL, in log order. Headers without an array-valued tools field are omitted
|
|
@@ -303,11 +322,22 @@ export declare function restorePinnedToolSchemas(header: unknown, schemas: reado
|
|
|
303
322
|
* Prompt text is unchanged except that a missing terminal newline is added so
|
|
304
323
|
* the committed file follows the repository newline contract.
|
|
305
324
|
*
|
|
306
|
-
* @param prompt The normalized system prompt.
|
|
307
|
-
* @param changes Full normalized prompts from later
|
|
325
|
+
* @param prompt The normalized initial system prompt (surface node 0).
|
|
326
|
+
* @param changes Full normalized prompts from later `system/message` events, replacements or in-history appends.
|
|
308
327
|
* @returns Markdown snapshot text ending in a newline.
|
|
309
328
|
*/
|
|
310
329
|
export declare function formatSystemPromptSnapshot(prompt: string, changes?: readonly string[]): string;
|
|
330
|
+
/**
|
|
331
|
+
* Split a prompt sidecar into its initial prompt and each later change, the
|
|
332
|
+
* inverse of {@link formatSystemPromptSnapshot}.
|
|
333
|
+
*
|
|
334
|
+
* @param snapshot The Markdown sidecar text.
|
|
335
|
+
* @returns The initial prompt snapshot plus one entry per later `system/message`.
|
|
336
|
+
*/
|
|
337
|
+
export declare function parseSystemPromptSnapshot(snapshot: string): {
|
|
338
|
+
initial: string;
|
|
339
|
+
changes: string[];
|
|
340
|
+
};
|
|
311
341
|
/**
|
|
312
342
|
* Reject a child prompt sidecar that cannot own distinct, canonical prompt text.
|
|
313
343
|
* @param sidecar - committed child prompt snapshot.
|
|
@@ -375,12 +405,20 @@ export declare function refreshFixtureReplacements(logs: HarvestedLog[], fixture
|
|
|
375
405
|
* @returns The stabilized JSONL content to write back.
|
|
376
406
|
*/
|
|
377
407
|
export declare function stabilizeRefreshLog(fresh: string, existing: string, replacements: FixtureReplacement[], freshContext: NormalizeContext): string;
|
|
408
|
+
/**
|
|
409
|
+
* Check every selected role for tool/path defects and current generations for canonical prompt/identity storage.
|
|
410
|
+
* Historical roles retain their released bytes, including roles retired by the current writer.
|
|
411
|
+
* @param dir Scenario directory containing canonical Session fixtures.
|
|
412
|
+
* @param scenarioName Scenario name used in failure diagnostics.
|
|
413
|
+
* @returns Resolves when all selected fixtures satisfy the storage checks.
|
|
414
|
+
*/
|
|
415
|
+
export declare function assertSessionFixtureStorage(dir: string, scenarioName: string): Promise<void>;
|
|
378
416
|
/**
|
|
379
417
|
* Register the suite: one test per scenario (the expected-output and log comparisons and
|
|
380
|
-
* the header
|
|
418
|
+
* the header and prompt uniformity guard) plus the fixture guard block (no orphan
|
|
381
419
|
* scenario dirs, required files present, exactly one pin per header class,
|
|
382
|
-
* shared sidecars unique and well-formed, every JSONL prompt-
|
|
383
|
-
*
|
|
420
|
+
* shared sidecars unique and well-formed, every JSONL prompt- and
|
|
421
|
+
* schema-scrubbed with a `system/message` before its first request). Must
|
|
384
422
|
* run at vitest collection time — it calls `describe`/`it`. Throws
|
|
385
423
|
* immediately if any header class lacks a pinning scenario or carries two
|
|
386
424
|
* (the uniformity guard needs exactly one comparison anchor per class).
|
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.
|
|
4
|
+
"version": "0.1.5-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,28 +31,28 @@
|
|
|
31
31
|
"js-yaml": "^4.2.0",
|
|
32
32
|
"vitest": "^4.1.8",
|
|
33
33
|
"@deepseek-ai/cordis-plugin-include": "1.0.7",
|
|
34
|
-
"@deepseek-ai/dsh-
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
34
|
+
"@deepseek-ai/dsh-loader-smoke": "0.1.5-alpha.2",
|
|
35
|
+
"@deepseek-ai/dsh-session-format": "^0.1.5-alpha.2",
|
|
36
|
+
"@deepseek-ai/dsh-llm-replay": "^0.1.5-alpha.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
|
|
39
40
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-http-proxy": "^0.1.3-alpha.2"
|
|
41
|
+
"@deepseek-ai/dsh-http-proxy": "^0.1.5-alpha.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/js-yaml": "^4.0.9",
|
|
45
45
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
46
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
50
|
-
"@deepseek-ai/dsh-sandbox": "^0.1.
|
|
51
|
-
"@deepseek-ai/dsh-sandbox-policy": "^0.1.
|
|
52
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
53
|
-
"@deepseek-ai/dsh-subagent": "^0.1.
|
|
54
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
55
|
-
"@deepseek-ai/dsh-user-questions": "^0.1.
|
|
56
|
-
"@deepseek-ai/dsh-http-proxy": "^0.1.
|
|
46
|
+
"@deepseek-ai/dsh-agent": "^0.1.5-alpha.2",
|
|
47
|
+
"@deepseek-ai/dsh-compaction": "^0.1.5-alpha.2",
|
|
48
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.5-alpha.2",
|
|
49
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
|
|
50
|
+
"@deepseek-ai/dsh-sandbox": "^0.1.5-alpha.2",
|
|
51
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.1.5-alpha.2",
|
|
52
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
|
|
53
|
+
"@deepseek-ai/dsh-subagent": "^0.1.5-alpha.2",
|
|
54
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.5-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-http-proxy": "^0.1.5-alpha.2"
|
|
57
57
|
}
|
|
58
58
|
}
|