@tangle-network/agent-eval 0.106.3 → 0.107.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  recoverTruncatedJson
3
- } from "./chunk-3E5KUXYZ.js";
3
+ } from "./chunk-G4DLZAV5.js";
4
4
  import {
5
5
  clamp01
6
6
  } from "./chunk-LOJ2QVCE.js";
@@ -858,4 +858,4 @@ export {
858
858
  agentProfileModelId,
859
859
  agentProfileHash
860
860
  };
861
- //# sourceMappingURL=chunk-2HLM4SJJ.js.map
861
+ //# sourceMappingURL=chunk-6PF6LXRY.js.map
@@ -1619,6 +1619,24 @@ async function runImprovementLoop(opts) {
1619
1619
  baselineArtifacts.set(cell.cellId, cell.artifact);
1620
1620
  baselineJudgeScores.set(cell.cellId, cell.judgeScores);
1621
1621
  }
1622
+ let neutralizedArtifacts;
1623
+ let neutralizedJudgeScores;
1624
+ if (opts.neutralize && !winnerIsBaseline) {
1625
+ const neutralizedSurface = opts.neutralize(optimization.winnerSurface, opts.baselineSurface);
1626
+ const neutralizedOnHoldout = await runCampaign2({
1627
+ ...opts,
1628
+ dispatchTimeoutMs,
1629
+ scenarios: opts.holdoutScenarios,
1630
+ dispatch: (scenario, ctx) => opts.dispatchWithSurface(neutralizedSurface, scenario, ctx),
1631
+ runDir: `${opts.runDir}/holdout-neutralized`
1632
+ });
1633
+ neutralizedArtifacts = /* @__PURE__ */ new Map();
1634
+ neutralizedJudgeScores = /* @__PURE__ */ new Map();
1635
+ for (const cell of neutralizedOnHoldout.cells) {
1636
+ neutralizedArtifacts.set(cell.cellId, cell.artifact);
1637
+ neutralizedJudgeScores.set(cell.cellId, cell.judgeScores);
1638
+ }
1639
+ }
1622
1640
  const gateResult = winnerIsBaseline ? {
1623
1641
  decision: "hold",
1624
1642
  reasons: [
@@ -1633,6 +1651,8 @@ async function runImprovementLoop(opts) {
1633
1651
  baselineArtifacts,
1634
1652
  judgeScores,
1635
1653
  baselineJudgeScores,
1654
+ neutralizedArtifacts,
1655
+ neutralizedJudgeScores,
1636
1656
  scenarios: opts.holdoutScenarios,
1637
1657
  cost: {
1638
1658
  candidate: winnerOnHoldout.aggregates.totalCostUsd,
@@ -2157,4 +2177,4 @@ export {
2157
2177
  provenanceSpansPath,
2158
2178
  emitLoopProvenance
2159
2179
  };
2160
- //# sourceMappingURL=chunk-3E5KUXYZ.js.map
2180
+ //# sourceMappingURL=chunk-G4DLZAV5.js.map