@tangle-network/agent-eval 0.218.1 → 0.220.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.
- package/CHANGELOG.md +25 -0
- package/dist/adapters/http.d.ts +3 -3
- package/dist/adapters/http.d.ts.map +1 -1
- package/dist/adapters/http.js +1 -0
- package/dist/adapters/http.js.map +1 -1
- package/dist/{agent-profile-DTt8uGP9.d.ts → agent-profile-D01Io2Xw.d.ts} +4 -4
- package/dist/{agent-profile-DTt8uGP9.d.ts.map → agent-profile-D01Io2Xw.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +13 -13
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +8 -8
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-DjlZOVXx.d.ts → analyze-runs-BWAHBDAw.d.ts} +4 -4
- package/dist/{analyze-runs-DjlZOVXx.d.ts.map → analyze-runs-BWAHBDAw.d.ts.map} +1 -1
- package/dist/{benchmark-command-BupdHRyf.js → benchmark-command-BzmMTnvC.js} +10 -10
- package/dist/{benchmark-command-BupdHRyf.js.map → benchmark-command-BzmMTnvC.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +5 -5
- package/dist/benchmarks/index.js +3 -3
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/campaign/index.d.ts +8 -8
- package/dist/campaign/index.js +8 -8
- package/dist/{campaign-CGvUTnmc.js → campaign-BVPC6ODQ.js} +149 -10
- package/dist/campaign-BVPC6ODQ.js.map +1 -0
- package/dist/campaign-evidence-DunzcJGv.js.map +1 -1
- package/dist/{chat-client-B2pXlPdx.js → chat-client-CMQ8_h4J.js} +2 -2
- package/dist/{chat-client-B2pXlPdx.js.map → chat-client-CMQ8_h4J.js.map} +1 -1
- package/dist/{chat-json-call-Dm9c-b41.js → chat-json-call-BrZKn0L3.js} +2 -2
- package/dist/{chat-json-call-Dm9c-b41.js.map → chat-json-call-BrZKn0L3.js.map} +1 -1
- package/dist/cli.js +8 -8
- package/dist/{completion-verifier-DbLVf3i8.js → completion-verifier-Cigap8CG.js} +4 -4
- package/dist/{completion-verifier-DbLVf3i8.js.map → completion-verifier-Cigap8CG.js.map} +1 -1
- package/dist/contract/index.d.ts +11 -11
- package/dist/contract/index.js +7 -7
- package/dist/{cost-ledger-D0352Z4d.js → cost-ledger-BGZB6yY2.js} +75 -2
- package/dist/cost-ledger-BGZB6yY2.js.map +1 -0
- package/dist/{cost-ledger-Jk62OBfF.d.ts → cost-ledger-C1W3ICmP.d.ts} +26 -2
- package/dist/cost-ledger-C1W3ICmP.d.ts.map +1 -0
- package/dist/{default-registry-BJ-Pq6yL.js → default-registry-BrKmT01n.js} +3 -3
- package/dist/{default-registry-BJ-Pq6yL.js.map → default-registry-BrKmT01n.js.map} +1 -1
- package/dist/{default-registry-DXgLmoDI.d.ts → default-registry-Cwg_QN3d.d.ts} +6 -6
- package/dist/{default-registry-DXgLmoDI.d.ts.map → default-registry-Cwg_QN3d.d.ts.map} +1 -1
- package/dist/{define-agent-eval-BlH10zEw.d.ts → define-agent-eval-C2nFhHPu.d.ts} +8 -8
- package/dist/{define-agent-eval-BlH10zEw.d.ts.map → define-agent-eval-C2nFhHPu.d.ts.map} +1 -1
- package/dist/{define-agent-eval-BGdFKlrc.js → define-agent-eval-UQY3VbJ2.js} +4 -4
- package/dist/{define-agent-eval-BGdFKlrc.js.map → define-agent-eval-UQY3VbJ2.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/{dspy-rlm-engine-CSMwudLO.js → dspy-rlm-engine-Bn_Mt_LW.js} +3 -3
- package/dist/{dspy-rlm-engine-CSMwudLO.js.map → dspy-rlm-engine-Bn_Mt_LW.js.map} +1 -1
- package/dist/{engine-BvZ0R-36.d.ts → engine-BpGGw6cd.d.ts} +3 -3
- package/dist/{engine-BvZ0R-36.d.ts.map → engine-BpGGw6cd.d.ts.map} +1 -1
- package/dist/{evaluation-BOZ38vOH.d.ts → evaluation-CBdQt_kr.d.ts} +4 -4
- package/dist/{evaluation-BOZ38vOH.d.ts.map → evaluation-CBdQt_kr.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/evaluation.js +1 -1
- package/dist/{exact-types-CflbJ9f3.d.ts → exact-types-BYFmYq44.d.ts} +2 -2
- package/dist/{exact-types-CflbJ9f3.d.ts.map → exact-types-BYFmYq44.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +24 -1
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js.map +1 -1
- package/dist/{external-optimizer-process-C3Wm7Vhn.js → external-optimizer-process-wOLfzsCC.js} +2 -2
- package/dist/{external-optimizer-process-C3Wm7Vhn.js.map → external-optimizer-process-wOLfzsCC.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-B5gdLRZv.js → external-optimizer-subprocess-D670Oxf2.js} +3 -3
- package/dist/{external-optimizer-subprocess-B5gdLRZv.js.map → external-optimizer-subprocess-D670Oxf2.js.map} +1 -1
- package/dist/{feedback-trajectory-BWmhRBGu.d.ts → feedback-trajectory-DhB9WzYg.d.ts} +3 -3
- package/dist/{feedback-trajectory-BWmhRBGu.d.ts.map → feedback-trajectory-DhB9WzYg.d.ts.map} +1 -1
- package/dist/{findings-store-BtTzPL0d.js → findings-store-CvNo712L.js} +5 -5
- package/dist/{findings-store-BtTzPL0d.js.map → findings-store-CvNo712L.js.map} +1 -1
- package/dist/fuzz.d.ts +1 -1
- package/dist/fuzz.js +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/{index-CX-GAUpw.d.ts → index-CHxwfW5g.d.ts} +2 -2
- package/dist/{index-CX-GAUpw.d.ts.map → index-CHxwfW5g.d.ts.map} +1 -1
- package/dist/{index-BLGqZ81N.d.ts → index-CVFStrQD.d.ts} +8 -8
- package/dist/{index-BLGqZ81N.d.ts.map → index-CVFStrQD.d.ts.map} +1 -1
- package/dist/{index-CiRwLv2R.d.ts → index-D7fmC-1K.d.ts} +3 -4
- package/dist/index-D7fmC-1K.d.ts.map +1 -0
- package/dist/{index-DbMOXYnP.d.ts → index-DAXfpVf7.d.ts} +10 -10
- package/dist/{index-DbMOXYnP.d.ts.map → index-DAXfpVf7.d.ts.map} +1 -1
- package/dist/{index-B16FNdW5.d.ts → index-Q6DvdcwI.d.ts} +37 -11
- package/dist/index-Q6DvdcwI.d.ts.map +1 -0
- package/dist/index.d.ts +26 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/{integrity-_qgZLA5p.d.ts → integrity-CCwvezWS.d.ts} +2 -2
- package/dist/{integrity-_qgZLA5p.d.ts.map → integrity-CCwvezWS.d.ts.map} +1 -1
- package/dist/judge-gate-Co5tuh57.js.map +1 -1
- package/dist/{judge-gate-DsL0yFcb.d.ts → judge-gate-Dc_mXQsL.d.ts} +2 -2
- package/dist/judge-gate-Dc_mXQsL.d.ts.map +1 -0
- package/dist/{kind-factory-Gy4fXixd.js → kind-factory-BhxbtUsQ.js} +2 -2
- package/dist/{kind-factory-Gy4fXixd.js.map → kind-factory-BhxbtUsQ.js.map} +1 -1
- package/dist/{llm-client-_Y6ic-tf.js → llm-client-DXuOTseU.js} +2 -2
- package/dist/{llm-client-_Y6ic-tf.js.map → llm-client-DXuOTseU.js.map} +1 -1
- package/dist/{llm-judge-Djxh-Uhs.js → llm-judge-Cc8vDJh_.js} +9 -8
- package/dist/llm-judge-Cc8vDJh_.js.map +1 -0
- package/dist/matrix/index.d.ts +2 -2
- package/dist/{matrix-CCSBna4q.d.ts → matrix-Cf-AGxGh.d.ts} +4 -4
- package/dist/{matrix-CCSBna4q.d.ts.map → matrix-Cf-AGxGh.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +2 -2
- package/dist/{mint-BRZXuwRi.d.ts → mint-CkzpVPdz.d.ts} +3 -3
- package/dist/{mint-BRZXuwRi.d.ts.map → mint-CkzpVPdz.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/multishot/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{pareto-CTv8vozZ.js → pareto-BiBnQXAE.js} +304 -210
- package/dist/pareto-BiBnQXAE.js.map +1 -0
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{prime-protocol-BWG2DQIk.d.ts → prime-protocol-CckHBxGu.d.ts} +3 -3
- package/dist/{prime-protocol-BWG2DQIk.d.ts.map → prime-protocol-CckHBxGu.d.ts.map} +1 -1
- package/dist/{promotion-gate-CxEHRsZW.d.ts → promotion-gate-CkVZHagC.d.ts} +3 -3
- package/dist/{promotion-gate-CxEHRsZW.d.ts.map → promotion-gate-CkVZHagC.d.ts.map} +1 -1
- package/dist/{proposal-findings-n-5WBbEx.js → proposal-findings-E1aSC_cU.js} +2 -2
- package/dist/{proposal-findings-n-5WBbEx.js.map → proposal-findings-E1aSC_cU.js.map} +1 -1
- package/dist/{registry-ssNoHzwD.d.ts → registry-B_yG-1jh.d.ts} +5 -5
- package/dist/{registry-ssNoHzwD.d.ts.map → registry-B_yG-1jh.d.ts.map} +1 -1
- package/dist/render-Cs34y0iX.js.map +1 -1
- package/dist/reporting.d.ts +3 -3
- package/dist/{researcher-GU1tV4dn.d.ts → researcher-H0p44OYC.d.ts} +5 -5
- package/dist/{researcher-GU1tV4dn.d.ts.map → researcher-H0p44OYC.d.ts.map} +1 -1
- package/dist/{reward-DrZ71vnf.d.ts → reward-BeUgVVC_.d.ts} +2 -2
- package/dist/{reward-DrZ71vnf.d.ts.map → reward-BeUgVVC_.d.ts.map} +1 -1
- package/dist/{reward-hacking-E52wq86n.d.ts → reward-hacking-WTxUbtbb.d.ts} +2 -2
- package/dist/{reward-hacking-E52wq86n.d.ts.map → reward-hacking-WTxUbtbb.d.ts.map} +1 -1
- package/dist/rl.d.ts +9 -8
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +35 -1
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +3 -3
- package/dist/rollout-Dd1ucT_M.js.map +1 -1
- package/dist/{rubric-predictive-validity-DiwT8PbL.d.ts → rubric-predictive-validity-noY7uE03.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-DiwT8PbL.d.ts.map → rubric-predictive-validity-noY7uE03.d.ts.map} +1 -1
- package/dist/{run-record-CaxbLq6Y.d.ts → run-record-C3awiXPf.d.ts} +2 -2
- package/dist/{run-record-CaxbLq6Y.d.ts.map → run-record-C3awiXPf.d.ts.map} +1 -1
- package/dist/schema-CvhfLjtZ.js.map +1 -1
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.js +2 -2
- package/dist/{search-kernel-p9JB3SmL.d.ts → search-kernel-Dloxd6gs.d.ts} +4 -4
- package/dist/{search-kernel-p9JB3SmL.d.ts.map → search-kernel-Dloxd6gs.d.ts.map} +1 -1
- package/dist/{search-ledger-ClpN4I3e.js → search-ledger-CZRqtFbW.js} +249 -242
- package/dist/search-ledger-CZRqtFbW.js.map +1 -0
- package/dist/{search-shipper-Bg2HW3Uv.js → search-shipper-Dn3NLsuH.js} +2 -2
- package/dist/{search-shipper-Bg2HW3Uv.js.map → search-shipper-Dn3NLsuH.js.map} +1 -1
- package/dist/{search-summary-CrBuvVnf.js → search-summary-D4bwYnAE.js} +2 -2
- package/dist/{search-summary-CrBuvVnf.js.map → search-summary-D4bwYnAE.js.map} +1 -1
- package/dist/{server-C6M0qR8h.js → server-8TS8XCvg.js} +3 -3
- package/dist/{server-C6M0qR8h.js.map → server-8TS8XCvg.js.map} +1 -1
- package/dist/{skillopt-optimization-method-5dlex7MJ.js → skillopt-optimization-method-DLKqdhcR.js} +106 -61
- package/dist/skillopt-optimization-method-DLKqdhcR.js.map +1 -0
- package/dist/{statistical-heldout-BHfLZHrm.d.ts → statistical-heldout-3z3I-kJN.d.ts} +3 -3
- package/dist/{statistical-heldout-BHfLZHrm.d.ts.map → statistical-heldout-3z3I-kJN.d.ts.map} +1 -1
- package/dist/{store-otlp-BteDAbHK.js → store-otlp-dyWE3wAG.js} +2 -2
- package/dist/{store-otlp-BteDAbHK.js.map → store-otlp-dyWE3wAG.js.map} +1 -1
- package/dist/{store-tool-spans-D5l_OfTJ.js → store-tool-spans-DIUgZbzu.js} +3 -3
- package/dist/{store-tool-spans-D5l_OfTJ.js.map → store-tool-spans-DIUgZbzu.js.map} +1 -1
- package/dist/{store-tool-spans-DZS0HWVf.d.ts → store-tool-spans-DPwXHQkH.d.ts} +7 -7
- package/dist/{store-tool-spans-DZS0HWVf.d.ts.map → store-tool-spans-DPwXHQkH.d.ts.map} +1 -1
- package/dist/{summary-report-CkbRcSuu.d.ts → summary-report-C8V49Jt3.d.ts} +3 -3
- package/dist/{summary-report-CkbRcSuu.d.ts.map → summary-report-C8V49Jt3.d.ts.map} +1 -1
- package/dist/{systemone-BMzDJb1i.d.ts → systemone-DVA7t76V.d.ts} +6 -6
- package/dist/{systemone-BMzDJb1i.d.ts.map → systemone-DVA7t76V.d.ts.map} +1 -1
- package/dist/{systemone-review-CwE6JGIp.d.ts → systemone-review-CUBMuTLi.d.ts} +2 -2
- package/dist/{systemone-review-CwE6JGIp.d.ts.map → systemone-review-CUBMuTLi.d.ts.map} +1 -1
- package/dist/systemone.d.ts +3 -3
- package/dist/{tool-groups-DyNz2JZ_.d.ts → tool-groups-LISbBWCg.d.ts} +3 -3
- package/dist/tool-groups-LISbBWCg.d.ts.map +1 -0
- package/dist/{trace-questions-xxwgsuMi.d.ts → trace-questions-C42fYEE4.d.ts} +4 -4
- package/dist/{trace-questions-xxwgsuMi.d.ts.map → trace-questions-C42fYEE4.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +3 -3
- package/dist/traces.d.ts +6 -6
- package/dist/traces.js +3 -3
- package/dist/trajectory-replay/index.js +24 -3
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/{tree-B5e1uAeL.js → tree-DSqwJpL9.js} +3 -3
- package/dist/{tree-B5e1uAeL.js.map → tree-DSqwJpL9.js.map} +1 -1
- package/dist/{types-CW8ewATZ.d.ts → types-8yQzNm8u.d.ts} +4 -4
- package/dist/{types-CW8ewATZ.d.ts.map → types-8yQzNm8u.d.ts.map} +1 -1
- package/dist/{types-DtkO1G9L.d.ts → types-CHfn1zg5.d.ts} +69 -71
- package/dist/types-CHfn1zg5.d.ts.map +1 -0
- package/dist/{types-BKCzzmit.d.ts → types-D8GXK9Z5.d.ts} +3 -3
- package/dist/{types-BKCzzmit.d.ts.map → types-D8GXK9Z5.d.ts.map} +1 -1
- package/dist/{types-D-mgRzlh.d.ts → types-eMhdacVp.d.ts} +2 -2
- package/dist/{types-D-mgRzlh.d.ts.map → types-eMhdacVp.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/campaign-proposers.md +16 -0
- package/docs/concepts.md +31 -0
- package/docs/public-api.md +76 -75
- package/package.json +2 -5
- package/dist/campaign-CGvUTnmc.js.map +0 -1
- package/dist/cost-ledger-D0352Z4d.js.map +0 -1
- package/dist/cost-ledger-Jk62OBfF.d.ts.map +0 -1
- package/dist/index-B16FNdW5.d.ts.map +0 -1
- package/dist/index-CiRwLv2R.d.ts.map +0 -1
- package/dist/judge-gate-DsL0yFcb.d.ts.map +0 -1
- package/dist/llm-judge-Djxh-Uhs.js.map +0 -1
- package/dist/pareto-CTv8vozZ.js.map +0 -1
- package/dist/search-ledger-ClpN4I3e.js.map +0 -1
- package/dist/skillopt-optimization-method-5dlex7MJ.js.map +0 -1
- package/dist/tool-groups-DyNz2JZ_.d.ts.map +0 -1
- package/dist/types-DtkO1G9L.d.ts.map +0 -1
package/dist/{skillopt-optimization-method-5dlex7MJ.js → skillopt-optimization-method-DLKqdhcR.js}
RENAMED
|
@@ -3,17 +3,17 @@ import { t as mean$1 } from "./mean-BbA_JCzW.js";
|
|
|
3
3
|
import { t as decidePairedPromotion } from "./paired-promotion-decision-D0SHb-ZL.js";
|
|
4
4
|
import { a as heldoutSignificance, o as pairHoldout } from "./statistical-heldout-Bksv92Th.js";
|
|
5
5
|
import { n as contentHash, t as canonicalJson } from "./verdict-cache-CL_7tePD.js";
|
|
6
|
-
import { E as assertSearchHistoryAdmissionOptions, J as evaluationUnitMap, K as assertIndependentEvaluationSplit, Q as runCampaign, S as developmentClaim, T as surfaceNode, X as reserveFinalEvidence, Y as exposeFinalEvidence, c as assertGepaCandidatePopulationSummary, d as costFromLedgerSummary, et as resolveRunDir, f as optimizationTokenUsageFromSummary, l as readGepaCandidatePopulationArtifact, q as captureFinalEvidencePolicy, s as executeOptimizationMethod, u as combineComparisonCosts, w as surfaceDiff, x as SearchRecorder, z as captureJudge } from "./llm-judge-
|
|
6
|
+
import { E as assertSearchHistoryAdmissionOptions, J as evaluationUnitMap, K as assertIndependentEvaluationSplit, Q as runCampaign, S as developmentClaim, T as surfaceNode, X as reserveFinalEvidence, Y as exposeFinalEvidence, c as assertGepaCandidatePopulationSummary, d as costFromLedgerSummary, et as resolveRunDir, f as optimizationTokenUsageFromSummary, l as readGepaCandidatePopulationArtifact, q as captureFinalEvidencePolicy, s as executeOptimizationMethod, u as combineComparisonCosts, w as surfaceDiff, x as SearchRecorder, z as captureJudge } from "./llm-judge-Cc8vDJh_.js";
|
|
7
7
|
import { D as surfaceContentHash, I as assertCompleteCampaign, P as assertCampaignDesign, f as campaignBreakdown, t as createCampaignEvidenceReceipt } from "./campaign-evidence-DunzcJGv.js";
|
|
8
8
|
import { a as mapConcurrent } from "./journal-C7om8Gum.js";
|
|
9
9
|
import { t as deepFreezeCanonicalJson } from "./deep-freeze-CurcOQg3.js";
|
|
10
|
-
import { M as fsCampaignStorage, _ as resolveExternalOptimizerCallbackLimits, d as assertExternalOptimizerModelBudget, f as assertJsonValue, g as removeCredentialEnvironment, h as isExternalTextCandidate, i as startExternalOptimizerModelProxy, j as createRunCostLedger, m as isCandidateText, n as closeExternalOptimizerResources, p as assertNoCredentialValues, r as runWithCleanup, t as runExternalOptimizerProcess, v as resolveExternalOptimizerProcessLimits, y as safePathComponent } from "./external-optimizer-subprocess-
|
|
10
|
+
import { M as fsCampaignStorage, _ as resolveExternalOptimizerCallbackLimits, d as assertExternalOptimizerModelBudget, f as assertJsonValue, g as removeCredentialEnvironment, h as isExternalTextCandidate, i as startExternalOptimizerModelProxy, j as createRunCostLedger, m as isCandidateText, n as closeExternalOptimizerResources, p as assertNoCredentialValues, r as runWithCleanup, t as runExternalOptimizerProcess, v as resolveExternalOptimizerProcessLimits, y as safePathComponent } from "./external-optimizer-subprocess-D670Oxf2.js";
|
|
11
11
|
import { r as summarizeEvaluationUnits, t as defineEvaluationClaim } from "./claim-BPVuyHuy.js";
|
|
12
|
-
import { n as openSearchLedger } from "./search-ledger-
|
|
12
|
+
import { n as openSearchLedger } from "./search-ledger-CZRqtFbW.js";
|
|
13
13
|
import { t as acquireSingleRunLock } from "./single-run-lock-Dekd8_Wv.js";
|
|
14
14
|
import { n as isRecord } from "./json-BhdsJaOQ.js";
|
|
15
|
-
import { _ as combineAbortSignals, d as assertServedModelPolicy } from "./llm-client-
|
|
16
|
-
import { t as startExternalOptimizerCallback } from "./external-optimizer-process-
|
|
15
|
+
import { _ as combineAbortSignals, d as assertServedModelPolicy } from "./llm-client-DXuOTseU.js";
|
|
16
|
+
import { t as startExternalOptimizerCallback } from "./external-optimizer-process-wOLfzsCC.js";
|
|
17
17
|
import { createHash, randomBytes } from "node:crypto";
|
|
18
18
|
import { mkdir } from "node:fs/promises";
|
|
19
19
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -368,6 +368,7 @@ async function scoreOneScenario(args) {
|
|
|
368
368
|
info: {
|
|
369
369
|
scenarioId: row.scenarioId,
|
|
370
370
|
dimensions: breakdown.dimensions,
|
|
371
|
+
scores: { ...breakdown.dimensions },
|
|
371
372
|
status: "scored",
|
|
372
373
|
...row.notes ? { notes: row.notes } : {},
|
|
373
374
|
...artifact !== void 0 ? { artifact } : {}
|
|
@@ -1841,6 +1842,70 @@ function optimizerAccounting(tokenUsage, proposerCostUsd) {
|
|
|
1841
1842
|
}
|
|
1842
1843
|
};
|
|
1843
1844
|
}
|
|
1845
|
+
/** What the GEPA run key is hashed over; fields added later join only when enabled so earlier run keys keep their identity. */
|
|
1846
|
+
function gepaRunMaterial(config, input, parts) {
|
|
1847
|
+
const { name, runtimeIdentity, bridgeRunner, seedCandidate, trainSet, selectionSet, maxCandidateChars, maxPopulationCandidates, maxEvidenceChars } = parts;
|
|
1848
|
+
return {
|
|
1849
|
+
optimizer: "gepa",
|
|
1850
|
+
runtime: runtimeIdentity,
|
|
1851
|
+
method: name,
|
|
1852
|
+
evaluationId: config.evaluationId,
|
|
1853
|
+
dispatchRef: input.runOptions.dispatchRef ?? null,
|
|
1854
|
+
seed: input.seed,
|
|
1855
|
+
recipe: snapshotJson(config.recipe, "GEPA run settings"),
|
|
1856
|
+
engineModules: config.engineModules ?? [],
|
|
1857
|
+
objective: config.objective,
|
|
1858
|
+
background: config.background ?? "",
|
|
1859
|
+
seedCandidate,
|
|
1860
|
+
trainSet,
|
|
1861
|
+
selectionSet,
|
|
1862
|
+
maxCandidateChars,
|
|
1863
|
+
maxPopulationCandidates,
|
|
1864
|
+
maxEvidenceChars,
|
|
1865
|
+
evaluationCallbackLimits: resolveExternalOptimizerCallbackLimits(config.evaluationCallbackLimits),
|
|
1866
|
+
optimizerModel: config.optimizer ? {
|
|
1867
|
+
model: config.optimizer.model,
|
|
1868
|
+
callRef: config.optimizer.callRef,
|
|
1869
|
+
budget: config.optimizer.budget,
|
|
1870
|
+
...config.optimizer.anthropicEndpoint === true ? { anthropicEndpoint: true } : {}
|
|
1871
|
+
} : null,
|
|
1872
|
+
runner: externalOptimizerRunnerIdentity(bridgeRunner, "agent_eval_rpc.gepa_bridge"),
|
|
1873
|
+
trustResumeState: config.trustResumeState === true
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1876
|
+
/** Starts the callback server the GEPA bridge calls back into: evaluations are counted against the run budget and observed into the log. */
|
|
1877
|
+
async function startGepaCallback(config, input, parts) {
|
|
1878
|
+
const { runDir, runId, runBudget, observationLog, evaluationLimit, maxCandidateChars, maxEvidenceChars } = parts;
|
|
1879
|
+
const signal = input.runOptions.signal;
|
|
1880
|
+
const scenarioById = mapExternalScenarios(input.trainScenarios, input.selectionScenarios, "GEPA bridge");
|
|
1881
|
+
const evaluate = createExternalTextEvaluator({
|
|
1882
|
+
input,
|
|
1883
|
+
label: "GEPA bridge",
|
|
1884
|
+
runDir,
|
|
1885
|
+
compatibleRunId: runId,
|
|
1886
|
+
costPhase: "gepa.external-evaluation",
|
|
1887
|
+
costTags: runBudget.attemptTags,
|
|
1888
|
+
costLedger: input.costLedger,
|
|
1889
|
+
scenarioById,
|
|
1890
|
+
maxCandidateChars,
|
|
1891
|
+
maxEvidenceChars,
|
|
1892
|
+
describeArtifact: config.describeArtifact
|
|
1893
|
+
});
|
|
1894
|
+
let attemptEvaluationCount = 0;
|
|
1895
|
+
return startExternalOptimizerCallback({
|
|
1896
|
+
token: randomBytes(32).toString("hex"),
|
|
1897
|
+
maxEvaluations: evaluationLimit,
|
|
1898
|
+
acceptEvaluation: () => {
|
|
1899
|
+
if (runBudget.acceptEvaluation() === void 0) return void 0;
|
|
1900
|
+
attemptEvaluationCount += 1;
|
|
1901
|
+
return attemptEvaluationCount;
|
|
1902
|
+
},
|
|
1903
|
+
evaluate,
|
|
1904
|
+
observe: observationLog.observe,
|
|
1905
|
+
...config.evaluationCallbackLimits ? { limits: config.evaluationCallbackLimits } : {},
|
|
1906
|
+
...signal ? { signal } : {}
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1844
1909
|
/** The settled inputs of one GEPA run: its identity, budgets, evaluation callback and logs. */
|
|
1845
1910
|
async function prepareGepaRun(config, input, name) {
|
|
1846
1911
|
const signal = input.runOptions.signal;
|
|
@@ -1877,33 +1942,17 @@ async function prepareGepaRun(config, input, name) {
|
|
|
1877
1942
|
const evaluationLimit = gepaRecipeEvaluationLimit(config.recipe, input.selectionScenarios.length);
|
|
1878
1943
|
const maxPopulationCandidates = Math.min(Number.MAX_SAFE_INTEGER, evaluationLimit + 1);
|
|
1879
1944
|
const populationScenarioIds = (selectionSet.length > 0 ? selectionSet : trainSet).map((scenario) => scenario.id);
|
|
1880
|
-
const runMaterial = {
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
evaluationId: config.evaluationId,
|
|
1885
|
-
dispatchRef: input.runOptions.dispatchRef ?? null,
|
|
1886
|
-
seed: input.seed,
|
|
1887
|
-
recipe: snapshotJson(config.recipe, "GEPA run settings"),
|
|
1888
|
-
engineModules: config.engineModules ?? [],
|
|
1889
|
-
objective: config.objective,
|
|
1890
|
-
background: config.background ?? "",
|
|
1945
|
+
const runMaterial = gepaRunMaterial(config, input, {
|
|
1946
|
+
name,
|
|
1947
|
+
runtimeIdentity,
|
|
1948
|
+
bridgeRunner,
|
|
1891
1949
|
seedCandidate,
|
|
1892
1950
|
trainSet,
|
|
1893
1951
|
selectionSet,
|
|
1894
1952
|
maxCandidateChars,
|
|
1895
1953
|
maxPopulationCandidates,
|
|
1896
|
-
maxEvidenceChars
|
|
1897
|
-
|
|
1898
|
-
optimizerModel: config.optimizer ? {
|
|
1899
|
-
model: config.optimizer.model,
|
|
1900
|
-
callRef: config.optimizer.callRef,
|
|
1901
|
-
budget: config.optimizer.budget,
|
|
1902
|
-
...config.optimizer.anthropicEndpoint === true ? { anthropicEndpoint: true } : {}
|
|
1903
|
-
} : null,
|
|
1904
|
-
runner: externalOptimizerRunnerIdentity(bridgeRunner, "agent_eval_rpc.gepa_bridge"),
|
|
1905
|
-
trustResumeState: config.trustResumeState === true
|
|
1906
|
-
};
|
|
1954
|
+
maxEvidenceChars
|
|
1955
|
+
});
|
|
1907
1956
|
const compatibleRunId = externalOptimizerCompatibleRunKey(runMaterial);
|
|
1908
1957
|
const runId = externalOptimizerRunKey({
|
|
1909
1958
|
material: runMaterial,
|
|
@@ -1921,25 +1970,6 @@ async function prepareGepaRun(config, input, name) {
|
|
|
1921
1970
|
storage,
|
|
1922
1971
|
path: `${runDir}/observations-${attemptId}.jsonl`
|
|
1923
1972
|
});
|
|
1924
|
-
const executionLog = config.optimizer ? openExternalOptimizerExecutionLog({
|
|
1925
|
-
storage,
|
|
1926
|
-
path: `${runDir}/model-executions-${attemptId}.jsonl`
|
|
1927
|
-
}) : void 0;
|
|
1928
|
-
const scenarioById = mapExternalScenarios(input.trainScenarios, input.selectionScenarios, "GEPA bridge");
|
|
1929
|
-
const evaluate = createExternalTextEvaluator({
|
|
1930
|
-
input,
|
|
1931
|
-
label: "GEPA bridge",
|
|
1932
|
-
runDir,
|
|
1933
|
-
compatibleRunId: runId,
|
|
1934
|
-
costPhase: "gepa.external-evaluation",
|
|
1935
|
-
costTags: runBudget.attemptTags,
|
|
1936
|
-
costLedger,
|
|
1937
|
-
scenarioById,
|
|
1938
|
-
maxCandidateChars,
|
|
1939
|
-
maxEvidenceChars,
|
|
1940
|
-
describeArtifact: config.describeArtifact
|
|
1941
|
-
});
|
|
1942
|
-
let attemptEvaluationCount = 0;
|
|
1943
1973
|
return {
|
|
1944
1974
|
signal,
|
|
1945
1975
|
expectsComponents,
|
|
@@ -1964,19 +1994,18 @@ async function prepareGepaRun(config, input, name) {
|
|
|
1964
1994
|
runId,
|
|
1965
1995
|
runBudget,
|
|
1966
1996
|
observationLog,
|
|
1967
|
-
executionLog
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
...signal ? { signal } : {}
|
|
1997
|
+
executionLog: config.optimizer ? openExternalOptimizerExecutionLog({
|
|
1998
|
+
storage,
|
|
1999
|
+
path: `${runDir}/model-executions-${attemptId}.jsonl`
|
|
2000
|
+
}) : void 0,
|
|
2001
|
+
callback: await startGepaCallback(config, input, {
|
|
2002
|
+
runDir,
|
|
2003
|
+
runId,
|
|
2004
|
+
runBudget,
|
|
2005
|
+
observationLog,
|
|
2006
|
+
evaluationLimit,
|
|
2007
|
+
maxCandidateChars,
|
|
2008
|
+
maxEvidenceChars
|
|
1980
2009
|
}),
|
|
1981
2010
|
name,
|
|
1982
2011
|
config,
|
|
@@ -2267,7 +2296,8 @@ function gepaOptimizationMethod(config) {
|
|
|
2267
2296
|
//#endregion
|
|
2268
2297
|
//#region src/campaign/presets/comparison-controls.ts
|
|
2269
2298
|
/** Admission checks for the shared controls of a method comparison. */
|
|
2270
|
-
|
|
2299
|
+
/** The caller-supplied judges, dispatch function and references, and the baseline surface. */
|
|
2300
|
+
function assertCallerInputs(opts) {
|
|
2271
2301
|
if (opts.optimizationRunOptions && "costCeiling" in opts.optimizationRunOptions) throw new Error("compareOptimizationMethods: optimizationRunOptions.costCeiling is not supported; costCeiling covers optimization and final scoring");
|
|
2272
2302
|
if (!opts.judges || opts.judges.length === 0) throw new Error("compareOptimizationMethods: at least one judge is required");
|
|
2273
2303
|
if (typeof opts.dispatchWithSurface !== "function") throw new Error("compareOptimizationMethods: dispatchWithSurface must be a function");
|
|
@@ -2280,6 +2310,9 @@ function assertComparisonControls(opts, seed, resamples, confidence) {
|
|
|
2280
2310
|
} catch (cause) {
|
|
2281
2311
|
throw new Error("compareOptimizationMethods: baselineSurface is invalid", { cause });
|
|
2282
2312
|
}
|
|
2313
|
+
}
|
|
2314
|
+
/** Every judge has a unique trimmed name, a score function and uniquely keyed dimensions. */
|
|
2315
|
+
function assertJudges(opts) {
|
|
2283
2316
|
const judgeNames = /* @__PURE__ */ new Set();
|
|
2284
2317
|
for (const judge of opts.judges) {
|
|
2285
2318
|
if (!judge || typeof judge !== "object" || typeof judge.name !== "string" || judge.name.trim().length === 0 || judge.name.trim() !== judge.name || typeof judge.score !== "function" || !Array.isArray(judge.dimensions) || judge.dimensions.length === 0) throw new Error("compareOptimizationMethods: every judge needs a trimmed name, at least one dimension, and score(input)");
|
|
@@ -2292,18 +2325,30 @@ function assertComparisonControls(opts, seed, resamples, confidence) {
|
|
|
2292
2325
|
dimensionKeys.add(dimension.key);
|
|
2293
2326
|
}
|
|
2294
2327
|
}
|
|
2328
|
+
}
|
|
2329
|
+
/** The run directory and the seed, resamples and confidence that fix the paired intervals. */
|
|
2330
|
+
function assertStatistics(opts, seed, resamples, confidence) {
|
|
2295
2331
|
if (typeof opts.runDir !== "string" || opts.runDir.trim().length === 0) throw new Error("compareOptimizationMethods: runDir must be a non-empty string");
|
|
2296
2332
|
if (!Number.isSafeInteger(seed)) throw new Error(`compareOptimizationMethods: seed must be a safe integer, got ${String(seed)}`);
|
|
2297
2333
|
if (!Number.isSafeInteger(resamples) || resamples <= 0 || resamples > 1e6) throw new Error(`compareOptimizationMethods: resamples must be a positive safe integer no greater than 1000000, got ${String(resamples)}`);
|
|
2298
2334
|
assertConfidence(confidence);
|
|
2299
2335
|
const minimumResamples = minimumBootstrapResamples(confidence, opts.methods.length * (opts.methods.length + 1) / 2);
|
|
2300
2336
|
if (resamples < minimumResamples) throw new Error(`compareOptimizationMethods: resamples must be at least ${minimumResamples} for simultaneous confidence ${confidence} across ${opts.methods.length} methods, got ${resamples}`);
|
|
2337
|
+
}
|
|
2338
|
+
/** Concurrency, timeout and cost limits. */
|
|
2339
|
+
function assertLimits(opts) {
|
|
2301
2340
|
if (opts.optimizationConcurrency !== void 0 && (!Number.isSafeInteger(opts.optimizationConcurrency) || opts.optimizationConcurrency <= 0)) throw new Error("compareOptimizationMethods: optimizationConcurrency must be a positive safe integer");
|
|
2302
2341
|
if (opts.maxConcurrency !== void 0 && (!Number.isSafeInteger(opts.maxConcurrency) || opts.maxConcurrency <= 0)) throw new Error("compareOptimizationMethods: maxConcurrency must be a positive safe integer");
|
|
2303
2342
|
if (opts.dispatchTimeoutMs !== void 0 && (!Number.isSafeInteger(opts.dispatchTimeoutMs) || opts.dispatchTimeoutMs < 0 || opts.dispatchTimeoutMs > 2147483647)) throw new Error("compareOptimizationMethods: dispatchTimeoutMs must be a non-negative safe integer no greater than 2147483647");
|
|
2304
2343
|
if (opts.costCeiling !== void 0 && (!Number.isFinite(opts.costCeiling) || opts.costCeiling < 0)) throw new Error("compareOptimizationMethods: costCeiling must be a finite number greater than or equal to 0");
|
|
2305
2344
|
if (opts.costCeiling !== void 0 && opts.costLedger !== void 0 && opts.costLedger.costCeilingUsd !== opts.costCeiling) throw new Error("compareOptimizationMethods: costCeiling must match the shared CostLedger ceiling");
|
|
2306
2345
|
}
|
|
2346
|
+
function assertComparisonControls(opts, seed, resamples, confidence) {
|
|
2347
|
+
assertCallerInputs(opts);
|
|
2348
|
+
assertJudges(opts);
|
|
2349
|
+
assertStatistics(opts, seed, resamples, confidence);
|
|
2350
|
+
assertLimits(opts);
|
|
2351
|
+
}
|
|
2307
2352
|
function assertConfidence(confidence) {
|
|
2308
2353
|
if (!Number.isFinite(confidence) || confidence <= 0 || confidence >= 1) throw new Error(`compareOptimizationMethods: confidence must be a finite number in (0,1), got ${String(confidence)}`);
|
|
2309
2354
|
}
|
|
@@ -3200,4 +3245,4 @@ async function finishSkillOptRun(context, result, outputDir, modelProxy) {
|
|
|
3200
3245
|
//#endregion
|
|
3201
3246
|
export { importExternalEvaluations as a, composeGate as c, readExternalOptimizerObservationArtifact as d, externalSurface as i, externalTextOptimizationMethod as l, compareOptimizationMethods as n, importGepaPopulation as o, gepaOptimizationMethod as r, heldOutGate as s, skillOptOptimizationMethod as t, decodeExternalTextCandidate as u };
|
|
3202
3247
|
|
|
3203
|
-
//# sourceMappingURL=skillopt-optimization-method-
|
|
3248
|
+
//# sourceMappingURL=skillopt-optimization-method-DLKqdhcR.js.map
|