@tangle-network/agent-eval 1.0.12 → 1.0.14
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 +36 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-CoD1Dotf.d.ts → agent-profile-CPv4tENR.d.ts} +2 -2
- package/dist/{agent-profile-CoD1Dotf.d.ts.map → agent-profile-CPv4tENR.d.ts.map} +1 -1
- package/dist/{agreement-irr-w-t3XUTD.js → agreement-irr-DXcXEt4I.js} +20 -23
- package/dist/agreement-irr-DXcXEt4I.js.map +1 -0
- package/dist/analyst/index.d.ts +59 -13
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +144 -57
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-dGYmYNtb.js → analyze-runs-C7vWBDhl.js} +11 -11
- package/dist/{analyze-runs-dGYmYNtb.js.map → analyze-runs-C7vWBDhl.js.map} +1 -1
- package/dist/{analyze-runs-BYyMShsj.d.ts → analyze-runs-pJ4fhnYg.d.ts} +2 -2
- package/dist/{analyze-runs-BYyMShsj.d.ts.map → analyze-runs-pJ4fhnYg.d.ts.map} +1 -1
- package/dist/{benchmark-command-DZQrxqUL.js → benchmark-command-BRRhjX2k.js} +12 -14
- package/dist/benchmark-command-BRRhjX2k.js.map +1 -0
- package/dist/benchmarks/index.d.ts +4 -4
- package/dist/benchmarks/index.js +5 -5
- package/dist/builder-eval/index.js +1 -1
- package/dist/{calibration-DLzckXnn.js → calibration-CbZPApIO.js} +2 -2
- package/dist/{calibration-DLzckXnn.js.map → calibration-CbZPApIO.js.map} +1 -1
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +12 -12
- package/dist/{campaign-VKtf8HRr.js → campaign-DzLlT0So.js} +17 -17
- package/dist/{campaign-VKtf8HRr.js.map → campaign-DzLlT0So.js.map} +1 -1
- package/dist/{campaign-evidence-BICB3a9Z.js → campaign-evidence-CcA7a67m.js} +3 -3
- package/dist/{campaign-evidence-BICB3a9Z.js.map → campaign-evidence-CcA7a67m.js.map} +1 -1
- package/dist/cli.js +16 -10
- package/dist/cli.js.map +1 -1
- package/dist/{cluster-bootstrap-hNXESoc1.js → cluster-bootstrap-BteuR1hg.js} +2 -2
- package/dist/{cluster-bootstrap-hNXESoc1.js.map → cluster-bootstrap-BteuR1hg.js.map} +1 -1
- package/dist/contract/index.d.ts +9 -9
- package/dist/contract/index.js +14 -14
- package/dist/{decision-point-CErE7GnP.js → decision-point-CNyoKOkz.js} +13 -7
- package/dist/{decision-point-CErE7GnP.js.map → decision-point-CNyoKOkz.js.map} +1 -1
- package/dist/{default-registry-DKlKVXMx.d.ts → default-registry-BNv7eB1C.d.ts} +10 -7
- package/dist/default-registry-BNv7eB1C.d.ts.map +1 -0
- package/dist/{default-registry-gmDeN0KT.js → default-registry-eCkZFfuF.js} +6 -6
- package/dist/default-registry-eCkZFfuF.js.map +1 -0
- package/dist/{define-agent-eval-DyzJ0wOo.js → define-agent-eval-CjF2nTA3.js} +8 -8
- package/dist/{define-agent-eval-DyzJ0wOo.js.map → define-agent-eval-CjF2nTA3.js.map} +1 -1
- package/dist/{define-agent-eval-B9zPWFSK.d.ts → define-agent-eval-DKVYlm-T.d.ts} +7 -7
- package/dist/{define-agent-eval-B9zPWFSK.d.ts.map → define-agent-eval-DKVYlm-T.d.ts.map} +1 -1
- package/dist/{descriptive-BTzLL-aj.js → descriptive-B3Eb7tX0.js} +2 -2
- package/dist/{descriptive-BTzLL-aj.js.map → descriptive-B3Eb7tX0.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/diagnosis/index.js +1 -1
- package/dist/{dspy-rlm-engine-Xt3znknf.js → dspy-rlm-engine-_MEe2jIO.js} +3 -3
- package/dist/{dspy-rlm-engine-Xt3znknf.js.map → dspy-rlm-engine-_MEe2jIO.js.map} +1 -1
- package/dist/{engine-CaHaCc3W.d.ts → engine-rfV8Ff8V.d.ts} +2 -2
- package/dist/{engine-CaHaCc3W.d.ts.map → engine-rfV8Ff8V.d.ts.map} +1 -1
- package/dist/{eval-campaign-B-dQl_lA.js → eval-campaign-CZSCjxVb.js} +3 -3
- package/dist/{eval-campaign-B-dQl_lA.js.map → eval-campaign-CZSCjxVb.js.map} +1 -1
- package/dist/{evaluation-B0-KVXaV.d.ts → evaluation-DYAIkPQB.d.ts} +4 -4
- package/dist/{evaluation-B0-KVXaV.d.ts.map → evaluation-DYAIkPQB.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/{exact-types-CIViGj98.d.ts → exact-types-CaLLU1Pz.d.ts} +2 -2
- package/dist/{exact-types-CIViGj98.d.ts.map → exact-types-CaLLU1Pz.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +1 -1
- package/dist/experiment/index.js +9 -9
- package/dist/{external-optimizer-process-BgitfZ-Q.js → external-optimizer-process-za-SsIap.js} +2 -2
- package/dist/{external-optimizer-process-BgitfZ-Q.js.map → external-optimizer-process-za-SsIap.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-CeHuAaMJ.js → external-optimizer-subprocess-B44kOfZb.js} +3 -3
- package/dist/external-optimizer-subprocess-B44kOfZb.js.map +1 -0
- package/dist/{feedback-trajectory-BgomnFOe.d.ts → feedback-trajectory-P37ju-gW.d.ts} +3 -3
- package/dist/{feedback-trajectory-BgomnFOe.d.ts.map → feedback-trajectory-P37ju-gW.d.ts.map} +1 -1
- package/dist/{finding-composition-DlvE1Qul.js → finding-composition-Belh_qU3.js} +12 -3
- package/dist/finding-composition-Belh_qU3.js.map +1 -0
- package/dist/{findings-store-Bp-0Guuv.js → findings-store-DWiBvJVM.js} +22 -5
- package/dist/findings-store-DWiBvJVM.js.map +1 -0
- package/dist/fuzz.js +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/{index-BwutH5i7.d.ts → index-BJM4rwP2.d.ts} +6 -6
- package/dist/{index-BwutH5i7.d.ts.map → index-BJM4rwP2.d.ts.map} +1 -1
- package/dist/{index-DAk2quYu.d.ts → index-C3t17kHu.d.ts} +16 -21
- package/dist/index-C3t17kHu.d.ts.map +1 -0
- package/dist/{index-Bn-P_XAl.d.ts → index-Dt6E4BHX.d.ts} +6 -6
- package/dist/{index-Bn-P_XAl.d.ts.map → index-Dt6E4BHX.d.ts.map} +1 -1
- package/dist/{index-ByJ20lyu.d.ts → index-chNyKroE.d.ts} +8 -8
- package/dist/{index-ByJ20lyu.d.ts.map → index-chNyKroE.d.ts.map} +1 -1
- package/dist/{index-CtcCSO1Y.d.ts → index-f09MX_H_.d.ts} +2 -2
- package/dist/{index-CtcCSO1Y.d.ts.map → index-f09MX_H_.d.ts.map} +1 -1
- package/dist/index.d.ts +52 -146
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -204
- package/dist/index.js.map +1 -1
- package/dist/{integrity-B1V6klyO.js → integrity-Vx5xgn3s.js} +2 -2
- package/dist/{integrity-B1V6klyO.js.map → integrity-Vx5xgn3s.js.map} +1 -1
- package/dist/{judge-calibration-D93UCm1k.js → judge-calibration-DKR6Xi-w.js} +13 -36
- package/dist/judge-calibration-DKR6Xi-w.js.map +1 -0
- package/dist/judge-calibration-DnrbQaXI.d.ts.map +1 -1
- package/dist/{judge-gate-DMlX38B7.js → judge-gate-CIlBrn6q.js} +2 -2
- package/dist/{judge-gate-DMlX38B7.js.map → judge-gate-CIlBrn6q.js.map} +1 -1
- package/dist/{kind-factory-VKysp1ds.js → kind-factory-Cfz8DUCc.js} +2 -2
- package/dist/{kind-factory-VKysp1ds.js.map → kind-factory-Cfz8DUCc.js.map} +1 -1
- package/dist/{llm-judge-CyDyqb6V.js → llm-judge-CHLvjbVR.js} +14 -14
- package/dist/{llm-judge-CyDyqb6V.js.map → llm-judge-CHLvjbVR.js.map} +1 -1
- package/dist/{matrix-4DcRFJ7Q.d.ts → matrix-Cy3oy7Rq.d.ts} +2 -2
- package/dist/{matrix-4DcRFJ7Q.d.ts.map → matrix-Cy3oy7Rq.d.ts.map} +1 -1
- package/dist/{mean-DDFhslBt.js → mean-D1d6gedE.js} +28 -2
- package/dist/{mean-DDFhslBt.js.map → mean-D1d6gedE.js.map} +1 -1
- package/dist/meta-eval/index.d.ts +1 -1
- package/dist/meta-eval/index.js +6 -6
- package/dist/{mint-D9ZysYtY.js → mint-BH_3Ak2x.js} +3 -3
- package/dist/{mint-D9ZysYtY.js.map → mint-BH_3Ak2x.js.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/{outcome-observations-ahbNtxuP.js → outcome-observations-DZu5hLYF.js} +3 -3
- package/dist/{outcome-observations-ahbNtxuP.js.map → outcome-observations-DZu5hLYF.js.map} +1 -1
- package/dist/{paired-arms-C0Vd9bGG.js → paired-arms-3-tsXvvC.js} +5 -5
- package/dist/{paired-arms-C0Vd9bGG.js.map → paired-arms-3-tsXvvC.js.map} +1 -1
- package/dist/{paired-binary-B477lksS.js → paired-binary-CMzmSSd5.js} +2 -2
- package/dist/{paired-binary-B477lksS.js.map → paired-binary-CMzmSSd5.js.map} +1 -1
- package/dist/{paired-promotion-decision-5Pl_qJLX.js → paired-promotion-decision-CiueaTTj.js} +3 -3
- package/dist/{paired-promotion-decision-5Pl_qJLX.js.map → paired-promotion-decision-CiueaTTj.js.map} +1 -1
- package/dist/{paired-tests-kASEKpc-.js → paired-tests-Buh6feJ4.js} +2 -2
- package/dist/{paired-tests-kASEKpc-.js.map → paired-tests-Buh6feJ4.js.map} +1 -1
- package/dist/{pareto-DY_x3HHg.js → pareto-B34N-vnn.js} +7 -7
- package/dist/{pareto-DY_x3HHg.js.map → pareto-B34N-vnn.js.map} +1 -1
- package/dist/pipelines/index.js +1 -1
- package/dist/{power-and-mde-CRxepy8y.js → power-and-mde-g3vOn0XK.js} +3 -3
- package/dist/{power-and-mde-CRxepy8y.js.map → power-and-mde-g3vOn0XK.js.map} +1 -1
- package/dist/{prime-protocol-COFkxas6.d.ts → prime-protocol-DKRk4l4U.d.ts} +2 -2
- package/dist/{prime-protocol-COFkxas6.d.ts.map → prime-protocol-DKRk4l4U.d.ts.map} +1 -1
- package/dist/{promotion-policy-f79oklG_.js → promotion-policy-DLPcEnCf.js} +4 -4
- package/dist/{promotion-policy-f79oklG_.js.map → promotion-policy-DLPcEnCf.js.map} +1 -1
- package/dist/{proposal-findings-BclX0PFh.js → proposal-findings-CZJkS_GY.js} +2 -2
- package/dist/{proposal-findings-BclX0PFh.js.map → proposal-findings-CZJkS_GY.js.map} +1 -1
- package/dist/{registry-CMtGAxOw.d.ts → registry-Ck7w-rr5.d.ts} +3 -3
- package/dist/{registry-CMtGAxOw.d.ts.map → registry-Ck7w-rr5.d.ts.map} +1 -1
- package/dist/{release-confidence--1iP-d3x.js → release-confidence-nfQNh3eb.js} +4 -4
- package/dist/{release-confidence--1iP-d3x.js.map → release-confidence-nfQNh3eb.js.map} +1 -1
- package/dist/{render-CFrJ7M0o.js → render-DIQ5nqp_.js} +80 -51
- package/dist/{render-CFrJ7M0o.js.map → render-DIQ5nqp_.js.map} +1 -1
- package/dist/reporting.js +5 -5
- package/dist/{reward-P0VD_Aft.js → reward-DqMfaEax.js} +10 -2
- package/dist/{reward-P0VD_Aft.js.map → reward-DqMfaEax.js.map} +1 -1
- package/dist/{reward-hacking-D-Vi9-fE.js → reward-hacking-B88f-Kh7.js} +4 -4
- package/dist/{reward-hacking-D-Vi9-fE.js.map → reward-hacking-B88f-Kh7.js.map} +1 -1
- package/dist/rl.d.ts +3 -3
- package/dist/rl.js +12 -12
- package/dist/rollout/index.d.ts +2 -2
- package/dist/rollout/index.js +3 -3
- package/dist/{rollout-BC4u-d_I.js → rollout-CbOGxuHl.js} +2 -2
- package/dist/{rollout-BC4u-d_I.js.map → rollout-CbOGxuHl.js.map} +1 -1
- package/dist/{rollout-nodes-BHR9Q5jP.js → rollout-nodes-DKZ3vAYY.js} +2 -2
- package/dist/{rollout-nodes-BHR9Q5jP.js.map → rollout-nodes-DKZ3vAYY.js.map} +1 -1
- package/dist/{rubric-predictive-validity-BdxXDN6h.js → rubric-predictive-validity-D_6ZPTNR.js} +2 -2
- package/dist/{rubric-predictive-validity-BdxXDN6h.js.map → rubric-predictive-validity-D_6ZPTNR.js.map} +1 -1
- package/dist/{run-record-B-G2Tu11.js → run-record-CbUi2adH.js} +3 -3
- package/dist/{run-record-B-G2Tu11.js.map → run-record-CbUi2adH.js.map} +1 -1
- package/dist/{run-record-DEjx43cI.js → run-record-CpLS4Uid.js} +2 -2
- package/dist/{run-record-DEjx43cI.js.map → run-record-CpLS4Uid.js.map} +1 -1
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.js +2 -2
- package/dist/{search-kernel-BjR2Sr7w.d.ts → search-kernel-kwO-sgCq.d.ts} +2 -2
- package/dist/{search-kernel-BjR2Sr7w.d.ts.map → search-kernel-kwO-sgCq.d.ts.map} +1 -1
- package/dist/{search-ledger-BsVi-Ngv.js → search-ledger-CV_bQQed.js} +2 -2
- package/dist/{search-ledger-BsVi-Ngv.js.map → search-ledger-CV_bQQed.js.map} +1 -1
- package/dist/{search-shipper-pdg4viK7.js → search-shipper-CA3ooBbC.js} +2 -2
- package/dist/{search-shipper-pdg4viK7.js.map → search-shipper-CA3ooBbC.js.map} +1 -1
- package/dist/{search-summary-DedyTdiM.js → search-summary-DBMjdecs.js} +4 -4
- package/dist/{search-summary-DedyTdiM.js.map → search-summary-DBMjdecs.js.map} +1 -1
- package/dist/{sequential-Zp1tsxqI.js → sequential-BPbvgzfe.js} +2 -2
- package/dist/{sequential-Zp1tsxqI.js.map → sequential-BPbvgzfe.js.map} +1 -1
- package/dist/{skillopt-optimization-method-O35aMdxU.js → skillopt-optimization-method-D72XZZfR.js} +9 -9
- package/dist/{skillopt-optimization-method-O35aMdxU.js.map → skillopt-optimization-method-D72XZZfR.js.map} +1 -1
- package/dist/{statistical-heldout-DYF5f10K.js → statistical-heldout-NBxC7jGo.js} +3 -3
- package/dist/{statistical-heldout-DYF5f10K.js.map → statistical-heldout-NBxC7jGo.js.map} +1 -1
- package/dist/{statistical-heldout-bU7FBNjR.d.ts → statistical-heldout-_dXihc9T.d.ts} +3 -3
- package/dist/{statistical-heldout-bU7FBNjR.d.ts.map → statistical-heldout-_dXihc9T.d.ts.map} +1 -1
- package/dist/{store-otlp-DmLm65XW.js → store-otlp-BfPRa2p8.js} +2 -2
- package/dist/{store-otlp-DmLm65XW.js.map → store-otlp-BfPRa2p8.js.map} +1 -1
- package/dist/{store-tool-spans-lWf6INTH.d.ts → store-tool-spans-BgwVHXma.d.ts} +4 -4
- package/dist/{store-tool-spans-lWf6INTH.d.ts.map → store-tool-spans-BgwVHXma.d.ts.map} +1 -1
- package/dist/{store-tool-spans-GGaCijFy.js → store-tool-spans-BrSWHB9O.js} +3 -3
- package/dist/{store-tool-spans-GGaCijFy.js.map → store-tool-spans-BrSWHB9O.js.map} +1 -1
- package/dist/{summary-report-B4BLQb88.js → summary-report-C3IJvp0i.js} +7 -7
- package/dist/{summary-report-B4BLQb88.js.map → summary-report-C3IJvp0i.js.map} +1 -1
- package/dist/supervisor-run/index.d.ts +6 -0
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +3 -3
- package/dist/{systemone-BDVgb6XV.d.ts → systemone-CBvL1gx-.d.ts} +14 -8
- package/dist/systemone-CBvL1gx-.d.ts.map +1 -0
- package/dist/{systemone-review-S49gsy_y.js → systemone-review-BusEIzsg.js} +2 -2
- package/dist/{systemone-review-S49gsy_y.js.map → systemone-review-BusEIzsg.js.map} +1 -1
- package/dist/{systemone-review-BLgxt-4Q.d.ts → systemone-review-nbuMxxmi.d.ts} +2 -2
- package/dist/{systemone-review-BLgxt-4Q.d.ts.map → systemone-review-nbuMxxmi.d.ts.map} +1 -1
- package/dist/systemone.d.ts +4 -4
- package/dist/systemone.js +3 -3
- package/dist/{tool-groups-C3K-d3gd.d.ts → tool-groups-BQsjZD9F.d.ts} +3 -3
- package/dist/tool-groups-BQsjZD9F.d.ts.map +1 -0
- package/dist/{tool-waste-CRJqOASv.js → tool-waste-Czt3aWID.js} +3 -3
- package/dist/{tool-waste-CRJqOASv.js.map → tool-waste-Czt3aWID.js.map} +1 -1
- package/dist/{trace-questions-ej5AEJ5X.d.ts → trace-questions-CpTrtEcm.d.ts} +3 -3
- package/dist/{trace-questions-ej5AEJ5X.d.ts.map → trace-questions-CpTrtEcm.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/trace-repair/index.js +2 -2
- package/dist/traces.d.ts +3 -3
- package/dist/traces.js +4 -4
- package/dist/{tree-C2N31CoI.js → tree-DPwgM2LX.js} +6 -6
- package/dist/{tree-C2N31CoI.js.map → tree-DPwgM2LX.js.map} +1 -1
- package/dist/{types-DzCO-S1m.d.ts → types-B9s9Xo5_.d.ts} +24 -2
- package/dist/types-B9s9Xo5_.d.ts.map +1 -0
- package/dist/{types-BF-xQGQn.d.ts → types-CBkDo7ja.d.ts} +2 -2
- package/dist/{types-BF-xQGQn.d.ts.map → types-CBkDo7ja.d.ts.map} +1 -1
- package/dist/{types-BK0blWhe.js → types-CL1_N7AZ.js} +2 -2
- package/dist/{types-BK0blWhe.js.map → types-CL1_N7AZ.js.map} +1 -1
- package/dist/{types-yofaDmQa.d.ts → types-D91tnhzf.d.ts} +2 -2
- package/dist/{types-yofaDmQa.d.ts.map → types-D91tnhzf.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +3 -3
- package/docs/behavioral-trace-questions.md +23 -0
- package/docs/public-api.md +1 -1
- package/package.json +2 -2
- package/dist/agreement-irr-w-t3XUTD.js.map +0 -1
- package/dist/benchmark-command-DZQrxqUL.js.map +0 -1
- package/dist/default-registry-DKlKVXMx.d.ts.map +0 -1
- package/dist/default-registry-gmDeN0KT.js.map +0 -1
- package/dist/external-optimizer-subprocess-CeHuAaMJ.js.map +0 -1
- package/dist/finding-composition-DlvE1Qul.js.map +0 -1
- package/dist/findings-store-Bp-0Guuv.js.map +0 -1
- package/dist/index-DAk2quYu.d.ts.map +0 -1
- package/dist/judge-calibration-D93UCm1k.js.map +0 -1
- package/dist/systemone-BDVgb6XV.d.ts.map +0 -1
- package/dist/tool-groups-C3K-d3gd.d.ts.map +0 -1
- package/dist/types-DzCO-S1m.d.ts.map +0 -1
|
@@ -352,6 +352,12 @@ declare const findingConditionsSchema: z.ZodObject<{
|
|
|
352
352
|
}, z.core.$strict>;
|
|
353
353
|
type FindingTreatment = z.infer<typeof findingTreatmentSchema>;
|
|
354
354
|
type FindingConditions = z.infer<typeof findingConditionsSchema>;
|
|
355
|
+
type BootstrapInterval = {
|
|
356
|
+
low: number;
|
|
357
|
+
high: number;
|
|
358
|
+
resamples: number;
|
|
359
|
+
clusters: number;
|
|
360
|
+
};
|
|
355
361
|
/**
|
|
356
362
|
* The layer ladder, lowest first. `problem` is what discovery-lab calls a
|
|
357
363
|
* theatre. `meta` sits outside the ladder: it is about the instrument, not the
|
|
@@ -378,6 +384,10 @@ interface FindingScope {
|
|
|
378
384
|
/** Domain taxonomy path of any depth, broadest first. */
|
|
379
385
|
domain_path?: string[];
|
|
380
386
|
}
|
|
387
|
+
/** A bootstrap interval with the key its clusters were drawn by (a window subject, a trace, ...). */
|
|
388
|
+
interface CalibrationInterval extends BootstrapInterval {
|
|
389
|
+
cluster: string;
|
|
390
|
+
}
|
|
381
391
|
interface FindingCalibration {
|
|
382
392
|
/** Gold items the judge was scored against. */
|
|
383
393
|
gold_n: number;
|
|
@@ -385,6 +395,10 @@ interface FindingCalibration {
|
|
|
385
395
|
agreement: number;
|
|
386
396
|
/** Chance-corrected agreement (Cohen's κ). */
|
|
387
397
|
kappa: number;
|
|
398
|
+
/** Rank statistic of the positive class's probability against gold, when the judge supplied one. */
|
|
399
|
+
auc?: number | null;
|
|
400
|
+
/** Seeded percentile cluster bootstrap of `auc`. */
|
|
401
|
+
ci?: CalibrationInterval | null;
|
|
388
402
|
}
|
|
389
403
|
interface FindingMethod {
|
|
390
404
|
kind: 'computed' | 'measured' | 'judged';
|
|
@@ -480,6 +494,14 @@ declare const ProposalFindingSchema: z.ZodObject<{
|
|
|
480
494
|
gold_n: z.ZodNumber;
|
|
481
495
|
agreement: z.ZodNumber;
|
|
482
496
|
kappa: z.ZodNumber;
|
|
497
|
+
auc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
498
|
+
ci: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
499
|
+
low: z.ZodNumber;
|
|
500
|
+
high: z.ZodNumber;
|
|
501
|
+
resamples: z.ZodNumber;
|
|
502
|
+
clusters: z.ZodNumber;
|
|
503
|
+
cluster: z.ZodString;
|
|
504
|
+
}, z.core.$strict>>>;
|
|
483
505
|
}, z.core.$strict>>;
|
|
484
506
|
}, z.core.$strict>>;
|
|
485
507
|
measure: z.ZodOptional<z.ZodObject<{
|
|
@@ -995,5 +1017,5 @@ type AnalystRunEvent = {
|
|
|
995
1017
|
type: 'run-completed';
|
|
996
1018
|
result: AnalystRunResult;
|
|
997
1019
|
};
|
|
998
|
-
export {
|
|
999
|
-
//# sourceMappingURL=types-
|
|
1020
|
+
export { DatasetOverview as $, FindingParseOutcome as A, FindingConditions as B, CalibrationInterval as C, FindingLayer as D, FindingEvidenceUnit as E, independentUnitCount as F, BoundedTraceAnalysisStoreOptions as G, TREATMENT_LAYERS as H, lineageRoots as I, SpanSourceReader as J, ReadSpanSourceInput as K, parseAnalystFinding as L, FindingScope as M, FindingScopeReading as N, FindingMeasure as O, ProposalFindingSchema as P, DEFAULT_TRACE_ANALYST_BUDGETS as Q, readFindingScope as R, makeProposalFinding as S, FindingCalibration as T, TreatmentLayer as U, FindingTreatment as V, createBoundedTraceAnalysisStore as W, TraceAnalysisStore as X, TRACE_ANALYSIS_LIMITS as Y, TraceAnalysisStoreContext as Z, ExecutionProbeRequest as _, AnalystFindingSchemaVersion as a, TraceAnalystByteBudgets as at, computeFindingId as b, AnalystRunEvent as c, TraceAnalystSpanKind as ct, AnalystRunSummary as d, ViewSpansResult as dt, ErrorCluster as et, AnalystSeverity as f, ViewTraceOversized as ft, ExecutionProbeOutcome as g, ExecutionProbe as h, AnalystFinding as i, SpanMatchRecord as it, FindingReaderLabel as j, FindingMethod as k, AnalystRunInputs as l, TraceAnalystSpanStatus as lt, EvidenceRef as m, AnalystContext as n, SearchSpanResult as nt, AnalystInputKind as o, TraceAnalystFilters as ot, AnalystUsageReceipt as p, ViewTraceResult as pt, ReadSpanSourceResult as q, AnalystCost as r, SearchTraceResult as rt, AnalystRequirements as s, TraceAnalystSpan as st, Analyst as t, QueryTracesPage as tt, AnalystRunResult as u, TraceAnalystTraceSummary as ut, ProposalFinding as v, FINDING_LAYERS as w, makeFinding as x, ProposalFindingOrigin as y, BootstrapInterval as z };
|
|
1021
|
+
//# sourceMappingURL=types-B9s9Xo5_.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-B9s9Xo5_.d.ts","names":[],"sources":["../src/trace-analyst/types.ts","../src/trace-analyst/store-contract.ts","../src/trace-analyst/store-boundary.ts","../src/analyst/finding-composition.ts","../src/statistics/internal.ts","../src/analyst/finding-scope.ts","../src/analyst/types.ts"],"mappings":";;;;;;;;;;;KAsBY,uBAAuB;KAEvB;;;;UAKK;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;;;EAGA,YAAY;;UAGG;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA;;;;;;;UAQe;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;IAAU;IAAqB;;;;;;EAK/B,gBAAgB;EAChB;IAAc;IAAkB;;;UAGjB;EACf,QAAQ;EACR;EACA;;;;;UAMe;EACf;EACA,QAA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6 @@
|
|
|
1
1
|
import { g as PaidCallResult, i as CostChannel, l as CostLedgerSummary, o as CostLedgerHandle, r as CostBreakdown, u as CostProvenance, y as RunPaidCallInput } from "./cost-ledger-Czro9wmo.js";
|
|
2
2
|
import { a as RunRecord, d as RunTokenUsage, s as RunSearchCoordinates } from "./run-record-D2BFMPGl.js";
|
|
3
|
-
import { v as ProposalFinding } from "./types-
|
|
3
|
+
import { v as ProposalFinding } from "./types-B9s9Xo5_.js";
|
|
4
4
|
import { j as LlmCallMetadata } from "./types-0KglnQ9o.js";
|
|
5
5
|
import { R as SeriesDistribution, a as MintedRolloutLine, m as RolloutEvidenceAttempt, t as ChatMessage, y as RolloutRole } from "./schema-CfoA9U_U.js";
|
|
6
6
|
import { A as SearchLedgerHash, F as SearchNodeRegisteredEvent, G as SearchSplit, I as SearchNodeStatus, L as SearchOpenedEvent, N as SearchNodeDecision, O as SearchLedgerEntry, P as SearchNodeRef, Q as SearchTaskOutcome, R as SearchOperationKind, U as SearchReservation, Z as SearchTask, b as SearchClosedEvent, d as SearchCellCancelledEvent, i as SearchArtifactRef, l as SearchCandidateSurface, o as SearchAudit, p as SearchCellStage, t as NodeEstimate, w as SearchEdgeRecordedEvent, z as SearchOperationRecordedEvent } from "./search-ledger-types-qiYRUo_N.js";
|
|
@@ -1077,4 +1077,4 @@ interface CampaignResult<TArtifact = unknown, TScenario extends Scenario = Scena
|
|
|
1077
1077
|
scenarios: Array<CampaignScenarioIdentity & Pick<TScenario, 'id' | 'kind'>>;
|
|
1078
1078
|
}
|
|
1079
1079
|
export { MintRolloutResult as $, LabeledScenarioWrite as A, ScoredSurfaceOutcome as B, JudgeDimension as C, LabeledScenarioSampleArgs as D, LabeledScenarioRecord as E, ProposeContext as F, SearchProposerView as G, SurfaceProposer as H, ProposedCandidate as I, searchProposerView as J, SearchSummaryOptions as K, RedactionStatus as L, OptimizerConfig as M, ParetoParent as N, LabeledScenarioSource as O, ProposalTrackContext as P, MintRolloutOptions as Q, Scenario as R, JudgeConfig as S, LabelTrust as T, TraceSpan as U, SessionScript as V, isProposedCandidate as W, SearchStateView as X, SearchState as Y, searchUnitScores as Z, GateDecision as _, CampaignResult as a, SearchCompletion as at, GenerationRecord as b, CampaignTraceWriter as c, SearchOperation as ct, DispatchContext as d, SearchUnitScore as dt, RolloutScrubber as et, DispatchFn as f, searchCellId as ft, GateContribution as g, GateContext as h, CampaignCostMeter as i, SearchCell as it, MutableSurface as j, LabeledScenarioStore as k, CodeSurface as l, SearchScoredCell as lt, GateCheckStatus as m, searchTaskSetDigest as mt, CampaignArtifactWriter as n, mintRolloutRows as nt, CampaignScenarioIdentity as o, SearchDecisionRecord as ot, Gate as p, searchNodeId as pt, renderSearchSummary as q, CampaignCellResult as r, unmintableReasons as rt, CampaignTokenUsage as s, SearchNode as st, CampaignAggregates as t, RolloutSearchLineage as tt, ComponentSurface as u, SearchSpend as ut, GateResult as v, JudgeScore as w, JudgeAggregate as x, GenerationCandidate as y, ScenarioAggregate as z };
|
|
1080
|
-
//# sourceMappingURL=types-
|
|
1080
|
+
//# sourceMappingURL=types-CBkDo7ja.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-CBkDo7ja.d.ts","names":[],"sources":["../src/campaign/search-state-identity.ts","../src/campaign/search-state-types.ts","../src/campaign/search-state-indexes.ts","../src/rollout/mint.ts","../src/campaign/search-state-view.ts","../src/campaign/search-state-projection.ts","../src/campaign/search-summary.ts","../src/campaign/types.ts"],"mappings":";;;;;;;;;;iBAOgB,aAAa,kBAAkB;;iBAK/B,aACd,kBACA,gBACA,gBACA,OAAO,aACP;;iBAMc,oBAAoB,gBAAgB,eAAe;UCHlD;EACf;EACA,UAAU;EACV,OAAO;EACP;EACA;;UAGe;EACf;EACA;EACA;EACA;;;;UAKe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;;EAEA;EACA;;UAGe;EACf;;EAEA;EACA,gBAAgB;EAChB,UAA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AGe;EACf;;EAEA;;;;EAIA;EACA;IACE;IACA,SAAS,wBAAwB;IACjC;IACA;;;;;IAKA,WAAW;;;UAIE;EACf,QAAQ,OAAO,uBAAuB;EACtC,OAAO,MAAM,4BAA4B,QAAQ;EACjD,QAAQ;IACN;IACA;IACA,UAAU;;;IAGV,SAAS,OAAO;;;UAMH,mBAAmB;;EAElC,gBAAgB;;;EAGhB;EACA;;EAEA;IAAY;IAAsB;;EAClC;EACA;EACA;EACA,UAAU;EACV,aAAa,eAAe;;;EAG5B;;EAEA,gBAAgB;;EAEhB;;;EAGA,YAAY;;;EAGZ;;;EAGA;EACA;EACA;EACA;;;;EAIA;;EAEA;;EAEA;EACA;;UAGe;EACf;EACA;EACA;EACA;;;;;;EAMA,cAAc;;UAGC;EACf;EACA;EACA;;;EAGA,cAAc;;UAGC;EACf;EACA,YAAY;EACZ;;;;;;UAOe;EACf;;;;EAIA;;;;EAIA;;;;EAIA;IACE;IACA;IACA,iBAAiB;MAAQ;MAAgB;;;;;EAI3C,YAAY;;;;;;;;;;EAUZ,WAAW;IAAQ;IAAoB;IAAmB;IAAgB;;;;EAG1E;;;;EAIA;;;;EAIA,cAAc,SAAS;;UAGR;EACf,SAAS,eAAe;EACxB,YAAY,eAAe;;EAE3B,MAAM;;EAEN;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe,eAAe,qBAAqB,kBAAkB,WAAW;;EAEhF;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA,OAAO,MAAM,mBAAmB;EAChC,YAAY;EACZ;IACE,aAAa;IACb;;EAEF,OAAO;EACP;EACA;EACA,iBAAiB;;;EAGjB,WAAW,MAAM,2BAA2B,KAAK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as mergeFindingComposition, r as findingCompositionKey } from "./finding-composition-
|
|
1
|
+
import { o as mergeFindingComposition, r as findingCompositionKey } from "./finding-composition-Belh_qU3.js";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
// src/analyst/types.ts
|
|
4
4
|
/**
|
|
@@ -98,4 +98,4 @@ function makeProposalFinding(init) {
|
|
|
98
98
|
}
|
|
99
99
|
export { makeProposalFinding as a, makeFinding as i, FINDING_SCOPE_FIELDS as n, computeFindingId as r, ANALYST_SEVERITIES as t };
|
|
100
100
|
|
|
101
|
-
//# sourceMappingURL=types-
|
|
101
|
+
//# sourceMappingURL=types-CL1_N7AZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-BK0blWhe.js","names":[],"sources":["../src/analyst/types.ts"],"sourcesContent":["/**\n * Analyst contract — the missing orchestration layer over agent-eval's\n * existing analyzers (analyzeTraces, MultiLayerVerifier,\n * SemanticConceptJudge, JudgeFn, ...).\n *\n * Each existing primitive returns its own output shape. The Analyst\n * contract is the single envelope every primitive lifts into, so a\n * registry can run N analysts against a run and a single renderer can\n * compose findings without knowing which analyzer produced them.\n *\n * The contract is intentionally domain-agnostic: nothing here knows\n * about code, voice, RAG, or any particular agent stack. Analysts\n * declare what INPUT KIND they need (a trace store, an artifact dir,\n * a RunRecord, a JudgeInput, or `custom`), and the registry routes\n * the matching input from `AnalystRunInputs`.\n */\n\nimport { createHash } from 'node:crypto'\nimport type { CostLedgerHandle, CostProvenance } from '../cost-ledger'\nimport type { RunRecord, RunTokenUsage } from '../run-record'\nimport type { TraceAnalysisStore } from '../trace-analyst/store'\nimport type { JudgeInput } from '../types'\nimport type { ChatClient } from './chat-client'\nimport {\n type FindingConditions,\n type FindingTreatment,\n findingCompositionKey,\n mergeFindingComposition,\n} from './finding-composition'\nimport type {\n FindingEvidenceUnit,\n FindingLayer,\n FindingMeasure,\n FindingMethod,\n FindingScope,\n} from './finding-scope'\n\n/**\n * Unified envelope every analyst emits. Schema-versioned so renderers\n * and time-series diffs survive future field additions.\n *\n * 1.1.0 adds what a finding is about and what it was measured on: `layer`,\n * `scope`, `method`, `measure`, `confounders`, `valid_for`, `claim_id` and\n * `evidence_units`, with optional `treatment` and `conditions` composition. They are all optional, and a 1.0.0 finding carries none of\n * them; `readFindingScope` reads such a finding as layer and n unknown.\n * `parseAnalystFinding` (finding-scope.ts) is the one validator for both.\n */\nexport interface AnalystFinding {\n schema_version: AnalystFindingSchemaVersion\n /**\n * Stable hash over identity-defining fields (analyst_id + canonical\n * claim + area + optional subject). Two findings from two runs that\n * \"are the same finding\" share this id — that's what `diffFindings`\n * uses to compute appeared/disappeared sets across runs.\n */\n finding_id: string\n analyst_id: string\n produced_at: string\n severity: AnalystSeverity\n /**\n * Coarse classification. Renderers group by this. Free-form so\n * domain-specific analysts can introduce categories without a\n * schema change ('agent-reasoning', 'verification', 'cost',\n * 'tool-use', 'safety', 'latency', 'data-quality', ...).\n */\n area: string\n claim: string\n rationale?: string\n evidence_refs: EvidenceRef[]\n recommended_action?: string\n validation_plan?: string\n /** 0..1 — the analyst's own confidence. Not calibrated across analysts. */\n confidence: number\n /**\n * Optional subject the finding is about — leaf id, agent id, request\n * id. Included in finding_id when present so per-subject findings\n * diff cleanly across runs.\n */\n subject?: string\n /** True when this finding was lifted from a judge result rather than observed\n * directly in a trace or artifact. Descriptive only: proposal access is\n * controlled by `ProposalFinding.proposal_origin`. */\n derived_from_judge?: boolean\n /** Analyst-private extras; renderers ignore unless they know the analyst. */\n metadata?: Record<string, unknown>\n /** 1.1.0: the level the claim is about, from one event up to the whole lab. */\n layer?: FindingLayer\n /** 1.1.0: the population the claim was measured on. */\n scope?: FindingScope\n /** 1.1.0: how the claim was produced, and the judge's calibration when judged. */\n method?: FindingMethod\n /** 1.1.0: the number behind the claim, when it has one. */\n measure?: FindingMeasure\n /** 1.1.0: known differences between the compared units besides the treatment. */\n confounders?: string[]\n /** 1.1.0: the conditions the claim was measured under, in words. */\n valid_for?: string\n /**\n * 1.1.0: stable key for the claim across subjects and layers. `promote`\n * groups children by it; a finding without one never lifts.\n */\n claim_id?: string\n /**\n * 1.1.0: the measured units with their lineage. When present, `scope.n` and\n * `scope.population` must match them and no unit may sit above `layer`.\n */\n evidence_units?: FindingEvidenceUnit[]\n /** Deliberately assigned bundles; every bundle may touch several treatment layers. */\n treatment?: FindingTreatment[]\n /** Observed condition snapshots with population and observation-time provenance. */\n conditions?: FindingConditions[]\n}\n\n/** Every finding schema this package reads. Writers emit 1.1.0 only when a 1.1.0 field is set. */\nconst ANALYST_FINDING_SCHEMA_VERSIONS = ['1.0.0', '1.1.0'] as const\n\nexport type AnalystFindingSchemaVersion = (typeof ANALYST_FINDING_SCHEMA_VERSIONS)[number]\n\n/** Finding severity. `AnalystSeverity` derives from this array, so the type\n * and the schema that validates a finding cannot name different levels. */\nexport const ANALYST_SEVERITIES = ['critical', 'high', 'medium', 'low', 'info'] as const\n\nexport type AnalystSeverity = (typeof ANALYST_SEVERITIES)[number]\n\n/** Data sources that candidate generation may intentionally learn from. */\nexport type ProposalFindingOrigin = 'search' | 'production'\n\n/** A finding explicitly admitted as candidate-generation input. */\nexport type ProposalFinding = AnalystFinding & {\n readonly proposal_origin: ProposalFindingOrigin\n}\n\nexport interface EvidenceRef {\n /**\n * Where the evidence lives. `span` and `event` refer to OTLP trace\n * elements; `artifact` to a file inside the run's artifact tree;\n * `finding` to another AnalystFinding (cross-analyst chaining);\n * `metric` to a named scalar reading the renderer knows how to read.\n */\n kind: 'span' | 'event' | 'artifact' | 'finding' | 'metric'\n uri: string\n excerpt?: string\n}\n\n// ── Analyst contract ─────────────────────────────────────────────────\n\n/**\n * The discriminator the registry uses to pass the right input.\n * `custom` is the escape hatch — analysts that need something else\n * (e.g. an embedding cache, a partner SDK handle) read it from\n * `AnalystRunInputs.custom[<analyst id>]`.\n */\nexport type AnalystInputKind =\n | 'trace-store'\n | 'artifact-dir'\n | 'run-record'\n | 'judge-input'\n | 'custom'\n\nexport interface AnalystCost {\n /** `deterministic` analysts MUST NOT call the LLM. */\n kind: 'deterministic' | 'llm'\n /** Optional declared upper bound; the registry can enforce a budget. */\n est_usd_per_run?: number\n /** Models the analyst expects to use (informational). */\n models?: string[]\n /** Maximum post-cancellation wait for provider usage. Model analysts default to 5 seconds. */\n settlement_timeout_ms?: number\n}\n\nexport interface AnalystRequirements {\n /** Min number of shots / samples the analyst needs to produce signal. */\n min_shots?: number\n /** Capabilities the runtime must supply (e.g. ['network', 'gpu']). */\n capabilities?: string[]\n}\n\n/**\n * What's passed to every analyst call. The registry resolves which\n * field the analyst's `inputKind` selects and asserts it's present.\n */\nexport interface AnalystRunInputs {\n traceStore?: TraceAnalysisStore\n artifactDir?: string\n runRecord?: RunRecord\n judgeInput?: JudgeInput\n /** Keyed by analyst id; populated by callers that registered custom analysts. */\n custom?: Record<string, unknown>\n}\n\nexport interface AnalystContext {\n runId: string\n /** Stable correlation id so logs from a single registry.run() share a tag. */\n correlationId: string\n /** Enforced wall-clock deadline (epoch ms). */\n deadlineMs?: number\n /** Per-analyst USD budget. Analysts MAY check before issuing LLM calls. */\n budgetUsd?: number\n /** Shared paid-call account when the analyst runs inside a larger campaign. */\n costLedger?: CostLedgerHandle\n /** Attribution phase used when writing to the shared paid-call account. */\n costPhase?: string\n /**\n * Shared chat client. Analysts that call an LLM go through this so\n * the operator picks transport (sandbox-sdk | router | cli-bridge |\n * direct-provider | mock) at the registry boundary without touching\n * analyst code.\n */\n chat?: ChatClient\n /**\n * Findings from a prior run the operator wants the analyst to see as\n * retrieval context. Kinds that take advantage of cross-run memory\n * (failure-mode \"I saw this cluster last run\", knowledge-gap \"the wiki\n * page I asked for is still missing\") render these into the actor's\n * working set. Filtering is the operator's job: pass the slice that\n * matches the analyst's id, or pass everything and let the kind\n * filter. Empty / absent means no cross-run context.\n */\n priorFindings?: ReadonlyArray<AnalystFinding>\n /**\n * Findings emitted by analysts that completed earlier in this registry run.\n * This is separate from `priorFindings`: upstream findings are dependency\n * context for the current pass, while prior findings are cross-run memory.\n * The registry populates this only when `RegistryRunOpts.chainFindings` is on.\n */\n upstreamFindings?: ReadonlyArray<AnalystFinding>\n /**\n * Report metered work independently of findings. This keeps an empty finding\n * set from erasing token/cost telemetry. Multiple receipts are accumulated.\n */\n recordUsage?: (receipt: AnalystUsageReceipt) => void\n /** Free-form runtime tags (env, host, op). Findings can echo these into metadata. */\n tags?: Record<string, string>\n /** Logger callback — analysts SHOULD prefer this over console.* for testability. */\n log?: (msg: string, fields?: Record<string, unknown>) => void\n /** Optional abort signal. Analysts SHOULD pass it through to LLM calls. */\n signal?: AbortSignal\n /**\n * Optional live-execution port. A runtime that owns a sandbox or checkout\n * fills it so an analyst can execute a bounded probe against the run's\n * produced state instead of reasoning about it from the trace alone. This\n * package defines only the port: no field here reaches for an agent loop,\n * and an absent probe means the analyst works from recorded evidence.\n */\n probe?: ExecutionProbe\n}\n\n// ── Live-execution port ─────────────────────────────────────────────\n\n/** One bounded command an analyst asks the probe to run. */\nexport interface ExecutionProbeRequest {\n command: string\n /** Working directory inside the probed environment. */\n cwd?: string\n /** Hard wall-clock deadline for this one execution. */\n timeoutMs: number\n /** Bytes of combined output retained; the prober truncates beyond it. */\n maxOutputBytes?: number\n signal?: AbortSignal\n}\n\n/**\n * Typed outcome of one probe execution. `succeeded: false` is a PROBE failure\n * (the environment could not run the command); a command that ran and exited\n * non-zero is a successful observation with a non-zero `exitCode`.\n */\nexport type ExecutionProbeOutcome =\n | {\n succeeded: true\n exitCode: number\n stdout: string\n stderr: string\n durationMs: number\n /** True when output was cut at `maxOutputBytes`. */\n truncated: boolean\n }\n | { succeeded: false; error: { class: string; message: string } }\n\n/**\n * The seam a runtime fills to let analysts observe produced state live.\n * Implementations own sandboxing, credentials, and cleanup; analysts only\n * submit bounded requests and read typed outcomes.\n */\nexport interface ExecutionProbe {\n /** One plain sentence naming what is being probed (e.g. a sandbox id). */\n readonly description: string\n execute(request: ExecutionProbeRequest): Promise<ExecutionProbeOutcome>\n}\n\n/**\n * The minimal contract. Concrete analysts can refine `TInput` so\n * implementations stay type-safe (e.g. a trace analyst's `TInput` is\n * `TraceAnalysisStore`); the registry passes the right field from\n * `AnalystRunInputs` based on `inputKind`.\n */\nexport interface Analyst<TInput = unknown> {\n /** Stable identifier — appears in finding_id, telemetry, and registry exclusion lists. */\n readonly id: string\n /** Human-readable. One sentence. */\n readonly description: string\n readonly inputKind: AnalystInputKind\n readonly cost: AnalystCost\n readonly requires?: AnalystRequirements\n /** Bump on breaking changes to claim wording or area so old finding_ids don't collide. */\n readonly version: string\n analyze(input: TInput, ctx: AnalystContext): Promise<AnalystFinding[]>\n}\n\n/** Metered work performed by one analyst call. */\nexport interface AnalystUsageReceipt {\n /** Number of model-usage records observed at the provider boundary. */\n calls: number | null\n /** Null when the provider did not return token accounting. */\n tokens: RunTokenUsage | null\n /** Observed, estimated, or explicitly uncaptured dollar cost. */\n cost: CostProvenance\n /** Known lower bound when one or more calls have uncaptured cost. */\n knownCostUsd?: number\n /**\n * Token counts the provider reported on only one side. Present exactly when\n * `tokens` is null and at least one side WAS reported: `RunTokenUsage` has no\n * nullable side, so a one-sided count cannot live in `tokens` without writing\n * a zero nobody measured. Read it as a lower bound, never as a total — the\n * field exists so a null `tokens` cannot hide a real count.\n */\n partialTokens?: { input: number | null; output: number | null }\n /**\n * True when the token counts were DERIVED by the transport (from character\n * lengths, say) rather than measured by the model provider. `cost.kind` is\n * `estimated` both for a rate estimate over exact tokens and for one over\n * derived tokens; this is the field that separates them.\n */\n tokensEstimated?: boolean\n}\n\n// ── finding_id stability ─────────────────────────────────────────────\n\n/**\n * Compute the stable finding_id from the identity-defining fields.\n * Legacy identity hashes {analyst_id, area, subject, normalized claim}. Supplied\n * composition adds normalized treatment/fixed-condition identity; covariate provenance\n * remains on the record without making every observation time a different claim.\n * Analysts that emit findings whose claim text varies per run (timestamps,\n * counts) SHOULD either: (a) pass an explicit `id_basis` to fix the hash,\n * or (b) move the variable part into `rationale`/`metadata` and keep the\n * `claim` static.\n */\nexport function computeFindingId(input: {\n analyst_id: string\n area: string\n subject?: string\n claim: string\n /** Override the claim for hashing — use when the displayed claim has run-specific bits. */\n id_basis?: string\n treatment?: FindingTreatment[]\n conditions?: FindingConditions[]\n}): string {\n const composition = findingCompositionKey(input)\n const basis = JSON.stringify({\n a: input.analyst_id,\n r: input.area,\n s: input.subject ?? '',\n c: normalizeClaim(input.id_basis ?? input.claim),\n ...(composition ? { composition } : {}),\n })\n return `f_${createHash('sha256').update(basis).digest('hex').slice(0, 20)}`\n}\n\nfunction normalizeClaim(c: string): string {\n // Lowercase, collapse whitespace, strip trailing punctuation. Goal:\n // \"Leaf X failed install\" and \"Leaf X failed install.\" hash the same.\n return c\n .toLowerCase()\n .replace(/\\s+/g, ' ')\n .replace(/[.!?;:,]+$/g, '')\n .trim()\n}\n\n/** Fields that exist only in schema 1.1.0. */\nexport const FINDING_SCOPE_FIELDS = [\n 'layer',\n 'scope',\n 'method',\n 'measure',\n 'confounders',\n 'valid_for',\n 'claim_id',\n 'evidence_units',\n 'treatment',\n 'conditions',\n] as const satisfies ReadonlyArray<keyof AnalystFinding>\n\n/**\n * Convenience factory: produce a fully-formed AnalystFinding with the\n * id computed automatically. Analyst code stays terse.\n */\nexport function makeFinding(\n init: Omit<AnalystFinding, 'schema_version' | 'finding_id' | 'produced_at'> & {\n id_basis?: string\n produced_at?: string\n },\n): AnalystFinding {\n const { id_basis, produced_at, ...fields } = init\n const rest = { ...fields, ...mergeFindingComposition([fields]) }\n return {\n schema_version: FINDING_SCOPE_FIELDS.some((field) => rest[field] !== undefined)\n ? '1.1.0'\n : '1.0.0',\n finding_id: computeFindingId({\n analyst_id: rest.analyst_id,\n area: rest.area,\n subject: rest.subject,\n claim: rest.claim,\n id_basis,\n treatment: rest.treatment,\n conditions: rest.conditions,\n }),\n produced_at: produced_at ?? new Date().toISOString(),\n ...rest,\n }\n}\n\n/** Build a finding whose source is explicitly allowed during candidate generation. */\nexport function makeProposalFinding(\n init: Omit<ProposalFinding, 'schema_version' | 'finding_id' | 'produced_at'> & {\n id_basis?: string\n produced_at?: string\n },\n): ProposalFinding {\n const { proposal_origin, ...finding } = init\n return { ...makeFinding(finding), proposal_origin }\n}\n\n// ── Registry result envelope ────────────────────────────────────────\n\nexport interface AnalystRunSummary {\n analyst_id: string\n status: 'ok' | 'skipped' | 'failed'\n /** Why skipped — missing input, budget exceeded, capability unmet. */\n reason?: string\n findings_count: number\n latency_ms: number\n /** Additive model usage and cost provenance for this analyst. */\n usage: AnalystUsageReceipt\n /** When `status='failed'`: the error class + message, never the full stack. */\n error?: { class: string; message: string }\n}\n\nexport interface AnalystRunResult {\n run_id: string\n correlation_id: string\n started_at: string\n ended_at: string\n findings: AnalystFinding[]\n per_analyst: AnalystRunSummary[]\n /** Total LLM cost in USD across all analysts in this registry.run(). */\n total_cost_usd: number\n /**\n * Provenance for `total_cost_usd`. When uncaptured, the numeric field is only\n * the known subtotal and must not be treated as the run's total spend.\n */\n total_cost_provenance?: CostProvenance\n}\n\n// ── Streaming event envelope ────────────────────────────────────────\n\n/**\n * Events emitted by `AnalystRegistry.runStream(...)` in real time as\n * the registry executes. UIs subscribe via `for await (const ev of\n * registry.runStream(...))`; `registry.run(...)` is a thin collector\n * over the same stream, so the two surfaces share their invariants.\n *\n * Per-finding events are intentionally omitted — analyzers are batch\n * operations (a recursive engine returns the full `findings:json[]` at the\n * end of the responder), so streaming inside one analyst would only\n * emit partial JSON consumers can't render. The kind-completion event\n * is the right granularity; subscribers wanting per-finding rendering\n * iterate `event.findings` themselves.\n */\nexport type AnalystRunEvent =\n | {\n type: 'run-started'\n run_id: string\n correlation_id: string\n started_at: string\n /** The ordered list of analyst ids the registry will run. */\n analyst_ids: ReadonlyArray<string>\n }\n | {\n type: 'analyst-skipped'\n summary: AnalystRunSummary\n }\n | {\n type: 'analyst-started'\n analyst_id: string\n started_at: string\n }\n | {\n type: 'analyst-completed'\n /** `summary.status` is `'ok'` for clean completion or `'failed'` for thrown analysts. */\n summary: AnalystRunSummary\n findings: ReadonlyArray<AnalystFinding>\n }\n | {\n type: 'run-completed'\n result: AnalystRunResult\n }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwHA,MAAa,qBAAqB;CA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.js","names":[],"sources":["../src/analyst/types.ts"],"sourcesContent":["/**\n * Analyst contract — the missing orchestration layer over agent-eval's\n * existing analyzers (analyzeTraces, MultiLayerVerifier,\n * SemanticConceptJudge, JudgeFn, ...).\n *\n * Each existing primitive returns its own output shape. The Analyst\n * contract is the single envelope every primitive lifts into, so a\n * registry can run N analysts against a run and a single renderer can\n * compose findings without knowing which analyzer produced them.\n *\n * The contract is intentionally domain-agnostic: nothing here knows\n * about code, voice, RAG, or any particular agent stack. Analysts\n * declare what INPUT KIND they need (a trace store, an artifact dir,\n * a RunRecord, a JudgeInput, or `custom`), and the registry routes\n * the matching input from `AnalystRunInputs`.\n */\n\nimport { createHash } from 'node:crypto'\nimport type { CostLedgerHandle, CostProvenance } from '../cost-ledger'\nimport type { RunRecord, RunTokenUsage } from '../run-record'\nimport type { TraceAnalysisStore } from '../trace-analyst/store'\nimport type { JudgeInput } from '../types'\nimport type { ChatClient } from './chat-client'\nimport {\n type FindingConditions,\n type FindingTreatment,\n findingCompositionKey,\n mergeFindingComposition,\n} from './finding-composition'\nimport type {\n FindingEvidenceUnit,\n FindingLayer,\n FindingMeasure,\n FindingMethod,\n FindingScope,\n} from './finding-scope'\n\n/**\n * Unified envelope every analyst emits. Schema-versioned so renderers\n * and time-series diffs survive future field additions.\n *\n * 1.1.0 adds what a finding is about and what it was measured on: `layer`,\n * `scope`, `method`, `measure`, `confounders`, `valid_for`, `claim_id` and\n * `evidence_units`, with optional `treatment` and `conditions` composition. They are all optional, and a 1.0.0 finding carries none of\n * them; `readFindingScope` reads such a finding as layer and n unknown.\n * `parseAnalystFinding` (finding-scope.ts) is the one validator for both.\n */\nexport interface AnalystFinding {\n schema_version: AnalystFindingSchemaVersion\n /**\n * Stable hash over identity-defining fields (analyst_id + canonical\n * claim + area + optional subject). Two findings from two runs that\n * \"are the same finding\" share this id — that's what `diffFindings`\n * uses to compute appeared/disappeared sets across runs.\n */\n finding_id: string\n analyst_id: string\n produced_at: string\n severity: AnalystSeverity\n /**\n * Coarse classification. Renderers group by this. Free-form so\n * domain-specific analysts can introduce categories without a\n * schema change ('agent-reasoning', 'verification', 'cost',\n * 'tool-use', 'safety', 'latency', 'data-quality', ...).\n */\n area: string\n claim: string\n rationale?: string\n evidence_refs: EvidenceRef[]\n recommended_action?: string\n validation_plan?: string\n /** 0..1 — the analyst's own confidence. Not calibrated across analysts. */\n confidence: number\n /**\n * Optional subject the finding is about — leaf id, agent id, request\n * id. Included in finding_id when present so per-subject findings\n * diff cleanly across runs.\n */\n subject?: string\n /** True when this finding was lifted from a judge result rather than observed\n * directly in a trace or artifact. Descriptive only: proposal access is\n * controlled by `ProposalFinding.proposal_origin`. */\n derived_from_judge?: boolean\n /** Analyst-private extras; renderers ignore unless they know the analyst. */\n metadata?: Record<string, unknown>\n /** 1.1.0: the level the claim is about, from one event up to the whole lab. */\n layer?: FindingLayer\n /** 1.1.0: the population the claim was measured on. */\n scope?: FindingScope\n /** 1.1.0: how the claim was produced, and the judge's calibration when judged. */\n method?: FindingMethod\n /** 1.1.0: the number behind the claim, when it has one. */\n measure?: FindingMeasure\n /** 1.1.0: known differences between the compared units besides the treatment. */\n confounders?: string[]\n /** 1.1.0: the conditions the claim was measured under, in words. */\n valid_for?: string\n /**\n * 1.1.0: stable key for the claim across subjects and layers. `promote`\n * groups children by it; a finding without one never lifts.\n */\n claim_id?: string\n /**\n * 1.1.0: the measured units with their lineage. When present, `scope.n` and\n * `scope.population` must match them and no unit may sit above `layer`.\n */\n evidence_units?: FindingEvidenceUnit[]\n /** Deliberately assigned bundles; every bundle may touch several treatment layers. */\n treatment?: FindingTreatment[]\n /** Observed condition snapshots with population and observation-time provenance. */\n conditions?: FindingConditions[]\n}\n\n/** Every finding schema this package reads. Writers emit 1.1.0 only when a 1.1.0 field is set. */\nconst ANALYST_FINDING_SCHEMA_VERSIONS = ['1.0.0', '1.1.0'] as const\n\nexport type AnalystFindingSchemaVersion = (typeof ANALYST_FINDING_SCHEMA_VERSIONS)[number]\n\n/** Finding severity. `AnalystSeverity` derives from this array, so the type\n * and the schema that validates a finding cannot name different levels. */\nexport const ANALYST_SEVERITIES = ['critical', 'high', 'medium', 'low', 'info'] as const\n\nexport type AnalystSeverity = (typeof ANALYST_SEVERITIES)[number]\n\n/** Data sources that candidate generation may intentionally learn from. */\nexport type ProposalFindingOrigin = 'search' | 'production'\n\n/** A finding explicitly admitted as candidate-generation input. */\nexport type ProposalFinding = AnalystFinding & {\n readonly proposal_origin: ProposalFindingOrigin\n}\n\nexport interface EvidenceRef {\n /**\n * Where the evidence lives. `span` and `event` refer to OTLP trace\n * elements; `artifact` to a file inside the run's artifact tree;\n * `finding` to another AnalystFinding (cross-analyst chaining);\n * `metric` to a named scalar reading the renderer knows how to read.\n */\n kind: 'span' | 'event' | 'artifact' | 'finding' | 'metric'\n uri: string\n excerpt?: string\n}\n\n// ── Analyst contract ─────────────────────────────────────────────────\n\n/**\n * The discriminator the registry uses to pass the right input.\n * `custom` is the escape hatch — analysts that need something else\n * (e.g. an embedding cache, a partner SDK handle) read it from\n * `AnalystRunInputs.custom[<analyst id>]`.\n */\nexport type AnalystInputKind =\n | 'trace-store'\n | 'artifact-dir'\n | 'run-record'\n | 'judge-input'\n | 'custom'\n\nexport interface AnalystCost {\n /** `deterministic` analysts MUST NOT call the LLM. */\n kind: 'deterministic' | 'llm'\n /** Optional declared upper bound; the registry can enforce a budget. */\n est_usd_per_run?: number\n /** Models the analyst expects to use (informational). */\n models?: string[]\n /** Maximum post-cancellation wait for provider usage. Model analysts default to 5 seconds. */\n settlement_timeout_ms?: number\n}\n\nexport interface AnalystRequirements {\n /** Min number of shots / samples the analyst needs to produce signal. */\n min_shots?: number\n /** Capabilities the runtime must supply (e.g. ['network', 'gpu']). */\n capabilities?: string[]\n}\n\n/**\n * What's passed to every analyst call. The registry resolves which\n * field the analyst's `inputKind` selects and asserts it's present.\n */\nexport interface AnalystRunInputs {\n traceStore?: TraceAnalysisStore\n artifactDir?: string\n runRecord?: RunRecord\n judgeInput?: JudgeInput\n /** Keyed by analyst id; populated by callers that registered custom analysts. */\n custom?: Record<string, unknown>\n}\n\nexport interface AnalystContext {\n runId: string\n /** Stable correlation id so logs from a single registry.run() share a tag. */\n correlationId: string\n /** Enforced wall-clock deadline (epoch ms). */\n deadlineMs?: number\n /** Per-analyst USD budget. Analysts MAY check before issuing LLM calls. */\n budgetUsd?: number\n /** Shared paid-call account when the analyst runs inside a larger campaign. */\n costLedger?: CostLedgerHandle\n /** Attribution phase used when writing to the shared paid-call account. */\n costPhase?: string\n /**\n * Shared chat client. Analysts that call an LLM go through this so\n * the operator picks transport (sandbox-sdk | router | cli-bridge |\n * direct-provider | mock) at the registry boundary without touching\n * analyst code.\n */\n chat?: ChatClient\n /**\n * Findings from a prior run the operator wants the analyst to see as\n * retrieval context. Kinds that take advantage of cross-run memory\n * (failure-mode \"I saw this cluster last run\", knowledge-gap \"the wiki\n * page I asked for is still missing\") render these into the actor's\n * working set. Filtering is the operator's job: pass the slice that\n * matches the analyst's id, or pass everything and let the kind\n * filter. Empty / absent means no cross-run context.\n */\n priorFindings?: ReadonlyArray<AnalystFinding>\n /**\n * Findings emitted by analysts that completed earlier in this registry run.\n * This is separate from `priorFindings`: upstream findings are dependency\n * context for the current pass, while prior findings are cross-run memory.\n * The registry populates this only when `RegistryRunOpts.chainFindings` is on.\n */\n upstreamFindings?: ReadonlyArray<AnalystFinding>\n /**\n * Report metered work independently of findings. This keeps an empty finding\n * set from erasing token/cost telemetry. Multiple receipts are accumulated.\n */\n recordUsage?: (receipt: AnalystUsageReceipt) => void\n /** Free-form runtime tags (env, host, op). Findings can echo these into metadata. */\n tags?: Record<string, string>\n /** Logger callback — analysts SHOULD prefer this over console.* for testability. */\n log?: (msg: string, fields?: Record<string, unknown>) => void\n /** Optional abort signal. Analysts SHOULD pass it through to LLM calls. */\n signal?: AbortSignal\n /**\n * Optional live-execution port. A runtime that owns a sandbox or checkout\n * fills it so an analyst can execute a bounded probe against the run's\n * produced state instead of reasoning about it from the trace alone. This\n * package defines only the port: no field here reaches for an agent loop,\n * and an absent probe means the analyst works from recorded evidence.\n */\n probe?: ExecutionProbe\n}\n\n// ── Live-execution port ─────────────────────────────────────────────\n\n/** One bounded command an analyst asks the probe to run. */\nexport interface ExecutionProbeRequest {\n command: string\n /** Working directory inside the probed environment. */\n cwd?: string\n /** Hard wall-clock deadline for this one execution. */\n timeoutMs: number\n /** Bytes of combined output retained; the prober truncates beyond it. */\n maxOutputBytes?: number\n signal?: AbortSignal\n}\n\n/**\n * Typed outcome of one probe execution. `succeeded: false` is a PROBE failure\n * (the environment could not run the command); a command that ran and exited\n * non-zero is a successful observation with a non-zero `exitCode`.\n */\nexport type ExecutionProbeOutcome =\n | {\n succeeded: true\n exitCode: number\n stdout: string\n stderr: string\n durationMs: number\n /** True when output was cut at `maxOutputBytes`. */\n truncated: boolean\n }\n | { succeeded: false; error: { class: string; message: string } }\n\n/**\n * The seam a runtime fills to let analysts observe produced state live.\n * Implementations own sandboxing, credentials, and cleanup; analysts only\n * submit bounded requests and read typed outcomes.\n */\nexport interface ExecutionProbe {\n /** One plain sentence naming what is being probed (e.g. a sandbox id). */\n readonly description: string\n execute(request: ExecutionProbeRequest): Promise<ExecutionProbeOutcome>\n}\n\n/**\n * The minimal contract. Concrete analysts can refine `TInput` so\n * implementations stay type-safe (e.g. a trace analyst's `TInput` is\n * `TraceAnalysisStore`); the registry passes the right field from\n * `AnalystRunInputs` based on `inputKind`.\n */\nexport interface Analyst<TInput = unknown> {\n /** Stable identifier — appears in finding_id, telemetry, and registry exclusion lists. */\n readonly id: string\n /** Human-readable. One sentence. */\n readonly description: string\n readonly inputKind: AnalystInputKind\n readonly cost: AnalystCost\n readonly requires?: AnalystRequirements\n /** Bump on breaking changes to claim wording or area so old finding_ids don't collide. */\n readonly version: string\n analyze(input: TInput, ctx: AnalystContext): Promise<AnalystFinding[]>\n}\n\n/** Metered work performed by one analyst call. */\nexport interface AnalystUsageReceipt {\n /** Number of model-usage records observed at the provider boundary. */\n calls: number | null\n /** Null when the provider did not return token accounting. */\n tokens: RunTokenUsage | null\n /** Observed, estimated, or explicitly uncaptured dollar cost. */\n cost: CostProvenance\n /** Known lower bound when one or more calls have uncaptured cost. */\n knownCostUsd?: number\n /**\n * Token counts the provider reported on only one side. Present exactly when\n * `tokens` is null and at least one side WAS reported: `RunTokenUsage` has no\n * nullable side, so a one-sided count cannot live in `tokens` without writing\n * a zero nobody measured. Read it as a lower bound, never as a total — the\n * field exists so a null `tokens` cannot hide a real count.\n */\n partialTokens?: { input: number | null; output: number | null }\n /**\n * True when the token counts were DERIVED by the transport (from character\n * lengths, say) rather than measured by the model provider. `cost.kind` is\n * `estimated` both for a rate estimate over exact tokens and for one over\n * derived tokens; this is the field that separates them.\n */\n tokensEstimated?: boolean\n}\n\n// ── finding_id stability ─────────────────────────────────────────────\n\n/**\n * Compute the stable finding_id from the identity-defining fields.\n * Legacy identity hashes {analyst_id, area, subject, normalized claim}. Supplied\n * composition adds normalized treatment/fixed-condition identity; covariate provenance\n * remains on the record without making every observation time a different claim.\n * Analysts that emit findings whose claim text varies per run (timestamps,\n * counts) SHOULD either: (a) pass an explicit `id_basis` to fix the hash,\n * or (b) move the variable part into `rationale`/`metadata` and keep the\n * `claim` static.\n */\nexport function computeFindingId(input: {\n analyst_id: string\n area: string\n subject?: string\n claim: string\n /** Override the claim for hashing — use when the displayed claim has run-specific bits. */\n id_basis?: string\n treatment?: FindingTreatment[]\n conditions?: FindingConditions[]\n}): string {\n const composition = findingCompositionKey(input)\n const basis = JSON.stringify({\n a: input.analyst_id,\n r: input.area,\n s: input.subject ?? '',\n c: normalizeClaim(input.id_basis ?? input.claim),\n ...(composition ? { composition } : {}),\n })\n return `f_${createHash('sha256').update(basis).digest('hex').slice(0, 20)}`\n}\n\nfunction normalizeClaim(c: string): string {\n // Lowercase, collapse whitespace, strip trailing punctuation. Goal:\n // \"Leaf X failed install\" and \"Leaf X failed install.\" hash the same.\n return c\n .toLowerCase()\n .replace(/\\s+/g, ' ')\n .replace(/[.!?;:,]+$/g, '')\n .trim()\n}\n\n/** Fields that exist only in schema 1.1.0. */\nexport const FINDING_SCOPE_FIELDS = [\n 'layer',\n 'scope',\n 'method',\n 'measure',\n 'confounders',\n 'valid_for',\n 'claim_id',\n 'evidence_units',\n 'treatment',\n 'conditions',\n] as const satisfies ReadonlyArray<keyof AnalystFinding>\n\n/**\n * Convenience factory: produce a fully-formed AnalystFinding with the\n * id computed automatically. Analyst code stays terse.\n */\nexport function makeFinding(\n init: Omit<AnalystFinding, 'schema_version' | 'finding_id' | 'produced_at'> & {\n id_basis?: string\n produced_at?: string\n },\n): AnalystFinding {\n const { id_basis, produced_at, ...fields } = init\n const rest = { ...fields, ...mergeFindingComposition([fields]) }\n return {\n schema_version: FINDING_SCOPE_FIELDS.some((field) => rest[field] !== undefined)\n ? '1.1.0'\n : '1.0.0',\n finding_id: computeFindingId({\n analyst_id: rest.analyst_id,\n area: rest.area,\n subject: rest.subject,\n claim: rest.claim,\n id_basis,\n treatment: rest.treatment,\n conditions: rest.conditions,\n }),\n produced_at: produced_at ?? new Date().toISOString(),\n ...rest,\n }\n}\n\n/** Build a finding whose source is explicitly allowed during candidate generation. */\nexport function makeProposalFinding(\n init: Omit<ProposalFinding, 'schema_version' | 'finding_id' | 'produced_at'> & {\n id_basis?: string\n produced_at?: string\n },\n): ProposalFinding {\n const { proposal_origin, ...finding } = init\n return { ...makeFinding(finding), proposal_origin }\n}\n\n// ── Registry result envelope ────────────────────────────────────────\n\nexport interface AnalystRunSummary {\n analyst_id: string\n status: 'ok' | 'skipped' | 'failed'\n /** Why skipped — missing input, budget exceeded, capability unmet. */\n reason?: string\n findings_count: number\n latency_ms: number\n /** Additive model usage and cost provenance for this analyst. */\n usage: AnalystUsageReceipt\n /** When `status='failed'`: the error class + message, never the full stack. */\n error?: { class: string; message: string }\n}\n\nexport interface AnalystRunResult {\n run_id: string\n correlation_id: string\n started_at: string\n ended_at: string\n findings: AnalystFinding[]\n per_analyst: AnalystRunSummary[]\n /** Total LLM cost in USD across all analysts in this registry.run(). */\n total_cost_usd: number\n /**\n * Provenance for `total_cost_usd`. When uncaptured, the numeric field is only\n * the known subtotal and must not be treated as the run's total spend.\n */\n total_cost_provenance?: CostProvenance\n}\n\n// ── Streaming event envelope ────────────────────────────────────────\n\n/**\n * Events emitted by `AnalystRegistry.runStream(...)` in real time as\n * the registry executes. UIs subscribe via `for await (const ev of\n * registry.runStream(...))`; `registry.run(...)` is a thin collector\n * over the same stream, so the two surfaces share their invariants.\n *\n * Per-finding events are intentionally omitted — analyzers are batch\n * operations (a recursive engine returns the full `findings:json[]` at the\n * end of the responder), so streaming inside one analyst would only\n * emit partial JSON consumers can't render. The kind-completion event\n * is the right granularity; subscribers wanting per-finding rendering\n * iterate `event.findings` themselves.\n */\nexport type AnalystRunEvent =\n | {\n type: 'run-started'\n run_id: string\n correlation_id: string\n started_at: string\n /** The ordered list of analyst ids the registry will run. */\n analyst_ids: ReadonlyArray<string>\n }\n | {\n type: 'analyst-skipped'\n summary: AnalystRunSummary\n }\n | {\n type: 'analyst-started'\n analyst_id: string\n started_at: string\n }\n | {\n type: 'analyst-completed'\n /** `summary.status` is `'ok'` for clean completion or `'failed'` for thrown analysts. */\n summary: AnalystRunSummary\n findings: ReadonlyArray<AnalystFinding>\n }\n | {\n type: 'run-completed'\n result: AnalystRunResult\n }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwHA,MAAa,qBAAqB;CAAC;CAAY;CAAQ;CAAU;CAAO;AAAM;;;;;;;;;;;AAmO9E,SAAgB,iBAAiB,OAStB;CACT,MAAM,cAAc,sBAAsB,KAAK;CAC/C,MAAM,QAAQ,KAAK,UAAU;EAC3B,GAAG,MAAM;EACT,GAAG,MAAM;EACT,GAAG,MAAM,WAAW;EACpB,GAAG,eAAe,MAAM,YAAY,MAAM,KAAK;EAC/C,GAAI,cAAc,EAAE,YAAY,IAAI,CAAC;CACvC,CAAC;CACD,OAAO,KAAK,WAAW,QAAQ,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,EAAE;AAC1E;AAEA,SAAS,eAAe,GAAmB;CAGzC,OAAO,EACJ,YAAY,CAAC,CACb,QAAQ,QAAQ,GAAG,CAAC,CACpB,QAAQ,eAAe,EAAE,CAAC,CAC1B,KAAK;AACV;;AAGA,MAAa,uBAAuB;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;AAMA,SAAgB,YACd,MAIgB;CAChB,MAAM,EAAE,UAAU,aAAa,GAAG,WAAW;CAC7C,MAAM,OAAO;EAAE,GAAG;EAAQ,GAAG,wBAAwB,CAAC,MAAM,CAAC;CAAE;CAC/D,OAAO;EACL,gBAAgB,qBAAqB,MAAM,UAAU,KAAK,WAAW,KAAA,CAAS,IAC1E,UACA;EACJ,YAAY,iBAAiB;GAC3B,YAAY,KAAK;GACjB,MAAM,KAAK;GACX,SAAS,KAAK;GACd,OAAO,KAAK;GACZ;GACA,WAAW,KAAK;GAChB,YAAY,KAAK;EACnB,CAAC;EACD,aAAa,gCAAe,IAAI,KAAK,EAAA,CAAE,YAAY;EACnD,GAAG;CACL;AACF;;AAGA,SAAgB,oBACd,MAIiB;CACjB,MAAM,EAAE,iBAAiB,GAAG,YAAY;CACxC,OAAO;EAAE,GAAG,YAAY,OAAO;EAAG;CAAgB;AACpD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as RunSplitTag } from "./run-record-D2BFMPGl.js";
|
|
2
|
-
import { R as Scenario, d as DispatchContext } from "./types-
|
|
2
|
+
import { R as Scenario, d as DispatchContext } from "./types-CBkDo7ja.js";
|
|
3
3
|
type BenchmarkTaskKind = 'retrieval' | 'rag-answer' | 'hallucination' | 'kb-improvement' | 'routing' | 'custom';
|
|
4
4
|
type BenchmarkFamily = 'beir' | 'mteb-retrieval' | 'msmarco' | 'trec-dl' | 'miracl' | 'lotte' | 'bright' | 'crag' | 'hotpotqa' | 'kilt' | 'ragtruth' | 'faithbench' | 'first-party' | 'custom';
|
|
5
5
|
interface BenchmarkDatasetItem<TPayload = unknown> {
|
|
@@ -97,4 +97,4 @@ declare const BENCHMARK_SPLIT_SEED = "agent-eval-v1";
|
|
|
97
97
|
*/
|
|
98
98
|
declare function deterministicSplit(itemId: string, seed?: string): RunSplitTag;
|
|
99
99
|
export { BenchmarkFamily as a, BenchmarkSource as c, BenchmarkEvaluation as i, BenchmarkTaskKind as l, BenchmarkAdapter as n, BenchmarkResponder as o, BenchmarkDatasetItem as r, BenchmarkScenario as s, BENCHMARK_SPLIT_SEED as t, deterministicSplit as u };
|
|
100
|
-
//# sourceMappingURL=types-
|
|
100
|
+
//# sourceMappingURL=types-D91tnhzf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-D91tnhzf.d.ts","names":[],"sources":["../src/benchmarks/types.ts"],"mappings":";;KASY;KAQA;UAgBK,qBAAqB;;;EAGpC;;EAEA,SAAS;;EAET,QAAQ;;EAER,SAAS;;EAET,WAAW;;EAEX;;EAEA,SAAS;EACT,WAAW;;UAGI;;;;EAIf;;EAEA;;EAEA,aAAa;;;EAGb,KAAK;EACL;;UAGe;EACf;EACA;EACA;;EAEA;EACA;EACA;;EAEA;;;;;EAKA;;;UAQe,iBAAiB,kBAAkB,oBAAoB;;EAEtE;EACA,SAAS;EACT,WAAW;EACX;EACA,SAAS;EACT;;;;;EAKA,YAAY,OAAO,cAAc,QAAQ,qBAAqB;;EAE9D,SAAS,MAAM,qBAAqB,WAAW,UAAU,YAAY,QAAQ;;;;EAI7E,YAAY,iBAAiB;;UAGd,kBAAkB,4BAA4B;EAC7D;EACA;EACA,QAAQ;EACR,UAAU;EACV,UAAU;EACV,MAAM,qBAAqB;;KAGjB,mBAAmB,oBAAoB,uBAAuB;EACxE,UAAU,kBAAkB;EAC5B,MAAM,qBAAqB;EAC3B,SAAS;MACL,QAAQ,aAAa;;;cAoBd;;;;;;;;;iBAUG,mBACd,gBACA,gBACC"}
|
package/dist/wire/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { m as CustomTokenPricing, o as CostLedgerHandle } from "../cost-ledger-Czro9wmo.js";
|
|
2
2
|
import { x as ChatClient } from "../types-0KglnQ9o.js";
|
|
3
3
|
import { s as TraceStore } from "../store-CMs5wGXP.js";
|
|
4
|
-
import { m as FeedbackTrajectoryStore } from "../feedback-trajectory-
|
|
4
|
+
import { m as FeedbackTrajectoryStore } from "../feedback-trajectory-P37ju-gW.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { ServerType } from "@hono/node-server";
|
|
7
7
|
import { Hono } from "hono";
|
|
@@ -267,10 +267,10 @@ export declare const FeedbackTrajectorySchema: z.ZodObject<{
|
|
|
267
267
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
268
268
|
}, z.core.$strip>>;
|
|
269
269
|
split: z.ZodOptional<z.ZodEnum<{
|
|
270
|
-
dev: "dev";
|
|
271
|
-
holdout: "holdout";
|
|
272
270
|
train: "train";
|
|
271
|
+
dev: "dev";
|
|
273
272
|
test: "test";
|
|
273
|
+
holdout: "holdout";
|
|
274
274
|
}>>;
|
|
275
275
|
tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
276
276
|
createdAt: z.ZodString;
|
|
@@ -79,6 +79,29 @@ are exclusions, never No; missing predictions remain disagreements. Empty and de
|
|
|
79
79
|
samples have null kappa. A missing prediction or one-class gold set cannot issue a routing
|
|
80
80
|
certificate. The minimum kappa is owned by `DECISION_POINT_MIN_KAPPA` on `/systemone`.
|
|
81
81
|
|
|
82
|
+
Each row also reads yes as the positive class: `precision` and `recall` from the confusion
|
|
83
|
+
matrix, `auc` as the rank statistic of the finding's `probabilities.yes` against gold (ties count
|
|
84
|
+
half; null when a class has no scored member) and `ci`, a 95 % percentile bootstrap of the AUC
|
|
85
|
+
over clusters, seeded, 2,000 resamples by default (`resamples`, `seed`). A cluster is the
|
|
86
|
+
finding's window subject, falling back to its trace and then the window, so windows of one
|
|
87
|
+
agent move together; `ci.clusters` says how many there were, and one cluster collapses the
|
|
88
|
+
interval to the point. `kappaCi` is the same bootstrap of κ. `eligibleAuc` is a second, named
|
|
89
|
+
line beside `eligible`: `DECISION_POINT_AUC_BAR` (auc ≥ 0.80, ci.low ≥ 0.70 and at least 10 gold
|
|
90
|
+
items of the positive class) on `/systemone`; `eligible` keeps the κ rule and callers choose which
|
|
91
|
+
line gates a color. The certificate carries `auc` and `ci`, so the decision definition digest
|
|
92
|
+
binds them.
|
|
93
|
+
|
|
94
|
+
Worked example, the dl-ui behavior windows of 2026-11-02: 508 windows over agent-node clusters
|
|
95
|
+
gave the deterministic rule an implementing AUC of 0.845 (0.780–0.905) and Jev 0.971
|
|
96
|
+
(0.94–0.99) per window; the rule reads as calibrated on that line and the interval is what
|
|
97
|
+
lets a run page color the class rather than the point alone.
|
|
98
|
+
|
|
99
|
+
`calibrateChoiceQuestion(gold, findings, { options?, resamples?, seed? })` applies the same
|
|
100
|
+
code to a Choice question over any option set: `gold` is `{ id, label }` (null or a label
|
|
101
|
+
outside the set is an exclusion), each finding is `{ id, cluster?, choice, probabilities }`,
|
|
102
|
+
and the result carries the multi-class κ with its interval plus one one-vs-rest row per option
|
|
103
|
+
whose `gold_n` is the items labeled with that option.
|
|
104
|
+
|
|
82
105
|
The evaluator identity covers transport, normalization, receipt interpretation, pricing and spending policy; it must change when those semantics change. It is captured once and bound in exact execution and calibration identities.
|
|
83
106
|
|
|
84
107
|
Certificates bind the exact question, option order, implementation version, evaluator identity, layer,
|
package/docs/public-api.md
CHANGED
|
@@ -84,7 +84,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
84
84
|
1. **A typed error constructor stays.** A caller discriminates a failure with `instanceof`, and a consumer that catches broadly binds no name for the import graph to see. Un-exporting one removes the only way to tell a named refusal from a bug, which contradicts this package's typed-outcome rule.
|
|
85
85
|
2. **A wire schema or a contract-version constant stays.** `docs/wire-protocol.md`, `clients/python/`, and the OpenAPI document bind the same contract without binding a TypeScript symbol. That is blind spot 4 above, and it applies to every `*Schema`, `*_VERSION`, and `*_SCHEMA` row.
|
|
86
86
|
3. **A published entry point with no doc is a documentation defect, not a dead export.** The per-harness coding-agent intake functions read `none` only because no Markdown front door named them; `docs/code-agent-intake.md` now does.
|
|
87
|
-
4. **A symbol is deleted only when every channel is silent.** The 31-repository default-branch sweep, a GitHub code search across the organisation, the published `dist/` of every downstream package on npm, this repository's own source, tests, scripts, examples, and Markdown must all return nothing.
|
|
87
|
+
4. **A symbol is deleted only when every channel is silent.** The 31-repository default-branch sweep, a GitHub code search across the organisation, the published `dist/` of every downstream package on npm, this repository's own source, tests, scripts, examples, and Markdown must all return nothing. One symbol survived exactly this sweep: `shuffleOrder`, one of three stock contamination perturbations the changelog documents as a set.
|
|
88
88
|
|
|
89
89
|
## Exports
|
|
90
90
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-eval",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-eval#readme",
|
|
6
6
|
"repository": {
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"@tangle-network/agent-core": "^1.0.0",
|
|
238
238
|
"@tangle-network/agent-interface": "^5.10.2",
|
|
239
239
|
"@tangle-network/agent-trace-contract": "^2.2.0",
|
|
240
|
-
"@tangle-network/harness-sessions": "^1.0.
|
|
240
|
+
"@tangle-network/harness-sessions": "^1.0.8",
|
|
241
241
|
"hono": "^4.13.14",
|
|
242
242
|
"linear-sum-assignment": "1.0.9",
|
|
243
243
|
"re2js": "2.9.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agreement-irr-w-t3XUTD.js","names":["prev"],"sources":["../src/statistics/agreement-irr.ts"],"sourcesContent":["import { ValidationError } from '../errors'\nimport {\n type ContinuousAgreement,\n type ContinuousAgreementOptions,\n continuousAgreement,\n} from '../judge-calibration'\nimport type { DimensionJudgeScore } from '../types'\n\n/**\n * Inter-rater reliability — Krippendorff's α under the squared-difference\n * metric, pooled across dimensions.\n *\n * Each inner array is one judge's scores. Items are matched by position\n * WITHIN a dimension: the k-th score a judge supplies carrying dimension\n * `d` is item k of `d`, and the ratings compared against each other are\n * the ones different judges gave to the same item. Every judge that scores\n * a dimension at all must supply the same number of scores for it —\n * ragged input cannot be aligned into items and throws rather than\n * comparing mismatched items.\n *\n * α = 1 − D_observed / D_expected: D_observed averages the squared\n * difference over within-item judge pairs, D_expected over every pair of\n * ratings irrespective of item. α = 1 is perfect agreement, 0 is chance,\n * negative is systematic disagreement.\n */\nexport function interRaterReliability(judgeScores: DimensionJudgeScore[][]): number {\n if (judgeScores.length < 2) return 1\n\n // dimension → one score sequence per judge, in that judge's supplied order.\n const perDimension = new Map<string, number[][]>()\n for (let judgeIndex = 0; judgeIndex < judgeScores.length; judgeIndex++) {\n for (const s of judgeScores[judgeIndex]!) {\n let byJudge = perDimension.get(s.dimension)\n if (byJudge === undefined) {\n byJudge = Array.from({ length: judgeScores.length }, () => [] as number[])\n perDimension.set(s.dimension, byJudge)\n }\n byJudge[judgeIndex]!.push(s.score)\n }\n }\n\n const allValues: number[] = []\n const pairDiffs: number[] = []\n\n for (const [dimension, byJudge] of perDimension) {\n const scoring = byJudge.filter((scores) => scores.length > 0)\n if (scoring.length < 2) continue\n const itemCount = scoring[0]!.length\n if (scoring.some((scores) => scores.length !== itemCount)) {\n throw new ValidationError(\n `interRaterReliability: dimension '${dimension}' has judges supplying ` +\n `${scoring.map((scores) => scores.length).join('/')} scores — items cannot be aligned`,\n )\n }\n for (let item = 0; item < itemCount; item++) {\n const ratings = scoring.map((scores) => scores[item]!)\n for (const v of ratings) allValues.push(v)\n for (let i = 0; i < ratings.length; i++) {\n for (let j = i + 1; j < ratings.length; j++) {\n pairDiffs.push((ratings[i]! - ratings[j]!) ** 2)\n }\n }\n }\n }\n\n if (pairDiffs.length === 0 || allValues.length < 2) return 1\n\n const observedDisagreement = pairDiffs.reduce((a, b) => a + b, 0) / pairDiffs.length\n\n // Expected disagreement from all possible pairings of values\n let expectedDisagreement = 0\n let expectedCount = 0\n for (let i = 0; i < allValues.length; i++) {\n for (let j = i + 1; j < allValues.length; j++) {\n expectedDisagreement += (allValues[i]! - allValues[j]!) ** 2\n expectedCount++\n }\n }\n expectedDisagreement = expectedCount > 0 ? expectedDisagreement / expectedCount : 0\n\n if (expectedDisagreement === 0) return 1\n return 1 - observedDisagreement / expectedDisagreement\n}\n\n// ── Corpus-wide inter-rater agreement ──────────────────────────────\n//\n// `interRaterReliability(judgeScores)` computes a within-item\n// Krippendorff α — multiple judges score *the same item* and we ask\n// \"how much do their scores agree on that item?\" Useful for a single\n// scenario, but it cannot answer \"how reliable are these judges across\n// the whole evaluation corpus?\"\n//\n// `corpusInterRaterAgreement` does the corpus-wide question properly.\n// Inputs are flat per-(item, judge, dimension) score records. For each\n// dimension we pivot to a complete [n_items × n_judges] matrix and feed\n// it to the ICC(2,1) + κ_w machinery already validated in\n// `judge-calibration.ts`. An overall pooled metric averages the\n// per-dimension ICC/κ across dimensions.\n\nexport interface CorpusScoreRecord {\n /** Stable identifier for the rated item (scenario, span, turn, …). */\n itemId: string\n /** Identifier for the judge that produced this score. */\n judgeName: string\n /** Dimension name (matches `DimensionJudgeScore.dimension`). */\n dimension: string\n /** Numeric score; must be finite. */\n score: number\n}\n\nexport interface CorpusAgreementPerDimension extends ContinuousAgreement {\n dimension: string\n /** Item IDs that contributed to this dimension's matrix (every judge scored them). */\n itemIds: string[]\n /** Judge IDs that contributed to this dimension's matrix. */\n judgeIds: string[]\n}\n\nexport interface CorpusAgreementReport {\n /** Per-dimension ICC(2,1) + κ_w + Pearson + Spearman + bootstrap CIs. */\n perDimension: CorpusAgreementPerDimension[]\n /** Mean ICC across dimensions (NaN if no dimension yielded a finite ICC). */\n overallIcc: number\n /** Mean weighted κ across dimensions (NaN if none finite). */\n overallWeightedKappa: number\n /** Dimensions evaluated (sorted). */\n dimensions: string[]\n /** Judges seen across the corpus (sorted). */\n judgeIds: string[]\n}\n\nexport interface CorpusAgreementOptions extends ContinuousAgreementOptions {\n /**\n * Restrict the audit to these dimensions. Default = every dimension\n * that appears in the input. A dimension named here but absent from\n * the input throws — silent omission would corrupt the overall metric.\n */\n dimensions?: string[]\n /**\n * Restrict the audit to these judges. Default = every judge that\n * appears in the input. A judge named here but absent from a\n * dimension throws (see \"fail loud\" below).\n */\n judges?: string[]\n}\n\n/**\n * Corpus-wide inter-rater agreement across N items × M judges × D dimensions.\n *\n * For each dimension, builds the [n_items][n_judges] matrix of scores\n * (keeping only items every judge rated on that dimension), then runs\n * `continuousAgreement` to get ICC(2,1), κ_w, Pearson, Spearman, and\n * bootstrap CIs. Reports a pooled mean across dimensions as a single\n * \"is this judge panel reliable on this corpus?\" number.\n *\n * Fail-loud contract:\n * - Empty input throws.\n * - Fewer than 2 judges or fewer than 2 items per dimension throws.\n * - A judge present in some dimensions but with zero scored items on\n * another dimension throws (would silently shrink the matrix).\n * - Duplicate (itemId, judgeName, dimension) records throw.\n */\nexport function corpusInterRaterAgreement(\n records: CorpusScoreRecord[],\n opts: CorpusAgreementOptions = {},\n): CorpusAgreementReport {\n if (records.length === 0) {\n throw new ValidationError('corpusInterRaterAgreement: no score records supplied')\n }\n\n const judgesSeen = new Set<string>()\n const dimsSeen = new Set<string>()\n // dimension → judge → itemId → score\n const grid = new Map<string, Map<string, Map<string, number>>>()\n\n for (const r of records) {\n if (!Number.isFinite(r.score)) {\n throw new ValidationError(\n `corpusInterRaterAgreement: non-finite score for (item=${r.itemId}, judge=${r.judgeName}, dim=${r.dimension})`,\n )\n }\n judgesSeen.add(r.judgeName)\n dimsSeen.add(r.dimension)\n const byJudge = grid.get(r.dimension) ?? new Map<string, Map<string, number>>()\n const byItem = byJudge.get(r.judgeName) ?? new Map<string, number>()\n if (byItem.has(r.itemId)) {\n throw new ValidationError(\n `corpusInterRaterAgreement: duplicate record for (item=${r.itemId}, judge=${r.judgeName}, dim=${r.dimension})`,\n )\n }\n byItem.set(r.itemId, r.score)\n byJudge.set(r.judgeName, byItem)\n grid.set(r.dimension, byJudge)\n }\n\n const targetDims = opts.dimensions ?? [...dimsSeen].sort()\n for (const d of targetDims) {\n if (!dimsSeen.has(d)) {\n throw new ValidationError(\n `corpusInterRaterAgreement: dimension '${d}' was requested but no records carry it`,\n )\n }\n }\n const targetJudges = opts.judges ? [...opts.judges] : [...judgesSeen].sort()\n for (const j of targetJudges) {\n if (!judgesSeen.has(j)) {\n throw new ValidationError(\n `corpusInterRaterAgreement: judge '${j}' was requested but produced no records`,\n )\n }\n }\n if (targetJudges.length < 2) {\n throw new ValidationError(\n `corpusInterRaterAgreement: need ≥2 judges, got ${targetJudges.length}`,\n )\n }\n\n const perDimension: CorpusAgreementPerDimension[] = []\n const iccs: number[] = []\n const kappas: number[] = []\n\n for (const dim of targetDims) {\n const byJudge = grid.get(dim)!\n // Fail loud: every requested judge must have scored ≥1 item on this dim.\n const judgeItemCounts: Record<string, number> = {}\n for (const j of targetJudges) {\n const m = byJudge.get(j)\n judgeItemCounts[j] = m?.size ?? 0\n }\n const emptyJudges = targetJudges.filter((j) => judgeItemCounts[j] === 0)\n if (emptyJudges.length > 0) {\n throw new ValidationError(\n `corpusInterRaterAgreement: dimension '${dim}' has no scores from judge(s) ${emptyJudges.join(', ')} (counts: ${JSON.stringify(judgeItemCounts)})`,\n )\n }\n\n // Items rated by *every* requested judge on this dim.\n let commonItems: Set<string> | null = null\n for (const j of targetJudges) {\n const ids = new Set(byJudge.get(j)!.keys())\n if (commonItems === null) {\n commonItems = ids\n } else {\n const prev: Set<string> = commonItems\n commonItems = new Set([...prev].filter((x) => ids.has(x)))\n }\n }\n const sortedItems = [...(commonItems ?? new Set<string>())].sort()\n if (sortedItems.length < 2) {\n throw new ValidationError(\n `corpusInterRaterAgreement: dimension '${dim}' has ${sortedItems.length} item(s) rated by all ${targetJudges.length} judges (need ≥2)`,\n )\n }\n\n const matrix: number[][] = sortedItems.map((itemId) =>\n targetJudges.map((j) => byJudge.get(j)!.get(itemId)!),\n )\n const agreement = continuousAgreement(matrix, opts)\n perDimension.push({\n ...agreement,\n dimension: dim,\n itemIds: sortedItems,\n judgeIds: [...targetJudges],\n })\n if (Number.isFinite(agreement.icc)) iccs.push(agreement.icc)\n if (Number.isFinite(agreement.weightedKappa)) kappas.push(agreement.weightedKappa)\n }\n\n const mean = (xs: number[]) =>\n xs.length === 0 ? Number.NaN : xs.reduce((a, b) => a + b, 0) / xs.length\n return {\n perDimension,\n overallIcc: mean(iccs),\n overallWeightedKappa: mean(kappas),\n dimensions: targetDims,\n judgeIds: targetJudges,\n }\n}\n\n/**\n * Convenience adapter for `DimensionJudgeScore[]` data keyed externally by item.\n *\n * Use when you have per-item arrays of `DimensionJudgeScore[]` (e.g. one\n * `ScenarioResult.judgeScores` per scenario) and want corpus-wide\n * agreement without manually flattening. `itemId` must be unique per\n * row of `itemsScores`.\n */\nexport function corpusInterRaterAgreementFromJudgeScores(\n itemsScores: Array<{ itemId: string; scores: DimensionJudgeScore[] }>,\n opts: CorpusAgreementOptions = {},\n): CorpusAgreementReport {\n const records: CorpusScoreRecord[] = []\n const seen = new Set<string>()\n for (const { itemId, scores } of itemsScores) {\n if (seen.has(itemId)) {\n throw new ValidationError(\n `corpusInterRaterAgreementFromJudgeScores: duplicate itemId '${itemId}'`,\n )\n }\n seen.add(itemId)\n for (const s of scores) {\n records.push({\n itemId,\n judgeName: s.judgeName,\n dimension: s.dimension,\n score: s.score,\n })\n }\n }\n return corpusInterRaterAgreement(records, opts)\n}\n\n/** Agreement between two raters who each assigned one nominal label per item. */\ninterface NominalAgreement {\n /** Items both raters labeled. */\n n: number\n /** Share of items with identical labels. */\n agreement: number\n /**\n * Cohen's κ = (pₒ − pₑ) / (1 − pₑ), with pₑ from each rater's own label\n * marginals. NaN when n = 0, or when both raters used one identical label\n * for every item (pₑ = 1): chance and observed agreement are then the same\n * thing, and no number distinguishes skill from luck.\n */\n kappa: number\n}\n\n/**\n * Unweighted Cohen's κ for paired nominal labels. Labels carry no order, so a\n * near miss counts as a miss; use `calibrateJudge` for ordinal scores.\n */\nexport function nominalAgreement(\n pairs: ReadonlyArray<readonly [string, string]>,\n): NominalAgreement {\n const n = pairs.length\n if (n === 0) return { n: 0, agreement: Number.NaN, kappa: Number.NaN }\n const left = new Map<string, number>()\n const right = new Map<string, number>()\n let same = 0\n for (const [a, b] of pairs) {\n if (typeof a !== 'string' || typeof b !== 'string') {\n throw new ValidationError('nominalAgreement: every label must be a string')\n }\n if (a === b) same += 1\n left.set(a, (left.get(a) ?? 0) + 1)\n right.set(b, (right.get(b) ?? 0) + 1)\n }\n const observed = same / n\n let expected = 0\n for (const [label, count] of left) expected += (count / n) * ((right.get(label) ?? 0) / n)\n const kappa = expected === 1 ? Number.NaN : (observed - expected) / (1 - expected)\n return { n, agreement: observed, kappa }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,sBAAsB,aAA8C;CAClF,IAAI,YAAY,SAAS,GAAG,OAAO;CAGnC,MAAM,+BAAe,IAAI,IAAwB;CACjD,KAAK,IAAI,aAAa,GAAG,aAAa,YAAY,QAAQ,cACxD,KAAK,MAAM,KAAK,YAAY,aAAc;EACxC,IAAI,UAAU,aAAa,IAAI,EAAE,SAAS;EAC1C,IAAI,YAAY,KAAA,GAAW;GACzB,UAAU,MAAM,KAAK,EAAE,QAAQ,YAAY,OAAO,SAAS,CAAC,CAAa;GACzE,aAAa,IAAI,EAAE,WAAW,OAAO;EACvC;EACA,QAAQ,WAAW,CAAE,KAAK,EAAE,KAAK;CACnC;CAGF,MAAM,Y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