@tangle-network/agent-eval 0.122.1 → 0.122.2
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.
- package/CHANGELOG.md +6 -0
- package/dist/analyst/index.js +4 -4
- package/dist/benchmarks/index.js +6 -6
- package/dist/campaign/index.d.ts +19 -3
- package/dist/campaign/index.js +5 -5
- package/dist/{chunk-QWMPPZ3X.js → chunk-5BYTIDZ7.js} +2 -2
- package/dist/{chunk-S5TT5R3L.js → chunk-5CVUPHJ4.js} +2 -2
- package/dist/{chunk-3A246TSA.js → chunk-BD2OK6ZW.js} +2 -2
- package/dist/{chunk-TDHX3BVA.js → chunk-EXMKNOP5.js} +37 -29
- package/dist/{chunk-TDHX3BVA.js.map → chunk-EXMKNOP5.js.map} +1 -1
- package/dist/{chunk-XDIRG3TO.js → chunk-N3QPYIVG.js} +201 -103
- package/dist/chunk-N3QPYIVG.js.map +1 -0
- package/dist/{chunk-4I2E3LLO.js → chunk-NMN4WGSJ.js} +2 -2
- package/dist/{chunk-PICTDURQ.js → chunk-OZFTLMGS.js} +2 -2
- package/dist/{chunk-VZ6VKOJT.js → chunk-U4R2AGY5.js} +52 -10
- package/dist/{chunk-VZ6VKOJT.js.map → chunk-U4R2AGY5.js.map} +1 -1
- package/dist/{chunk-P62I523A.js → chunk-XKSDSGSC.js} +3 -3
- package/dist/{chunk-JHOJHHU7.js → chunk-ZMXDQ4K7.js} +8 -5
- package/dist/{chunk-JHOJHHU7.js.map → chunk-ZMXDQ4K7.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/contract/index.d.ts +15 -0
- package/dist/contract/index.js +6 -6
- package/dist/fuzz.js +1 -1
- package/dist/index.js +9 -9
- package/dist/openapi.json +1 -1
- package/dist/{run-campaign-HNFPJET4.js → run-campaign-2YJ3Z6JS.js} +3 -3
- package/dist/wire/index.js +2 -2
- package/docs/eval-surface-map.md +1 -1
- package/package.json +1 -1
- package/dist/chunk-XDIRG3TO.js.map +0 -1
- /package/dist/{chunk-QWMPPZ3X.js.map → chunk-5BYTIDZ7.js.map} +0 -0
- /package/dist/{chunk-S5TT5R3L.js.map → chunk-5CVUPHJ4.js.map} +0 -0
- /package/dist/{chunk-3A246TSA.js.map → chunk-BD2OK6ZW.js.map} +0 -0
- /package/dist/{chunk-4I2E3LLO.js.map → chunk-NMN4WGSJ.js.map} +0 -0
- /package/dist/{chunk-PICTDURQ.js.map → chunk-OZFTLMGS.js.map} +0 -0
- /package/dist/{chunk-P62I523A.js.map → chunk-XKSDSGSC.js.map} +0 -0
- /package/dist/{run-campaign-HNFPJET4.js.map → run-campaign-2YJ3Z6JS.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fsCampaignStorage,
|
|
3
3
|
runCampaign
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-N3QPYIVG.js";
|
|
5
5
|
import {
|
|
6
6
|
__export
|
|
7
7
|
} from "./chunk-PZ5AY32C.js";
|
|
@@ -763,4 +763,4 @@ export {
|
|
|
763
763
|
retrievalMetricsAtCutoff,
|
|
764
764
|
benchmarks_exports
|
|
765
765
|
};
|
|
766
|
-
//# sourceMappingURL=chunk-
|
|
766
|
+
//# sourceMappingURL=chunk-OZFTLMGS.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertCampaignSplitIdentity,
|
|
3
3
|
campaignCoverage,
|
|
4
|
+
campaignSplitDigest,
|
|
4
5
|
canonicalJson,
|
|
5
6
|
contentHash,
|
|
6
7
|
createRunCostLedger,
|
|
@@ -9,11 +10,11 @@ import {
|
|
|
9
10
|
resolveRunDir,
|
|
10
11
|
runCampaign,
|
|
11
12
|
summarizeAgentReceiptIntegrity
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-N3QPYIVG.js";
|
|
13
14
|
import {
|
|
14
15
|
clamp01,
|
|
15
16
|
validatePolicyEditCandidateRecord
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5CVUPHJ4.js";
|
|
17
18
|
import {
|
|
18
19
|
detectRewardHacking
|
|
19
20
|
} from "./chunk-ARU2PZFM.js";
|
|
@@ -30,7 +31,7 @@ import {
|
|
|
30
31
|
} from "./chunk-PJQFMIOX.js";
|
|
31
32
|
import {
|
|
32
33
|
CostLedger
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ZMXDQ4K7.js";
|
|
34
35
|
import {
|
|
35
36
|
DEFAULT_REDACTION_RULES
|
|
36
37
|
} from "./chunk-GGE4NNQT.js";
|
|
@@ -2661,23 +2662,32 @@ async function runOptimization(opts) {
|
|
|
2661
2662
|
"runOptimization: promoteTopK must be 1 because the loop has one global incumbent"
|
|
2662
2663
|
);
|
|
2663
2664
|
}
|
|
2664
|
-
const
|
|
2665
|
+
const requireJudgeScore = (opts.judges?.length ?? 0) > 0;
|
|
2666
|
+
const reps = opts.reps ?? 1;
|
|
2667
|
+
const premeasuredBaseline = opts.premeasuredBaseline;
|
|
2668
|
+
const baselineCampaign = premeasuredBaseline ? validatedPremeasuredBaseline({
|
|
2669
|
+
input: premeasuredBaseline,
|
|
2670
|
+
baselineSurface: opts.baselineSurface,
|
|
2671
|
+
scenarios: opts.scenarios,
|
|
2672
|
+
reps,
|
|
2673
|
+
seed: opts.seed ?? 42
|
|
2674
|
+
}) : await runCampaign({
|
|
2665
2675
|
...opts,
|
|
2666
2676
|
costLedger,
|
|
2667
2677
|
costPhase: "search.baseline",
|
|
2668
2678
|
dispatch: (scenario, ctx) => opts.dispatchWithSurface(opts.baselineSurface, scenario, ctx),
|
|
2669
2679
|
runDir: `${opts.runDir}/baseline`
|
|
2670
2680
|
});
|
|
2671
|
-
const requireJudgeScore = (opts.judges?.length ?? 0) > 0;
|
|
2672
2681
|
const baselineCoverage = campaignCoverage(
|
|
2673
2682
|
baselineCampaign.cells,
|
|
2674
2683
|
opts.scenarios,
|
|
2675
|
-
|
|
2684
|
+
reps,
|
|
2676
2685
|
requireJudgeScore
|
|
2677
2686
|
);
|
|
2678
2687
|
if (!baselineCoverage.complete) {
|
|
2688
|
+
const label = opts.premeasuredBaseline ? "premeasured baseline" : "baseline";
|
|
2679
2689
|
throw new Error(
|
|
2680
|
-
`runOptimization:
|
|
2690
|
+
`runOptimization: ${label} is incomplete (${baselineCoverage.scorableCellIds.length}/${baselineCoverage.expectedCellIds.length} designed cells scorable) \u2014 ${formatCoverageFailures(baselineCoverage)}. Refusing to optimize against an incomplete incumbent.`
|
|
2681
2691
|
);
|
|
2682
2692
|
}
|
|
2683
2693
|
const generations = [];
|
|
@@ -2701,7 +2711,7 @@ async function runOptimization(opts) {
|
|
|
2701
2711
|
if (opts.analyzeGeneration && opts.maxGenerations > 0 && baselineCampaign.cells.length > 0) {
|
|
2702
2712
|
const fresh = await opts.analyzeGeneration({
|
|
2703
2713
|
generation: -1,
|
|
2704
|
-
runDir:
|
|
2714
|
+
runDir: baselineCampaign.runDir,
|
|
2705
2715
|
candidates: [
|
|
2706
2716
|
{ surfaceHash: winnerSurfaceHash, campaign: baselineCampaign, composite: winnerComposite }
|
|
2707
2717
|
],
|
|
@@ -2852,6 +2862,38 @@ async function runOptimization(opts) {
|
|
|
2852
2862
|
cost: costLedger.summary()
|
|
2853
2863
|
};
|
|
2854
2864
|
}
|
|
2865
|
+
function validatedPremeasuredBaseline(args) {
|
|
2866
|
+
const { input } = args;
|
|
2867
|
+
if (input.surfaceHash !== surfaceHash(args.baselineSurface)) {
|
|
2868
|
+
throw new Error(
|
|
2869
|
+
"runOptimization: premeasured baseline surface hash does not match baselineSurface"
|
|
2870
|
+
);
|
|
2871
|
+
}
|
|
2872
|
+
const campaign = input.campaign;
|
|
2873
|
+
if (campaign.reps !== args.reps) {
|
|
2874
|
+
throw new Error(
|
|
2875
|
+
`runOptimization: premeasured baseline reps ${campaign.reps} do not match requested reps ${args.reps}`
|
|
2876
|
+
);
|
|
2877
|
+
}
|
|
2878
|
+
if (campaign.seed !== args.seed) {
|
|
2879
|
+
throw new Error(
|
|
2880
|
+
`runOptimization: premeasured baseline seed ${campaign.seed} does not match requested seed ${args.seed}`
|
|
2881
|
+
);
|
|
2882
|
+
}
|
|
2883
|
+
try {
|
|
2884
|
+
assertCampaignSplitIdentity(campaign.scenarios, campaign.reps, campaign.splitDigest);
|
|
2885
|
+
} catch (error) {
|
|
2886
|
+
throw new Error(
|
|
2887
|
+
`runOptimization: premeasured baseline has an invalid retained split identity \u2014 ${error instanceof Error ? error.message : String(error)}`
|
|
2888
|
+
);
|
|
2889
|
+
}
|
|
2890
|
+
if (campaign.splitDigest !== campaignSplitDigest(args.scenarios, args.reps)) {
|
|
2891
|
+
throw new Error(
|
|
2892
|
+
"runOptimization: premeasured baseline split does not match the requested scenarios"
|
|
2893
|
+
);
|
|
2894
|
+
}
|
|
2895
|
+
return campaign;
|
|
2896
|
+
}
|
|
2855
2897
|
function toParetoParent(surface, hash, campaign, generation, label, rationale) {
|
|
2856
2898
|
const objectives = {};
|
|
2857
2899
|
for (const { scenarioId, composite } of campaignBreakdown(campaign).scenarios) {
|
|
@@ -2946,7 +2988,7 @@ async function runImprovementLoop(opts) {
|
|
|
2946
2988
|
const dispatchTimeoutMs = opts.dispatchTimeoutMs ?? DEFAULT_DISPATCH_TIMEOUT_MS;
|
|
2947
2989
|
const optimization = await runOptimization({ ...opts, dispatchTimeoutMs, costLedger });
|
|
2948
2990
|
const winnerIsBaseline = optimization.winnerSurfaceHash === surfaceHash(opts.baselineSurface);
|
|
2949
|
-
const { runCampaign: runCampaign2 } = await import("./run-campaign-
|
|
2991
|
+
const { runCampaign: runCampaign2 } = await import("./run-campaign-2YJ3Z6JS.js");
|
|
2950
2992
|
const baselineOnHoldout = await runCampaign2({
|
|
2951
2993
|
...opts,
|
|
2952
2994
|
costLedger,
|
|
@@ -3738,4 +3780,4 @@ export {
|
|
|
3738
3780
|
provenanceSpansPath,
|
|
3739
3781
|
emitLoopProvenance
|
|
3740
3782
|
};
|
|
3741
|
-
//# sourceMappingURL=chunk-
|
|
3783
|
+
//# sourceMappingURL=chunk-U4R2AGY5.js.map
|