@tangle-network/agent-eval 0.122.3 → 0.122.4

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.
@@ -16,10 +16,10 @@ import {
16
16
  routing_exports,
17
17
  runBenchmarkAdapter,
18
18
  summarizeBenchmarkCampaign
19
- } from "../chunk-OZFTLMGS.js";
20
- import "../chunk-IDC74VDL.js";
21
- import "../chunk-DHJJACEX.js";
22
- import "../chunk-N3QPYIVG.js";
19
+ } from "../chunk-GTSVLG2M.js";
20
+ import "../chunk-75OCWDXJ.js";
21
+ import "../chunk-MWN2X7C5.js";
22
+ import "../chunk-4R4GTZBZ.js";
23
23
  import "../chunk-EAWKAVID.js";
24
24
  import "../chunk-ARU2PZFM.js";
25
25
  import "../chunk-NJC7U437.js";
@@ -2,6 +2,254 @@ import { z } from 'zod';
2
2
  import { AxAIService, AxAgentActorTurnCallbackArgs, AxFunction, AxAIArgs } from '@ax-llm/ax';
3
3
  import { AgentProfile } from '@tangle-network/agent-interface';
4
4
 
5
+ /**
6
+ * Error taxonomy for `@tangle-network/agent-eval`.
7
+ *
8
+ * Every error this package throws as part of its *public contract* extends
9
+ * `AgentEvalError`. Consumers can pattern-match by `instanceof <Subclass>` or
10
+ * by the stable string `code` carried on the base class.
11
+ *
12
+ * The codes are stable across minor versions; new codes can be added, but
13
+ * existing codes never change meaning. New subclasses are non-breaking.
14
+ *
15
+ * Internal invariant guards (`throw new Error('this should never happen')`)
16
+ * remain plain `Error`s on purpose — they're programmer-mistake assertions,
17
+ * not consumer-catchable contract failures.
18
+ */
19
+ type AgentEvalErrorCode = 'validation' | 'not_found' | 'config' | 'capture_integrity' | 'judge' | 'verification' | 'replay' | 'backend_integrity' | 'profile_matrix';
20
+ /**
21
+ * Base class for every contract error this package throws — carries the stable
22
+ * string `code` taxonomy so consumers can `instanceof`-match or switch on `code`.
23
+ */
24
+ declare class AgentEvalError extends Error {
25
+ /** Stable string code. Survives minification; safe to switch on. */
26
+ readonly code: AgentEvalErrorCode;
27
+ constructor(code: AgentEvalErrorCode, message: string, options?: {
28
+ cause?: unknown;
29
+ });
30
+ }
31
+ /** Caller passed invalid arguments (out of range, mutually-exclusive options, bad shape). */
32
+ declare class ValidationError extends AgentEvalError {
33
+ constructor(message: string, options?: {
34
+ cause?: unknown;
35
+ });
36
+ }
37
+
38
+ type CostChannel = 'agent' | 'judge' | 'verifier' | 'analyst' | 'driver' | (string & {});
39
+ interface CostUsage {
40
+ inputTokens: number;
41
+ /** Includes reasoning tokens when the provider bills them as output. */
42
+ outputTokens: number;
43
+ /** Reasoning-token subset of outputTokens, when reported. */
44
+ reasoningTokens?: number;
45
+ /** Prompt tokens served from a provider cache. */
46
+ cachedTokens?: number;
47
+ /** Prompt tokens written into a provider cache. */
48
+ cacheWriteTokens?: number;
49
+ }
50
+ interface CostCallBase {
51
+ callId: string;
52
+ channel: CostChannel;
53
+ phase: string;
54
+ actor: string;
55
+ model: string;
56
+ maximumCostUsd?: number;
57
+ tags?: Record<string, string>;
58
+ timestamp: number;
59
+ }
60
+ interface CostReceipt extends CostCallBase, CostUsage {
61
+ status: 'settled';
62
+ costUsd: number;
63
+ costUnknown: boolean;
64
+ usageUnknown?: boolean;
65
+ pricing?: {
66
+ inputUsdPerThousand: number;
67
+ outputUsdPerThousand: number;
68
+ };
69
+ actualCostUsd?: number;
70
+ error?: string;
71
+ }
72
+ interface CostReceiptInput extends CostUsage {
73
+ model: string;
74
+ actualCostUsd?: number;
75
+ costUnknown?: boolean;
76
+ usageUnknown?: boolean;
77
+ }
78
+ type MaximumCharge = {
79
+ externallyEnforcedMaximumUsd: number;
80
+ } | ({
81
+ model: string;
82
+ } & CostUsage);
83
+ interface RunPaidCallInput<T> {
84
+ callId?: string;
85
+ channel: CostChannel;
86
+ phase: string;
87
+ actor: string;
88
+ /** Used before a provider receipt exists and on failures without one. */
89
+ model?: string;
90
+ tags?: Record<string, string>;
91
+ signal?: AbortSignal;
92
+ /** Provider-enforced dollar maximum, or maximum priced token usage. Required when capped. */
93
+ maximumCharge?: MaximumCharge;
94
+ /** `callId` can be forwarded as the provider's idempotency key. */
95
+ execute(signal: AbortSignal, callId: string): Promise<T>;
96
+ receipt(value: T): CostReceiptInput;
97
+ receiptFromError?(error: Error): CostReceiptInput | undefined;
98
+ }
99
+ type PaidCallResult<T> = {
100
+ succeeded: true;
101
+ callId: string;
102
+ value: T;
103
+ receipt: CostReceipt;
104
+ } | {
105
+ succeeded: false;
106
+ callId?: string;
107
+ error: Error;
108
+ receipt?: CostReceipt;
109
+ };
110
+ interface ChannelRollup {
111
+ channel: CostChannel;
112
+ calls: number;
113
+ inputTokens: number;
114
+ outputTokens: number;
115
+ reasoningTokens?: number;
116
+ cachedTokens: number;
117
+ cacheWriteTokens?: number;
118
+ costUsd: number;
119
+ unpricedCalls: number;
120
+ unknownUsageCalls: number;
121
+ }
122
+ interface CostLedgerSummary {
123
+ totalCalls: number;
124
+ pendingCalls: number;
125
+ unresolvedCalls: number;
126
+ reservedCostUsd: number;
127
+ inputTokens: number;
128
+ outputTokens: number;
129
+ reasoningTokens?: number;
130
+ cachedTokens: number;
131
+ cacheWriteTokens?: number;
132
+ totalCostUsd: number;
133
+ byChannel: ChannelRollup[];
134
+ unpricedModels: string[];
135
+ fullyPriced: boolean;
136
+ usageComplete: boolean;
137
+ accountingComplete: boolean;
138
+ incompleteReasons: string[];
139
+ }
140
+ interface CostLedgerFilter {
141
+ channel?: CostChannel;
142
+ phase?: string;
143
+ tags?: Record<string, string>;
144
+ }
145
+ interface CostLedgerWaitOptions {
146
+ /** Maximum time to wait for active provider calls. Default 5 seconds. */
147
+ timeoutMs?: number;
148
+ }
149
+ /** Append-only storage. `append` must atomically reject stale revisions. */
150
+ interface CostLedgerPersistence {
151
+ read(): {
152
+ revision: string;
153
+ events: string;
154
+ };
155
+ append(expectedRevision: string, event: string): string | undefined;
156
+ }
157
+ interface CostLedgerOptions {
158
+ costCeilingUsd?: number;
159
+ persistence?: CostLedgerPersistence;
160
+ /** Import already-settled receipts without admitting new paid work. */
161
+ receipts?: readonly CostReceipt[];
162
+ }
163
+ /** Run-wide paid-call admission, durable call state, receipts, and summaries. */
164
+ declare class CostLedger {
165
+ private readonly records;
166
+ private readonly activeCallIds;
167
+ private readonly lateCallIds;
168
+ private readonly idleWaiters;
169
+ private completedTasks;
170
+ private revision;
171
+ private costLimitPersisted;
172
+ readonly costCeilingUsd?: number;
173
+ private readonly persistence?;
174
+ constructor(input?: number | CostLedgerOptions);
175
+ runPaidCall<T>(input: RunPaidCallInput<T>): Promise<PaidCallResult<T>>;
176
+ /** Wait until every call started by this ledger has produced a durable outcome. */
177
+ waitForIdle(options?: CostLedgerWaitOptions): Promise<boolean>;
178
+ /** Settle a call left pending by a crashed process after reconciling with the provider. */
179
+ reconcile(callId: string, observed: CostReceiptInput, options?: {
180
+ error?: string;
181
+ }): CostReceipt;
182
+ list(filter?: CostLedgerFilter): CostReceipt[];
183
+ summary(filter?: CostLedgerFilter): CostLedgerSummary;
184
+ markCompleted(count?: number): void;
185
+ costPerCompletedTask(): number | null;
186
+ private execute;
187
+ private captureLateOutcome;
188
+ private releaseActiveCall;
189
+ private commitOutcome;
190
+ private captureFailure;
191
+ private commitReceipt;
192
+ private resolveMaximum;
193
+ private hasIncompleteSettledCall;
194
+ private appendRecord;
195
+ private ensureCostLimitPersisted;
196
+ private appendEvent;
197
+ }
198
+ /** Public callback surface for a shared cost ledger.
199
+ *
200
+ * Declaration bundles may expose this type through multiple package subpaths.
201
+ * Keeping callback contracts structural lets those subpaths compose while the
202
+ * concrete {@link CostLedger} retains its private durable state.
203
+ */
204
+ type CostLedgerHandle = Pick<CostLedger, Exclude<keyof CostLedger, 'waitForIdle'>> & Partial<Pick<CostLedger, 'waitForIdle'>>;
205
+
206
+ /**
207
+ * `CampaignStorage` — the filesystem seam `runCampaign` writes through
208
+ * (run/cell dirs, the resumability cache, per-cell artifacts, trace spans).
209
+ *
210
+ * The default (`fsCampaignStorage`) is the Node filesystem — identical
211
+ * behavior to the inline `node:fs` calls it replaces, so existing CLI
212
+ * consumers are unaffected. `inMemoryCampaignStorage` keeps everything in a
213
+ * `Map`, so the substrate runs in environments WITHOUT a filesystem
214
+ * (Cloudflare Workers, Deno Deploy, other edge runtimes) — the campaign
215
+ * still produces its `CampaignResult` (cells + aggregates) in memory;
216
+ * artifacts/traces simply aren't persisted to disk.
217
+ *
218
+ * Paths are opaque keys to the in-memory adapter — it does not parse them,
219
+ * so the same `join(...)`-built paths work unchanged across both adapters.
220
+ */
221
+ interface CampaignStorage {
222
+ /** Ensure a directory exists (recursive). No-op for in-memory. */
223
+ ensureDir(dir: string): void;
224
+ /** Does this path exist (as a written file or an ensured dir)? */
225
+ exists(path: string): boolean;
226
+ /** Read a UTF-8 file; `undefined` when missing or unreadable. */
227
+ read(path: string): string | undefined;
228
+ /** Write a file (string or bytes). Parent dir is assumed ensured. */
229
+ write(path: string, content: string | Uint8Array): void;
230
+ /** Append only when the current UTF-8 byte length matches `expectedBytes`.
231
+ * Returns the new length, or undefined when another writer won. */
232
+ append?(path: string, content: string, expectedBytes: number): number | undefined;
233
+ }
234
+ /** Node-filesystem storage — the default. Lazily requires `node:fs` so the
235
+ * module imports cleanly in non-Node runtimes (where the caller passes
236
+ * `inMemoryCampaignStorage` instead and never constructs this).
237
+ *
238
+ * `createRequire(import.meta.url)` is the ESM-native lazy require — a bare
239
+ * `require` is a ReferenceError under `"type": "module"`, which is exactly
240
+ * the shape this package publishes. */
241
+ declare function fsCampaignStorage(): CampaignStorage;
242
+ /** In-memory storage for filesystem-less runtimes. Artifacts + trace spans
243
+ * live in a `Map` for the duration of the run; the `CampaignResult` is
244
+ * fully populated, but nothing is persisted to disk. */
245
+ declare function inMemoryCampaignStorage(): CampaignStorage;
246
+ /** Open the durable spend account stored beside a logical run. */
247
+ declare function createRunCostLedger(input: {
248
+ storage: CampaignStorage;
249
+ runDir: string;
250
+ costCeilingUsd?: number;
251
+ }): CostLedger;
252
+
5
253
  /**
6
254
  * Lineage DAG — a git-graph of improvement candidates.
7
255
  *
@@ -26,6 +274,7 @@ import { AgentProfile } from '@tangle-network/agent-interface';
26
274
  * Ids are content+lineage hashes; order is a monotone insertion counter; every
27
275
  * query returns nodes in `seq` order. Same inputs ⇒ identical graph.
28
276
  */
277
+
29
278
  interface LineageNode {
30
279
  /** Deterministic content+lineage hash (see {@link lineageNodeId}). */
31
280
  id: string;
@@ -138,13 +387,23 @@ declare class Lineage {
138
387
  interface LineageStore {
139
388
  /** Load the persisted lineage (an empty `Lineage` when nothing is stored). */
140
389
  load(): Promise<Lineage>;
141
- /** Append one node durably. */
390
+ /** Persist one node durably and idempotently; conflicting content must throw. */
142
391
  append(node: LineageNode): Promise<void>;
143
392
  /** Overwrite with a full snapshot. */
144
393
  save(lineage: Lineage): Promise<void>;
145
394
  }
146
- /** JSONL-file store: append-only durability, snapshot via rewrite, `load` parses
147
- * through {@link Lineage.fromJSONL}. */
395
+ declare class LineageStoreConflictError extends Error {
396
+ readonly name = "LineageStoreConflictError";
397
+ }
398
+ /**
399
+ * Store a lineage through CampaignStorage. Appends use its compare-and-append
400
+ * primitive, so retries are idempotent and a second controller fails instead
401
+ * of assigning the same sequence number to different nodes.
402
+ */
403
+ declare function campaignLineageStore(storage: CampaignStorage, path: string, options?: {
404
+ maxAppendAttempts?: number;
405
+ }): LineageStore;
406
+ /** Filesystem convenience over the conflict-safe CampaignStorage implementation. */
148
407
  declare function fsLineageStore(path: string): LineageStore;
149
408
  /** In-memory store (default; for tests and ephemeral runs). */
150
409
  declare function memLineageStore(): LineageStore;
@@ -223,7 +482,10 @@ interface RunLineageOptions {
223
482
  }) => Promise<Omit<RunLineageStepResult, 'gate'>>;
224
483
  governor: Governor;
225
484
  budget: {
485
+ /** Maximum controller operations in this invocation. */
226
486
  maxSteps: number;
487
+ /** Optional maximum persisted nodes across every resumed invocation. */
488
+ maxNodes?: number;
227
489
  };
228
490
  store?: LineageStore;
229
491
  log?: (msg: string, fields?: Record<string, unknown>) => void;
@@ -239,39 +501,6 @@ interface RunLineageResult {
239
501
  * every node. Honors `prune`: a pruned track is never extended or branched again. */
240
502
  declare function runLineage(opts: RunLineageOptions): Promise<RunLineageResult>;
241
503
 
242
- /**
243
- * Error taxonomy for `@tangle-network/agent-eval`.
244
- *
245
- * Every error this package throws as part of its *public contract* extends
246
- * `AgentEvalError`. Consumers can pattern-match by `instanceof <Subclass>` or
247
- * by the stable string `code` carried on the base class.
248
- *
249
- * The codes are stable across minor versions; new codes can be added, but
250
- * existing codes never change meaning. New subclasses are non-breaking.
251
- *
252
- * Internal invariant guards (`throw new Error('this should never happen')`)
253
- * remain plain `Error`s on purpose — they're programmer-mistake assertions,
254
- * not consumer-catchable contract failures.
255
- */
256
- type AgentEvalErrorCode = 'validation' | 'not_found' | 'config' | 'capture_integrity' | 'judge' | 'verification' | 'replay' | 'backend_integrity' | 'profile_matrix';
257
- /**
258
- * Base class for every contract error this package throws — carries the stable
259
- * string `code` taxonomy so consumers can `instanceof`-match or switch on `code`.
260
- */
261
- declare class AgentEvalError extends Error {
262
- /** Stable string code. Survives minification; safe to switch on. */
263
- readonly code: AgentEvalErrorCode;
264
- constructor(code: AgentEvalErrorCode, message: string, options?: {
265
- cause?: unknown;
266
- });
267
- }
268
- /** Caller passed invalid arguments (out of range, mutually-exclusive options, bad shape). */
269
- declare class ValidationError extends AgentEvalError {
270
- constructor(message: string, options?: {
271
- cause?: unknown;
272
- });
273
- }
274
-
275
504
  type AgentProfileCellSchemaVersion = 'agent-profile-cell/v1';
276
505
  type AgentProfileJson = string | number | boolean | null | AgentProfileJson[] | {
277
506
  [key: string]: AgentProfileJson;
@@ -299,174 +528,6 @@ interface AgentProfileCell {
299
528
  dimensions?: Record<string, AgentProfileDimensionValue>;
300
529
  }
301
530
 
302
- type CostChannel = 'agent' | 'judge' | 'verifier' | 'analyst' | 'driver' | (string & {});
303
- interface CostUsage {
304
- inputTokens: number;
305
- /** Includes reasoning tokens when the provider bills them as output. */
306
- outputTokens: number;
307
- /** Reasoning-token subset of outputTokens, when reported. */
308
- reasoningTokens?: number;
309
- /** Prompt tokens served from a provider cache. */
310
- cachedTokens?: number;
311
- /** Prompt tokens written into a provider cache. */
312
- cacheWriteTokens?: number;
313
- }
314
- interface CostCallBase {
315
- callId: string;
316
- channel: CostChannel;
317
- phase: string;
318
- actor: string;
319
- model: string;
320
- maximumCostUsd?: number;
321
- tags?: Record<string, string>;
322
- timestamp: number;
323
- }
324
- interface CostReceipt extends CostCallBase, CostUsage {
325
- status: 'settled';
326
- costUsd: number;
327
- costUnknown: boolean;
328
- usageUnknown?: boolean;
329
- pricing?: {
330
- inputUsdPerThousand: number;
331
- outputUsdPerThousand: number;
332
- };
333
- actualCostUsd?: number;
334
- error?: string;
335
- }
336
- interface CostReceiptInput extends CostUsage {
337
- model: string;
338
- actualCostUsd?: number;
339
- costUnknown?: boolean;
340
- usageUnknown?: boolean;
341
- }
342
- type MaximumCharge = {
343
- externallyEnforcedMaximumUsd: number;
344
- } | ({
345
- model: string;
346
- } & CostUsage);
347
- interface RunPaidCallInput<T> {
348
- callId?: string;
349
- channel: CostChannel;
350
- phase: string;
351
- actor: string;
352
- /** Used before a provider receipt exists and on failures without one. */
353
- model?: string;
354
- tags?: Record<string, string>;
355
- signal?: AbortSignal;
356
- /** Provider-enforced dollar maximum, or maximum priced token usage. Required when capped. */
357
- maximumCharge?: MaximumCharge;
358
- /** `callId` can be forwarded as the provider's idempotency key. */
359
- execute(signal: AbortSignal, callId: string): Promise<T>;
360
- receipt(value: T): CostReceiptInput;
361
- receiptFromError?(error: Error): CostReceiptInput | undefined;
362
- }
363
- type PaidCallResult<T> = {
364
- succeeded: true;
365
- callId: string;
366
- value: T;
367
- receipt: CostReceipt;
368
- } | {
369
- succeeded: false;
370
- callId?: string;
371
- error: Error;
372
- receipt?: CostReceipt;
373
- };
374
- interface ChannelRollup {
375
- channel: CostChannel;
376
- calls: number;
377
- inputTokens: number;
378
- outputTokens: number;
379
- reasoningTokens?: number;
380
- cachedTokens: number;
381
- cacheWriteTokens?: number;
382
- costUsd: number;
383
- unpricedCalls: number;
384
- unknownUsageCalls: number;
385
- }
386
- interface CostLedgerSummary {
387
- totalCalls: number;
388
- pendingCalls: number;
389
- unresolvedCalls: number;
390
- reservedCostUsd: number;
391
- inputTokens: number;
392
- outputTokens: number;
393
- reasoningTokens?: number;
394
- cachedTokens: number;
395
- cacheWriteTokens?: number;
396
- totalCostUsd: number;
397
- byChannel: ChannelRollup[];
398
- unpricedModels: string[];
399
- fullyPriced: boolean;
400
- usageComplete: boolean;
401
- accountingComplete: boolean;
402
- incompleteReasons: string[];
403
- }
404
- interface CostLedgerFilter {
405
- channel?: CostChannel;
406
- phase?: string;
407
- tags?: Record<string, string>;
408
- }
409
- interface CostLedgerWaitOptions {
410
- /** Maximum time to wait for active provider calls. Default 5 seconds. */
411
- timeoutMs?: number;
412
- }
413
- /** Append-only storage. `append` must atomically reject stale revisions. */
414
- interface CostLedgerPersistence {
415
- read(): {
416
- revision: string;
417
- events: string;
418
- };
419
- append(expectedRevision: string, event: string): string | undefined;
420
- }
421
- interface CostLedgerOptions {
422
- costCeilingUsd?: number;
423
- persistence?: CostLedgerPersistence;
424
- /** Import already-settled receipts without admitting new paid work. */
425
- receipts?: readonly CostReceipt[];
426
- }
427
- /** Run-wide paid-call admission, durable call state, receipts, and summaries. */
428
- declare class CostLedger {
429
- private readonly records;
430
- private readonly activeCallIds;
431
- private readonly lateCallIds;
432
- private readonly idleWaiters;
433
- private completedTasks;
434
- private revision;
435
- private costLimitPersisted;
436
- readonly costCeilingUsd?: number;
437
- private readonly persistence?;
438
- constructor(input?: number | CostLedgerOptions);
439
- runPaidCall<T>(input: RunPaidCallInput<T>): Promise<PaidCallResult<T>>;
440
- /** Wait until every call started by this ledger has produced a durable outcome. */
441
- waitForIdle(options?: CostLedgerWaitOptions): Promise<boolean>;
442
- /** Settle a call left pending by a crashed process after reconciling with the provider. */
443
- reconcile(callId: string, observed: CostReceiptInput, options?: {
444
- error?: string;
445
- }): CostReceipt;
446
- list(filter?: CostLedgerFilter): CostReceipt[];
447
- summary(filter?: CostLedgerFilter): CostLedgerSummary;
448
- markCompleted(count?: number): void;
449
- costPerCompletedTask(): number | null;
450
- private execute;
451
- private captureLateOutcome;
452
- private releaseActiveCall;
453
- private commitOutcome;
454
- private captureFailure;
455
- private commitReceipt;
456
- private resolveMaximum;
457
- private hasIncompleteSettledCall;
458
- private appendRecord;
459
- private ensureCostLimitPersisted;
460
- private appendEvent;
461
- }
462
- /** Public callback surface for a shared cost ledger.
463
- *
464
- * Declaration bundles may expose this type through multiple package subpaths.
465
- * Keeping callback contracts structural lets those subpaths compose while the
466
- * concrete {@link CostLedger} retains its private durable state.
467
- */
468
- type CostLedgerHandle = Pick<CostLedger, Exclude<keyof CostLedger, 'waitForIdle'>> & Partial<Pick<CostLedger, 'waitForIdle'>>;
469
-
470
531
  type FailureClass = 'success' | 'reasoning_error' | 'tool_selection_error' | 'tool_argument_error' | 'tool_recovery_failure' | 'hallucination' | 'instruction_following' | 'safety_refusal_miss' | 'policy_violation' | 'budget_exceeded' | 'format_drift' | 'permission_escalation' | 'pii_leak' | 'cost_overrun' | 'timeout' | 'sandbox_failure' | 'missing_user_data' | 'missing_domain_data' | 'missing_codebase_context' | 'missing_runtime_context' | 'missing_credentials' | 'missing_integration_connection' | 'missing_integration_scope' | 'integration_approval_required' | 'integration_auth_expired' | 'integration_provider_failure' | 'bad_integration_manifest' | 'unsafe_integration_write_denied' | 'stale_external_data' | 'bad_retrieval' | 'insufficient_evidence' | 'contradictory_evidence' | 'ambiguous_user_intent' | 'knowledge_readiness_blocked' | 'unknown';
471
532
 
472
533
  /**
@@ -2838,53 +2899,6 @@ interface CrossSurfaceInteractionReport<TRow extends CrossSurfaceTaskRow = Cross
2838
2899
  */
2839
2900
  declare function analyzeCrossSurfaceInteractions<TRow extends CrossSurfaceTaskRow>(input: AnalyzeCrossSurfaceInteractionsInput<TRow>): CrossSurfaceInteractionReport<TRow>;
2840
2901
 
2841
- /**
2842
- * `CampaignStorage` — the filesystem seam `runCampaign` writes through
2843
- * (run/cell dirs, the resumability cache, per-cell artifacts, trace spans).
2844
- *
2845
- * The default (`fsCampaignStorage`) is the Node filesystem — identical
2846
- * behavior to the inline `node:fs` calls it replaces, so existing CLI
2847
- * consumers are unaffected. `inMemoryCampaignStorage` keeps everything in a
2848
- * `Map`, so the substrate runs in environments WITHOUT a filesystem
2849
- * (Cloudflare Workers, Deno Deploy, other edge runtimes) — the campaign
2850
- * still produces its `CampaignResult` (cells + aggregates) in memory;
2851
- * artifacts/traces simply aren't persisted to disk.
2852
- *
2853
- * Paths are opaque keys to the in-memory adapter — it does not parse them,
2854
- * so the same `join(...)`-built paths work unchanged across both adapters.
2855
- */
2856
- interface CampaignStorage {
2857
- /** Ensure a directory exists (recursive). No-op for in-memory. */
2858
- ensureDir(dir: string): void;
2859
- /** Does this path exist (as a written file or an ensured dir)? */
2860
- exists(path: string): boolean;
2861
- /** Read a UTF-8 file; `undefined` when missing or unreadable. */
2862
- read(path: string): string | undefined;
2863
- /** Write a file (string or bytes). Parent dir is assumed ensured. */
2864
- write(path: string, content: string | Uint8Array): void;
2865
- /** Append only when the current UTF-8 byte length matches `expectedBytes`.
2866
- * Returns the new length, or undefined when another writer won. */
2867
- append?(path: string, content: string, expectedBytes: number): number | undefined;
2868
- }
2869
- /** Node-filesystem storage — the default. Lazily requires `node:fs` so the
2870
- * module imports cleanly in non-Node runtimes (where the caller passes
2871
- * `inMemoryCampaignStorage` instead and never constructs this).
2872
- *
2873
- * `createRequire(import.meta.url)` is the ESM-native lazy require — a bare
2874
- * `require` is a ReferenceError under `"type": "module"`, which is exactly
2875
- * the shape this package publishes. */
2876
- declare function fsCampaignStorage(): CampaignStorage;
2877
- /** In-memory storage for filesystem-less runtimes. Artifacts + trace spans
2878
- * live in a `Map` for the duration of the run; the `CampaignResult` is
2879
- * fully populated, but nothing is persisted to disk. */
2880
- declare function inMemoryCampaignStorage(): CampaignStorage;
2881
- /** Open the durable spend account stored beside a logical run. */
2882
- declare function createRunCostLedger(input: {
2883
- storage: CampaignStorage;
2884
- runDir: string;
2885
- costCeilingUsd?: number;
2886
- }): CostLedger;
2887
-
2888
2902
  /**
2889
2903
  * `runCampaign` — Pass A substrate primitive. ONE function that orchestrates
2890
2904
  * scenarios → dispatch → artifacts → judges → aggregates, with full
@@ -5083,6 +5097,7 @@ interface RunLineageLoopOptions<TScenario extends Scenario, TArtifact> {
5083
5097
  governor?: Governor;
5084
5098
  budget: {
5085
5099
  maxSteps: number;
5100
+ maxNodes?: number;
5086
5101
  };
5087
5102
  store?: LineageStore;
5088
5103
  /** Override the per-step proposer. Default {@link gepaProposer}. Inject a
@@ -7486,4 +7501,4 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
7486
7501
  * identity against the checkout at `worktreeRef`. */
7487
7502
  declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
7488
7503
 
7489
- export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignScenarioIdentity, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceArgsFromResult, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceEvidence, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type PremeasuredOptimizationBaseline, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCampaignDesign, assertCampaignSplitIdentity, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignMeanComposite, campaignMeasurementDigest, campaignScenarioIdentity, campaignSplitDigest, campaignSplitDigestFromIdentities, canonicalDigest, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceArgsFromResult, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, renderSurfaceDiff, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface, verifyLoopProvenanceRecord };
7504
+ export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignScenarioIdentity, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, LineageStoreConflictError, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceArgsFromResult, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceEvidence, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type PremeasuredOptimizationBaseline, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCampaignDesign, assertCampaignSplitIdentity, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignLineageStore, campaignMeanComposite, campaignMeasurementDigest, campaignScenarioIdentity, campaignSplitDigest, campaignSplitDigestFromIdentities, canonicalDigest, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceArgsFromResult, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, renderSurfaceDiff, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface, verifyLoopProvenanceRecord };