@tangle-network/agent-eval 0.145.10 → 0.145.12

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/analyst/index.d.ts +2 -2
  3. package/dist/analyst/index.js +3 -3
  4. package/dist/{benchmark-command-BDHW2AUg.js → benchmark-command-JSjVoAxT.js} +7 -7
  5. package/dist/{benchmark-command-BDHW2AUg.js.map → benchmark-command-JSjVoAxT.js.map} +1 -1
  6. package/dist/benchmarks/index.js +3 -3
  7. package/dist/campaign/index.js +5 -5
  8. package/dist/{campaign-B3GJpJ4h.js → campaign-Ct6r9oNe.js} +7 -7
  9. package/dist/{campaign-B3GJpJ4h.js.map → campaign-Ct6r9oNe.js.map} +1 -1
  10. package/dist/cli.js +1 -1
  11. package/dist/contract/index.d.ts.map +1 -1
  12. package/dist/contract/index.js +121 -22
  13. package/dist/contract/index.js.map +1 -1
  14. package/dist/{define-agent-eval-cSMEFzVu.js → define-agent-eval-BXusiVTQ.js} +3 -3
  15. package/dist/{define-agent-eval-cSMEFzVu.js.map → define-agent-eval-BXusiVTQ.js.map} +1 -1
  16. package/dist/{dspy-rlm-engine-BZ2aMZEd.js → dspy-rlm-engine-CqwhQQBw.js} +2 -2
  17. package/dist/{dspy-rlm-engine-BZ2aMZEd.js.map → dspy-rlm-engine-CqwhQQBw.js.map} +1 -1
  18. package/dist/exec-y-DCLqK7.js +204 -0
  19. package/dist/exec-y-DCLqK7.js.map +1 -0
  20. package/dist/{external-optimizer-process-BRE56woM.js → external-optimizer-process-D-9iX64j.js} +3 -3
  21. package/dist/{external-optimizer-process-BRE56woM.js.map → external-optimizer-process-D-9iX64j.js.map} +1 -1
  22. package/dist/{external-optimizer-subprocess-BhKYK0Jv.js → external-optimizer-subprocess-x5AbhAYX.js} +2 -2
  23. package/dist/{external-optimizer-subprocess-BhKYK0Jv.js.map → external-optimizer-subprocess-x5AbhAYX.js.map} +1 -1
  24. package/dist/index.js +5 -5
  25. package/dist/ledger-core/index.js +1 -1
  26. package/dist/{ledger-core-BmZt19oQ.js → ledger-core-DTae9rv_.js} +3 -2
  27. package/dist/ledger-core-DTae9rv_.js.map +1 -0
  28. package/dist/{llm-judge-DhiJqSjB.js → llm-judge-DqAkIQA1.js} +6 -5
  29. package/dist/{llm-judge-DhiJqSjB.js.map → llm-judge-DqAkIQA1.js.map} +1 -1
  30. package/dist/openapi.json +1 -1
  31. package/dist/{produced-state-BNyyud4g.js → produced-state-B9skdU8u.js} +2 -2
  32. package/dist/{produced-state-BNyyud4g.js.map → produced-state-B9skdU8u.js.map} +1 -1
  33. package/dist/{semantic-concept-judge-BiJxScqe.js → semantic-concept-judge-C6M-qOeb.js} +2 -2
  34. package/dist/{semantic-concept-judge-BiJxScqe.js.map → semantic-concept-judge-C6M-qOeb.js.map} +1 -1
  35. package/dist/{skillopt-optimization-method-C6JSfYxT.js → skillopt-optimization-method-CcWZBaSz.js} +4 -4
  36. package/dist/{skillopt-optimization-method-C6JSfYxT.js.map → skillopt-optimization-method-CcWZBaSz.js.map} +1 -1
  37. package/dist/steps-AmkT-GIM.d.ts +216 -0
  38. package/dist/steps-AmkT-GIM.d.ts.map +1 -0
  39. package/dist/trace-repair/index.d.ts +1 -21
  40. package/dist/trace-repair/index.d.ts.map +1 -1
  41. package/dist/trace-repair/index.js +10 -19
  42. package/dist/trace-repair/index.js.map +1 -1
  43. package/dist/trajectory-replay/index.d.ts +2 -2
  44. package/dist/trajectory-replay/index.js +2 -2
  45. package/docs/trace-repair-admission.md +134 -0
  46. package/docs/trajectory-replay.md +21 -1
  47. package/package.json +3 -3
  48. package/dist/exec-BLtYZdWo.js +0 -49
  49. package/dist/exec-BLtYZdWo.js.map +0 -1
  50. package/dist/ledger-core-BmZt19oQ.js.map +0 -1
  51. package/dist/steps-BArUxhna.d.ts +0 -51
  52. package/dist/steps-BArUxhna.d.ts.map +0 -1
@@ -0,0 +1,216 @@
1
+ //#region src/trajectory-replay/steps.d.ts
2
+ /**
3
+ * Recorded shell-trajectory steps and the observation grammar they carry.
4
+ *
5
+ * A recorded trajectory is the action/observation sequence an agent actually
6
+ * ran. Scaffolds that execute one shell command per step (mini-SWE and the
7
+ * CodeTracer-normalized corpora built from it) tag each observation with the
8
+ * command's returncode and its combined output:
9
+ *
10
+ * <returncode>2</returncode>
11
+ * <output>
12
+ * …command output…
13
+ * </output>
14
+ *
15
+ * That is one of four shapes a recorded turn carries, and the other three are
16
+ * not command results at all:
17
+ *
18
+ * - a timeout notice, when the environment killed the command at its bound;
19
+ * - a format-error notice, when the scaffold rejected the turn and ran
20
+ * nothing;
21
+ * - an elision marker `$<hex>`, when the published dump dropped the string.
22
+ *
23
+ * A turn also carries no observation when it is the run's last turn, because
24
+ * the scaffold records an observation only when it hands one back to the model.
25
+ *
26
+ * The parsers here are the only place that grammar is decoded. Everything
27
+ * downstream — replay verdicts, corpus enumeration, admission funnels, fix
28
+ * prompts — reads the returncode, the output, and the failure signature through
29
+ * these functions. A second decoder elsewhere is how a corpus reads as
30
+ * unreplayable when it is not.
31
+ */
32
+ /**
33
+ * One step of a recorded shell trajectory. Structural: any richer step record
34
+ * (file refs, thinking text, tool type) satisfies it.
35
+ */
36
+ interface RecordedTrajectoryStep {
37
+ /** 1-based position in the trajectory. */
38
+ readonly step_id: number;
39
+ readonly action: string;
40
+ /** Null when the step recorded no observation (terminal submit steps). */
41
+ readonly observation: string | null;
42
+ }
43
+ /** Recorded returncode of a step, or null when the observation carries none. */
44
+ declare function parseRecordedReturncode(observation: string | null): number | null;
45
+ /** Text between the observation's <output> tags, or the raw observation when
46
+ * the tags are absent. */
47
+ declare function parseObservationOutput(observation: string | null): string;
48
+ /**
49
+ * Stable failure-signature candidate: the first line of the recorded output
50
+ * that contains the word "error". Null when no such line exists — a verdict
51
+ * then falls back to returncode-only matching and says so.
52
+ * Pass an explicit signature to override (compiler quote glyphs vary with
53
+ * locale, so a hand-picked ASCII substring is often more robust).
54
+ */
55
+ declare function deriveFailureSignature(observation: string | null): string | null;
56
+ /** mini-SWE's end-of-run submit convention: the agent echoes this sentinel
57
+ * and dumps the diff. A label on this step marks a bad SUBMIT DECISION, not a
58
+ * failed command — there is no executable failure to reproduce, so it is
59
+ * never a counterfactual replay target. */
60
+ declare const SUBMIT_ACTION_SIGNATURE = "COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT";
61
+ declare function isSubmitAction(action: string): boolean;
62
+ /**
63
+ * True when the action is the sentinel echo and nothing else.
64
+ *
65
+ * The distinction decides whether a step may be dropped. An agent is told to
66
+ * issue the sentinel alone, and 5.7% of recorded runs end on a command that
67
+ * writes files or edits them and then echoes it. Dropping such a step because
68
+ * it holds the sentinel would remove the run's last state change from the
69
+ * replay, so the recorded end state and the replayed one would differ.
70
+ */
71
+ declare function isSubmitOnlyAction(action: string): boolean;
72
+ /**
73
+ * A field the dump replaced with a counter instead of its text.
74
+ *
75
+ * The counter is hexadecimal and rises by one per dropped string in document
76
+ * order, so a decimal-only reading (`$12`) accepts every marker that carries a
77
+ * letter (`$3a`) as if it were real text. A command read that way replays as
78
+ * the literal two-to-four characters `$3a`, which is not the command the run
79
+ * executed.
80
+ *
81
+ * Nothing in the dump maps a marker back to its text: the same marker carries
82
+ * different content in different rows, so there is no dictionary to read. A
83
+ * field that matches is unrecoverable, so a caller rejects the row that holds
84
+ * it rather than replaying the marker.
85
+ */
86
+ declare const RECORDED_ELISION_PATTERN: RegExp;
87
+ declare function isElidedField(value: string | null | undefined): boolean;
88
+ /** Substring the timeout notice always carries, whatever the command was. */
89
+ declare const TIMEOUT_OBSERVATION_MARKER = "timed out and has been killed";
90
+ /** Opening of the notice the scaffold writes when a turn held no single action. */
91
+ declare const FORMAT_ERROR_OBSERVATION_PREFIX = "Please always provide EXACTLY ONE action in triple backticks, found ";
92
+ /**
93
+ * What a recorded observation is.
94
+ *
95
+ * `command-result` is the only kind that carries an exit status. `timeout` and
96
+ * `format-error` are the scaffold speaking rather than a command: the first
97
+ * says the environment killed the command, the second says no command ran at
98
+ * all. `elided` and `absent` carry no information about the step, and
99
+ * `unreadable` is a shape this grammar does not know — never assumed to be
100
+ * anything.
101
+ */
102
+ type RecordedObservationKind = 'command-result' | 'timeout' | 'format-error' | 'elided' | 'absent' | 'unreadable';
103
+ declare function classifyObservation(observation: string | null): RecordedObservationKind;
104
+ /** True when the recording shows the environment killed this step at its
105
+ * wall-clock bound. Such a step carries no returncode, so no replay can
106
+ * confirm or contradict it. */
107
+ declare function isRecordedTimeout(observation: string | null): boolean;
108
+ /**
109
+ * One turn as the published trajectory dump holds it.
110
+ *
111
+ * A turn is not a step: the system prompt, the task statement and every turn
112
+ * the scaffold rejected are turns that executed nothing.
113
+ */
114
+ interface RecordedTrajectoryTurn {
115
+ readonly src?: string | null;
116
+ readonly msg?: string | null;
117
+ readonly tools?: readonly {
118
+ readonly cmd?: string | null;
119
+ }[] | null;
120
+ readonly obs?: string | null;
121
+ }
122
+ interface DecodedTrajectory {
123
+ /** Executed commands in recorded order, each holding its OWN observation. */
124
+ readonly steps: readonly RecordedTrajectoryStep[];
125
+ /** Turns the scaffold rejected before anything ran. */
126
+ readonly formatErrorTurns: number;
127
+ /**
128
+ * Executed commands whose text the dump dropped.
129
+ *
130
+ * The step stays in `steps` carrying the marker, because the run did execute
131
+ * a command there and a shorter list would misreport the trajectory. The
132
+ * marker is not a command, so any count above zero means this trajectory
133
+ * cannot be replayed: gate on it, or call `assertReplayableTrajectory`.
134
+ */
135
+ readonly elidedCommands: number;
136
+ /** True when the run's last turn was the submit sentinel with no observation. */
137
+ readonly endedOnSubmitSentinel: boolean;
138
+ /** Turns carrying an observation this grammar cannot read. */
139
+ readonly unreadableTurns: number;
140
+ }
141
+ /**
142
+ * Pair every recorded command with the observation of its own turn.
143
+ *
144
+ * Collecting commands and observations into two lists and zipping them is the
145
+ * decode that looks right and is not: a turn the scaffold rejected carries an
146
+ * observation of its own, so from the first such turn onward every observation
147
+ * belongs to a different command than the one it is read against.
148
+ *
149
+ * A rejected turn executed nothing, so it is never a step — including when the
150
+ * dump recorded a command for it. The scaffold rejects a turn holding several
151
+ * bash blocks and runs none of them, while the dump keeps one of the blocks in
152
+ * the command field. Replaying that field would execute a command the recorded
153
+ * run did not, which is a worse corpus than a smaller one.
154
+ *
155
+ * A rejected turn is recognised by its observation, so a rejected turn whose
156
+ * observation the dump elided is indistinguishable from an executed command
157
+ * whose observation it elided. Both read as a step. Nothing in the dump
158
+ * separates them, and the row-level defence is the share of unreadable exits a
159
+ * caller admits: a row with no elided observation cannot hold this case at all.
160
+ *
161
+ * A trailing step that echoes the sentinel and nothing else, with no
162
+ * observation, is dropped from `steps` and reported as `endedOnSubmitSentinel`.
163
+ * The scaffold records an observation only when it hands one to the model, and
164
+ * the sentinel ends the run, so the missing observation is the end of the
165
+ * transcript rather than a gap in it. Echoing the sentinel changes no state, so
166
+ * the recorded end state is the state the step before it left.
167
+ *
168
+ * A step that DID get an observation stays a step: the run continued past it.
169
+ * So does a step that echoes the sentinel after doing real work — its state
170
+ * change is part of the recorded end state, and with no observation its exit is
171
+ * unknown, which `finalRecordedOutcome` reports rather than hides.
172
+ */
173
+ declare function decodeRecordedTurns(turns: readonly RecordedTrajectoryTurn[]): DecodedTrajectory;
174
+ /**
175
+ * How the recorded run's last executed command ended.
176
+ *
177
+ * `killed` is a measured outcome, not a missing one: the environment stopped
178
+ * the command at its bound and wrote a notice instead of an exit status.
179
+ * `unreadable` names the observation kind that blocked the read, so a funnel
180
+ * can report which shape cost it the row.
181
+ */
182
+ type RecordedFinalOutcome = {
183
+ readonly kind: 'returncode';
184
+ readonly value: number;
185
+ } | {
186
+ readonly kind: 'killed';
187
+ } | {
188
+ readonly kind: 'unreadable';
189
+ readonly reason: RecordedObservationKind;
190
+ };
191
+ /**
192
+ * The outcome of the last step, or `null` when the trajectory has no steps.
193
+ *
194
+ * Reads only the last step. `decodeRecordedTurns` has already removed the turns
195
+ * that executed nothing, so the last step is the last command the run ran.
196
+ */
197
+ declare function finalRecordedOutcome(steps: readonly RecordedTrajectoryStep[]): RecordedFinalOutcome | null;
198
+ /**
199
+ * Steps whose recorded exit a replay cannot check.
200
+ *
201
+ * A killed step counts: the recording holds no exit status to compare a replay
202
+ * against, so agreement on it cannot be measured either way.
203
+ */
204
+ declare function unreadableExitCount(steps: readonly RecordedTrajectoryStep[]): number;
205
+ /**
206
+ * Throw unless every recorded command survived the dump.
207
+ *
208
+ * A replay executes `steps` verbatim, so one elision marker in an action means
209
+ * the replay runs the literal two-to-four characters of the marker instead of
210
+ * the command the run executed. The guard is here so a replayer needs one call
211
+ * rather than a field check it can forget.
212
+ */
213
+ declare function assertReplayableTrajectory(decoded: DecodedTrajectory): void;
214
+ //#endregion
215
+ export { isSubmitAction as _, RecordedObservationKind as a, parseRecordedReturncode as b, SUBMIT_ACTION_SIGNATURE as c, classifyObservation as d, decodeRecordedTurns as f, isRecordedTimeout as g, isElidedField as h, RecordedFinalOutcome as i, TIMEOUT_OBSERVATION_MARKER as l, finalRecordedOutcome as m, FORMAT_ERROR_OBSERVATION_PREFIX as n, RecordedTrajectoryStep as o, deriveFailureSignature as p, RECORDED_ELISION_PATTERN as r, RecordedTrajectoryTurn as s, DecodedTrajectory as t, assertReplayableTrajectory as u, isSubmitOnlyAction as v, unreadableExitCount as x, parseObservationOutput as y };
216
+ //# sourceMappingURL=steps-AmkT-GIM.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"steps-AmkT-GIM.d.ts","names":[],"sources":["../src/trajectory-replay/steps.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAmCiB;;WAEN;WACA;;WAEA;;;iBAIK,wBAAwB;;;iBAQxB,uBAAuB;;;;;;;;iBAavB,uBAAuB;;;;;cAW1B;iBAEG,eAAe;;;;;;;;;;iBAaf,mBAAmB;;;;;;;;;;;;;;;cAsBtB,0BAAwB;iBAErB,cAAc;;cAOjB;;cAGA;;;;;;;;;;;KAaD;iBAQI,oBAAoB,6BAA6B;;;;iBAYjD,kBAAkB;;;;;;;UAYjB;WACN;WACA;WACA;aAA4B;;WAC5B;;UAGM;;WAEN,gBAAgB;;WAEhB;;;;;;;;;WASA;;WAEA;;WAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmCK,oBAAoB,gBAAgB,2BAA2B;;;;;;;;;KAyCnE;WACG;WAA6B;;WAC7B;;WACA;WAA6B,QAAQ;;;;;;;;iBAQpC,qBACd,gBAAgB,2BACf;;;;;;;iBAiBa,oBAAoB,gBAAgB;;;;;;;;;iBAYpC,2BAA2B,SAAS"}
@@ -4,19 +4,8 @@ import { b as CustomTokenPricing, c as CostLedgerHandle, p as CostProvenance } f
4
4
  import { u as RunTokenUsage } from "../run-record-DVV82Gwh.js";
5
5
  import { a as TraceAnalystLimits, n as TraceAnalysisEngine } from "../engine-DJqRKbhs.js";
6
6
  import { t as PrimeBridgeTransport } from "../prime-bridge-transport-6feEglLf.js";
7
- import { t as RecordedTrajectoryStep } from "../steps-BArUxhna.js";
7
+ import { g as isRecordedTimeout, o as RecordedTrajectoryStep } from "../steps-AmkT-GIM.js";
8
8
  //#region src/trace-repair/mini-swe-scaffold.d.ts
9
- /**
10
- * The mini-swe-agent scaffold as the Terminal-Bench-2 trajectory corpus
11
- * recorded it: one bash block per turn, one observation per command, and a
12
- * sentinel command that ends the run.
13
- *
14
- * Every template here is byte-verified against
15
- * `yoonholee/terminalbench-trajectories` (agent = `mini-swe-agent`, 6663 rows,
16
- * one distinct system prompt across all of them). A continuation that renders
17
- * different bytes puts the model in a different distribution than the prefix
18
- * it inherits, so these strings are pinned, not configurable.
19
- */
20
9
  /** Whole-line marker that ends a run. The first output line must equal it and the command must exit 0. */
21
10
  declare const SUBMIT_SENTINEL = "COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT";
22
11
  /** Outputs at or above this length are elided head+tail instead of shown whole. */
@@ -62,15 +51,6 @@ interface CommandOutput {
62
51
  declare function renderObservation(output: CommandOutput): string;
63
52
  /** The observation after the environment killed a command for exceeding its timeout. */
64
53
  declare function renderTimeoutObservation(command: string, partialOutput: string): string;
65
- /**
66
- * True when the recording shows the environment killed this step at its
67
- * wall-clock bound.
68
- *
69
- * Such a step carries no returncode, so no replay can confirm or contradict
70
- * it. Callers use this to bound the replay of that step cheaply rather than to
71
- * decide agreement.
72
- */
73
- declare function isRecordedTimeout(observation: string | null): boolean;
74
54
  /** The observation after a turn that did not contain exactly one bash block. */
75
55
  declare function renderFormatErrorObservation(actionCount: number): string;
76
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/trace-repair/mini-swe-scaffold.ts","../../src/trace-repair/action-budget.ts","../../src/trace-repair/continuation-records.ts","../../src/trace-repair/control-policy.ts","../../src/trace-repair/admission-records.ts","../../src/trace-repair/continuation-policy.ts","../../src/trace-repair/oracle-determinism.ts","../../src/trace-repair/admission.ts","../../src/trace-repair/admission-contract.ts","../../src/trace-repair/admission-report.ts","../../src/trace-repair/analyst-response.ts","../../src/trace-repair/blinding.ts","../../src/trace-repair/analyst-arm.ts","../../src/trace-repair/arm-completion.ts","../../src/trace-repair/arm-dspy.ts","../../src/trace-repair/degenerate-strategies.ts","../../src/trace-repair/ports.ts","../../src/trace-repair/funnel.ts","../../src/trace-repair/grade.ts","../../src/trace-repair/delta-repair.ts","../../src/trace-repair/docker-environment.ts","../../src/trace-repair/repair-prompt.ts","../../src/trace-repair/test-oracle.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;cAaa;;cAGA;;cAGA;cAEA;UAiBI;;EAEf;;;;;EAKA;;;iBAIc,sBAAsB,OAAO;KAiFjC;EACN;EAAgB;;EAChB;EAAsB;;;;;;;iBASZ,YAAY,2BAA2B;UAMtC;EACf;EACA;;EAEA;;;;;;;iBAQc,kBAAkB,QAAQ;;iBAsB1B,yBAAyB,iBAAiB;;;;;;;;;iBAmB1C,kBAAkB;;iBAKlB,6BAA6B;;;;;;iBAyB7B,aAAa,QAAQ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Ac/B,uBAAuB,QAAQ;;;iBAM/B,qBACd,QAAQ,yBACR,SAAQ;;;;;;;;;iBAkBM,qBACd,SAAQ;;;;;;;;;iBAsBM,sBACd,QAAQ,oBACR;;;;cC7GW,+BAA+B;;cAG/B,wBAAwB;UAEpB;;WAEN;WACA;;WAEA;;UAGM;;WAEN,gBAAgB;;WAEhB;;;WAGA;WACA;WACA;;;;;;iBAUK,gBAAgB,gBAAgB;iBAWhC,mBAAmB,SAAS,4BAA4B"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/trace-repair/mini-swe-scaffold.ts","../../src/trace-repair/action-budget.ts","../../src/trace-repair/continuation-records.ts","../../src/trace-repair/control-policy.ts","../../src/trace-repair/admission-records.ts","../../src/trace-repair/continuation-policy.ts","../../src/trace-repair/oracle-determinism.ts","../../src/trace-repair/admission.ts","../../src/trace-repair/admission-contract.ts","../../src/trace-repair/admission-report.ts","../../src/trace-repair/analyst-response.ts","../../src/trace-repair/blinding.ts","../../src/trace-repair/analyst-arm.ts","../../src/trace-repair/arm-completion.ts","../../src/trace-repair/arm-dspy.ts","../../src/trace-repair/degenerate-strategies.ts","../../src/trace-repair/ports.ts","../../src/trace-repair/funnel.ts","../../src/trace-repair/grade.ts","../../src/trace-repair/delta-repair.ts","../../src/trace-repair/docker-environment.ts","../../src/trace-repair/repair-prompt.ts","../../src/trace-repair/test-oracle.ts"],"mappings":";;;;;;;;;cAyBa;;cAGA;;cAGA;cAEA;UAiBI;;EAEf;;;;;EAKA;;;iBAIc,sBAAsB,OAAO;KAiFjC;EACN;EAAgB;;EAChB;EAAsB;;;;;;;iBASZ,YAAY,2BAA2B;UAMtC;EACf;EACA;;EAEA;;;;;;;iBAQc,kBAAkB,QAAQ;;iBAsB1B,yBAAyB,iBAAiB;;iBAS1C,6BAA6B;;;;;;iBAyB7B,aAAa,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;KCxMzB;UAEK;;WAEN;;WAEA;;WAEA;;;cAIE,8BAA8B;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AQ;;;;;;;;;iBAsBM,sBACd,QAAQ,oBACR;;;;cC7GW,+BAA+B;;cAG/B,wBAAwB;UAEpB;;WAEN;WACA;;WAEA;;UAGM;;WAEN,gBAAgB;;WAEhB;;;WAGA;WACA;WACA;;;;;;iBAUK,gBAAgB,gBAAgB;iBAWhC,mBAAmB,SAAS,4BAA4B"}
@@ -4,7 +4,7 @@ import { n as contentHash } from "../verdict-cache-mZf5FEiY.js";
4
4
  import { t as certificationEvidenceDigest } from "../verdict-BndeTAh_.js";
5
5
  import { t as packageVersion } from "../package-version-D7lQHt_-.js";
6
6
  import { d as runPrimeExchange, n as buildPrimePrompt, p as assertEqualDeclarativeTerms, t as analystUsageReceiptFromPrimeUsage } from "../prime-protocol-6tZTVsWm.js";
7
- import { o as parseRecordedReturncode, r as deriveFailureSignature, t as wrapActionForExec } from "../exec-BLtYZdWo.js";
7
+ import { a as TIMEOUT_OBSERVATION_MARKER, f as isRecordedTimeout, g as parseRecordedReturncode, i as SUBMIT_ACTION_SIGNATURE, l as deriveFailureSignature, n as FORMAT_ERROR_OBSERVATION_PREFIX, t as wrapActionForExec } from "../exec-y-DCLqK7.js";
8
8
  import { createHash } from "node:crypto";
9
9
  import { constants } from "node:os";
10
10
  import { spawn } from "node:child_process";
@@ -19,9 +19,13 @@ import { spawn } from "node:child_process";
19
19
  * one distinct system prompt across all of them). A continuation that renders
20
20
  * different bytes puts the model in a different distribution than the prefix
21
21
  * it inherits, so these strings are pinned, not configurable.
22
+ *
23
+ * The markers a reader matches on live in `trajectory-replay/steps`, which owns
24
+ * the recorded grammar. This module writes with them so a rendered observation
25
+ * and a recorded one classify the same way.
22
26
  */
23
27
  /** Whole-line marker that ends a run. The first output line must equal it and the command must exit 0. */
24
- const SUBMIT_SENTINEL = "COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT";
28
+ const SUBMIT_SENTINEL = SUBMIT_ACTION_SIGNATURE;
25
29
  /** Outputs at or above this length are elided head+tail instead of shown whole. */
26
30
  const OUTPUT_ELISION_THRESHOLD = 1e4;
27
31
  /** Characters kept from each end of an elided output. */
@@ -159,24 +163,11 @@ If you really need to see something from the full command's output, you can redi
159
163
  }
160
164
  /** The observation after the environment killed a command for exceeding its timeout. */
161
165
  function renderTimeoutObservation(command, partialOutput) {
162
- return `The last command <command>${command}</command> timed out and has been killed.\nThe output of the command was:\n <output>\n${partialOutput}\n</output>\nPlease try another command and make sure to avoid those requiring interactive input.`;
163
- }
164
- /** Substring `renderTimeoutObservation` always writes, whatever the command was. */
165
- const TIMEOUT_OBSERVATION_MARKER = "timed out and has been killed";
166
- /**
167
- * True when the recording shows the environment killed this step at its
168
- * wall-clock bound.
169
- *
170
- * Such a step carries no returncode, so no replay can confirm or contradict
171
- * it. Callers use this to bound the replay of that step cheaply rather than to
172
- * decide agreement.
173
- */
174
- function isRecordedTimeout(observation) {
175
- return observation?.includes(TIMEOUT_OBSERVATION_MARKER) === true;
166
+ return `The last command <command>${command}</command> ${TIMEOUT_OBSERVATION_MARKER}.\nThe output of the command was:\n <output>\n${partialOutput}\n</output>\nPlease try another command and make sure to avoid those requiring interactive input.`;
176
167
  }
177
168
  /** The observation after a turn that did not contain exactly one bash block. */
178
169
  function renderFormatErrorObservation(actionCount) {
179
- return `Please always provide EXACTLY ONE action in triple backticks, found ${actionCount} actions.\nIf you want to end the task, please issue the following command: \`echo ${SUBMIT_SENTINEL}\`\nwithout any other command.
170
+ return `${FORMAT_ERROR_OBSERVATION_PREFIX}${actionCount} actions.\nIf you want to end the task, please issue the following command: \`echo ${SUBMIT_SENTINEL}\`\nwithout any other command.
180
171
  Else, please format your response exactly as follows:
181
172
 
182
173
  <response_example>
@@ -199,7 +190,7 @@ function submissionOf(output) {
199
190
  if (output.returncode !== 0) return null;
200
191
  const lines = output.output.replace(/^\s+/, "").split(/(?<=\n)/);
201
192
  const first = lines[0];
202
- if (first === void 0 || first.trim() !== "COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT") return null;
193
+ if (first === void 0 || first.trim() !== SUBMIT_SENTINEL) return null;
203
194
  return lines.slice(1).join("");
204
195
  }
205
196
  //#endregion
@@ -544,7 +535,7 @@ function checkInterventionBudget(action, declaredKind, budget = SCAFFOLD_INTERVE
544
535
  if (measurement.bytes > budget.maxBytes) return reject("over-byte-cap", `${measurement.bytes} bytes exceeds the ${budget.maxBytes}-byte action budget`);
545
536
  if (measurement.statements > budget.maxStatements) return reject("multiple-statements", `${measurement.statements} top-level statements exceeds the ${budget.maxStatements} the scaffold takes per action`);
546
537
  if (measurement.heredocs > budget.maxHeredocs) return reject("multiple-heredocs", `${measurement.heredocs} heredocs exceeds the ${budget.maxHeredocs} one edit may author`);
547
- if (action.includes("COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT")) return reject("submit-instead-of-repair", "the action submits the run instead of repairing it");
538
+ if (action.includes(SUBMIT_SENTINEL)) return reject("submit-instead-of-repair", "the action submits the run instead of repairing it");
548
539
  if (NO_OP_ACTIONS.includes(action.trim())) return reject("no-op-action", `"${action.trim()}" changes nothing`);
549
540
  return {
550
541
  admissible: true,