@tangle-network/agent-eval 0.216.0 → 0.216.1
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 +39 -0
- package/dist/adapters/http.d.ts +3 -3
- package/dist/{agent-profile-CIA2Atnt.d.ts → agent-profile-VFcQncbW.d.ts} +5 -5
- package/dist/{agent-profile-CIA2Atnt.d.ts.map → agent-profile-VFcQncbW.d.ts.map} +1 -1
- package/dist/{agent-profile-cell-BYc0bxsL.js → agent-profile-cell-BK8mlqlq.js} +3 -3
- package/dist/{agent-profile-cell-BYc0bxsL.js.map → agent-profile-cell-BK8mlqlq.js.map} +1 -1
- package/dist/{agreement-irr-DsTURxdr.js → agreement-irr-BEWLIF3_.js} +3 -3
- package/dist/{agreement-irr-DsTURxdr.js.map → agreement-irr-BEWLIF3_.js.map} +1 -1
- package/dist/analyst/index.d.ts +14 -14
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +15 -15
- package/dist/{analyze-runs-3xpby3p2.js → analyze-runs-C84irm4i.js} +608 -604
- package/dist/analyze-runs-C84irm4i.js.map +1 -0
- package/dist/{analyze-runs-CSDAh8A7.d.ts → analyze-runs-D68fd-su.d.ts} +17 -15
- package/dist/analyze-runs-D68fd-su.d.ts.map +1 -0
- package/dist/{baseline-Dm8966du.js → baseline-Udi_PLuT.js} +5 -5
- package/dist/{baseline-Dm8966du.js.map → baseline-Udi_PLuT.js.map} +1 -1
- package/dist/{benchmark-BywPeAUo.js → benchmark-CXmVVHH2.js} +2 -2
- package/dist/{benchmark-BywPeAUo.js.map → benchmark-CXmVVHH2.js.map} +1 -1
- package/dist/{benchmark-command-CByl9dxG.js → benchmark-command-By0vh8q7.js} +62 -45
- package/dist/benchmark-command-By0vh8q7.js.map +1 -0
- package/dist/benchmarks/index.d.ts +5 -5
- package/dist/benchmarks/index.js +3 -3
- package/dist/builder-eval/index.js +2 -2
- package/dist/campaign/index.d.ts +7 -7
- package/dist/campaign/index.js +13 -13
- package/dist/{campaign-BQ-Jujuj.js → campaign-BudZ70zo.js} +245 -247
- package/dist/campaign-BudZ70zo.js.map +1 -0
- package/dist/{campaign-evidence-OcUciD-N.js → campaign-evidence-Clrn4hBV.js} +8 -8
- package/dist/campaign-evidence-Clrn4hBV.js.map +1 -0
- package/dist/{canonical-BsZVgBhW.js → canonical-B2RqLofv.js} +2 -2
- package/dist/{canonical-BsZVgBhW.js.map → canonical-B2RqLofv.js.map} +1 -1
- package/dist/{chat-client-DthPOYGd.js → chat-client-l-MVDlDk.js} +2 -2
- package/dist/{chat-client-DthPOYGd.js.map → chat-client-l-MVDlDk.js.map} +1 -1
- package/dist/{chat-json-call-BrKsyspg.js → chat-json-call-puMArmtW.js} +2 -2
- package/dist/{chat-json-call-BrKsyspg.js.map → chat-json-call-puMArmtW.js.map} +1 -1
- package/dist/{claim-BXcZw-jo.js → claim-q4HQhK1G.js} +4 -4
- package/dist/claim-q4HQhK1G.js.map +1 -0
- package/dist/cli.js +9 -9
- package/dist/cli.js.map +1 -1
- package/dist/{cluster-bootstrap-B3JywQQn.js → cluster-bootstrap-qcUWYFl-.js} +3 -3
- package/dist/{cluster-bootstrap-B3JywQQn.js.map → cluster-bootstrap-qcUWYFl-.js.map} +1 -1
- package/dist/contract/index.d.ts +11 -11
- package/dist/contract/index.js +1022 -1078
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-D2FnJPBF.js → cost-ledger-BP8V4kUQ.js} +835 -816
- package/dist/cost-ledger-BP8V4kUQ.js.map +1 -0
- package/dist/{cost-ledger-CO7UyEcQ.d.ts → cost-ledger-Jk62OBfF.d.ts} +12 -47
- package/dist/cost-ledger-Jk62OBfF.d.ts.map +1 -0
- package/dist/{counterfactual-DtMWvn7D.js → counterfactual-Dn3veueY.js} +2 -2
- package/dist/{counterfactual-DtMWvn7D.js.map → counterfactual-Dn3veueY.js.map} +1 -1
- package/dist/{default-registry-Cn1LQ2Ve.js → default-registry-COhk9g36.js} +5 -5
- package/dist/{default-registry-Cn1LQ2Ve.js.map → default-registry-COhk9g36.js.map} +1 -1
- package/dist/{default-registry-BrWh62zf.d.ts → default-registry-DzHiGruW.d.ts} +6 -6
- package/dist/{default-registry-BrWh62zf.d.ts.map → default-registry-DzHiGruW.d.ts.map} +1 -1
- package/dist/{define-agent-eval-Ch3MWX6k.js → define-agent-eval-CNTPzIkp.js} +10 -10
- package/dist/define-agent-eval-CNTPzIkp.js.map +1 -0
- package/dist/{define-agent-eval-CEWkX5wZ.d.ts → define-agent-eval-WSck0CZJ.d.ts} +8 -8
- package/dist/{define-agent-eval-CEWkX5wZ.d.ts.map → define-agent-eval-WSck0CZJ.d.ts.map} +1 -1
- package/dist/{descriptive-CnU8Yq29.js → descriptive-DboxPZrG.js} +2 -2
- package/dist/{descriptive-CnU8Yq29.js.map → descriptive-DboxPZrG.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +3 -3
- package/dist/diagnosis/index.js +4 -4
- package/dist/{dspy-rlm-engine-D-KX_e64.js → dspy-rlm-engine-LRCu61m5.js} +3 -3
- package/dist/{dspy-rlm-engine-D-KX_e64.js.map → dspy-rlm-engine-LRCu61m5.js.map} +1 -1
- package/dist/{effect-sizes-DiH8MGOH.js → effect-sizes-BhzEpXMc.js} +2 -2
- package/dist/{effect-sizes-DiH8MGOH.js.map → effect-sizes-BhzEpXMc.js.map} +1 -1
- package/dist/{engine-C_zNWfM8.d.ts → engine-3A_4jOlI.d.ts} +5 -5
- package/dist/{engine-C_zNWfM8.d.ts.map → engine-3A_4jOlI.d.ts.map} +1 -1
- package/dist/{equal-terms-Blx9Zk5I.js → equal-terms-BtdXayCJ.js} +2 -2
- package/dist/{equal-terms-Blx9Zk5I.js.map → equal-terms-BtdXayCJ.js.map} +1 -1
- package/dist/{errors-Dngq5h35.js → errors-DVZiqS7K.js} +6 -2
- package/dist/{errors-Dngq5h35.js.map → errors-DVZiqS7K.js.map} +1 -1
- package/dist/{eval-campaign-4byTtqrf.js → eval-campaign-90jeaCAI.js} +6 -6
- package/dist/{eval-campaign-4byTtqrf.js.map → eval-campaign-90jeaCAI.js.map} +1 -1
- package/dist/{evaluation-Cn2dRZIz.d.ts → evaluation-6Yoi74gM.d.ts} +4 -4
- package/dist/{evaluation-Cn2dRZIz.d.ts.map → evaluation-6Yoi74gM.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/evaluation.js +1 -1
- package/dist/{exact-types-CD0lf5Qd.d.ts → exact-types-ClugMJfI.d.ts} +2 -2
- package/dist/{exact-types-CD0lf5Qd.d.ts.map → exact-types-ClugMJfI.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +404 -3
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +313 -19
- package/dist/experiment/index.js.map +1 -1
- package/dist/{external-optimizer-process-nnsY5D_4.js → external-optimizer-process-BjMGUuds.js} +3 -3
- package/dist/{external-optimizer-process-nnsY5D_4.js.map → external-optimizer-process-BjMGUuds.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-DcerlZSG.js → external-optimizer-subprocess-BqW0hHcI.js} +548 -548
- package/dist/external-optimizer-subprocess-BqW0hHcI.js.map +1 -0
- package/dist/{feedback-trajectory-DkaDj0dj.d.ts → feedback-trajectory-C4EG0nNH.d.ts} +5 -8
- package/dist/feedback-trajectory-C4EG0nNH.d.ts.map +1 -0
- package/dist/fuzz.d.ts +1 -1
- package/dist/fuzz.js +3 -3
- package/dist/hosted/index.js +1 -1
- package/dist/{index-CPJJr98o.d.ts → index-BFRO6chs.d.ts} +3 -2
- package/dist/index-BFRO6chs.d.ts.map +1 -0
- package/dist/{index-Ch9VxCpK.d.ts → index-BO41eGj5.d.ts} +2 -2
- package/dist/{index-Ch9VxCpK.d.ts.map → index-BO41eGj5.d.ts.map} +1 -1
- package/dist/{index-NvGBiO8H.d.ts → index-CyszSg4O.d.ts} +165 -162
- package/dist/index-CyszSg4O.d.ts.map +1 -0
- package/dist/{index-DlH0Y9gI.d.ts → index-DPcngtwt.d.ts} +30 -17
- package/dist/index-DPcngtwt.d.ts.map +1 -0
- package/dist/{index-oQ4aHziK.d.ts → index-DV-jSzxF.d.ts} +8 -8
- package/dist/{index-oQ4aHziK.d.ts.map → index-DV-jSzxF.d.ts.map} +1 -1
- package/dist/index.d.ts +1969 -1871
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +161 -201
- package/dist/index.js.map +1 -1
- package/dist/{integrity-BvnVARVl.js → integrity-BXOsAb3i.js} +2 -2
- package/dist/{integrity-BvnVARVl.js.map → integrity-BXOsAb3i.js.map} +1 -1
- package/dist/{integrity-CCAxGVK6.d.ts → integrity-DAMEDFaC.d.ts} +2 -2
- package/dist/{integrity-CCAxGVK6.d.ts.map → integrity-DAMEDFaC.d.ts.map} +1 -1
- package/dist/{integrity-BV1ZDf42.js → integrity-dLiDe2kD.js} +2 -5
- package/dist/integrity-dLiDe2kD.js.map +1 -0
- package/dist/{internal-CRHwS9iz.js → internal-Epl-YBZW.js} +3 -3
- package/dist/{internal-CRHwS9iz.js.map → internal-Epl-YBZW.js.map} +1 -1
- package/dist/interval-CELpye1n.js +219 -0
- package/dist/interval-CELpye1n.js.map +1 -0
- package/dist/interval-ohuOJurX.d.ts +47 -0
- package/dist/interval-ohuOJurX.d.ts.map +1 -0
- package/dist/{journal-DvKCvjty.js → journal-DfRz9kps.js} +2 -2
- package/dist/{journal-DvKCvjty.js.map → journal-DfRz9kps.js.map} +1 -1
- package/dist/{judge-calibration-N44V04Se.js → judge-calibration-BpCy5XQl.js} +3 -3
- package/dist/{judge-calibration-N44V04Se.js.map → judge-calibration-BpCy5XQl.js.map} +1 -1
- package/dist/{judge-gate-DNcUrRFA.d.ts → judge-gate-CE7CQAgt.d.ts} +3 -3
- package/dist/{judge-gate-DNcUrRFA.d.ts.map → judge-gate-CE7CQAgt.d.ts.map} +1 -1
- package/dist/{judge-gate-B1qYnkpi.js → judge-gate-iY9s4L44.js} +3 -3
- package/dist/judge-gate-iY9s4L44.js.map +1 -0
- package/dist/{kind-factory-CbZ-6tvu.js → kind-factory-BobI5Jy3.js} +4 -4
- package/dist/{kind-factory-CbZ-6tvu.js.map → kind-factory-BobI5Jy3.js.map} +1 -1
- package/dist/ledger-core/index.js +3 -3
- package/dist/{ledger-core-B2hahzrt.js → ledger-core-Gq7yp8lP.js} +4 -4
- package/dist/{ledger-core-B2hahzrt.js.map → ledger-core-Gq7yp8lP.js.map} +1 -1
- package/dist/{llm-client-DQveoxSM.js → llm-client-CyBAoYiX.js} +192 -219
- package/dist/llm-client-CyBAoYiX.js.map +1 -0
- package/dist/{llm-judge-PXV7Xljl.js → llm-judge-CG12SQJq.js} +499 -921
- package/dist/llm-judge-CG12SQJq.js.map +1 -0
- package/dist/matrix/index.d.ts +2 -2
- package/dist/matrix/index.js +1 -1
- package/dist/{matrix-CHMiebFx.d.ts → matrix-DSrSxjjy.d.ts} +4 -4
- package/dist/{matrix-CHMiebFx.d.ts.map → matrix-DSrSxjjy.d.ts.map} +1 -1
- package/dist/{matrix-_BV9-Lk5.js → matrix-Dm0BQW7U.js} +7 -11
- package/dist/matrix-Dm0BQW7U.js.map +1 -0
- package/dist/{paired-tests-jbwPdSz5.js → mean-DHoMiudD.js} +11 -5
- package/dist/mean-DHoMiudD.js.map +1 -0
- package/dist/meta-eval/index.d.ts +3 -3
- package/dist/meta-eval/index.js +9 -9
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/mint-DNU8QPG4.d.ts +81 -0
- package/dist/mint-DNU8QPG4.d.ts.map +1 -0
- package/dist/{mint-Csor1BLJ.js → mint-QaD5cA0u.js} +3 -3
- package/dist/{mint-Csor1BLJ.js.map → mint-QaD5cA0u.js.map} +1 -1
- package/dist/{multiplicity-D9cjmStq.js → multiplicity-DQUFcbW4.js} +2 -2
- package/dist/{multiplicity-D9cjmStq.js.map → multiplicity-DQUFcbW4.js.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/golden/index.d.ts.map +1 -1
- package/dist/multishot/golden/index.js +3 -6
- package/dist/multishot/golden/index.js.map +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/multishot/index.js +1 -1
- package/dist/nonnegative-number-DvdMxg_f.js +9 -0
- package/dist/nonnegative-number-DvdMxg_f.js.map +1 -0
- package/dist/openapi.json +1 -1
- package/dist/{otel-spans-C8YIJWy1.js → otel-spans-B9tUXRHF.js} +3 -3
- package/dist/{otel-spans-C8YIJWy1.js.map → otel-spans-B9tUXRHF.js.map} +1 -1
- package/dist/{paired-arms-DzKn0TfY.js → paired-arms-CwMGJsrS.js} +5 -5
- package/dist/{paired-arms-DzKn0TfY.js.map → paired-arms-CwMGJsrS.js.map} +1 -1
- package/dist/{paired-binary-Q36bhn2R.js → paired-binary-CvpFHfKZ.js} +2 -2
- package/dist/{paired-binary-Q36bhn2R.js.map → paired-binary-CvpFHfKZ.js.map} +1 -1
- package/dist/{paired-promotion-decision-BN6IQTiu.js → paired-promotion-decision-DsAPYGCm.js} +3 -3
- package/dist/{paired-promotion-decision-BN6IQTiu.js.map → paired-promotion-decision-DsAPYGCm.js.map} +1 -1
- package/dist/{search-kernel-BztlERLv.js → pareto-Cm6ndrWN.js} +883 -861
- package/dist/pareto-Cm6ndrWN.js.map +1 -0
- package/dist/pipelines/index.d.ts +2 -2
- package/dist/pipelines/index.js +3 -3
- package/dist/{power-and-mde-fK5Qocwo.js → power-and-mde-Hj2ubb4B.js} +2 -2
- package/dist/{power-and-mde-fK5Qocwo.js.map → power-and-mde-Hj2ubb4B.js.map} +1 -1
- package/dist/predicate-FdKmElA_.js +38 -0
- package/dist/predicate-FdKmElA_.js.map +1 -0
- package/dist/{prime-protocol-DcAK9pC8.js → prime-protocol-CHKgA3a6.js} +2 -2
- package/dist/{prime-protocol-DcAK9pC8.js.map → prime-protocol-CHKgA3a6.js.map} +1 -1
- package/dist/{prime-protocol-CEE4BR9N.d.ts → prime-protocol-HiB9HX7E.d.ts} +3 -3
- package/dist/{prime-protocol-CEE4BR9N.d.ts.map → prime-protocol-HiB9HX7E.d.ts.map} +1 -1
- package/dist/{produced-state-ZCtDBxAE.js → produced-state-BsDmnwxc.js} +8 -8
- package/dist/{produced-state-ZCtDBxAE.js.map → produced-state-BsDmnwxc.js.map} +1 -1
- package/dist/profile-cell.js +1 -1
- package/dist/{release-confidence-BK2QCB5M.d.ts → promotion-gate-BawrdPYr.d.ts} +102 -102
- package/dist/promotion-gate-BawrdPYr.d.ts.map +1 -0
- package/dist/{promotion-policy-CWW35UWq.js → promotion-policy-KO57gbyV.js} +4 -4
- package/dist/{promotion-policy-CWW35UWq.js.map → promotion-policy-KO57gbyV.js.map} +1 -1
- package/dist/{proposal-findings-BZiMTzAF.js → proposal-findings-CY1xKn_a.js} +2 -2
- package/dist/{proposal-findings-BZiMTzAF.js.map → proposal-findings-CY1xKn_a.js.map} +1 -1
- package/dist/{query-B1D1qp2Z.js → query-BUCZCK7F.js} +3 -3
- package/dist/{query-B1D1qp2Z.js.map → query-BUCZCK7F.js.map} +1 -1
- package/dist/{random-Dn5fPWkt.js → random-ByUSnV9w.js} +2 -2
- package/dist/{random-Dn5fPWkt.js.map → random-ByUSnV9w.js.map} +1 -1
- package/dist/{raw-provider-sink-rB2DYxr6.js → raw-provider-sink-DoHz4JNG.js} +2 -2
- package/dist/{raw-provider-sink-rB2DYxr6.js.map → raw-provider-sink-DoHz4JNG.js.map} +1 -1
- package/dist/{redact-Dk1ZdJEm.js → redact-B5xXKqQ3.js} +97 -98
- package/dist/redact-B5xXKqQ3.js.map +1 -0
- package/dist/{redact-Cveoq6fJ.d.ts → redact-mtCCcT8z.d.ts} +4 -20
- package/dist/redact-mtCCcT8z.d.ts.map +1 -0
- package/dist/{registry-JYfPxcVz.d.ts → registry-D7_hm2fK.d.ts} +5 -5
- package/dist/{registry-JYfPxcVz.d.ts.map → registry-D7_hm2fK.d.ts.map} +1 -1
- package/dist/{release-confidence-Dbe9AS_X.js → release-confidence-CpuP65S5.js} +5 -5
- package/dist/{release-confidence-Dbe9AS_X.js.map → release-confidence-CpuP65S5.js.map} +1 -1
- package/dist/{report-command-y8H6RSX8.js → report-command-SC9nqb4M.js} +106 -171
- package/dist/report-command-SC9nqb4M.js.map +1 -0
- package/dist/reporting-html-Kvlc8oMt.js +100 -0
- package/dist/reporting-html-Kvlc8oMt.js.map +1 -0
- package/dist/reporting.d.ts +3 -3
- package/dist/reporting.js +6 -6
- package/dist/{researcher-f6mZhh58.d.ts → researcher-CEcfku-T.d.ts} +5 -5
- package/dist/{researcher-f6mZhh58.d.ts.map → researcher-CEcfku-T.d.ts.map} +1 -1
- package/dist/reward-CpCmAM8L.d.ts +78 -0
- package/dist/reward-CpCmAM8L.d.ts.map +1 -0
- package/dist/{reward-hacking-BFcQgkux.js → reward-hacking-E0d-WVcP.js} +2 -2
- package/dist/{reward-hacking-BFcQgkux.js.map → reward-hacking-E0d-WVcP.js.map} +1 -1
- package/dist/{reward-hacking-DHA7c1l8.d.ts → reward-hacking-RVdZ6Kkt.d.ts} +2 -2
- package/dist/{reward-hacking-DHA7c1l8.d.ts.map → reward-hacking-RVdZ6Kkt.d.ts.map} +1 -1
- package/dist/rl.d.ts +8 -8
- package/dist/rl.js +14 -14
- package/dist/rollout/index.d.ts +3 -2
- package/dist/rollout/index.js +2 -2
- package/dist/{rollout-D9bKKBnZ.js → rollout-DZV1t2Wg.js} +2 -2
- package/dist/{rollout-D9bKKBnZ.js.map → rollout-DZV1t2Wg.js.map} +1 -1
- package/dist/round-decimal-COrKglMh.js +10 -0
- package/dist/round-decimal-COrKglMh.js.map +1 -0
- package/dist/{rubric-predictive-validity-2SgHxoa5.d.ts → rubric-predictive-validity-C03EC7ZE.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-2SgHxoa5.d.ts.map → rubric-predictive-validity-C03EC7ZE.d.ts.map} +1 -1
- package/dist/{rubric-predictive-validity-BsgkBfT0.js → rubric-predictive-validity-DaFW70y9.js} +3 -3
- package/dist/{rubric-predictive-validity-BsgkBfT0.js.map → rubric-predictive-validity-DaFW70y9.js.map} +1 -1
- package/dist/{run-record-DlTZ_lqe.js → run-record-Boc5IUTp.js} +4 -4
- package/dist/{run-record-DlTZ_lqe.js.map → run-record-Boc5IUTp.js.map} +1 -1
- package/dist/{run-record-D1Hw-Jml.d.ts → run-record-C1E24G2A.d.ts} +2 -2
- package/dist/{run-record-D1Hw-Jml.d.ts.map → run-record-C1E24G2A.d.ts.map} +1 -1
- package/dist/{run-record-ES07wfz9.js → run-record-C5e7FjhJ.js} +3 -5
- package/dist/run-record-C5e7FjhJ.js.map +1 -0
- package/dist/search/index.d.ts +46 -32
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +3 -3
- package/dist/{search-kernel-CpcKH5Ih.d.ts → search-kernel-DyNEa6IU.d.ts} +14 -10
- package/dist/search-kernel-DyNEa6IU.d.ts.map +1 -0
- package/dist/{search-ledger-d7V8o9Lk.js → search-ledger-CVUGLDZp.js} +189 -199
- package/dist/search-ledger-CVUGLDZp.js.map +1 -0
- package/dist/{search-ledger-file-BqOo-bVo.js → search-ledger-file-DDQUgvCg.js} +4 -4
- package/dist/{search-ledger-file-BqOo-bVo.js.map → search-ledger-file-DDQUgvCg.js.map} +1 -1
- package/dist/search-ledger-types-p2xKfiDJ.d.ts.map +1 -1
- package/dist/{search-shipper-er4pK5_Y.js → search-shipper-BOSD46qv.js} +3 -3
- package/dist/{search-shipper-er4pK5_Y.js.map → search-shipper-BOSD46qv.js.map} +1 -1
- package/dist/{search-summary-CBvz3u_S.js → search-summary-BQCSWf1g.js} +5 -5
- package/dist/{search-summary-CBvz3u_S.js.map → search-summary-BQCSWf1g.js.map} +1 -1
- package/dist/{semantic-concept-judge-zQBG9hHU.js → semantic-concept-judge-BQF8te0T.js} +12 -14
- package/dist/semantic-concept-judge-BQF8te0T.js.map +1 -0
- package/dist/{sequential-D-1PPCmM.js → sequential-Bf_pbE50.js} +5 -5
- package/dist/{sequential-D-1PPCmM.js.map → sequential-Bf_pbE50.js.map} +1 -1
- package/dist/{sequential-eprocess-D1jKoihe.js → sequential-eprocess-DM_qENCl.js} +2 -2
- package/dist/{sequential-eprocess-D1jKoihe.js.map → sequential-eprocess-DM_qENCl.js.map} +1 -1
- package/dist/{server-DbcC7xMl.js → server-e9oWO_bN.js} +4 -4
- package/dist/{server-DbcC7xMl.js.map → server-e9oWO_bN.js.map} +1 -1
- package/dist/{single-run-lock-fVu3MZWH.js → single-run-lock-CV9Eyd_q.js} +2 -2
- package/dist/{single-run-lock-fVu3MZWH.js.map → single-run-lock-CV9Eyd_q.js.map} +1 -1
- package/dist/{skillopt-optimization-method-CCtzralq.js → skillopt-optimization-method-BiwA8nfX.js} +427 -12
- package/dist/skillopt-optimization-method-BiwA8nfX.js.map +1 -0
- package/dist/{spans-D9_ehFuk.d.ts → spans-BHAUXMGN.d.ts} +2 -2
- package/dist/{spans-D9_ehFuk.d.ts.map → spans-BHAUXMGN.d.ts.map} +1 -1
- package/dist/{statistical-heldout-1Gbmex7v.js → statistical-heldout-42NlCNDe.js} +3 -3
- package/dist/{statistical-heldout-1Gbmex7v.js.map → statistical-heldout-42NlCNDe.js.map} +1 -1
- package/dist/{statistical-heldout-BeR4bOdg.d.ts → statistical-heldout-CYpGaoDH.d.ts} +3 -3
- package/dist/{statistical-heldout-BeR4bOdg.d.ts.map → statistical-heldout-CYpGaoDH.d.ts.map} +1 -1
- package/dist/{store-otlp-DtB4Slsr.js → store-otlp-DJ9dtA5x.js} +135 -132
- package/dist/store-otlp-DJ9dtA5x.js.map +1 -0
- package/dist/{store-tool-spans-fZIigrpP.js → store-tool-spans-CIX5arAG.js} +7 -7
- package/dist/{store-tool-spans-fZIigrpP.js.map → store-tool-spans-CIX5arAG.js.map} +1 -1
- package/dist/{store-tool-spans-DR1SrCLK.d.ts → store-tool-spans-DdCSPa7C.d.ts} +162 -161
- package/dist/store-tool-spans-DdCSPa7C.d.ts.map +1 -0
- package/dist/storyboard/index.d.ts.map +1 -1
- package/dist/storyboard/index.js +20 -3
- package/dist/storyboard/index.js.map +1 -1
- package/dist/{student-t-BQeKJx2N.js → student-t-DVPW7CdL.js} +2 -2
- package/dist/{student-t-BQeKJx2N.js.map → student-t-DVPW7CdL.js.map} +1 -1
- package/dist/{summary-report-DtdRucM0.js → summary-report-V_JACR4Y.js} +526 -614
- package/dist/summary-report-V_JACR4Y.js.map +1 -0
- package/dist/{summary-report-C-CtItCN.d.ts → summary-report-bdFDXq0b.d.ts} +10 -5
- package/dist/summary-report-bdFDXq0b.d.ts.map +1 -0
- package/dist/supervisor-run/index.d.ts +153 -149
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +65 -3
- package/dist/supervisor-run/index.js.map +1 -1
- package/dist/{systemone-CpTLAlqb.d.ts → systemone-BomhHr2c.d.ts} +6 -6
- package/dist/{systemone-CpTLAlqb.d.ts.map → systemone-BomhHr2c.d.ts.map} +1 -1
- package/dist/systemone-protocol.js +1 -1
- package/dist/{systemone-review-B_yo1xsd.d.ts → systemone-review-CUVcQJu6.d.ts} +2 -2
- package/dist/{systemone-review-B_yo1xsd.d.ts.map → systemone-review-CUVcQJu6.d.ts.map} +1 -1
- package/dist/{systemone-review-BZWfrtq1.js → systemone-review-D7sXwsqq.js} +2 -2
- package/dist/{systemone-review-BZWfrtq1.js.map → systemone-review-D7sXwsqq.js.map} +1 -1
- package/dist/systemone.d.ts +3 -3
- package/dist/systemone.js +4 -4
- package/dist/{task-failure-attributes-DngaLdE4.js → task-failure-attributes-hEmASjix.js} +2 -2
- package/dist/{task-failure-attributes-DngaLdE4.js.map → task-failure-attributes-hEmASjix.js.map} +1 -1
- package/dist/{terminal-record-BHocwFw1.js → terminal-record-DZyQZ3pz.js} +14 -10
- package/dist/terminal-record-DZyQZ3pz.js.map +1 -0
- package/dist/{tool-groups-mcxOXVlb.d.ts → tool-groups-C3NEcdCM.d.ts} +3 -3
- package/dist/tool-groups-C3NEcdCM.d.ts.map +1 -0
- package/dist/{tool-waste-Wi4g6Ekb.d.ts → tool-waste-BKgvd-TP.d.ts} +30 -30
- package/dist/tool-waste-BKgvd-TP.d.ts.map +1 -0
- package/dist/{tool-waste-D52PqU9Q.js → tool-waste-BlesqTqW.js} +4 -4
- package/dist/{tool-waste-D52PqU9Q.js.map → tool-waste-BlesqTqW.js.map} +1 -1
- package/dist/{trace-questions-DG7nqLQ7.d.ts → trace-questions-CM2CAocU.d.ts} +4 -4
- package/dist/{trace-questions-DG7nqLQ7.d.ts.map → trace-questions-CM2CAocU.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +3 -3
- package/dist/trace-repair/index.d.ts.map +1 -1
- package/dist/trace-repair/index.js +7 -13
- package/dist/trace-repair/index.js.map +1 -1
- package/dist/traces.d.ts +76 -58
- package/dist/traces.d.ts.map +1 -1
- package/dist/traces.js +9 -9
- package/dist/trajectory-replay/index.js +3 -3
- package/dist/{tree-rXLW3M_4.js → tree-C1XYeXvy.js} +2277 -2339
- package/dist/tree-C1XYeXvy.js.map +1 -0
- package/dist/{types-DBZ7keha.d.ts → types-C02qtnG8.d.ts} +4 -46
- package/dist/types-C02qtnG8.d.ts.map +1 -0
- package/dist/{types-oKRhQAde.d.ts → types-C1tnkEgM.d.ts} +4 -4
- package/dist/{types-oKRhQAde.d.ts.map → types-C1tnkEgM.d.ts.map} +1 -1
- package/dist/{types-CfZMIzB_.d.ts → types-Cbe2fWBa.d.ts} +3 -3
- package/dist/{types-CfZMIzB_.d.ts.map → types-Cbe2fWBa.d.ts.map} +1 -1
- package/dist/{types-B4C5nFw6.d.ts → types-Cq8mSbq8.d.ts} +78 -72
- package/dist/types-Cq8mSbq8.d.ts.map +1 -0
- package/dist/{verdict-DhPoXApk.js → verdict-Dl0tiT1X.js} +2 -2
- package/dist/{verdict-DhPoXApk.js.map → verdict-Dl0tiT1X.js.map} +1 -1
- package/dist/{verdict-cache-BQEsVy9n.js → verdict-cache-Bm8EKL2s.js} +2 -2
- package/dist/{verdict-cache-BQEsVy9n.js.map → verdict-cache-Bm8EKL2s.js.map} +1 -1
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/design/mlbenchmarks-book-review.md +1 -1
- package/docs/design/mlbenchmarks-review/probes.mts +23 -31
- package/docs/experiment.md +1 -1
- package/package.json +1 -1
- package/dist/analyze-runs-3xpby3p2.js.map +0 -1
- package/dist/analyze-runs-CSDAh8A7.d.ts.map +0 -1
- package/dist/ast-DJ6Bc7ab.js +0 -558
- package/dist/ast-DJ6Bc7ab.js.map +0 -1
- package/dist/ast-hI-vjW6J.d.ts +0 -457
- package/dist/ast-hI-vjW6J.d.ts.map +0 -1
- package/dist/benchmark-command-CByl9dxG.js.map +0 -1
- package/dist/campaign-BQ-Jujuj.js.map +0 -1
- package/dist/campaign-evidence-OcUciD-N.js.map +0 -1
- package/dist/claim-BXcZw-jo.js.map +0 -1
- package/dist/cost-ledger-CO7UyEcQ.d.ts.map +0 -1
- package/dist/cost-ledger-D2FnJPBF.js.map +0 -1
- package/dist/define-agent-eval-Ch3MWX6k.js.map +0 -1
- package/dist/external-optimizer-subprocess-DcerlZSG.js.map +0 -1
- package/dist/feedback-trajectory-DkaDj0dj.d.ts.map +0 -1
- package/dist/index-CPJJr98o.d.ts.map +0 -1
- package/dist/index-DlH0Y9gI.d.ts.map +0 -1
- package/dist/index-NvGBiO8H.d.ts.map +0 -1
- package/dist/integrity-BV1ZDf42.js.map +0 -1
- package/dist/judge-gate-B1qYnkpi.js.map +0 -1
- package/dist/llm-client-DQveoxSM.js.map +0 -1
- package/dist/llm-judge-PXV7Xljl.js.map +0 -1
- package/dist/matrix-_BV9-Lk5.js.map +0 -1
- package/dist/mint-DCGoBYhB.d.ts +0 -155
- package/dist/mint-DCGoBYhB.d.ts.map +0 -1
- package/dist/paired-tests-jbwPdSz5.js.map +0 -1
- package/dist/redact-Cveoq6fJ.d.ts.map +0 -1
- package/dist/redact-Dk1ZdJEm.js.map +0 -1
- package/dist/release-confidence-BK2QCB5M.d.ts.map +0 -1
- package/dist/report-command-y8H6RSX8.js.map +0 -1
- package/dist/run-record-ES07wfz9.js.map +0 -1
- package/dist/search-kernel-BztlERLv.js.map +0 -1
- package/dist/search-kernel-CpcKH5Ih.d.ts.map +0 -1
- package/dist/search-ledger-d7V8o9Lk.js.map +0 -1
- package/dist/semantic-concept-judge-zQBG9hHU.js.map +0 -1
- package/dist/skillopt-optimization-method-CCtzralq.js.map +0 -1
- package/dist/store-otlp-DtB4Slsr.js.map +0 -1
- package/dist/store-tool-spans-DR1SrCLK.d.ts.map +0 -1
- package/dist/summary-report-C-CtItCN.d.ts.map +0 -1
- package/dist/summary-report-DtdRucM0.js.map +0 -1
- package/dist/terminal-record-BHocwFw1.js.map +0 -1
- package/dist/tool-groups-mcxOXVlb.d.ts.map +0 -1
- package/dist/tool-waste-Wi4g6Ekb.d.ts.map +0 -1
- package/dist/tree-rXLW3M_4.js.map +0 -1
- package/dist/types-B4C5nFw6.d.ts.map +0 -1
- package/dist/types-DBZ7keha.d.ts.map +0 -1
package/dist/{skillopt-optimization-method-CCtzralq.js → skillopt-optimization-method-BiwA8nfX.js}
RENAMED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { a as hashCanonical } from "./canonical-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { a as hashCanonical } from "./canonical-B2RqLofv.js";
|
|
2
|
+
import { t as mean$1 } from "./mean-DHoMiudD.js";
|
|
3
|
+
import { t as decidePairedPromotion } from "./paired-promotion-decision-DsAPYGCm.js";
|
|
4
|
+
import { a as heldoutSignificance, o as pairHoldout } from "./statistical-heldout-42NlCNDe.js";
|
|
5
|
+
import { n as contentHash, t as canonicalJson } from "./verdict-cache-Bm8EKL2s.js";
|
|
6
|
+
import { $ as evaluationUnitMap, A as assertSearchHistoryAdmissionOptions, C as SearchRecorder, D as surfaceNode, E as surfaceDiff, Q as captureFinalEvidencePolicy, W as captureJudge, Z as assertIndependentEvaluationSplit, at as resolveRunDir, c as executeOptimizationMethod, d as combineComparisonCosts, et as exposeFinalEvidence, f as costFromLedgerSummary, l as assertGepaCandidatePopulationSummary, p as optimizationTokenUsageFromSummary, rt as runCampaign, t as llmJudge, tt as reserveFinalEvidence, u as readGepaCandidatePopulationArtifact, w as developmentClaim } from "./llm-judge-CG12SQJq.js";
|
|
7
|
+
import { B as assertCampaignDesign, H as assertCompleteCampaign, N as surfaceContentHash, t as createCampaignEvidenceReceipt, v as campaignBreakdown } from "./campaign-evidence-Clrn4hBV.js";
|
|
8
|
+
import { m as mapConcurrent } from "./journal-DfRz9kps.js";
|
|
6
9
|
import { t as deepFreezeCanonicalJson } from "./deep-freeze-CurcOQg3.js";
|
|
7
|
-
import { N as createRunCostLedger, P as fsCampaignStorage, _ as removeCredentialEnvironment, b as safePathComponent, d as assertExternalOptimizerModelBudget, f as assertJsonValue, g as isRecord, h as isExternalTextCandidate, i as startExternalOptimizerModelProxy, m as isCandidateText, n as closeExternalOptimizerResources, p as assertNoCredentialValues, r as runWithCleanup, t as runExternalOptimizerProcess, v as resolveExternalOptimizerCallbackLimits, y as resolveExternalOptimizerProcessLimits } from "./external-optimizer-subprocess-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { N as createRunCostLedger, P as fsCampaignStorage, _ as removeCredentialEnvironment, b as safePathComponent, d as assertExternalOptimizerModelBudget, f as assertJsonValue, g as isRecord, h as isExternalTextCandidate, i as startExternalOptimizerModelProxy, m as isCandidateText, n as closeExternalOptimizerResources, p as assertNoCredentialValues, r as runWithCleanup, t as runExternalOptimizerProcess, v as resolveExternalOptimizerCallbackLimits, y as resolveExternalOptimizerProcessLimits } from "./external-optimizer-subprocess-BqW0hHcI.js";
|
|
11
|
+
import { r as summarizeEvaluationUnits, t as defineEvaluationClaim } from "./claim-q4HQhK1G.js";
|
|
12
|
+
import { n as openSearchLedger } from "./search-ledger-CVUGLDZp.js";
|
|
13
|
+
import { t as acquireSingleRunLock } from "./single-run-lock-CV9Eyd_q.js";
|
|
14
|
+
import { f as assertServedModelPolicy, y as combineAbortSignals } from "./llm-client-CyBAoYiX.js";
|
|
15
|
+
import { t as startExternalOptimizerCallback } from "./external-optimizer-process-BjMGUuds.js";
|
|
12
16
|
import { createHash, randomBytes } from "node:crypto";
|
|
13
17
|
import { z } from "zod";
|
|
14
18
|
import { mkdir } from "node:fs/promises";
|
|
@@ -2200,6 +2204,417 @@ function optimizerAccounting(tokenUsage, proposerCostUsd) {
|
|
|
2200
2204
|
}
|
|
2201
2205
|
};
|
|
2202
2206
|
}
|
|
2207
|
+
//#endregion
|
|
2208
|
+
//#region src/campaign/presets/compare-optimization-methods.ts
|
|
2209
|
+
/**
|
|
2210
|
+
* Compare optimization methods on shared train, selection, and test data.
|
|
2211
|
+
* Optimizers receive only train and selection data. After every optimizer
|
|
2212
|
+
* finishes, their selected surfaces are measured on the same untouched test
|
|
2213
|
+
* data and compared with paired confidence intervals.
|
|
2214
|
+
*/
|
|
2215
|
+
/** Optimization method inputs, provenance, results, and comparison contracts. */
|
|
2216
|
+
/** Equal-budget optimization followed by final measurements and paired method comparisons. */
|
|
2217
|
+
/** Comparison admission, disjoint partitions, and isolated method/final measurement inputs. */
|
|
2218
|
+
/**
|
|
2219
|
+
* Compare complete optimization methods on disjoint train, selection, and final test data.
|
|
2220
|
+
*/
|
|
2221
|
+
async function compareOptimizationMethods(opts) {
|
|
2222
|
+
opts = {
|
|
2223
|
+
...opts,
|
|
2224
|
+
methods: opts.methods.map((method) => ({ ...method })),
|
|
2225
|
+
trainScenarios: structuredClone(opts.trainScenarios),
|
|
2226
|
+
selectionScenarios: structuredClone(opts.selectionScenarios),
|
|
2227
|
+
testScenarios: structuredClone(opts.testScenarios),
|
|
2228
|
+
judges: opts.judges.map(captureJudge),
|
|
2229
|
+
claim: opts.claim && defineEvaluationClaim(opts.claim),
|
|
2230
|
+
finalEvidence: opts.finalEvidence && captureFinalEvidencePolicy(opts.finalEvidence)
|
|
2231
|
+
};
|
|
2232
|
+
assertOptimizationMethods(opts.methods);
|
|
2233
|
+
assertComparisonPartitions(opts);
|
|
2234
|
+
const searchHistoryPolicy = opts.searchHistoryPolicy ?? "allow-missing";
|
|
2235
|
+
assertSearchHistoryAdmissionOptions(opts);
|
|
2236
|
+
const seed = opts.seed ?? 42;
|
|
2237
|
+
const confidence = opts.confidence ?? .95;
|
|
2238
|
+
assertConfidence(confidence);
|
|
2239
|
+
const optimizationConcurrency = opts.optimizationConcurrency ?? 1;
|
|
2240
|
+
const comparisonCount = opts.methods.length * (opts.methods.length + 1) / 2;
|
|
2241
|
+
const intervalConfidence = 1 - (1 - confidence) / comparisonCount;
|
|
2242
|
+
const minimumResamples = minimumBootstrapResamples(confidence, comparisonCount);
|
|
2243
|
+
const resamples = opts.resamples ?? Math.max(2e3, minimumResamples);
|
|
2244
|
+
assertComparisonControls(opts, seed, resamples, confidence);
|
|
2245
|
+
const evidence = opts.evidence === void 0 ? void 0 : structuredClone(opts.evidence);
|
|
2246
|
+
const evidenceBySurface = /* @__PURE__ */ new Map();
|
|
2247
|
+
const storage = opts.storage ?? fsCampaignStorage();
|
|
2248
|
+
const resolvedRunDir = resolveRunDir(opts.runDir, opts.repo);
|
|
2249
|
+
const baselineSurface = structuredClone(opts.baselineSurface);
|
|
2250
|
+
const costLedger = opts.costLedger ?? createRunCostLedger({
|
|
2251
|
+
storage,
|
|
2252
|
+
runDir: `${resolvedRunDir}/cost`,
|
|
2253
|
+
costCeilingUsd: opts.costCeiling
|
|
2254
|
+
});
|
|
2255
|
+
const scoreOnTest = async (surface, tag, costPhase) => {
|
|
2256
|
+
const measuredSurface = structuredClone(surface);
|
|
2257
|
+
const campaign = await runCampaign({
|
|
2258
|
+
...opts,
|
|
2259
|
+
storage,
|
|
2260
|
+
costLedger,
|
|
2261
|
+
costPhase,
|
|
2262
|
+
scenarios: opts.testScenarios.map((scenario) => structuredClone(scenario)),
|
|
2263
|
+
dispatch: (scenario, ctx) => opts.dispatchWithSurface(structuredClone(measuredSurface), scenario, ctx),
|
|
2264
|
+
dispatchRef: `compareOptimizationMethods:${callerDispatchRef(opts)}:${surfaceContentHash(measuredSurface)}`,
|
|
2265
|
+
runDir: `${resolvedRunDir}/${tag}`
|
|
2266
|
+
});
|
|
2267
|
+
assertCompleteCampaign(campaign, opts.testScenarios, opts.reps ?? 1, true, `compareOptimizationMethods: ${tag} final comparison`);
|
|
2268
|
+
if (evidence) evidenceBySurface.set(surfaceContentHash(measuredSurface), createCampaignEvidenceReceipt({
|
|
2269
|
+
campaign,
|
|
2270
|
+
surface: measuredSurface,
|
|
2271
|
+
context: evidence
|
|
2272
|
+
}));
|
|
2273
|
+
const byScenario = {};
|
|
2274
|
+
for (const { scenarioId, composite } of campaignBreakdown(campaign).scenarios) byScenario[scenarioId] = composite;
|
|
2275
|
+
return byScenario;
|
|
2276
|
+
};
|
|
2277
|
+
const scenarioIds = opts.testScenarios.map((s) => s.id).sort();
|
|
2278
|
+
const unitByScenario = opts.claim ? evaluationUnitMap(opts.claim, opts.testScenarios) : new Map(scenarioIds.map((id) => [id, id]));
|
|
2279
|
+
const units = opts.claim ? summarizeEvaluationUnits(opts.claim, opts.testScenarios) : {
|
|
2280
|
+
observations: scenarioIds.length,
|
|
2281
|
+
independentUnits: scenarioIds.length,
|
|
2282
|
+
units: scenarioIds.map((id) => ({
|
|
2283
|
+
id,
|
|
2284
|
+
observations: 1
|
|
2285
|
+
}))
|
|
2286
|
+
};
|
|
2287
|
+
const aggregateUnits = (arr) => {
|
|
2288
|
+
const values = /* @__PURE__ */ new Map();
|
|
2289
|
+
scenarioIds.forEach((id, index) => {
|
|
2290
|
+
const unitId = unitByScenario.get(id);
|
|
2291
|
+
const bucket = values.get(unitId) ?? [];
|
|
2292
|
+
bucket.push(arr[index]);
|
|
2293
|
+
values.set(unitId, bucket);
|
|
2294
|
+
});
|
|
2295
|
+
return units.units.map((unit) => mean(values.get(unit.id)));
|
|
2296
|
+
};
|
|
2297
|
+
const decisionOptions = {
|
|
2298
|
+
seed,
|
|
2299
|
+
resamples,
|
|
2300
|
+
confidence: intervalConfidence,
|
|
2301
|
+
threshold: opts.claim?.minimumEffect ?? 0
|
|
2302
|
+
};
|
|
2303
|
+
const align = (byScenario, label) => {
|
|
2304
|
+
const missing = scenarioIds.filter((id) => !(id in byScenario));
|
|
2305
|
+
if (missing.length > 0) throw new Error(`compareOptimizationMethods: ${label} produced no test score for scenario(s) [${missing.join(", ")}]. A cell failed or its judges returned nothing. Fix the dispatch or judge; the comparison will not replace missing scores with zero.`);
|
|
2306
|
+
return scenarioIds.map((id) => byScenario[id]);
|
|
2307
|
+
};
|
|
2308
|
+
if (opts.claim?.generalization === "new-units") assertIndependentEvaluationSplit(opts.claim, opts.testScenarios, [...opts.trainScenarios, ...opts.selectionScenarios]);
|
|
2309
|
+
if (opts.finalEvidence) await reserveFinalEvidence(opts.finalEvidence, opts.claim, opts.testScenarios, [...opts.trainScenarios, ...opts.selectionScenarios]);
|
|
2310
|
+
const optimizationOwner = new AbortController();
|
|
2311
|
+
const optimized = await mapConcurrent(opts.methods, optimizationConcurrency, async (method) => {
|
|
2312
|
+
try {
|
|
2313
|
+
const { selected: out, cost, history: searchHistoryCoverage } = await executeOptimizationMethod({
|
|
2314
|
+
method,
|
|
2315
|
+
input: createOptimizationMethodInput(opts, method.name, resolvedRunDir, seed, baselineSurface, costLedger, optimizationOwner.signal),
|
|
2316
|
+
storage,
|
|
2317
|
+
searchHistoryPolicy: opts.searchHistoryPolicy,
|
|
2318
|
+
searchHistoryVerification: opts.searchHistoryVerification
|
|
2319
|
+
});
|
|
2320
|
+
const winnerSurface = out.winnerSurface;
|
|
2321
|
+
return {
|
|
2322
|
+
name: method.name,
|
|
2323
|
+
winnerSurface,
|
|
2324
|
+
cost,
|
|
2325
|
+
...out.durationMs === void 0 ? {} : { durationMs: out.durationMs },
|
|
2326
|
+
...out.composition === void 0 ? {} : { composition: out.composition },
|
|
2327
|
+
...out.provenance === void 0 ? {} : { provenance: out.provenance },
|
|
2328
|
+
searchHistoryCoverage
|
|
2329
|
+
};
|
|
2330
|
+
} catch (error) {
|
|
2331
|
+
if (!optimizationOwner.signal.aborted) optimizationOwner.abort(error);
|
|
2332
|
+
throw error;
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2335
|
+
assertReportedCostWithinCeiling(combineComparisonCosts(optimized.map((result) => ({
|
|
2336
|
+
label: `method '${result.name}'`,
|
|
2337
|
+
cost: result.cost
|
|
2338
|
+
}))).totalCostUsd, opts.costCeiling, "optimization");
|
|
2339
|
+
const testCostPhase = `compareOptimizationMethods.test:${contentHash({
|
|
2340
|
+
baseline: surfaceContentHash(baselineSurface),
|
|
2341
|
+
winners: optimized.map((winner) => ({
|
|
2342
|
+
name: winner.name,
|
|
2343
|
+
surface: surfaceContentHash(winner.winnerSurface)
|
|
2344
|
+
})),
|
|
2345
|
+
testScenarios: opts.testScenarios,
|
|
2346
|
+
judges: opts.judges.map((judge) => ({
|
|
2347
|
+
name: judge.name,
|
|
2348
|
+
dimensions: judge.dimensions,
|
|
2349
|
+
version: judge.judgeVersion ?? contentHash({
|
|
2350
|
+
score: judge.score.toString(),
|
|
2351
|
+
appliesTo: judge.appliesTo?.toString() ?? null
|
|
2352
|
+
})
|
|
2353
|
+
})),
|
|
2354
|
+
dispatch: callerDispatchRef(opts),
|
|
2355
|
+
seed,
|
|
2356
|
+
reps: opts.reps ?? 1
|
|
2357
|
+
})}`;
|
|
2358
|
+
const finalEvidence = opts.finalEvidence ? await exposeFinalEvidence(opts.finalEvidence, opts.claim, opts.testScenarios, [baselineSurface, ...optimized.map((method) => method.winnerSurface)]) : void 0;
|
|
2359
|
+
const baselineArr = align(await scoreOnTest(baselineSurface, "test/baseline", testCostPhase), "baseline");
|
|
2360
|
+
const testScoresBySurface = /* @__PURE__ */ new Map([[surfaceContentHash(baselineSurface), baselineArr]]);
|
|
2361
|
+
const winners = [];
|
|
2362
|
+
for (const winner of optimized) {
|
|
2363
|
+
const surfaceKey = surfaceContentHash(winner.winnerSurface);
|
|
2364
|
+
let arr = testScoresBySurface.get(surfaceKey);
|
|
2365
|
+
if (!arr) {
|
|
2366
|
+
arr = align(await scoreOnTest(winner.winnerSurface, `test/methods/${slug(winner.name)}`, testCostPhase), `method "${winner.name}"`);
|
|
2367
|
+
testScoresBySurface.set(surfaceKey, arr);
|
|
2368
|
+
}
|
|
2369
|
+
winners.push({
|
|
2370
|
+
...winner,
|
|
2371
|
+
arr
|
|
2372
|
+
});
|
|
2373
|
+
}
|
|
2374
|
+
const scores = winners.map((w) => {
|
|
2375
|
+
const baselineUnits = aggregateUnits(baselineArr);
|
|
2376
|
+
const winnerUnits = aggregateUnits(w.arr);
|
|
2377
|
+
const decision = decidePairedPromotion(baselineUnits, winnerUnits, decisionOptions);
|
|
2378
|
+
const score = {
|
|
2379
|
+
name: w.name,
|
|
2380
|
+
baselineComposite: mean(baselineUnits),
|
|
2381
|
+
winnerComposite: mean(winnerUnits),
|
|
2382
|
+
lift: decision.delta,
|
|
2383
|
+
liftCi: {
|
|
2384
|
+
low: decision.low,
|
|
2385
|
+
high: decision.high
|
|
2386
|
+
},
|
|
2387
|
+
decision,
|
|
2388
|
+
optimizationCost: w.cost,
|
|
2389
|
+
scenarioScores: scenarioIds.map((scenarioId, index) => ({
|
|
2390
|
+
scenarioId,
|
|
2391
|
+
baselineComposite: baselineArr[index],
|
|
2392
|
+
winnerComposite: w.arr[index],
|
|
2393
|
+
lift: w.arr[index] - baselineArr[index]
|
|
2394
|
+
})),
|
|
2395
|
+
unitScores: units.units.map((unit, index) => ({
|
|
2396
|
+
unitId: unit.id,
|
|
2397
|
+
scenarios: unit.observations,
|
|
2398
|
+
baselineComposite: baselineUnits[index],
|
|
2399
|
+
winnerComposite: winnerUnits[index],
|
|
2400
|
+
lift: winnerUnits[index] - baselineUnits[index]
|
|
2401
|
+
})),
|
|
2402
|
+
winnerSurface: structuredClone(w.winnerSurface),
|
|
2403
|
+
rank: 0
|
|
2404
|
+
};
|
|
2405
|
+
if (evidence) {
|
|
2406
|
+
const baseline = evidenceBySurface.get(surfaceContentHash(baselineSurface));
|
|
2407
|
+
const winner = evidenceBySurface.get(surfaceContentHash(w.winnerSurface));
|
|
2408
|
+
if (!baseline || !winner) throw new Error("final measurement evidence is missing");
|
|
2409
|
+
score.evidence = {
|
|
2410
|
+
baseline,
|
|
2411
|
+
winner
|
|
2412
|
+
};
|
|
2413
|
+
}
|
|
2414
|
+
if (w.composition !== void 0) score.composition = structuredClone(w.composition);
|
|
2415
|
+
if (w.durationMs !== void 0) score.durationMs = w.durationMs;
|
|
2416
|
+
if (w.provenance !== void 0) score.provenance = structuredClone(w.provenance);
|
|
2417
|
+
return score;
|
|
2418
|
+
});
|
|
2419
|
+
scores.sort((a, b) => b.lift - a.lift);
|
|
2420
|
+
for (let start = 0; start < scores.length;) {
|
|
2421
|
+
let end = start + 1;
|
|
2422
|
+
while (end < scores.length && scores[end].lift === scores[start].lift) end += 1;
|
|
2423
|
+
const tied = scores.slice(start, end);
|
|
2424
|
+
if (tied.every((score) => score.optimizationCost.accountingComplete)) {
|
|
2425
|
+
tied.sort((a, b) => a.optimizationCost.totalCostUsd - b.optimizationCost.totalCostUsd);
|
|
2426
|
+
scores.splice(start, tied.length, ...tied);
|
|
2427
|
+
}
|
|
2428
|
+
start = end;
|
|
2429
|
+
}
|
|
2430
|
+
scores.forEach((s, i) => {
|
|
2431
|
+
s.rank = i + 1;
|
|
2432
|
+
});
|
|
2433
|
+
const best = scores[0];
|
|
2434
|
+
const byName = new Map(winners.map((w) => [w.name, w]));
|
|
2435
|
+
const bestArr = aggregateUnits(byName.get(best.name).arr);
|
|
2436
|
+
const pairwise = scores.slice(1).map((other) => {
|
|
2437
|
+
const otherArr = aggregateUnits(byName.get(other.name).arr);
|
|
2438
|
+
const decision = decidePairedPromotion(otherArr, bestArr, decisionOptions);
|
|
2439
|
+
const reverse = decidePairedPromotion(bestArr, otherArr, decisionOptions);
|
|
2440
|
+
const favored = decision.promote ? best.name : reverse.promote ? other.name : null;
|
|
2441
|
+
return {
|
|
2442
|
+
a: best.name,
|
|
2443
|
+
b: other.name,
|
|
2444
|
+
deltaMean: decision.delta,
|
|
2445
|
+
low: decision.low,
|
|
2446
|
+
high: decision.high,
|
|
2447
|
+
favored,
|
|
2448
|
+
decision
|
|
2449
|
+
};
|
|
2450
|
+
});
|
|
2451
|
+
const optimizationCost = combineComparisonCosts(scores.map((score) => ({
|
|
2452
|
+
label: `method '${score.name}'`,
|
|
2453
|
+
cost: score.optimizationCost
|
|
2454
|
+
})));
|
|
2455
|
+
const testCost = costFromLedgerSummary(costLedger.summary({ phase: testCostPhase }));
|
|
2456
|
+
const totalCost = combineComparisonCosts([{
|
|
2457
|
+
label: "optimization",
|
|
2458
|
+
cost: optimizationCost
|
|
2459
|
+
}, {
|
|
2460
|
+
label: "final test",
|
|
2461
|
+
cost: testCost
|
|
2462
|
+
}]);
|
|
2463
|
+
assertReportedCostWithinCeiling(totalCost.totalCostUsd, opts.costCeiling, "total");
|
|
2464
|
+
return {
|
|
2465
|
+
scores,
|
|
2466
|
+
best,
|
|
2467
|
+
pairwise,
|
|
2468
|
+
testScenarioIds: scenarioIds,
|
|
2469
|
+
units,
|
|
2470
|
+
observationUnit: opts.claim ? "registered" : "scenario",
|
|
2471
|
+
pairedCellN: scenarioIds.length * (opts.reps ?? 1),
|
|
2472
|
+
...opts.claim ? { claim: opts.claim } : {},
|
|
2473
|
+
...finalEvidence ? { finalEvidence } : {},
|
|
2474
|
+
optimizationCost,
|
|
2475
|
+
testCost,
|
|
2476
|
+
totalCost,
|
|
2477
|
+
confidence,
|
|
2478
|
+
intervalConfidence,
|
|
2479
|
+
comparisonCount,
|
|
2480
|
+
seed,
|
|
2481
|
+
resamples,
|
|
2482
|
+
reps: opts.reps ?? 1,
|
|
2483
|
+
searchHistory: Object.freeze({
|
|
2484
|
+
policy: searchHistoryPolicy,
|
|
2485
|
+
allComplete: optimized.every((result) => result.searchHistoryCoverage.status === "complete"),
|
|
2486
|
+
producers: Object.freeze(optimized.map((result) => result.searchHistoryCoverage))
|
|
2487
|
+
})
|
|
2488
|
+
};
|
|
2489
|
+
}
|
|
2490
|
+
function mean(xs) {
|
|
2491
|
+
return xs.length === 0 ? 0 : mean$1(xs);
|
|
2492
|
+
}
|
|
2493
|
+
function assertReportedCostWithinCeiling(totalCostUsd, costCeiling, phase) {
|
|
2494
|
+
const tolerance = Number.EPSILON * Math.max(1, Math.abs(totalCostUsd), Math.abs(costCeiling ?? 0)) * 8;
|
|
2495
|
+
if (costCeiling !== void 0 && totalCostUsd > costCeiling + tolerance) throw new Error(`compareOptimizationMethods: reported ${phase} cost ${totalCostUsd} exceeds costCeiling ${costCeiling}`);
|
|
2496
|
+
}
|
|
2497
|
+
function assertOptimizationMethods(methods) {
|
|
2498
|
+
if (!Array.isArray(methods) || methods.length === 0) throw new Error("compareOptimizationMethods: no methods to compare");
|
|
2499
|
+
const names = /* @__PURE__ */ new Set();
|
|
2500
|
+
const pathOwners = /* @__PURE__ */ new Map();
|
|
2501
|
+
for (const method of methods) {
|
|
2502
|
+
if (!method || typeof method !== "object" || typeof method.optimize !== "function") throw new Error("compareOptimizationMethods: every method must provide optimize(input)");
|
|
2503
|
+
if (!method.name || method.name.trim() !== method.name) throw new Error("compareOptimizationMethods: method names must be trimmed and non-empty");
|
|
2504
|
+
if (names.has(method.name)) throw new Error(`compareOptimizationMethods: duplicate method name '${method.name}'`);
|
|
2505
|
+
names.add(method.name);
|
|
2506
|
+
const pathKey = slug(method.name);
|
|
2507
|
+
const prior = pathOwners.get(pathKey);
|
|
2508
|
+
if (prior) throw new Error(`compareOptimizationMethods: method names '${prior}' and '${method.name}' map to the same run path '${pathKey}'`);
|
|
2509
|
+
pathOwners.set(pathKey, method.name);
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
function assertComparisonControls(opts, seed, resamples, confidence) {
|
|
2513
|
+
if (opts.optimizationRunOptions && "costCeiling" in opts.optimizationRunOptions) throw new Error("compareOptimizationMethods: optimizationRunOptions.costCeiling is not supported; costCeiling covers optimization and final scoring");
|
|
2514
|
+
if (!opts.judges || opts.judges.length === 0) throw new Error("compareOptimizationMethods: at least one judge is required");
|
|
2515
|
+
if (typeof opts.dispatchWithSurface !== "function") throw new Error("compareOptimizationMethods: dispatchWithSurface must be a function");
|
|
2516
|
+
if (opts.dispatchRef !== void 0 && (typeof opts.dispatchRef !== "string" || opts.dispatchRef.trim().length === 0 || opts.dispatchRef.trim() !== opts.dispatchRef)) throw new Error("compareOptimizationMethods: dispatchRef must be trimmed and non-empty when provided");
|
|
2517
|
+
const optimizationDispatchRef = opts.optimizationRunOptions?.dispatchRef;
|
|
2518
|
+
if (optimizationDispatchRef !== void 0 && (typeof optimizationDispatchRef !== "string" || optimizationDispatchRef.trim().length === 0 || optimizationDispatchRef.trim() !== optimizationDispatchRef)) throw new Error("compareOptimizationMethods: optimizationRunOptions.dispatchRef must be trimmed and non-empty when provided");
|
|
2519
|
+
if (opts.dispatchRef !== void 0 && optimizationDispatchRef !== void 0 && opts.dispatchRef !== optimizationDispatchRef) throw new Error("compareOptimizationMethods: dispatchRef must match optimizationRunOptions.dispatchRef when both are provided");
|
|
2520
|
+
try {
|
|
2521
|
+
surfaceContentHash(opts.baselineSurface);
|
|
2522
|
+
} catch (cause) {
|
|
2523
|
+
throw new Error("compareOptimizationMethods: baselineSurface is invalid", { cause });
|
|
2524
|
+
}
|
|
2525
|
+
const judgeNames = /* @__PURE__ */ new Set();
|
|
2526
|
+
for (const judge of opts.judges) {
|
|
2527
|
+
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)");
|
|
2528
|
+
if (judgeNames.has(judge.name)) throw new Error(`compareOptimizationMethods: duplicate judge name '${judge.name}'`);
|
|
2529
|
+
judgeNames.add(judge.name);
|
|
2530
|
+
const dimensionKeys = /* @__PURE__ */ new Set();
|
|
2531
|
+
for (const dimension of judge.dimensions) {
|
|
2532
|
+
if (!dimension || typeof dimension.key !== "string" || dimension.key.trim().length === 0 || dimension.key.trim() !== dimension.key || typeof dimension.description !== "string" || dimension.description.trim().length === 0) throw new Error(`compareOptimizationMethods: judge '${judge.name}' has an invalid dimension`);
|
|
2533
|
+
if (dimensionKeys.has(dimension.key)) throw new Error(`compareOptimizationMethods: judge '${judge.name}' has duplicate dimension '${dimension.key}'`);
|
|
2534
|
+
dimensionKeys.add(dimension.key);
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
if (typeof opts.runDir !== "string" || opts.runDir.trim().length === 0) throw new Error("compareOptimizationMethods: runDir must be a non-empty string");
|
|
2538
|
+
if (!Number.isSafeInteger(seed)) throw new Error(`compareOptimizationMethods: seed must be a safe integer, got ${String(seed)}`);
|
|
2539
|
+
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)}`);
|
|
2540
|
+
assertConfidence(confidence);
|
|
2541
|
+
const minimumResamples = minimumBootstrapResamples(confidence, opts.methods.length * (opts.methods.length + 1) / 2);
|
|
2542
|
+
if (resamples < minimumResamples) throw new Error(`compareOptimizationMethods: resamples must be at least ${minimumResamples} for simultaneous confidence ${confidence} across ${opts.methods.length} methods, got ${resamples}`);
|
|
2543
|
+
if (opts.optimizationConcurrency !== void 0 && (!Number.isSafeInteger(opts.optimizationConcurrency) || opts.optimizationConcurrency <= 0)) throw new Error("compareOptimizationMethods: optimizationConcurrency must be a positive safe integer");
|
|
2544
|
+
if (opts.maxConcurrency !== void 0 && (!Number.isSafeInteger(opts.maxConcurrency) || opts.maxConcurrency <= 0)) throw new Error("compareOptimizationMethods: maxConcurrency must be a positive safe integer");
|
|
2545
|
+
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");
|
|
2546
|
+
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");
|
|
2547
|
+
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");
|
|
2548
|
+
}
|
|
2549
|
+
function assertComparisonPartitions(opts) {
|
|
2550
|
+
const partitions = [
|
|
2551
|
+
{
|
|
2552
|
+
name: "trainScenarios",
|
|
2553
|
+
scenarios: opts.trainScenarios
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
name: "selectionScenarios",
|
|
2557
|
+
scenarios: opts.selectionScenarios
|
|
2558
|
+
},
|
|
2559
|
+
{
|
|
2560
|
+
name: "testScenarios",
|
|
2561
|
+
scenarios: opts.testScenarios
|
|
2562
|
+
}
|
|
2563
|
+
];
|
|
2564
|
+
const owner = /* @__PURE__ */ new Map();
|
|
2565
|
+
for (const partition of partitions) {
|
|
2566
|
+
if (!Array.isArray(partition.scenarios) || partition.scenarios.length === 0) throw new Error(`compareOptimizationMethods: ${partition.name} is empty`);
|
|
2567
|
+
if (partition.name === "testScenarios" && partition.scenarios.length < 2) throw new Error("compareOptimizationMethods: testScenarios requires at least 2 scenarios to estimate uncertainty");
|
|
2568
|
+
const local = /* @__PURE__ */ new Set();
|
|
2569
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
2570
|
+
const overlaps = /* @__PURE__ */ new Map();
|
|
2571
|
+
for (const scenario of partition.scenarios) {
|
|
2572
|
+
if (local.has(scenario.id)) duplicates.add(scenario.id);
|
|
2573
|
+
local.add(scenario.id);
|
|
2574
|
+
const prior = owner.get(scenario.id);
|
|
2575
|
+
if (prior !== void 0 && prior !== partition.name) overlaps.set(scenario.id, prior);
|
|
2576
|
+
}
|
|
2577
|
+
if (duplicates.size > 0) throw new Error(`compareOptimizationMethods: ${partition.name} contains duplicate scenario id(s) [${[...duplicates].join(", ")}]`);
|
|
2578
|
+
if (overlaps.size > 0) {
|
|
2579
|
+
const detail = [...overlaps].map(([id, prior]) => `${id} (${prior} ∩ ${partition.name})`).join(", ");
|
|
2580
|
+
throw new Error(`compareOptimizationMethods: trainScenarios, selectionScenarios, and testScenarios must be pairwise disjoint; overlap: [${detail}]`);
|
|
2581
|
+
}
|
|
2582
|
+
assertCampaignDesign(partition.scenarios, opts.reps ?? 1);
|
|
2583
|
+
for (const id of local) owner.set(id, partition.name);
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
function slug(name) {
|
|
2587
|
+
return name.replace(/[^a-z0-9]+/gi, "-").replace(/^-|-$/g, "").toLowerCase() || "method";
|
|
2588
|
+
}
|
|
2589
|
+
function assertConfidence(confidence) {
|
|
2590
|
+
if (!Number.isFinite(confidence) || confidence <= 0 || confidence >= 1) throw new Error(`compareOptimizationMethods: confidence must be a finite number in (0,1), got ${String(confidence)}`);
|
|
2591
|
+
}
|
|
2592
|
+
function minimumBootstrapResamples(confidence, comparisonCount) {
|
|
2593
|
+
const exact = 2 * comparisonCount / (1 - confidence);
|
|
2594
|
+
return Math.ceil(exact - Number.EPSILON * Math.max(1, exact) * 32);
|
|
2595
|
+
}
|
|
2596
|
+
function createOptimizationMethodInput(opts, methodName, resolvedRunDir, seed, baselineSurface, costLedger, optimizationSignal) {
|
|
2597
|
+
const methodRunDir = `${resolvedRunDir}/optimization/${slug(methodName)}`;
|
|
2598
|
+
const signal = combineAbortSignals(opts.signal, opts.optimizationRunOptions?.signal, optimizationSignal);
|
|
2599
|
+
return Object.freeze({
|
|
2600
|
+
baselineSurface: structuredClone(baselineSurface),
|
|
2601
|
+
trainScenarios: opts.trainScenarios,
|
|
2602
|
+
selectionScenarios: opts.selectionScenarios,
|
|
2603
|
+
dispatchWithSurface: opts.dispatchWithSurface,
|
|
2604
|
+
judges: opts.judges,
|
|
2605
|
+
runDir: methodRunDir,
|
|
2606
|
+
seed,
|
|
2607
|
+
runOptions: Object.freeze({
|
|
2608
|
+
...opts.optimizationRunOptions ?? {},
|
|
2609
|
+
...opts.optimizationRunOptions?.dispatchRef === void 0 && opts.dispatchRef !== void 0 ? { dispatchRef: opts.dispatchRef } : {},
|
|
2610
|
+
...signal ? { signal } : {}
|
|
2611
|
+
}),
|
|
2612
|
+
costLedger
|
|
2613
|
+
});
|
|
2614
|
+
}
|
|
2615
|
+
function callerDispatchRef(opts) {
|
|
2616
|
+
return (opts.dispatchRef ?? opts.dispatchWithSurface.name) || "anonymous";
|
|
2617
|
+
}
|
|
2203
2618
|
const MAX_TIMER_DELAY_MS = 2147483647;
|
|
2204
2619
|
function snapshotSkillOptOptimizationConfig(config) {
|
|
2205
2620
|
const runner = snapshotExternalOptimizerRunner(config.runner);
|
|
@@ -2581,6 +2996,6 @@ function skillOptOptimizationMethod(config) {
|
|
|
2581
2996
|
};
|
|
2582
2997
|
}
|
|
2583
2998
|
//#endregion
|
|
2584
|
-
export {
|
|
2999
|
+
export { runReferenceEquivalenceJudge as _, importExternalEvaluations as a, recordSkillOptSearch as c, externalTextOptimizationMethod as d, decodeExternalTextCandidate as f, createReferenceEquivalenceJudge as g, REFERENCE_EQUIVALENCE_JUDGE_VERSION as h, externalSurface as i, heldOutGate as l, REFERENCE_EQUIVALENCE_INPUT_LIMITS as m, compareOptimizationMethods as n, importGepaPopulation as o, readExternalOptimizerObservationArtifact as p, gepaOptimizationMethod as r, recordGepaSearch as s, skillOptOptimizationMethod as t, composeGate as u };
|
|
2585
3000
|
|
|
2586
|
-
//# sourceMappingURL=skillopt-optimization-method-
|
|
3001
|
+
//# sourceMappingURL=skillopt-optimization-method-BiwA8nfX.js.map
|