@tangle-network/agent-eval 0.216.1 → 0.217.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +102 -57
- package/README.md +2 -2
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-VFcQncbW.d.ts → agent-profile-DTt8uGP9.d.ts} +4 -17
- package/dist/agent-profile-DTt8uGP9.d.ts.map +1 -0
- package/dist/{agent-profile-cell-BK8mlqlq.js → agent-profile-cell-B1V1gUZs.js} +4 -53
- package/dist/agent-profile-cell-B1V1gUZs.js.map +1 -0
- package/dist/{agent-profile-cell-BNp-Js9F.d.ts → agent-profile-cell-BcpFbNd5.d.ts} +2 -22
- package/dist/agent-profile-cell-BcpFbNd5.d.ts.map +1 -0
- package/dist/{agreement-irr-BEWLIF3_.js → agreement-irr-BhAqjluA.js} +5 -5
- package/dist/agreement-irr-BhAqjluA.js.map +1 -0
- package/dist/analyst/index.d.ts +36 -169
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +17 -192
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-C84irm4i.js → analyze-runs-DqPJaJ4X.js} +225 -21
- package/dist/analyze-runs-DqPJaJ4X.js.map +1 -0
- package/dist/{analyze-runs-D68fd-su.d.ts → analyze-runs-DyeNcenW.d.ts} +5 -5
- package/dist/{analyze-runs-D68fd-su.d.ts.map → analyze-runs-DyeNcenW.d.ts.map} +1 -1
- package/dist/authenticity/index.d.ts +0 -23
- package/dist/authenticity/index.d.ts.map +1 -1
- package/dist/authenticity/index.js +1 -34
- package/dist/authenticity/index.js.map +1 -1
- package/dist/{benchmark-command-By0vh8q7.js → benchmark-command-xQK8nOI6.js} +554 -89
- package/dist/benchmark-command-xQK8nOI6.js.map +1 -0
- package/dist/benchmarks/index.d.ts +5 -6
- package/dist/benchmarks/index.d.ts.map +1 -1
- package/dist/benchmarks/index.js +4 -4
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/builder-eval/index.d.ts +3 -3
- package/dist/builder-eval/index.js +2 -2
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/campaign/index.d.ts +7 -7
- package/dist/campaign/index.js +15 -15
- package/dist/{campaign-BudZ70zo.js → campaign-CJGkxAQ6.js} +23 -530
- package/dist/campaign-CJGkxAQ6.js.map +1 -0
- package/dist/{campaign-evidence-Clrn4hBV.js → campaign-evidence-CQYw8_0H.js} +10 -18
- package/dist/{campaign-evidence-Clrn4hBV.js.map → campaign-evidence-CQYw8_0H.js.map} +1 -1
- package/dist/{canonical-B2RqLofv.js → canonical-Dq2hOQ8L.js} +2 -2
- package/dist/{canonical-B2RqLofv.js.map → canonical-Dq2hOQ8L.js.map} +1 -1
- package/dist/cell-spend-DEWR3nj-.js +90 -0
- package/dist/cell-spend-DEWR3nj-.js.map +1 -0
- package/dist/{chat-client-l-MVDlDk.js → chat-client-ldqxYYTN.js} +2 -2
- package/dist/{chat-client-l-MVDlDk.js.map → chat-client-ldqxYYTN.js.map} +1 -1
- package/dist/{chat-json-call-puMArmtW.js → chat-json-call-DavzexSp.js} +3 -2
- package/dist/chat-json-call-DavzexSp.js.map +1 -0
- package/dist/{claim-q4HQhK1G.js → claim-BPVuyHuy.js} +3 -3
- package/dist/{claim-q4HQhK1G.js.map → claim-BPVuyHuy.js.map} +1 -1
- package/dist/cli.js +113 -12
- package/dist/cli.js.map +1 -1
- package/dist/{client-BzL9niqi.d.ts → client-hwo3cJjR.d.ts} +3 -16
- package/dist/client-hwo3cJjR.d.ts.map +1 -0
- package/dist/{cluster-bootstrap-qcUWYFl-.js → cluster-bootstrap-DEwwhl0C.js} +3 -3
- package/dist/{cluster-bootstrap-qcUWYFl-.js.map → cluster-bootstrap-DEwwhl0C.js.map} +1 -1
- package/dist/{produced-state-BsDmnwxc.js → completion-verifier-B_jw6C9p.js} +9 -64
- package/dist/completion-verifier-B_jw6C9p.js.map +1 -0
- package/dist/contract/index.d.ts +12 -12
- package/dist/contract/index.js +25 -401
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-BP8V4kUQ.js → cost-ledger-D0352Z4d.js} +4 -8
- package/dist/cost-ledger-D0352Z4d.js.map +1 -0
- package/dist/dataset-DQqhOCPt.d.ts.map +1 -1
- package/dist/{default-registry-COhk9g36.js → default-registry-ClYjq3QE.js} +8 -11
- package/dist/default-registry-ClYjq3QE.js.map +1 -0
- package/dist/{default-registry-DzHiGruW.d.ts → default-registry-DXgLmoDI.d.ts} +7 -50
- package/dist/default-registry-DXgLmoDI.d.ts.map +1 -0
- package/dist/{define-agent-eval-CNTPzIkp.js → define-agent-eval-BDxNlP3D.js} +10 -10
- package/dist/{define-agent-eval-CNTPzIkp.js.map → define-agent-eval-BDxNlP3D.js.map} +1 -1
- package/dist/{define-agent-eval-WSck0CZJ.d.ts → define-agent-eval-BIkH_gAR.d.ts} +8 -8
- package/dist/define-agent-eval-BIkH_gAR.d.ts.map +1 -0
- package/dist/{descriptive-DboxPZrG.js → descriptive-CVNy48rR.js} +2 -2
- package/dist/{descriptive-DboxPZrG.js.map → descriptive-CVNy48rR.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +4 -14
- package/dist/diagnosis/index.d.ts.map +1 -1
- package/dist/diagnosis/index.js +67 -28
- package/dist/diagnosis/index.js.map +1 -1
- package/dist/{dspy-rlm-engine-LRCu61m5.js → dspy-rlm-engine-DhdCr1Dc.js} +5 -10
- package/dist/dspy-rlm-engine-DhdCr1Dc.js.map +1 -0
- package/dist/{emitter-HcCmFQl_.d.ts → emitter-DABYYTcH.d.ts} +5 -5
- package/dist/emitter-DABYYTcH.d.ts.map +1 -0
- package/dist/emitter-DbMXUIVP.js.map +1 -1
- package/dist/{engine-3A_4jOlI.d.ts → engine-BvZ0R-36.d.ts} +17 -21
- package/dist/engine-BvZ0R-36.d.ts.map +1 -0
- package/dist/{equal-terms-BtdXayCJ.js → equal-terms-DbPGcVtI.js} +2 -2
- package/dist/equal-terms-DbPGcVtI.js.map +1 -0
- package/dist/{errors-DVZiqS7K.js → errors-BcOs5MKW.js} +2 -8
- package/dist/{errors-DVZiqS7K.js.map → errors-BcOs5MKW.js.map} +1 -1
- package/dist/{eval-campaign-90jeaCAI.js → eval-campaign-BLEfBGbA.js} +6 -6
- package/dist/{eval-campaign-90jeaCAI.js.map → eval-campaign-BLEfBGbA.js.map} +1 -1
- package/dist/{evaluation-6Yoi74gM.d.ts → evaluation-jTjC_QQD.d.ts} +7 -7
- package/dist/evaluation-jTjC_QQD.d.ts.map +1 -0
- package/dist/evaluation.d.ts +2 -2
- package/dist/evaluation.js +1 -1
- package/dist/evaluation.js.map +1 -1
- package/dist/{exact-types-ClugMJfI.d.ts → exact-types-CflbJ9f3.d.ts} +2 -2
- package/dist/{exact-types-ClugMJfI.d.ts.map → exact-types-CflbJ9f3.d.ts.map} +1 -1
- package/dist/{exec-ChJ6d5if.js → exec-CpbtOXVt.js} +2 -24
- package/dist/{exec-ChJ6d5if.js.map → exec-CpbtOXVt.js.map} +1 -1
- package/dist/execution-tracks-CpgFPpS5.js.map +1 -1
- package/dist/experiment/index.d.ts +9 -112
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +149 -241
- package/dist/experiment/index.js.map +1 -1
- package/dist/{exporters-X4xwla8A.js → exporters-Cl6IeNAu.js} +3 -3
- package/dist/exporters-Cl6IeNAu.js.map +1 -0
- package/dist/{exporters-ChTnR90l.d.ts → exporters-Dk3oEbK_.d.ts} +2 -4
- package/dist/{exporters-ChTnR90l.d.ts.map → exporters-Dk3oEbK_.d.ts.map} +1 -1
- package/dist/{external-optimizer-process-BjMGUuds.js → external-optimizer-process-KVFGvYX1.js} +4 -3
- package/dist/external-optimizer-process-KVFGvYX1.js.map +1 -0
- package/dist/{external-optimizer-subprocess-BqW0hHcI.js → external-optimizer-subprocess-XIHBOSKt.js} +9 -11
- package/dist/external-optimizer-subprocess-XIHBOSKt.js.map +1 -0
- package/dist/{extract-usage-BrnzRJ6H.js → extract-usage-BZLU01kR.js} +2 -23
- package/dist/{extract-usage-BrnzRJ6H.js.map → extract-usage-BZLU01kR.js.map} +1 -1
- package/dist/{failure-cluster-CbgEDcFJ.d.ts → failure-cluster-DN0t63Z0.d.ts} +4 -43
- package/dist/failure-cluster-DN0t63Z0.d.ts.map +1 -0
- package/dist/{failure-taxonomy-CjabTATj.js → failure-taxonomy-Bx5oWqaW.js} +2 -19
- package/dist/{failure-taxonomy-CjabTATj.js.map → failure-taxonomy-Bx5oWqaW.js.map} +1 -1
- package/dist/{feedback-trajectory-C4EG0nNH.d.ts → feedback-trajectory-BWmhRBGu.d.ts} +7 -9
- package/dist/feedback-trajectory-BWmhRBGu.d.ts.map +1 -0
- package/dist/{semantic-concept-judge-BQF8te0T.js → findings-store-BMVQtEsm.js} +9 -249
- package/dist/findings-store-BMVQtEsm.js.map +1 -0
- package/dist/fuzz.d.ts +19 -62
- package/dist/fuzz.d.ts.map +1 -1
- package/dist/fuzz.js +62 -108
- package/dist/fuzz.js.map +1 -1
- package/dist/{hf-dataset-BR2yhuNn.js → hf-dataset-D9f7-oX7.js} +4 -24
- package/dist/hf-dataset-D9f7-oX7.js.map +1 -0
- package/dist/hosted/index.d.ts +2 -2
- package/dist/hosted/index.js +2 -2
- package/dist/{index-DHKEAv3s.d.ts → index-9jJ2fKSX.d.ts} +2 -64
- package/dist/index-9jJ2fKSX.d.ts.map +1 -0
- package/dist/{index-DV-jSzxF.d.ts → index-BLGqZ81N.d.ts} +10 -15
- package/dist/{index-DV-jSzxF.d.ts.map → index-BLGqZ81N.d.ts.map} +1 -1
- package/dist/{index-DPcngtwt.d.ts → index-BiT6RtNH.d.ts} +11 -36
- package/dist/index-BiT6RtNH.d.ts.map +1 -0
- package/dist/{index-BO41eGj5.d.ts → index-CX-GAUpw.d.ts} +3 -7
- package/dist/index-CX-GAUpw.d.ts.map +1 -0
- package/dist/{index-BFRO6chs.d.ts → index-CiRwLv2R.d.ts} +5 -69
- package/dist/index-CiRwLv2R.d.ts.map +1 -0
- package/dist/{index-CyszSg4O.d.ts → index-ZuWx52WG.d.ts} +115 -347
- package/dist/index-ZuWx52WG.d.ts.map +1 -0
- package/dist/index.d.ts +211 -218
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +402 -1040
- package/dist/index.js.map +1 -1
- package/dist/{integrity-dLiDe2kD.js → integrity-DOd9Q86O.js} +7 -9
- package/dist/integrity-DOd9Q86O.js.map +1 -0
- package/dist/{integrity-BXOsAb3i.js → integrity-W4CADcFc.js} +3 -7
- package/dist/{integrity-BXOsAb3i.js.map → integrity-W4CADcFc.js.map} +1 -1
- package/dist/{integrity-DAMEDFaC.d.ts → integrity-_qgZLA5p.d.ts} +4 -6
- package/dist/{integrity-DAMEDFaC.d.ts.map → integrity-_qgZLA5p.d.ts.map} +1 -1
- package/dist/{internal-Epl-YBZW.js → internal-BTK91Bqt.js} +3 -3
- package/dist/{internal-Epl-YBZW.js.map → internal-BTK91Bqt.js.map} +1 -1
- package/dist/{interval-CELpye1n.js → interval-Dq9gt7jx.js} +3 -3
- package/dist/{interval-CELpye1n.js.map → interval-Dq9gt7jx.js.map} +1 -1
- package/dist/{journal-DfRz9kps.js → journal-CR4QikYp.js} +110 -110
- package/dist/journal-CR4QikYp.js.map +1 -0
- package/dist/json-BhdsJaOQ.js +111 -0
- package/dist/json-BhdsJaOQ.js.map +1 -0
- package/dist/{judge-calibration-BpCy5XQl.js → judge-calibration-BkXMIWA4.js} +3 -3
- package/dist/{judge-calibration-BpCy5XQl.js.map → judge-calibration-BkXMIWA4.js.map} +1 -1
- package/dist/{judge-gate-iY9s4L44.js → judge-gate-Co5tuh57.js} +4 -27
- package/dist/{judge-gate-iY9s4L44.js.map → judge-gate-Co5tuh57.js.map} +1 -1
- package/dist/{judge-gate-CE7CQAgt.d.ts → judge-gate-DsL0yFcb.d.ts} +8 -9
- package/dist/judge-gate-DsL0yFcb.d.ts.map +1 -0
- package/dist/{kind-factory-BobI5Jy3.js → kind-factory-Gy4fXixd.js} +88 -17
- package/dist/kind-factory-Gy4fXixd.js.map +1 -0
- package/dist/ledger-core/index.d.ts +2 -2
- package/dist/ledger-core/index.js +4 -4
- package/dist/{ledger-core-Gq7yp8lP.js → ledger-core-DrJhbms9.js} +5 -84
- package/dist/ledger-core-DrJhbms9.js.map +1 -0
- package/dist/{llm-client-CyBAoYiX.js → llm-client-BshCREn6.js} +6 -108
- package/dist/llm-client-BshCREn6.js.map +1 -0
- package/dist/{llm-judge-CG12SQJq.js → llm-judge-C8jMTNNG.js} +24 -32
- package/dist/llm-judge-C8jMTNNG.js.map +1 -0
- package/dist/matrix/index.d.ts +3 -3
- package/dist/matrix/index.js +3 -2
- package/dist/{matrix-Dm0BQW7U.js → matrix-B8l-Nsxd.js} +3 -88
- package/dist/matrix-B8l-Nsxd.js.map +1 -0
- package/dist/{matrix-DSrSxjjy.d.ts → matrix-DHe-dwVJ.d.ts} +9 -18
- package/dist/matrix-DHe-dwVJ.d.ts.map +1 -0
- package/dist/{mean-DHoMiudD.js → mean-BbA_JCzW.js} +39 -5
- package/dist/mean-BbA_JCzW.js.map +1 -0
- package/dist/meta-eval/index.d.ts +5 -5
- package/dist/meta-eval/index.js +10 -10
- package/dist/metrics-BKaPBtIG.js.map +1 -1
- package/dist/{mint-DNU8QPG4.d.ts → mint-BRZXuwRi.d.ts} +4 -4
- package/dist/{mint-DNU8QPG4.d.ts.map → mint-BRZXuwRi.d.ts.map} +1 -1
- package/dist/{mint-QaD5cA0u.js → mint-zszyYlpA.js} +4 -4
- package/dist/{mint-QaD5cA0u.js.map → mint-zszyYlpA.js.map} +1 -1
- package/dist/{multi-layer-verifier-BUaQ4C17.d.ts → multi-layer-verifier-DEgMUk6v.d.ts} +2 -2
- package/dist/{multi-layer-verifier-BUaQ4C17.d.ts.map → multi-layer-verifier-DEgMUk6v.d.ts.map} +1 -1
- package/dist/{multiplicity-DQUFcbW4.js → multiplicity-Sg0U7h8j.js} +2 -2
- package/dist/{multiplicity-DQUFcbW4.js.map → multiplicity-Sg0U7h8j.js.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -23
- package/dist/multishot/golden/index.d.ts.map +1 -1
- package/dist/multishot/golden/index.js +3 -3
- package/dist/multishot/golden/index.js.map +1 -1
- package/dist/multishot/index.d.ts +3 -12
- package/dist/multishot/index.d.ts.map +1 -1
- package/dist/multishot/index.js +4 -3
- package/dist/multishot/index.js.map +1 -1
- package/dist/openapi.json +114 -10
- package/dist/{otel-spans-B9tUXRHF.js → otel-spans-CdN909k1.js} +3 -3
- package/dist/{otel-spans-B9tUXRHF.js.map → otel-spans-CdN909k1.js.map} +1 -1
- package/dist/{paired-arms-CwMGJsrS.js → paired-arms-Ct4LTKc1.js} +32 -9
- package/dist/paired-arms-Ct4LTKc1.js.map +1 -0
- package/dist/{paired-binary-CvpFHfKZ.js → paired-binary-B_nejA44.js} +3 -36
- package/dist/paired-binary-B_nejA44.js.map +1 -0
- package/dist/{paired-promotion-decision-DPKz8ZnF.d.ts → paired-promotion-decision-CQMJ5xGN.d.ts} +2 -34
- package/dist/paired-promotion-decision-CQMJ5xGN.d.ts.map +1 -0
- package/dist/{paired-promotion-decision-DsAPYGCm.js → paired-promotion-decision-D0SHb-ZL.js} +3 -3
- package/dist/{paired-promotion-decision-DsAPYGCm.js.map → paired-promotion-decision-D0SHb-ZL.js.map} +1 -1
- package/dist/{pareto-Cm6ndrWN.js → pareto-BzsxidFD.js} +11 -11
- package/dist/pareto-BzsxidFD.js.map +1 -0
- package/dist/pipelines/index.d.ts +16 -19
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js +4 -68
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{power-and-mde-Hj2ubb4B.js → power-and-mde-N5nU4_Ly.js} +3 -3
- package/dist/{power-and-mde-Hj2ubb4B.js.map → power-and-mde-N5nU4_Ly.js.map} +1 -1
- package/dist/{prime-protocol-CHKgA3a6.js → prime-protocol-BFgGrEMP.js} +3 -3
- package/dist/prime-protocol-BFgGrEMP.js.map +1 -0
- package/dist/{prime-protocol-HiB9HX7E.d.ts → prime-protocol-BWG2DQIk.d.ts} +3 -21
- package/dist/prime-protocol-BWG2DQIk.d.ts.map +1 -0
- package/dist/profile-cell.d.ts +2 -2
- package/dist/profile-cell.js +2 -2
- package/dist/{promotion-gate-BawrdPYr.d.ts → promotion-gate-DaY95yU6.d.ts} +7 -8
- package/dist/{promotion-gate-BawrdPYr.d.ts.map → promotion-gate-DaY95yU6.d.ts.map} +1 -1
- package/dist/{promotion-policy-KO57gbyV.js → promotion-policy-6A8osGr_.js} +4 -4
- package/dist/{promotion-policy-KO57gbyV.js.map → promotion-policy-6A8osGr_.js.map} +1 -1
- package/dist/{proposal-findings-CY1xKn_a.js → proposal-findings-BbWidvUk.js} +3 -3
- package/dist/proposal-findings-BbWidvUk.js.map +1 -0
- package/dist/{query-BUCZCK7F.js → query-B_RZ36an.js} +5 -5
- package/dist/query-B_RZ36an.js.map +1 -0
- package/dist/{query-DK1nWcmp.d.ts → query-Cmv_U8vf.d.ts} +4 -24
- package/dist/{query-DK1nWcmp.d.ts.map → query-Cmv_U8vf.d.ts.map} +1 -1
- package/dist/{random-ByUSnV9w.js → random-DDDcC7YU.js} +2 -2
- package/dist/{random-ByUSnV9w.js.map → random-DDDcC7YU.js.map} +1 -1
- package/dist/{raw-provider-sink-DoHz4JNG.js → raw-provider-sink-75w4FWBj.js} +2 -2
- package/dist/{raw-provider-sink-DoHz4JNG.js.map → raw-provider-sink-75w4FWBj.js.map} +1 -1
- package/dist/{redact-mtCCcT8z.d.ts → redact-DXdlFb_U.d.ts} +2 -3
- package/dist/redact-DXdlFb_U.d.ts.map +1 -0
- package/dist/{redact-B5xXKqQ3.js → redact-mtkTiJVk.js} +2 -7
- package/dist/{redact-B5xXKqQ3.js.map → redact-mtkTiJVk.js.map} +1 -1
- package/dist/{registry-D7_hm2fK.d.ts → registry-ssNoHzwD.d.ts} +4 -4
- package/dist/{registry-D7_hm2fK.d.ts.map → registry-ssNoHzwD.d.ts.map} +1 -1
- package/dist/{release-confidence-CpuP65S5.js → release-confidence-CYIFH-fp.js} +6 -11
- package/dist/release-confidence-CYIFH-fp.js.map +1 -0
- package/dist/{report-command-SC9nqb4M.js → render-C-w2EZ6p.js} +205 -363
- package/dist/render-C-w2EZ6p.js.map +1 -0
- package/dist/reporting.d.ts +6 -6
- package/dist/reporting.js +8 -8
- package/dist/{researcher-CEcfku-T.d.ts → researcher-0ABVIdGa.d.ts} +9 -9
- package/dist/{researcher-CEcfku-T.d.ts.map → researcher-0ABVIdGa.d.ts.map} +1 -1
- package/dist/{reward-CpCmAM8L.d.ts → reward-DrZ71vnf.d.ts} +3 -26
- package/dist/reward-DrZ71vnf.d.ts.map +1 -0
- package/dist/{reward-hacking-E0d-WVcP.js → reward-hacking-ByuETaIb.js} +3 -3
- package/dist/{reward-hacking-E0d-WVcP.js.map → reward-hacking-ByuETaIb.js.map} +1 -1
- package/dist/{reward-hacking-RVdZ6Kkt.d.ts → reward-hacking-E52wq86n.d.ts} +5 -18
- package/dist/reward-hacking-E52wq86n.d.ts.map +1 -0
- package/dist/reward-nw2xZGZG.js.map +1 -1
- package/dist/rl.d.ts +117 -295
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +27 -747
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +5 -5
- package/dist/rollout/index.js +7 -8
- package/dist/{rollout-DZV1t2Wg.js → rollout-D6C50mfA.js} +88 -13
- package/dist/rollout-D6C50mfA.js.map +1 -0
- package/dist/{rubric-predictive-validity-DaFW70y9.js → rubric-predictive-validity-D3_oI72N.js} +3 -3
- package/dist/{rubric-predictive-validity-DaFW70y9.js.map → rubric-predictive-validity-D3_oI72N.js.map} +1 -1
- package/dist/{rubric-predictive-validity-C03EC7ZE.d.ts → rubric-predictive-validity-DiwT8PbL.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-C03EC7ZE.d.ts.map → rubric-predictive-validity-DiwT8PbL.d.ts.map} +1 -1
- package/dist/{run-record-C1E24G2A.d.ts → run-record-CaxbLq6Y.d.ts} +4 -10
- package/dist/run-record-CaxbLq6Y.d.ts.map +1 -0
- package/dist/{run-record-C5e7FjhJ.js → run-record-CysKLB93.js} +3 -3
- package/dist/run-record-CysKLB93.js.map +1 -0
- package/dist/{run-record-Boc5IUTp.js → run-record-DhEJgoPz.js} +4 -4
- package/dist/{run-record-Boc5IUTp.js.map → run-record-DhEJgoPz.js.map} +1 -1
- package/dist/sandbox-harness-BlSOu4LX.d.ts.map +1 -1
- package/dist/{schema-CSf6qWgZ.js → schema-Bt2vLFm3.js} +2 -14
- package/dist/schema-Bt2vLFm3.js.map +1 -0
- package/dist/schema-C-ziyJD7.d.ts.map +1 -1
- package/dist/{schema-2g7trUwH.d.ts → schema-D6EVKzTB.d.ts} +4 -5
- package/dist/schema-D6EVKzTB.d.ts.map +1 -0
- package/dist/{schema-BuiujZ-g.js → schema-DxcKTzbi.js} +2 -2
- package/dist/schema-DxcKTzbi.js.map +1 -0
- package/dist/search/index.d.ts +3 -31
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +4 -4
- package/dist/{search-kernel-DyNEa6IU.d.ts → search-kernel-DxqjBxA-.d.ts} +10 -27
- package/dist/search-kernel-DxqjBxA-.d.ts.map +1 -0
- package/dist/{search-ledger-CVUGLDZp.js → search-ledger-TUvB5gWH.js} +7 -7
- package/dist/{search-ledger-CVUGLDZp.js.map → search-ledger-TUvB5gWH.js.map} +1 -1
- package/dist/{search-ledger-file-DDQUgvCg.js → search-ledger-file-UKCO2r8a.js} +4 -4
- package/dist/search-ledger-file-UKCO2r8a.js.map +1 -0
- package/dist/{search-shipper-BOSD46qv.js → search-shipper-Cw2z3-td.js} +4 -4
- package/dist/search-shipper-Cw2z3-td.js.map +1 -0
- package/dist/{search-summary-BQCSWf1g.js → search-summary-DQIvJsSB.js} +5 -5
- package/dist/{search-summary-BQCSWf1g.js.map → search-summary-DQIvJsSB.js.map} +1 -1
- package/dist/{sequential-CzK5DarL.js → sequential-BVv1sjsw.js} +2 -32
- package/dist/{sequential-CzK5DarL.js.map → sequential-BVv1sjsw.js.map} +1 -1
- package/dist/{sequential-Bf_pbE50.js → sequential-CimQrbjv.js} +5 -5
- package/dist/sequential-CimQrbjv.js.map +1 -0
- package/dist/{sequential-BhsrMupG.d.ts → sequential-KwGspfeR.d.ts} +2 -9
- package/dist/{sequential-BhsrMupG.d.ts.map → sequential-KwGspfeR.d.ts.map} +1 -1
- package/dist/{sequential-eprocess-DM_qENCl.js → sequential-eprocess-DodI6RoF.js} +2 -2
- package/dist/{sequential-eprocess-DM_qENCl.js.map → sequential-eprocess-DodI6RoF.js.map} +1 -1
- package/dist/{server-e9oWO_bN.js → server-DoVbqqtJ.js} +101 -101
- package/dist/server-DoVbqqtJ.js.map +1 -0
- package/dist/{single-run-lock-CV9Eyd_q.js → single-run-lock-U58yf8N6.js} +2 -2
- package/dist/{single-run-lock-CV9Eyd_q.js.map → single-run-lock-U58yf8N6.js.map} +1 -1
- package/dist/{skillopt-optimization-method-BiwA8nfX.js → skillopt-optimization-method-kyL94-ri.js} +17 -95
- package/dist/skillopt-optimization-method-kyL94-ri.js.map +1 -0
- package/dist/{spans-BHAUXMGN.d.ts → spans-CVngGij3.d.ts} +2 -2
- package/dist/{spans-BHAUXMGN.d.ts.map → spans-CVngGij3.d.ts.map} +1 -1
- package/dist/{statistical-heldout-42NlCNDe.js → statistical-heldout-Bksv92Th.js} +3 -3
- package/dist/statistical-heldout-Bksv92Th.js.map +1 -0
- package/dist/{statistical-heldout-CYpGaoDH.d.ts → statistical-heldout-C9AbgREN.d.ts} +8 -67
- package/dist/statistical-heldout-C9AbgREN.d.ts.map +1 -0
- package/dist/{steps-Bg5-KVx1.d.ts → steps-DlepJPwD.d.ts} +2 -56
- package/dist/steps-DlepJPwD.d.ts.map +1 -0
- package/dist/{store-C4avFjIi.d.ts → store-B3nWRy3B.d.ts} +2 -2
- package/dist/{store-C4avFjIi.d.ts.map → store-B3nWRy3B.d.ts.map} +1 -1
- package/dist/{store-otlp-DJ9dtA5x.js → store-otlp-BteDAbHK.js} +3 -3
- package/dist/{store-otlp-DJ9dtA5x.js.map → store-otlp-BteDAbHK.js.map} +1 -1
- package/dist/{store-tool-spans-CIX5arAG.js → store-tool-spans-D5l_OfTJ.js} +8 -8
- package/dist/store-tool-spans-D5l_OfTJ.js.map +1 -0
- package/dist/{store-tool-spans-DdCSPa7C.d.ts → store-tool-spans-DZS0HWVf.d.ts} +9 -18
- package/dist/store-tool-spans-DZS0HWVf.d.ts.map +1 -0
- package/dist/storyboard/index.d.ts +4 -11
- package/dist/storyboard/index.d.ts.map +1 -1
- package/dist/storyboard/index.js +1 -16
- package/dist/storyboard/index.js.map +1 -1
- package/dist/{summary-report-V_JACR4Y.js → summary-report-BsXJoYX5.js} +88 -10
- package/dist/summary-report-BsXJoYX5.js.map +1 -0
- package/dist/{summary-report-bdFDXq0b.d.ts → summary-report-DM7tlml1.d.ts} +10 -19
- package/dist/summary-report-DM7tlml1.d.ts.map +1 -0
- package/dist/supervisor-run/index.d.ts +60 -28
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +4 -458
- package/dist/supervisor-run/index.js.map +1 -1
- package/dist/{systemone-BomhHr2c.d.ts → systemone-Bp_Ac0p1.d.ts} +5 -5
- package/dist/{systemone-BomhHr2c.d.ts.map → systemone-Bp_Ac0p1.d.ts.map} +1 -1
- package/dist/systemone-protocol.js +1 -1
- package/dist/{systemone-review-CUVcQJu6.d.ts → systemone-review-CwE6JGIp.d.ts} +2 -2
- package/dist/{systemone-review-CUVcQJu6.d.ts.map → systemone-review-CwE6JGIp.d.ts.map} +1 -1
- package/dist/{systemone-review-D7sXwsqq.js → systemone-review-DzdOJ8I6.js} +3 -3
- package/dist/{systemone-review-D7sXwsqq.js.map → systemone-review-DzdOJ8I6.js.map} +1 -1
- package/dist/systemone.d.ts +5 -5
- package/dist/systemone.js +5 -5
- package/dist/systemone.js.map +1 -1
- package/dist/{task-failure-attributes-hEmASjix.js → task-failure-attributes-BMsblaDh.js} +3 -3
- package/dist/task-failure-attributes-BMsblaDh.js.map +1 -0
- package/dist/{terminal-record-DZyQZ3pz.js → terminal-record-78g6E4vh.js} +5 -5
- package/dist/terminal-record-78g6E4vh.js.map +1 -0
- package/dist/{tool-groups-C3NEcdCM.d.ts → tool-groups-DyNz2JZ_.d.ts} +3 -3
- package/dist/tool-groups-DyNz2JZ_.d.ts.map +1 -0
- package/dist/{tool-waste-BKgvd-TP.d.ts → tool-waste-CkjzWmeY.d.ts} +25 -28
- package/dist/tool-waste-CkjzWmeY.d.ts.map +1 -0
- package/dist/{tool-waste-BlesqTqW.js → tool-waste-DLsjS_p-.js} +5 -5
- package/dist/{tool-waste-BlesqTqW.js.map → tool-waste-DLsjS_p-.js.map} +1 -1
- package/dist/{trace-questions-CM2CAocU.d.ts → trace-questions-xxwgsuMi.d.ts} +4 -9
- package/dist/{trace-questions-CM2CAocU.d.ts.map → trace-questions-xxwgsuMi.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +14 -211
- package/dist/trace-repair/index.d.ts.map +1 -1
- package/dist/trace-repair/index.js +865 -981
- package/dist/trace-repair/index.js.map +1 -1
- package/dist/traces.d.ts +18 -46
- package/dist/traces.d.ts.map +1 -1
- package/dist/traces.js +13 -13
- package/dist/traces.js.map +1 -1
- package/dist/trajectory-replay/index.d.ts +3 -117
- package/dist/trajectory-replay/index.d.ts.map +1 -1
- package/dist/trajectory-replay/index.js +98 -56
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/{tree-C1XYeXvy.js → tree-BGRglkKd.js} +13 -10
- package/dist/tree-BGRglkKd.js.map +1 -0
- package/dist/{types-B3jzCp0p.js → types-BXgASBCL.js} +2 -2
- package/dist/{types-B3jzCp0p.js.map → types-BXgASBCL.js.map} +1 -1
- package/dist/{types-C1tnkEgM.d.ts → types-CW8ewATZ.d.ts} +4 -113
- package/dist/types-CW8ewATZ.d.ts.map +1 -0
- package/dist/{types-BqkVmHfv.d.ts → types-CmXY0PQf.d.ts} +2 -4
- package/dist/types-CmXY0PQf.d.ts.map +1 -0
- package/dist/{types-C02qtnG8.d.ts → types-D-mgRzlh.d.ts} +7 -28
- package/dist/types-D-mgRzlh.d.ts.map +1 -0
- package/dist/{types-Cq8mSbq8.d.ts → types-D8GhJoHk.d.ts} +7 -9
- package/dist/{types-Cq8mSbq8.d.ts.map → types-D8GhJoHk.d.ts.map} +1 -1
- package/dist/{types-IXD2HJzu.js → types-DqFMNTgK.js} +2 -4
- package/dist/types-DqFMNTgK.js.map +1 -0
- package/dist/{types-Cbe2fWBa.d.ts → types-DtMbFw6U.d.ts} +3 -3
- package/dist/{types-Cbe2fWBa.d.ts.map → types-DtMbFw6U.d.ts.map} +1 -1
- package/dist/{verdict-Dl0tiT1X.js → verdict-BGQmxQ8A.js} +3 -3
- package/dist/verdict-BGQmxQ8A.js.map +1 -0
- package/dist/{verdict-E4eRNf7-.d.ts → verdict-C24NELtN.d.ts} +2 -15
- package/dist/{verdict-E4eRNf7-.d.ts.map → verdict-C24NELtN.d.ts.map} +1 -1
- package/dist/{verdict-cache-Bm8EKL2s.js → verdict-cache-CL_7tePD.js} +2 -2
- package/dist/verdict-cache-CL_7tePD.js.map +1 -0
- package/dist/wire/index.d.ts +31 -410
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +2 -2
- package/docs/changes/jev-evidence-review.md +1 -1
- package/docs/changes/jev-product-adoption.md +1 -1
- package/docs/changes/jev-recorded-evidence.md +1 -1
- package/docs/design/statistics-decisions.md +17 -17
- package/docs/design.md +1 -1
- package/docs/evaluation-integrity.md +1 -1
- package/docs/proofs/campaign-attempt-retention-20261001/README.md +2 -2
- package/docs/public-api.md +138 -529
- package/docs/rollout.md +1 -1
- package/docs/trace-repair-admission.md +1 -1
- package/docs/wire-protocol.md +1 -1
- package/package.json +1 -1
- package/dist/active-curriculum-B_Lc9kfO.js +0 -61
- package/dist/active-curriculum-B_Lc9kfO.js.map +0 -1
- package/dist/agent-profile-VFcQncbW.d.ts.map +0 -1
- package/dist/agent-profile-cell-BK8mlqlq.js.map +0 -1
- package/dist/agent-profile-cell-BNp-Js9F.d.ts.map +0 -1
- package/dist/agreement-irr-BEWLIF3_.js.map +0 -1
- package/dist/analyze-runs-C84irm4i.js.map +0 -1
- package/dist/baseline-Udi_PLuT.js +0 -259
- package/dist/baseline-Udi_PLuT.js.map +0 -1
- package/dist/benchmark-CXmVVHH2.js +0 -562
- package/dist/benchmark-CXmVVHH2.js.map +0 -1
- package/dist/benchmark-command-By0vh8q7.js.map +0 -1
- package/dist/campaign-BudZ70zo.js.map +0 -1
- package/dist/chat-json-call-puMArmtW.js.map +0 -1
- package/dist/claude-jsonl-dZir12m6.js +0 -86
- package/dist/claude-jsonl-dZir12m6.js.map +0 -1
- package/dist/client-BzL9niqi.d.ts.map +0 -1
- package/dist/cost-ledger-BP8V4kUQ.js.map +0 -1
- package/dist/counterfactual-CPaWN99-.d.ts +0 -60
- package/dist/counterfactual-CPaWN99-.d.ts.map +0 -1
- package/dist/counterfactual-Dn3veueY.js +0 -98
- package/dist/counterfactual-Dn3veueY.js.map +0 -1
- package/dist/default-registry-COhk9g36.js.map +0 -1
- package/dist/default-registry-DzHiGruW.d.ts.map +0 -1
- package/dist/define-agent-eval-WSck0CZJ.d.ts.map +0 -1
- package/dist/dspy-rlm-engine-LRCu61m5.js.map +0 -1
- package/dist/effect-sizes-BhzEpXMc.js +0 -82
- package/dist/effect-sizes-BhzEpXMc.js.map +0 -1
- package/dist/emitter-HcCmFQl_.d.ts.map +0 -1
- package/dist/engine-3A_4jOlI.d.ts.map +0 -1
- package/dist/equal-terms-BtdXayCJ.js.map +0 -1
- package/dist/evaluation-6Yoi74gM.d.ts.map +0 -1
- package/dist/exporters-X4xwla8A.js.map +0 -1
- package/dist/external-optimizer-process-BjMGUuds.js.map +0 -1
- package/dist/external-optimizer-subprocess-BqW0hHcI.js.map +0 -1
- package/dist/failure-cluster-CbgEDcFJ.d.ts.map +0 -1
- package/dist/feedback-trajectory-C4EG0nNH.d.ts.map +0 -1
- package/dist/hf-dataset-BR2yhuNn.js.map +0 -1
- package/dist/index-BFRO6chs.d.ts.map +0 -1
- package/dist/index-BO41eGj5.d.ts.map +0 -1
- package/dist/index-CyszSg4O.d.ts.map +0 -1
- package/dist/index-DHKEAv3s.d.ts.map +0 -1
- package/dist/index-DPcngtwt.d.ts.map +0 -1
- package/dist/integrity-dLiDe2kD.js.map +0 -1
- package/dist/journal-DfRz9kps.js.map +0 -1
- package/dist/judge-gate-CE7CQAgt.d.ts.map +0 -1
- package/dist/kind-factory-BobI5Jy3.js.map +0 -1
- package/dist/ledger-core-Gq7yp8lP.js.map +0 -1
- package/dist/llm-client-CyBAoYiX.js.map +0 -1
- package/dist/llm-judge-CG12SQJq.js.map +0 -1
- package/dist/matrix-DSrSxjjy.d.ts.map +0 -1
- package/dist/matrix-Dm0BQW7U.js.map +0 -1
- package/dist/mean-DHoMiudD.js.map +0 -1
- package/dist/normal-DsJZtrJc.js +0 -25
- package/dist/normal-DsJZtrJc.js.map +0 -1
- package/dist/paired-arms-CwMGJsrS.js.map +0 -1
- package/dist/paired-binary-CvpFHfKZ.js.map +0 -1
- package/dist/paired-promotion-decision-DPKz8ZnF.d.ts.map +0 -1
- package/dist/pareto-Cm6ndrWN.js.map +0 -1
- package/dist/prime-protocol-CHKgA3a6.js.map +0 -1
- package/dist/prime-protocol-HiB9HX7E.d.ts.map +0 -1
- package/dist/produced-state-BsDmnwxc.js.map +0 -1
- package/dist/proposal-findings-CY1xKn_a.js.map +0 -1
- package/dist/query-BUCZCK7F.js.map +0 -1
- package/dist/redact-mtCCcT8z.d.ts.map +0 -1
- package/dist/release-confidence-CpuP65S5.js.map +0 -1
- package/dist/report-command-SC9nqb4M.js.map +0 -1
- package/dist/reward-CpCmAM8L.d.ts.map +0 -1
- package/dist/reward-hacking-RVdZ6Kkt.d.ts.map +0 -1
- package/dist/rollout-DZV1t2Wg.js.map +0 -1
- package/dist/run-record-C1E24G2A.d.ts.map +0 -1
- package/dist/run-record-C5e7FjhJ.js.map +0 -1
- package/dist/schema-2g7trUwH.d.ts.map +0 -1
- package/dist/schema-BuiujZ-g.js.map +0 -1
- package/dist/schema-CSf6qWgZ.js.map +0 -1
- package/dist/search-kernel-DyNEa6IU.d.ts.map +0 -1
- package/dist/search-ledger-file-DDQUgvCg.js.map +0 -1
- package/dist/search-shipper-BOSD46qv.js.map +0 -1
- package/dist/semantic-concept-judge-BQF8te0T.js.map +0 -1
- package/dist/sequential-Bf_pbE50.js.map +0 -1
- package/dist/server-e9oWO_bN.js.map +0 -1
- package/dist/skillopt-optimization-method-BiwA8nfX.js.map +0 -1
- package/dist/statistical-heldout-42NlCNDe.js.map +0 -1
- package/dist/statistical-heldout-CYpGaoDH.d.ts.map +0 -1
- package/dist/steps-Bg5-KVx1.d.ts.map +0 -1
- package/dist/store-tool-spans-CIX5arAG.js.map +0 -1
- package/dist/store-tool-spans-DdCSPa7C.d.ts.map +0 -1
- package/dist/student-t-DVPW7CdL.js +0 -39
- package/dist/student-t-DVPW7CdL.js.map +0 -1
- package/dist/summary-report-V_JACR4Y.js.map +0 -1
- package/dist/summary-report-bdFDXq0b.d.ts.map +0 -1
- package/dist/task-failure-attributes-hEmASjix.js.map +0 -1
- package/dist/terminal-record-DZyQZ3pz.js.map +0 -1
- package/dist/tool-groups-C3NEcdCM.d.ts.map +0 -1
- package/dist/tool-waste-BKgvd-TP.d.ts.map +0 -1
- package/dist/trajectory-Y1fmdlw7.d.ts +0 -24
- package/dist/trajectory-Y1fmdlw7.d.ts.map +0 -1
- package/dist/tree-C1XYeXvy.js.map +0 -1
- package/dist/types-BqkVmHfv.d.ts.map +0 -1
- package/dist/types-C02qtnG8.d.ts.map +0 -1
- package/dist/types-C1tnkEgM.d.ts.map +0 -1
- package/dist/types-IXD2HJzu.js.map +0 -1
- package/dist/usage-receipt-Cx3xNeyB.js +0 -76
- package/dist/usage-receipt-Cx3xNeyB.js.map +0 -1
- package/dist/verdict-Dl0tiT1X.js.map +0 -1
- package/dist/verdict-cache-Bm8EKL2s.js.map +0 -1
- package/docs/design/self-improvement-evidence-audit.md +0 -263
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { o as TraceEmitter } from "../emitter-HcCmFQl_.js";
|
|
4
|
-
import { i as CounterfactualRunner, t as CounterfactualContext } from "../counterfactual-CPaWN99-.js";
|
|
5
|
-
import { _ as isSubmitOnlyAction, a as RecordedTrajectoryStep, b as unreadableExitCount, c as TIMEOUT_OBSERVATION_MARKER, d as decodeRecordedTurns, f as deriveFailureSignature, g as isSubmitAction, h as isRecordedTimeout, i as RecordedObservationKind, l as assertReplayableTrajectory, m as isElidedField, n as FORMAT_ERROR_OBSERVATION_PREFIX, o as RecordedTrajectoryTurn, p as finalRecordedOutcome, r as RecordedFinalOutcome, s as SUBMIT_ACTION_SIGNATURE, t as DecodedTrajectory, u as classifyObservation, v as parseObservationOutput, y as parseRecordedReturncode } from "../steps-Bg5-KVx1.js";
|
|
1
|
+
import { t as DefaultVerdict } from "../verdict-C24NELtN.js";
|
|
2
|
+
import { a as RecordedTrajectoryTurn, c as finalRecordedOutcome, i as RecordedTrajectoryStep, n as RecordedFinalOutcome, o as classifyObservation, r as RecordedObservationKind, s as decodeRecordedTurns, t as DecodedTrajectory } from "../steps-DlepJPwD.js";
|
|
6
3
|
//#region src/trajectory-replay/corpus.d.ts
|
|
7
4
|
interface CorpusSpec {
|
|
8
5
|
readonly name: string;
|
|
9
6
|
readonly labelsPath: string;
|
|
10
7
|
readonly preparedDir: string;
|
|
11
8
|
}
|
|
12
|
-
/** Parses `name=<labelsPath>::<preparedDir>` (paths may contain `=`, not `::`). */
|
|
13
|
-
export declare function parseCorpusFlag(value: string): CorpusSpec;
|
|
14
9
|
type ReplayExclusionReason = 'no-swe-raw-trajectory' | 'ambiguous-swe-raw-trajectory' | 'unreadable-raw-trajectory' | 'no-docker-image' | 'no-gold-incorrect-step' | 'gold-only-submit-step' | 'missing-steps-json' | 'gold-step-outside-steps' | 'cwd-underivable' | 'no-recorded-returncode-at-k';
|
|
15
10
|
interface ExcludedCase {
|
|
16
11
|
readonly corpus: string;
|
|
@@ -44,13 +39,6 @@ interface ReplayableCase extends CaseResources {
|
|
|
44
39
|
/** Recorded returncode at k; null when the observation carries none. */
|
|
45
40
|
readonly recordedReturncodeAtK: number | null;
|
|
46
41
|
}
|
|
47
|
-
interface LabelEntry {
|
|
48
|
-
readonly traj_id: string;
|
|
49
|
-
readonly incorrect_stages?: readonly {
|
|
50
|
-
readonly incorrect_step_ids?: readonly number[];
|
|
51
|
-
}[];
|
|
52
|
-
}
|
|
53
|
-
export declare function goldIncorrectSteps(entry: LabelEntry): number[];
|
|
54
42
|
type ResourceResolution = {
|
|
55
43
|
readonly resolved: true;
|
|
56
44
|
readonly resources: CaseResources;
|
|
@@ -59,25 +47,11 @@ type ResourceResolution = {
|
|
|
59
47
|
readonly reason: ReplayExclusionReason;
|
|
60
48
|
readonly detail?: string;
|
|
61
49
|
};
|
|
62
|
-
/**
|
|
63
|
-
* Resolves the replay resources for one trajectory, independent of gold
|
|
64
|
-
* labels — the finding wire uses this with a finding-supplied step instead.
|
|
65
|
-
*/
|
|
66
|
-
export declare function resolveCaseResources(corpus: CorpusSpec, trajId: string): ResourceResolution;
|
|
67
50
|
interface EnumerationResult {
|
|
68
51
|
readonly replayable: ReplayableCase[];
|
|
69
52
|
readonly excluded: ExcludedCase[];
|
|
70
53
|
readonly labelEntryCount: number;
|
|
71
54
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Replayable = a raw trajectory with a recorded image AND at least one gold
|
|
74
|
-
* incorrect step that is a real mid-trajectory action. Gold steps whose action
|
|
75
|
-
* is the submit command are skipped when choosing k (counted per case); a case
|
|
76
|
-
* whose golds are ALL submit steps is excluded as gold-only-submit-step.
|
|
77
|
-
* Exclusion reasons are reported in resolution order:
|
|
78
|
-
* raw trajectory → image → gold labels → steps.json → k range → cwd.
|
|
79
|
-
*/
|
|
80
|
-
export declare function enumerateReplayableCases(corpora: readonly CorpusSpec[]): EnumerationResult;
|
|
81
55
|
//#endregion
|
|
82
56
|
//#region src/trajectory-replay/exec.d.ts
|
|
83
57
|
/**
|
|
@@ -106,13 +80,6 @@ interface ReplayExecBackend {
|
|
|
106
80
|
* internally (batch, corpus wire, finding verification) take this instead of
|
|
107
81
|
* a backend, so every case runs against its own image. */
|
|
108
82
|
type ReplayExecBackendFactory = (image: string) => ReplayExecBackend;
|
|
109
|
-
/**
|
|
110
|
-
* mini-SWE runs every action as a fresh /bin/sh subshell from a fixed
|
|
111
|
-
* workdir. Reproduce that exactly — and stay quote-proof for arbitrary
|
|
112
|
-
* recorded actions — by piping the base64 of the action into `sh` after
|
|
113
|
-
* cd-ing to the workdir. Exit code is sh's, i.e. the action's.
|
|
114
|
-
*/
|
|
115
|
-
export declare function wrapActionForExec(action: string, cwd: string): string;
|
|
116
83
|
//#endregion
|
|
117
84
|
//#region src/trajectory-replay/fix.d.ts
|
|
118
85
|
interface ChatUsage {
|
|
@@ -140,12 +107,6 @@ interface FixPromptInput {
|
|
|
140
107
|
/** Steps of context on each side of k (default 3). */
|
|
141
108
|
readonly contextRadius?: number;
|
|
142
109
|
}
|
|
143
|
-
/** Head+tail excerpt with an elision marker; identity below the limit. */
|
|
144
|
-
export declare function clipText(text: string, limit: number): string;
|
|
145
|
-
export declare function buildFixPrompt(input: FixPromptInput): {
|
|
146
|
-
system: string;
|
|
147
|
-
user: string;
|
|
148
|
-
};
|
|
149
110
|
/** One prior attempt of the fix loop, rendered into the retry prompt. */
|
|
150
111
|
interface FailedFixAttempt {
|
|
151
112
|
readonly attempt: number;
|
|
@@ -156,19 +117,6 @@ interface FailedFixAttempt {
|
|
|
156
117
|
readonly stderrTail: string | null;
|
|
157
118
|
readonly llmError: string | null;
|
|
158
119
|
}
|
|
159
|
-
/**
|
|
160
|
-
* Retry prompt for fix-loop attempts ≥2: the original context plus every prior
|
|
161
|
-
* attempt with its REAL executed output, and permission to answer with a short
|
|
162
|
-
* script (the block still executes as one /bin/sh unit).
|
|
163
|
-
*/
|
|
164
|
-
export declare function buildRetryFixPrompt(input: FixPromptInput, priorAttempts: readonly FailedFixAttempt[], maxScriptCommands?: number): {
|
|
165
|
-
system: string;
|
|
166
|
-
user: string;
|
|
167
|
-
};
|
|
168
|
-
/** Non-empty, non-comment lines of a fix script — the loop's script-size cap. */
|
|
169
|
-
export declare function countScriptCommands(script: string): number;
|
|
170
|
-
/** Last fenced code block, else the whole trimmed content; null when empty. */
|
|
171
|
-
export declare function extractFixCommand(content: string): string | null;
|
|
172
120
|
type FixGenerationOutcome = {
|
|
173
121
|
readonly succeeded: true;
|
|
174
122
|
readonly value: {
|
|
@@ -179,7 +127,6 @@ type FixGenerationOutcome = {
|
|
|
179
127
|
readonly succeeded: false;
|
|
180
128
|
readonly error: string;
|
|
181
129
|
};
|
|
182
|
-
export declare function generateFixCommand(caller: ChatCompletionCaller, input: FixPromptInput): Promise<FixGenerationOutcome>;
|
|
183
130
|
//#endregion
|
|
184
131
|
//#region src/trajectory-replay/fix-loop.d.ts
|
|
185
132
|
/** Result of executing one corrected command as a full arm. */
|
|
@@ -240,7 +187,6 @@ interface FixLoopResult {
|
|
|
240
187
|
* bound rather than a measurement. */
|
|
241
188
|
readonly callsWithoutUsage: number;
|
|
242
189
|
}
|
|
243
|
-
export declare function runFixLoop(caller: ChatCompletionCaller, input: FixPromptInput, executor: FixArmExecutor, options: FixLoopOptions): Promise<FixLoopResult>;
|
|
244
190
|
//#endregion
|
|
245
191
|
//#region src/trajectory-replay/image-preparer.d.ts
|
|
246
192
|
/**
|
|
@@ -270,7 +216,6 @@ interface DockerImagePreparerOptions {
|
|
|
270
216
|
readonly pullTimeoutMs?: number;
|
|
271
217
|
readonly buildTimeoutMs?: number;
|
|
272
218
|
}
|
|
273
|
-
export declare function derivedImageTag(image: string, cwd: string): string;
|
|
274
219
|
/**
|
|
275
220
|
* Pulls the base image when absent and builds `FROM <base>; RUN chown -R
|
|
276
221
|
* 1000:1000 <cwd>` tagged by content hash, so repeated batches reuse both
|
|
@@ -462,12 +407,6 @@ interface IngestedTrajectory {
|
|
|
462
407
|
runId: string;
|
|
463
408
|
stepCount: number;
|
|
464
409
|
}
|
|
465
|
-
/**
|
|
466
|
-
* Emit one tool span per trajectory step, in order, with a monotonic
|
|
467
|
-
* injected clock so `buildTrajectory` ordering is deterministic even when
|
|
468
|
-
* two spans would share a Date.now() millisecond.
|
|
469
|
-
*/
|
|
470
|
-
export declare function ingestRecordedTrajectory(store: TraceStore, steps: readonly RecordedTrajectoryStep[], caseId: string): Promise<IngestedTrajectory>;
|
|
471
410
|
/** Why a replayed prefix step failed to confirm the recording. */
|
|
472
411
|
type PrefixDivergenceKind =
|
|
473
412
|
/** The recording carries a returncode and the replayed exit differs from it. */
|
|
@@ -499,13 +438,6 @@ interface PrefixReplayResult {
|
|
|
499
438
|
/** Admission tolerance: a prefix replay is faithful enough to build a verdict
|
|
500
439
|
* on when at most this percentage of its executed steps diverged. */
|
|
501
440
|
export declare const PREFIX_DIVERGENCE_TOLERANCE_PCT = 10;
|
|
502
|
-
/**
|
|
503
|
-
* Compare one replayed prefix step against its recording. Returns null only
|
|
504
|
-
* when the recording positively confirms the replay.
|
|
505
|
-
*/
|
|
506
|
-
export declare function classifyPrefixStep(step: number, expectedReturncode: number | null, actualExit: number): PrefixDivergence | null;
|
|
507
|
-
/** Roll per-step classifications up into the rate the admission pre-pass gates on. */
|
|
508
|
-
export declare function summarizePrefixReplay(prefixExecuted: number, prefixDivergences: PrefixDivergence[], wallMs: number): PrefixReplayResult;
|
|
509
441
|
interface ArmExecutionResult {
|
|
510
442
|
command: string;
|
|
511
443
|
exitCode: number;
|
|
@@ -521,20 +453,6 @@ interface SandboxCounterfactualRunnerOptions {
|
|
|
521
453
|
prefixLimit?: number;
|
|
522
454
|
onProgress?: (message: string) => void;
|
|
523
455
|
}
|
|
524
|
-
/**
|
|
525
|
-
* Replays `ctx.prefix` in a fresh session, then executes the mutated step.
|
|
526
|
-
* Divergences are recorded and never abort the replay. Results land on
|
|
527
|
-
* `lastPrefix` / `lastArm` for the caller; spans for every exec land in the
|
|
528
|
-
* counterfactual meta-run.
|
|
529
|
-
*/
|
|
530
|
-
export declare class SandboxCounterfactualRunner implements CounterfactualRunner {
|
|
531
|
-
private readonly backend;
|
|
532
|
-
private readonly options;
|
|
533
|
-
lastPrefix: PrefixReplayResult | null;
|
|
534
|
-
lastArm: ArmExecutionResult | null;
|
|
535
|
-
constructor(backend: ReplayExecBackend, options: SandboxCounterfactualRunnerOptions);
|
|
536
|
-
executeFrom(ctx: CounterfactualContext, emitter: TraceEmitter): Promise<void>;
|
|
537
|
-
}
|
|
538
456
|
interface ReplayVerifyOptions {
|
|
539
457
|
stepsPath: string;
|
|
540
458
|
image: string;
|
|
@@ -617,15 +535,6 @@ interface VerifiableFinding {
|
|
|
617
535
|
}[];
|
|
618
536
|
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
619
537
|
}
|
|
620
|
-
/**
|
|
621
|
-
* 1-based step the finding accuses, or null when the finding names none.
|
|
622
|
-
* `metadata.block_first_step` wins over the subject: the analyst records the
|
|
623
|
-
* block's first incorrect step there even when the subject names a later
|
|
624
|
-
* step of the same block.
|
|
625
|
-
*/
|
|
626
|
-
export declare function findingReplayStep(finding: VerifiableFinding): number | null;
|
|
627
|
-
/** Trajectory id from the finding's `trace://<traj>/…` evidence refs, or null. */
|
|
628
|
-
export declare function findingTrajectoryId(finding: VerifiableFinding): string | null;
|
|
629
538
|
/**
|
|
630
539
|
* Where the executable trajectory lives.
|
|
631
540
|
* `direct` — one trajectory's steps.json plus a replay-ready image; the
|
|
@@ -664,12 +573,6 @@ type FindingReplayability = {
|
|
|
664
573
|
readonly replayable: false;
|
|
665
574
|
readonly reason: string;
|
|
666
575
|
};
|
|
667
|
-
/**
|
|
668
|
-
* Decides whether one finding can be executed against the source, and with
|
|
669
|
-
* what invocation. Never throws for a finding-shaped problem — every dead end
|
|
670
|
-
* becomes a `not-replayable` reason the receipt can carry verbatim.
|
|
671
|
-
*/
|
|
672
|
-
export declare function resolveFindingReplayability(finding: VerifiableFinding, source: FindingReplaySource): FindingReplayability;
|
|
673
576
|
type FindingVerificationStatus = 'reproduced' | 'fix-flipped' | 'not-replayable' | 'divergent';
|
|
674
577
|
interface FindingVerification {
|
|
675
578
|
readonly finding_id: string | null;
|
|
@@ -728,14 +631,6 @@ export declare function classifyVerdict(verdict: ReplayVerdict): FindingVerifica
|
|
|
728
631
|
* run-level verifications.json.
|
|
729
632
|
*/
|
|
730
633
|
export declare function verifyFindings(findings: readonly VerifiableFinding[], options: VerifyFindingsOptions): Promise<VerifyFindingsRun>;
|
|
731
|
-
/** Markdown section an analysis report appends when finding verification ran. */
|
|
732
|
-
export declare function renderVerifiedFindingsSection(run: VerifyFindingsRun): string;
|
|
733
|
-
/**
|
|
734
|
-
* Accepts the two shapes findings travel in: a bare JSON array of analyst
|
|
735
|
-
* findings, or an object with a `findings` array (e.g. an extracted
|
|
736
|
-
* `observations[n]` from a result.json).
|
|
737
|
-
*/
|
|
738
|
-
export declare function readFindingsFile(path: string): VerifiableFinding[];
|
|
739
634
|
//#endregion
|
|
740
635
|
//#region src/trajectory-replay/wire.d.ts
|
|
741
636
|
interface IncorrectStepsSubject {
|
|
@@ -744,8 +639,6 @@ interface IncorrectStepsSubject {
|
|
|
744
639
|
readonly escapeStatus: 'escaped' | 'unescaped';
|
|
745
640
|
readonly consequenceStep: number;
|
|
746
641
|
}
|
|
747
|
-
/** Null when the subject is not an incorrect-steps finding subject. */
|
|
748
|
-
export declare function parseIncorrectStepsSubject(subject: string): IncorrectStepsSubject | null;
|
|
749
642
|
interface AnalystReplayFinding {
|
|
750
643
|
readonly trajId: string;
|
|
751
644
|
readonly subject: string;
|
|
@@ -756,13 +649,6 @@ interface ResolvedReplayInvocation {
|
|
|
756
649
|
/** 1-based step_id arm A executes: the finding's first incorrect step. */
|
|
757
650
|
readonly at: number;
|
|
758
651
|
}
|
|
759
|
-
/**
|
|
760
|
-
* Maps a finding onto replay resources, searching the given corpora for the
|
|
761
|
-
* trajectory. Throws with the precise reason when the finding cannot be
|
|
762
|
-
* replayed (malformed subject, unknown trajectory, non-replayable case, step
|
|
763
|
-
* out of range) — the caller surfaces that reason instead of a proof.
|
|
764
|
-
*/
|
|
765
|
-
export declare function resolveFindingInvocation(finding: AnalystReplayFinding, corpora: readonly CorpusSpec[]): ResolvedReplayInvocation;
|
|
766
652
|
interface ReplayFindingOptions {
|
|
767
653
|
readonly corpora: readonly CorpusSpec[];
|
|
768
654
|
readonly out: string;
|
|
@@ -788,5 +674,5 @@ interface ReplayFindingResult {
|
|
|
788
674
|
*/
|
|
789
675
|
export declare function replayVerifyFinding(finding: AnalystReplayFinding, options: ReplayFindingOptions): Promise<ReplayFindingResult>;
|
|
790
676
|
//#endregion
|
|
791
|
-
export { type AnalystReplayFinding, type ArmExecutionResult, type CaseResources, type ChatCompletionCaller, type ChatOutcome, type ChatUsage, type CorpusSpec, type CwdSource, type DecodedTrajectory, type DockerImagePreparerOptions, type EnumerationResult, type ExcludedCase,
|
|
677
|
+
export { type AnalystReplayFinding, type ArmExecutionResult, type CaseResources, type ChatCompletionCaller, type ChatOutcome, type ChatUsage, type CorpusSpec, type CwdSource, type DecodedTrajectory, type DockerImagePreparerOptions, type EnumerationResult, type ExcludedCase, type FailedFixAttempt, type FindingReplaySource, type FindingReplayability, type FindingVerification, type FindingVerificationStatus, type FixArmExecution, type FixArmExecutor, type FixGenerationOutcome, type FixLoopAttemptRecord, type FixLoopOptions, type FixLoopResult, type FixPromptInput, type ImagePreparation, type ImagePreparer, type IncorrectStepsSubject, type IngestedTrajectory, type PrefixDivergence, type PrefixDivergenceKind, type PrefixReplayResult, type RecordedFinalOutcome, type RecordedObservationKind, type RecordedTrajectoryStep, type RecordedTrajectoryTurn, type ReplayArmVerdict, type ReplayBatchCaseRow, type ReplayBatchFixResult, type ReplayBatchOptions, type ReplayBatchReport, type ReplayExclusionReason, type ReplayExecBackend, type ReplayExecBackendFactory, type ReplayExecResult, type ReplayExecSession, type ReplayFindingOptions, type ReplayFindingResult, type ReplayVerdict, type ReplayVerifyOptions, type ReplayableCase, type ResolvedFindingReplay, type ResolvedReplayInvocation, type ResourceResolution, type SandboxCounterfactualRunnerOptions, type VerifiableFinding, type VerifyFindingsOptions, type VerifyFindingsRun, classifyObservation, decodeRecordedTurns, finalRecordedOutcome };
|
|
792
678
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/trajectory-replay/corpus.ts","../../src/trajectory-replay/exec.ts","../../src/trajectory-replay/fix.ts","../../src/trajectory-replay/fix-loop.ts","../../src/trajectory-replay/image-preparer.ts","../../src/trajectory-replay/batch.ts","../../src/trajectory-replay/verify.ts","../../src/trajectory-replay/findings.ts","../../src/trajectory-replay/wire.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/trajectory-replay/corpus.ts","../../src/trajectory-replay/exec.ts","../../src/trajectory-replay/fix.ts","../../src/trajectory-replay/fix-loop.ts","../../src/trajectory-replay/image-preparer.ts","../../src/trajectory-replay/batch.ts","../../src/trajectory-replay/verify.ts","../../src/trajectory-replay/findings.ts","../../src/trajectory-replay/wire.ts"],"mappings":";;;UAyBiB;WACN;WACA;WACA;;KAgBC;UAYK;WACN;WACA;WACA,QAAQ;WACR;;KAGC;;UAGK;WACN;WACA;WACA;WACA,gBAAgB;WAChB;WACA;WACA;WACA,WAAW;;WAEX;;UAGM,uBAAuB;;WAE7B;;;;WAIA;;WAEA;;WAEA;;KA0EC;WACG;WAAyB,WAAW;;WACpC;WAA0B,QAAQ;WAAgC;;UAuEhE;WACN,YAAY;WACZ,UAAU;WACV;;;;;;;;;;;;;UCrOM;EACf;EACA;EACA;;UAGe;EACf,KAAK,iBAAiB,oBAAoB,QAAQ;EAClD,SAAS;;UAGM;;EAEf,QAAQ,QAAQ;;;;;KAMN,4BAA4B,kBAAkB;;;UCbzC;WACN;WACA;;KAGC;WACG;WAA0B;IAAS;IAAiB,OAAO;;;WAC3D;WAA2B;;UAEzB;EACf,SAAS,gBAAgB,eAAe,QAAQ;;UAGjC;WACN;WACA,gBAAgB;;WAEhB;;WAEA;;;UA4DM;WACN;;WAEA;WACA;WACA;WACA;WACA;;KAsEC;WACG;WAA0B;IAAS;IAAiB,OAAO;;;WAC3D;WAA2B;;;;;UClJzB;WACN;WACA;WACA;;WAEA;WACA;WACA;WACA;;;KAIC,kBAAkB,iBAAiB,oBAAoB,QAAQ;UAE1D;;WAEN;;WAEA;;WAEA;WACA,cAAc;;UAGR;WACN;WACA;WACA;WACA;aAAkB;aAA+B;;WACjD;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA,mBAAmB;;WAEnB;WACA;;;WAGA;WACA;WACA;;;;WAIA;;;;;;;;;;;;;KCjEC;WAEG;WACA;IAAS;IAAsB;IAAiB;;;WAEhD;WAA2B;;UAEzB;EACf,OAAO,eAAe,cAAc,QAAQ;;UAG7B;WACN;WACA;;;;;;;;wBAcK,oBAAoB,UAAS,6BAAkC;;;UCQ9D;WACN,kBAAkB;WAClB;;;;WAIA;;WAEA;WACA,YAAY;WACZ;;WAEA;WACA;;WAEA;WACA;;WAEA;;WAEA;;WAEA,WAAW;;WAEX,gBAAgB;WAChB,cAAc;;UAGR;;WAEN;WACA;WACA;WACA;;;WAGA,OAAO;WACP;WACA;WACA;WACA;WACA;WACA;;WAEA,mBAAmB;;;WAGnB;;UAGM;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;;;WAGA;WACA;WACA;WACA;;;WAGA;WACA,KAAK;WACL;;UAGM;WACN;WACA;IAAoB;IAAc;IAAoB;;WACtD;aACE;aACA;aACA;aACA,kBAAkB;;;aAGlB,qBAAqB;MAE1B;MAAyB;;;WAGtB;aACE;MAAqB;MAAmB;MAAqB;;aAC7D;MAAuB;MAAmB;MAAqB;;;;;aAI/D;eACE;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;;aAEF;MAAe;MAAmB;MAAqB;;;aAEvD;MACP;MACA;MACA;;;;aAIO;MACP;MACA;MACA;;;aAGO,gBAAgB;;WAElB;aACE;aACA;aACA;aACA;aACA;;;;aAIA;;WAEF;IAAqB;IAAgB;IAAgB;IAAgB;;WACrE;IAAyB;IAAgB;IAAgB;IAAe;;WACxE,gBAAgB;;wBAGX,aAAa,GAAG,gBAAgB,KAAK,cAAc,eAAe,IAAI;wBAkFhE,eAAe,SAAS,qBAAqB,QAAQ;;;UC1O1D;EACf;EACA;;;KAyCU;;;;;UAMK;EACf;EACA,MAAM;;EAEN;EACA;;UAGe;EACf;;EAEA,mBAAmB;;EAEnB;EACA;EACA;;;EAGA;;EAEA;EACA;;;;qBAKW;UAiDI;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;;;EAGA;EACA,cAAc;;UAwGC;EACf;EACA;;EAEA;;EAEA;EACA;EACA;EACA;;EAEA;EACA;EACA;;EAEA;;EAEA,SAAS;EACT,cAAc;;UAGC;EACf;EACA;EACA;EACA,QAAQ;;;;;;;;UASO,sBAAsB;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,mBAAmB;;EAEnB;EACA;EACA;EACA;EACA;EACA,MAAM;IAAqB;;EAC3B,OAAO;IAAqB;;EAC5B;IAAW;IAAgB;IAAuB;;EAClD;IAAU;IAAkB;IAAc;;;wBAUtB,aAAa,SAAS,sBAAsB,QAAQ;;;UC5TzD;WACN;WACA;WACA;WACA;WACA;WACA;aACE;aACA;aACA;;WAEF,WAAW,SAAS;;;;;;;;;;;KA+CnB;WAEG;WACA;WACA;WACA;WACA;;WAGA;WACA,kBAAkB;WAClB,WAAW;;UAGT;WACN;WACA;;WAEA;WACA;;WAEA;WACA;WACA;;KAGC;WACG;WAA2B,UAAU;;WACrC;WAA4B;;KAuH/B;UAMK;WACN;WACA;WACA;;WAEA;WACA,UAAU;;WAEV;;WAEA;WACA;;WAEA;;;;;;;;UASM,0BAA0B;WAChC;WACA,wBAAwB;WACxB,QAAQ,SAAS,OAAO;;WAExB;;UAGM;WACN,QAAQ;;WAER;;WAEA;WACA;WACA;;WAEA,gBAAgB;;;WAGhB,kBAAkB;WAClB,cAAc;;;;;;;;wBAST,gBAAgB,SAAS,gBAAgB;;;;;;;wBAyGnC,eACpB,mBAAmB,qBACnB,SAAS,wBACR,QAAQ;;;UC5YM;WACN;WACA;WACA;WACA;;UAiBM;WACN;WACA;;UAGM;WACN,WAAW;WACX,SAAS;;WAET;;UAmDM;WACN,kBAAkB;WAClB;;WAEA,YAAY;;WAEZ;WACA;WACA;;WAEA,gBAAgB;WAChB,cAAc;;UAGR;WACN,YAAY;WACZ;WACA,SAAS;;;;;;;wBAQE,oBACpB,SAAS,sBACT,SAAS,uBACR,QAAQ"}
|
|
@@ -1,16 +1,109 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
1
|
+
import { o as NotFoundError, s as ValidationError } from "../errors-BcOs5MKW.js";
|
|
2
|
+
import { t as mulberry32 } from "../random-DDDcC7YU.js";
|
|
3
|
+
import { t as certificationEvidenceDigest } from "../verdict-BGQmxQ8A.js";
|
|
3
4
|
import { t as TraceEmitter } from "../emitter-DbMXUIVP.js";
|
|
4
|
-
import { t as runCounterfactual } from "../counterfactual-Dn3veueY.js";
|
|
5
5
|
import { n as InMemoryTraceStore } from "../store-BhNuLdJw.js";
|
|
6
6
|
import { t as packageVersion } from "../package-version-D7lQHt_-.js";
|
|
7
|
-
import {
|
|
7
|
+
import { t as buildTrajectory } from "../trajectory-D_7rLrvE.js";
|
|
8
|
+
import { a as classifyObservation, c as finalRecordedOutcome, d as isSubmitOnlyAction, f as parseObservationOutput, o as decodeRecordedTurns, p as parseRecordedReturncode, s as deriveFailureSignature, t as wrapActionForExec, u as isSubmitAction } from "../exec-CpbtOXVt.js";
|
|
8
9
|
import { createHash } from "node:crypto";
|
|
9
10
|
import { appendFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
10
11
|
import { join } from "node:path";
|
|
11
12
|
import { tmpdir } from "node:os";
|
|
12
13
|
import { execFile } from "node:child_process";
|
|
13
14
|
import { promisify } from "node:util";
|
|
15
|
+
//#region src/counterfactual.ts
|
|
16
|
+
/**
|
|
17
|
+
* Counterfactual replay — "what would have happened if we'd changed
|
|
18
|
+
* exactly one thing at turn N?"
|
|
19
|
+
*
|
|
20
|
+
* The framework does NOT drive the agent — it sets up the replay
|
|
21
|
+
* context (prior spans, prior state, mutation spec) and records the
|
|
22
|
+
* resulting divergence. Consumers supply an `executeFrom(ctx)` callback
|
|
23
|
+
* that runs their agent starting from turn N with the mutation applied.
|
|
24
|
+
*
|
|
25
|
+
* Counterfactual runs are recorded as a new Run with `layer='meta'` and
|
|
26
|
+
* `parentRunId = originalRunId`, so downstream diff + correlation
|
|
27
|
+
* pipelines see them natively.
|
|
28
|
+
*/
|
|
29
|
+
async function runCounterfactual(store, originalRunId, mutation, runner) {
|
|
30
|
+
const originalRun = await store.getRun(originalRunId);
|
|
31
|
+
if (!originalRun) throw new NotFoundError(`counterfactual: run ${originalRunId} not found`);
|
|
32
|
+
const trajectory = await buildTrajectory(store, originalRunId);
|
|
33
|
+
if (mutation.at < 0 || mutation.at >= trajectory.steps.length) throw new ValidationError(`counterfactual: mutation.at=${mutation.at} out of range [0, ${trajectory.steps.length})`);
|
|
34
|
+
const targetStep = trajectory.steps[mutation.at];
|
|
35
|
+
const mutatedStep = applyMutation(targetStep, mutation);
|
|
36
|
+
const cfEmitter = new TraceEmitter(store);
|
|
37
|
+
await cfEmitter.startRun({
|
|
38
|
+
scenarioId: originalRun.scenarioId,
|
|
39
|
+
variantId: originalRun.variantId ? `${originalRun.variantId}+cf:${mutation.kind}@${mutation.at}` : `cf:${mutation.kind}@${mutation.at}`,
|
|
40
|
+
projectId: originalRun.projectId,
|
|
41
|
+
parentRunId: originalRunId,
|
|
42
|
+
layer: "meta",
|
|
43
|
+
tags: {
|
|
44
|
+
counterfactual: "true",
|
|
45
|
+
mutationKind: mutation.kind,
|
|
46
|
+
mutationAt: String(mutation.at)
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
await runner.executeFrom({
|
|
50
|
+
originalRunId,
|
|
51
|
+
originalTrajectory: trajectory,
|
|
52
|
+
prefix: trajectory.steps.slice(0, mutation.at),
|
|
53
|
+
mutation,
|
|
54
|
+
mutatedStep
|
|
55
|
+
}, cfEmitter);
|
|
56
|
+
const counterfactual = await store.getRun(cfEmitter.runId);
|
|
57
|
+
const delta = {
|
|
58
|
+
originalOutcomeScore: originalRun.outcome?.score ?? null,
|
|
59
|
+
counterfactualOutcomeScore: counterfactual?.outcome?.score ?? null,
|
|
60
|
+
deltaScore: originalRun.outcome?.score !== void 0 && counterfactual?.outcome?.score !== void 0 ? counterfactual.outcome.score - originalRun.outcome.score : null
|
|
61
|
+
};
|
|
62
|
+
return {
|
|
63
|
+
counterfactualRunId: cfEmitter.runId,
|
|
64
|
+
originalRunId,
|
|
65
|
+
mutation,
|
|
66
|
+
delta
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function applyMutation(step, mutation) {
|
|
70
|
+
if (mutation.kind === "swap-model" && step.span.kind === "llm") {
|
|
71
|
+
const llm = step.span;
|
|
72
|
+
return {
|
|
73
|
+
...step,
|
|
74
|
+
span: {
|
|
75
|
+
...llm,
|
|
76
|
+
model: mutation.newModel
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
if (mutation.kind === "swap-tool-result" && step.span.kind === "tool") {
|
|
81
|
+
const tool = step.span;
|
|
82
|
+
return {
|
|
83
|
+
...step,
|
|
84
|
+
span: {
|
|
85
|
+
...tool,
|
|
86
|
+
result: mutation.newResult
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
if (mutation.kind === "inject-system-message" && step.span.kind === "llm") {
|
|
91
|
+
const llm = step.span;
|
|
92
|
+
return {
|
|
93
|
+
...step,
|
|
94
|
+
span: {
|
|
95
|
+
...llm,
|
|
96
|
+
messages: [{
|
|
97
|
+
role: "system",
|
|
98
|
+
content: mutation.content
|
|
99
|
+
}, ...llm.messages]
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
if (mutation.kind === "custom") return mutation.apply(step);
|
|
104
|
+
return step;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
14
107
|
//#region src/trajectory-replay/corpus.ts
|
|
15
108
|
/**
|
|
16
109
|
* Corpus enumeration for batch replay verification.
|
|
@@ -27,20 +120,6 @@ import { promisify } from "node:util";
|
|
|
27
120
|
* is returned with a machine-readable reason — the batch report surfaces the
|
|
28
121
|
* full exclusion table, never a silently shrunk denominator.
|
|
29
122
|
*/
|
|
30
|
-
/** Parses `name=<labelsPath>::<preparedDir>` (paths may contain `=`, not `::`). */
|
|
31
|
-
function parseCorpusFlag(value) {
|
|
32
|
-
const eq = value.indexOf("=");
|
|
33
|
-
if (eq <= 0) throw new Error(`--corpus must be name=<labels>::<prepared>, got: ${value}`);
|
|
34
|
-
const name = value.slice(0, eq);
|
|
35
|
-
const rest = value.slice(eq + 1);
|
|
36
|
-
const sep = rest.indexOf("::");
|
|
37
|
-
if (sep <= 0 || sep === rest.length - 2) throw new Error(`--corpus must be name=<labels>::<prepared>, got: ${value}`);
|
|
38
|
-
return {
|
|
39
|
-
name,
|
|
40
|
-
labelsPath: rest.slice(0, sep),
|
|
41
|
-
preparedDir: rest.slice(sep + 2)
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
123
|
function readLabelEntries(labelsPath) {
|
|
45
124
|
const parsed = JSON.parse(readFileSync(labelsPath, "utf8"));
|
|
46
125
|
if (!Array.isArray(parsed)) throw new Error(`${labelsPath} is not a JSON array of label entries`);
|
|
@@ -2116,44 +2195,7 @@ async function verifyFindings(findings, options) {
|
|
|
2116
2195
|
}, null, 2)}\n`);
|
|
2117
2196
|
return run;
|
|
2118
2197
|
}
|
|
2119
|
-
function verdictCell(verification) {
|
|
2120
|
-
switch (verification.verified) {
|
|
2121
|
-
case "reproduced": return "**VERIFIED** — reproduced";
|
|
2122
|
-
case "fix-flipped": return "**VERIFIED** — fix-flipped";
|
|
2123
|
-
case "divergent": return "DIVERGENT — recorded failure did not reproduce";
|
|
2124
|
-
case "not-replayable": return `UNVERIFIABLE — ${verification.reason ?? "no reason recorded"}`;
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
/** Markdown section an analysis report appends when finding verification ran. */
|
|
2128
|
-
function renderVerifiedFindingsSection(run) {
|
|
2129
|
-
const lines = ["## Verified findings (executed replay)", ""];
|
|
2130
|
-
const total = run.verifications.length;
|
|
2131
|
-
lines.push(`${total} finding(s) → ${run.counts.reproduced} reproduced, ${run.counts["fix-flipped"]} fix-flipped, ${run.counts.divergent} divergent, ${run.counts["not-replayable"]} not replayable (${run.executions} execution(s); findings accusing the same step share one proof).`);
|
|
2132
|
-
lines.push("");
|
|
2133
|
-
lines.push("| Finding | Subject | Step | Verdict | Receipt |");
|
|
2134
|
-
lines.push("|---|---|---:|---|---|");
|
|
2135
|
-
for (const verification of run.verifications) {
|
|
2136
|
-
const shared = verification.deduplicated_with ? " (shared proof)" : "";
|
|
2137
|
-
lines.push(`| \`${verification.finding_id ?? "—"}\` | \`${verification.subject ?? "—"}\` | ${verification.step ?? "—"} | ${verdictCell(verification)} | \`${verification.receipt}\`${shared} |`);
|
|
2138
|
-
}
|
|
2139
|
-
lines.push("");
|
|
2140
|
-
lines.push("VERIFIED = the accused step was re-executed after replaying the trajectory prefix, and the recorded failure signature reproduced (fix-flipped: a corrected command additionally made it vanish). Each receipt directory carries receipt.json and, when executed, replay-verdict.json + report.md with real stdout/stderr.");
|
|
2141
|
-
lines.push("");
|
|
2142
|
-
return lines.join("\n");
|
|
2143
|
-
}
|
|
2144
|
-
/**
|
|
2145
|
-
* Accepts the two shapes findings travel in: a bare JSON array of analyst
|
|
2146
|
-
* findings, or an object with a `findings` array (e.g. an extracted
|
|
2147
|
-
* `observations[n]` from a result.json).
|
|
2148
|
-
*/
|
|
2149
|
-
function readFindingsFile(path) {
|
|
2150
|
-
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
2151
|
-
const array = Array.isArray(parsed) ? parsed : parsed && typeof parsed === "object" && Array.isArray(parsed.findings) ? parsed.findings : null;
|
|
2152
|
-
if (!array) throw new Error(`${path} is neither a findings array nor an object with a findings array`);
|
|
2153
|
-
for (const entry of array) if (!entry || typeof entry !== "object") throw new Error(`${path}: every finding must be an object, got ${JSON.stringify(entry)}`);
|
|
2154
|
-
return array;
|
|
2155
|
-
}
|
|
2156
2198
|
//#endregion
|
|
2157
|
-
export {
|
|
2199
|
+
export { PREFIX_DIVERGENCE_TOLERANCE_PCT, classifyObservation, classifyVerdict, decodeRecordedTurns, dockerImagePreparer, finalRecordedOutcome, replayVerify, replayVerifyFinding, runReplayBatch, seededSample, verifyFindings };
|
|
2158
2200
|
|
|
2159
2201
|
//# sourceMappingURL=index.js.map
|