@claudexor/workspace 4.8.1 → 5.0.1
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/dist/anchor-store.d.ts +20 -9
- package/dist/anchor-store.d.ts.map +1 -1
- package/dist/anchor-store.js +96 -16
- package/dist/anchor-store.js.map +1 -1
- package/dist/capture-failure.d.ts.map +1 -1
- package/dist/capture-failure.js +7 -2
- package/dist/capture-failure.js.map +1 -1
- package/dist/capture-inventory.d.ts +10 -0
- package/dist/capture-inventory.d.ts.map +1 -0
- package/dist/capture-inventory.js +63 -0
- package/dist/capture-inventory.js.map +1 -0
- package/dist/capture-objects.d.ts +32 -0
- package/dist/capture-objects.d.ts.map +1 -0
- package/dist/capture-objects.js +129 -0
- package/dist/capture-objects.js.map +1 -0
- package/dist/cleanup-fault.d.ts +18 -0
- package/dist/cleanup-fault.d.ts.map +1 -0
- package/dist/cleanup-fault.js +45 -0
- package/dist/cleanup-fault.js.map +1 -0
- package/dist/continuation-evidence.d.ts +61 -15
- package/dist/continuation-evidence.d.ts.map +1 -1
- package/dist/continuation-evidence.js +151 -36
- package/dist/continuation-evidence.js.map +1 -1
- package/dist/continuation-facts.d.ts +93 -0
- package/dist/continuation-facts.d.ts.map +1 -0
- package/dist/continuation-facts.js +162 -0
- package/dist/continuation-facts.js.map +1 -0
- package/dist/directory-workspace.d.ts.map +1 -1
- package/dist/directory-workspace.js +1 -3
- package/dist/directory-workspace.js.map +1 -1
- package/dist/files-io.d.ts.map +1 -1
- package/dist/files-io.js +1 -7
- package/dist/files-io.js.map +1 -1
- package/dist/fs-presence.d.ts +12 -0
- package/dist/fs-presence.d.ts.map +1 -0
- package/dist/fs-presence.js +35 -0
- package/dist/fs-presence.js.map +1 -0
- package/dist/git-nested-repositories.d.ts.map +1 -1
- package/dist/git-nested-repositories.js +11 -2
- package/dist/git-nested-repositories.js.map +1 -1
- package/dist/git-observed.d.ts +75 -0
- package/dist/git-observed.d.ts.map +1 -0
- package/dist/git-observed.js +172 -0
- package/dist/git-observed.js.map +1 -0
- package/dist/git-result.d.ts +36 -0
- package/dist/git-result.d.ts.map +1 -0
- package/dist/git-result.js +96 -0
- package/dist/git-result.js.map +1 -0
- package/dist/git-run.d.ts +11 -0
- package/dist/git-run.d.ts.map +1 -1
- package/dist/git-run.js +24 -0
- package/dist/git-run.js.map +1 -1
- package/dist/git-snapshot.d.ts +40 -0
- package/dist/git-snapshot.d.ts.map +1 -0
- package/dist/git-snapshot.js +238 -0
- package/dist/git-snapshot.js.map +1 -0
- package/dist/git-transient-capture.d.ts +63 -16
- package/dist/git-transient-capture.d.ts.map +1 -1
- package/dist/git-transient-capture.js +170 -57
- package/dist/git-transient-capture.js.map +1 -1
- package/dist/git.d.ts +46 -21
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +164 -103
- package/dist/git.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/lanes.d.ts +2 -1
- package/dist/lanes.d.ts.map +1 -1
- package/dist/lanes.js +7 -6
- package/dist/lanes.js.map +1 -1
- package/dist/manager.d.ts +21 -7
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +30 -17
- package/dist/manager.js.map +1 -1
- package/dist/object-compose.d.ts +58 -0
- package/dist/object-compose.d.ts.map +1 -0
- package/dist/object-compose.js +444 -0
- package/dist/object-compose.js.map +1 -0
- package/dist/object-materialize.d.ts +52 -0
- package/dist/object-materialize.d.ts.map +1 -0
- package/dist/object-materialize.js +467 -0
- package/dist/object-materialize.js.map +1 -0
- package/dist/object-occupied.d.ts +27 -0
- package/dist/object-occupied.d.ts.map +1 -0
- package/dist/object-occupied.js +131 -0
- package/dist/object-occupied.js.map +1 -0
- package/dist/object-revert.d.ts +45 -0
- package/dist/object-revert.d.ts.map +1 -0
- package/dist/object-revert.js +265 -0
- package/dist/object-revert.js.map +1 -0
- package/dist/object-saved-files.d.ts +50 -0
- package/dist/object-saved-files.d.ts.map +1 -0
- package/dist/object-saved-files.js +176 -0
- package/dist/object-saved-files.js.map +1 -0
- package/dist/object-sparse.d.ts +22 -0
- package/dist/object-sparse.d.ts.map +1 -0
- package/dist/object-sparse.js +72 -0
- package/dist/object-sparse.js.map +1 -0
- package/dist/object-store-leases.d.ts +41 -0
- package/dist/object-store-leases.d.ts.map +1 -0
- package/dist/object-store-leases.js +277 -0
- package/dist/object-store-leases.js.map +1 -0
- package/dist/object-store-roots.d.ts +25 -0
- package/dist/object-store-roots.d.ts.map +1 -0
- package/dist/object-store-roots.js +114 -0
- package/dist/object-store-roots.js.map +1 -0
- package/dist/object-store.d.ts +110 -0
- package/dist/object-store.d.ts.map +1 -0
- package/dist/object-store.js +404 -0
- package/dist/object-store.js.map +1 -0
- package/dist/object-transfer.d.ts +41 -0
- package/dist/object-transfer.d.ts.map +1 -0
- package/dist/object-transfer.js +267 -0
- package/dist/object-transfer.js.map +1 -0
- package/dist/plain-diff-capture.d.ts +1 -2
- package/dist/plain-diff-capture.d.ts.map +1 -1
- package/dist/plain-diff-capture.js +2 -7
- package/dist/plain-diff-capture.js.map +1 -1
- package/dist/plain-diff.d.ts +0 -4
- package/dist/plain-diff.d.ts.map +1 -1
- package/dist/plain-diff.js +2 -44
- package/dist/plain-diff.js.map +1 -1
- package/dist/raw-patch.d.ts.map +1 -1
- package/dist/raw-patch.js +5 -8
- package/dist/raw-patch.js.map +1 -1
- package/dist/run-expiry.d.ts +3 -0
- package/dist/run-expiry.d.ts.map +1 -0
- package/dist/run-expiry.js +15 -0
- package/dist/run-expiry.js.map +1 -0
- package/dist/thread-tree.d.ts +36 -2
- package/dist/thread-tree.d.ts.map +1 -1
- package/dist/thread-tree.js +87 -11
- package/dist/thread-tree.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,6 +1,45 @@
|
|
|
1
|
-
import { SessionCapsule } from "@claudexor/schema";
|
|
2
|
-
|
|
1
|
+
import { RunResumable, SessionCapsule, type RunEvent } from "@claudexor/schema";
|
|
2
|
+
import { type RunExecutionFacts } from "./continuation-facts.js";
|
|
3
|
+
export { runFilesExpired } from "./run-expiry.js";
|
|
3
4
|
export declare function readSessionCapsule(attemptDir: string): SessionCapsule | null;
|
|
5
|
+
interface HeldSession {
|
|
6
|
+
attemptId: string;
|
|
7
|
+
capsule: SessionCapsule;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Recorded assistant output that what a run carries forward does not
|
|
11
|
+
* represent, each block once under its attempt and native try (its process
|
|
12
|
+
* session). The represented try is the last accepted try of
|
|
13
|
+
* `representedAttempt`, whose answer or report is carried: its last typed
|
|
14
|
+
* final (AnswerAssembly's answer) and the blocks repeating it are left out,
|
|
15
|
+
* its other narration and earlier native-turn finals stay (with no typed final
|
|
16
|
+
* its joined narration is the carried answer, so the whole try is left out).
|
|
17
|
+
* Any block the carried text contains is left out too. Read from events the
|
|
18
|
+
* caller already holds.
|
|
19
|
+
*/
|
|
20
|
+
export declare function unrepresentedOutput(events: readonly RunEvent[], facts: RunExecutionFacts, representedAttempt: string | null, carried: string): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Whether a run is its own continuation source: it declared a terminal block,
|
|
23
|
+
* holds a carrying session or recorded its own work. The successor's planner
|
|
24
|
+
* and the status projection stop their walk up a chain at the first such run;
|
|
25
|
+
* only a run with none of these defers to its ancestors.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ownsContinuationSource(evidence: {
|
|
28
|
+
resumable: RunResumable | undefined;
|
|
29
|
+
held: HeldSession | null;
|
|
30
|
+
hasEvidence: boolean;
|
|
31
|
+
}): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The source a status projection names, by the planner's own rule: the
|
|
34
|
+
* carrying session and whether the run is its own source. A declared terminal
|
|
35
|
+
* block or a carrying session decides without the run's events; only otherwise
|
|
36
|
+
* are they asked for, from `facts` when the caller holds them (run detail's
|
|
37
|
+
* bounded fold), else by reading the log once.
|
|
38
|
+
*/
|
|
39
|
+
export declare function continuationSource(runDir: string, facts?: () => RunExecutionFacts): {
|
|
40
|
+
held: HeldSession | null;
|
|
41
|
+
owns: boolean;
|
|
42
|
+
};
|
|
4
43
|
export declare function readContinuationEvidence(runDir: string): {
|
|
5
44
|
resumable: {
|
|
6
45
|
cause: "cancelled" | "context_exhausted" | "host_restart" | "input_required" | "other" | "permission_denied" | "pinned_limit" | "pool_exhausted" | "transport" | "vendor_limit" | "wall_clock";
|
|
@@ -19,20 +58,11 @@ export declare function readContinuationEvidence(runDir: string): {
|
|
|
19
58
|
root: string | null;
|
|
20
59
|
};
|
|
21
60
|
} | undefined;
|
|
22
|
-
held:
|
|
23
|
-
|
|
24
|
-
capsule: {
|
|
25
|
-
harness: string;
|
|
26
|
-
nativeSessionId: string;
|
|
27
|
-
holderProfileId: string | null;
|
|
28
|
-
file: string | null;
|
|
29
|
-
mtimeMs: number | null;
|
|
30
|
-
sidecars: string[];
|
|
31
|
-
cwd: string;
|
|
32
|
-
requestedModel: string | null;
|
|
33
|
-
};
|
|
34
|
-
} | null;
|
|
61
|
+
held: HeldSession | null;
|
|
62
|
+
sessionMemory: "full" | "partial" | "unknown" | null;
|
|
35
63
|
attemptId: string;
|
|
64
|
+
attempts: string[];
|
|
65
|
+
uncovered: string[];
|
|
36
66
|
attempt: {
|
|
37
67
|
observed_model: string | null;
|
|
38
68
|
observed_model_catalog_match: {
|
|
@@ -101,6 +131,22 @@ export declare function readContinuationEvidence(runDir: string): {
|
|
|
101
131
|
cashKnowledge: "estimated" | "exact" | "unknown";
|
|
102
132
|
valuationKnowledge: "estimated" | "exact" | "unknown";
|
|
103
133
|
} | undefined;
|
|
134
|
+
raw_context?: {
|
|
135
|
+
model: string;
|
|
136
|
+
estimated_request_tokens: number;
|
|
137
|
+
budget: {
|
|
138
|
+
estimator: "chars_div_4";
|
|
139
|
+
basis: "assumed_ceiling" | "model_context_window";
|
|
140
|
+
model: string | null;
|
|
141
|
+
context_window: number | null;
|
|
142
|
+
output_allowance_tokens: number | null;
|
|
143
|
+
framing_tokens: number | null;
|
|
144
|
+
selection_limit_tokens: number;
|
|
145
|
+
estimated_packet_tokens: number;
|
|
146
|
+
omitted_for_budget: number;
|
|
147
|
+
mandatory_paths: string[];
|
|
148
|
+
};
|
|
149
|
+
} | undefined;
|
|
104
150
|
attempt_id: string;
|
|
105
151
|
harness_id: string;
|
|
106
152
|
auth_mode: "api_key" | "local_session" | "unknown" | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuation-evidence.d.ts","sourceRoot":"","sources":["../src/continuation-evidence.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"continuation-evidence.d.ts","sourceRoot":"","sources":["../src/continuation-evidence.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAgB,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG9F,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAO5E;AAYD,UAAU,WAAW;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;CACzB;AA2DD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,QAAQ,EAAE,EAC3B,KAAK,EAAE,iBAAiB,EACxB,kBAAkB,EAAE,MAAM,GAAG,IAAI,EACjC,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CAaf;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE;IAC/C,SAAS,EAAE,YAAY,GAAG,SAAS,CAAC;IACpC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB,GAAG,OAAO,CAEV;AAwBD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,iBAAiB,GAC9B;IAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAgB7C;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CtD"}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
/** Shared evidence facts for admission and the successor's carrier planner. */
|
|
2
|
-
import { existsSync,
|
|
2
|
+
import { existsSync, readdirSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { parse as yamlParse } from "yaml";
|
|
5
5
|
import { RunResumable, RunTelemetry, SessionCapsule } from "@claudexor/schema";
|
|
6
6
|
import { readRunEvents, retainedOutput } from "@claudexor/event-log";
|
|
7
7
|
import { readTextSafe } from "@claudexor/util";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
catch (error) {
|
|
14
|
-
if (error.code === "ENOENT")
|
|
15
|
-
return false;
|
|
16
|
-
throw error;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
8
|
+
import { carryingAttempt, recordedSessionMemory, runExecutionFacts, uncoveredAttempts, } from "./continuation-facts.js";
|
|
9
|
+
import { readContinuationSources } from "./continuation-sources.js";
|
|
10
|
+
export { runFilesExpired } from "./run-expiry.js";
|
|
19
11
|
export function readSessionCapsule(attemptDir) {
|
|
20
12
|
try {
|
|
21
13
|
const text = readTextSafe(join(attemptDir, "session-capsule.json"));
|
|
@@ -36,35 +28,158 @@ function yaml(path) {
|
|
|
36
28
|
return null;
|
|
37
29
|
}
|
|
38
30
|
}
|
|
39
|
-
|
|
40
|
-
const finalDir = join(runDir, "final");
|
|
41
|
-
const resumable = RunResumable.safeParse(yaml(join(finalDir, "resumable.yaml"))).data;
|
|
42
|
-
const telemetry = RunTelemetry.safeParse(yaml(join(finalDir, "telemetry.yaml"))).data;
|
|
31
|
+
function sessionCapsules(runDir) {
|
|
43
32
|
const attemptsDir = join(runDir, "attempts");
|
|
44
|
-
|
|
45
|
-
? readdirSync(attemptsDir)
|
|
46
|
-
.sort()
|
|
47
|
-
.flatMap((attemptId) => {
|
|
33
|
+
return existsSync(attemptsDir)
|
|
34
|
+
? readdirSync(attemptsDir).flatMap((attemptId) => {
|
|
48
35
|
const capsule = readSessionCapsule(join(attemptsDir, attemptId));
|
|
49
36
|
return capsule ? [{ attemptId, capsule }] : [];
|
|
50
37
|
})
|
|
51
38
|
: [];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The session that carries a run's work and the attempt that speaks for it,
|
|
42
|
+
* by one rule for every reader. The run's declared terminal source decides,
|
|
43
|
+
* serial or concurrent: its `resumable` block's session (none when the block
|
|
44
|
+
* names none), else the completed run's final attempt. Only a run without
|
|
45
|
+
* either (a host restart, an old run) falls back to its recorded execution
|
|
46
|
+
* facts: the carrying attempt; without any start, the seeded native first try
|
|
47
|
+
* or the run's only capsule. Never mtime or directory order. `facts` is
|
|
48
|
+
* asked only when the terminal records leave the choice to the recorded facts.
|
|
49
|
+
*/
|
|
50
|
+
function selectCarrier(resumable, telemetry, sessions, facts) {
|
|
51
|
+
const ofAttempt = (id) => sessions.find((entry) => entry.attemptId === id) ?? null;
|
|
52
|
+
if (resumable) {
|
|
53
|
+
const id = resumable.session?.nativeSessionId;
|
|
54
|
+
const named = sessions.filter((entry) => entry.capsule.nativeSessionId === id);
|
|
55
|
+
const started = (entry) => facts().accepted.some((start) => start.attemptId === entry.attemptId && start.nativeSessionId === id);
|
|
56
|
+
const held = (named.length > 1 ? named.find(started) : undefined) ?? named[0] ?? null;
|
|
57
|
+
return { held, source: held?.attemptId ?? null };
|
|
58
|
+
}
|
|
59
|
+
const final = telemetry?.final_attempt_id;
|
|
60
|
+
if (final)
|
|
61
|
+
return { held: ofAttempt(final), source: final };
|
|
62
|
+
const carrier = carryingAttempt(facts());
|
|
63
|
+
if (carrier)
|
|
64
|
+
return { held: ofAttempt(carrier), source: carrier };
|
|
65
|
+
const seeded = facts().receipts.find(({ receipt }) => receipt.tryIndex === 0 && receipt.carrier.startsWith("native"));
|
|
66
|
+
const held = ofAttempt(seeded?.attemptId) ?? (sessions.length === 1 ? sessions[0] : null);
|
|
67
|
+
return { held, source: held?.attemptId ?? null };
|
|
68
|
+
}
|
|
69
|
+
function terminalRecords(runDir) {
|
|
70
|
+
const finalDir = join(runDir, "final");
|
|
71
|
+
return {
|
|
72
|
+
resumable: RunResumable.safeParse(yaml(join(finalDir, "resumable.yaml"))).data,
|
|
73
|
+
telemetry: RunTelemetry.safeParse(yaml(join(finalDir, "telemetry.yaml"))).data,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Recorded assistant output that what a run carries forward does not
|
|
78
|
+
* represent, each block once under its attempt and native try (its process
|
|
79
|
+
* session). The represented try is the last accepted try of
|
|
80
|
+
* `representedAttempt`, whose answer or report is carried: its last typed
|
|
81
|
+
* final (AnswerAssembly's answer) and the blocks repeating it are left out,
|
|
82
|
+
* its other narration and earlier native-turn finals stay (with no typed final
|
|
83
|
+
* its joined narration is the carried answer, so the whole try is left out).
|
|
84
|
+
* Any block the carried text contains is left out too. Read from events the
|
|
85
|
+
* caller already holds.
|
|
86
|
+
*/
|
|
87
|
+
export function unrepresentedOutput(events, facts, representedAttempt, carried) {
|
|
88
|
+
const session = facts.accepted
|
|
89
|
+
.filter((start) => start.attemptId === representedAttempt)
|
|
90
|
+
.at(-1)?.sessionId;
|
|
91
|
+
const represented = representedAttempt !== null && session ? { attempt: representedAttempt, session } : undefined;
|
|
92
|
+
const harness = events.filter((event) => event.type === "harness.event");
|
|
93
|
+
return (retainedOutput(harness, 0, false, {
|
|
94
|
+
text: carried,
|
|
95
|
+
...(represented ? { represented } : {}),
|
|
96
|
+
})?.trim() || null);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Whether a run is its own continuation source: it declared a terminal block,
|
|
100
|
+
* holds a carrying session or recorded its own work. The successor's planner
|
|
101
|
+
* and the status projection stop their walk up a chain at the first such run;
|
|
102
|
+
* only a run with none of these defers to its ancestors.
|
|
103
|
+
*/
|
|
104
|
+
export function ownsContinuationSource(evidence) {
|
|
105
|
+
return evidence.resumable !== undefined || evidence.held !== null || evidence.hasEvidence;
|
|
106
|
+
}
|
|
107
|
+
/** A run's own work outside its events: the source attempt's patch, its final answer and retained output. */
|
|
108
|
+
function sourceFiles(runDir, attemptId) {
|
|
109
|
+
const finalDir = join(runDir, "final");
|
|
110
|
+
return {
|
|
111
|
+
patch: readTextSafe(join(runDir, "attempts", attemptId, "patch.diff")) ??
|
|
112
|
+
readTextSafe(join(finalDir, "patch.diff")) ??
|
|
113
|
+
"",
|
|
114
|
+
answer: readTextSafe(join(finalDir, "answer.md"))?.trim() ?? "",
|
|
115
|
+
retained: readTextSafe(join(finalDir, "retained-output.md"))?.trim() ?? "",
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/** The run recorded work of its own: a patch, a final or retained output, or work in
|
|
119
|
+
* its events, which are asked only when no file shows it. */
|
|
120
|
+
function hasOwnWork(files, facts) {
|
|
121
|
+
return !!files.patch.trim() || !!files.answer || !!files.retained || facts().recordedWork;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The source a status projection names, by the planner's own rule: the
|
|
125
|
+
* carrying session and whether the run is its own source. A declared terminal
|
|
126
|
+
* block or a carrying session decides without the run's events; only otherwise
|
|
127
|
+
* are they asked for, from `facts` when the caller holds them (run detail's
|
|
128
|
+
* bounded fold), else by reading the log once.
|
|
129
|
+
*/
|
|
130
|
+
export function continuationSource(runDir, facts) {
|
|
131
|
+
let recorded;
|
|
132
|
+
const lazy = () => (recorded ??= facts
|
|
133
|
+
? facts()
|
|
134
|
+
: runExecutionFacts(readRunEvents(join(runDir, "events.jsonl")).events));
|
|
135
|
+
const { resumable, telemetry } = terminalRecords(runDir);
|
|
136
|
+
const { held, source } = selectCarrier(resumable, telemetry, sessionCapsules(runDir), lazy);
|
|
137
|
+
const owns = ownsContinuationSource({
|
|
138
|
+
resumable,
|
|
139
|
+
held,
|
|
140
|
+
get hasEvidence() {
|
|
141
|
+
return hasOwnWork(sourceFiles(runDir, source ?? carryingAttempt(lazy()) ?? "a01"), lazy);
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
return { held, owns };
|
|
145
|
+
}
|
|
146
|
+
export function readContinuationEvidence(runDir) {
|
|
59
147
|
const events = readRunEvents(join(runDir, "events.jsonl"));
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
148
|
+
const facts = runExecutionFacts(events.events);
|
|
149
|
+
const { resumable, telemetry } = terminalRecords(runDir);
|
|
150
|
+
const { held, source } = selectCarrier(resumable, telemetry, sessionCapsules(runDir), () => facts);
|
|
151
|
+
const attemptId = source ?? carryingAttempt(facts) ?? "a01";
|
|
152
|
+
const files = sourceFiles(runDir, attemptId);
|
|
153
|
+
const { patch, answer, retained } = files;
|
|
154
|
+
const hasEvidence = hasOwnWork(files, () => facts);
|
|
155
|
+
const sessionMemory = held
|
|
156
|
+
? recordedSessionMemory(facts, { attemptId: held.attemptId, nativeSessionId: held.capsule.nativeSessionId }, readContinuationSources(runDir).length > 0)
|
|
157
|
+
: null;
|
|
158
|
+
const attempt = telemetry?.attempts.find((entry) => entry.attempt_id === attemptId);
|
|
159
|
+
// The final answer speaks for the run; the recorded output it does not
|
|
160
|
+
// represent (other attempts, the winner's earlier native tries and its
|
|
161
|
+
// winning try's other narration and earlier native-turn finals) stays beside
|
|
162
|
+
// it as evidence, once under its attempt and try.
|
|
163
|
+
const winner = telemetry?.final_attempt_id ?? null;
|
|
164
|
+
const unrepresented = answer ? unrepresentedOutput(events.events, facts, winner, answer) : null;
|
|
165
|
+
const output = answer
|
|
166
|
+
? unrepresented
|
|
167
|
+
? `Final answer (final/answer.md${winner ? `, attempt ${winner}` : ""}):\n\n${answer}\n\n${unrepresented}`
|
|
168
|
+
: answer
|
|
169
|
+
: retained || retainedOutput(events.events, events.malformed) || "";
|
|
170
|
+
return {
|
|
171
|
+
resumable,
|
|
172
|
+
held,
|
|
173
|
+
sessionMemory,
|
|
174
|
+
attemptId,
|
|
175
|
+
// Every attempt with recorded events, each its own attributed evidence.
|
|
176
|
+
attempts: facts.attempts.length > 0 ? facts.attempts : [attemptId],
|
|
177
|
+
// The attempts whose work the held session never received.
|
|
178
|
+
uncovered: held ? uncoveredAttempts(facts, held.attemptId) : [],
|
|
179
|
+
attempt,
|
|
180
|
+
patch,
|
|
181
|
+
output,
|
|
182
|
+
hasEvidence,
|
|
183
|
+
};
|
|
69
184
|
}
|
|
70
185
|
//# sourceMappingURL=continuation-evidence.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuation-evidence.js","sourceRoot":"","sources":["../src/continuation-evidence.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"continuation-evidence.js","sourceRoot":"","sources":["../src/continuation-evidence.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI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EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC;IACpF,uEAAuE;IACvE,uEAAuE;IACvE,6EAA6E;IAC7E,kDAAkD;IAClD,MAAM,MAAM,GAAG,SAAS,EAAE,gBAAgB,IAAI,IAAI,CAAC;IACnD,MAAM,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAChG,MAAM,MAAM,GAAG,MAAM;QACnB,CAAC,CAAC,aAAa;YACb,CAAC,CAAC,gCAAgC,MAAM,CAAC,CAAC,CAAC,aAAa,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,MAAM,OAAO,aAAa,EAAE;YAC1G,CAAC,CAAC,MAAM;QACV,CAAC,CAAC,QAAQ,IAAI,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACtE,OAAO;QACL,SAAS;QACT,IAAI;QACJ,aAAa;QACb,SAAS;QACT,wEAAwE;QACxE,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAClE,2DAA2D;QAC3D,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;QAC/D,OAAO;QACP,KAAK;QACL,MAAM;QACN,WAAW;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recorded execution facts of one run's event log, shared by every
|
|
3
|
+
* continuation reader: which harness starts were accepted (not refused by a
|
|
4
|
+
* mismatched identity handshake), which continued try's receipt belongs to
|
|
5
|
+
* which start, which attempt carries the latest work and how complete a
|
|
6
|
+
* native session's history is. A start and its receipt are joined on the
|
|
7
|
+
* attempt, the process session id and event order, never on the vendor's
|
|
8
|
+
* native id alone or on a later start. Directory names and capsule mtimes
|
|
9
|
+
* are not execution facts.
|
|
10
|
+
*/
|
|
11
|
+
import { RunContinuityReceipt, type RunEvent } from "@claudexor/schema";
|
|
12
|
+
export interface RecordedStart {
|
|
13
|
+
index: number;
|
|
14
|
+
attemptId: string;
|
|
15
|
+
sessionId: string | null;
|
|
16
|
+
nativeSessionId: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface RecordedReceipt {
|
|
19
|
+
index: number;
|
|
20
|
+
attemptId: string;
|
|
21
|
+
sessionId: string | null;
|
|
22
|
+
receipt: RunContinuityReceipt;
|
|
23
|
+
}
|
|
24
|
+
export interface RunExecutionFacts {
|
|
25
|
+
/** Attempts with harness events, in first-event order. */
|
|
26
|
+
attempts: string[];
|
|
27
|
+
/** Attempts that recorded agent progress (a tool call or result, an edit, reasoning
|
|
28
|
+
* text) or a typed final answer. */
|
|
29
|
+
progressed: Set<string>;
|
|
30
|
+
/** Starts not refused by their own identity handshake, in event order. */
|
|
31
|
+
accepted: RecordedStart[];
|
|
32
|
+
receipts: RecordedReceipt[];
|
|
33
|
+
/** The run recorded work of its own in its events: a tool call or edit, or
|
|
34
|
+
* output its retained-output projection keeps (assistant text, a captured file). */
|
|
35
|
+
recordedWork: boolean;
|
|
36
|
+
/** The receipt the continued try of this start settled with, when any. */
|
|
37
|
+
receiptOf(start: RecordedStart): RecordedReceipt | null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The same facts accumulated event by event, so a bounded event fold (run
|
|
41
|
+
* detail's) can keep them between reads and add only appended events.
|
|
42
|
+
*/
|
|
43
|
+
export interface ExecutionFold {
|
|
44
|
+
attempts: string[];
|
|
45
|
+
progressed: Set<string>;
|
|
46
|
+
starts: RecordedStart[];
|
|
47
|
+
receipts: RecordedReceipt[];
|
|
48
|
+
recordedWork: boolean;
|
|
49
|
+
/** A terminal row was seen: retained output ends there. */
|
|
50
|
+
ended: boolean;
|
|
51
|
+
/** Position of the next event. */
|
|
52
|
+
next: number;
|
|
53
|
+
}
|
|
54
|
+
export declare function emptyExecutionFold(): ExecutionFold;
|
|
55
|
+
/** A copy a later event can extend without changing `fold`. */
|
|
56
|
+
export declare function copyExecutionFold(fold: ExecutionFold): ExecutionFold;
|
|
57
|
+
export declare function addExecutionEvent(fold: ExecutionFold, event: {
|
|
58
|
+
type?: unknown;
|
|
59
|
+
payload?: unknown;
|
|
60
|
+
}): void;
|
|
61
|
+
export declare function executionFactsOf(fold: ExecutionFold): RunExecutionFacts;
|
|
62
|
+
export declare function runExecutionFacts(events: readonly RunEvent[]): RunExecutionFacts;
|
|
63
|
+
/**
|
|
64
|
+
* Attempts of the run whose recorded work the held session never received:
|
|
65
|
+
* every attempt but its own, except those a packet of this run briefed it
|
|
66
|
+
* with. Only a successor's attempt is so briefed (its first try's receipt is
|
|
67
|
+
* a packet), and a successor runs a single candidate whose attempts follow one
|
|
68
|
+
* another (admission), so every attempt recorded before it was in that packet.
|
|
69
|
+
* Event timing never decides lineage: another candidate of a concurrent run
|
|
70
|
+
* stays uncovered, separate evidence.
|
|
71
|
+
*/
|
|
72
|
+
export declare function uncoveredAttempts(facts: RunExecutionFacts, heldAttemptId: string): string[];
|
|
73
|
+
/**
|
|
74
|
+
* The attempt whose session carries the run's latest work: the newest accepted
|
|
75
|
+
* start of an attempt that made progress, else the newest accepted start. A
|
|
76
|
+
* later attempt that never started, or started and did nothing, cannot evict it.
|
|
77
|
+
*/
|
|
78
|
+
export declare function carryingAttempt(facts: RunExecutionFacts): string | null;
|
|
79
|
+
/** A continued try that started was handed its notice and caller text. */
|
|
80
|
+
export declare function continuedTryStarted(facts: RunExecutionFacts, firstTryOnly?: boolean): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* History quality of the native session `held` names, from this run's
|
|
83
|
+
* records: the receipt of the try that first started it (packet-born is
|
|
84
|
+
* partial; a native resume keeps that receipt's memory), the receipt of a
|
|
85
|
+
* seeded native first try that never started, or full for the first
|
|
86
|
+
* attempt's own session of a run that continues nothing. Anything else is
|
|
87
|
+
* unknown, never a guessed full or partial.
|
|
88
|
+
*/
|
|
89
|
+
export declare function recordedSessionMemory(facts: RunExecutionFacts, held: {
|
|
90
|
+
attemptId: string;
|
|
91
|
+
nativeSessionId: string;
|
|
92
|
+
}, continuesEarlierRun: boolean): RunContinuityReceipt["memory"];
|
|
93
|
+
//# sourceMappingURL=continuation-facts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuation-facts.d.ts","sourceRoot":"","sources":["../src/continuation-facts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,oBAAoB,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;wCACoC;IACpC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B;wFACoF;IACpF,YAAY,EAAE,OAAO,CAAC;IACtB,0EAA0E;IAC1E,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,eAAe,G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AA;CAAE,EACpD,mBAAmB,EAAE,OAAO,GAC3B,oBAAoB,CAAC,QAAQ,CAAC,CAYhC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recorded execution facts of one run's event log, shared by every
|
|
3
|
+
* continuation reader: which harness starts were accepted (not refused by a
|
|
4
|
+
* mismatched identity handshake), which continued try's receipt belongs to
|
|
5
|
+
* which start, which attempt carries the latest work and how complete a
|
|
6
|
+
* native session's history is. A start and its receipt are joined on the
|
|
7
|
+
* attempt, the process session id and event order, never on the vendor's
|
|
8
|
+
* native id alone or on a later start. Directory names and capsule mtimes
|
|
9
|
+
* are not execution facts.
|
|
10
|
+
*/
|
|
11
|
+
import { RunContinuityReceipt } from "@claudexor/schema";
|
|
12
|
+
const TOOL_PROGRESS = new Set(["tool_call", "tool_result", "file_change", "patch_produced"]);
|
|
13
|
+
const TERMINAL_ROWS = new Set(["run.completed", "run.failed", "run.blocked"]);
|
|
14
|
+
export function emptyExecutionFold() {
|
|
15
|
+
return {
|
|
16
|
+
attempts: [],
|
|
17
|
+
progressed: new Set(),
|
|
18
|
+
starts: [],
|
|
19
|
+
receipts: [],
|
|
20
|
+
recordedWork: false,
|
|
21
|
+
ended: false,
|
|
22
|
+
next: 0,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** A copy a later event can extend without changing `fold`. */
|
|
26
|
+
export function copyExecutionFold(fold) {
|
|
27
|
+
return {
|
|
28
|
+
...fold,
|
|
29
|
+
attempts: [...fold.attempts],
|
|
30
|
+
progressed: new Set(fold.progressed),
|
|
31
|
+
starts: [...fold.starts],
|
|
32
|
+
receipts: [...fold.receipts],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** Output the retained-output projection keeps (`retainedOutput`): a captured
|
|
36
|
+
* produced file or non-empty assistant text that is not an auth-switch notice. */
|
|
37
|
+
function retainsOutput(type, payload) {
|
|
38
|
+
if (type === "output.ready") {
|
|
39
|
+
const [root, attempt, directory, ...relative] = String(payload["path"] ?? "").split("/");
|
|
40
|
+
return (payload["kind"] === "artifact" &&
|
|
41
|
+
root === "attempts" &&
|
|
42
|
+
!!attempt &&
|
|
43
|
+
directory === "produced" &&
|
|
44
|
+
!!relative.join("/"));
|
|
45
|
+
}
|
|
46
|
+
const nested = payload["payload"];
|
|
47
|
+
return (type === "harness.event" &&
|
|
48
|
+
payload["type"] === "message" &&
|
|
49
|
+
nested?.["auth_switched"] !== true &&
|
|
50
|
+
typeof payload["text"] === "string" &&
|
|
51
|
+
payload["text"].trim() !== "");
|
|
52
|
+
}
|
|
53
|
+
export function addExecutionEvent(fold, event) {
|
|
54
|
+
const index = fold.next++;
|
|
55
|
+
const payload = (event.payload ?? {});
|
|
56
|
+
if (TERMINAL_ROWS.has(String(event.type)))
|
|
57
|
+
fold.ended = true;
|
|
58
|
+
if (!fold.ended && retainsOutput(event.type, payload))
|
|
59
|
+
fold.recordedWork = true;
|
|
60
|
+
const attemptId = typeof payload["attempt_id"] === "string" ? payload["attempt_id"] : null;
|
|
61
|
+
const sessionId = typeof payload["session_id"] === "string" ? payload["session_id"] : null;
|
|
62
|
+
if (attemptId === null)
|
|
63
|
+
return;
|
|
64
|
+
if (event.type === "run.continuity") {
|
|
65
|
+
const receipt = RunContinuityReceipt.safeParse(payload["receipt"]).data;
|
|
66
|
+
if (receipt)
|
|
67
|
+
fold.receipts.push({ index, attemptId, sessionId, receipt });
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (event.type !== "harness.event")
|
|
71
|
+
return;
|
|
72
|
+
if (!fold.attempts.includes(attemptId))
|
|
73
|
+
fold.attempts.push(attemptId);
|
|
74
|
+
const type = String(payload["type"]);
|
|
75
|
+
if (type === "tool_call" || type === "file_change")
|
|
76
|
+
fold.recordedWork = true;
|
|
77
|
+
// The controller's own "acted" facts: agent progress or a typed final answer
|
|
78
|
+
// (a crashed try's narration is evidence, not progress).
|
|
79
|
+
const text = typeof payload["text"] === "string" ? payload["text"].trim() : "";
|
|
80
|
+
if (TOOL_PROGRESS.has(type) ||
|
|
81
|
+
(type === "thinking" && text) ||
|
|
82
|
+
(type === "message" && text && payload["final"] === true))
|
|
83
|
+
fold.progressed.add(attemptId);
|
|
84
|
+
if (type !== "started")
|
|
85
|
+
return;
|
|
86
|
+
const nested = payload["payload"];
|
|
87
|
+
const native = nested?.["native_session_id"];
|
|
88
|
+
fold.starts.push({
|
|
89
|
+
index,
|
|
90
|
+
attemptId,
|
|
91
|
+
sessionId,
|
|
92
|
+
nativeSessionId: typeof native === "string" && native ? native : null,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
export function executionFactsOf(fold) {
|
|
96
|
+
const { attempts, progressed, receipts, recordedWork } = fold;
|
|
97
|
+
const receiptOf = (start) => start.sessionId === null
|
|
98
|
+
? null
|
|
99
|
+
: (receipts.find((entry) => entry.index > start.index &&
|
|
100
|
+
entry.attemptId === start.attemptId &&
|
|
101
|
+
entry.sessionId === start.sessionId) ?? null);
|
|
102
|
+
const accepted = fold.starts.filter((start) => !receiptOf(start)?.receipt.identityCheck.startsWith("mismatch"));
|
|
103
|
+
return { attempts, progressed, accepted, receipts, recordedWork, receiptOf };
|
|
104
|
+
}
|
|
105
|
+
export function runExecutionFacts(events) {
|
|
106
|
+
const fold = emptyExecutionFold();
|
|
107
|
+
for (const event of events)
|
|
108
|
+
addExecutionEvent(fold, event);
|
|
109
|
+
return executionFactsOf(fold);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Attempts of the run whose recorded work the held session never received:
|
|
113
|
+
* every attempt but its own, except those a packet of this run briefed it
|
|
114
|
+
* with. Only a successor's attempt is so briefed (its first try's receipt is
|
|
115
|
+
* a packet), and a successor runs a single candidate whose attempts follow one
|
|
116
|
+
* another (admission), so every attempt recorded before it was in that packet.
|
|
117
|
+
* Event timing never decides lineage: another candidate of a concurrent run
|
|
118
|
+
* stays uncovered, separate evidence.
|
|
119
|
+
*/
|
|
120
|
+
export function uncoveredAttempts(facts, heldAttemptId) {
|
|
121
|
+
const at = facts.attempts.indexOf(heldAttemptId);
|
|
122
|
+
if (at < 0)
|
|
123
|
+
return [];
|
|
124
|
+
const briefed = facts.receipts.some(({ attemptId, receipt }) => attemptId === heldAttemptId && receipt.tryIndex === 0 && receipt.carrier === "packet");
|
|
125
|
+
return facts.attempts.filter((_, i) => i !== at && !(briefed && i < at));
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The attempt whose session carries the run's latest work: the newest accepted
|
|
129
|
+
* start of an attempt that made progress, else the newest accepted start. A
|
|
130
|
+
* later attempt that never started, or started and did nothing, cannot evict it.
|
|
131
|
+
*/
|
|
132
|
+
export function carryingAttempt(facts) {
|
|
133
|
+
const started = facts.accepted.map((start) => start.attemptId);
|
|
134
|
+
return started.findLast((id) => facts.progressed.has(id)) ?? started.at(-1) ?? null;
|
|
135
|
+
}
|
|
136
|
+
/** A continued try that started was handed its notice and caller text. */
|
|
137
|
+
export function continuedTryStarted(facts, firstTryOnly = false) {
|
|
138
|
+
return facts.accepted.some((start) => {
|
|
139
|
+
const settled = facts.receiptOf(start)?.receipt;
|
|
140
|
+
return settled !== undefined && (!firstTryOnly || settled.tryIndex === 0);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* History quality of the native session `held` names, from this run's
|
|
145
|
+
* records: the receipt of the try that first started it (packet-born is
|
|
146
|
+
* partial; a native resume keeps that receipt's memory), the receipt of a
|
|
147
|
+
* seeded native first try that never started, or full for the first
|
|
148
|
+
* attempt's own session of a run that continues nothing. Anything else is
|
|
149
|
+
* unknown, never a guessed full or partial.
|
|
150
|
+
*/
|
|
151
|
+
export function recordedSessionMemory(facts, held, continuesEarlierRun) {
|
|
152
|
+
const born = facts.accepted.find((start) => start.nativeSessionId === held.nativeSessionId);
|
|
153
|
+
const receipt = born
|
|
154
|
+
? facts.receiptOf(born)?.receipt
|
|
155
|
+
: facts.receipts.find((entry) => entry.attemptId === held.attemptId &&
|
|
156
|
+
entry.receipt.tryIndex === 0 &&
|
|
157
|
+
(entry.receipt.carrier === "native" || entry.receipt.carrier === "native_moved"))?.receipt;
|
|
158
|
+
if (receipt)
|
|
159
|
+
return receipt.carrier === "packet" ? "partial" : receipt.memory;
|
|
160
|
+
return born && !continuesEarlierRun && born.attemptId === facts.attempts[0] ? "full" : "unknown";
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=continuation-facts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuation-facts.js","sourceRoot":"","sources":["../src/continuation-facts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,oBAAoB,EAAiB,MAAM,mBAAmB,CAAC;AAgDxE,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAC7F,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,eAAe,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;AAE9E,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,IAAI,GAAG,EAAE;QACrB,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,CAAC;KACR,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,iBAAiB,CAAC,IAAmB;IACnD,OAAO;QACL,GAAG,IAAI;QACP,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC5B,UAAU,EAAE,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;QACpC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QACxB,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;KAC7B,C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