@tangle-network/agent-eval 0.215.1 → 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 +51 -0
- package/dist/adapters/http.d.ts +3 -3
- package/dist/{agent-profile-DmzL8KaJ.d.ts → agent-profile-VFcQncbW.d.ts} +5 -5
- package/dist/{agent-profile-DmzL8KaJ.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-BEWLIF3_.js +186 -0
- package/dist/agreement-irr-BEWLIF3_.js.map +1 -0
- package/dist/analyst/index.d.ts +487 -14
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +1547 -12
- package/dist/analyst/index.js.map +1 -1
- 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-BhFLOztS.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-CgpGi7vY.js → benchmark-command-By0vh8q7.js} +71 -70
- 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 +14 -14
- package/dist/{campaign-CpnsCgfz.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-qcUWYFl-.js +66 -0
- package/dist/cluster-bootstrap-qcUWYFl-.js.map +1 -0
- package/dist/contract/index.d.ts +11 -11
- package/dist/contract/index.js +1023 -1079
- 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-KP4-Tolz.js → default-registry-COhk9g36.js} +744 -759
- package/dist/default-registry-COhk9g36.js.map +1 -0
- package/dist/{default-registry-B4B7GMvI.d.ts → default-registry-DzHiGruW.d.ts} +6 -6
- package/dist/{default-registry-B4B7GMvI.d.ts.map → default-registry-DzHiGruW.d.ts.map} +1 -1
- package/dist/{define-agent-eval-BdfnqXeP.js → define-agent-eval-CNTPzIkp.js} +10 -10
- package/dist/define-agent-eval-CNTPzIkp.js.map +1 -0
- package/dist/{define-agent-eval-DfXvNho5.d.ts → define-agent-eval-WSck0CZJ.d.ts} +8 -8
- package/dist/{define-agent-eval-DfXvNho5.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-DZfHM7kT.js → dspy-rlm-engine-LRCu61m5.js} +3 -3
- package/dist/{dspy-rlm-engine-DZfHM7kT.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-C37HS2kr.d.ts → engine-3A_4jOlI.d.ts} +5 -5
- package/dist/{engine-C37HS2kr.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-6Yoi74gM.d.ts +75 -0
- package/dist/evaluation-6Yoi74gM.d.ts.map +1 -0
- package/dist/evaluation.d.ts +2 -74
- package/dist/evaluation.js +1 -1
- package/dist/{exact-types-Dlb73wN4.d.ts → exact-types-ClugMJfI.d.ts} +2 -2
- package/dist/{exact-types-Dlb73wN4.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-GngofQML.js → external-optimizer-process-BjMGUuds.js} +3 -3
- package/dist/{external-optimizer-process-GngofQML.js.map → external-optimizer-process-BjMGUuds.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-BUxifb8g.js → external-optimizer-subprocess-BqW0hHcI.js} +791 -532
- package/dist/external-optimizer-subprocess-BqW0hHcI.js.map +1 -0
- package/dist/{feedback-trajectory-BLN_6fEs.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-B3WBm953.d.ts → index-CyszSg4O.d.ts} +165 -162
- package/dist/index-CyszSg4O.d.ts.map +1 -0
- package/dist/{index-B7m2uzJL.d.ts → index-DPcngtwt.d.ts} +30 -17
- package/dist/index-DPcngtwt.d.ts.map +1 -0
- package/dist/{index-tYLUvk_w.d.ts → index-DV-jSzxF.d.ts} +9 -9
- package/dist/{index-tYLUvk_w.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 +162 -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-AaEhUADH.js → kind-factory-BobI5Jy3.js} +5 -5
- package/dist/{kind-factory-AaEhUADH.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-Cd5s5Ei6.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-DXVAJMLD.d.ts → matrix-DSrSxjjy.d.ts} +4 -4
- package/dist/{matrix-DXVAJMLD.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 -70
- 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-BHia9vDz.d.ts → prime-protocol-HiB9HX7E.d.ts} +3 -3
- package/dist/{prime-protocol-BHia9vDz.d.ts.map → prime-protocol-HiB9HX7E.d.ts.map} +1 -1
- package/dist/{produced-state-BGp4BX8t.js → produced-state-BsDmnwxc.js} +8 -8
- package/dist/{produced-state-BGp4BX8t.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-CXblsskH.js → proposal-findings-CY1xKn_a.js} +2 -36
- package/dist/proposal-findings-CY1xKn_a.js.map +1 -0
- 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-CMYIaDgS.d.ts → registry-D7_hm2fK.d.ts} +11 -13
- package/dist/registry-D7_hm2fK.d.ts.map +1 -0
- 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-CtIIsQKP.js → report-command-SC9nqb4M.js} +128 -177
- 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-BqyBZ9Wm.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-BPqbwIVs.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-Dcepr6QL.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-CJTj2EoS.d.ts → statistical-heldout-CYpGaoDH.d.ts} +3 -3
- package/dist/{statistical-heldout-CJTj2EoS.d.ts.map → statistical-heldout-CYpGaoDH.d.ts.map} +1 -1
- package/dist/{store-otlp-DWVhUgEj.js → store-otlp-DJ9dtA5x.js} +135 -132
- package/dist/store-otlp-DJ9dtA5x.js.map +1 -0
- package/dist/{store-tool-spans-BNICrhsb.js → store-tool-spans-CIX5arAG.js} +7 -7
- package/dist/{store-tool-spans-BNICrhsb.js.map → store-tool-spans-CIX5arAG.js.map} +1 -1
- package/dist/{store-tool-spans-BNzls3OD.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 +154 -150
- 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-BomhHr2c.d.ts +135 -0
- package/dist/systemone-BomhHr2c.d.ts.map +1 -0
- package/dist/systemone-protocol.js +1 -1
- package/dist/{systemone-review-C4dZgrgN.d.ts → systemone-review-CUVcQJu6.d.ts} +2 -2
- package/dist/{systemone-review-C4dZgrgN.d.ts.map → systemone-review-CUVcQJu6.d.ts.map} +1 -1
- package/dist/{systemone-review-DTClwgmE.js → systemone-review-D7sXwsqq.js} +3 -3
- package/dist/{systemone-review-DTClwgmE.js.map → systemone-review-D7sXwsqq.js.map} +1 -1
- package/dist/systemone.d.ts +4 -134
- 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-BKRrtqy4.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-BYt5rdt8.js → tool-waste-BlesqTqW.js} +5 -158
- package/dist/tool-waste-BlesqTqW.js.map +1 -0
- package/dist/{trace-questions-CLx8vt6t.d.ts → trace-questions-CM2CAocU.d.ts} +4 -4
- package/dist/{trace-questions-CLx8vt6t.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-DjOMwGY_.d.ts → types-BqkVmHfv.d.ts} +7 -1
- package/dist/types-BqkVmHfv.d.ts.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-DHb5TI36.d.ts → types-C1tnkEgM.d.ts} +347 -6
- package/dist/types-C1tnkEgM.d.ts.map +1 -0
- package/dist/{types-DinHtRJp.d.ts → types-Cbe2fWBa.d.ts} +3 -3
- package/dist/{types-DinHtRJp.d.ts.map → types-Cbe2fWBa.d.ts.map} +1 -1
- package/dist/{types-CGEmVYOk.d.ts → types-Cq8mSbq8.d.ts} +78 -72
- package/dist/types-Cq8mSbq8.d.ts.map +1 -0
- package/dist/{types-CW5b90JH.js → types-IXD2HJzu.js} +16 -3
- package/dist/types-IXD2HJzu.js.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/concepts.md +1 -0
- 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/docs/finding-layers.md +69 -0
- package/package.json +1 -1
- package/dist/analyze-runs-3xpby3p2.js.map +0 -1
- package/dist/analyze-runs-BhFLOztS.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-CgpGi7vY.js.map +0 -1
- package/dist/campaign-CpnsCgfz.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/default-registry-KP4-Tolz.js.map +0 -1
- package/dist/define-agent-eval-BdfnqXeP.js.map +0 -1
- package/dist/evaluation.d.ts.map +0 -1
- package/dist/external-optimizer-subprocess-BUxifb8g.js.map +0 -1
- package/dist/feedback-trajectory-BLN_6fEs.d.ts.map +0 -1
- package/dist/index-B3WBm953.d.ts.map +0 -1
- package/dist/index-B7m2uzJL.d.ts.map +0 -1
- package/dist/index-CPJJr98o.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-Cd5s5Ei6.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/proposal-findings-CXblsskH.js.map +0 -1
- package/dist/redact-Cveoq6fJ.d.ts.map +0 -1
- package/dist/redact-Dk1ZdJEm.js.map +0 -1
- package/dist/registry-CMYIaDgS.d.ts.map +0 -1
- package/dist/release-confidence-BK2QCB5M.d.ts.map +0 -1
- package/dist/report-command-CtIIsQKP.js.map +0 -1
- package/dist/run-record-ES07wfz9.js.map +0 -1
- package/dist/search-kernel-BqyBZ9Wm.d.ts.map +0 -1
- package/dist/search-kernel-BztlERLv.js.map +0 -1
- package/dist/search-ledger-d7V8o9Lk.js.map +0 -1
- package/dist/semantic-concept-judge-BPqbwIVs.js.map +0 -1
- package/dist/skillopt-optimization-method-Dcepr6QL.js.map +0 -1
- package/dist/store-otlp-DWVhUgEj.js.map +0 -1
- package/dist/store-tool-spans-BNzls3OD.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/systemone.d.ts.map +0 -1
- package/dist/terminal-record-BHocwFw1.js.map +0 -1
- package/dist/tool-groups-BKRrtqy4.d.ts.map +0 -1
- package/dist/tool-waste-BYt5rdt8.js.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-CGEmVYOk.d.ts.map +0 -1
- package/dist/types-CW5b90JH.js.map +0 -1
- package/dist/types-DBZ7keha.d.ts.map +0 -1
- package/dist/types-DHb5TI36.d.ts.map +0 -1
- package/dist/types-DjOMwGY_.d.ts.map +0 -1
package/dist/experiment/index.js
CHANGED
|
@@ -1,22 +1,317 @@
|
|
|
1
|
-
import { n as CaptureIntegrityError, s as ValidationError } from "../errors-
|
|
2
|
-
import { a as hashCanonical, t as LEDGER_HASH_PATTERN } from "../canonical-
|
|
3
|
-
import { f as evaluateHypothesis, g as verifyManifest, h as signManifest, m as manifestContentDigest, p as hashJson } from "../agent-profile-cell-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as requiredSampleSize, i as requiredPairedSampleSize, n as mcnemarRequiredN, r as pairedMde, t as mcnemarPower } from "../power-and-mde-
|
|
10
|
-
import { n as pairArms, r as pairRunRecords, t as comparePairedArms } from "../paired-arms-
|
|
11
|
-
import { t as eProcess } from "../sequential-eprocess-
|
|
12
|
-
import { a as heldoutSignificance, o as pairHoldout } from "../statistical-heldout-
|
|
13
|
-
import { D as FinalEvidenceError, E as FinalEvidenceConflictError, O as openFinalEvidenceLedger, T as powerPreflight, a as verifyEvidenceReceipt, i as isIndependentEvidence, n as EVIDENCE_RECEIPT_VERSION, r as createEvidenceReceipt, t as createCampaignEvidenceReceipt } from "../campaign-evidence-
|
|
14
|
-
import {
|
|
15
|
-
import { r as summarizeEvaluationUnits, t as defineEvaluationClaim } from "../claim-
|
|
1
|
+
import { n as CaptureIntegrityError, s as ValidationError } from "../errors-DVZiqS7K.js";
|
|
2
|
+
import { a as hashCanonical, t as LEDGER_HASH_PATTERN } from "../canonical-B2RqLofv.js";
|
|
3
|
+
import { f as evaluateHypothesis, g as verifyManifest, h as signManifest, m as manifestContentDigest, p as hashJson } from "../agent-profile-cell-BK8mlqlq.js";
|
|
4
|
+
import { t as mulberry32 } from "../random-ByUSnV9w.js";
|
|
5
|
+
import { n as bonferroni, r as holm, t as benjaminiHochberg } from "../multiplicity-DQUFcbW4.js";
|
|
6
|
+
import { a as pairedRiskDifferenceExact, c as wilson, i as pairedRiskDifference, n as mcnemar, o as pairedRiskDifferenceScore } from "../paired-binary-CvpFHfKZ.js";
|
|
7
|
+
import { n as studentTQuantile, t as studentTCdf } from "../student-t-DVPW7CdL.js";
|
|
8
|
+
import { i as pairedBootstrap, n as BOOTSTRAP_GATE_MIN_N } from "../mean-DHoMiudD.js";
|
|
9
|
+
import { a as requiredSampleSize, i as requiredPairedSampleSize, n as mcnemarRequiredN, r as pairedMde, t as mcnemarPower } from "../power-and-mde-Hj2ubb4B.js";
|
|
10
|
+
import { n as pairArms, r as pairRunRecords, t as comparePairedArms } from "../paired-arms-CwMGJsrS.js";
|
|
11
|
+
import { t as eProcess } from "../sequential-eprocess-DM_qENCl.js";
|
|
12
|
+
import { a as heldoutSignificance, o as pairHoldout } from "../statistical-heldout-42NlCNDe.js";
|
|
13
|
+
import { D as FinalEvidenceError, E as FinalEvidenceConflictError, O as openFinalEvidenceLedger, T as powerPreflight, a as verifyEvidenceReceipt, i as isIndependentEvidence, n as EVIDENCE_RECEIPT_VERSION, r as createEvidenceReceipt, t as createCampaignEvidenceReceipt } from "../campaign-evidence-Clrn4hBV.js";
|
|
14
|
+
import { n as evaluatePredicate, r as readField, t as compareValues } from "../predicate-FdKmElA_.js";
|
|
15
|
+
import { r as summarizeEvaluationUnits, t as defineEvaluationClaim } from "../claim-q4HQhK1G.js";
|
|
16
16
|
import { n as pairedEvalueSequence, r as sequentialCrossingHorizon } from "../sequential-CzK5DarL.js";
|
|
17
|
-
import { n as
|
|
18
|
-
import { n as
|
|
17
|
+
import { n as intervalSpecProblems, r as computeEstimand, t as computeInterval } from "../interval-CELpye1n.js";
|
|
18
|
+
import { n as paretoPolicy, r as paretoSignificanceGate, t as buildEvidenceVector } from "../promotion-policy-KO57gbyV.js";
|
|
19
|
+
import { n as sequentialPairedGate, t as sequentialDecide } from "../sequential-Bf_pbE50.js";
|
|
19
20
|
import { z } from "zod";
|
|
21
|
+
//#region src/experiment/ast/budget.ts
|
|
22
|
+
function evaluateHaltRule(halt, gates) {
|
|
23
|
+
const seen = new Map(gates.map((g) => [g.id, g]));
|
|
24
|
+
const missing = halt.when.gates.filter((id) => !seen.has(id));
|
|
25
|
+
if (missing.length > 0) throw new ValidationError(`evaluateHaltRule: halt references gates that were not evaluated: [${missing.join(", ")}]`);
|
|
26
|
+
const failed = halt.when.gates.filter((id) => !seen.get(id).passed);
|
|
27
|
+
return failed.length > 0 ? {
|
|
28
|
+
fired: true,
|
|
29
|
+
action: halt.action,
|
|
30
|
+
failedGates: failed
|
|
31
|
+
} : {
|
|
32
|
+
fired: false,
|
|
33
|
+
action: null,
|
|
34
|
+
failedGates: []
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Execute the uniform-pass schedule against measured pass costs. Pass 1 always
|
|
39
|
+
* runs; each later pass runs only when the cumulative spend plus the last
|
|
40
|
+
* measured pass cost stays at or under the registered ceiling. The registered
|
|
41
|
+
* ledger is the pre-spend the ceiling counts.
|
|
42
|
+
*/
|
|
43
|
+
function runUniformPassBudget(rule, measuredPassCosts) {
|
|
44
|
+
let cumulative = rule.ledger.reduce((sum, entry) => sum + entry.usd, 0);
|
|
45
|
+
const decisions = [];
|
|
46
|
+
let uniformN = 0;
|
|
47
|
+
for (let pass = 1; pass <= rule.maxPasses; pass++) {
|
|
48
|
+
if (pass === 1) {
|
|
49
|
+
if (measuredPassCosts[0] === void 0) break;
|
|
50
|
+
cumulative += measuredPassCosts[0];
|
|
51
|
+
uniformN = 1;
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const projected = measuredPassCosts[pass - 2];
|
|
55
|
+
if (projected === void 0) break;
|
|
56
|
+
const go = cumulative + projected <= rule.ceilingUsd;
|
|
57
|
+
decisions.push({
|
|
58
|
+
pass,
|
|
59
|
+
cumulativeBefore: cumulative,
|
|
60
|
+
projected,
|
|
61
|
+
go
|
|
62
|
+
});
|
|
63
|
+
if (!go || measuredPassCosts[pass - 1] === void 0) break;
|
|
64
|
+
cumulative += measuredPassCosts[pass - 1];
|
|
65
|
+
uniformN = pass;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
decisions,
|
|
69
|
+
uniformN
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Walk the registered n-ladder and pick the first affordable step. When no
|
|
74
|
+
* step fits the ceiling, the rule refuses and reports the projection instead
|
|
75
|
+
* of shrinking the row set — "never subset rows" is the registered invariant.
|
|
76
|
+
*/
|
|
77
|
+
function projectNLadderBudget(rule, measured) {
|
|
78
|
+
const projections = rule.steps.map((n) => {
|
|
79
|
+
const projectedUsd = measured.unitCostUsd * measured.rows * n;
|
|
80
|
+
return {
|
|
81
|
+
n,
|
|
82
|
+
projectedUsd,
|
|
83
|
+
affordable: projectedUsd <= rule.ceilingUsd
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
const first = projections.find((p) => p.affordable);
|
|
87
|
+
if (first) return {
|
|
88
|
+
chosenN: first.n,
|
|
89
|
+
projections,
|
|
90
|
+
refusal: null
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
chosenN: null,
|
|
94
|
+
projections,
|
|
95
|
+
refusal: {
|
|
96
|
+
onExhaust: rule.onExhaust,
|
|
97
|
+
reason: `no ladder step fits the ${rule.ceilingUsd} USD ceiling at ${measured.rows} rows x ${measured.unitCostUsd} USD per unit`
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/experiment/ast/decision.ts
|
|
103
|
+
/** A decision rule's branches did not cover the evidence. */
|
|
104
|
+
var DecisionTableNotTotalError = class extends ValidationError {};
|
|
105
|
+
function evaluateCondition(condition, evidence) {
|
|
106
|
+
switch (condition.kind) {
|
|
107
|
+
case "interval-excludes-zero": {
|
|
108
|
+
const interval = evidence.intervals[condition.interval];
|
|
109
|
+
if (!interval) throw new ValidationError(`evaluateCondition: interval '${condition.interval}' is not in the evidence`);
|
|
110
|
+
return (interval.lower > 0 || interval.upper < 0) && (condition.sign === "positive" ? interval.lower > 0 : interval.upper < 0);
|
|
111
|
+
}
|
|
112
|
+
case "interval-includes-zero": {
|
|
113
|
+
const interval = evidence.intervals[condition.interval];
|
|
114
|
+
if (!interval) throw new ValidationError(`evaluateCondition: interval '${condition.interval}' is not in the evidence`);
|
|
115
|
+
return interval.lower <= 0 && interval.upper >= 0;
|
|
116
|
+
}
|
|
117
|
+
case "quantity-threshold": {
|
|
118
|
+
const value = evidence.quantities[condition.quantity];
|
|
119
|
+
if (value === void 0) throw new ValidationError(`evaluateCondition: quantity '${condition.quantity}' is not in the evidence`);
|
|
120
|
+
return compareValues(value, condition.op, condition.value);
|
|
121
|
+
}
|
|
122
|
+
case "obligation-met": return evidence.obligationsMet[condition.obligation] === true;
|
|
123
|
+
case "all": return condition.of.every((c) => evaluateCondition(c, evidence));
|
|
124
|
+
case "any": return condition.of.some((c) => evaluateCondition(c, evidence));
|
|
125
|
+
case "not": return !evaluateCondition(condition.of, evidence);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function executeDecisionRule(rule, evidence) {
|
|
129
|
+
if (rule.kind === "report-only") return {
|
|
130
|
+
verdict: "report-only",
|
|
131
|
+
report: [...rule.estimands, ...rule.intervals]
|
|
132
|
+
};
|
|
133
|
+
for (const branch of rule.branches) if (evaluateCondition(branch.when, evidence)) return {
|
|
134
|
+
verdict: branch.verdict,
|
|
135
|
+
report: branch.report
|
|
136
|
+
};
|
|
137
|
+
throw new DecisionTableNotTotalError("executeDecisionRule: decision table is not total — no branch matched the evidence");
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/experiment/ast/reissue.ts
|
|
141
|
+
/**
|
|
142
|
+
* Classify one rollout event under the registered reissue policy. A carrier
|
|
143
|
+
* event within the issue budget is reissued; a model outcome always stands;
|
|
144
|
+
* a carrier event past `maxIssues` is exhausted and reported, never retried.
|
|
145
|
+
*/
|
|
146
|
+
function classifyReissue(policy, event, issuesSoFar) {
|
|
147
|
+
if (!policy.carrierEvents.includes(event)) return "stands";
|
|
148
|
+
return issuesSoFar < policy.maxIssues ? "reissue" : "exhausted";
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/experiment/ast/selection.ts
|
|
152
|
+
/**
|
|
153
|
+
* Execute a selection rule.
|
|
154
|
+
*
|
|
155
|
+
* Round-robin walks groups in lexicographic order and takes ids in
|
|
156
|
+
* within-group order until `take` ids are chosen. Filter-of keeps the ids of
|
|
157
|
+
* `bases[rule.base]` whose record satisfies the predicate, in the registered
|
|
158
|
+
* order. Ids absent from `records` are evaluated on their id alone (fields
|
|
159
|
+
* derived from the id via `idFields`), so a sealed base outlives its source
|
|
160
|
+
* records.
|
|
161
|
+
*/
|
|
162
|
+
function runSelectionRule(rule, records, options) {
|
|
163
|
+
if (rule.kind === "round-robin") {
|
|
164
|
+
const allowed = new Set(rule.reads);
|
|
165
|
+
for (const field of [rule.groupBy, rule.withinOrder.field]) if (!allowed.has(field)) throw new ValidationError(`runSelectionRule: round-robin reads '${field}' but its closed read set is [${rule.reads.join(", ")}]`);
|
|
166
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
167
|
+
for (const record of records) {
|
|
168
|
+
const group = String(readField(record, rule.groupBy));
|
|
169
|
+
const id = String(readField(record, rule.withinOrder.field));
|
|
170
|
+
const bucket = byGroup.get(group);
|
|
171
|
+
if (bucket) bucket.push(id);
|
|
172
|
+
else byGroup.set(group, [id]);
|
|
173
|
+
}
|
|
174
|
+
for (const ids of byGroup.values()) {
|
|
175
|
+
ids.sort();
|
|
176
|
+
if (rule.withinOrder.dir === "desc") ids.reverse();
|
|
177
|
+
}
|
|
178
|
+
const groups = [...byGroup.keys()].sort();
|
|
179
|
+
const chosen = [];
|
|
180
|
+
let cursor = 0;
|
|
181
|
+
while (chosen.length < rule.take && groups.some((g) => byGroup.get(g).length > 0)) {
|
|
182
|
+
const group = groups[cursor % groups.length];
|
|
183
|
+
const ids = byGroup.get(group);
|
|
184
|
+
if (ids.length > 0) chosen.push(ids.shift());
|
|
185
|
+
cursor += 1;
|
|
186
|
+
}
|
|
187
|
+
return chosen;
|
|
188
|
+
}
|
|
189
|
+
const base = options.bases?.[rule.base];
|
|
190
|
+
if (!base) throw new ValidationError(`runSelectionRule: filter-of base '${rule.base}' was not provided`);
|
|
191
|
+
const index = new Map(records.map((r) => [String(readField(r, options.idField)), r]));
|
|
192
|
+
const sorted = [...base.filter((id) => {
|
|
193
|
+
const record = index.get(id) ?? options.idFields?.(id);
|
|
194
|
+
if (!record) throw new ValidationError(`runSelectionRule: base id '${id}' has no record and no idFields derivation`);
|
|
195
|
+
return evaluatePredicate(rule.keep, record);
|
|
196
|
+
})].sort();
|
|
197
|
+
if (rule.order.dir === "desc") sorted.reverse();
|
|
198
|
+
return sorted;
|
|
199
|
+
}
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/experiment/ast/validity.ts
|
|
202
|
+
/**
|
|
203
|
+
* Replicate-flip counting over graded states. A state whose replicates split
|
|
204
|
+
* between pass and fail is flipping; its flip rate is the minority share.
|
|
205
|
+
*/
|
|
206
|
+
function evaluateOracleDeterminismGate(id, gate, repsByState) {
|
|
207
|
+
const evidence = {};
|
|
208
|
+
let passed = true;
|
|
209
|
+
for (const [state, reps] of Object.entries(repsByState)) {
|
|
210
|
+
const passes = reps.filter(Boolean).length;
|
|
211
|
+
const flipRate = reps.length === 0 ? 0 : Math.min(passes, reps.length - passes) / reps.length;
|
|
212
|
+
evidence[state] = {
|
|
213
|
+
passes,
|
|
214
|
+
replicates: reps.length,
|
|
215
|
+
flipRate
|
|
216
|
+
};
|
|
217
|
+
if (flipRate > gate.maxFlipRate) passed = false;
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
id,
|
|
221
|
+
passed,
|
|
222
|
+
evidence
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Join two population snapshots on `joinOn` and compare the registered fields.
|
|
227
|
+
* Only rows present in both snapshots are compared; a presence change is a
|
|
228
|
+
* different failure and needs its own gate.
|
|
229
|
+
*/
|
|
230
|
+
function evaluatePopulationReproducibilityGate(id, gate, populations) {
|
|
231
|
+
const rightByKey = new Map(populations.right.map((r) => [String(readField(r, gate.joinOn)), r]));
|
|
232
|
+
const changed = [];
|
|
233
|
+
for (const left of populations.left) {
|
|
234
|
+
const key = String(readField(left, gate.joinOn));
|
|
235
|
+
const right = rightByKey.get(key);
|
|
236
|
+
if (!right) continue;
|
|
237
|
+
const moved = gate.compare.filter((f) => readField(left, f) !== readField(right, f));
|
|
238
|
+
if (moved.length > 0) changed.push(`${key} ${moved.map((f) => `${f}:${String(readField(left, f))}->${String(readField(right, f))}`).join(" ")}`);
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
id,
|
|
242
|
+
passed: changed.length <= gate.maxChangedRows,
|
|
243
|
+
evidence: changed
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
/** The registered claim about provenance must hold on the provenance record. */
|
|
247
|
+
function evaluateProvenanceGate(id, gate, provenance) {
|
|
248
|
+
const passed = evaluatePredicate(gate.claim, provenance);
|
|
249
|
+
return {
|
|
250
|
+
id,
|
|
251
|
+
passed,
|
|
252
|
+
evidence: { claimHolds: passed }
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
/** Final path segment equality between the pinned and the served identity. */
|
|
256
|
+
function evaluateIdentityGate(id, _gate, identities) {
|
|
257
|
+
const basename = (s) => s.split("/").pop() ?? s;
|
|
258
|
+
const passed = basename(identities.pinned) === basename(identities.served);
|
|
259
|
+
return {
|
|
260
|
+
id,
|
|
261
|
+
passed,
|
|
262
|
+
evidence: {
|
|
263
|
+
pinned: identities.pinned,
|
|
264
|
+
served: identities.served,
|
|
265
|
+
matched: passed
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* The design's power at minimumEffect must reach the registered target.
|
|
271
|
+
* The curve must cover the registered effect grid exactly — a curve
|
|
272
|
+
* computed on a different grid is different evidence and is refused.
|
|
273
|
+
*/
|
|
274
|
+
function evaluatePowerFloorGate(id, gate, curve) {
|
|
275
|
+
const problems = powerFloorProblems(gate);
|
|
276
|
+
if (problems.length > 0) throw new ValidationError(`evaluatePowerFloorGate: ${problems.join("; ")}`);
|
|
277
|
+
if (curve.some((point) => !Number.isFinite(point.power) || point.power < 0 || point.power > 1)) throw new ValidationError("evaluatePowerFloorGate: powers must be finite and in [0,1]");
|
|
278
|
+
const byEffect = new Map(curve.map((point) => [point.effect, point.power]));
|
|
279
|
+
if (byEffect.size !== curve.length) throw new ValidationError("evaluatePowerFloorGate: curve contains duplicate effects");
|
|
280
|
+
const missing = gate.effectGrid.filter((effect) => !byEffect.has(effect));
|
|
281
|
+
if (missing.length > 0) throw new ValidationError(`evaluatePowerFloorGate: curve does not cover registered effects [${missing.join(", ")}]`);
|
|
282
|
+
const extra = curve.filter((point) => !gate.effectGrid.includes(point.effect));
|
|
283
|
+
if (extra.length > 0) throw new ValidationError(`evaluatePowerFloorGate: curve contains unregistered effects [${extra.map((point) => point.effect).join(", ")}]`);
|
|
284
|
+
const powers = gate.effectGrid.map((effect) => byEffect.get(effect));
|
|
285
|
+
const maxPower = Math.max(...powers);
|
|
286
|
+
const powerAtMinimumEffect = byEffect.get(gate.minimumEffect);
|
|
287
|
+
return {
|
|
288
|
+
id,
|
|
289
|
+
passed: powerAtMinimumEffect >= gate.target,
|
|
290
|
+
evidence: {
|
|
291
|
+
target: gate.target,
|
|
292
|
+
minimumEffect: gate.minimumEffect,
|
|
293
|
+
powerAtMinimumEffect,
|
|
294
|
+
maxPower,
|
|
295
|
+
curve: gate.effectGrid.map((effect) => ({
|
|
296
|
+
effect,
|
|
297
|
+
power: byEffect.get(effect)
|
|
298
|
+
}))
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
/** Shared by seal validation and direct execution; malformed designs never pass. */
|
|
303
|
+
function powerFloorProblems(gate) {
|
|
304
|
+
const problems = [];
|
|
305
|
+
if (!Number.isFinite(gate.target) || gate.target <= 0 || gate.target > 1) problems.push("power target must be in (0,1]");
|
|
306
|
+
if (!Number.isFinite(gate.minimumEffect) || gate.minimumEffect <= 0) problems.push("minimumEffect must be positive and finite");
|
|
307
|
+
if (gate.effectGrid.length === 0 || gate.effectGrid.some((effect) => !Number.isFinite(effect))) problems.push("effectGrid must contain finite effects");
|
|
308
|
+
if (new Set(gate.effectGrid).size !== gate.effectGrid.length) problems.push("effectGrid contains duplicate effects");
|
|
309
|
+
if (!gate.effectGrid.includes(gate.minimumEffect)) problems.push("effectGrid must contain minimumEffect exactly; no interpolation is assumed");
|
|
310
|
+
for (const field of ["trials", "resamples"]) if (!Number.isInteger(gate.sim[field]) || gate.sim[field] <= 0) problems.push(`power simulation ${field} must be a positive integer`);
|
|
311
|
+
if (!Number.isInteger(gate.sim.seed)) problems.push("power simulation seed must be an integer");
|
|
312
|
+
return problems;
|
|
313
|
+
}
|
|
314
|
+
//#endregion
|
|
20
315
|
//#region src/experiment/budget.ts
|
|
21
316
|
/**
|
|
22
317
|
* Matched-budget verification between arms, as a refusal object.
|
|
@@ -450,8 +745,7 @@ async function openSealedExperiment(sealed) {
|
|
|
450
745
|
decide: (evidence) => executeDecisionRule(spec.decision, evidence),
|
|
451
746
|
admit: (records) => executeAdmissionRule(need(spec.admission, "admission rule"), records),
|
|
452
747
|
select: (name, records, options) => {
|
|
453
|
-
|
|
454
|
-
return runSelectionRule(rule, records, {
|
|
748
|
+
return runSelectionRule(need(spec.selections?.[name], `selection '${name}'`), records, {
|
|
455
749
|
idField: options.idField,
|
|
456
750
|
bases: spec.sealedSubsets
|
|
457
751
|
});
|