@tangle-network/agent-eval 0.189.0 → 0.190.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +3 -2
  3. package/dist/adapters/http.d.ts +10 -1
  4. package/dist/adapters/http.d.ts.map +1 -1
  5. package/dist/adapters/http.js +75 -7
  6. package/dist/adapters/http.js.map +1 -1
  7. package/dist/analyst/index.d.ts +66 -3
  8. package/dist/analyst/index.d.ts.map +1 -1
  9. package/dist/analyst/index.js +212 -7
  10. package/dist/analyst/index.js.map +1 -1
  11. package/dist/{benchmark-command-BhhAYstU.js → benchmark-command-TZlsuAh9.js} +10 -10
  12. package/dist/{benchmark-command-BhhAYstU.js.map → benchmark-command-TZlsuAh9.js.map} +1 -1
  13. package/dist/benchmarks/index.d.ts +1 -1
  14. package/dist/benchmarks/index.js +3 -3
  15. package/dist/campaign/index.d.ts +4 -4
  16. package/dist/campaign/index.js +7 -7
  17. package/dist/{campaign-BWoSQPSU.js → campaign-_29Qpc9Z.js} +255 -10
  18. package/dist/campaign-_29Qpc9Z.js.map +1 -0
  19. package/dist/{campaign-evidence-CBlGJ3kC.js → campaign-evidence-CWF8pEIk.js} +5 -4
  20. package/dist/campaign-evidence-CWF8pEIk.js.map +1 -0
  21. package/dist/{chat-client-C4dg7Ng_.js → chat-client-DbH06Ek6.js} +2 -2
  22. package/dist/{chat-client-C4dg7Ng_.js.map → chat-client-DbH06Ek6.js.map} +1 -1
  23. package/dist/{chat-json-call-JVGbfx95.js → chat-json-call-B0xTEY0I.js} +2 -2
  24. package/dist/{chat-json-call-JVGbfx95.js.map → chat-json-call-B0xTEY0I.js.map} +1 -1
  25. package/dist/claim-BGOUqoMq.d.ts +38 -0
  26. package/dist/claim-BGOUqoMq.d.ts.map +1 -0
  27. package/dist/cli.js +3 -3
  28. package/dist/contract/index.d.ts +4 -4
  29. package/dist/contract/index.js +7 -7
  30. package/dist/{default-registry-m2jhbG6Q.js → default-registry-16I-Bxlf.js} +2 -2
  31. package/dist/{default-registry-m2jhbG6Q.js.map → default-registry-16I-Bxlf.js.map} +1 -1
  32. package/dist/{define-agent-eval-q6890HU4.d.ts → define-agent-eval-BWeyIpny.d.ts} +4 -3
  33. package/dist/define-agent-eval-BWeyIpny.d.ts.map +1 -0
  34. package/dist/{define-agent-eval-98sgUaC1.js → define-agent-eval-DrGfrCTZ.js} +4 -4
  35. package/dist/{define-agent-eval-98sgUaC1.js.map → define-agent-eval-DrGfrCTZ.js.map} +1 -1
  36. package/dist/diagnosis/index.d.ts +1 -1
  37. package/dist/diagnosis/index.d.ts.map +1 -1
  38. package/dist/diagnosis/index.js +3 -3
  39. package/dist/diagnosis/index.js.map +1 -1
  40. package/dist/{dspy-rlm-engine-DLYttKBm.js → dspy-rlm-engine-CTIGomgr.js} +3 -3
  41. package/dist/{dspy-rlm-engine-DLYttKBm.js.map → dspy-rlm-engine-CTIGomgr.js.map} +1 -1
  42. package/dist/{eval-campaign-C0Q1Eeo_.js → eval-campaign-CMKRjWl0.js} +2 -2
  43. package/dist/{eval-campaign-C0Q1Eeo_.js.map → eval-campaign-CMKRjWl0.js.map} +1 -1
  44. package/dist/experiment/index.d.ts +2 -1
  45. package/dist/experiment/index.d.ts.map +1 -1
  46. package/dist/experiment/index.js +1 -1
  47. package/dist/exporters-XMCYJlqT.d.ts +161 -0
  48. package/dist/exporters-XMCYJlqT.d.ts.map +1 -0
  49. package/dist/{external-optimizer-process-C3quNeKV.js → external-optimizer-process-Mc83UoWl.js} +2 -2
  50. package/dist/{external-optimizer-process-C3quNeKV.js.map → external-optimizer-process-Mc83UoWl.js.map} +1 -1
  51. package/dist/{external-optimizer-subprocess-BDwgKLO1.js → external-optimizer-subprocess-C0dHXH8e.js} +2 -2
  52. package/dist/{external-optimizer-subprocess-BDwgKLO1.js.map → external-optimizer-subprocess-C0dHXH8e.js.map} +1 -1
  53. package/dist/{feedback-trajectory-B3ZSkfAq.d.ts → feedback-trajectory-BYjh7NEM.d.ts} +2 -2
  54. package/dist/{feedback-trajectory-B3ZSkfAq.d.ts.map → feedback-trajectory-BYjh7NEM.d.ts.map} +1 -1
  55. package/dist/{index-Dk1dOUfm.d.ts → index-BR_R1eBE.d.ts} +4 -4
  56. package/dist/{index-Dk1dOUfm.d.ts.map → index-BR_R1eBE.d.ts.map} +1 -1
  57. package/dist/{index-CnJOPR_E.d.ts → index-Ci0-EYzc.d.ts} +673 -244
  58. package/dist/index-Ci0-EYzc.d.ts.map +1 -0
  59. package/dist/{index-Bcc9PkOz.d.ts → index-D4pC7Tvd.d.ts} +3 -2
  60. package/dist/index-D4pC7Tvd.d.ts.map +1 -0
  61. package/dist/index.d.ts +66 -17
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +375 -31
  64. package/dist/index.js.map +1 -1
  65. package/dist/{kind-factory-BGwN0nE6.js → kind-factory-ByZeXDqF.js} +2 -2
  66. package/dist/{kind-factory-BGwN0nE6.js.map → kind-factory-ByZeXDqF.js.map} +1 -1
  67. package/dist/{llm-client-DF9bPNYA.js → llm-client-BqmRnibA.js} +2 -2
  68. package/dist/{llm-client-DF9bPNYA.js.map → llm-client-BqmRnibA.js.map} +1 -1
  69. package/dist/{llm-judge-M_l_WXw2.js → llm-judge-bwbgDMP0.js} +1891 -1377
  70. package/dist/llm-judge-bwbgDMP0.js.map +1 -0
  71. package/dist/mint-C9Lojt1V.d.ts +147 -0
  72. package/dist/mint-C9Lojt1V.d.ts.map +1 -0
  73. package/dist/openapi.json +1 -1
  74. package/dist/pipelines/index.d.ts +1 -1
  75. package/dist/{produced-state-BOY98IJO.js → produced-state-zSaGDC_Q.js} +4 -4
  76. package/dist/{produced-state-BOY98IJO.js.map → produced-state-zSaGDC_Q.js.map} +1 -1
  77. package/dist/{raw-provider-sink-C96CcqeG.js → raw-provider-sink-DIRCZjP_.js} +2 -2
  78. package/dist/{raw-provider-sink-C96CcqeG.js.map → raw-provider-sink-DIRCZjP_.js.map} +1 -1
  79. package/dist/{redact-DxwlUAvh.js → redact-8fX8-uKr.js} +16 -7
  80. package/dist/redact-8fX8-uKr.js.map +1 -0
  81. package/dist/{redact-DPoH1-OW.d.ts → redact-Du3WKUOP.d.ts} +7 -5
  82. package/dist/redact-Du3WKUOP.d.ts.map +1 -0
  83. package/dist/rl.d.ts +3 -2
  84. package/dist/rl.d.ts.map +1 -1
  85. package/dist/rl.js +1 -1
  86. package/dist/rollout/index.d.ts +3 -2
  87. package/dist/search-ledger-types-C9anU2DX.d.ts +489 -0
  88. package/dist/search-ledger-types-C9anU2DX.d.ts.map +1 -0
  89. package/dist/{semantic-concept-judge-Cm2K2wAo.js → semantic-concept-judge-BY0me-Jq.js} +5 -5
  90. package/dist/{semantic-concept-judge-Cm2K2wAo.js.map → semantic-concept-judge-BY0me-Jq.js.map} +1 -1
  91. package/dist/{server-C8XvqCg8.js → server-DnJCDLf8.js} +2 -2
  92. package/dist/{server-C8XvqCg8.js.map → server-DnJCDLf8.js.map} +1 -1
  93. package/dist/{skillopt-optimization-method-BVSB676o.js → skillopt-optimization-method-CfnQEjgT.js} +363 -18
  94. package/dist/skillopt-optimization-method-CfnQEjgT.js.map +1 -0
  95. package/dist/{spans-W0o8pbEg.d.ts → spans-D1RftP_w.d.ts} +2 -2
  96. package/dist/{spans-W0o8pbEg.d.ts.map → spans-D1RftP_w.d.ts.map} +1 -1
  97. package/dist/{statistical-heldout-plAHG82H.d.ts → statistical-heldout-CLpjYffJ.d.ts} +2 -36
  98. package/dist/statistical-heldout-CLpjYffJ.d.ts.map +1 -0
  99. package/dist/{store-otlp-D0AV4cvB.js → store-otlp-84DH0OEH.js} +2 -2
  100. package/dist/{store-otlp-D0AV4cvB.js.map → store-otlp-84DH0OEH.js.map} +1 -1
  101. package/dist/{store-tool-spans-8PAyhRqb.d.ts → store-tool-spans-BBXs8hDP.d.ts} +2 -2
  102. package/dist/{store-tool-spans-8PAyhRqb.d.ts.map → store-tool-spans-BBXs8hDP.d.ts.map} +1 -1
  103. package/dist/{store-tool-spans-B_0mXvYl.js → store-tool-spans-DSbYpl7f.js} +5 -5
  104. package/dist/{store-tool-spans-B_0mXvYl.js.map → store-tool-spans-DSbYpl7f.js.map} +1 -1
  105. package/dist/traces.d.ts +3 -63
  106. package/dist/traces.d.ts.map +1 -1
  107. package/dist/traces.js +6 -195
  108. package/dist/traces.js.map +1 -1
  109. package/dist/wire/index.d.ts +1 -1
  110. package/dist/wire/index.js +1 -1
  111. package/docs/adapters-observability.md +31 -27
  112. package/docs/charter.md +1 -1
  113. package/docs/design/mlbenchmarks-book-review.md +1 -1
  114. package/docs/distributed-driver.md +1 -5
  115. package/docs/experiment.md +15 -0
  116. package/docs/public-api.md +174 -68
  117. package/docs/redaction.md +7 -1
  118. package/docs/search-ledger.md +174 -0
  119. package/docs/trace-contracts.md +48 -3
  120. package/package.json +1 -1
  121. package/dist/campaign-BWoSQPSU.js.map +0 -1
  122. package/dist/campaign-evidence-CBlGJ3kC.js.map +0 -1
  123. package/dist/define-agent-eval-q6890HU4.d.ts.map +0 -1
  124. package/dist/index-Bcc9PkOz.d.ts.map +0 -1
  125. package/dist/index-CnJOPR_E.d.ts.map +0 -1
  126. package/dist/llm-judge-M_l_WXw2.js.map +0 -1
  127. package/dist/mint-DsS38v5c.d.ts +0 -305
  128. package/dist/mint-DsS38v5c.d.ts.map +0 -1
  129. package/dist/redact-DPoH1-OW.d.ts.map +0 -1
  130. package/dist/redact-DxwlUAvh.js.map +0 -1
  131. package/dist/search-ledger-types-D7KDVg-o.d.ts +0 -302
  132. package/dist/search-ledger-types-D7KDVg-o.d.ts.map +0 -1
  133. package/dist/skillopt-optimization-method-BVSB676o.js.map +0 -1
  134. package/dist/statistical-heldout-plAHG82H.d.ts.map +0 -1
  135. package/docs/search-history-receipts.md +0 -233
@@ -1,14 +1,16 @@
1
1
  import { c as ValidationError, t as AgentEvalError } from "./errors-DEE6u6ot.js";
2
2
  import { T as RunPaidCallInput, c as CostLedgerHandle, f as CostLedgerSummary, m as CostReceipt, o as CostLedger, p as CostProvenance } from "./cost-ledger-DbQdN3nO.js";
3
- import { a as RunRecord, c as RunSplitTag } from "./run-record-DF-fuu31.js";
3
+ import { a as RunRecord, c as RunSplitTag, s as RunSearchCoordinates } from "./run-record-DF-fuu31.js";
4
4
  import { D as TraceAnalysisStore, _ as ProposalFinding, f as AnalystUsageReceipt, i as AnalystFinding, l as AnalystRunResult } from "./types-Bay1dh2o.js";
5
5
  import { M as LlmCallMetadata, ft as ServedModelPolicy, rt as RawProviderSink, x as ChatClient } from "./types-C0bWoSKC.js";
6
- import { Et as FinalEvidenceLedger, Mt as EvaluationClaim, Nt as EvaluationUnitSummary, P as PairedArmsComparison, ft as EvidenceReceipt, it as CampaignEvidenceContext, kt as FinalEvidenceRecord } from "./statistical-heldout-plAHG82H.js";
6
+ import { Et as FinalEvidenceLedger, P as PairedArmsComparison, ft as EvidenceReceipt, it as CampaignEvidenceContext, kt as FinalEvidenceRecord } from "./statistical-heldout-CLpjYffJ.js";
7
7
  import { a as PairedPromotionDecision, d as PairedBootstrapResult } from "./paired-promotion-decision-DPKz8ZnF.js";
8
8
  import { A as LabeledScenarioWrite, B as ScoredSurfaceOutcome, C as JudgeDimension, D as LabeledScenarioSampleArgs, E as LabeledScenarioRecord, H as SurfaceProposer, N as ParetoParent, O as LabeledScenarioSource, R as Scenario, S as JudgeConfig, T as LabelTrust, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, i as CampaignCostMeter, j as MutableSurface, k as LabeledScenarioStore, l as CodeSurface, o as CampaignScenarioIdentity, p as Gate, r as CampaignCellResult, u as ComponentSurface, v as GateResult, y as GenerationCandidate } from "./types-BvmWNjjs.js";
9
+ import { n as EvaluationUnitSummary, t as EvaluationClaim } from "./claim-BGOUqoMq.js";
9
10
  import { r as LedgerHash } from "./canonical-CFpojCN5.js";
10
- import { m as LedgerTrustedHeadRemoval, p as LedgerTrustedHead } from "./index-BqDJ6fUK.js";
11
- import { D as SearchSourceRef, _ as SearchLedgerHash, g as SearchLedgerEvent, m as SearchLedgerAudit, n as SearchArtifactRef, p as SearchLedgerAppendResult, r as SearchAttemptAccounting, v as SearchLedgerReplay, x as SearchOperationRecordedEvent, y as SearchModelIdentity } from "./search-ledger-types-D7KDVg-o.js";
11
+ import { m as LedgerTrustedHeadRemoval, p as LedgerTrustedHead, u as LedgerProjector } from "./index-BqDJ6fUK.js";
12
+ import { A as SearchNodeDecision, B as SearchReservation, C as SearchExecutionIdentity, D as SearchLedgerHash, E as SearchLedgerEvent, F as SearchOperationKind, H as SearchSplit, I as SearchOperationRecordedEvent, J as SearchTask, K as SearchSurfaceEvidence, N as SearchNodeStatus, O as SearchModelIdentity, P as SearchOpenedEvent, Q as SearchUnknown, R as SearchProposer, T as SearchLedgerEntry, V as SearchSourceRef, Y as SearchTaskOutcome, Z as SearchTraceRef, _ as SearchClosedEvent, a as SearchAttemptAccounting, b as SearchEdgeOperator, d as SearchCellCancelledEvent, g as SearchCloseReason, i as SearchArtifactRef, j as SearchNodeRef, l as SearchCandidateSurface, m as SearchClaim, o as SearchAudit, p as SearchCellStage, t as NodeEstimate, x as SearchEdgeRecordedEvent, y as SearchEdgeAttribution } from "./search-ledger-types-C9anU2DX.js";
13
+ import { i as RolloutSearchLineage } from "./mint-C9Lojt1V.js";
12
14
  import { B as ExternalOptimizerModelBudget, E as AnalystIssueExpectation, F as ExternalOptimizerCallbackLimits, J as ExternalOptimizerWireCounts, K as ExternalOptimizerResumeMode, R as ExternalOptimizerEvaluationObservation, V as ExternalOptimizerModelCall, X as ExternalTextEvaluationRequest, Y as ExternalTextCandidate, m as AnalystBenchmarkLabelState, q as ExternalOptimizerRunnerCommand, t as AgentProfile$1, u as AnalystBenchmarkCase } from "./agent-profile-DNV_U6QR.js";
13
15
  import { r as DatasetScenario, t as Dataset } from "./dataset-DQqhOCPt.js";
14
16
  import { a as CheckerIdentity, n as VerdictCertification, t as DefaultVerdict, x as VerificationStrategySource } from "./verdict-E4eRNf7-.js";
@@ -433,9 +435,250 @@ declare class SearchLedgerIntegrityError extends SearchLedgerError {}
433
435
  /** Error raised when an event identifier is reused with different content. */
434
436
  declare class SearchLedgerConflictError extends SearchLedgerError {}
435
437
  //#endregion
438
+ //#region src/campaign/search-state.d.ts
439
+ /** Deterministic node id: identical content in one search is one node. */
440
+ declare function searchNodeId(searchId: string, artifactDigest: string): string;
441
+ /** Deterministic cell id: one node on one task in one split at one repeat. */
442
+ declare function searchCellId(searchId: string, nodeId: string, taskId: string, split: SearchSplit, rep: number): string;
443
+ /** Digest a split's task list in taskId order. */
444
+ declare function searchTaskSetDigest(tasks: readonly SearchTask[]): SearchLedgerHash;
445
+ interface SearchDecisionRecord {
446
+ sequence: number;
447
+ decision: SearchNodeDecision;
448
+ basis: NodeEstimate | null;
449
+ rule: string;
450
+ reason: string;
451
+ }
452
+ interface SearchSpend {
453
+ knownUsd: number;
454
+ floorUsd: number;
455
+ unknownCostCells: number;
456
+ boxMinutes: number;
457
+ }
458
+ /** Scores of one node on one unit of one split: the sum and count of its
459
+ * scored cells. Repeats and sibling tasks of the unit average inside it. */
460
+ interface SearchUnitScore {
461
+ unitId: string;
462
+ sum: number;
463
+ count: number;
464
+ mean: number;
465
+ }
466
+ /** A cell's scored attempt: the inputs of every per-unit statistic. */
467
+ interface SearchScoredCell {
468
+ cellId: string;
469
+ unitId: string;
470
+ /** The attempt that produced the score, which is the cell's last. */
471
+ attempt: number;
472
+ score: number;
473
+ }
474
+ /**
475
+ * Per-unit means of scored cells, in unitId order. Each unit sums its cells in
476
+ * cellId order, so the result depends on the set of cells alone, never on the
477
+ * order they settled in: a verifier that reads the same cells from a database
478
+ * gets the same bits.
479
+ */
480
+ declare function searchUnitScores(cells: readonly SearchScoredCell[]): SearchUnitScore[];
481
+ interface SearchNode {
482
+ nodeId: string;
483
+ /** Registration order; the root is 0. */
484
+ ordinal: number;
485
+ artifactDigest: SearchLedgerHash;
486
+ artifact: SearchArtifactRef;
487
+ surfaces: readonly SearchCandidateSurface[];
488
+ /** First in-search parent of the node's first edge; null for the root, a
489
+ * derived root, or a node whose parents are unknown. */
490
+ primaryParentId: string | null;
491
+ /** Edges from the root along primary parents; null while unknown. */
492
+ depth: number | null;
493
+ /** Every parent named by any edge into the node, in edge order. */
494
+ parents: readonly SearchNodeRef[];
495
+ children: readonly string[];
496
+ edgeIds: readonly string[];
497
+ status: SearchNodeStatus | null;
498
+ rung: number | null;
499
+ /** The node was decided `finalist` at some point, so its test cells are legal. */
500
+ finalist: boolean;
501
+ decisions: readonly SearchDecisionRecord[];
502
+ cellCount: number;
503
+ spend: SearchSpend;
504
+ registeredSequence: number;
505
+ updatedSequence: number;
506
+ }
507
+ interface SearchCell {
508
+ cellId: string;
509
+ nodeId: string;
510
+ taskId: string;
511
+ unitId: string;
512
+ split: SearchSplit;
513
+ rep: number;
514
+ stage: SearchCellStage;
515
+ lane: string | null;
516
+ reservation: SearchReservation | null;
517
+ attempts: number;
518
+ lastRunId: string | null;
519
+ outcome: SearchTaskOutcome['status'] | null;
520
+ /** Score of the scored attempt; null when no attempt was scored. */
521
+ score: number | null;
522
+ /** No further attempt is legal: a scored or non-retryable outcome. */
523
+ final: boolean;
524
+ cancelled: SearchCellCancelledEvent['reason'] | null;
525
+ /** Known cost plus proven floors across attempts. */
526
+ spentUsd: number;
527
+ /** Every attempt's cost is known. */
528
+ costKnown: boolean;
529
+ traceId: string | null;
530
+ allocatedSequence: number;
531
+ updatedSequence: number;
532
+ }
533
+ interface SearchOperation {
534
+ operationId: string;
535
+ operationKind: SearchOperationKind;
536
+ reservation: SearchReservation | null;
537
+ recorded: boolean;
538
+ spentUsd: number;
539
+ }
540
+ interface SearchCompletion {
541
+ complete: boolean;
542
+ reasons: string[];
543
+ }
544
+ /**
545
+ * The pure, incremental projection of one search ledger. `apply` refuses any
546
+ * entry that breaks an invariant; the journal then discards this instance and
547
+ * replays into a new one, so a refused entry leaves no partial state behind.
548
+ */
549
+ declare class SearchState implements LedgerProjector<SearchLedgerEntry, SearchStateView> {
550
+ readonly searchId: string;
551
+ private version;
552
+ private header;
553
+ private closed;
554
+ private head;
555
+ private lastOccurredAt;
556
+ private lastOccurredAtText;
557
+ private readonly tasks;
558
+ private readonly nodes;
559
+ private readonly nodeOrder;
560
+ private readonly nodeByDigest;
561
+ private readonly edges;
562
+ private readonly edgeOrder;
563
+ private readonly cells;
564
+ private readonly operations;
565
+ private selectedNodeId;
566
+ private claimUsedUsd;
567
+ private readonly audit;
568
+ constructor(searchId: string);
569
+ apply(entry: SearchLedgerEntry, index: number): void;
570
+ snapshot(): SearchStateView;
571
+ /** @internal Views check this before every read of the live indexes. */
572
+ isAt(version: number): boolean;
573
+ private applyEvent;
574
+ private open;
575
+ private startOperation;
576
+ private recordOperation;
577
+ private registerNode;
578
+ private recordEdge;
579
+ private allocateCell;
580
+ private settleCell;
581
+ private cancelCell;
582
+ private decideNode;
583
+ private close;
584
+ private checkClaim;
585
+ /** @internal */
586
+ incompleteReasons(): string[];
587
+ /** Book an attempt's or operation's accounting into the running totals. An
588
+ * unknown cost counts as its proven floor. */
589
+ private book;
590
+ /** A cell's share of the open reservations, its overspend, and what it draws
591
+ * from the claim reserve: the larger of its hold and its spend. */
592
+ private reservationParts;
593
+ /** The admission rule: committed spend, open holds, the unspent claim
594
+ * reserve and the new hold stay within the cap. A claim cell draws on the
595
+ * claim reserve instead of adding to it. */
596
+ private admit;
597
+ /** @internal */
598
+ readHeader(): SearchOpenedEvent | null;
599
+ /** @internal */
600
+ readClosed(): SearchClosedEvent | null;
601
+ /** @internal */
602
+ readHead(): {
603
+ sequence: number;
604
+ entryHash: SearchLedgerHash;
605
+ } | null;
606
+ /** @internal */
607
+ readLastOccurredAt(): string | null;
608
+ /** @internal */
609
+ readAudit(): SearchAudit;
610
+ /** @internal */
611
+ readNode(nodeId: string): SearchNode | undefined;
612
+ /** @internal */
613
+ readNodeIds(): readonly string[];
614
+ /** @internal */
615
+ readHasNode(nodeId: string): boolean;
616
+ /** @internal */
617
+ readNodeIdForDigest(artifactDigest: string): string | undefined;
618
+ /** @internal */
619
+ readEdge(edgeId: string): SearchEdgeRecordedEvent | undefined;
620
+ /** @internal */
621
+ readEdgeIds(): readonly string[];
622
+ /** @internal */
623
+ readCell(cellId: string): SearchCell | undefined;
624
+ /** @internal */
625
+ readCellIds(nodeId?: string): readonly string[];
626
+ /** @internal */
627
+ readOperation(operationId: string): SearchOperation | undefined;
628
+ /** @internal */
629
+ readScoredCells(nodeId: string, split: SearchSplit): SearchScoredCell[];
630
+ }
631
+ /**
632
+ * A read of `SearchState` at one ledger position. Header, head, audit and
633
+ * claim are values. Node, edge, cell and score reads go to the live indexes and
634
+ * throw once the state has applied a later entry.
635
+ */
636
+ declare class SearchStateView {
637
+ readonly searchId: string;
638
+ readonly header: SearchOpenedEvent | null;
639
+ readonly closed: SearchClosedEvent | null;
640
+ readonly head: {
641
+ sequence: number;
642
+ entryHash: SearchLedgerHash;
643
+ } | null;
644
+ /** `occurredAt` of the head entry; a writer stamps later events at or after it. */
645
+ readonly lastOccurredAt: string | null;
646
+ readonly audit: SearchAudit;
647
+ readonly completion: SearchCompletion;
648
+ private readonly state;
649
+ private readonly version;
650
+ constructor(state: SearchState, version: number);
651
+ /** The node the search started from: the first registered. */
652
+ get rootNodeId(): string | null;
653
+ node(nodeId: string): SearchNode | undefined;
654
+ hasNode(nodeId: string): boolean;
655
+ /** Node ids in registration order. */
656
+ nodeIds(): string[];
657
+ /** Nodes in registration order. */
658
+ nodes(): SearchNode[];
659
+ nodeIdForDigest(artifactDigest: string): string | undefined;
660
+ edge(edgeId: string): SearchEdgeRecordedEvent | undefined;
661
+ /** Edges in ledger order. */
662
+ edges(): SearchEdgeRecordedEvent[];
663
+ cell(cellId: string): SearchCell | undefined;
664
+ /** Cells in allocation order, optionally of one node. */
665
+ cells(filter?: {
666
+ nodeId?: string;
667
+ }): SearchCell[];
668
+ operation(operationId: string): SearchOperation | undefined;
669
+ /** A node's scored cells on one split, in allocation order. Unscored cells
670
+ * (errored, cancelled or in flight) are absent, never zero. */
671
+ scoredCells(nodeId: string, split: SearchSplit): SearchScoredCell[];
672
+ /** Per-unit score means of a node on one split, in unitId order. */
673
+ unitScores(nodeId: string, split: SearchSplit): SearchUnitScore[];
674
+ /** The lineage a RunRecord mint needs for one cell attempt. */
675
+ lineage(coordinates: RunSearchCoordinates): RolloutSearchLineage;
676
+ private live;
677
+ }
678
+ //#endregion
436
679
  //#region src/campaign/search-ledger.d.ts
437
- /** Validate and return a canonical copy. Arrays whose order is not semantic are
438
- * sorted so retries from different processes produce byte-identical events. */
680
+ /** Validate and return a canonical copy. Arrays whose order carries no meaning
681
+ * are sorted, so retries from different processes produce identical bytes. */
439
682
  declare function validateSearchLedgerEvent(input: unknown): SearchLedgerEvent;
440
683
  /**
441
684
  * How this ledger uses its trusted head — the `(sequence, entryHash)` pin kept
@@ -446,51 +689,53 @@ declare function validateSearchLedgerEvent(input: unknown): SearchLedgerEvent;
446
689
  * - `pin` (default): every append records the new head, and a pin that is
447
690
  * present is verified on every read.
448
691
  * - `require`: additionally refuses to read a non-empty ledger whose pin is
449
- * gone, so deleting the sibling file cannot downgrade the guarantee. Only for
450
- * ledgers written under `pin` from their first entry.
692
+ * gone, so deleting the sibling file cannot downgrade the guarantee.
451
693
  * - `off`: chain verification only. Truncation to a valid shorter prefix is
452
694
  * undetectable.
453
695
  */
454
696
  type SearchLedgerTrustedHeadMode = 'pin' | 'require' | 'off';
455
697
  interface OpenSearchLedgerOptions {
456
698
  path: string;
457
- campaignId: string;
699
+ searchId: string;
458
700
  trustedHead?: SearchLedgerTrustedHeadMode;
459
701
  }
702
+ interface SearchLedgerAppendResult {
703
+ entry: SearchLedgerEntry;
704
+ /** False when the exact event was already durably present. */
705
+ appended: boolean;
706
+ state: SearchStateView;
707
+ }
460
708
  interface SearchLedger {
461
709
  readonly path: string;
462
- readonly campaignId: string;
710
+ readonly searchId: string;
463
711
  /** Sibling file holding this ledger's trusted head. */
464
712
  readonly trustedHeadPath: string;
465
713
  append(event: SearchLedgerEvent): Promise<SearchLedgerAppendResult>;
466
- replay(): Promise<SearchLedgerReplay>;
714
+ /** The verified state at the file's current head. */
715
+ state(): Promise<SearchStateView>;
467
716
  /** The pinned head, or null when this ledger has never been pinned. */
468
717
  trustedHead(): Promise<LedgerTrustedHead | null>;
469
- /** Pin the current verified head: how a ledger written under `off`, or one
470
- * whose pin file was removed, acquires a pin without rewriting a byte. */
718
+ /** Pin the current verified head without rewriting a byte. */
471
719
  pinTrustedHead(): Promise<LedgerTrustedHead>;
472
- /** Discard this ledger's pin, reporting what was discarded. Deleting or
473
- * rebuilding the ledger file leaves a pin naming history the file no longer
474
- * carries, and every later read is refused because that is exactly the
475
- * deletion the pin exists to catch; clearing is the supported way to abandon
476
- * that history on purpose. It gives up the deletion guarantee for every entry
477
- * the pin covered. */
720
+ /** Discard this ledger's pin, reporting what was discarded. It gives up the
721
+ * deletion guarantee for every entry the pin covered. */
478
722
  clearTrustedHead(): Promise<LedgerTrustedHeadRemoval>;
479
723
  }
480
724
  /** Open a durable filesystem search ledger. Construction performs no I/O; the
481
- * first `append` or `replay` validates the complete existing file. */
725
+ * first `append` or `state` verifies the whole existing file. */
482
726
  declare function openSearchLedger(options: OpenSearchLedgerOptions): SearchLedger;
483
- /** Replay immutable search-ledger JSONL through the same codec as FileSearchLedger. */
484
- declare function replaySearchLedgerText(text: string, campaignId: string, source: string): SearchLedgerReplay;
485
- /** Append-only file-backed search ledger with idempotent writes and replay. */
727
+ /** Verify and project immutable search-ledger JSONL through the same codec as
728
+ * `FileSearchLedger`. */
729
+ declare function replaySearchLedgerText(text: string, searchId: string, source: string): SearchStateView;
730
+ /** Append-only file-backed search ledger with idempotent writes. */
486
731
  declare class FileSearchLedger implements SearchLedger {
487
732
  readonly path: string;
488
- readonly campaignId: string;
733
+ readonly searchId: string;
489
734
  readonly trustedHeadPath: string;
490
735
  private readonly trustedHeadMode;
491
736
  private readonly journal;
492
- constructor(path: string, campaignId: string, trustedHead?: SearchLedgerTrustedHeadMode);
493
- replay(): Promise<SearchLedgerReplay>;
737
+ constructor(path: string, searchId: string, trustedHead?: SearchLedgerTrustedHeadMode);
738
+ state(): Promise<SearchStateView>;
494
739
  append(input: SearchLedgerEvent): Promise<SearchLedgerAppendResult>;
495
740
  trustedHead(): Promise<LedgerTrustedHead | null>;
496
741
  pinTrustedHead(): Promise<LedgerTrustedHead>;
@@ -498,36 +743,34 @@ declare class FileSearchLedger implements SearchLedger {
498
743
  }
499
744
  //#endregion
500
745
  //#region src/campaign/search-history-receipt.d.ts
501
- declare const SEARCH_HISTORY_RECEIPT_SCHEMA_VERSION: '1.0.0';
746
+ declare const SEARCH_HISTORY_RECEIPT_SCHEMA_VERSION: '2026-09';
502
747
  declare const SEARCH_HISTORY_RECEIPT_DIGEST_ALGORITHM: 'rfc8785-sha256';
503
- /** Bounded projection of the canonical replay audit. Exact ids stay in SearchLedger. */
748
+ /** Bounded summary of a search's audit. Exact ids stay in the ledger. */
504
749
  interface SearchHistoryAuditSummary {
505
- readonly campaignId: string;
750
+ readonly searchId: string;
506
751
  readonly headHash: SearchLedgerHash | null;
507
- readonly status: SearchLedgerAudit['status'];
508
- readonly selectedCandidateId: string | null;
752
+ readonly status: SearchAudit['status'];
753
+ readonly closeReason: SearchAudit['closeReason'];
754
+ readonly claimDecision: 'ship' | 'hold' | 'test-cannot-resolve' | null;
755
+ readonly selectedNodeId: string | null;
509
756
  readonly eventCount: number;
510
- readonly candidateCount: number;
511
- readonly closedCandidateSlotCount: number;
512
- readonly attemptCount: number;
513
- readonly operationCount: number;
514
- readonly expectedCandidateSlots: number;
515
- readonly expectedTaskOutcomes: number;
516
- readonly expectedOperations: number;
517
- readonly missingCandidateSlots: number;
518
- readonly missingTaskOutcomes: number;
519
- readonly missingOperations: number;
520
- readonly pendingDecisions: number;
521
- readonly hasPlan: boolean;
522
- readonly hasCompletion: boolean;
523
- }
524
- /**
525
- * A bounded proof envelope over one canonical SearchLedger replay.
757
+ readonly nodes: number;
758
+ readonly edges: number;
759
+ readonly cells: number;
760
+ readonly openCells: number;
761
+ readonly openOperations: number;
762
+ readonly nodesWithoutEdge: number;
763
+ readonly undecidedNodes: number;
764
+ }
765
+ /**
766
+ * A bounded proof envelope over one search ledger.
526
767
  *
527
- * The content-addressed ledger remains the sole rich history. This receipt binds
528
- * its producer/run identity, exact audit digest, bounded completeness summary,
529
- * and its own canonical digest. Consumers needing candidate ids, attempts,
530
- * failures, accounting gaps, or decisions read and replay the canonical ledger.
768
+ * The content-addressed ledger stays the only rich history. The receipt binds
769
+ * its producer and run, the exact ledger bytes, the digest of the complete
770
+ * audit, and a bounded summary. `complete` means the ledger holds
771
+ * `search-closed`, which the ledger admits only when every allocated cell has
772
+ * an outcome or was cancelled, every started operation was recorded, and every
773
+ * node has an edge and a terminal decision.
531
774
  */
532
775
  interface SearchHistoryReceipt {
533
776
  readonly schemaVersion: typeof SEARCH_HISTORY_RECEIPT_SCHEMA_VERSION;
@@ -536,10 +779,11 @@ interface SearchHistoryReceipt {
536
779
  readonly receiptDigest: SearchLedgerHash;
537
780
  /** Stable producer identity, for example an OptimizationMethod name. */
538
781
  readonly producerId: string;
539
- /** Concrete optimizer/runtime invocation that produced the ledger. */
782
+ /** Concrete optimizer or runtime invocation that produced the ledger. */
540
783
  readonly runId: string;
784
+ /** The ledger file: `sha256` and `byteLength` of its exact bytes. */
541
785
  readonly ledger: SearchArtifactRef;
542
- /** Digest of the complete SearchLedgerAudit produced by canonical replay. */
786
+ /** `hashCanonical` of the complete `SearchAudit` from replaying those bytes. */
543
787
  readonly auditDigest: SearchLedgerHash;
544
788
  readonly summary: SearchHistoryAuditSummary;
545
789
  readonly complete: boolean;
@@ -548,19 +792,25 @@ interface SearchHistoryReceipt {
548
792
  interface CreateSearchHistoryReceiptInput {
549
793
  readonly producerId: string;
550
794
  readonly runId: string;
551
- /** Content-addressed canonical SearchLedger JSONL artifact. */
552
- readonly ledger: SearchArtifactRef;
553
- /** The result returned by SearchLedger.replay(). */
554
- readonly replay: SearchLedgerReplay;
795
+ readonly ledger: {
796
+ readonly path: string;
797
+ readonly searchId: string;
798
+ };
799
+ readonly storage?: Pick<CampaignStorage, 'read'>;
555
800
  }
556
801
  type SearchHistoryPolicy = 'allow-missing' | 'require-complete';
557
802
  interface SearchHistoryAdmissionOptions {
558
- /** Missing history is reported by default; require-complete refuses final assessment without a complete receipt. */
803
+ /** Missing history is reported by default; require-complete refuses final
804
+ * assessment without a closed search ledger. */
559
805
  searchHistoryPolicy?: SearchHistoryPolicy;
560
- /** Receipt checks are the default. Ledger checks also resolve bytes through CampaignStorage.read. */
806
+ /** Receipt checks are the default. Ledger checks also resolve and replay the bytes. */
561
807
  searchHistoryVerification?: 'receipt' | 'ledger';
562
808
  }
563
- /** Verify resolved bytes with the canonical codec, never a caller-supplied replay projection. */
809
+ /** Read the ledger's bytes, replay them through the search codec, and build
810
+ * the receipt from that replay. */
811
+ declare function createSearchHistoryReceipt(input: CreateSearchHistoryReceiptInput): SearchHistoryReceipt;
812
+ /** Verify the receipt, then resolve its ledger bytes, check them, and replay
813
+ * them with the canonical codec. Never trusts a caller-supplied projection. */
564
814
  declare function verifySearchHistoryArtifact(receipt: SearchHistoryReceipt, storage: Pick<CampaignStorage, 'read'>): void;
565
815
  interface SearchHistoryCoverageRow {
566
816
  readonly producerId: string;
@@ -581,209 +831,183 @@ declare class SearchHistoryRequiredError extends Error {
581
831
  readonly reasons: readonly string[];
582
832
  constructor(producerId: string, reasons: readonly string[]);
583
833
  }
584
- /** Build a bounded receipt from the projection returned by canonical ledger replay. */
585
- declare function createSearchHistoryReceipt(input: CreateSearchHistoryReceiptInput): SearchHistoryReceipt;
586
- /** Verify the bounded receipt. Full ledger bytes are verified by SearchLedger. */
834
+ /** Verify a receipt's own consistency and digest. */
587
835
  declare function verifySearchHistoryReceipt(receipt: SearchHistoryReceipt): SearchHistoryReceipt;
588
- /** Prove that a receipt still describes the exact canonical replay supplied. */
589
- declare function assertSearchHistoryMatchesReplay(receipt: SearchHistoryReceipt, replay: SearchLedgerReplay): void;
590
- /** Require a receipt owned by this producer and a terminal, denominator-complete history. */
836
+ /** Prove that a receipt describes exactly the supplied replayed state. */
837
+ declare function assertSearchHistoryMatchesState(receipt: SearchHistoryReceipt, state: SearchStateView): void;
838
+ /** Require a receipt owned by this producer over a closed search. */
591
839
  declare function assertCompleteSearchHistory(producerId: string, receipt: SearchHistoryReceipt | undefined): asserts receipt is SearchHistoryReceipt;
592
840
  /** Classify one producer's history without treating malformed evidence as absence. */
593
841
  declare function searchHistoryCoverageRow(producerId: string, receipt: SearchHistoryReceipt | undefined): SearchHistoryCoverageRow;
594
842
  //#endregion
595
- //#region src/campaign/gepa-candidate-population.d.ts
596
- interface GepaCandidatePopulationSummary {
597
- readonly scope: 'gepa-candidate-population';
598
- readonly path: string;
599
- readonly sha256: `sha256:${string}`;
600
- readonly bytes: number;
601
- readonly runId: string;
602
- readonly candidates: number;
603
- readonly bestIndex: number;
604
- readonly maxCandidates: number;
605
- readonly maxCandidateChars: number;
606
- readonly scenarioIds: readonly string[];
607
- readonly surfaceKind: 'text' | 'components';
608
- }
609
- interface GepaCandidateSelectionScore {
610
- readonly scenarioId: string;
611
- readonly score: number;
612
- }
613
- interface GepaCandidatePopulationCandidate {
614
- /** Zero-based index assigned by the exact GEPA result. */
615
- readonly index: number;
616
- readonly candidate: ExternalTextCandidate;
617
- readonly candidateHash: string;
618
- readonly candidateDigest: `sha256:${string}`;
619
- /** Exact GEPA parent indices. The seed candidate has one null parent. */
620
- readonly parentIndices: readonly (number | null)[];
621
- /** Null means GEPA had no selection score for this candidate. */
622
- readonly aggregateScore: number | null;
623
- readonly selectionScores: readonly GepaCandidateSelectionScore[];
624
- readonly discoveryEvaluationCount: number;
625
- }
626
- interface GepaCandidatePopulationArtifact {
627
- readonly summary: GepaCandidatePopulationSummary;
628
- readonly runId: string;
629
- readonly bestIndex: number;
630
- readonly candidates: readonly GepaCandidatePopulationCandidate[];
631
- }
632
- /**
633
- * Read GEPA's exact candidate graph from the artifact addressed by method provenance.
634
- *
635
- * The reader checks the supplied digest, declared byte count, run identity,
636
- * candidate surfaces, parent graph, selection scores, and configured bounds.
637
- * This proves that the bytes match the supplied summary. The caller remains
638
- * responsible for obtaining that summary from trusted method provenance.
639
- */
640
- declare function readGepaCandidatePopulationArtifact(input: {
641
- summary: GepaCandidatePopulationSummary;
642
- storage?: CampaignStorage;
643
- }): GepaCandidatePopulationArtifact;
644
- //#endregion
645
843
  //#region src/campaign/search-ledger-recording.d.ts
646
- /** How a search operation executed. The shape the ledger event records. */
647
- type SearchExecutionIdentity = SearchOperationRecordedEvent['execution'];
648
- /** Immutable identities the ledger requires and a campaign cannot infer. */
844
+ /** Identities the ledger needs and a loop cannot infer. */
649
845
  interface SearchRunIdentity {
650
846
  /** The agent implementation under optimization. */
651
847
  agent: SearchSourceRef;
652
848
  /** The candidate generator: a model call or deterministic code. */
653
- proposer: SearchExecutionIdentity;
654
- /** The code that plans the search and selects its winner. */
849
+ proposer: SearchOperationRecordedEvent['execution'];
850
+ /** The code that runs the search and decides its nodes. */
655
851
  search: SearchSourceRef;
656
- /** Model the agent runs. Used only for a cell that reported none. */
852
+ /** Model the agent runs; used for a cell that reported none. */
657
853
  model: SearchModelIdentity;
854
+ /** What the search improves, for example `vb/coder`. Default: the producer's name. */
855
+ subject?: string;
856
+ /** The judge's pinned source. Default: unknown, because judges arrive as functions. */
857
+ judge?: SearchSourceRef;
858
+ /** The claim the search's numbers may support. Default: a development claim
859
+ * over the supplied tasks, one unit per task. */
860
+ claim?: EvaluationClaim;
658
861
  }
862
+ /** A ledger and the identities a loop records into it. */
659
863
  interface SearchLedgerBinding {
660
864
  ledger: SearchLedger;
661
865
  identity: SearchRunIdentity;
662
866
  }
663
- /** One proposed candidate, before it is measured. */
664
- interface ProposedSearchCandidate {
665
- surface: MutableSurface;
666
- surfaceHash: string;
667
- label?: string;
867
+ /** The default claim: development numbers over exactly the supplied tasks. */
868
+ declare function developmentClaim(populationId: string): EvaluationClaim;
869
+ /** The header of a search, with plain task lists; the recorder digests them. */
870
+ type SearchOpening = Omit<SearchOpenedEvent, 'kind' | 'eventId' | 'occurredAt' | 'artifacts' | 'splits'> & {
871
+ splits: {
872
+ train: SearchTask[];
873
+ selection: SearchTask[];
874
+ test: SearchTask[];
875
+ heldOutUnits: boolean;
876
+ };
877
+ };
878
+ interface SearchRecorderOptions {
879
+ ledger: SearchLedger;
880
+ /** Where content-addressed blobs are written. Default: `blobs/` beside the ledger. */
881
+ blobDir?: string;
882
+ storage?: CampaignStorage;
883
+ /** Milliseconds since the epoch. Default: `Date.now`. */
884
+ now?: () => number;
668
885
  }
669
- /** One measured candidate, after its campaign scored. */
670
- interface MeasuredSearchCandidate<TArtifact> {
671
- surface: MutableSurface;
672
- surfaceHash: string;
673
- cells: ReadonlyArray<CampaignCellResult<TArtifact>>;
674
- runDir: string;
675
- /** False when the candidate missed a designed cell. */
676
- coverageComplete: boolean;
886
+ interface RegisterSearchNodeInput {
887
+ artifactDigest: `sha256:${string}`;
888
+ artifact: SearchArtifactRef;
889
+ surfaces: SearchCandidateSurface[];
890
+ }
891
+ interface RecordSearchEdgeInput {
892
+ childNodeId: string;
893
+ /** Parents in this search, primary first, as node ids; or refs for a derive edge. */
894
+ parents: Array<string | SearchNodeRef>;
895
+ operator: SearchEdgeOperator;
896
+ attribution: SearchEdgeAttribution;
897
+ proposer: SearchProposer | null;
898
+ /** Stable id of this proposal within the search, so a resumed search
899
+ * recognizes the edge; for example `gen-3:candidate-1`. */
900
+ proposalKey: string;
901
+ selection?: {
902
+ rule: string;
903
+ evidence: Record<string, number>;
904
+ } | null;
905
+ /** The proposer's free-text rationale; redacted before it is stored. */
906
+ rationale: string | SearchUnknown;
907
+ /** One per parent: a diff blob from `recorder.blob('diff', …)`, or why there is none. */
908
+ diffs: Array<SearchArtifactRef | SearchUnknown>;
909
+ label?: string;
677
910
  }
678
- interface SearchRecorderOptions<TScenario extends Scenario> {
679
- binding: SearchLedgerBinding;
680
- storage: CampaignStorage;
681
- runDir: string;
682
- scenarios: ReadonlyArray<TScenario>;
683
- reps: number;
684
- maxGenerations: number;
685
- populationSize: number;
686
- /** Identity of the exact campaign design; the task benchmark pin. */
687
- splitDigest: `sha256:${string}`;
688
- /** Proposer label recorded on every candidate lineage. */
689
- proposerLabel: string;
690
- costLedger: CostLedgerHandle;
911
+ interface AllocateSearchCellInput {
912
+ nodeId: string;
913
+ taskId: string;
914
+ split: SearchSplit;
915
+ rep: number;
916
+ stage: SearchCellStage;
917
+ lane?: string | null;
918
+ reservation?: SearchReservation | null;
691
919
  }
692
- /**
693
- * Recorder for one `runOptimization` run: `open()`, then `recordGeneration()`
694
- * and `recordResults()` per generation, then `finish()`.
695
- *
696
- * Every event id is derived from the run, and an id already durable is not
697
- * appended again, so a resumed run continues one ledger instead of conflicting
698
- * with its own history.
699
- */
700
- declare class SearchRecorder<TScenario extends Scenario, TArtifact> {
701
- private readonly opts;
920
+ interface SettleSearchCellInput {
921
+ cellId: string;
922
+ /** Default: the next attempt. An attempt already in the ledger is not appended again. */
923
+ attempt?: number;
924
+ outcome: SearchTaskOutcome;
925
+ accounting: SearchAttemptAccounting;
926
+ identity: SearchExecutionIdentity;
927
+ boxMinutes?: number | null;
928
+ wallMs?: number | null;
929
+ queueMs?: number | null;
930
+ placement?: {
931
+ lane: string;
932
+ boxId: string | null;
933
+ } | null;
934
+ surfaceEvidence?: SearchSurfaceEvidence[];
935
+ traceRef?: SearchTraceRef;
936
+ /** The attempt's RunRecord; its search coordinates and runId must match. */
937
+ runRecord?: RunRecord;
938
+ artifacts?: SearchArtifactRef[];
939
+ }
940
+ /** Deterministic edge id: one proposal of one child within one search. */
941
+ declare function searchEdgeId(searchId: string, childNodeId: string, proposalKey: string): string;
942
+ /** Writes one search's events into its ledger as they happen. */
943
+ declare class SearchRecorder {
944
+ readonly ledger: SearchLedger;
945
+ private readonly storage;
946
+ private readonly blobDir;
947
+ private readonly now;
702
948
  private readonly tasks;
703
- private readonly registered;
704
- private readonly order;
705
- private readonly coverage;
706
- private readonly openSlots;
707
- private readonly durableEventIds;
708
949
  private lastStampMs;
709
- private proposalReceiptCount;
710
950
  private constructor();
711
- /** Open the recorder and append the plan. An existing ledger for the same
712
- * run is re-read first, so a resumed run keeps one plan and one lineage. */
713
- static open<TScenario extends Scenario, TArtifact>(opts: SearchRecorderOptions<TScenario>): Promise<SearchRecorder<TScenario, TArtifact>>;
714
951
  /**
715
- * Record one generation's candidate-generation call and the candidates it
716
- * produced. A proposal larger than the planned population extends the plan
717
- * with the extra slots; a proposal that fills fewer closes the rest.
952
+ * Open the search: append `search-opened`, or, when the ledger already holds
953
+ * one, check that it is this search and continue it.
718
954
  */
719
- recordGeneration(input: {
720
- generation: number;
721
- parentSurfaceHash: string;
722
- candidates: ReadonlyArray<ProposedSearchCandidate>;
955
+ static open(options: SearchRecorderOptions, opening: SearchOpening, artifacts?: SearchArtifactRef[]): Promise<SearchRecorder>;
956
+ get searchId(): string;
957
+ /** The ledger's verified state now. */
958
+ state(): Promise<SearchStateView>;
959
+ /** Store `body` as a canonical JSON blob and return its content address. */
960
+ blob(role: string, body: unknown): SearchArtifactRef;
961
+ /** Register a node, or return the existing node with the same artifact digest. */
962
+ registerNode(input: RegisterSearchNodeInput): Promise<{
963
+ nodeId: string;
964
+ existed: boolean;
965
+ }>;
966
+ /** Record the proposal that derived a node. Returns the edge id. */
967
+ recordEdge(input: RecordSearchEdgeInput): Promise<string>;
968
+ startOperation(input: {
969
+ operationId: string;
970
+ operationKind: SearchOperationKind;
971
+ reservation?: SearchReservation | null;
723
972
  }): Promise<void>;
724
- /** Append one task attempt per designed cell of each candidate campaign. */
725
- recordResults(candidates: ReadonlyArray<MeasuredSearchCandidate<TArtifact>>): Promise<void>;
726
- /**
727
- * Close the search: unreached generations, the selection operation, one
728
- * decision per candidate, then the terminal event.
729
- *
730
- * The terminal event is appended only when canonical replay accounts for the
731
- * whole planned denominator. An interrupted or partly unscored search stays
732
- * `in-progress` and its receipt reports the exact gap, instead of claiming a
733
- * closed search.
734
- */
735
- finish(input: {
736
- winnerSurfaceHash: string;
737
- generationsRun: number;
973
+ recordOperation(input: Omit<SearchOperationRecordedEvent, 'kind' | 'eventId' | 'occurredAt' | 'artifacts'> & {
974
+ artifacts?: SearchArtifactRef[];
975
+ }): Promise<void>;
976
+ /** Plan one cell. Returns the cell id; an allocated cell is not allocated again. */
977
+ allocateCell(input: AllocateSearchCellInput): Promise<string>;
978
+ /** Record one finished attempt at a cell. */
979
+ settleCell(input: SettleSearchCellInput): Promise<void>;
980
+ cancelCell(input: {
981
+ cellId: string;
982
+ reason: 'pruned' | 'budget' | 'deadline' | 'aborted';
983
+ }): Promise<void>;
984
+ /** Record a decision about a node. Repeating the node's latest decision appends nothing. */
985
+ decideNode(input: {
986
+ nodeId: string;
987
+ decision: SearchNodeDecision;
988
+ basis?: NodeEstimate | null;
989
+ rule: string;
990
+ reason: string;
991
+ }): Promise<void>;
992
+ /** Close the search. The ledger refuses a close while any cell, operation or
993
+ * node decision is outstanding. */
994
+ close(input: {
995
+ reason: SearchCloseReason;
996
+ claim: SearchClaim | null;
997
+ }): Promise<void>;
998
+ /** A bounded receipt over the exact ledger bytes. */
999
+ receipt(input: {
1000
+ producerId: string;
738
1001
  runId: string;
739
- }): Promise<SearchHistoryReceipt>;
740
- /** Bounded receipt over the exact ledger bytes this run produced. */
741
- receipt(runId: string): Promise<SearchHistoryReceipt>;
742
- /** Read an existing ledger for this run so a resume continues it. */
743
- private hydrate;
744
- private plan;
745
- private registeredSlot;
746
- private remember;
747
- private recordGenerationOperation;
748
- private closeSlot;
749
- /** Spend booked to candidate generation since the previous generation. */
750
- private proposalAccounting;
751
- private cellModel;
752
- private proposalArtifact;
753
- /** Write one canonical evidence document and return its content address. */
754
- private writeArtifact;
1002
+ }): SearchHistoryReceipt;
755
1003
  private append;
756
1004
  /** Non-decreasing ISO stamps; the ledger refuses an event that moves back. */
757
1005
  private stamp;
758
1006
  }
759
- /**
760
- * Record an optimizer's own candidate graph into the same ledger.
761
- *
762
- * A complete optimization method searches inside its own process and reports
763
- * one artifact when it finishes: the candidate population, with each
764
- * candidate's parents and its score per selection scenario. This turns that
765
- * artifact into the canonical event stream, so a first-party method returns
766
- * the same `SearchHistoryReceipt` the in-process loop returns, and
767
- * `compareOptimizationMethods({ searchHistoryPolicy: 'require-complete' })`
768
- * accepts it.
769
- *
770
- * A candidate the optimizer left unscored on a planned scenario leaves the
771
- * planned denominator open, so the receipt reports the gap instead of closing
772
- * the search.
773
- */
774
- declare function recordCandidatePopulationSearch<TScenario extends Scenario>(input: {
775
- ledger: SearchLedger;
776
- storage: CampaignStorage;
777
- runDir: string;
778
- identity: SearchRunIdentity;
779
- population: GepaCandidatePopulationArtifact;
780
- /** Scenarios the optimizer selected on. Must cover the population's ids. */
781
- scenarios: ReadonlyArray<TScenario>;
782
- /** Spend the optimizer booked to its own candidate generation. */
783
- generationAccounting: SearchAttemptAccounting;
784
- producerId: string;
785
- runId: string;
786
- }): Promise<SearchHistoryReceipt>;
1007
+ /** A mutable surface as a node: its content digest, stored bytes and declared surfaces. */
1008
+ declare function surfaceNode(recorder: SearchRecorder, surface: MutableSurface): RegisterSearchNodeInput;
1009
+ /** A parent-to-child diff of two mutable surfaces, stored as a blob. */
1010
+ declare function surfaceDiff(recorder: SearchRecorder, parent: MutableSurface, child: MutableSurface): SearchArtifactRef;
787
1011
  //#endregion
788
1012
  //#region src/campaign/presets/run-optimization.d.ts
789
1013
  interface PremeasuredOptimizationBaseline<TArtifact, TScenario extends Scenario> {
@@ -873,11 +1097,12 @@ interface RunOptimizationBaseOptions<TScenario extends Scenario, TArtifact> exte
873
1097
  */
874
1098
  selectParent?: ParentSelector;
875
1099
  /**
876
- * Record this search into a durable `SearchLedger`. The loop emits the plan,
877
- * each candidate-generation operation, each candidate registration with its
878
- * measured parent, one task attempt per designed cell, one decision per
879
- * candidate, and the terminal event, then returns a bounded
880
- * `searchHistory` receipt over the exact ledger bytes.
1100
+ * Record this search into a search ledger as it runs: the baseline as the
1101
+ * seeded root and its cells, each generation's candidate-generation
1102
+ * operation, each candidate as a node with an explicit edge, rationale and
1103
+ * diff from the parent it mutated, each designed cell when its campaign
1104
+ * starts and settles, one decision per node, and the close. Returns a
1105
+ * bounded `searchHistory` receipt over the exact ledger bytes.
881
1106
  *
882
1107
  * `identity` declares what the ledger requires and a campaign cannot infer:
883
1108
  * immutable revisions for the agent, proposer, and search implementations,
@@ -1205,6 +1430,56 @@ declare function readExternalOptimizerObservationArtifact(input: {
1205
1430
  storage?: CampaignStorage;
1206
1431
  }): ExternalOptimizerObservationArtifact;
1207
1432
  //#endregion
1433
+ //#region src/campaign/gepa-candidate-population.d.ts
1434
+ interface GepaCandidatePopulationSummary {
1435
+ readonly scope: 'gepa-candidate-population';
1436
+ readonly path: string;
1437
+ readonly sha256: `sha256:${string}`;
1438
+ readonly bytes: number;
1439
+ readonly runId: string;
1440
+ readonly candidates: number;
1441
+ readonly bestIndex: number;
1442
+ readonly maxCandidates: number;
1443
+ readonly maxCandidateChars: number;
1444
+ readonly scenarioIds: readonly string[];
1445
+ readonly surfaceKind: 'text' | 'components';
1446
+ }
1447
+ interface GepaCandidateSelectionScore {
1448
+ readonly scenarioId: string;
1449
+ readonly score: number;
1450
+ }
1451
+ interface GepaCandidatePopulationCandidate {
1452
+ /** Zero-based index assigned by the exact GEPA result. */
1453
+ readonly index: number;
1454
+ readonly candidate: ExternalTextCandidate;
1455
+ readonly candidateHash: string;
1456
+ readonly candidateDigest: `sha256:${string}`;
1457
+ /** Exact GEPA parent indices. The seed candidate has one null parent. */
1458
+ readonly parentIndices: readonly (number | null)[];
1459
+ /** Null means GEPA had no selection score for this candidate. */
1460
+ readonly aggregateScore: number | null;
1461
+ readonly selectionScores: readonly GepaCandidateSelectionScore[];
1462
+ readonly discoveryEvaluationCount: number;
1463
+ }
1464
+ interface GepaCandidatePopulationArtifact {
1465
+ readonly summary: GepaCandidatePopulationSummary;
1466
+ readonly runId: string;
1467
+ readonly bestIndex: number;
1468
+ readonly candidates: readonly GepaCandidatePopulationCandidate[];
1469
+ }
1470
+ /**
1471
+ * Read GEPA's exact candidate graph from the artifact addressed by method provenance.
1472
+ *
1473
+ * The reader checks the supplied digest, declared byte count, run identity,
1474
+ * candidate surfaces, parent graph, selection scores, and configured bounds.
1475
+ * This proves that the bytes match the supplied summary. The caller remains
1476
+ * responsible for obtaining that summary from trusted method provenance.
1477
+ */
1478
+ declare function readGepaCandidatePopulationArtifact(input: {
1479
+ summary: GepaCandidatePopulationSummary;
1480
+ storage?: CampaignStorage;
1481
+ }): GepaCandidatePopulationArtifact;
1482
+ //#endregion
1208
1483
  //#region src/campaign/optimization-cost.d.ts
1209
1484
  /** Cost reported by a method or by final test scoring. */
1210
1485
  interface ComparisonCost {
@@ -1706,12 +1981,13 @@ interface GepaOptimizationMethodConfig<TScenario extends Scenario, TArtifact = u
1706
1981
  trustResumeState?: boolean;
1707
1982
  runner?: GepaRunnerCommand;
1708
1983
  /**
1709
- * Record GEPA's own candidate population into the canonical `SearchLedger`
1710
- * and return the bounded receipt on the method result, so a comparison run
1711
- * under `searchHistoryPolicy: 'require-complete'` accepts this method.
1984
+ * Record GEPA's search into a search ledger and return the bounded receipt
1985
+ * on the method result, so a comparison under `searchHistoryPolicy:
1986
+ * 'require-complete'` accepts this method. The population becomes nodes and
1987
+ * `correlated` edges, and every callback evaluation becomes a cell.
1712
1988
  *
1713
- * `identity` declares the immutable revisions and the model snapshot the
1714
- * ledger requires and the bridge does not report. `path` defaults to
1989
+ * `identity` declares the immutable revisions and the model the ledger
1990
+ * requires and the bridge does not report. `path` defaults to
1715
1991
  * `<runDir>/search-ledger.jsonl`.
1716
1992
  */
1717
1993
  searchLedger?: {
@@ -2556,6 +2832,89 @@ interface CrossSurfaceInteractionReport<TRow extends CrossSurfaceTaskRow = Cross
2556
2832
  */
2557
2833
  declare function analyzeCrossSurfaceInteractions<TRow extends CrossSurfaceTaskRow>(input: AnalyzeCrossSurfaceInteractionsInput<TRow>): CrossSurfaceInteractionReport<TRow>;
2558
2834
  //#endregion
2835
+ //#region src/campaign/estimate-node.d.ts
2836
+ /** The estimator every `NodeEstimate` names. */
2837
+ declare const SEARCH_ESTIMATOR: SearchSourceRef;
2838
+ interface EstimateNodeCellsInput {
2839
+ nodeId: string;
2840
+ against: string;
2841
+ split: SearchSplit;
2842
+ direction: 'maximize' | 'minimize';
2843
+ /** Every scored cell of `nodeId` on `split`. */
2844
+ nodeCells: readonly SearchScoredCell[];
2845
+ /** Every scored cell of `against` on `split`. */
2846
+ againstCells: readonly SearchScoredCell[];
2847
+ }
2848
+ /**
2849
+ * Digest of the cells an estimate reads, with the contrast they serve. Cells
2850
+ * are listed in cellId order, so the digest names the set, not the order it
2851
+ * was read in.
2852
+ */
2853
+ declare function searchCellSetDigest(input: Omit<EstimateNodeCellsInput, 'direction'>): SearchLedgerHash;
2854
+ /**
2855
+ * The paired contrast of `nodeId` against `against` on the units both scored.
2856
+ *
2857
+ * `delta` is the mean per-unit difference, node minus `against`, in the
2858
+ * metric's own units; for a `minimize` objective an improvement is negative.
2859
+ * The exact sign test is one-sided toward improvement in the objective's
2860
+ * direction. Unscored cells (errored, cancelled or in flight) are absent from
2861
+ * the inputs, never zero.
2862
+ *
2863
+ * - `none` (0 or 1 pair): no delta.
2864
+ * - `insufficient` (2 to 5): the delta only.
2865
+ * - `descriptive` (6 to 19): the bootstrap interval as spread, and the sign-test p.
2866
+ * - `bootstrap` (20 or more): the decision-grade bootstrap interval.
2867
+ *
2868
+ * When every paired delta is equal the interval would have zero width, which
2869
+ * is an absence of evidence; the estimate is then `indeterminate` and carries
2870
+ * neither an interval nor a p-value.
2871
+ */
2872
+ declare function estimateNodeFromCells(input: EstimateNodeCellsInput): NodeEstimate;
2873
+ /**
2874
+ * `estimateNodeFromCells` over the cells a search state holds: `nodeId`
2875
+ * against `against` on one split, in the direction the search's objective
2876
+ * declares.
2877
+ */
2878
+ declare function estimateNode(state: SearchStateView, nodeId: string, options: {
2879
+ against: string;
2880
+ split: SearchSplit;
2881
+ }): NodeEstimate;
2882
+ /** A node's normal posterior on its improvement over the root. */
2883
+ interface NodePosterior {
2884
+ nodeId: string;
2885
+ /** Units the node and the root both scored. */
2886
+ pairs: number;
2887
+ /** Mean per-unit improvement over the root in the objective's direction,
2888
+ * so larger is better for either direction. Null without a shared unit. */
2889
+ mean: number | null;
2890
+ /** The pooled variance divided by `pairs`. Null when either is unknown. */
2891
+ variance: number | null;
2892
+ }
2893
+ interface SearchPosterior {
2894
+ split: SearchSplit;
2895
+ rootNodeId: string;
2896
+ /**
2897
+ * Between-unit variance of the per-unit improvements over the root, pooled
2898
+ * across every non-root node with at least 2 shared units. Null until some
2899
+ * node has 2.
2900
+ */
2901
+ pooledVariance: number | null;
2902
+ /** Sum over the pooled nodes of their shared units minus one. */
2903
+ degreesOfFreedom: number;
2904
+ /** Every node in registration order; the root first, at exactly 0. */
2905
+ nodes: NodePosterior[];
2906
+ }
2907
+ /**
2908
+ * The posterior every node's parent-selection draw uses. Each node's mean is
2909
+ * its improvement over the root on shared units; its variance is the search's
2910
+ * pooled between-unit variance divided by its unit count, so a node measured
2911
+ * on one unit has a wide posterior rather than none. The root is the reference
2912
+ * and sits at exactly 0.
2913
+ */
2914
+ declare function searchPosterior(state: SearchStateView, options?: {
2915
+ split?: SearchSplit;
2916
+ }): SearchPosterior;
2917
+ //#endregion
2559
2918
  //#region src/campaign/fixtures.d.ts
2560
2919
  type EvalFixtureValidationMode = 'vitest' | 'none';
2561
2920
  interface EvalFixtureFile {
@@ -2632,6 +2991,76 @@ interface NeutralizationGateOptions<TScenario extends Scenario = Scenario> {
2632
2991
  */
2633
2992
  declare function neutralizationGate<TArtifact, TScenario extends Scenario>(options: NeutralizationGateOptions<TScenario>): Gate<TArtifact, TScenario>;
2634
2993
  //#endregion
2994
+ //#region src/campaign/gepa-search-import.d.ts
2995
+ interface GepaPopulationImport {
2996
+ /** Population index to node id. */
2997
+ nodeIds: ReadonlyMap<number, string>;
2998
+ /** Distinct nodes the population maps to. */
2999
+ nodes: number;
3000
+ edges: number;
3001
+ /** Population entries whose content equals an earlier entry's: one node, a second edge. */
3002
+ collapsedDuplicates: number;
3003
+ /** Proposals whose content equals their own parent, which no edge can express. */
3004
+ unchangedProposals: number;
3005
+ }
3006
+ /**
3007
+ * Register GEPA's population as nodes and its parent indices as `correlated`
3008
+ * edges. A parentless entry (GEPA's seed) gets a seed edge unless its node is
3009
+ * already in the tree, for example the root the caller seeded.
3010
+ */
3011
+ declare function importGepaPopulation(input: {
3012
+ recorder: SearchRecorder;
3013
+ population: GepaCandidatePopulationArtifact;
3014
+ proposer: SearchProposer;
3015
+ /** How a candidate becomes a node. Default: its text or component surface. */
3016
+ node?: (candidate: GepaCandidatePopulationCandidate) => RegisterSearchNodeInput;
3017
+ /** How a parent-to-child diff is stored. Default: the surface diff. */
3018
+ diff?: (parent: GepaCandidatePopulationCandidate, child: GepaCandidatePopulationCandidate) => SearchArtifactRef | SearchUnknown;
3019
+ }): Promise<GepaPopulationImport>;
3020
+ interface GepaEvaluationImport {
3021
+ cells: number;
3022
+ /** Nodes of candidates GEPA evaluated but kept out of its population. */
3023
+ unrecordedParentNodeIds: string[];
3024
+ }
3025
+ /**
3026
+ * Record every evaluation in the callback's observation log as an `external`
3027
+ * cell attempt. A candidate that is not yet a node (GEPA evaluated it on a
3028
+ * minibatch and discarded it) is registered with an `unknown` edge.
3029
+ */
3030
+ declare function importExternalEvaluations(input: {
3031
+ recorder: SearchRecorder;
3032
+ observations: ExternalOptimizerObservationArtifact;
3033
+ proposer: SearchProposer;
3034
+ identity: SearchExecutionIdentity;
3035
+ /** The split each evaluated example belongs to. */
3036
+ splitOf: (exampleId: string) => SearchSplit;
3037
+ }): Promise<GepaEvaluationImport>;
3038
+ /** An optimizer candidate as the mutable surface it represents. */
3039
+ declare function externalSurface(candidate: ExternalTextCandidate): MutableSurface;
3040
+ /**
3041
+ * Write GEPA's finished search into its ledger: the baseline as the seeded
3042
+ * root, the population as nodes with `correlated` edges, every callback
3043
+ * evaluation as an `external` cell, GEPA's proposer spend as one operation,
3044
+ * GEPA's choice as the selected node, and the close. GEPA's own selection is a
3045
+ * budget decision, so the ledger carries no claim; the final comparison runs
3046
+ * outside this search.
3047
+ */
3048
+ declare function recordGepaSearch(input: {
3049
+ name: string;
3050
+ path: string;
3051
+ searchId: string;
3052
+ identity: SearchRunIdentity;
3053
+ storage: CampaignStorage;
3054
+ seed: number;
3055
+ baselineSurface: MutableSurface;
3056
+ trainScenarios: readonly Scenario[];
3057
+ selectionScenarios: readonly Scenario[];
3058
+ evaluationLimit: number;
3059
+ population: GepaCandidatePopulationArtifact;
3060
+ observations: ExternalOptimizerObservationArtifact;
3061
+ generationAccounting: SearchAttemptAccounting;
3062
+ }): Promise<SearchHistoryReceipt>;
3063
+ //#endregion
2635
3064
  //#region src/campaign/grounded-reflection.d.ts
2636
3065
  /**
2637
3066
  * Evidence grounding for reflective optimizers (GEPA-style revise loops).
@@ -3638,5 +4067,5 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
3638
4067
  * identity against the checkout at `worktreeRef`. */
3639
4068
  declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
3640
4069
  //#endregion
3641
- export { scoreboardSummary as $, assertCampaignDesign as $a, readGepaCandidatePopulationArtifact as $i, emitLoopProvenance as $n, OptimizationMethodComparison as $r, loadEvalFixture as $t, tangleTracesRoot as A, openAutoPr as Aa, TransientFailureOptions as Ai, CrossSurfacePairwiseEntry as An, composeGate as Ar, sequentialOptimizationMethod as At, finalizeProfileMatrix as B, planCampaignRun as Ba, runOptimization as Bi, traceAnalystQualityJudge as Bn, GepaRunnerCommand as Br, classifyUngroundedLiterals as Bt, SingleRunLockOptions as C, SearchLedgerIntegrityError as Ca, ReferenceEquivalenceJudgeResult as Ci, CrossSurfaceInteractionPath as Cn, scoreRedTeamOutput as Cr, RequirementCheck as Ct, scoreDiscrimination as D, crowdedFrontierParent as Da, LlmJudgeDimension as Di, CrossSurfacePairCompatibility as Dn, CanaryOptions as Dr, createLlmCorrectnessChecker as Dt, ScenarioSignal as E, ParentSelector as Ea, runReferenceEquivalenceJudge as Ei, CrossSurfaceNaiveStackSelection as En, CanaryKind as Er, completionVerdict as Et, ProfileMatrixPlan as F, RunCampaignOptions as Fa, RunImprovementLoopResult as Fi, CrossSurfaceTaskRow as Fn, GepaAdaptiveEngineRun as Fr, RolloutArgumentDiff as Ft, ScoreboardRenderOptions as G, buildCellSchedule as Ga, SearchRecorder as Gi, LoopProvenanceBackend as Gn, ExternalTextOptimizationMethodConfig as Gr, EvalFixtureFile as Gt, PlaybackContext as H, CacheRead as Ha, ProposedSearchCandidate as Hi, EmitLoopProvenanceArgs as Hn, OpenAICompatibleOptimizerModel as Hr, NeutralizationGateOptions as Ht, ProfileMatrixRow as I, runCampaign as Ia, runImprovementLoop as Ii, BuildTraceAnalystSurfaceDispatchOptions as In, GepaEngineOptions as Ir, RolloutArgumentDiffOptions as It, UserStory as J, createRunCostLedger as Ja, recordCandidatePopulationSearch as Ji, LoopProvenanceOptimizationMethod as Jn, ExternalOptimizationExample as Jr, EvalFixtureScenario as Jt, ScoreboardRow as K, cellCachePath as Ka, SearchRecorderOptions as Ki, LoopProvenanceCandidate as Kn, ExternalTextOptimizerContext as Kr, EvalFixtureLoadOptions as Kt, ProfileMatrixSegmentResult as L, CampaignRunPlan as La, PremeasuredOptimizationBaseline as Li, TraceAnalystArtifact as Ln, GepaEngineRun as Lr, RolloutCall as Lt, FinalizeProfileMatrixOptions as M, runEval as Ma, quotaExhaustedUntil as Mi, CrossSurfaceRelativeCost as Mn, SkillOptRunnerCommand as Mr, FsLabeledScenarioStore as Mt, FinalizedProfileMatrixResult as N, CampaignCellFailureReceipt as Na, transientDispatchFailure as Ni, CrossSurfaceSelectionPolicy as Nn, SkillOptTrainerConfig as Nr, FsLabeledScenarioStoreOptions as Nt, selectDiscriminative as O, OpenAutoPrOptions as Oa, LlmJudgeOptions as Oi, CrossSurfacePairEvidence as On, CanaryReport as Or, verifyCompletion as Ot, ProfileMatrixCoverage as P, CampaignCellRetryPolicy as Pa, RunImprovementLoopOptions as Pi, CrossSurfaceSelections as Pn, skillOptOptimizationMethod as Pr, LabeledScenarioStoreError as Pt, scoreUserStory as Q, FinalEvidenceUse as Qa, GepaCandidateSelectionScore as Qi, canonicalDigest as Qn, OptimizationMethod as Qr, discoverEvalFixtures as Qt, RunProfileMatrixSegmentOptions as R, CampaignRunPlanCell as Ra, RunOptimizationOptions as Ri, TraceAnalystScenario as Rn, GepaOptimizationMethodConfig as Rr, ScoredRollout as Rt, SingleRunLock as S, SearchLedgerError as Sa, ReferenceEquivalenceJudgeOptions as Si, CrossSurfaceInteractionEffect as Sn, redTeamReport as Sr, ProducedState as St, DiscriminationScore as T, ParentSelectionContext as Ta, createReferenceEquivalenceJudge as Ti, CrossSurfaceInteractionTask as Tn, CanaryEvaluation as Tr, TaskGold as Tt, PlaybackDriver as U, readCachedCell as Ua, SearchExecutionIdentity as Ui, EmitLoopProvenanceResult as Un, OptimizerModelBudget as Ur, neutralizationGate as Ut, runProfileMatrixSegment as V, CacheIssueReason as Va, MeasuredSearchCandidate as Vi, BuildLoopProvenanceArgs as Vn, gepaOptimizationMethod as Vr, rolloutArgumentDiff as Vt, PlaybackStep as W, CellScheduleSlot as Wa, SearchLedgerBinding as Wi, LoopProvenanceArgsFromResult as Wn, externalTextOptimizationMethod as Wr, EvalFixture as Wt, makePlaybackDispatch as X, inMemoryCampaignStorage as Xa, GepaCandidatePopulationCandidate as Xi, buildLoopProvenanceRecord as Xn, decodeExternalTextCandidate as Xr, LoadEvalFixtureScenariosOptions as Xt, UserStoryVerdict as Y, fsCampaignStorage as Ya, GepaCandidatePopulationArtifact as Yi, LoopProvenanceRecord as Yn, ExternalTextEvaluationResponse as Yr, EvalFixtureValidationMode as Yt, renderScoreboardMarkdown as Z, FinalEvidencePolicy as Za, GepaCandidatePopulationSummary as Zi, campaignMeasurementDigest as Zn, CompareOptimizationMethodsOptions as Zr, PlanEvalFixtureRunOptions as Zt, componentSurfaceIdentityMaterial as _, SearchLedgerTrustedHeadMode as _a, ExternalOptimizerSubmittedCandidate as _i, CrossSurfaceDistribution as _n, RedTeamCase as _r, CompletionRequirement as _t, WorktreeAdapterError as a, SearchHistoryPolicy as aa, OptimizationMethodRunOptions as ai, CrossSurfaceAdditionRejectionReason as an, CampaignBreakdown as ar, RunProfileMatrixResult as at, surfaceDispatchRef as b, validateSearchLedgerEvent as ba, REFERENCE_EQUIVALENCE_JUDGE_VERSION as bi, CrossSurfaceIneligibilityReason as bn, RedTeamReport as br, LlmCorrectnessCheckerOpts as bt, verifyCodeSurface as c, assertCompleteSearchHistory as ca, OptimizationTokenUsage as ci, CrossSurfaceBootstrapPolicy as cn, campaignMeanComposite as cr, BackendIntegrityError as ct, PhoenixEvaluationResultLike as d, searchHistoryCoverageRow as da, ComparisonCost as di, CrossSurfaceCandidateEvidence as dn, heldOutGate as dr, summarizeBackendIntegrity as dt, CreateSearchHistoryReceiptInput as ea, OptimizationMethodComposition as ei, loadEvalFixtureScenarios as en, assertCampaignSplitIdentity as eo, loopProvenanceArgsFromResult as er, userStoryScoreboard as et, PhoenixEvaluatorLike as f, verifySearchHistoryArtifact as fa, combineComparisonCosts as fi, CrossSurfaceCandidateOutcome as fn, DefaultProductionGateCheck as fr, ArtifactEventLike as ft, codeSurfaceIdentityMaterial as g, SearchLedger as ga, ExternalOptimizerObservationSummary as gi, CrossSurfaceCompositionStep as gn, DEFAULT_RED_TEAM_CORPUS as gr, extractProducedState as gt, assertCodeSurfaceIdentity as h, OpenSearchLedgerOptions as ha, ExternalOptimizerObservationArtifact as hi, CrossSurfaceComponentEvidence as hn, defaultProductionGate as hr, ToolCallEventLike as ht, WorktreeAdapter as i, SearchHistoryCoverageRow as ia, OptimizationMethodResult as ii, CrossSurfaceAdditionDecision as in, verifyLoopProvenanceRecord as ir, RunProfileMatrixOptions as it, CreateProfileMatrixPlanOptions as j, RunEvalOptions as ja, isTransientTransportFailure as ji, CrossSurfaceRankedSingle as jn, SkillOptOptimizationMethodConfig as jr, neutralizeText as jt, resolveRunDir as k, OpenAutoPrResult as ka, llmJudge as ki, CrossSurfacePairIncompatibilityReason as kn, runCanaries as kr, scopedOptimizationMethod as kt, AutoevalsScoreLike as l, assertSearchHistoryMatchesReplay as la, compareOptimizationMethods as li, CrossSurfaceCandidate as ln, compareRankKeys as lr, BackendIntegrityReport as lt, phoenixEvaluatorJudge as m, FileSearchLedger as ma, ExternalOptimizerExecutionSummary as mi, CrossSurfaceComponent as mn, DefaultProductionRewardHackingOptions as mr, RuntimeEventLike as mt, GitWorktreeAdapterOptions as n, SearchHistoryAuditSummary as na, OptimizationMethodPairwise as ni, analyzeCrossSurfaceInteractions as nn, campaignSplitDigest as no, provenanceRecordPath as nr, ProfileMatrixError as nt, gitWorktreeAdapter as o, SearchHistoryReceipt as oa, OptimizationMethodScore as oi, CrossSurfaceAttemptCompleteness as on, CampaignComparisonUnits as or, ScenarioRollup as ot, autoevalsScorerJudge as p, verifySearchHistoryReceipt as pa, costFromLedgerSummary as pi, CrossSurfaceCandidateSummary as pn, DefaultProductionGateOptions as pr, ProposalEventLike as pt, ScoreboardSummary as q, CampaignStorage as qa, SearchRunIdentity as qi, LoopProvenanceEvidence as qn, ExternalTextOptimizerResult as qr, EvalFixtureRunPlan as qt, Worktree as r, SearchHistoryCoverage as ra, OptimizationMethodProvenance as ri, AnalyzeCrossSurfaceInteractionsInput as rn, campaignSplitDigestFromIdentities as ro, provenanceSpansPath as rr, ProfileSummary as rt, resolveWorktreePath as s, SearchHistoryRequiredError as sa, OptimizationPackageSource as si, CrossSurfaceBestSingleSelection as sn, campaignBreakdown as sr, runProfileMatrix as st, CodeSurfaceVerification as t, SearchHistoryAdmissionOptions as ta, OptimizationMethodInput as ti, planEvalFixtureRun as tn, campaignScenarioIdentity as to, loopProvenanceSpans as tr, ProfileDispatchFn as tt, AutoevalsScorerLike as u, createSearchHistoryReceipt as ua, optimizationTokenUsageFromSummary as ui, CrossSurfaceCandidateComparison as un, HeldOutGateOptions as ur, assertRealBackend as ut, renderSurfaceDiff as v, openSearchLedger as va, readExternalOptimizerObservationArtifact as vi, CrossSurfaceEligibility as vn, RedTeamCategory as vr, CompletionVerdict as vt, acquireSingleRunLock as w, CrowdedFrontierParentOptions as wa, ReferenceEquivalenceScenario as wi, CrossSurfaceInteractionReport as wn, CanaryAlert as wr, SatisfiedBy as wt, surfaceHash as x, SearchLedgerConflictError as xa, ReferenceEquivalenceJudgeInput as xi, CrossSurfaceInteractionAwareSelection as xn, redTeamDataset as xr, ProducedProposal as xt, surfaceContentHash as y, replaySearchLedgerText as ya, REFERENCE_EQUIVALENCE_INPUT_LIMITS as yi, CrossSurfaceEvidenceBreakdown as yn, RedTeamFinding as yr, CorrectnessChecker as yt, createProfileMatrixPlan as z, PlanCampaignRunOptions as za, RunOptimizationResult as zi, buildTraceAnalystSurfaceDispatch as zn, GepaOptimizationRecipe as zr, UngroundedLiteralReport as zt };
3642
- //# sourceMappingURL=index-CnJOPR_E.d.ts.map
4070
+ export { scoreboardSummary as $, searchTaskSetDigest as $a, RunImprovementLoopOptions as $i, buildTraceAnalystSurfaceDispatch as $n, GepaOptimizationRecipe as $r, EvalFixtureRunPlan as $t, tangleTracesRoot as A, searchHistoryCoverageRow as Aa, GepaCandidatePopulationSummary as Ai, CrossSurfaceCompositionStep as An, inMemoryCampaignStorage as Ao, DEFAULT_RED_TEAM_CORPUS as Ar, sequentialOptimizationMethod as At, finalizeProfileMatrix as B, validateSearchLedgerEvent as Ba, ReferenceEquivalenceJudgeInput as Bi, CrossSurfaceNaiveStackSelection as Bn, CanaryKind as Br, classifyUngroundedLiterals as Bt, SingleRunLockOptions as C, SearchHistoryCoverageRow as Ca, compareOptimizationMethods as Ci, CrossSurfaceCandidate as Cn, readCachedCell as Co, compareRankKeys as Cr, RequirementCheck as Ct, scoreDiscrimination as D, assertCompleteSearchHistory as Da, costFromLedgerSummary as Di, CrossSurfaceCandidateSummary as Dn, CampaignStorage as Do, DefaultProductionGateOptions as Dr, createLlmCorrectnessChecker as Dt, ScenarioSignal as E, SearchHistoryRequiredError as Ea, combineComparisonCosts as Ei, CrossSurfaceCandidateOutcome as En, cellCachePath as Eo, DefaultProductionGateCheck as Er, completionVerdict as Et, ProfileMatrixPlan as F, SearchLedger as Fa, ExternalOptimizerObservationSummary as Fi, CrossSurfaceInteractionAwareSelection as Fn, campaignScenarioIdentity as Fo, redTeamDataset as Fr, RolloutArgumentDiff as Ft, ScoreboardRenderOptions as G, SearchOperation as Ga, runReferenceEquivalenceJudge as Gi, CrossSurfaceRankedSingle as Gn, SkillOptOptimizationMethodConfig as Gr, importExternalEvaluations as Gt, PlaybackContext as H, SearchCompletion as Ha, ReferenceEquivalenceJudgeResult as Hi, CrossSurfacePairEvidence as Hn, CanaryReport as Hr, GepaEvaluationImport as Ht, ProfileMatrixRow as I, SearchLedgerAppendResult as Ia, ExternalOptimizerSubmittedCandidate as Ii, CrossSurfaceInteractionEffect as In, campaignSplitDigest as Io, redTeamReport as Ir, RolloutArgumentDiffOptions as It, UserStory as J, SearchState as Ja, llmJudge as Ji, CrossSurfaceSelections as Jn, skillOptOptimizationMethod as Jr, NeutralizationGateOptions as Jt, ScoreboardRow as K, SearchScoredCell as Ka, LlmJudgeDimension as Ki, CrossSurfaceRelativeCost as Kn, SkillOptRunnerCommand as Kr, importGepaPopulation as Kt, ProfileMatrixSegmentResult as L, SearchLedgerTrustedHeadMode as La, readExternalOptimizerObservationArtifact as Li, CrossSurfaceInteractionPath as Ln, campaignSplitDigestFromIdentities as Lo, scoreRedTeamOutput as Lr, RolloutCall as Lt, FinalizeProfileMatrixOptions as M, verifySearchHistoryReceipt as Ma, readGepaCandidatePopulationArtifact as Mi, CrossSurfaceEligibility as Mn, FinalEvidenceUse as Mo, RedTeamCategory as Mr, FsLabeledScenarioStore as Mt, FinalizedProfileMatrixResult as N, FileSearchLedger as Na, ExternalOptimizerExecutionSummary as Ni, CrossSurfaceEvidenceBreakdown as Nn, assertCampaignDesign as No, RedTeamFinding as Nr, FsLabeledScenarioStoreOptions as Nt, selectDiscriminative as O, assertSearchHistoryMatchesState as Oa, GepaCandidatePopulationArtifact as Oi, CrossSurfaceComponent as On, createRunCostLedger as Oo, DefaultProductionRewardHackingOptions as Or, verifyCompletion as Ot, ProfileMatrixCoverage as P, OpenSearchLedgerOptions as Pa, ExternalOptimizerObservationArtifact as Pi, CrossSurfaceIneligibilityReason as Pn, assertCampaignSplitIdentity as Po, RedTeamReport as Pr, LabeledScenarioStoreError as Pt, scoreUserStory as Q, searchNodeId as Qa, transientDispatchFailure as Qi, TraceAnalystScenario as Qn, GepaOptimizationMethodConfig as Qr, EvalFixtureLoadOptions as Qt, RunProfileMatrixSegmentOptions as R, openSearchLedger as Ra, REFERENCE_EQUIVALENCE_INPUT_LIMITS as Ri, CrossSurfaceInteractionReport as Rn, CanaryAlert as Rr, ScoredRollout as Rt, SingleRunLock as S, SearchHistoryCoverage as Sa, OptimizationTokenUsage as Si, CrossSurfaceBootstrapPolicy as Sn, CacheRead as So, campaignMeanComposite as Sr, ProducedState as St, DiscriminationScore as T, SearchHistoryReceipt as Ta, ComparisonCost as Ti, CrossSurfaceCandidateEvidence as Tn, buildCellSchedule as To, heldOutGate as Tr, TaskGold as Tt, PlaybackDriver as U, SearchDecisionRecord as Ua, ReferenceEquivalenceScenario as Ui, CrossSurfacePairIncompatibilityReason as Un, runCanaries as Ur, GepaPopulationImport as Ut, runProfileMatrixSegment as V, SearchCell as Va, ReferenceEquivalenceJudgeOptions as Vi, CrossSurfacePairCompatibility as Vn, CanaryOptions as Vr, rolloutArgumentDiff as Vt, PlaybackStep as W, SearchNode as Wa, createReferenceEquivalenceJudge as Wi, CrossSurfacePairwiseEntry as Wn, composeGate as Wr, externalSurface as Wt, makePlaybackDispatch as X, SearchUnitScore as Xa, isTransientTransportFailure as Xi, BuildTraceAnalystSurfaceDispatchOptions as Xn, GepaEngineOptions as Xr, EvalFixture as Xt, UserStoryVerdict as Y, SearchStateView as Ya, TransientFailureOptions as Yi, CrossSurfaceTaskRow as Yn, GepaAdaptiveEngineRun as Yr, neutralizationGate as Yt, renderScoreboardMarkdown as Z, searchCellId as Za, quotaExhaustedUntil as Zi, TraceAnalystArtifact as Zn, GepaEngineRun as Zr, EvalFixtureFile as Zt, componentSurfaceIdentityMaterial as _, surfaceDiff as _a, OptimizationMethodProvenance as _i, AnalyzeCrossSurfaceInteractionsInput as _n, CampaignRunPlan as _o, provenanceSpansPath as _r, CompletionRequirement as _t, WorktreeAdapterError as a, runOptimization as aa, ExternalTextOptimizationMethodConfig as ai, loadEvalFixture as an, ParentSelectionContext as ao, LoopProvenanceBackend as ar, RunProfileMatrixResult as at, surfaceDispatchRef as b, SearchHistoryAdmissionOptions as ba, OptimizationMethodScore as bi, CrossSurfaceAttemptCompleteness as bn, planCampaignRun as bo, CampaignComparisonUnits as br, LlmCorrectnessCheckerOpts as bt, verifyCodeSurface as c, RegisterSearchNodeInput as ca, ExternalOptimizationExample as ci, EstimateNodeCellsInput as cn, OpenAutoPrOptions as co, LoopProvenanceOptimizationMethod as cr, BackendIntegrityError as ct, PhoenixEvaluationResultLike as d, SearchRecorder as da, CompareOptimizationMethodsOptions as di, SearchPosterior as dn, RunEvalOptions as do, campaignMeasurementDigest as dr, summarizeBackendIntegrity as dt, RunImprovementLoopResult as ea, GepaRunnerCommand as ei, EvalFixtureScenario as en, searchUnitScores as eo, traceAnalystQualityJudge as er, userStoryScoreboard as et, PhoenixEvaluatorLike as f, SearchRecorderOptions as fa, OptimizationMethod as fi, estimateNode as fn, runEval as fo, canonicalDigest as fr, ArtifactEventLike as ft, codeSurfaceIdentityMaterial as g, searchEdgeId as ga, OptimizationMethodPairwise as gi, analyzeCrossSurfaceInteractions as gn, runCampaign as go, provenanceRecordPath as gr, extractProducedState as gt, assertCodeSurfaceIdentity as h, developmentClaim as ha, OptimizationMethodInput as hi, searchPosterior as hn, RunCampaignOptions as ho, loopProvenanceSpans as hr, ToolCallEventLike as ht, WorktreeAdapter as i, RunOptimizationResult as ia, externalTextOptimizationMethod as ii, discoverEvalFixtures as in, CrowdedFrontierParentOptions as io, LoopProvenanceArgsFromResult as ir, RunProfileMatrixOptions as it, CreateProfileMatrixPlanOptions as j, verifySearchHistoryArtifact as ja, GepaCandidateSelectionScore as ji, CrossSurfaceDistribution as jn, FinalEvidencePolicy as jo, RedTeamCase as jr, neutralizeText as jt, resolveRunDir as k, createSearchHistoryReceipt as ka, GepaCandidatePopulationCandidate as ki, CrossSurfaceComponentEvidence as kn, fsCampaignStorage as ko, defaultProductionGate as kr, scopedOptimizationMethod as kt, AutoevalsScoreLike as l, SearchLedgerBinding as la, ExternalTextEvaluationResponse as li, NodePosterior as ln, OpenAutoPrResult as lo, LoopProvenanceRecord as lr, BackendIntegrityReport as lt, phoenixEvaluatorJudge as m, SettleSearchCellInput as ma, OptimizationMethodComposition as mi, searchCellSetDigest as mn, CampaignCellRetryPolicy as mo, loopProvenanceArgsFromResult as mr, RuntimeEventLike as mt, GitWorktreeAdapterOptions as n, PremeasuredOptimizationBaseline as na, OpenAICompatibleOptimizerModel as ni, LoadEvalFixtureScenariosOptions as nn, SearchLedgerError as no, EmitLoopProvenanceArgs as nr, ProfileMatrixError as nt, gitWorktreeAdapter as o, AllocateSearchCellInput as oa, ExternalTextOptimizerContext as oi, loadEvalFixtureScenarios as on, ParentSelector as oo, LoopProvenanceCandidate as or, ScenarioRollup as ot, autoevalsScorerJudge as p, SearchRunIdentity as pa, OptimizationMethodComparison as pi, estimateNodeFromCells as pn, CampaignCellFailureReceipt as po, emitLoopProvenance as pr, ProposalEventLike as pt, ScoreboardSummary as q, SearchSpend as qa, LlmJudgeOptions as qi, CrossSurfaceSelectionPolicy as qn, SkillOptTrainerConfig as qr, recordGepaSearch as qt, Worktree as r, RunOptimizationOptions as ra, OptimizerModelBudget as ri, PlanEvalFixtureRunOptions as rn, SearchLedgerIntegrityError as ro, EmitLoopProvenanceResult as rr, ProfileSummary as rt, resolveWorktreePath as s, RecordSearchEdgeInput as sa, ExternalTextOptimizerResult as si, planEvalFixtureRun as sn, crowdedFrontierParent as so, LoopProvenanceEvidence as sr, runProfileMatrix as st, CodeSurfaceVerification as t, runImprovementLoop as ta, gepaOptimizationMethod as ti, EvalFixtureValidationMode as tn, SearchLedgerConflictError as to, BuildLoopProvenanceArgs as tr, ProfileDispatchFn as tt, AutoevalsScorerLike as u, SearchOpening as ua, decodeExternalTextCandidate as ui, SEARCH_ESTIMATOR as un, openAutoPr as uo, buildLoopProvenanceRecord as ur, assertRealBackend as ut, renderSurfaceDiff as v, surfaceNode as va, OptimizationMethodResult as vi, CrossSurfaceAdditionDecision as vn, CampaignRunPlanCell as vo, verifyLoopProvenanceRecord as vr, CompletionVerdict as vt, acquireSingleRunLock as w, SearchHistoryPolicy as wa, optimizationTokenUsageFromSummary as wi, CrossSurfaceCandidateComparison as wn, CellScheduleSlot as wo, HeldOutGateOptions as wr, SatisfiedBy as wt, surfaceHash as x, SearchHistoryAuditSummary as xa, OptimizationPackageSource as xi, CrossSurfaceBestSingleSelection as xn, CacheIssueReason as xo, campaignBreakdown as xr, ProducedProposal as xt, surfaceContentHash as y, CreateSearchHistoryReceiptInput as ya, OptimizationMethodRunOptions as yi, CrossSurfaceAdditionRejectionReason as yn, PlanCampaignRunOptions as yo, CampaignBreakdown as yr, CorrectnessChecker as yt, createProfileMatrixPlan as z, replaySearchLedgerText as za, REFERENCE_EQUIVALENCE_JUDGE_VERSION as zi, CrossSurfaceInteractionTask as zn, CanaryEvaluation as zr, UngroundedLiteralReport as zt };
4071
+ //# sourceMappingURL=index-Ci0-EYzc.d.ts.map