@tangle-network/agent-eval 1.0.19 → 1.0.21
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 +19 -27
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-CPv4tENR.d.ts → agent-profile-BO8ruI6R.d.ts} +3 -3
- package/dist/{agent-profile-CPv4tENR.d.ts.map → agent-profile-BO8ruI6R.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +14 -14
- package/dist/analyst/index.js +11 -12
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-pJ4fhnYg.d.ts → analyze-runs-DYYe18Gw.d.ts} +4 -4
- package/dist/{analyze-runs-pJ4fhnYg.d.ts.map → analyze-runs-DYYe18Gw.d.ts.map} +1 -1
- package/dist/{analyze-runs-C7vWBDhl.js → analyze-runs-jLTRKuoK.js} +6 -110
- package/dist/analyze-runs-jLTRKuoK.js.map +1 -0
- package/dist/app-grade/index.d.ts +4 -4
- package/dist/app-grade/index.js +3 -3
- package/dist/{benchmark-command-DSJQeYom.js → benchmark-command-CoNndRCk.js} +13 -14
- package/dist/benchmark-command-CoNndRCk.js.map +1 -0
- package/dist/benchmarks/index.d.ts +4 -4
- package/dist/benchmarks/index.js +4 -5
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/builder-eval/index.js +1 -1
- package/dist/{calibration-CbZPApIO.js → calibration-Cf-wpqqO.js} +2 -2
- package/dist/{calibration-CbZPApIO.js.map → calibration-Cf-wpqqO.js.map} +1 -1
- package/dist/campaign/index.d.ts +7 -7
- package/dist/campaign/index.js +10 -10
- package/dist/{campaign-BABipFel.js → campaign-Bl07uIaf.js} +14 -15
- package/dist/{campaign-BABipFel.js.map → campaign-Bl07uIaf.js.map} +1 -1
- package/dist/{campaign-evidence-DONEWvVY.js → campaign-evidence-NtH29ctt.js} +3 -3
- package/dist/{campaign-evidence-DONEWvVY.js.map → campaign-evidence-NtH29ctt.js.map} +1 -1
- package/dist/{chat-client-D0me8iwq.js → chat-client-Zz97O3NB.js} +2 -2
- package/dist/{chat-client-D0me8iwq.js.map → chat-client-Zz97O3NB.js.map} +1 -1
- package/dist/{chat-json-call-C473CwTt.js → chat-json-call-Dgi7-RH-.js} +2 -2
- package/dist/{chat-json-call-C473CwTt.js.map → chat-json-call-Dgi7-RH-.js.map} +1 -1
- package/dist/cli.js +7 -7
- package/dist/{types-0KglnQ9o.d.ts → cluster-Cd0MRbr9.d.ts} +44 -2
- package/dist/cluster-Cd0MRbr9.d.ts.map +1 -0
- package/dist/cluster-bootstrap-B0MTOBRU.js +24 -0
- package/dist/cluster-bootstrap-B0MTOBRU.js.map +1 -0
- package/dist/{completion-verifier-7KEfroqx.d.ts → completion-verifier-BEpsr3N4.d.ts} +2 -2
- package/dist/{completion-verifier-7KEfroqx.d.ts.map → completion-verifier-BEpsr3N4.d.ts.map} +1 -1
- package/dist/{completion-verifier-ClmJV_Yc.js → completion-verifier-DFyYFezn.js} +3 -3
- package/dist/{completion-verifier-ClmJV_Yc.js.map → completion-verifier-DFyYFezn.js.map} +1 -1
- package/dist/contract/index.d.ts +10 -10
- package/dist/contract/index.js +14 -15
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-CS8R3IZj.js → cost-ledger-DfhStGcZ.js} +2 -2
- package/dist/{cost-ledger-CS8R3IZj.js.map → cost-ledger-DfhStGcZ.js.map} +1 -1
- package/dist/{decision-point-CNyoKOkz.js → decision-point-Di2LATNH.js} +4 -4
- package/dist/{decision-point-CNyoKOkz.js.map → decision-point-Di2LATNH.js.map} +1 -1
- package/dist/{default-registry-BB9_jzyH.js → default-registry-CdFbxPnr.js} +5 -5
- package/dist/{default-registry-BB9_jzyH.js.map → default-registry-CdFbxPnr.js.map} +1 -1
- package/dist/{default-registry-BbXr18AT.d.ts → default-registry-aPvwtzEM.d.ts} +7 -7
- package/dist/{default-registry-BbXr18AT.d.ts.map → default-registry-aPvwtzEM.d.ts.map} +1 -1
- package/dist/{define-agent-eval-Q4FdXGj7.js → define-agent-eval-BROmIwn1.js} +6 -6
- package/dist/{define-agent-eval-Q4FdXGj7.js.map → define-agent-eval-BROmIwn1.js.map} +1 -1
- package/dist/{define-agent-eval-D_DQMH04.d.ts → define-agent-eval-Bx3b9B01.d.ts} +7 -7
- package/dist/{define-agent-eval-D_DQMH04.d.ts.map → define-agent-eval-Bx3b9B01.d.ts.map} +1 -1
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/diagnosis/index.js +1 -1
- package/dist/{dspy-rlm-engine-CqQc0R2l.js → dspy-rlm-engine-cWyn8G1a.js} +4 -4
- package/dist/{dspy-rlm-engine-CqQc0R2l.js.map → dspy-rlm-engine-cWyn8G1a.js.map} +1 -1
- package/dist/{engine-rfV8Ff8V.d.ts → engine-BF8naBn7.d.ts} +2 -2
- package/dist/{engine-rfV8Ff8V.d.ts.map → engine-BF8naBn7.d.ts.map} +1 -1
- package/dist/{eval-campaign-CZSCjxVb.js → eval-campaign-Dq8DEKmy.js} +2 -2
- package/dist/{eval-campaign-CZSCjxVb.js.map → eval-campaign-Dq8DEKmy.js.map} +1 -1
- package/dist/{evaluation-SDXKL6Fx.d.ts → evaluation-CFKj_IlJ.d.ts} +4 -4
- package/dist/{evaluation-SDXKL6Fx.d.ts.map → evaluation-CFKj_IlJ.d.ts.map} +1 -1
- package/dist/{evaluation-BBI37mRe.js → evaluation-bU_bhlv-.js} +2 -2
- package/dist/{evaluation-BBI37mRe.js.map → evaluation-bU_bhlv-.js.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/evaluation.js +1 -1
- package/dist/{exact-types-CaLLU1Pz.d.ts → exact-types-VAFjtOQN.d.ts} +2 -2
- package/dist/{exact-types-CaLLU1Pz.d.ts.map → exact-types-VAFjtOQN.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +3 -5
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +7 -12
- package/dist/experiment/index.js.map +1 -1
- package/dist/{exporters-BYBG9b1n.d.ts → exporters-dQKYD_Zo.d.ts} +2 -2
- package/dist/{exporters-BYBG9b1n.d.ts.map → exporters-dQKYD_Zo.d.ts.map} +1 -1
- package/dist/{external-optimizer-process-CfrY-nJT.js → external-optimizer-process-2ImGH_LR.js} +2 -2
- package/dist/{external-optimizer-process-CfrY-nJT.js.map → external-optimizer-process-2ImGH_LR.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-BtJk8UcU.js → external-optimizer-subprocess-_C_2yriN.js} +3 -3
- package/dist/{external-optimizer-subprocess-BtJk8UcU.js.map → external-optimizer-subprocess-_C_2yriN.js.map} +1 -1
- package/dist/{feedback-trajectory-P37ju-gW.d.ts → feedback-trajectory-DTj8eVTR.d.ts} +3 -3
- package/dist/{feedback-trajectory-P37ju-gW.d.ts.map → feedback-trajectory-DTj8eVTR.d.ts.map} +1 -1
- package/dist/{findings-store-BnYN57-h.js → findings-store-BSuaV3dN.js} +7 -24
- package/dist/findings-store-BSuaV3dN.js.map +1 -0
- package/dist/fuzz.js +2 -2
- package/dist/{index-D4lT7aFu.d.ts → index-7tWvC0aW.d.ts} +28 -128
- package/dist/index-7tWvC0aW.d.ts.map +1 -0
- package/dist/{index-C3t17kHu.d.ts → index-B62BaRzH.d.ts} +7 -100
- package/dist/index-B62BaRzH.d.ts.map +1 -0
- package/dist/{index-HuSMvqR2.d.ts → index-BlTbxHlY.d.ts} +5 -5
- package/dist/{index-HuSMvqR2.d.ts.map → index-BlTbxHlY.d.ts.map} +1 -1
- package/dist/{index-AmfM3usI.d.ts → index-CM12lr9E.d.ts} +8 -8
- package/dist/{index-AmfM3usI.d.ts.map → index-CM12lr9E.d.ts.map} +1 -1
- package/dist/{index-DLVbfss9.d.ts → index-DFso1b2W.d.ts} +8 -8
- package/dist/{index-DLVbfss9.d.ts.map → index-DFso1b2W.d.ts.map} +1 -1
- package/dist/index-DNXFzSpc.d.ts +1101 -0
- package/dist/index-DNXFzSpc.d.ts.map +1 -0
- package/dist/{index-BPmj-_ta.d.ts → index-DfqAy8ct.d.ts} +10 -9
- package/dist/index-DfqAy8ct.d.ts.map +1 -0
- package/dist/index.d.ts +29 -31
- package/dist/index.js +28 -164
- package/dist/index.js.map +1 -1
- package/dist/{integrity-BAdVzT8u.d.ts → integrity-CrmnGB2T.d.ts} +2 -2
- package/dist/{integrity-BAdVzT8u.d.ts.map → integrity-CrmnGB2T.d.ts.map} +1 -1
- package/dist/{judge-gate-CIlBrn6q.js → judge-gate-CrN0PaAL.js} +3 -3
- package/dist/{judge-gate-CIlBrn6q.js.map → judge-gate-CrN0PaAL.js.map} +1 -1
- package/dist/{kind-factory-Cfz8DUCc.js → kind-factory-CV0FNCMM.js} +2 -2
- package/dist/{kind-factory-Cfz8DUCc.js.map → kind-factory-CV0FNCMM.js.map} +1 -1
- package/dist/{llm-client-BdSiZ4qz.js → llm-client-DMMSg-Ro.js} +2 -2
- package/dist/{llm-client-BdSiZ4qz.js.map → llm-client-DMMSg-Ro.js.map} +1 -1
- package/dist/{llm-judge-VD_MI6kd.js → llm-judge-C813vmpc.js} +13 -14
- package/dist/{llm-judge-VD_MI6kd.js.map → llm-judge-C813vmpc.js.map} +1 -1
- package/dist/{matrix-Yg1lHIGI.d.ts → matrix-C-GxIgeJ.d.ts} +2 -2
- package/dist/{matrix-Yg1lHIGI.d.ts.map → matrix-C-GxIgeJ.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +2 -2
- package/dist/meta-eval/index.js +7 -7
- package/dist/{metrics-DNCAUtuB.js → metrics-zALlR17s.js} +16 -17
- package/dist/metrics-zALlR17s.js.map +1 -0
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/multishot/index.js +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{outcome-observations-DZu5hLYF.js → outcome-observations-DPkH-LHQ.js} +2 -3
- package/dist/{outcome-observations-DZu5hLYF.js.map → outcome-observations-DPkH-LHQ.js.map} +1 -1
- package/dist/paired-arms-DjMEtYI9.js +338 -0
- package/dist/paired-arms-DjMEtYI9.js.map +1 -0
- package/dist/{paired-promotion-decision-CiueaTTj.js → paired-promotion-decision-Bi9__RQS.js} +2 -3
- package/dist/{paired-promotion-decision-CiueaTTj.js.map → paired-promotion-decision-Bi9__RQS.js.map} +1 -1
- package/dist/{paired-promotion-decision-BDnqepZ1.d.ts → paired-promotion-decision-DJU3fZxH.d.ts} +3 -113
- package/dist/paired-promotion-decision-DJU3fZxH.d.ts.map +1 -0
- package/dist/{pareto-a3EOmjfe.js → pareto-fJZg8pXm.js} +3 -6
- package/dist/{pareto-a3EOmjfe.js.map → pareto-fJZg8pXm.js.map} +1 -1
- package/dist/pipelines/index.js +1 -1
- package/dist/{prime-protocol-DKRk4l4U.d.ts → prime-protocol-D1NkJRuD.d.ts} +2 -2
- package/dist/{prime-protocol-DKRk4l4U.d.ts.map → prime-protocol-D1NkJRuD.d.ts.map} +1 -1
- package/dist/{promotion-gate-DOkgJcLW.d.ts → promotion-gate-Da0xV4sa.d.ts} +3 -67
- package/dist/promotion-gate-Da0xV4sa.d.ts.map +1 -0
- package/dist/{promotion-policy-DLPcEnCf.js → promotion-policy-DCgftbnd.js} +4 -4
- package/dist/{promotion-policy-DLPcEnCf.js.map → promotion-policy-DCgftbnd.js.map} +1 -1
- package/dist/{proposal-findings-BfzzZ_lN.js → proposal-findings-DWs94yT8.js} +2 -2
- package/dist/{proposal-findings-BfzzZ_lN.js.map → proposal-findings-DWs94yT8.js.map} +1 -1
- package/dist/{registry-Ck7w-rr5.d.ts → registry-BAcEbzKm.d.ts} +4 -4
- package/dist/{registry-Ck7w-rr5.d.ts.map → registry-BAcEbzKm.d.ts.map} +1 -1
- package/dist/{release-confidence-nfQNh3eb.js → release-confidence-DGtuPDxJ.js} +2 -2
- package/dist/{release-confidence-nfQNh3eb.js.map → release-confidence-DGtuPDxJ.js.map} +1 -1
- package/dist/reporting.d.ts +4 -5
- package/dist/reporting.d.ts.map +1 -1
- package/dist/reporting.js +5 -7
- package/dist/reporting.js.map +1 -1
- package/dist/{researcher-CLnNJ7Or.d.ts → researcher-CSlc84Bp.d.ts} +4 -4
- package/dist/{researcher-CLnNJ7Or.d.ts.map → researcher-CSlc84Bp.d.ts.map} +1 -1
- package/dist/{reward-hacking-B88f-Kh7.js → reward-hacking-BYiDFbIl.js} +2 -3
- package/dist/{reward-hacking-B88f-Kh7.js.map → reward-hacking-BYiDFbIl.js.map} +1 -1
- package/dist/rl.d.ts +9 -8
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +8 -10
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +4 -4
- package/dist/rollout/index.js +1 -1
- package/dist/{rollout-Cu7kHGIe.js → rollout-DKa54qer.js} +2 -2
- package/dist/{rollout-Cu7kHGIe.js.map → rollout-DKa54qer.js.map} +1 -1
- package/dist/{rubric-predictive-validity-D_6ZPTNR.js → rubric-predictive-validity-DL7gJ51F.js} +2 -2
- package/dist/{rubric-predictive-validity-D_6ZPTNR.js.map → rubric-predictive-validity-DL7gJ51F.js.map} +1 -1
- package/dist/{run-record-CbUi2adH.js → run-record-CFbnkE1K.js} +2 -2
- package/dist/{run-record-CbUi2adH.js.map → run-record-CFbnkE1K.js.map} +1 -1
- package/dist/{runtime-rollouts-kGn1K5ut.js → runtime-rollouts-BNrm5nC_.js} +2 -2
- package/dist/{runtime-rollouts-kGn1K5ut.js.map → runtime-rollouts-BNrm5nC_.js.map} +1 -1
- package/dist/{schema-CfoA9U_U.d.ts → schema-PDKQ_iNE.d.ts} +2 -131
- package/dist/schema-PDKQ_iNE.d.ts.map +1 -0
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.js +2 -2
- package/dist/{search-kernel-DjqaPJqL.d.ts → search-kernel-CQGLbmgn.d.ts} +3 -3
- package/dist/{search-kernel-DjqaPJqL.d.ts.map → search-kernel-CQGLbmgn.d.ts.map} +1 -1
- package/dist/{search-summary-RJ5zXjHN.js → search-summary-sPWiYtSl.js} +4 -4
- package/dist/{search-summary-RJ5zXjHN.js.map → search-summary-sPWiYtSl.js.map} +1 -1
- package/dist/{sequential-BPbvgzfe.js → sequential-9TVb5Nu5.js} +3 -3
- package/dist/{sequential-BPbvgzfe.js.map → sequential-9TVb5Nu5.js.map} +1 -1
- package/dist/{sequential-Bb_pdTqG.d.ts → sequential-B9p6uoV8.d.ts} +9 -2
- package/dist/{sequential-Bb_pdTqG.d.ts.map → sequential-B9p6uoV8.d.ts.map} +1 -1
- package/dist/{sequential-Bjs5roiK.js → sequential-CAksw6EU.js} +32 -2
- package/dist/{sequential-Bjs5roiK.js.map → sequential-CAksw6EU.js.map} +1 -1
- package/dist/{server-CPKyf3bz.js → server-DFVwfoZq.js} +3 -3
- package/dist/{server-CPKyf3bz.js.map → server-DFVwfoZq.js.map} +1 -1
- package/dist/{skillopt-optimization-method-D9Hlmhjg.js → skillopt-optimization-method-QO1nU8Kz.js} +9 -9
- package/dist/{skillopt-optimization-method-D9Hlmhjg.js.map → skillopt-optimization-method-QO1nU8Kz.js.map} +1 -1
- package/dist/{statistical-heldout-C-tgpUuu.d.ts → statistical-heldout-CvOwNqt9.d.ts} +6 -282
- package/dist/statistical-heldout-CvOwNqt9.d.ts.map +1 -0
- package/dist/{statistical-heldout-NBxC7jGo.js → statistical-heldout-DLO4Ebos.js} +3 -3
- package/dist/{statistical-heldout-NBxC7jGo.js.map → statistical-heldout-DLO4Ebos.js.map} +1 -1
- package/dist/statistics-CvvC-MPv.js +2634 -0
- package/dist/statistics-CvvC-MPv.js.map +1 -0
- package/dist/statistics.d.ts +3 -0
- package/dist/statistics.js +3 -0
- package/dist/{store-otlp-BfPRa2p8.js → store-otlp-C-jyj3WX.js} +2 -2
- package/dist/{store-otlp-BfPRa2p8.js.map → store-otlp-C-jyj3WX.js.map} +1 -1
- package/dist/{store-tool-spans-BgwVHXma.d.ts → store-tool-spans-B3z_Qb5u.d.ts} +5 -5
- package/dist/{store-tool-spans-BgwVHXma.d.ts.map → store-tool-spans-B3z_Qb5u.d.ts.map} +1 -1
- package/dist/{store-tool-spans-BrSWHB9O.js → store-tool-spans-DalWlKY8.js} +3 -3
- package/dist/{store-tool-spans-BrSWHB9O.js.map → store-tool-spans-DalWlKY8.js.map} +1 -1
- package/dist/{summary-report-C3IJvp0i.js → summary-report-BEhqoxrA.js} +4 -52
- package/dist/summary-report-BEhqoxrA.js.map +1 -0
- package/dist/{summary-report-0La5vejY.d.ts → summary-report-DyZquTaH.d.ts} +2 -2
- package/dist/{summary-report-0La5vejY.d.ts.map → summary-report-DyZquTaH.d.ts.map} +1 -1
- package/dist/supervisor-run/index.d.ts +2 -2
- package/dist/supervisor-run/index.js +1 -1
- package/dist/{systemone-CpDppX8s.d.ts → systemone-DVk-Crtu.d.ts} +7 -7
- package/dist/{systemone-CpDppX8s.d.ts.map → systemone-DVk-Crtu.d.ts.map} +1 -1
- package/dist/{systemone-review-nbuMxxmi.d.ts → systemone-review-CToBl1oa.d.ts} +2 -2
- package/dist/{systemone-review-nbuMxxmi.d.ts.map → systemone-review-CToBl1oa.d.ts.map} +1 -1
- package/dist/systemone.d.ts +3 -3
- package/dist/systemone.js +2 -2
- package/dist/{tool-groups-BQsjZD9F.d.ts → tool-groups-R5RO9OHn.d.ts} +3 -3
- package/dist/tool-groups-R5RO9OHn.d.ts.map +1 -0
- package/dist/{tool-waste-Czt3aWID.js → tool-waste-BqSmmPUz.js} +2 -3
- package/dist/{tool-waste-Czt3aWID.js.map → tool-waste-BqSmmPUz.js.map} +1 -1
- package/dist/{trace-questions-CpTrtEcm.d.ts → trace-questions-BY6taxnl.d.ts} +3 -3
- package/dist/{trace-questions-CpTrtEcm.d.ts.map → trace-questions-BY6taxnl.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/trace-repair/index.js +1 -2
- package/dist/trace-repair/index.js.map +1 -1
- package/dist/traces.d.ts +5 -5
- package/dist/traces.js +3 -3
- package/dist/{tree-DIHp6UQ0.js → tree-C-N2kP-8.js} +4 -6
- package/dist/{tree-DIHp6UQ0.js.map → tree-C-N2kP-8.js.map} +1 -1
- package/dist/{types-DsuOcYsE.d.ts → types-BsdcSWnf.d.ts} +2 -2
- package/dist/{types-DsuOcYsE.d.ts.map → types-BsdcSWnf.d.ts.map} +1 -1
- package/dist/{types-DNB9hIXa.d.ts → types-DUVhW5V1.d.ts} +3 -2
- package/dist/types-DUVhW5V1.d.ts.map +1 -0
- package/dist/{types-wDBk14lj.d.ts → types-ip2D3-Ib.d.ts} +5 -4
- package/dist/types-ip2D3-Ib.d.ts.map +1 -0
- package/dist/{types-B9s9Xo5_.d.ts → types-kBMNdo1X.d.ts} +3 -9
- package/dist/types-kBMNdo1X.d.ts.map +1 -0
- package/dist/wire/index.d.ts +4 -4
- package/dist/wire/index.js +1 -1
- package/docs/design/statistics-decisions.md +45 -364
- package/docs/design.md +1 -1
- package/docs/research-report-methodology.md +1 -1
- package/package.json +6 -1
- package/dist/agreement-irr-DXcXEt4I.js +0 -182
- package/dist/agreement-irr-DXcXEt4I.js.map +0 -1
- package/dist/analyze-runs-C7vWBDhl.js.map +0 -1
- package/dist/benchmark-command-DSJQeYom.js.map +0 -1
- package/dist/cluster-bootstrap-BteuR1hg.js +0 -65
- package/dist/cluster-bootstrap-BteuR1hg.js.map +0 -1
- package/dist/descriptive-B3Eb7tX0.js +0 -229
- package/dist/descriptive-B3Eb7tX0.js.map +0 -1
- package/dist/findings-store-BnYN57-h.js.map +0 -1
- package/dist/index-BPmj-_ta.d.ts.map +0 -1
- package/dist/index-C3t17kHu.d.ts.map +0 -1
- package/dist/index-D4lT7aFu.d.ts.map +0 -1
- package/dist/judge-calibration-DKR6Xi-w.js +0 -319
- package/dist/judge-calibration-DKR6Xi-w.js.map +0 -1
- package/dist/judge-calibration-DnrbQaXI.d.ts +0 -144
- package/dist/judge-calibration-DnrbQaXI.d.ts.map +0 -1
- package/dist/mean-D1d6gedE.js +0 -284
- package/dist/mean-D1d6gedE.js.map +0 -1
- package/dist/metrics-DNCAUtuB.js.map +0 -1
- package/dist/multiplicity-DAd4xaDC.js +0 -100
- package/dist/multiplicity-DAd4xaDC.js.map +0 -1
- package/dist/multiplicity-D_SEsc5j.d.ts +0 -41
- package/dist/multiplicity-D_SEsc5j.d.ts.map +0 -1
- package/dist/paired-arms-3-tsXvvC.js +0 -740
- package/dist/paired-arms-3-tsXvvC.js.map +0 -1
- package/dist/paired-binary-CMzmSSd5.js +0 -372
- package/dist/paired-binary-CMzmSSd5.js.map +0 -1
- package/dist/paired-promotion-decision-BDnqepZ1.d.ts.map +0 -1
- package/dist/paired-tests-Buh6feJ4.js +0 -211
- package/dist/paired-tests-Buh6feJ4.js.map +0 -1
- package/dist/power-and-mde-g3vOn0XK.js +0 -99
- package/dist/power-and-mde-g3vOn0XK.js.map +0 -1
- package/dist/promotion-gate-DOkgJcLW.d.ts.map +0 -1
- package/dist/random-BN150Q_X.d.ts +0 -79
- package/dist/random-BN150Q_X.d.ts.map +0 -1
- package/dist/schema-CfoA9U_U.d.ts.map +0 -1
- package/dist/sequential-eprocess-C1YLwFaz.js +0 -129
- package/dist/sequential-eprocess-C1YLwFaz.js.map +0 -1
- package/dist/statistical-heldout-C-tgpUuu.d.ts.map +0 -1
- package/dist/summary-report-C3IJvp0i.js.map +0 -1
- package/dist/tool-groups-BQsjZD9F.d.ts.map +0 -1
- package/dist/types-0KglnQ9o.d.ts.map +0 -1
- package/dist/types-B9s9Xo5_.d.ts.map +0 -1
- package/dist/types-DNB9hIXa.d.ts.map +0 -1
- package/dist/types-wDBk14lj.d.ts.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { o as FailureClass } from "./schema-CkIvnmLU.js";
|
|
2
|
-
import { i as AnalystFinding, m as EvidenceRef, u as AnalystRunResult } from "./types-
|
|
2
|
+
import { i as AnalystFinding, m as EvidenceRef, u as AnalystRunResult } from "./types-kBMNdo1X.js";
|
|
3
3
|
import { s as TraceStore } from "./store-CMs5wGXP.js";
|
|
4
4
|
import { i as DatasetSplit, r as DatasetScenario } from "./dataset-DThC1S6G.js";
|
|
5
5
|
import { o as TraceEmitter } from "./emitter-mAXC5PSN.js";
|
|
6
|
-
import "./exact-types-
|
|
6
|
+
import "./exact-types-VAFjtOQN.js";
|
|
7
7
|
type ControlSeverity = 'info' | 'warning' | 'error' | 'critical';
|
|
8
8
|
type ControlActionFailureMode = 'continue' | 'stop';
|
|
9
9
|
interface ControlEvalResult {
|
|
@@ -383,4 +383,4 @@ declare function controlRunToFeedbackTrajectory<TState, TAction, TActionResult>(
|
|
|
383
383
|
createdAt?: string;
|
|
384
384
|
}): FeedbackTrajectory;
|
|
385
385
|
export { AnalystFindingDigest as A, ControlRuntimeConfig as B, createFeedbackTrajectory as C, renderPreferenceMemoryMarkdown as D, feedbackTrajectoryToOptimizerRow as E, ControlBudget as F, ControlSeverity as H, ControlContext as I, ControlDecision as L, AnalystRunDigest as M, analystRunDigest as N, summarizePreferenceMemory as O, ControlActionOutcome as P, ControlEvalResult as R, controlRunToFeedbackTrajectory as S, feedbackTrajectoriesToOptimizerRows as T, ControlStep as U, ControlRuntimeError as V, StopDecision as W, PreferenceMemoryEntry as _, FeedbackLabel as a, analystRunToReviewRequests as b, FeedbackOptimizerRow as c, FeedbackTask as d, FeedbackTrajectory as f, InMemoryFeedbackTrajectoryStore as g, FileSystemFeedbackTrajectoryStore as h, FeedbackAttempt as i, AnalystReviewDecision as j, withAssignedFeedbackSplit as k, FeedbackOutcome as l, FeedbackTrajectoryStore as m, AnalystReviewRequest as n, FeedbackLabelKind as o, FeedbackTrajectoryFilter as p, FeedbackArtifactType as r, FeedbackLabelSource as s, AnalystFeedbackTrajectoryOptions as t, FeedbackSplitPolicy as u, ProposedSideEffect as v, feedbackTrajectoriesToDatasetScenarios as w, assignFeedbackSplit as x, analystRunToFeedbackTrajectory as y, ControlRunResult as z };
|
|
386
|
-
//# sourceMappingURL=feedback-trajectory-
|
|
386
|
+
//# sourceMappingURL=feedback-trajectory-DTj8eVTR.d.ts.map
|
package/dist/{feedback-trajectory-P37ju-gW.d.ts.map → feedback-trajectory-DTj8eVTR.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-trajectory-
|
|
1
|
+
{"version":3,"file":"feedback-trajectory-DTj8eVTR.d.ts","names":[],"sources":["../src/control-runtime/contract.ts","../src/feedback-trajectory-review.ts","../src/feedback-trajectory.ts"],"mappings":";;;;;;KAIY;KAEA;UAEK;;EAEf;;EAEA;;EAEA;;EAEA,WAAW;;EAEX;;EAEA;;EAEA;;EAEA,WAAW;;UAGI;EACf;EACA;EACA;;UAGe,oBAAoB,QAAQ;;;;;EAK3C;;;;;EAKA;;EAEA;;EAEA,oBAAoB,OAAO;;EAE3B,qBAAqB,QAAQ;;UAGd,eACf,QACA,SACA,eACA,cAAc,oBAAoB;EAElC;EACA,OAAO;EACP,OAAO;EACP,SAAS,YAAY,QAAQ,SAAS,eAAe;EACrD,QAAQ;EACR;EACA;EACA;EACA;EACA,aAAa;EACb,UAAU;;KAGA,gBAAgB;EAEtB;EACA,QAAQ;EACR;;EAGA;EACA;EACA;EACA;;EAEA,eAAe;;UAGJ;EACf;EACA;EACA;EACA;EACA,eAAe;;UAGA,qBAAqB;EACpC;EACA,SAAS;EACT;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe,YACf,QACA,SACA,eACA,cAAc,oBAAoB;EAElC;EACA,UAAU,gBAAgB;EAC1B,aAAa;EACb,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,gBAAgB,qBAAqB;EACrC;EACA;;UAGe,iBACf,QACA,SACA,eACA,cAAc,oBAAoB;EAElC;EACA;EACA;EACA;EACA;EACA,OAAO,YAAY,QAAQ,SAAS,eAAe;EACnD,YAAY;EACZ,YAAY;EACZ;EACA;;EAEA;EACA,eAAe;EACf,eAAe;EACf;;UAGe,qBACf,QACA,SACA,eACA,cAAc,oBAAoB;EAElC;EACA,SAAS,QAAQ;EACjB,SAAS;;EAET,gBAAgB;;;;;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sBACP;iBAca,0BACd,YAAY,oBACZ,SAAS,sBACR;iBAuBa,uCACd,cAAc,uBACb;iBAIa,iCACd,YAAY,qBACX;iBA6Ca,oCACd,cAAc,uBACb;iBAyCa,0BACd,cAAc,sBACd;EAAW;IACV;iBA2Ba,+BAA+B,SAAS;iBAWxC,+BAA+B,QAAQ,SAAS,eAC9D,KAAK,iBAAiB,QAAQ,SAAS,gBACvC;EACE;EACA;EACA,eAAe;EACf,oBAAoB,MAAM,YAAY,QAAQ,SAAS;EACvD,0BACE,MAAM,YAAY,QAAQ,SAAS,mBAChC;EACL;IAED"}
|
|
@@ -1,30 +1,13 @@
|
|
|
1
|
-
import { c as errorMessage
|
|
2
|
-
import { a as assertFiniteSample } from "./mean-D1d6gedE.js";
|
|
3
|
-
import { a as ranks } from "./descriptive-B3Eb7tX0.js";
|
|
1
|
+
import { c as errorMessage } from "./errors-DeEEV9Vx.js";
|
|
4
2
|
import { u as Mutex } from "./journal-CTX5uK-n.js";
|
|
5
3
|
import { t as extractJsonPayload } from "./json-DtvZNAU9.js";
|
|
6
|
-
import { A as RawAnalystFindingSchema } from "./kind-factory-
|
|
7
|
-
import "./llm-client-
|
|
8
|
-
import { t as paidChat } from "./chat-json-call-
|
|
9
|
-
import { n as decodeRawFindingArray } from "./dspy-rlm-engine-
|
|
4
|
+
import { A as RawAnalystFindingSchema } from "./kind-factory-CV0FNCMM.js";
|
|
5
|
+
import "./llm-client-DMMSg-Ro.js";
|
|
6
|
+
import { t as paidChat } from "./chat-json-call-Dgi7-RH-.js";
|
|
7
|
+
import { n as decodeRawFindingArray } from "./dspy-rlm-engine-cWyn8G1a.js";
|
|
10
8
|
import { z } from "zod";
|
|
11
9
|
import { appendFileSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
12
10
|
import { dirname } from "node:path";
|
|
13
|
-
// src/statistics/comparison-effects.ts
|
|
14
|
-
function binary(values, name) {
|
|
15
|
-
if (values.some((value) => value !== 0 && value !== 1)) throw new ValidationError(`${name}: expected binary 0/1 values`);
|
|
16
|
-
}
|
|
17
|
-
/** Mann–Whitney ROC area: ties count half; no observed member of either class means unknown. */
|
|
18
|
-
function rocAuc(scores, labels) {
|
|
19
|
-
assertFiniteSample("rocAuc", "scores", scores);
|
|
20
|
-
binary(labels, "rocAuc.labels");
|
|
21
|
-
if (scores.length !== labels.length) throw new ValidationError("rocAuc: scores and labels must have equal lengths");
|
|
22
|
-
const ranked = ranks(scores);
|
|
23
|
-
const positive = labels.reduce((sum, label) => sum + label, 0);
|
|
24
|
-
const sum = labels.reduce((total, label, index) => total + label * ranked[index], 0);
|
|
25
|
-
const negative = labels.length - positive;
|
|
26
|
-
return positive && negative ? (sum - positive * (positive + 1) / 2) / (positive * negative) : null;
|
|
27
|
-
}
|
|
28
11
|
// src/analyst/chat-trace-engine.ts
|
|
29
12
|
/**
|
|
30
13
|
* A `TraceAnalysisEngine` that runs entirely inside Node against a
|
|
@@ -547,6 +530,6 @@ function diffFindings(previous, current, policy = {}) {
|
|
|
547
530
|
changed
|
|
548
531
|
};
|
|
549
532
|
}
|
|
550
|
-
export {
|
|
533
|
+
export { diffFindings as n, createChatTraceEngine as r, FindingsStore as t };
|
|
551
534
|
|
|
552
|
-
//# sourceMappingURL=findings-store-
|
|
535
|
+
//# sourceMappingURL=findings-store-BSuaV3dN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findings-store-BSuaV3dN.js","names":["messageOf"],"sources":["../src/analyst/chat-trace-engine.ts","../src/locked-jsonl-appender.ts","../src/analyst/findings-store.ts"],"sourcesContent":["/**\n * A `TraceAnalysisEngine` that runs entirely inside Node against a\n * caller-owned `ChatClient`.\n *\n * The other engine in this package, `createDspyRlmTraceEngine`, reaches the\n * DSPy RLM through a Python subprocess. That made every model-backed analyst\n * unreachable for a consumer that already owns a model seam and no Python:\n * `createTraceAnalyst` requires an engine, the only exported constructor\n * required a Python runner, so `buildDefaultAnalystRegistry()` registered the\n * deterministic analyst alone and `analystsFromRegistry` refused the result.\n *\n * This engine closes that path. It drives the same investigation contract —\n * bounded trace tools, a prose answer, a strict findings array — with native\n * function calls over the transport the caller already bound with\n * `createChatClient`. A caller holding a bare\n * `(request: LlmCallRequest) => Promise<LlmCallResult>` adapts it in one line:\n *\n * createChatClient({ transport: 'custom', chat: call, defaultModel, maximumAttempts })\n *\n * agent-eval still executes no paid model and holds no provider credential.\n * Every call goes through `paidChat`, so the shared cost ledger reserves the\n * priced maximum before the call and settles the receipt after it.\n *\n * Shape of one investigation:\n * 1. Investigation turns. The model reads the trace store through the tools\n * its analyst kind was given. A turn that requests no tool ends the\n * phase; an exhausted iteration or tool budget also ends it.\n * 2. One report turn. The model returns `{ answer, findings }` as JSON,\n * decoded by the same `decodeRawFindingArray` the Python bridge uses, so\n * a row this engine accepts is a row that engine could report.\n */\n\nimport { z } from 'zod'\nimport { paidChat } from '../chat-json-call'\nimport type { CustomTokenPricing } from '../cost-ledger'\nimport { errorMessage as messageOf } from '../errors'\nimport {\n extractJsonPayload,\n type LlmCallRequest,\n type LlmMessage,\n type LlmThinkingMode,\n type LlmToolCall,\n type LlmToolDefinition,\n} from '../llm-client'\nimport type { TraceAnalysisToolDescriptor } from '../trace-analyst/tools'\nimport type { ChatClient } from './chat-client'\nimport {\n DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS,\n type TraceAnalysisEngine,\n type TraceAnalysisEngineRequest,\n type TraceAnalysisEngineResult,\n} from './engine'\nimport { decodeRawFindingArray } from './finding-codec'\nimport { RawAnalystFindingSchema } from './finding-signature'\n\n/** Bumped whenever this engine's execution behavior changes. */\nconst CHAT_TRACE_ENGINE_VERSION = '1.0.0'\nconst ENGINE_ID = 'chat-trace'\n\n/** Marker appended to a tool result cut down to the retained-output budget. */\nconst TRUNCATION_MARKER = '\\n…[truncated to the analyst maxOutputChars budget]'\n\nexport interface ChatTraceEngineOptions {\n /**\n * Caller-owned transport. Build it with `createChatClient`; agent-eval never\n * receives the provider credential.\n */\n chat: ChatClient\n /** Model for every call. Defaults to the client's `defaultModel`. */\n model?: string\n /** Endpoint rates used when the transport reports no billed amount. */\n pricing?: CustomTokenPricing\n /** Completion cap per turn. Default: {@link DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS}. */\n maxOutputTokens?: number\n /** Sampling temperature. Omitted from the request when absent. */\n temperature?: number\n /** Provider reasoning mode. Omitted when the provider default should apply. */\n thinking?: LlmThinkingMode\n /** Per-call deadline handed to the transport. */\n requestTimeoutMs?: number\n /**\n * How the report turn asks for structured output.\n *\n * `json-object` sends JSON mode, which every OpenAI-compatible endpoint\n * accepts, and relies on the finding grammar the analyst kind already puts\n * in its instructions. `json-schema` sends the generated response schema as\n * well, which stricter endpoints honour and older ones reject. Default:\n * `json-object`.\n */\n reportFormat?: 'json-object' | 'json-schema'\n}\n\n/**\n * The report envelope. Its `findings` rows are generated from\n * `RawAnalystFindingSchema`, so the schema offered to a provider and the\n * decoder that accepts the answer cannot drift apart.\n */\nfunction buildReportJsonSchema(): { name: string; schema: Record<string, unknown> } {\n const row = z.toJSONSchema(RawAnalystFindingSchema, { target: 'draft-7' }) as Record<\n string,\n unknown\n >\n delete row.$schema\n return {\n name: 'trace_analysis_report',\n schema: {\n type: 'object',\n additionalProperties: false,\n required: ['answer', 'findings'],\n properties: {\n answer: { type: 'string', description: 'Direct prose answer to the question.' },\n findings: { type: 'array', items: row },\n },\n },\n }\n}\n\nconst REPORT_JSON_SCHEMA = buildReportJsonSchema()\n\n/**\n * Run bounded recursive trace analysis in-process over a caller-owned chat\n * transport. No Python, no subprocess, no loopback proxy.\n */\nexport function createChatTraceEngine(options: ChatTraceEngineOptions): TraceAnalysisEngine {\n const model = resolveModel(options)\n const maxOutputTokens = options.maxOutputTokens ?? DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS\n if (!Number.isSafeInteger(maxOutputTokens) || maxOutputTokens <= 0) {\n throw new TypeError('chat trace engine maxOutputTokens must be a positive safe integer')\n }\n if (\n options.temperature !== undefined &&\n (!Number.isFinite(options.temperature) || options.temperature < 0)\n ) {\n throw new TypeError('chat trace engine temperature must be a non-negative finite number')\n }\n if (\n options.requestTimeoutMs !== undefined &&\n (!Number.isSafeInteger(options.requestTimeoutMs) || options.requestTimeoutMs <= 0)\n ) {\n throw new TypeError('chat trace engine requestTimeoutMs must be a positive safe integer')\n }\n const reportFormat = options.reportFormat ?? 'json-object'\n if (reportFormat !== 'json-object' && reportFormat !== 'json-schema') {\n throw new TypeError(`chat trace engine reportFormat must be json-object or json-schema`)\n }\n\n return {\n id: ENGINE_ID,\n description:\n 'In-process recursive trace analysis over a caller-owned ChatClient with native tool calls.',\n model,\n version: CHAT_TRACE_ENGINE_VERSION,\n executionConfig: {\n kind: ENGINE_ID,\n model,\n transport: options.chat.transport,\n maximum_attempts: options.chat.maximumAttempts ?? null,\n pricing: options.pricing ? { ...options.pricing } : null,\n max_output_tokens: maxOutputTokens,\n temperature: options.temperature ?? null,\n thinking: options.thinking ?? null,\n request_timeout_ms: options.requestTimeoutMs ?? null,\n report_format: reportFormat,\n report_schema_name: REPORT_JSON_SCHEMA.name,\n },\n analyze: (request) => analyze(request, { ...options, model, maxOutputTokens, reportFormat }),\n }\n}\n\ninterface ResolvedOptions extends ChatTraceEngineOptions {\n model: string\n maxOutputTokens: number\n reportFormat: 'json-object' | 'json-schema'\n}\n\nasync function analyze(\n request: TraceAnalysisEngineRequest,\n options: ResolvedOptions,\n): Promise<TraceAnalysisEngineResult> {\n // One model call is spent on the report, so a budget of one call would buy\n // an answer with no investigation behind it. Refuse instead of pretending.\n if (request.limits.maxLlmCalls < 2) {\n throw new Error(\n `chat trace engine reserves one model call for the report, so maxLlmCalls must be at least 2 (analyst '${request.analystId}' declared ${request.limits.maxLlmCalls})`,\n )\n }\n const toolsByName = new Map(request.tools.map((tool) => [tool.name, tool]))\n if (toolsByName.size !== request.tools.length) {\n throw new Error(`chat trace engine received duplicate tool names for '${request.analystId}'`)\n }\n const toolDefinitions: LlmToolDefinition[] = request.tools.map((tool) => ({\n type: 'function',\n function: { name: tool.name, description: tool.description, parameters: tool.parameters },\n }))\n const investigationTurns = Math.max(\n 1,\n Math.min(request.limits.maxIterations, request.limits.maxLlmCalls - 1),\n )\n\n const messages: LlmMessage[] = [\n { role: 'system', content: systemPrompt(request, investigationTurns) },\n ]\n if (request.taskInputs) {\n messages.push({ role: 'user', content: renderTaskInputs(request.taskInputs) })\n }\n messages.push({ role: 'user', content: request.question })\n\n request.log?.('trace analyst engine started', {\n engine: ENGINE_ID,\n model: options.model,\n transport: options.chat.transport,\n tools: request.tools.map((tool) => tool.name),\n limits: request.limits,\n })\n\n const trajectory: unknown[] = []\n const servedModels = new Set<string>()\n let modelCalls = 0\n let toolCalls = 0\n let truncatedToolResults = 0\n let toolBudgetExhausted = false\n let turnsUsed = 0\n let stoppedOnAnswer = false\n\n for (let turn = 0; turn < investigationTurns; turn++) {\n turnsUsed = turn + 1\n const response = await callModel(request, options, {\n messages,\n tools: toolDefinitions,\n toolChoice: 'auto',\n purpose: 'investigation',\n })\n modelCalls += 1\n servedModels.add(response.servedModel ?? 'unreported')\n const requested = response.toolCalls ?? []\n messages.push({\n role: 'assistant',\n content: response.content,\n ...(requested.length > 0 ? { toolCalls: requested } : {}),\n })\n trajectory.push({\n turn: turnsUsed,\n phase: 'investigation',\n content: response.content,\n tool_calls: requested.map((call) => ({ id: call.id, name: call.name })),\n finish_reason: response.finishReason ?? null,\n })\n if (requested.length === 0) {\n stoppedOnAnswer = true\n break\n }\n for (const call of requested) {\n if (toolCalls >= request.limits.maxToolCalls) {\n toolBudgetExhausted = true\n // Every requested id still needs an answer: a provider rejects the\n // next turn when one tool call is left unanswered.\n messages.push(toolMessage(call, exhaustedToolBudget(request.limits.maxToolCalls)))\n continue\n }\n toolCalls += 1\n const executed = await executeTool(call, toolsByName, request)\n if (executed.truncated) truncatedToolResults += 1\n messages.push(toolMessage(call, executed.payload))\n trajectory.push({\n turn: turnsUsed,\n phase: 'tool',\n name: call.name,\n ok: executed.ok,\n truncated: executed.truncated,\n result_chars: executed.payload.length,\n })\n }\n if (toolBudgetExhausted) break\n }\n\n messages.push({ role: 'user', content: reportPrompt(options.reportFormat) })\n const report = await callModel(request, options, {\n messages,\n purpose: 'report',\n json: options.reportFormat,\n })\n modelCalls += 1\n servedModels.add(report.servedModel ?? 'unreported')\n trajectory.push({\n turn: turnsUsed + 1,\n phase: 'report',\n content: report.content,\n finish_reason: report.finishReason ?? null,\n })\n\n const parsed = parseReport(report.content, request.analystId, (index, reason) => {\n request.log?.('finding rejected: report row failed schema validation', {\n engine: ENGINE_ID,\n index,\n reason,\n })\n })\n\n const result: TraceAnalysisEngineResult = {\n answer: parsed.answer,\n findings: parsed.findings,\n trajectory,\n modelCalls,\n toolCalls,\n runtime: {\n engine: ENGINE_ID,\n model: options.model,\n transport: options.chat.transport,\n report_format: options.reportFormat,\n investigation_turns: turnsUsed,\n investigation_stopped_on_answer: stoppedOnAnswer,\n tool_budget_exhausted: toolBudgetExhausted,\n truncated_tool_results: truncatedToolResults,\n rejected_findings: parsed.rejectedFindings,\n // A gateway can answer `model: X` from another model on HTTP 200, so the\n // ids the provider echoed travel with the result as evidence.\n served_models: [...servedModels].sort(),\n task_inputs: request.taskInputs ? 'prompt-delivered' : 'none',\n },\n }\n request.log?.('trace analyst engine completed', {\n engine: ENGINE_ID,\n model_calls: result.modelCalls,\n tool_calls: result.toolCalls,\n findings: result.findings.length,\n })\n return result\n}\n\ninterface ModelTurn {\n content: string\n toolCalls?: LlmToolCall[]\n servedModel?: string | null\n finishReason?: string | null\n}\n\nasync function callModel(\n request: TraceAnalysisEngineRequest,\n options: ResolvedOptions,\n turn: {\n messages: LlmMessage[]\n tools?: LlmToolDefinition[]\n toolChoice?: LlmCallRequest['toolChoice']\n purpose: 'investigation' | 'report'\n json?: 'json-object' | 'json-schema'\n },\n): Promise<ModelTurn> {\n const chatRequest: LlmCallRequest = {\n model: options.model,\n // The transport may mutate what it is handed; the conversation is ours.\n messages: turn.messages.map((message) => ({ ...message })),\n maxTokens: options.maxOutputTokens,\n ...(turn.tools && turn.tools.length > 0\n ? { tools: turn.tools, ...(turn.toolChoice ? { toolChoice: turn.toolChoice } : {}) }\n : {}),\n ...(turn.json ? { jsonMode: true } : {}),\n ...(turn.json === 'json-schema' ? { jsonSchema: REPORT_JSON_SCHEMA } : {}),\n ...(options.temperature === undefined ? {} : { temperature: options.temperature }),\n ...(options.thinking === undefined ? {} : { thinking: options.thinking }),\n ...(options.requestTimeoutMs === undefined ? {} : { timeoutMs: options.requestTimeoutMs }),\n }\n const paid = await paidChat({\n chat: options.chat,\n request: chatRequest,\n ledger: request.costLedger,\n channel: 'analyst',\n phase: request.costPhase,\n actor: request.analystId,\n ...(request.costTags ? { tags: request.costTags } : {}),\n ...(options.pricing ? { pricing: options.pricing } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n if (!paid.succeeded) {\n // The transport already spent its own attempts. A failure here ends the\n // investigation: continuing would report an answer the model never gave.\n throw new Error(\n `chat trace engine ${turn.purpose} call failed for '${request.analystId}': ${paid.error.message}`,\n { cause: paid.error },\n )\n }\n return {\n content: paid.response.content,\n ...(paid.response.toolCalls ? { toolCalls: paid.response.toolCalls } : {}),\n ...(paid.response.servedModel === undefined ? {} : { servedModel: paid.response.servedModel }),\n ...(paid.response.finishReason === undefined\n ? {}\n : { finishReason: paid.response.finishReason }),\n }\n}\n\ninterface ExecutedTool {\n ok: boolean\n truncated: boolean\n payload: string\n}\n\nasync function executeTool(\n call: LlmToolCall,\n toolsByName: ReadonlyMap<string, TraceAnalysisToolDescriptor>,\n request: TraceAnalysisEngineRequest,\n): Promise<ExecutedTool> {\n const descriptor = toolsByName.get(call.name)\n if (!descriptor) {\n return {\n ok: false,\n truncated: false,\n payload: toolError(\n `unknown tool '${call.name}'; available tools are ${[...toolsByName.keys()].sort().join(', ')}`,\n ),\n }\n }\n let args: unknown\n try {\n args = call.argumentsJson.trim() === '' ? {} : JSON.parse(call.argumentsJson)\n } catch (error) {\n return {\n ok: false,\n truncated: false,\n payload: toolError(\n `arguments for '${call.name}' were not JSON: ${messageOf(error)}. Send valid JSON arguments.`,\n ),\n }\n }\n try {\n const value = await descriptor.handler(\n args,\n request.signal ? { signal: request.signal } : undefined,\n )\n return truncateToolPayload(JSON.stringify(value ?? null), request.limits.maxOutputChars)\n } catch (error) {\n // A bounded store refuses an oversized or malformed read by design. That\n // refusal is the model's next instruction, not the run's failure.\n if (request.signal?.aborted) throw error\n request.log?.('trace tool failed', {\n engine: ENGINE_ID,\n analyst_id: request.analystId,\n tool: call.name,\n reason: messageOf(error),\n })\n return { ok: false, truncated: false, payload: toolError(messageOf(error)) }\n }\n}\n\nfunction truncateToolPayload(payload: string, maxOutputChars: number): ExecutedTool {\n if (payload.length <= maxOutputChars) return { ok: true, truncated: false, payload }\n const keep = Math.max(0, maxOutputChars - TRUNCATION_MARKER.length)\n return { ok: true, truncated: true, payload: `${payload.slice(0, keep)}${TRUNCATION_MARKER}` }\n}\n\nfunction toolMessage(call: LlmToolCall, content: string): LlmMessage {\n return { role: 'tool', toolCallId: call.id, content }\n}\n\nfunction toolError(reason: string): string {\n return JSON.stringify({ error: reason })\n}\n\nfunction exhaustedToolBudget(maxToolCalls: number): string {\n return toolError(\n `the trace-tool budget of ${maxToolCalls} calls is spent; answer from the evidence already read`,\n )\n}\n\nfunction systemPrompt(request: TraceAnalysisEngineRequest, investigationTurns: number): string {\n return [\n request.instructions.trim(),\n [\n 'HOW THIS INVESTIGATION RUNS:',\n `- You have ${investigationTurns} investigation turns and at most ${request.limits.maxToolCalls} trace-tool calls.`,\n '- Call the trace tools to read the store. Never state a trace fact you did not read.',\n `- A tool result longer than ${request.limits.maxOutputChars} characters is truncated; narrow the query instead of asking again.`,\n '- A tool result carrying an \"error\" field is feedback: fix the call or take another route.',\n '- Answer with no tool call once you have the evidence. You are then asked for the final report.',\n ].join('\\n'),\n ].join('\\n\\n')\n}\n\nfunction reportPrompt(reportFormat: 'json-object' | 'json-schema'): string {\n return [\n 'Report now. Do not call any more tools.',\n 'Return one JSON object with exactly two fields:',\n ' \"answer\": a direct prose answer to the question.',\n ' \"findings\": an array of findings in the schema above. Emit [] when there is nothing to report.',\n reportFormat === 'json-object'\n ? 'Return the object alone, with no surrounding prose and no code fence.'\n : 'Return the object in the response schema you were given.',\n ].join('\\n')\n}\n\nfunction renderTaskInputs(taskInputs: Readonly<Record<string, unknown>>): string {\n // The engine contract forbids dropping structured inputs. This engine has no\n // code environment to bind them as variables, so they are delivered whole as\n // conversation material and the runtime record says which way they arrived.\n return [\n 'TASK INPUTS — structured material delivered with the question, not fetched through tools:',\n JSON.stringify(taskInputs, null, 2),\n ].join('\\n')\n}\n\ninterface ParsedReport {\n answer: string\n findings: TraceAnalysisEngineResult['findings']\n rejectedFindings: number\n}\n\nfunction parseReport(\n content: string,\n analystId: string,\n onRejectedFinding: (index: number, reason: string) => void,\n): ParsedReport {\n const envelope = coerceReportEnvelope(content, analystId)\n if (typeof envelope.answer !== 'string' || !envelope.answer.trim()) {\n throw new Error(`chat trace engine report for '${analystId}' carried no answer`)\n }\n // Findings are model output: one malformed row is model noise, not an engine\n // fault, and the rest of the paid investigation must survive it.\n const decoded = decodeRawFindingArray(envelope.findings)\n if (decoded.topLevelError !== undefined) {\n throw new Error(\n `chat trace engine report for '${analystId}' had a malformed findings array: ${decoded.topLevelError}`,\n )\n }\n for (const rejection of decoded.rejected) {\n onRejectedFinding(\n rejection.index,\n `${rejection.code}${rejection.path ? ` at ${rejection.path}` : ''}: ${rejection.message}`,\n )\n }\n return {\n answer: envelope.answer,\n findings: decoded.accepted,\n rejectedFindings: decoded.rejected.length,\n }\n}\n\nfunction coerceReportEnvelope(content: string, analystId: string): Record<string, unknown> {\n let value: unknown\n try {\n value = JSON.parse(extractJsonPayload(content))\n } catch (error) {\n throw new Error(`chat trace engine report for '${analystId}' was not JSON: ${messageOf(error)}`)\n }\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new Error(`chat trace engine report for '${analystId}' was not a JSON object`)\n }\n return value as Record<string, unknown>\n}\n\nfunction resolveModel(options: ChatTraceEngineOptions): string {\n const model = options.model ?? options.chat.defaultModel\n if (typeof model !== 'string' || !model.trim() || model !== model.trim()) {\n throw new TypeError(\n 'chat trace engine needs a model: pass ChatTraceEngineOptions.model or bind defaultModel on the ChatClient',\n )\n }\n return model\n}\n","/**\n * LockedJsonlAppender — mutex-serialized JSONL append helper for arbitrary\n * payloads. The reference-replay store does the same thing for typed\n * `ReferenceReplayRun` rows; this is the generic version used by\n * `MutationTelemetry`, `TrialTelemetry`, and any other consumer that wants\n * append-only durable telemetry without rolling its own lock.\n *\n * Locks are per absolute file path (process-local). Cross-process\n * concurrency is NOT addressed — that's an fcntl/flock problem.\n */\n\nimport { appendFileSync, existsSync, mkdirSync } from 'node:fs'\nimport { dirname } from 'node:path'\nimport { Mutex } from './concurrency'\n\nconst mutexes = new Map<string, Mutex>()\n\nfunction getMutex(path: string): Mutex {\n let m = mutexes.get(path)\n if (!m) {\n m = new Mutex()\n mutexes.set(path, m)\n }\n return m\n}\n\nexport class LockedJsonlAppender {\n private readonly mutex: Mutex\n constructor(public readonly path: string) {\n this.mutex = getMutex(path)\n if (!existsSync(dirname(path))) {\n mkdirSync(dirname(path), { recursive: true })\n }\n }\n\n async append(entry: unknown): Promise<void> {\n const line = `${JSON.stringify(entry)}\\n`\n await this.mutex.runExclusive(() => {\n appendFileSync(this.path, line)\n })\n }\n}\n\n/** Reset all internal mutex state — tests only. */\nexport function resetLockedAppendersForTesting(): void {\n mutexes.clear()\n}\n","/**\n * FindingsStore — durable persistence for AnalystFinding rows + a diff\n * helper so we can answer \"what changed since the last run?\" without\n * recomputing analysts.\n *\n * On-disk shape is JSONL: one finding per line, append-only, locked via\n * LockedJsonlAppender. Operators get crash-safety (no partial JSON),\n * cheap reads (sequential parse), and trivial backup (rsync the file).\n *\n * Reads are non-locking: a reader sees a consistent snapshot of all\n * fully-written lines and skips an incomplete trailing line if the\n * writer is mid-append. Cross-process locking is intentionally out of\n * scope (see locked-jsonl-appender.ts).\n *\n * The store is run-scoped: callers pass `runId` on append and on load,\n * which keeps multi-run files cleanly partitioned. The `diffFindings`\n * helper compares two run-id sets using stable `finding_id` semantics —\n * the diff is the cross-run signal the regression dashboard renders.\n */\n\nimport { existsSync, readFileSync } from 'node:fs'\n\nimport { LockedJsonlAppender } from '../locked-jsonl-appender'\nimport type { AnalystFinding } from './types'\n\n/**\n * One persisted row. We attach `run_id` on disk so a single file can\n * hold multiple runs and the diff helper can query without re-walking\n * separate files.\n */\nexport interface PersistedFinding extends AnalystFinding {\n run_id: string\n}\n\nexport class FindingsStore {\n private readonly appender: LockedJsonlAppender\n\n constructor(public readonly path: string) {\n this.appender = new LockedJsonlAppender(path)\n }\n\n async append(runId: string, findings: AnalystFinding[]): Promise<void> {\n for (const f of findings) {\n const row: PersistedFinding = { ...f, run_id: runId }\n await this.appender.append(row)\n }\n }\n\n /** Load every persisted finding. Discards malformed trailing lines silently. */\n loadAll(): PersistedFinding[] {\n if (!existsSync(this.path)) return []\n const raw = readFileSync(this.path, 'utf8')\n if (!raw) return []\n const out: PersistedFinding[] = []\n for (const line of raw.split('\\n')) {\n if (!line) continue\n try {\n out.push(JSON.parse(line) as PersistedFinding)\n } catch {\n // Skip torn trailing line — the lock guarantees no torn lines\n // mid-file, only at EOF when a writer is in-flight.\n }\n }\n return out\n }\n\n /** Filter to a single run. */\n loadRun(runId: string): PersistedFinding[] {\n return this.loadAll().filter((r) => r.run_id === runId)\n }\n}\n\n// ── Cross-run diff ──────────────────────────────────────────────────\n\nexport interface FindingsDiff {\n /** New finding ids in `current` that weren't in `previous`. */\n appeared: PersistedFinding[]\n /** Finding ids in `previous` that aren't in `current`. */\n disappeared: PersistedFinding[]\n /** Same finding id present in both runs and unchanged per the materiality test. */\n persisted: PersistedFinding[]\n /**\n * Same finding id in both runs but at least one non-identity field\n * shifted per `DiffPolicy.isMaterial`. Reported as [previous, current].\n */\n changed: Array<{ previous: PersistedFinding; current: PersistedFinding }>\n}\n\nexport interface DiffPolicy {\n /**\n * Predicate that decides whether two findings (same finding_id) count\n * as a material change. Defaults to {@link defaultIsMaterial}: severity\n * shift, confidence Δ > 0.05, or evidence count change. Compliance /\n * perf consumers MAY supply a stricter predicate (e.g. rationale text\n * diff, metric Δ thresholds).\n */\n isMaterial?: (previous: AnalystFinding, current: AnalystFinding) => boolean\n}\n\n/**\n * Default materiality test. Deliberately narrow so LLM-reword churn\n * doesn't flood the diff. Stricter tests are opt-in via DiffPolicy.\n */\nfunction defaultIsMaterial(a: AnalystFinding, b: AnalystFinding): boolean {\n if (a.severity !== b.severity) return true\n if (Math.abs((a.confidence ?? 0) - (b.confidence ?? 0)) > 0.05) return true\n if (a.evidence_refs.length !== b.evidence_refs.length) return true\n return false\n}\n\n/**\n * Diff two findings sets by stable finding_id. Callers typically load\n * the two run-id slices from the same store and pass them in.\n */\nexport function diffFindings(\n previous: PersistedFinding[],\n current: PersistedFinding[],\n policy: DiffPolicy = {},\n): FindingsDiff {\n const isMaterial = policy.isMaterial ?? defaultIsMaterial\n const prevById = new Map(previous.map((f) => [f.finding_id, f]))\n const curById = new Map(current.map((f) => [f.finding_id, f]))\n\n const appeared: PersistedFinding[] = []\n const disappeared: PersistedFinding[] = []\n const persisted: PersistedFinding[] = []\n const changed: FindingsDiff['changed'] = []\n\n for (const [id, cur] of curById) {\n const prev = prevById.get(id)\n if (!prev) {\n appeared.push(cur)\n continue\n }\n if (isMaterial(prev, cur)) {\n changed.push({ previous: prev, current: cur })\n } else {\n persisted.push(cur)\n }\n }\n for (const [id, prev] of prevById) {\n if (!curById.has(id)) disappeared.push(prev)\n }\n return { appeared, disappeared, persisted, changed }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,MAAM,4BAA4B;AAClC,MAAM,YAAY;;AAGlB,MAAM,oBAAoB;;;;;;AAqC1B,SAAS,wBAA2E;CAClF,MAAM,MAAM,EAAE,aAAa,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 -1,7 +1,7 @@
|
|
|
1
1
|
import { s as ValidationError } from "./errors-DeEEV9Vx.js";
|
|
2
|
+
import { at as summarizeNumberSeries } from "./statistics-CvvC-MPv.js";
|
|
2
3
|
import { t as mulberry32 } from "./random-DrzcgC7F.js";
|
|
3
|
-
import {
|
|
4
|
-
import { o as CostReceiptCaptureError, t as CostLedger } from "./cost-ledger-CS8R3IZj.js";
|
|
4
|
+
import { o as CostReceiptCaptureError, t as CostLedger } from "./cost-ledger-DfhStGcZ.js";
|
|
5
5
|
// src/fuzz/cube.ts
|
|
6
6
|
/**
|
|
7
7
|
* Input-space tiling + coverage projection.
|
|
@@ -3,35 +3,36 @@ import { c as ValidationError, t as AgentEvalError } from "./errors-E9I2hldP.js"
|
|
|
3
3
|
import { l as AgentProfileJson, r as AgentProfileCell } from "./agent-profile-cell-3kYxUsK2.js";
|
|
4
4
|
import { h as RunStatus, o as FailureClass, r as BudgetSpec } from "./schema-CkIvnmLU.js";
|
|
5
5
|
import { a as RunRecord, c as RunSplitTag } from "./run-record-D2BFMPGl.js";
|
|
6
|
-
import { i as AnalystFinding, m as EvidenceRef } from "./types-
|
|
7
|
-
import {
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import "./
|
|
11
|
-
import "./index-BPmj-_ta.js";
|
|
12
|
-
import { S as JudgeConfig, w as JudgeScore } from "./types-wDBk14lj.js";
|
|
6
|
+
import { i as AnalystFinding, m as EvidenceRef } from "./types-kBMNdo1X.js";
|
|
7
|
+
import { B as LlmCallResult, O as ChatClient, V as LlmChargeBounds, Y as LlmUsage, h as JudgeFn, lt as ServedModelCheck, y as ProductClientConfig, z as LlmCallRequest } from "./cluster-Cd0MRbr9.js";
|
|
8
|
+
import { E as PairedBootstrapResult, T as PairedBootstrapOptions } from "./index-DNXFzSpc.js";
|
|
9
|
+
import "./index-DfqAy8ct.js";
|
|
10
|
+
import { S as JudgeConfig, w as JudgeScore } from "./types-ip2D3-Ib.js";
|
|
13
11
|
import { s as TraceStore } from "./store-CMs5wGXP.js";
|
|
14
|
-
import
|
|
12
|
+
import "./statistical-heldout-CvOwNqt9.js";
|
|
13
|
+
import { t as AgentProfile } from "./agent-profile-BO8ruI6R.js";
|
|
14
|
+
import { o as PairedPromotionDecisionOptions, t as PairedDecisionMethod } from "./paired-promotion-decision-DJU3fZxH.js";
|
|
15
15
|
import { r as DatasetScenario, t as Dataset } from "./dataset-DThC1S6G.js";
|
|
16
16
|
import { t as DefaultVerdict } from "./verdict-D_qiBQ6_.js";
|
|
17
17
|
import { n as Layer } from "./multi-layer-verifier-lM4aVN78.js";
|
|
18
|
-
import "./summary-report-
|
|
19
|
-
import "./analyze-runs-
|
|
18
|
+
import "./summary-report-DyZquTaH.js";
|
|
19
|
+
import "./analyze-runs-DYYe18Gw.js";
|
|
20
20
|
import { o as TraceEmitter } from "./emitter-mAXC5PSN.js";
|
|
21
21
|
import { t as HarnessAssertion } from "./sandbox-harness-K3LuyORm.js";
|
|
22
|
-
import "./define-agent-eval-
|
|
23
|
-
import "./default-registry-
|
|
24
|
-
import "./exact-types-
|
|
25
|
-
import "./systemone-
|
|
26
|
-
import "./engine-
|
|
27
|
-
import "./registry-
|
|
28
|
-
import "./index-
|
|
22
|
+
import "./define-agent-eval-Bx3b9B01.js";
|
|
23
|
+
import "./default-registry-aPvwtzEM.js";
|
|
24
|
+
import "./exact-types-VAFjtOQN.js";
|
|
25
|
+
import "./systemone-DVk-Crtu.js";
|
|
26
|
+
import "./engine-BF8naBn7.js";
|
|
27
|
+
import "./registry-BAcEbzKm.js";
|
|
28
|
+
import "./index-CM12lr9E.js";
|
|
29
29
|
import { d as Trajectory, f as TrajectoryStep } from "./tool-waste-CUASoTtk.js";
|
|
30
|
-
import "./types-
|
|
31
|
-
import { B as ControlRuntimeConfig, H as ControlSeverity, R as ControlEvalResult, a as FeedbackLabel, v as ProposedSideEffect, z as ControlRunResult } from "./feedback-trajectory-
|
|
32
|
-
import "./store-tool-spans-
|
|
33
|
-
import "./researcher-
|
|
34
|
-
import "./index-
|
|
30
|
+
import "./types-BsdcSWnf.js";
|
|
31
|
+
import { B as ControlRuntimeConfig, H as ControlSeverity, R as ControlEvalResult, a as FeedbackLabel, v as ProposedSideEffect, z as ControlRunResult } from "./feedback-trajectory-DTj8eVTR.js";
|
|
32
|
+
import "./store-tool-spans-B3z_Qb5u.js";
|
|
33
|
+
import "./researcher-CSlc84Bp.js";
|
|
34
|
+
import "./index-BlTbxHlY.js";
|
|
35
|
+
import "./promotion-gate-Da0xV4sa.js";
|
|
35
36
|
import { SpanKind } from "@tangle-network/agent-trace-contract";
|
|
36
37
|
declare class CostCeilingReachedError extends ValidationError {
|
|
37
38
|
constructor(ceilingUsd: number, committedUsd: number, requestedUsd: number, phase: string, actor: string);
|
|
@@ -86,105 +87,6 @@ declare function stripFencedJson(raw: string): string;
|
|
|
86
87
|
* consistently across transports.
|
|
87
88
|
*/
|
|
88
89
|
declare function isTransientLlmError(err: unknown): boolean;
|
|
89
|
-
/** Mann–Whitney ROC area: ties count half; no observed member of either class means unknown. */
|
|
90
|
-
declare function rocAuc(scores: number[], labels: number[]): number | null;
|
|
91
|
-
/**
|
|
92
|
-
* Nearest-rank distribution summary for measurement paths (gates, dashboards,
|
|
93
|
-
* load harnesses): min/p50/p90/p95/p99/max + mean + sample stddev + a 95%
|
|
94
|
-
* Student-t CI on the mean. Consolidates the former @repo/shared
|
|
95
|
-
* distribution-stats: identical nearest-rank percentiles, with the CI now the
|
|
96
|
-
* exact t critical value for any df (the retired implementation capped its
|
|
97
|
-
* table at df 30 and fell back to 1.96).
|
|
98
|
-
*/
|
|
99
|
-
interface SampleDistribution {
|
|
100
|
-
min: number;
|
|
101
|
-
p50: number;
|
|
102
|
-
p90: number;
|
|
103
|
-
p95: number;
|
|
104
|
-
p99: number;
|
|
105
|
-
max: number;
|
|
106
|
-
mean: number;
|
|
107
|
-
stddev?: number;
|
|
108
|
-
ci95Low?: number;
|
|
109
|
-
ci95High?: number;
|
|
110
|
-
n: number;
|
|
111
|
-
values: number[];
|
|
112
|
-
}
|
|
113
|
-
interface DistributionSummaryOptions {
|
|
114
|
-
lowerBound?: number;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Nearest-rank percentile on an arbitrary sample, `percentile` on a 0-100
|
|
118
|
-
* scale — the same rule `summarizeDistribution` applies, exposed for a single
|
|
119
|
-
* percentile the summary struct does not carry (e.g. p99.9). Returns NaN for
|
|
120
|
-
* an empty sample; callers that need a numeric floor guard it.
|
|
121
|
-
*/
|
|
122
|
-
declare function percentileNearestRank(values: number[], percentile: number): number;
|
|
123
|
-
declare function summarizeDistribution(values: number[], options?: DistributionSummaryOptions): SampleDistribution;
|
|
124
|
-
/** Standardized effect sizes; undefined effects remain null. */
|
|
125
|
-
/** Independent Cohen's d, oriented b − a; null below two samples or for an unbounded effect. */
|
|
126
|
-
declare function cohensD(a: number[], b: number[]): number | null;
|
|
127
|
-
/** Paired Cohen's dz; constant nonzero deltas have no finite standardized effect. */
|
|
128
|
-
declare function pairedCohensDz(before: number[], after: number[]): number | null;
|
|
129
|
-
type CliffsMagnitude = 'negligible' | 'small' | 'medium' | 'large';
|
|
130
|
-
/** Cliff's delta, oriented after − before; empty samples return zero. */
|
|
131
|
-
declare function cliffsDelta(before: number[], after: number[]): number;
|
|
132
|
-
/** Romano magnitude thresholds for the absolute Cliff's delta. */
|
|
133
|
-
declare function interpretCliffs(delta: number): CliffsMagnitude;
|
|
134
|
-
/** Two-sided normal tail, evaluated without subtracting a near-one CDF. */
|
|
135
|
-
declare function normalTwoSidedPValue(z: number): number;
|
|
136
|
-
/** Two-sided Student-t tail, preserving small tail probabilities. */
|
|
137
|
-
declare function studentTTwoSidedPValue(t: number, df: number): number;
|
|
138
|
-
/** Pearson statistic for a 2x2 table; empty or fixed margins have statistic zero. */
|
|
139
|
-
declare function chiSquared(a: number, b: number, c: number, d: number): number;
|
|
140
|
-
/** One-degree-of-freedom chi-squared survival probability. */
|
|
141
|
-
declare function chiSquaredPValue(statistic: number): number;
|
|
142
|
-
/** Fisher two-sided probability: sum all fixed-margin tables no likelier than the observed table. */
|
|
143
|
-
declare function fisherExactTwoSided(a: number, b: number, c: number, d: number): number;
|
|
144
|
-
/** Fisher when any expected count is below five; otherwise Pearson's chi-squared tail. */
|
|
145
|
-
declare function twoByTwoPValue(a: number, b: number, c: number, d: number): number;
|
|
146
|
-
interface LinearRegressionResult {
|
|
147
|
-
slope: number;
|
|
148
|
-
rSquared: number;
|
|
149
|
-
slopePValue: number | null;
|
|
150
|
-
}
|
|
151
|
-
/** Centered least-squares slope; null p-value means no slope test was possible. */
|
|
152
|
-
declare function linearRegressionSlope(points: readonly {
|
|
153
|
-
x: number;
|
|
154
|
-
y: number;
|
|
155
|
-
}[]): LinearRegressionResult;
|
|
156
|
-
interface SampleSummaryOptions {
|
|
157
|
-
confidence?: number;
|
|
158
|
-
seed?: number;
|
|
159
|
-
resamples?: number;
|
|
160
|
-
}
|
|
161
|
-
interface SampleSummary {
|
|
162
|
-
n: number;
|
|
163
|
-
median: number;
|
|
164
|
-
mean: number;
|
|
165
|
-
stddev: number;
|
|
166
|
-
q1: number;
|
|
167
|
-
q3: number;
|
|
168
|
-
iqr: number;
|
|
169
|
-
min: number;
|
|
170
|
-
max: number;
|
|
171
|
-
range: number;
|
|
172
|
-
cv: number | null;
|
|
173
|
-
skewness: number | null;
|
|
174
|
-
kurtosis: number | null;
|
|
175
|
-
mad: number;
|
|
176
|
-
outliers: number[];
|
|
177
|
-
medianInterval: {
|
|
178
|
-
low: number;
|
|
179
|
-
high: number;
|
|
180
|
-
confidence: number;
|
|
181
|
-
resamples: number;
|
|
182
|
-
} | null;
|
|
183
|
-
}
|
|
184
|
-
/** Interpolated sample median; an empty population has no measured median. */
|
|
185
|
-
declare function sampleMedian(values: readonly number[]): number | null;
|
|
186
|
-
/** Descriptive facts, not stability policy or a significance test. */
|
|
187
|
-
declare function summarizeSample(values: readonly number[], options?: SampleSummaryOptions): SampleSummary | null;
|
|
188
90
|
type PolicyEditSchemaVersion = 'policy-edit/v1';
|
|
189
91
|
declare const POLICY_EDIT_AXES: readonly ["carrier", "representation", "budget", "sampling", "output_contract", "tool_contract", "routing", "memory", "agent_profile", "deployment_target"];
|
|
190
92
|
type PolicyEditAxis = (typeof POLICY_EDIT_AXES)[number];
|
|
@@ -3586,14 +3488,12 @@ declare const MODEL_PRICING: Record<string, TokenPrice>;
|
|
|
3586
3488
|
* Returns null when the id matches nothing (caller decides — never a
|
|
3587
3489
|
* silent-zero masquerading as a real $0 cost). */
|
|
3588
3490
|
declare function resolveModelPricing(model: string): TokenPrice | null;
|
|
3589
|
-
/** True when `model` has known pricing
|
|
3590
|
-
* callers distinguish a real $0 from an unpriced model. */
|
|
3491
|
+
/** True when `model` has known pricing: distinguishes a real $0 from unpriced. */
|
|
3591
3492
|
declare function isModelPriced(model: string): boolean;
|
|
3592
3493
|
/** Estimate token count from string length (chars / 4 approximation) */
|
|
3593
3494
|
declare function estimateTokens(text: string): number;
|
|
3594
|
-
/** Calculate cost in USD from token counts and model. Unknown models warn
|
|
3595
|
-
*
|
|
3596
|
-
* working; cost-sensitive callers should gate on {@link isModelPriced}. */
|
|
3495
|
+
/** Calculate cost in USD from token counts and model. Unknown models warn once
|
|
3496
|
+
* (not a silent zero) and return 0; cost-sensitive callers gate on {@link isModelPriced}. */
|
|
3597
3497
|
declare function estimateCost(inputTokens: number, outputTokens: number, model: string): number;
|
|
3598
3498
|
interface AntiSlopConfig {
|
|
3599
3499
|
/** Domain label — appears in the DimensionJudgeScore output */
|
|
@@ -3645,5 +3545,5 @@ declare function assertContains(name: string, actual: string, expected: string):
|
|
|
3645
3545
|
declare function assertNotContains(name: string, actual: string, forbidden: string): HarnessAssertion;
|
|
3646
3546
|
declare function assertEventCount(name: string, count: number, min: number, max?: number): HarnessAssertion;
|
|
3647
3547
|
declare function assertHasField(name: string, obj: Record<string, unknown>, field: string): HarnessAssertion;
|
|
3648
|
-
export { KeywordConceptSpec as $, PolicyEditCandidateRecord as $i, TrialTrace as $n, exportProductBenchmark as $r, ArgumentCheck as $t, contentHash as A,
|
|
3649
|
-
//# sourceMappingURL=index-
|
|
3548
|
+
export { KeywordConceptSpec as $, PolicyEditCandidateRecord as $i, TrialTrace as $n, exportProductBenchmark as $r, ArgumentCheck as $t, contentHash as A, DetectorSignal as Ai, SteeringOptimizationResult as An, localCommandRunner as Ar, assertNoHiddenLeak as At, PairedPromotionPowerOptions as B, ScenarioCost as Bi, PromptHandle as Bn, RuntimeTrajectoryEvidenceSummary as Br, CanaryLeak as Bt, runAgentControlLoop as C, UserQuestion as Ci, recordRuns as Cn, DiscoverPersonasOptions as Cr, FieldDestination as Ct, index_d_exports as D, ExtractResult as Di, CounterfactualResult as Dn, DirEntry as Dr, JudgeScoreInput as Dt, BudgetGuard as E, ExtractOptions as Ei, CounterfactualMutation as En, CommandRunner as Er, HiddenLeak as Et, gateTreatmentApplied as F, observeAll as Fi, clamp01 as Fn, ActiveLearningOptions as Fr, ViteDeployRunnerInput as Ft, pairedPromotionPower as G, TaskHeadroom as Gi, seatPresets as Gn, ProductBenchmarkManifest as Gr, ContractLintFinding as Gt, PairedValueLaw as H, CapabilityHeadroomOptions as Hi, hashContent as Hn, RuntimeTrajectoryRecord as Hr, ActionExecutionPolicy as Ht, PairedPromotionAlternative as I, repeatedActionDetector as Ii, SteeringBundle as In, SynthesisTarget as Ir, WranglerDeployRunnerInput as It, OracleObservation as J, FindingToPolicyEditOptions as Ji, preflightModels as Jn, assertProductBenchmarkRun as Jr, lintTraceContractSpec as Jt, requiredPairsForPairedPromotion as K, assertCapabilityHeadroom as Ki, ModelEndpointCheck as Kn, ProductBenchmarkSplit as Kr, TraceContractSpec as Kt, PairedPromotionAlternativeCell as L, CostEntry as Li, ReferenceReplayCaseRun as Ln, proposeSynthesisTargets as Lr, deployGateLayer as Lt, TreatmentGate as M, RepeatedActionOptions as Mi, RunScore as Mn, BoundedProcessResult as Mr, DeployGateLayerInput as Mt, TreatmentGateInput as N, StreamingDetector as Ni, RunScoreWeights as Nn, DEFAULT_BOUNDED_PROCESS_TIMEOUT_MS as Nr, DeployRunResult as Nt, VerdictCacheStore as O, extractErrorCount as Oi, CounterfactualRunner as On, RunCommandInput as Or, NoLeakOptions as Ot, TreatmentGateOptions as P, errorStreakDetector as Pi, aggregateRunScore as Pn, runBoundedProcess as Pr, DeployRunner as Pt, jsonShape as Q, PolicyEditAxis as Qi, ReflectionProposal as Qn, ProductBenchmarkSingleRunExportOptions as Qr, traceContract as Qt, PairedPromotionCallRates as R, CostSummary as Ri, ReferenceReplayRun as Rn, ProjectRuntimeTrajectoryEvidenceOptions as Rr, viteDeployRunner as Rt, subjectiveEval as S, CostCeilingReachedError as Sa, KnowledgeSensitivity as Si, loadScorecard as Sn, ImprovementVerdictResult as Sr, BlendWeights as St, BudgetBreachError as T, ErrorCountPattern as Ti, CounterfactualContext as Tn, discoverPersonas as Tr, HiddenGradeResult as Tt, RequiredPairsForPairedPromotionOptions as U, CapabilityHeadroomResult as Ui, ModelSeats as Un, RuntimeTrajectoryRunRecord as Ur, ActionPolicyDecision as Ut, PairedPromotionPowerResult as V, AssertCapabilityHeadroomOptions as Vi, PromptRegistry as Vn, RuntimeTrajectoryHookEvent as Vr, checkCanaries as Vt, RequiredPairsForPairedPromotionResult as W, HeadroomInput as Wi, resolveSeat as Wn, projectRuntimeTrajectoryEvidence as Wr, evaluateActionPolicy as Wt, OracleResult as X, PolicyEditAdmission as Xi, jsonlRunRecordBackend as Xn, ProductBenchmarkExportOptions as Xr, checkTraceContracts as Xt, OracleReport as Y, PolicyEdit as Yi, RunRecordBackend as Yn, readProductBenchmarkManifest as Yr, explainTraceContract as Yt, evaluateOracles as Z, PolicyEditAdmissionOptions as Zi, ReflectionContext as Zn, ProductBenchmarkExportResult as Zr, evaluateTraceContract as Zt, blockingKnowledgeEval as _, maximumChargeForLlmRequest as _a, KnowledgeFreshness as _i, ScorecardDiff as _n, jsonlReviewStore as _r, AssertSingleBackendOptions as _t, assertHttpOk as a, PolicyEditRisk as aa, TrainSelectionTestPartition as ai, ContractStatus as an, ProposeOutput as ar, EnsembleJudgeOptions as at, userQuestionsForKnowledgeGaps as b, costForUsage as ba, KnowledgeRequirement as bi, diffScorecard as bn, ExperimentStats as br, SingleBackendReport as bt, assertStatus as c, PolicyEditTarget as ca, PairedDeltaTestResult as ci, RetryWrite as cn, Review as cr, JudgeRetryPolicy as ct, MODEL_PRICING as d, isTransientLlmError as da, LeaderboardOptions as di, CellVerdict as dn, ReviewMemoryEntry as dr, JudgeVerdict as dt, PolicyEditChange as ea, exportProductBenchmarkRuns as ei, ContractCheckResult as en, buildReflectionPrompt as er, KeywordCoverageFinding as et, estimateCost as f, stripFencedJson as fa, LeaderboardRow as fi, DiffScorecardOptions as fn, ReviewMemoryStore as fr, aggregateJudgeVerdicts as ft, acquisitionPlansForKnowledgeGaps as g, costReceiptFromLlmError as ga, KnowledgeBundle as gi, ScorecardCellDiff as gn, inMemoryReviewStore as gr, runIntentMatchJudge as gt, resolveModelPricing as h, costReceiptFromLlm as ha, KnowledgeAcquisitionMode as hi, ScorecardCell as hn, createLlmReviewer as hr, IntentMatchResult as ht, assertHasField as i, PolicyEditInit as ia, TrainSelectionTestOptions as ii, ContractSpan as in, ProposeInput as ir, runKeywordCoverageJudgeUrl as it, fileVerdictCache as j, ErrorStreakOptions as ji, SteeringOptimizationRow as jn, BoundedProcessInput as jr, blendHeldout as jt, canonicalJson as k, DetectorEvent as ki, PairwiseSteeringOptimizer as kn, RunCommandResult as kr, RoutedField as kt, analyzeAntiSlop as l, PolicyEditTargetSurface as la, minimumPairsForPairedDeltaTest as li, SpanPredicate as ln, ReviewFn as lr, withJudgeRetry as lt, isModelPriced as m, LlmResponseError as ma, DataAcquisitionPlan as mi, Scorecard as mn, VerifyFn as mr, IntentMatchOptions as mt, assertEventCount as n, PolicyEditGainDirection as na, HeldOutPartition as ni, ContractRuleExecution as nn, LlmReviewerConfig as nr, KeywordCoverageResult as nt, assertLatencyUnder as o, PolicyEditSchemaVersion as oa, partitionHeldOut as oi, ContractVerdict as on, ProposeReviewConfig as or, ensembleJudge as ot, estimateTokens as p, LlmCallError as pa, leaderboard as pi, RecordRunsOptions as pn, Verification as pr, IntentMatchInput as pt, Oracle as q, capabilityHeadroom as qi, ModelEndpointRequest as qn, ProductBenchmarkValidationReport as qr, compileTraceContractSpec as qt, assertExists as r, PolicyEditGainUnit as ra, PartitionHeldOutOptions as ri, ContractRun as rn, ProposeFn as rr, runKeywordCoverageJudge as rt, assertNotContains as s, PolicyEditSource as sa, PairedDeltaTestOptions as si, OrderMode as sn, ProposeReviewReport as sr, JudgeRetryOutcome as st, assertContains as t, PolicyEditExpectedGain as ta, productBenchmarkRepoIdentity as ti, ContractRule as tn, parseReflectionResponse as tr, KeywordCoverageOptions as tt, createAntiSlopJudge as u, makePolicyEditCandidateRecord as ua, pairedDeltaTest as ui, TraceContract as un, ReviewInput as ur, EnsembleAggregate as ut, knowledgeReadinessTracePayload as v, CostResult as va, KnowledgeImportance as vi, ScorecardEntry as vn, runProposeReview as vr, BackendDescriptor as vt, ProductClient as w, ERROR_COUNT_PATTERNS as wi, recordRunsToScorecard as wn, DiscoveredPersona as wr, HiddenCriteriaGrader as wt, objectiveEval as x, CostAccountingIncompleteError as xa, KnowledgeRequirementCategory as xi, formatScorecardDiff as xn, ImprovementThresholds as xr, assertSingleBackend as xt, scoreKnowledgeReadiness as y, costForTokenPricing as ya, KnowledgeReadinessReport as yi, ScorecardLogLine as yn, ExperimentRep as yr, SingleBackendDivergence as yt, PairedPromotionPowerCall as z, CostTracker as zi, ReferenceReplaySplit as zn, RuntimeTrajectoryEvidenceProjection as zr, wranglerDeployRunner as zt };
|
|
3549
|
+
//# sourceMappingURL=index-7tWvC0aW.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-7tWvC0aW.d.ts","names":[],"sources":["../src/cost-ledger/errors.ts","../src/cost-ledger/pricing.ts","../src/llm-client/accounting.ts","../src/llm-client/errors.ts","../src/llm-client/json.ts","../src/llm-client/resilience.ts","../src/analyst/policy-edit.ts","../src/capability-headroom.ts","../src/cost-tracker.ts","../src/detectors/index.ts","../src/error-count-extractor.ts","../src/knowledge/types.ts","../src/leaderboard.ts","../src/paired-delta-test.ts","../src/partition-held-out.ts","../src/product-benchmark/export.ts","../src/product-benchmark/index.ts","../src/runtime-trajectory.ts","../src/active-learning.ts","../src/bounded-process.ts","../src/command-runner.ts","../src/discover-personas.ts","../src/improvement-verdict.ts","../src/propose-review.ts","../src/reflective-mutation.ts","../src/eval-trace-store.ts","../src/integrity/preflight.ts","../src/model-seats.ts","../src/prompt-registry.ts","../src/reference-replay.ts","../src/steering.ts","../src/run-score.ts","../src/steering-optimizer.ts","../src/counterfactual.ts","../src/scorecard.ts","../src/trace-contracts/types.ts","../src/trace-contracts/builder.ts","../src/trace-contracts/evaluate.ts","../src/trace-contracts/explain.ts","../src/trace-contracts/spec.ts","../src/action-policy.ts","../src/contamination-guard.ts","../src/deploy-gate-layer.ts","../src/hidden-criteria-grading.ts","../src/integrity/single-backend.ts","../src/intent-match-judge.ts","../src/judge-ensemble.ts","../src/judge-retry.ts","../src/judge-panel.ts","../src/keyword-coverage-judge.ts","../src/oracle.ts","../src/paired-promotion-power.ts","../src/treatment-gate.ts","../src/verdict-cache.ts","../src/profile/baselines.ts","../src/profile/index.ts","../src/budget-guard.ts","../src/client.ts","../src/control-runtime.ts","../src/control-runtime/policy.ts","../src/knowledge/readiness.ts","../src/metrics.ts","../src/anti-slop.ts","../src/sandbox-assertions.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAMa,gCAAgC;EAEzC,YAAA,oBACA,sBACA,sBACA,eACA;;cAQS,sCAAsC;UCblC;EACf;EACA;;iBAGc,aAAa,eAAe,OAAO,YAAY;;iBAc/C,oBACd,SAAS,oBACT,OAAO,KAAK;iBCtBE,2BACd,SAAS,KACP,0GAGF,UAAS,kBACR;;;;;;iBA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Q;;EAER,QAAQ,OAAO;;;;;;iBAOD,gBACd,mBACA,QAAQ,KAAK,SAAS;EACpB,gBAAgB,OAAO;IAExB;iBC5Ha,aAAa,cAAc,KAAK,WAAW;iBAS3C,aACd,cACA,gBACA,8BACC;iBAUa,aAAa,cAAc,iBAAiB;iBAa5C,mBACd,cACA,kBACA,mBACC;iBAaa,eAAe,cAAc,gBAAgB,mBAAmB;iBAShE,kBACd,cACA,gBACA,oBACC;iBAaa,iBACd,cACA,eACA,aACA,eACC;iBAca,eACd,cACA,KAAK,yBACL,gBACC"}
|
|
@@ -1,97 +1,12 @@
|
|
|
1
1
|
import { a as JudgeError } from "./errors-E9I2hldP.js";
|
|
2
2
|
import { f as Run } from "./schema-CkIvnmLU.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { H as LlmClientOptions } from "./cluster-Cd0MRbr9.js";
|
|
4
|
+
import { Bt as CalibrationResult, Gt as GoldenItem, Ht as ContinuousAgreement, Mt as CorpusAgreementReport, Vt as CandidateScore, Wt as ContinuousCalibrationResult } from "./index-DNXFzSpc.js";
|
|
5
5
|
import { r as LedgerHash } from "./canonical-gLeHiqzd.js";
|
|
6
6
|
import { s as TraceStore } from "./store-CMs5wGXP.js";
|
|
7
7
|
import { h as OutcomeStore, m as OutcomeFilter } from "./rubric-predictive-validity-B3RzbwOx.js";
|
|
8
8
|
import { t as ComputedInterval } from "./interval-CWyxqDpE.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
|
-
/**
|
|
11
|
-
* Inter-rater reliability — Krippendorff's α under the squared-difference
|
|
12
|
-
* metric, pooled across dimensions.
|
|
13
|
-
*
|
|
14
|
-
* Each inner array is one judge's scores. Items are matched by position
|
|
15
|
-
* WITHIN a dimension: the k-th score a judge supplies carrying dimension
|
|
16
|
-
* `d` is item k of `d`, and the ratings compared against each other are
|
|
17
|
-
* the ones different judges gave to the same item. Every judge that scores
|
|
18
|
-
* a dimension at all must supply the same number of scores for it —
|
|
19
|
-
* ragged input cannot be aligned into items and throws rather than
|
|
20
|
-
* comparing mismatched items.
|
|
21
|
-
*
|
|
22
|
-
* α = 1 − D_observed / D_expected: D_observed averages the squared
|
|
23
|
-
* difference over within-item judge pairs, D_expected over every pair of
|
|
24
|
-
* ratings irrespective of item. α = 1 is perfect agreement, 0 is chance,
|
|
25
|
-
* negative is systematic disagreement.
|
|
26
|
-
*/
|
|
27
|
-
declare function interRaterReliability(judgeScores: DimensionJudgeScore[][]): number;
|
|
28
|
-
interface CorpusScoreRecord {
|
|
29
|
-
/** Stable identifier for the rated item (scenario, span, turn, …). */
|
|
30
|
-
itemId: string;
|
|
31
|
-
/** Identifier for the judge that produced this score. */
|
|
32
|
-
judgeName: string;
|
|
33
|
-
/** Dimension name (matches `DimensionJudgeScore.dimension`). */
|
|
34
|
-
dimension: string;
|
|
35
|
-
/** Numeric score; must be finite. */
|
|
36
|
-
score: number;
|
|
37
|
-
}
|
|
38
|
-
interface CorpusAgreementPerDimension extends ContinuousAgreement {
|
|
39
|
-
dimension: string;
|
|
40
|
-
/** Item IDs that contributed to this dimension's matrix (every judge scored them). */
|
|
41
|
-
itemIds: string[];
|
|
42
|
-
/** Judge IDs that contributed to this dimension's matrix. */
|
|
43
|
-
judgeIds: string[];
|
|
44
|
-
}
|
|
45
|
-
interface CorpusAgreementReport {
|
|
46
|
-
/** Per-dimension ICC(2,1) + κ_w + Pearson + Spearman + bootstrap CIs. */
|
|
47
|
-
perDimension: CorpusAgreementPerDimension[];
|
|
48
|
-
/** Mean ICC across dimensions (NaN if no dimension yielded a finite ICC). */
|
|
49
|
-
overallIcc: number;
|
|
50
|
-
/** Mean weighted κ across dimensions (NaN if none finite). */
|
|
51
|
-
overallWeightedKappa: number;
|
|
52
|
-
/** Dimensions evaluated (sorted). */
|
|
53
|
-
dimensions: string[];
|
|
54
|
-
/** Judges seen across the corpus (sorted). */
|
|
55
|
-
judgeIds: string[];
|
|
56
|
-
}
|
|
57
|
-
interface CorpusAgreementOptions extends ContinuousAgreementOptions {
|
|
58
|
-
/** Restrict the audit to these dimensions; default every one in the input. A named absentee throws. */
|
|
59
|
-
dimensions?: string[];
|
|
60
|
-
/** Restrict the audit to these judges; default every one in the input. A named absentee throws. */
|
|
61
|
-
judges?: string[];
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Corpus-wide inter-rater agreement across N items × M judges × D dimensions, the
|
|
65
|
-
* question `interRaterReliability`'s within-item α cannot answer.
|
|
66
|
-
*
|
|
67
|
-
* For each dimension, builds the [n_items][n_judges] matrix of scores
|
|
68
|
-
* (keeping only items every judge rated on that dimension), then runs
|
|
69
|
-
* `continuousAgreement` to get ICC(2,1), κ_w, Pearson, Spearman, and
|
|
70
|
-
* bootstrap CIs. Reports a pooled mean across dimensions as a single
|
|
71
|
-
* "is this judge panel reliable on this corpus?" number. Empty input, fewer than 2 judges or
|
|
72
|
-
* items, a judge without scores on a dimension and duplicate records all throw: a silently
|
|
73
|
-
* shrunk matrix would corrupt the overall metric.
|
|
74
|
-
*/
|
|
75
|
-
declare function corpusInterRaterAgreement(records: CorpusScoreRecord[], opts?: CorpusAgreementOptions): CorpusAgreementReport;
|
|
76
|
-
/**
|
|
77
|
-
* Convenience adapter for `DimensionJudgeScore[]` data keyed externally by item.
|
|
78
|
-
*
|
|
79
|
-
* Use when you have per-item arrays of `DimensionJudgeScore[]` (e.g. one
|
|
80
|
-
* `ScenarioResult.judgeScores` per scenario) and want corpus-wide
|
|
81
|
-
* agreement without manually flattening. `itemId` must be unique per
|
|
82
|
-
* row of `itemsScores`.
|
|
83
|
-
*/
|
|
84
|
-
declare function corpusInterRaterAgreementFromJudgeScores(itemsScores: Array<{
|
|
85
|
-
itemId: string;
|
|
86
|
-
scores: DimensionJudgeScore[];
|
|
87
|
-
}>, opts?: CorpusAgreementOptions): CorpusAgreementReport;
|
|
88
|
-
interface NominalAgreementOptions {
|
|
89
|
-
/** Cluster id per pair; pairs sharing one are resampled together. Default: every pair alone. */
|
|
90
|
-
clusters?: readonly string[];
|
|
91
|
-
/** Default 2000. */
|
|
92
|
-
resamples?: number;
|
|
93
|
-
seed?: number;
|
|
94
|
-
}
|
|
95
10
|
interface EvalMetricSpec {
|
|
96
11
|
id: string;
|
|
97
12
|
/** Extract a scalar from a run. Omit it and `id` must name one of
|
|
@@ -219,13 +134,14 @@ declare function rankedProbabilityScore(forecasts: readonly OrdinalForecast[]):
|
|
|
219
134
|
interface ClusteredObservation {
|
|
220
135
|
cluster: string;
|
|
221
136
|
value: number;
|
|
137
|
+
stratum?: string;
|
|
222
138
|
}
|
|
223
139
|
interface ClusterBootstrapOptions {
|
|
224
140
|
/** Confidence level. Default 0.95. */
|
|
225
141
|
confidence?: number;
|
|
226
142
|
/** Bootstrap resample count. Default 2000. */
|
|
227
143
|
resamples?: number;
|
|
228
|
-
/** Deterministic seed. If omitted, derived from the values
|
|
144
|
+
/** Deterministic seed. If omitted, derived from the values for reproducible intervals. */
|
|
229
145
|
seed?: number;
|
|
230
146
|
}
|
|
231
147
|
interface ClusterBootstrapResult {
|
|
@@ -238,16 +154,7 @@ interface ClusterBootstrapResult {
|
|
|
238
154
|
confidence: number;
|
|
239
155
|
resamples: number;
|
|
240
156
|
}
|
|
241
|
-
/**
|
|
242
|
-
* Percentile cluster bootstrap of an observation mean. Whole clusters are resampled with
|
|
243
|
-
* replacement and each resample's statistic is Σ values / Σ observations over the drawn
|
|
244
|
-
* clusters, so observations that share a source move together and a large cluster cannot
|
|
245
|
-
* pose as many independent results. For a paired comparison pass the per-observation
|
|
246
|
-
* difference (candidate − baseline) under the observation's cluster.
|
|
247
|
-
*
|
|
248
|
-
* With one cluster the interval collapses to the point estimate: there is no between-cluster
|
|
249
|
-
* spread to measure, which callers must treat as no interval, not as certainty.
|
|
250
|
-
*/
|
|
157
|
+
/** Observation-weighted mean through the shared stratified cluster bootstrap. */
|
|
251
158
|
declare function clusterBootstrapMean(observations: readonly ClusteredObservation[], options?: ClusterBootstrapOptions): ClusterBootstrapResult;
|
|
252
159
|
declare const evaluatorAdmissionPolicySchema: z.ZodObject<{
|
|
253
160
|
confidence: z.ZodNumber;
|
|
@@ -1170,5 +1077,5 @@ interface CatchRateReport {
|
|
|
1170
1077
|
* across two runs is a fabrication.
|
|
1171
1078
|
*/
|
|
1172
1079
|
declare function catchRate(results: readonly PlantOutcome[], manifest: PlantManifest): CatchRateReport;
|
|
1173
|
-
export { measureJudgeAgreement as $, CorrelationStudyOptions as $t, JudgePanelOutput as A, ProbabilityPolicyAuditInput as At, JudgeConfusion as B, clusterBootstrapMean as Bt, JudgeCalibrationCellVerdict as C, EvaluatorAdmissionPolicy as Ct, JudgeCalibrationGoldItem as D, EvaluatorAuditPlan as Dt, JudgeCalibrationGateConfig as E, EvaluatorAuditObservation as Et, CalibrationExample as F, evaluatorAuditObservationSchema as Ft, JudgeGateRefusedError as G, CategoricalForecast as Gt, JudgeGateDecision as H, CalibrationOptions as Ht, CalibrationMerge as I, planEvaluatorAudit as It, JudgeRunMeta as J, calibrationCurve as Jt, JudgeGateStatus as K, OrdinalForecast as Kt, DEFAULT_JUDGE_GATE_POLICY as L, ClusterBootstrapOptions as Lt, RubricDimensionGuide as M, auditEvaluator as Mt, calibrateJudgePanel as N, auditProbabilityPolicy as Nt, JudgeDimensionCalibration as O, EvaluatorAuditPlanInput as Ot, gateJudgeCalibration as P, evaluatorAdmissionPolicySchema as Pt, judgeGateDecision as Q, CorrelationResult as Qt, JudgeAgreement as R, ClusterBootstrapResult as Rt, CalibrateJudgePanelInput as S, analyzeSeries as St, JudgeCalibrationGateCell as T, EvaluatorAuditInput as Tt, JudgeGateInput as U, CalibrationPair as Ut, JudgeExampleAgreement as V, CalibrationBin as Vt, JudgeGatePolicy as W, CalibrationReport as Wt, addCalibrationVerdicts as X, multiclassBrierScore as Xt, OwnerVerdict as Y, calibrationFromPairs as Yt, assertJudgeMayGate as Z, rankedProbabilityScore as Zt, catchRate as _, snapshotFromCalibration as _t, PerturbedField as a,
|
|
1174
|
-
//# sourceMappingURL=index-
|
|
1080
|
+
export { measureJudgeAgreement as $, CorrelationStudyOptions as $t, JudgePanelOutput as A, ProbabilityPolicyAuditInput as At, JudgeConfusion as B, clusterBootstrapMean as Bt, JudgeCalibrationCellVerdict as C, EvaluatorAdmissionPolicy as Ct, JudgeCalibrationGoldItem as D, EvaluatorAuditPlan as Dt, JudgeCalibrationGateConfig as E, EvaluatorAuditObservation as Et, CalibrationExample as F, evaluatorAuditObservationSchema as Ft, JudgeGateRefusedError as G, CategoricalForecast as Gt, JudgeGateDecision as H, CalibrationOptions as Ht, CalibrationMerge as I, planEvaluatorAudit as It, JudgeRunMeta as J, calibrationCurve as Jt, JudgeGateStatus as K, OrdinalForecast as Kt, DEFAULT_JUDGE_GATE_POLICY as L, ClusterBootstrapOptions as Lt, RubricDimensionGuide as M, auditEvaluator as Mt, calibrateJudgePanel as N, auditProbabilityPolicy as Nt, JudgeDimensionCalibration as O, EvaluatorAuditPlanInput as Ot, gateJudgeCalibration as P, evaluatorAdmissionPolicySchema as Pt, judgeGateDecision as Q, CorrelationResult as Qt, JudgeAgreement as R, ClusterBootstrapResult as Rt, CalibrateJudgePanelInput as S, analyzeSeries as St, JudgeCalibrationGateCell as T, EvaluatorAuditInput as Tt, JudgeGateInput as U, CalibrationPair as Ut, JudgeExampleAgreement as V, CalibrationBin as Vt, JudgeGatePolicy as W, CalibrationReport as Wt, addCalibrationVerdicts as X, multiclassBrierScore as Xt, OwnerVerdict as Y, calibrationFromPairs as Yt, assertJudgeMayGate as Z, rankedProbabilityScore as Zt, catchRate as _, snapshotFromCalibration as _t, PerturbedField as a, SentinelMetrics as at, plantByPerturbation as b, SeriesConvergenceOptions as bt, PlantEvidence as c, SentinelSnapshot as ct, PlantKindCounts as d, SentinelTrend as dt, CorrelationStudyResult as en, registerCalibrationSet as et, PlantManifest as f, SnapshotMeta as ft, UnseededRejection as g, snapshotFromAgreement as gt, SeededGradingSet as h, judgeSentinelReport as ht, PerturbationKind as i, SentinelMetricName as it, JudgePanelPrompt as j, ProbabilityPolicyAuditReport as jt, JudgePanelCalibration as k, EvaluatorErrorRate as kt, PlantExpectation as l, SentinelStore as lt, SeedPlantsOptions as m, fileSentinelStore as mt, CatchRateStatus as n, OutcomePair as nn, EvalHealthStamp as nt, PerturbedPlant as o, SentinelReport as ot, PlantOutcome as p, evalHealthStamp as pt, JudgeRun as q, brierScore as qt, EvidencePerturbation as r, correlationStudy as rn, JudgeSentinelOptions as rt, Plant as s, SentinelSetOptions as st, CatchRateReport as t, EvalMetricSpec as tn, snapshotFromJudgeAgreement as tt, PlantKind as u, SentinelThresholds as ut, definePlant as v, snapshotFromSentinelSet as vt, JudgeCalibrationGate as w, EvaluatorAdmissionReport as wt, seedPlants as x, SeriesConvergenceResult as xt, perturbEvidence as y, validateSentinelSnapshot as yt, JudgeCalibrationSet as z, ClusteredObservation as zt };
|
|
1081
|
+
//# sourceMappingURL=index-B62BaRzH.d.ts.map
|