@tangle-network/agent-eval 0.142.1 → 0.143.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 (59) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +21 -0
  3. package/dist/analyst/index.d.ts +5 -5
  4. package/dist/analyst/index.js +2 -2
  5. package/dist/{benchmark-command-DTyVFMUV.js → benchmark-command-CSddvlq7.js} +5 -5
  6. package/dist/{benchmark-command-DTyVFMUV.js.map → benchmark-command-CSddvlq7.js.map} +1 -1
  7. package/dist/benchmarks/index.d.ts +1 -1
  8. package/dist/benchmarks/index.js +1 -1
  9. package/dist/{benchmarks-Ce8GdJbc.js → benchmarks-Dg0B56tK.js} +4 -4
  10. package/dist/{benchmarks-Ce8GdJbc.js.map → benchmarks-Dg0B56tK.js.map} +1 -1
  11. package/dist/campaign/index.d.ts +3 -3
  12. package/dist/campaign/index.js +3 -3
  13. package/dist/{campaign-COFTVy3Q.js → campaign-C7ZGiZYG.js} +7 -5
  14. package/dist/campaign-C7ZGiZYG.js.map +1 -0
  15. package/dist/cli.js +1 -1
  16. package/dist/{client-BoqGxEqx.d.ts → client-Cgl6KasJ.d.ts} +2 -2
  17. package/dist/{client-BoqGxEqx.d.ts.map → client-Cgl6KasJ.d.ts.map} +1 -1
  18. package/dist/contract/index.d.ts +5 -5
  19. package/dist/contract/index.js +3 -3
  20. package/dist/{default-registry-Ci7wAAR8.d.ts → default-registry-D3uqKbo6.d.ts} +2 -2
  21. package/dist/{default-registry-Ci7wAAR8.d.ts.map → default-registry-D3uqKbo6.d.ts.map} +1 -1
  22. package/dist/{dspy-rlm-engine-Bw8Zz9CX.js → dspy-rlm-engine-CJ4sN8Wx.js} +2 -2
  23. package/dist/{dspy-rlm-engine-Bw8Zz9CX.js.map → dspy-rlm-engine-CJ4sN8Wx.js.map} +1 -1
  24. package/dist/hosted/index.d.ts +2 -2
  25. package/dist/{index-CKI1CXTL.d.ts → index-CaOjqCli.d.ts} +4 -4
  26. package/dist/{index-CKI1CXTL.d.ts.map → index-CaOjqCli.d.ts.map} +1 -1
  27. package/dist/{index-DCP4I2Qx.d.ts → index-DY83M1WL.d.ts} +7 -5
  28. package/dist/{index-DCP4I2Qx.d.ts.map → index-DY83M1WL.d.ts.map} +1 -1
  29. package/dist/index.d.ts +8 -8
  30. package/dist/index.js +4 -4
  31. package/dist/multishot/index.d.ts +1 -1
  32. package/dist/openapi.json +1 -1
  33. package/dist/{replay-BqTgoioO.d.ts → replay-BuJM6kLh.d.ts} +2 -2
  34. package/dist/{replay-BqTgoioO.d.ts.map → replay-BuJM6kLh.d.ts.map} +1 -1
  35. package/dist/{reward-hacking-GyN0kMd8.js → reward-hacking-DjTi9HLb.js} +34 -14
  36. package/dist/reward-hacking-DjTi9HLb.js.map +1 -0
  37. package/dist/rl.d.ts +263 -2
  38. package/dist/rl.d.ts.map +1 -1
  39. package/dist/rl.js +332 -3
  40. package/dist/rl.js.map +1 -1
  41. package/dist/{single-run-lock-BcvPQY57.js → single-run-lock-Do-8vBIJ.js} +2 -2
  42. package/dist/{single-run-lock-BcvPQY57.js.map → single-run-lock-Do-8vBIJ.js.map} +1 -1
  43. package/dist/{skill-usage-CNZTk_LT.d.ts → skill-usage-CRqaHi0R.d.ts} +3 -3
  44. package/dist/{skill-usage-CNZTk_LT.d.ts.map → skill-usage-CRqaHi0R.d.ts.map} +1 -1
  45. package/dist/{skillopt-optimization-method-D1dqGzzH.d.ts → skillopt-optimization-method-CwRvi-rL.d.ts} +21 -5
  46. package/dist/skillopt-optimization-method-CwRvi-rL.d.ts.map +1 -0
  47. package/dist/{skillopt-optimization-method-DV6c4ooy.js → skillopt-optimization-method-Di8Xkalt.js} +153 -50
  48. package/dist/skillopt-optimization-method-Di8Xkalt.js.map +1 -0
  49. package/dist/{tool-groups-DVQTy9lq.d.ts → tool-groups-Bqy4A3QB.d.ts} +2 -2
  50. package/dist/{tool-groups-DVQTy9lq.d.ts.map → tool-groups-Bqy4A3QB.d.ts.map} +1 -1
  51. package/dist/traces.d.ts +2 -2
  52. package/dist/{types-Dk7PB7vh.d.ts → types-KEqL1pZc.d.ts} +6 -4
  53. package/dist/{types-Dk7PB7vh.d.ts.map → types-KEqL1pZc.d.ts.map} +1 -1
  54. package/docs/verified-labels-flywheel.md +46 -0
  55. package/package.json +3 -3
  56. package/dist/campaign-COFTVy3Q.js.map +0 -1
  57. package/dist/reward-hacking-GyN0kMd8.js.map +0 -1
  58. package/dist/skillopt-optimization-method-D1dqGzzH.d.ts.map +0 -1
  59. package/dist/skillopt-optimization-method-DV6c4ooy.js.map +0 -1
@@ -2,11 +2,11 @@ import { c as ValidationError, i as JudgeError, t as AgentEvalError } from "./er
2
2
  import { i as CostLedger, t as CostAccountingIncompleteError } from "./cost-ledger-DMFxsLKr.js";
3
3
  import { f as maximumChargeForLlmRequest, l as costReceiptFromLlm, m as stripFencedJson, u as costReceiptFromLlmError } from "./llm-client-B3WXSH5Y.js";
4
4
  import { a as clamp01, o as combineAbortSignals, t as assertProposalFindings } from "./proposal-findings-2GIUo1et.js";
5
- import { C as safePathComponent, S as removeCredentialEnvironment, _ as assertJsonValue, b as isExternalTextCandidate, d as runWithCleanup, f as startExternalOptimizerModelProxy, g as assertExternalOptimizerModelBudget, h as sendJson, l as runExternalOptimizerProcess, m as listenLocal, n as createRunCostLedger, p as closeServer, r as fsCampaignStorage, t as acquireSingleRunLock, u as closeExternalOptimizerResources, v as assertNoCredentialValues, x as isRecord, y as isCandidateText } from "./single-run-lock-BcvPQY57.js";
5
+ import { C as safePathComponent, S as removeCredentialEnvironment, _ as assertJsonValue, b as isExternalTextCandidate, d as runWithCleanup, f as startExternalOptimizerModelProxy, g as assertExternalOptimizerModelBudget, h as sendJson, l as runExternalOptimizerProcess, m as listenLocal, n as createRunCostLedger, p as closeServer, r as fsCampaignStorage, t as acquireSingleRunLock, u as closeExternalOptimizerResources, v as assertNoCredentialValues, x as isRecord, y as isCandidateText } from "./single-run-lock-Do-8vBIJ.js";
6
6
  import { p as mapConcurrent } from "./ledger-core-Dxz0Rkwa.js";
7
7
  import { E as pairedBootstrap, H as weightedComposite, M as pairedRiskDifferenceScore, N as pairedSignTest, O as pairedDeltaTieFraction, T as pairedBinaryScale, d as confidenceInterval, j as pairedRiskDifferenceExact } from "./statistics-ByxzSiOM.js";
8
8
  import { t as DEFAULT_REDACTION_RULES } from "./redact-7Aq1ukl-.js";
9
- import { a as campaignCellExecutionEvidence, l as projectCampaignCellQuality, t as detectRewardHacking } from "./reward-hacking-GyN0kMd8.js";
9
+ import { a as campaignCellCostProvenance, o as campaignCellExecutionEvidence, t as detectRewardHacking, u as projectCampaignCellQuality } from "./reward-hacking-DjTi9HLb.js";
10
10
  import { z } from "zod";
11
11
  import { appendFileSync, existsSync, readFileSync, writeFileSync } from "node:fs";
12
12
  import { basename, isAbsolute, join } from "node:path";
@@ -2069,6 +2069,15 @@ async function runCampaign(opts) {
2069
2069
  const cells = [];
2070
2070
  const artifactsByPath = {};
2071
2071
  const schedule = buildCellSchedule(opts.scenarios, seed, reps);
2072
+ if (resumable) assertScheduleCachesReusable({
2073
+ schedule,
2074
+ runDir: opts.runDir,
2075
+ manifestHash,
2076
+ storage,
2077
+ costLedger,
2078
+ costTags: opts.costTags,
2079
+ rerunInvalidCachedCells: opts.rerunInvalidCachedCells ?? false
2080
+ });
2072
2081
  const campaignAbort = new AbortController();
2073
2082
  const onOwnerAbort = () => campaignAbort.abort(opts.signal?.reason);
2074
2083
  if (opts.signal?.aborted) campaignAbort.abort(opts.signal.reason);
@@ -2153,15 +2162,9 @@ async function runCampaign(opts) {
2153
2162
  }
2154
2163
  async function executeCell(args) {
2155
2164
  const storage = args.storage;
2156
- const cellDir = join(args.opts.runDir, args.slot.cellId.replace(/[^a-zA-Z0-9_-]/g, "_"));
2165
+ const cellDir = cellDirectory(args.opts.runDir, args.slot.cellId);
2157
2166
  storage.ensureDir(cellDir);
2158
- const stableCostTags = {
2159
- ...args.opts.costTags ?? {},
2160
- runDir: args.opts.runDir,
2161
- cellId: args.slot.cellId,
2162
- scenarioId: args.slot.scenario.id,
2163
- rep: String(args.slot.rep)
2164
- };
2167
+ const stableCostTags = stableCostTagsFor(args.opts, args.slot);
2165
2168
  const costTags = {
2166
2169
  ...stableCostTags,
2167
2170
  runAttemptId: args.runAttemptId
@@ -2174,24 +2177,27 @@ async function executeCell(args) {
2174
2177
  cellId: args.slot.cellId,
2175
2178
  manifestHash: args.manifestHash
2176
2179
  });
2180
+ if (cached.status === "miss" && cacheIssueRequiresExplicitRerun(cached.reason) && !args.opts.rerunInvalidCachedCells) throw invalidCachedCellsError([{
2181
+ cellId: args.slot.cellId,
2182
+ reason: cached.reason
2183
+ }]);
2177
2184
  if (cached.status === "hit") {
2178
- enforceDispatchUsage(cached.cell, args.opts.expectUsage ?? "warn");
2179
- const cachedHasUsage = cached.cell.costUsd > 0 || cached.cell.tokenUsage.input > 0 || cached.cell.tokenUsage.output > 0;
2180
- if (cached.cell.costCallIds === void 0) {
2181
- if (cachedHasUsage || Object.keys(cached.cell.judgeScores).length > 0) throw new CostAccountingIncompleteError(`runCampaign: cached cell '${args.slot.cellId}' does not identify its ledger receipts`);
2182
- } else if (!Array.isArray(cached.cell.costCallIds) || cached.cell.costCallIds.some((callId) => typeof callId !== "string" || callId.trim().length === 0) || new Set(cached.cell.costCallIds).size !== cached.cell.costCallIds.length) throw new CostAccountingIncompleteError(`runCampaign: cached cell '${args.slot.cellId}' has invalid ledger receipt IDs`);
2183
- else {
2184
- const restoredCallIds = new Set(args.costLedger.list({ tags: stableCostTags }).map((receipt) => receipt.callId));
2185
- const missingCallIds = cached.cell.costCallIds.filter((callId) => !restoredCallIds.has(callId));
2186
- if (missingCallIds.length > 0) throw new CostAccountingIncompleteError(`runCampaign: cached cell '${args.slot.cellId}' is missing ledger receipt(s): ${missingCallIds.join(", ")}`);
2185
+ const receiptProblem = cachedCellReceiptProblem(cached.cell, args.costLedger, stableCostTags);
2186
+ if (receiptProblem === void 0) {
2187
+ enforceDispatchUsage(cached.cell, args.opts.expectUsage ?? "warn");
2188
+ return {
2189
+ cell: {
2190
+ ...cached.cell,
2191
+ cached: true
2192
+ },
2193
+ artifactsByPath: {}
2194
+ };
2187
2195
  }
2188
- return {
2189
- cell: {
2190
- ...cached.cell,
2191
- cached: true
2192
- },
2193
- artifactsByPath: {}
2194
- };
2196
+ if (!args.opts.rerunInvalidCachedCells) throw invalidCachedCellsError([{
2197
+ cellId: args.slot.cellId,
2198
+ reason: "invalid-cost-receipts",
2199
+ detail: receiptProblem
2200
+ }]);
2195
2201
  }
2196
2202
  }
2197
2203
  const startMs = Date.now();
@@ -2321,7 +2327,9 @@ async function executeCell(args) {
2321
2327
  const tokenUsage = {
2322
2328
  input: agentCost.inputTokens,
2323
2329
  output: agentCost.outputTokens,
2324
- ...agentCost.cachedTokens > 0 ? { cached: agentCost.cachedTokens } : {}
2330
+ ...agentCost.reasoningTokens !== void 0 && agentCost.reasoningTokens > 0 ? { reasoning: agentCost.reasoningTokens } : {},
2331
+ ...agentCost.cachedTokens > 0 ? { cached: agentCost.cachedTokens } : {},
2332
+ ...agentCost.cacheWriteTokens !== void 0 && agentCost.cacheWriteTokens > 0 ? { cacheWrite: agentCost.cacheWriteTokens } : {}
2325
2333
  };
2326
2334
  const resolvedModel = agentReceipts.at(-1)?.model;
2327
2335
  const dispatchResult = {
@@ -2377,7 +2385,7 @@ async function executeCell(args) {
2377
2385
  artifact: artifact ?? null,
2378
2386
  judgeScores,
2379
2387
  costUsd: agentCost.totalCostUsd,
2380
- costEstimated: agentReceipts.some((receipt) => receipt.actualCostUsd === void 0 && !receipt.costUnknown),
2388
+ costProvenance: agentCost.costProvenance,
2381
2389
  costCallIds,
2382
2390
  tokenUsage,
2383
2391
  ...resolvedModel ? { resolvedModel } : {},
@@ -2467,6 +2475,11 @@ function planCampaignRun(opts) {
2467
2475
  assertCampaignDesign(opts.scenarios, reps);
2468
2476
  if (typeof opts.runDir !== "string" || opts.runDir.trim().length === 0) throw new Error("planCampaignRun: runDir is required and must be a non-empty string");
2469
2477
  opts.runDir = resolveRunDir(opts.runDir, opts.repo);
2478
+ const costLedger = opts.costLedger ?? createRunCostLedger({
2479
+ storage,
2480
+ runDir: opts.runDir,
2481
+ ensureRunDir: false
2482
+ });
2470
2483
  const manifestHash = computeManifestHash({
2471
2484
  scenarios: opts.scenarios,
2472
2485
  judges: opts.judges ?? [],
@@ -2476,7 +2489,7 @@ function planCampaignRun(opts) {
2476
2489
  });
2477
2490
  const splitDigest = campaignSplitDigest(opts.scenarios, reps);
2478
2491
  const cells = buildCellSchedule(opts.scenarios, seed, reps).map((slot) => {
2479
- const cachePath = join(opts.runDir, slot.cellId.replace(/[^a-zA-Z0-9_-]/g, "_"), "cached-result.json");
2492
+ const cachePath = cellCachePath(opts.runDir, slot.cellId);
2480
2493
  if (!resumable) return {
2481
2494
  cellId: slot.cellId,
2482
2495
  scenarioId: slot.scenario.id,
@@ -2492,31 +2505,48 @@ function planCampaignRun(opts) {
2492
2505
  cellId: slot.cellId,
2493
2506
  manifestHash
2494
2507
  });
2495
- if (cached.status === "hit") return {
2496
- cellId: slot.cellId,
2497
- scenarioId: slot.scenario.id,
2498
- rep: slot.rep,
2499
- seed: slot.cellSeed,
2500
- cachePath,
2501
- status: "cached"
2502
- };
2508
+ if (cached.status === "hit") {
2509
+ if (cachedCellReceiptProblem(cached.cell, costLedger, stableCostTagsFor({
2510
+ runDir: opts.runDir,
2511
+ costTags: opts.costTags
2512
+ }, slot)) !== void 0) return {
2513
+ cellId: slot.cellId,
2514
+ scenarioId: slot.scenario.id,
2515
+ rep: slot.rep,
2516
+ seed: slot.cellSeed,
2517
+ cachePath,
2518
+ status: opts.rerunInvalidCachedCells ? "run" : "blocked",
2519
+ reason: "invalid-cost-receipts"
2520
+ };
2521
+ return {
2522
+ cellId: slot.cellId,
2523
+ scenarioId: slot.scenario.id,
2524
+ rep: slot.rep,
2525
+ seed: slot.cellSeed,
2526
+ cachePath,
2527
+ status: "cached"
2528
+ };
2529
+ }
2530
+ const blocked = cacheIssueRequiresExplicitRerun(cached.reason) && !opts.rerunInvalidCachedCells;
2503
2531
  return {
2504
2532
  cellId: slot.cellId,
2505
2533
  scenarioId: slot.scenario.id,
2506
2534
  rep: slot.rep,
2507
2535
  seed: slot.cellSeed,
2508
2536
  cachePath,
2509
- status: "run",
2537
+ status: blocked ? "blocked" : "run",
2510
2538
  reason: cached.reason
2511
2539
  };
2512
2540
  });
2513
2541
  const cellsCached = cells.filter((cell) => cell.status === "cached").length;
2542
+ const cellsBlocked = cells.filter((cell) => cell.status === "blocked").length;
2514
2543
  return {
2515
2544
  manifestHash,
2516
2545
  splitDigest,
2517
2546
  totalCells: cells.length,
2518
2547
  cellsCached,
2519
- cellsToRun: cells.length - cellsCached,
2548
+ cellsBlocked,
2549
+ cellsToRun: cells.filter((cell) => cell.status === "run").length,
2520
2550
  cells
2521
2551
  };
2522
2552
  }
@@ -2633,6 +2663,59 @@ function buildCellSchedule(scenarios, seed, reps) {
2633
2663
  }
2634
2664
  return schedule;
2635
2665
  }
2666
+ function cellDirectory(runDir, cellId) {
2667
+ return join(runDir, cellId.replace(/[^a-zA-Z0-9_-]/g, "_"));
2668
+ }
2669
+ function cellCachePath(runDir, cellId) {
2670
+ return join(cellDirectory(runDir, cellId), "cached-result.json");
2671
+ }
2672
+ function stableCostTagsFor(opts, slot) {
2673
+ return {
2674
+ ...opts.costTags ?? {},
2675
+ runDir: opts.runDir,
2676
+ cellId: slot.cellId,
2677
+ scenarioId: slot.scenario.id,
2678
+ rep: String(slot.rep)
2679
+ };
2680
+ }
2681
+ function assertScheduleCachesReusable(args) {
2682
+ const blocked = [];
2683
+ for (const slot of args.schedule) {
2684
+ const cached = readCachedCell({
2685
+ storage: args.storage,
2686
+ cachePath: cellCachePath(args.runDir, slot.cellId),
2687
+ cellId: slot.cellId,
2688
+ manifestHash: args.manifestHash
2689
+ });
2690
+ if (cached.status === "hit") {
2691
+ const receiptProblem = cachedCellReceiptProblem(cached.cell, args.costLedger, stableCostTagsFor({
2692
+ runDir: args.runDir,
2693
+ costTags: args.costTags
2694
+ }, slot));
2695
+ if (receiptProblem !== void 0 && !args.rerunInvalidCachedCells) blocked.push({
2696
+ cellId: slot.cellId,
2697
+ reason: "invalid-cost-receipts",
2698
+ detail: receiptProblem
2699
+ });
2700
+ } else if (cacheIssueRequiresExplicitRerun(cached.reason) && !args.rerunInvalidCachedCells) blocked.push({
2701
+ cellId: slot.cellId,
2702
+ reason: cached.reason
2703
+ });
2704
+ }
2705
+ if (blocked.length > 0) throw invalidCachedCellsError(blocked);
2706
+ }
2707
+ function cachedCellReceiptProblem(cached, costLedger, stableCostTags) {
2708
+ const reportsPaidActivity = cached.costProvenance.kind !== "observed" || cached.costUsd > 0 || cached.tokenUsage.input > 0 || cached.tokenUsage.output > 0;
2709
+ if (cached.costCallIds === void 0) {
2710
+ if (reportsPaidActivity || Object.keys(cached.judgeScores).length > 0) return "does not identify its ledger receipts";
2711
+ return;
2712
+ }
2713
+ if (!Array.isArray(cached.costCallIds) || cached.costCallIds.some((callId) => typeof callId !== "string" || callId.trim().length === 0) || new Set(cached.costCallIds).size !== cached.costCallIds.length) return "has invalid ledger receipt IDs";
2714
+ if (cached.costCallIds.length === 0 && reportsPaidActivity) return "does not identify its ledger receipts";
2715
+ const restoredCallIds = new Set(costLedger.list({ tags: stableCostTags }).map((receipt) => receipt.callId));
2716
+ const missingCallIds = cached.costCallIds.filter((callId) => !restoredCallIds.has(callId));
2717
+ if (missingCallIds.length > 0) return `is missing ledger receipt(s): ${missingCallIds.join(", ")}`;
2718
+ }
2636
2719
  function dispatchRefFor(dispatch, override) {
2637
2720
  const ref = override ?? dispatch?.name ?? "anonymous";
2638
2721
  if (typeof ref !== "string" || ref.trim().length === 0) throw new Error("runCampaign: dispatchRef must be a non-empty string when provided");
@@ -2642,18 +2725,32 @@ function readCachedCell(args) {
2642
2725
  const raw = args.storage.read(args.cachePath);
2643
2726
  if (raw === void 0) return {
2644
2727
  status: "miss",
2645
- reason: "missing"
2728
+ reason: args.storage.exists(args.cachePath) ? "corrupt" : "missing"
2646
2729
  };
2730
+ let parsed;
2647
2731
  try {
2648
- const cached = JSON.parse(raw);
2649
- if (cached.cellId !== args.cellId) return {
2650
- status: "miss",
2651
- reason: "cell-mismatch"
2652
- };
2653
- if (cached.manifestHash !== args.manifestHash) return {
2732
+ parsed = JSON.parse(raw);
2733
+ } catch {
2734
+ return {
2654
2735
  status: "miss",
2655
- reason: "manifest-mismatch"
2736
+ reason: "corrupt"
2656
2737
  };
2738
+ }
2739
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return {
2740
+ status: "miss",
2741
+ reason: "corrupt"
2742
+ };
2743
+ const cached = parsed;
2744
+ if (cached.cellId !== args.cellId) return {
2745
+ status: "miss",
2746
+ reason: "cell-mismatch"
2747
+ };
2748
+ if (cached.manifestHash !== args.manifestHash) return {
2749
+ status: "miss",
2750
+ reason: "manifest-mismatch"
2751
+ };
2752
+ try {
2753
+ campaignCellCostProvenance(cached);
2657
2754
  return {
2658
2755
  status: "hit",
2659
2756
  cell: cached
@@ -2661,10 +2758,16 @@ function readCachedCell(args) {
2661
2758
  } catch {
2662
2759
  return {
2663
2760
  status: "miss",
2664
- reason: "corrupt"
2761
+ reason: cached.costProvenance === void 0 ? "missing-cost-provenance" : "invalid-cost-provenance"
2665
2762
  };
2666
2763
  }
2667
2764
  }
2765
+ function cacheIssueRequiresExplicitRerun(reason) {
2766
+ return reason === "cell-mismatch" || reason === "missing-cost-provenance" || reason === "invalid-cost-provenance" || reason === "invalid-cost-receipts" || reason === "corrupt";
2767
+ }
2768
+ function invalidCachedCellsError(cells) {
2769
+ return new CostAccountingIncompleteError(`runCampaign: cached cell(s) require explicit paid re-dispatch: ${cells.map((cell) => `${cell.cellId} (${cell.reason}${cell.detail ? `: ${cell.detail}` : ""})`).join(", ")}; refusing to begin campaign. Inspect planCampaignRun, then set rerunInvalidCachedCells: true to rerun only these cells while retaining valid caches, or resumable: false when a full rerun is intended.`);
2770
+ }
2668
2771
  async function captureToStore(args) {
2669
2772
  await args.store.observe({
2670
2773
  scenario: args.scenario,
@@ -6524,7 +6627,7 @@ function campaignMeasurementDigest(campaign) {
6524
6627
  generation: cell.generation ?? null,
6525
6628
  judgeScores: cell.judgeScores,
6526
6629
  costUsd: cell.costUsd,
6527
- costEstimated: cell.costEstimated ?? null,
6630
+ costProvenance: cell.costProvenance,
6528
6631
  costCallIds: [...cell.costCallIds ?? []].sort(),
6529
6632
  tokenUsage: cell.tokenUsage,
6530
6633
  resolvedModel: cell.resolvedModel ?? null,
@@ -7162,4 +7265,4 @@ function skillOptOptimizationMethod(config) {
7162
7265
  //#endregion
7163
7266
  export { campaignScenarioIdentity as $, assertOptimizationResult as A, pairedDeltaTest as At, surfaceHash as B, detectScale as C, paretoFrontier as Ct, runCanaries as D, decidePairedPromotion as Dt, pairHoldout as E, recoverTruncatedJson as Et, assertComponentSurface as F, summarizeBackendIntegrity as Ft, buildReflectionPrompt as G, campaignMeanComposite as H, codeSurfaceIdentityMaterial as I, JudgeParseError as It, runCampaign as J, parseReflectionResponse as K, componentSurfaceIdentityMaterial as L, costFromLedgerSummary as M, assertRealAgentReceipts as Mt, optimizationTokenUsageFromSummary as N, assertRealBackend as Nt, composeGate as O, pairedDecisionShape as Ot, assertCodeSurfaceIdentity as P, summarizeAgentReceiptIntegrity as Pt, assertCampaignSplitIdentity as Q, renderSurfaceDiff as R, defaultProductionGate as S, dominates as St, heldoutSignificance as T, scalarScore as Tt, compareRankKeys as U, campaignBreakdown as V, DEFAULT_MUTATION_PRIMITIVES as W, tangleTracesRoot as X, resolveRunDir as Y, assertCampaignDesign as Z, buildEvidenceVector as _, canonicalJson as _t, emitLoopProvenance as a, createReferenceEquivalenceJudge as at, powerPreflight as b, inMemoryVerdictCache as bt, provenanceRecordPath as c, redTeamDataset as ct, runImprovementLoop as d, toolNamesForRun as dt, campaignSplitDigest as et, runOptimization as f, Dataset as ft, gepaOptimizationMethod as g, cachedJudge as gt, labelTrustRank as h, llmJudge as ht, canonicalDigest as i, REFERENCE_EQUIVALENCE_JUDGE_VERSION as it, compareOptimizationMethods as j, BackendIntegrityError as jt, externalTextOptimizationMethod as k, minimumPairsForPairedDeltaTest as kt, provenanceSpansPath as l, redTeamReport as lt, isProposedCandidate as m, hashScenarios as mt, buildLoopProvenanceRecord as n, openAutoPr as nt, loopProvenanceArgsFromResult as o, runReferenceEquivalenceJudge as ot, runEval as p, HoldoutLockedError as pt, planCampaignRun as q, campaignMeasurementDigest as r, REFERENCE_EQUIVALENCE_INPUT_LIMITS as rt, loopProvenanceSpans as s, DEFAULT_RED_TEAM_CORPUS as st, skillOptOptimizationMethod as t, campaignSplitDigestFromIdentities as tt, verifyLoopProvenanceRecord as u, scoreRedTeamOutput as ut, paretoPolicy as v, contentHash as vt, dimensionRegressions as w, paretoFrontierWithCrowding as wt, heldOutGate as x, crowdingDistance as xt, paretoSignificanceGate as y, fileVerdictCache as yt, surfaceContentHash as z };
7164
7267
 
7165
- //# sourceMappingURL=skillopt-optimization-method-DV6c4ooy.js.map
7268
+ //# sourceMappingURL=skillopt-optimization-method-Di8Xkalt.js.map