@rulvar/testing 1.22.0 → 1.24.0

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.
@@ -0,0 +1,62 @@
1
+ import { ChatRequest, JournalEntry, WireError, Workflow } from "@rulvar/core";
2
+
3
+ //#region src/cassettes/build-fixtures.d.ts
4
+ /** One cassette fixture file: id, provenance note, and the journal. */
5
+ /** @internal */
6
+ interface CassetteFixture {
7
+ id: string;
8
+ note: string;
9
+ entries: JournalEntry[];
10
+ }
11
+ /** @internal */
12
+ declare function buildM2CassetteFixtures(): CassetteFixture[];
13
+ /**
14
+ * The frozen v1 journal: a
15
+ * round-1 JSONL file with kinds agent, step, rand, external, approval and
16
+ * the legacy `v: 1` field (no hashVersion member). Returned as raw
17
+ * JSON-ready objects, one per line.
18
+ * @internal
19
+ */
20
+ declare function buildFrozenV1JournalRaw(): Array<Record<string, unknown>>;
21
+ /**
22
+ * v2 golden identity fixtures: worked examples per spawn kind (M2-T12).
23
+ * The keys freeze the hashVersion 2 profile; the v1 members freeze the
24
+ * effort-insensitive projection and the incomparable domain.
25
+ * @internal
26
+ */
27
+ declare function buildV2GoldenIdentity(): Record<string, unknown>;
28
+ //#endregion
29
+ //#region src/cassettes/record-live.d.ts
30
+ /** @internal */
31
+ declare function recordLiveCassettes(): Promise<CassetteFixture[]>;
32
+ //#endregion
33
+ //#region src/cassettes/m6-orchestrator.d.ts
34
+ /** @internal */
35
+ declare const M6_ORCH_RUN_ID = "m6-orchestrator-crash";
36
+ /** @internal */
37
+ declare const M6_ORCH_GOAL = "m6 cassette: gather two facts";
38
+ /** @internal */
39
+ declare const M6_ORCH_PROFILES: {
40
+ worker: {
41
+ description: string;
42
+ };
43
+ };
44
+ /** Extracts spawn handles from the tool results the model saw. */
45
+ /** @internal */
46
+ declare function handlesInRequest(req: ChatRequest): number[];
47
+ /** Fixes wall clock and spans; everything else is deterministic already. */
48
+ /** @internal */
49
+ declare function normalizeM6Entries(entries: readonly JournalEntry[]): JournalEntry[];
50
+ /**
51
+ * Phase 1: record the pre-crash journal. The transcripts store carries
52
+ * the boundary checkpoint the resume restores from; the recorder keeps
53
+ * it in memory because the cassette pins only journal bytes (checkpoint
54
+ * blobs are engine-internal at-least-once state).
55
+ * @internal
56
+ */
57
+ declare function recordOrchestratorCrash(): Promise<{
58
+ entries: JournalEntry[]; /** Boundary checkpoint blobs by ref, base64: the resume restores from them. */
59
+ checkpoints: Record<string, string>;
60
+ }>;
61
+ //#endregion
62
+ export { type CassetteFixture, M6_ORCH_GOAL, M6_ORCH_PROFILES, M6_ORCH_RUN_ID, buildFrozenV1JournalRaw, buildM2CassetteFixtures, buildV2GoldenIdentity, handlesInRequest, normalizeM6Entries, recordLiveCassettes, recordOrchestratorCrash };