@tangle-network/agent-eval 0.221.7 → 0.222.0
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 +146 -0
- package/dist/adapters/http.d.ts +3 -5
- package/dist/adapters/http.d.ts.map +1 -1
- package/dist/adapters/http.js +1 -2
- package/dist/{adversarial-smnADNFS.d.ts → adversarial-DnQQFqTR.d.ts} +1 -3
- package/dist/adversarial-DnQQFqTR.d.ts.map +1 -0
- package/dist/{agent-profile-CNmwfaqq.d.ts → agent-profile-CoD1Dotf.d.ts} +4 -10
- package/dist/agent-profile-CoD1Dotf.d.ts.map +1 -0
- package/dist/agent-profile-Dngk3LZ0.js +153 -0
- package/dist/agent-profile-Dngk3LZ0.js.map +1 -0
- package/dist/{agent-profile-cell-BcpFbNd5.d.ts → agent-profile-cell-3kYxUsK2.d.ts} +3 -5
- package/dist/agent-profile-cell-3kYxUsK2.d.ts.map +1 -0
- package/dist/{agent-profile-cell-B1V1gUZs.js → agent-profile-cell-CT5JYueM.js} +5 -7
- package/dist/{agent-profile-cell-B1V1gUZs.js.map → agent-profile-cell-CT5JYueM.js.map} +1 -1
- package/dist/{agreement-irr-BhAqjluA.js → agreement-irr-BTjDN0i6.js} +4 -5
- package/dist/{agreement-irr-BhAqjluA.js.map → agreement-irr-BTjDN0i6.js.map} +1 -1
- package/dist/analyst/index.d.ts +95 -159
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +28 -39
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-DfX6dHP0.d.ts → analyze-runs-C-pP1sK9.d.ts} +7 -13
- package/dist/analyze-runs-C-pP1sK9.d.ts.map +1 -0
- package/dist/{analyze-runs-CHmsykNJ.js → analyze-runs-CTheASYV.js} +23 -32
- package/dist/{analyze-runs-CHmsykNJ.js.map → analyze-runs-CTheASYV.js.map} +1 -1
- package/dist/{attribute-vocabulary-CcXqHODT.d.ts → attribute-vocabulary-5oo8ykIx.d.ts} +2 -4
- package/dist/attribute-vocabulary-5oo8ykIx.d.ts.map +1 -0
- package/dist/authenticity/index.d.ts +0 -2
- package/dist/authenticity/index.d.ts.map +1 -1
- package/dist/authenticity/index.js +1 -2
- package/dist/{benchmark-command-Cnjfo0Zh.js → benchmark-command-jYWR2gya.js} +61 -94
- package/dist/benchmark-command-jYWR2gya.js.map +1 -0
- package/dist/benchmarks/index.d.ts +5 -15
- package/dist/benchmarks/index.d.ts.map +1 -1
- package/dist/benchmarks/index.js +27 -38
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/{bounded-process-Cj9YjXbE.js → bounded-process-BZrWXIKW.js} +2 -3
- package/dist/{bounded-process-Cj9YjXbE.js.map → bounded-process-BZrWXIKW.js.map} +1 -1
- package/dist/builder-eval/index.d.ts +5 -14
- package/dist/builder-eval/index.d.ts.map +1 -1
- package/dist/builder-eval/index.js +11 -17
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/{calibration-CTwxpJ-t.js → calibration-6usfVYYo.js} +4 -5
- package/dist/{calibration-CTwxpJ-t.js.map → calibration-6usfVYYo.js.map} +1 -1
- package/dist/campaign/index.d.ts +9 -9
- package/dist/campaign/index.js +15 -14
- package/dist/{campaign-uddTlFg5.js → campaign-ddr1N3yD.js} +61 -58
- package/dist/campaign-ddr1N3yD.js.map +1 -0
- package/dist/{campaign-evidence-DunzcJGv.js → campaign-evidence-DN8rWuBj.js} +20 -322
- package/dist/campaign-evidence-DN8rWuBj.js.map +1 -0
- package/dist/{canonical-Dq2hOQ8L.js → canonical-CicJlINA.js} +3 -4
- package/dist/{canonical-Dq2hOQ8L.js.map → canonical-CicJlINA.js.map} +1 -1
- package/dist/{canonical-CFpojCN5.d.ts → canonical-gLeHiqzd.d.ts} +2 -4
- package/dist/canonical-gLeHiqzd.d.ts.map +1 -0
- package/dist/{cell-spend-DEWR3nj-.js → cell-spend-zxmzg4GH.js} +3 -4
- package/dist/{cell-spend-DEWR3nj-.js.map → cell-spend-zxmzg4GH.js.map} +1 -1
- package/dist/{chat-client-BNATB3rJ.js → chat-client-CO3uB33i.js} +3 -4
- package/dist/{chat-client-BNATB3rJ.js.map → chat-client-CO3uB33i.js.map} +1 -1
- package/dist/{chat-json-call-BzWYp18J.js → chat-json-call-8yUv4LFO.js} +4 -5
- package/dist/{chat-json-call-BzWYp18J.js.map → chat-json-call-8yUv4LFO.js.map} +1 -1
- package/dist/{claim-BPVuyHuy.js → claim-Dod_mjk3.js} +5 -6
- package/dist/{claim-BPVuyHuy.js.map → claim-Dod_mjk3.js.map} +1 -1
- package/dist/cli.js +179 -23
- package/dist/cli.js.map +1 -1
- package/dist/{client-hwo3cJjR.d.ts → client-BIFwUg7I.d.ts} +6 -12
- package/dist/client-BIFwUg7I.d.ts.map +1 -0
- package/dist/{cluster-bootstrap-DEwwhl0C.js → cluster-bootstrap-SbaeM44s.js} +4 -5
- package/dist/{cluster-bootstrap-DEwwhl0C.js.map → cluster-bootstrap-SbaeM44s.js.map} +1 -1
- package/dist/completion-verifier-7KEfroqx.d.ts +168 -0
- package/dist/completion-verifier-7KEfroqx.d.ts.map +1 -0
- package/dist/{completion-verifier-asaV1nSj.js → completion-verifier-rqbMh5-4.js} +9 -160
- package/dist/completion-verifier-rqbMh5-4.js.map +1 -0
- package/dist/contract/index.d.ts +13 -13
- package/dist/contract/index.js +41 -60
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-BGZB6yY2.js → cost-ledger-CS8R3IZj.js} +10 -17
- package/dist/{cost-ledger-BGZB6yY2.js.map → cost-ledger-CS8R3IZj.js.map} +1 -1
- package/dist/{cost-ledger-C1W3ICmP.d.ts → cost-ledger-Czro9wmo.d.ts} +1 -5
- package/dist/cost-ledger-Czro9wmo.d.ts.map +1 -0
- package/dist/{dataset-DQqhOCPt.d.ts → dataset-DThC1S6G.d.ts} +1 -3
- package/dist/dataset-DThC1S6G.d.ts.map +1 -0
- package/dist/{decision-point-0nJubuoM.js → decision-point-lhMgODOR.js} +14 -18
- package/dist/{decision-point-0nJubuoM.js.map → decision-point-lhMgODOR.js.map} +1 -1
- package/dist/{deep-freeze-CurcOQg3.js → deep-freeze-CK8-2W7p.js} +2 -3
- package/dist/{deep-freeze-CurcOQg3.js.map → deep-freeze-CK8-2W7p.js.map} +1 -1
- package/dist/{default-registry-CLG5YqGS.d.ts → default-registry-B1DstPYg.d.ts} +53 -61
- package/dist/default-registry-B1DstPYg.d.ts.map +1 -0
- package/dist/{default-registry-BBTDgkDM.js → default-registry-C1tPEjZ4.js} +29 -45
- package/dist/{default-registry-BBTDgkDM.js.map → default-registry-C1tPEjZ4.js.map} +1 -1
- package/dist/{define-agent-eval-CCbT7Kfr.js → define-agent-eval-BLoP4Lf9.js} +15 -18
- package/dist/{define-agent-eval-CCbT7Kfr.js.map → define-agent-eval-BLoP4Lf9.js.map} +1 -1
- package/dist/{define-agent-eval-JKt3gMQr.d.ts → define-agent-eval-CAffiFbN.d.ts} +19 -27
- package/dist/define-agent-eval-CAffiFbN.d.ts.map +1 -0
- package/dist/{descriptive-CVNy48rR.js → descriptive-cPwITVfy.js} +30 -8
- package/dist/descriptive-cPwITVfy.js.map +1 -0
- package/dist/diagnosis/index.d.ts +5 -15
- package/dist/diagnosis/index.d.ts.map +1 -1
- package/dist/diagnosis/index.js +13 -19
- package/dist/diagnosis/index.js.map +1 -1
- package/dist/{dspy-rlm-engine-DN1p_5jx.js → dspy-rlm-engine-jDiWkul6.js} +7 -10
- package/dist/{dspy-rlm-engine-DN1p_5jx.js.map → dspy-rlm-engine-jDiWkul6.js.map} +1 -1
- package/dist/{emitter-DbMXUIVP.js → emitter-DhQ65mza.js} +3 -4
- package/dist/{emitter-DbMXUIVP.js.map → emitter-DhQ65mza.js.map} +1 -1
- package/dist/{emitter-DABYYTcH.d.ts → emitter-mAXC5PSN.d.ts} +3 -5
- package/dist/emitter-mAXC5PSN.d.ts.map +1 -0
- package/dist/{engine-dtRVeuQs.d.ts → engine-CaHaCc3W.d.ts} +10 -18
- package/dist/engine-CaHaCc3W.d.ts.map +1 -0
- package/dist/{equal-terms-DbPGcVtI.js → equal-terms-K11VHmR3.js} +3 -4
- package/dist/{equal-terms-DbPGcVtI.js.map → equal-terms-K11VHmR3.js.map} +1 -1
- package/dist/{errors-BcOs5MKW.js → errors-DeEEV9Vx.js} +2 -3
- package/dist/{errors-BcOs5MKW.js.map → errors-DeEEV9Vx.js.map} +1 -1
- package/dist/{errors-DEE6u6ot.d.ts → errors-E9I2hldP.d.ts} +1 -3
- package/dist/errors-E9I2hldP.d.ts.map +1 -0
- package/dist/{eval-campaign-DoX5vz3E.js → eval-campaign-Cgixrvf7.js} +8 -9
- package/dist/{eval-campaign-DoX5vz3E.js.map → eval-campaign-Cgixrvf7.js.map} +1 -1
- package/dist/{evaluation-wdGyZ7jV.js → evaluation-B8H3GYej.js} +4 -6
- package/dist/{evaluation-wdGyZ7jV.js.map → evaluation-B8H3GYej.js.map} +1 -1
- package/dist/{evaluation-DblGquCB.d.ts → evaluation-BPqUvZ66.d.ts} +4 -6
- package/dist/evaluation-BPqUvZ66.d.ts.map +1 -0
- package/dist/evaluation.d.ts +1 -1
- package/dist/evaluation.js +1 -2
- package/dist/{exact-types-Do63KoKn.d.ts → exact-types-D98BKpxo.d.ts} +8 -10
- package/dist/exact-types-D98BKpxo.d.ts.map +1 -0
- package/dist/{exec-CpbtOXVt.js → exec-C0_AkLUv.js} +3 -5
- package/dist/{exec-CpbtOXVt.js.map → exec-C0_AkLUv.js.map} +1 -1
- package/dist/{execution-tracks-CpgFPpS5.js → execution-tracks-DaDXYwAq.js} +2 -3
- package/dist/{execution-tracks-CpgFPpS5.js.map → execution-tracks-DaDXYwAq.js.map} +1 -1
- package/dist/experiment/index.d.ts +9 -37
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +29 -40
- package/dist/experiment/index.js.map +1 -1
- package/dist/{exporters-Dk3oEbK_.d.ts → exporters-B5Ze_RKh.d.ts} +4 -4
- package/dist/exporters-B5Ze_RKh.d.ts.map +1 -0
- package/dist/{exporters-DWvM16LE.js → exporters-ByLcILYU.js} +23 -5
- package/dist/exporters-ByLcILYU.js.map +1 -0
- package/dist/{external-optimizer-process-DEzJ2CGX.js → external-optimizer-process-BRVmaDFe.js} +5 -6
- package/dist/{external-optimizer-process-DEzJ2CGX.js.map → external-optimizer-process-BRVmaDFe.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-B_ukPtRD.js → external-optimizer-subprocess-U616hV_l.js} +24 -37
- package/dist/{external-optimizer-subprocess-B_ukPtRD.js.map → external-optimizer-subprocess-U616hV_l.js.map} +1 -1
- package/dist/{extract-usage-BZLU01kR.js → extract-usage-ISFqhfDz.js} +2 -3
- package/dist/{extract-usage-BZLU01kR.js.map → extract-usage-ISFqhfDz.js.map} +1 -1
- package/dist/{failure-cluster-DN0t63Z0.d.ts → failure-cluster-DOoa7CBg.d.ts} +3 -7
- package/dist/failure-cluster-DOoa7CBg.d.ts.map +1 -0
- package/dist/{failure-taxonomy-Bx5oWqaW.js → failure-taxonomy-9eQfXKoW.js} +2 -3
- package/dist/{failure-taxonomy-Bx5oWqaW.js.map → failure-taxonomy-9eQfXKoW.js.map} +1 -1
- package/dist/{feedback-trajectory-CYVJXolG.d.ts → feedback-trajectory-SBGncrCP.d.ts} +7 -13
- package/dist/feedback-trajectory-SBGncrCP.d.ts.map +1 -0
- package/dist/{finding-composition-8n0fFgVI.js → finding-composition-DlvE1Qul.js} +4 -6
- package/dist/{finding-composition-8n0fFgVI.js.map → finding-composition-DlvE1Qul.js.map} +1 -1
- package/dist/{findings-store-Bg4sdS-e.js → findings-store-B75Dspaq.js} +11 -14
- package/dist/{findings-store-Bg4sdS-e.js.map → findings-store-B75Dspaq.js.map} +1 -1
- package/dist/fuzz.d.ts +3 -17
- package/dist/fuzz.d.ts.map +1 -1
- package/dist/fuzz.js +30 -29
- package/dist/fuzz.js.map +1 -1
- package/dist/{hf-dataset-CKxIJQba.js → hf-dataset-DPVQXW5n.js} +362 -21
- package/dist/hf-dataset-DPVQXW5n.js.map +1 -0
- package/dist/hosted/index.d.ts +2 -6
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/hosted/index.js +1 -2
- package/dist/{index-CalAsXMR.d.ts → index-B1Bm9oJA.d.ts} +3 -15
- package/dist/index-B1Bm9oJA.d.ts.map +1 -0
- package/dist/{index-CdEVr8-O.d.ts → index-B7v2QHlD.d.ts} +24 -299
- package/dist/index-B7v2QHlD.d.ts.map +1 -0
- package/dist/{index-CTIRz-AB.d.ts → index-CUjeTDPv.d.ts} +14 -36
- package/dist/index-CUjeTDPv.d.ts.map +1 -0
- package/dist/{index-CfJULcW5.d.ts → index-DAk2quYu.d.ts} +18 -38
- package/dist/index-DAk2quYu.d.ts.map +1 -0
- package/dist/{index-D7fmC-1K.d.ts → index-DUn0GNiZ.d.ts} +183 -36
- package/dist/index-DUn0GNiZ.d.ts.map +1 -0
- package/dist/{index-CHxwfW5g.d.ts → index-DwUGehqX.d.ts} +3 -9
- package/dist/index-DwUGehqX.d.ts.map +1 -0
- package/dist/{index-jnuFLxOs.d.ts → index-aDPVYBIM.d.ts} +11 -39
- package/dist/index-aDPVYBIM.d.ts.map +1 -0
- package/dist/index.d.ts +55 -188
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +122 -195
- package/dist/index.js.map +1 -1
- package/dist/{integrity-D-s2iHiT.js → integrity-B1V6klyO.js} +12 -363
- package/dist/integrity-B1V6klyO.js.map +1 -0
- package/dist/{integrity-D9lBnv_K.d.ts → integrity-BAdVzT8u.d.ts} +4 -6
- package/dist/integrity-BAdVzT8u.d.ts.map +1 -0
- package/dist/{integrity-W4CADcFc.js → integrity-DOHt1mwU.js} +3 -4
- package/dist/{integrity-W4CADcFc.js.map → integrity-DOHt1mwU.js.map} +1 -1
- package/dist/{internal-BTK91Bqt.js → internal-v6XfOeJW.js} +6 -8
- package/dist/{internal-BTK91Bqt.js.map → internal-v6XfOeJW.js.map} +1 -1
- package/dist/{interval-Dq9gt7jx.js → interval-Bd2f4CRT.js} +6 -8
- package/dist/{interval-Dq9gt7jx.js.map → interval-Bd2f4CRT.js.map} +1 -1
- package/dist/{interval-ohuOJurX.d.ts → interval-CWyxqDpE.d.ts} +1 -5
- package/dist/interval-CWyxqDpE.d.ts.map +1 -0
- package/dist/{journal-C7om8Gum.js → journal-C1uLJi0w.js} +115 -121
- package/dist/{journal-C7om8Gum.js.map → journal-C1uLJi0w.js.map} +1 -1
- package/dist/{json-BhdsJaOQ.js → json-DtvZNAU9.js} +4 -6
- package/dist/{json-BhdsJaOQ.js.map → json-DtvZNAU9.js.map} +1 -1
- package/dist/json-recovery-DK4MDm5r.js +296 -0
- package/dist/json-recovery-DK4MDm5r.js.map +1 -0
- package/dist/{judge-calibration-BkXMIWA4.js → judge-calibration-DGqlfWW8.js} +5 -6
- package/dist/{judge-calibration-BkXMIWA4.js.map → judge-calibration-DGqlfWW8.js.map} +1 -1
- package/dist/{judge-calibration-DFtEMlde.d.ts → judge-calibration-DnrbQaXI.d.ts} +1 -3
- package/dist/judge-calibration-DnrbQaXI.d.ts.map +1 -0
- package/dist/{judge-gate-BVvmP00P.js → judge-gate-C2BCOt-M.js} +8 -12
- package/dist/{judge-gate-BVvmP00P.js.map → judge-gate-C2BCOt-M.js.map} +1 -1
- package/dist/judges-BLxg5p8E.js +20 -0
- package/dist/judges-BLxg5p8E.js.map +1 -0
- package/dist/{kind-factory-Dl0PmNQL.js → kind-factory-VKysp1ds.js} +23 -39
- package/dist/{kind-factory-Dl0PmNQL.js.map → kind-factory-VKysp1ds.js.map} +1 -1
- package/dist/ledger-core/index.d.ts +2 -2
- package/dist/ledger-core/index.js +3 -3
- package/dist/ledger-core/lock-holder.d.ts +1 -1
- package/dist/ledger-core/lock-holder.js +1 -2
- package/dist/{ledger-core-CAxUdDk0.js → ledger-core-CfT-FzPf.js} +5 -6
- package/dist/{ledger-core-CAxUdDk0.js.map → ledger-core-CfT-FzPf.js.map} +1 -1
- package/dist/{llm-client-b1ysZVIU.js → llm-client-kJ9EOqjt.js} +22 -30
- package/dist/{llm-client-b1ysZVIU.js.map → llm-client-kJ9EOqjt.js.map} +1 -1
- package/dist/{llm-judge-Cybq29bL.js → llm-judge-cgbhTKQp.js} +108 -164
- package/dist/llm-judge-cgbhTKQp.js.map +1 -0
- package/dist/{lock-holder-DaJbfpci.d.ts → lock-holder-DoxlZFkQ.d.ts} +1 -3
- package/dist/lock-holder-DoxlZFkQ.d.ts.map +1 -0
- package/dist/matrix/index.d.ts +3 -3
- package/dist/matrix/index.js +2 -2
- package/dist/{matrix-DtkZLD_3.d.ts → matrix-CBUzIZs4.d.ts} +4 -12
- package/dist/matrix-CBUzIZs4.d.ts.map +1 -0
- package/dist/{matrix-B8l-Nsxd.js → matrix-CgpX8wdm.js} +8 -13
- package/dist/matrix-CgpX8wdm.js.map +1 -0
- package/dist/{mean-BbA_JCzW.js → mean-CdDYG-us.js} +6 -9
- package/dist/{mean-BbA_JCzW.js.map → mean-CdDYG-us.js.map} +1 -1
- package/dist/meta-eval/index.d.ts +3 -3
- package/dist/meta-eval/index.js +17 -21
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/{metrics-BKaPBtIG.js → metrics-DNCAUtuB.js} +2 -3
- package/dist/{metrics-BKaPBtIG.js.map → metrics-DNCAUtuB.js.map} +1 -1
- package/dist/{mint-CbdwjTPW.js → mint-D9ZysYtY.js} +7 -8
- package/dist/{mint-CbdwjTPW.js.map → mint-D9ZysYtY.js.map} +1 -1
- package/dist/{multi-layer-verifier-DEgMUk6v.d.ts → multi-layer-verifier-lM4aVN78.d.ts} +2 -4
- package/dist/multi-layer-verifier-lM4aVN78.d.ts.map +1 -0
- package/dist/{multiplicity-Sg0U7h8j.js → multiplicity-DAd4xaDC.js} +3 -4
- package/dist/{multiplicity-Sg0U7h8j.js.map → multiplicity-DAd4xaDC.js.map} +1 -1
- package/dist/{multiplicity-DIWHvysC.d.ts → multiplicity-D_SEsc5j.d.ts} +1 -3
- package/dist/multiplicity-D_SEsc5j.d.ts.map +1 -0
- package/dist/multishot/golden/index.d.ts +1 -17
- package/dist/multishot/golden/index.d.ts.map +1 -1
- package/dist/multishot/golden/index.js +10 -17
- package/dist/multishot/golden/index.js.map +1 -1
- package/dist/multishot/index.d.ts +2 -10
- package/dist/multishot/index.d.ts.map +1 -1
- package/dist/multishot/index.js +11 -18
- package/dist/multishot/index.js.map +1 -1
- package/dist/{nonnegative-number-DvdMxg_f.js → nonnegative-number-lEYbOsuh.js} +2 -3
- package/dist/{nonnegative-number-DvdMxg_f.js.map → nonnegative-number-lEYbOsuh.js.map} +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{otel-spans-CdN909k1.js → otel-spans-BsGzTWIK.js} +5 -6
- package/dist/{otel-spans-CdN909k1.js.map → otel-spans-BsGzTWIK.js.map} +1 -1
- package/dist/{otlp-attributes-D9ptWaIJ.js → otlp-attributes-Boeb7gtH.js} +2 -3
- package/dist/{otlp-attributes-D9ptWaIJ.js.map → otlp-attributes-Boeb7gtH.js.map} +1 -1
- package/dist/{outcome-observations-FLmRpgYa.js → outcome-observations-D4snOtUb.js} +4 -5
- package/dist/{outcome-observations-FLmRpgYa.js.map → outcome-observations-D4snOtUb.js.map} +1 -1
- package/dist/{outcome-store-DUcMj-3D.js → outcome-store-TarrcfHG.js} +2 -3
- package/dist/{outcome-store-DUcMj-3D.js.map → outcome-store-TarrcfHG.js.map} +1 -1
- package/dist/{package-version-D7lQHt_-.js → package-version-CJl_pY9W.js} +2 -3
- package/dist/{package-version-D7lQHt_-.js.map → package-version-CJl_pY9W.js.map} +1 -1
- package/dist/{paired-arms-B2ttLc0_.js → paired-arms-D-54hO-k.js} +10 -14
- package/dist/{paired-arms-B2ttLc0_.js.map → paired-arms-D-54hO-k.js.map} +1 -1
- package/dist/{paired-binary-B_nejA44.js → paired-binary-BR0nwHOA.js} +3 -4
- package/dist/{paired-binary-B_nejA44.js.map → paired-binary-BR0nwHOA.js.map} +1 -1
- package/dist/{paired-promotion-decision-CQMJ5xGN.d.ts → paired-promotion-decision-BDnqepZ1.d.ts} +1 -5
- package/dist/paired-promotion-decision-BDnqepZ1.d.ts.map +1 -0
- package/dist/{paired-promotion-decision-D0SHb-ZL.js → paired-promotion-decision-FGvHA4p_.js} +5 -7
- package/dist/{paired-promotion-decision-D0SHb-ZL.js.map → paired-promotion-decision-FGvHA4p_.js.map} +1 -1
- package/dist/{pareto-BiBnQXAE.js → pareto-B9udAt2i.js} +28 -50
- package/dist/pareto-B9udAt2i.js.map +1 -0
- package/dist/pipelines/index.d.ts +5 -11
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js +6 -8
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{power-and-mde-CQX-0weG.js → power-and-mde-ClI6RWw4.js} +4 -5
- package/dist/{power-and-mde-CQX-0weG.js.map → power-and-mde-ClI6RWw4.js.map} +1 -1
- package/dist/{predicate-FdKmElA_.js → predicate-BYHA4MBn.js} +2 -3
- package/dist/{predicate-FdKmElA_.js.map → predicate-BYHA4MBn.js.map} +1 -1
- package/dist/{prime-bridge-transport-6feEglLf.d.ts → prime-bridge-transport-Cfqir_Im.d.ts} +1 -3
- package/dist/prime-bridge-transport-Cfqir_Im.d.ts.map +1 -0
- package/dist/{prime-bridge-transport-Z3cpKGoV.js → prime-bridge-transport-Csd5SQg7.js} +2 -3
- package/dist/{prime-bridge-transport-Z3cpKGoV.js.map → prime-bridge-transport-Csd5SQg7.js.map} +1 -1
- package/dist/{prime-protocol-BGxjfhM4.d.ts → prime-protocol-COFkxas6.d.ts} +4 -8
- package/dist/prime-protocol-COFkxas6.d.ts.map +1 -0
- package/dist/{prime-protocol-BFgGrEMP.js → prime-protocol-CrhpXRz9.js} +4 -6
- package/dist/{prime-protocol-BFgGrEMP.js.map → prime-protocol-CrhpXRz9.js.map} +1 -1
- package/dist/profile-cell.d.ts +1 -1
- package/dist/profile-cell.js +1 -2
- package/dist/{promotion-gate-CkVZHagC.d.ts → promotion-gate-CixshGI8.d.ts} +5 -11
- package/dist/promotion-gate-CixshGI8.d.ts.map +1 -0
- package/dist/{promotion-policy-6A8osGr_.js → promotion-policy-CBYeD4zi.js} +5 -6
- package/dist/{promotion-policy-6A8osGr_.js.map → promotion-policy-CBYeD4zi.js.map} +1 -1
- package/dist/{proposal-findings-DqLUWsAG.js → proposal-findings-WFQrxnfe.js} +3 -4
- package/dist/{proposal-findings-DqLUWsAG.js.map → proposal-findings-WFQrxnfe.js.map} +1 -1
- package/dist/{quantile--0yb07pD.js → quantile-CncXP-Ss.js} +2 -3
- package/dist/{quantile--0yb07pD.js.map → quantile-CncXP-Ss.js.map} +1 -1
- package/dist/{query-B_RZ36an.js → query-CGXzO9d4.js} +5 -6
- package/dist/{query-B_RZ36an.js.map → query-CGXzO9d4.js.map} +1 -1
- package/dist/{query-Cmv_U8vf.d.ts → query-UD0B08Sb.d.ts} +4 -6
- package/dist/query-UD0B08Sb.d.ts.map +1 -0
- package/dist/{random-DGEyr3zG.d.ts → random-BN150Q_X.d.ts} +1 -5
- package/dist/random-BN150Q_X.d.ts.map +1 -0
- package/dist/{random-DDDcC7YU.js → random-DrzcgC7F.js} +3 -4
- package/dist/{random-DDDcC7YU.js.map → random-DrzcgC7F.js.map} +1 -1
- package/dist/{raw-provider-sink-75w4FWBj.js → raw-provider-sink-DDLkP_eF.js} +3 -4
- package/dist/{raw-provider-sink-75w4FWBj.js.map → raw-provider-sink-DDLkP_eF.js.map} +1 -1
- package/dist/{record-id-DUgsK5qp.js → record-id-CWZXFh58.js} +2 -3
- package/dist/{record-id-DUgsK5qp.js.map → record-id-CWZXFh58.js.map} +1 -1
- package/dist/{redact-DXdlFb_U.d.ts → redact-C_wzC4c_.d.ts} +1 -3
- package/dist/redact-C_wzC4c_.d.ts.map +1 -0
- package/dist/{redact-mtkTiJVk.js → redact-D6APJS1d.js} +3 -5
- package/dist/{redact-mtkTiJVk.js.map → redact-D6APJS1d.js.map} +1 -1
- package/dist/{registry-BcdJmyoU.d.ts → registry-dhdDoAV8.d.ts} +5 -11
- package/dist/registry-dhdDoAV8.d.ts.map +1 -0
- package/dist/{release-confidence-CYIFH-fp.js → release-confidence-CTUJz5mM.js} +10 -16
- package/dist/release-confidence-CTUJz5mM.js.map +1 -0
- package/dist/{render-BhJqXoBH.js → render-pfAZ7IR4.js} +266 -33
- package/dist/render-pfAZ7IR4.js.map +1 -0
- package/dist/{reporting-html-Kvlc8oMt.js → reporting-html-DMXIjATy.js} +2 -3
- package/dist/{reporting-html-Kvlc8oMt.js.map → reporting-html-DMXIjATy.js.map} +1 -1
- package/dist/reporting.d.ts +6 -6
- package/dist/reporting.js +7 -7
- package/dist/{researcher-DKWtoMWk.d.ts → researcher-CLnNJ7Or.d.ts} +8 -12
- package/dist/researcher-CLnNJ7Or.d.ts.map +1 -0
- package/dist/{reward-nw2xZGZG.js → reward-P0VD_Aft.js} +2 -3
- package/dist/{reward-nw2xZGZG.js.map → reward-P0VD_Aft.js.map} +1 -1
- package/dist/{reward-BeUgVVC_.d.ts → reward-ST4PXNXF.d.ts} +2 -4
- package/dist/reward-ST4PXNXF.d.ts.map +1 -0
- package/dist/{reward-hacking-WTxUbtbb.d.ts → reward-hacking-C9hPVT0Q.d.ts} +4 -8
- package/dist/reward-hacking-C9hPVT0Q.d.ts.map +1 -0
- package/dist/{reward-hacking-ByuETaIb.js → reward-hacking-DZzHZlS1.js} +5 -7
- package/dist/{reward-hacking-ByuETaIb.js.map → reward-hacking-DZzHZlS1.js.map} +1 -1
- package/dist/rl.d.ts +26 -63
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +35 -52
- package/dist/rl.js.map +1 -1
- package/dist/{rolldown-runtime-8H4AJuhK.js → rolldown-runtime-BJohB4LM.js} +1 -2
- package/dist/rollout/index.d.ts +6 -6
- package/dist/rollout/index.js +7 -7
- package/dist/{rollout-Dd1ucT_M.js → rollout-BhkMpAJT.js} +279 -16
- package/dist/rollout-BhkMpAJT.js.map +1 -0
- package/dist/{terminal-record-CB9BFtjS.js → rollout-nodes-BHR9Q5jP.js} +351 -11
- package/dist/rollout-nodes-BHR9Q5jP.js.map +1 -0
- package/dist/{round-decimal-COrKglMh.js → round-decimal-ZmjAQPo1.js} +2 -3
- package/dist/{round-decimal-COrKglMh.js.map → round-decimal-ZmjAQPo1.js.map} +1 -1
- package/dist/{rubric-predictive-validity-Cd5SCtAf.d.ts → rubric-predictive-validity-B3RzbwOx.d.ts} +2 -8
- package/dist/rubric-predictive-validity-B3RzbwOx.d.ts.map +1 -0
- package/dist/{rubric-predictive-validity-CeKW2GQN.js → rubric-predictive-validity-CQp_M0vy.js} +3 -4
- package/dist/{rubric-predictive-validity-CeKW2GQN.js.map → rubric-predictive-validity-CQp_M0vy.js.map} +1 -1
- package/dist/{run-record-CysKLB93.js → run-record-CZy4-TnZ.js} +4 -5
- package/dist/{run-record-CysKLB93.js.map → run-record-CZy4-TnZ.js.map} +1 -1
- package/dist/{run-record-C3awiXPf.d.ts → run-record-D2BFMPGl.d.ts} +5 -7
- package/dist/run-record-D2BFMPGl.d.ts.map +1 -0
- package/dist/{run-record-DhEJgoPz.js → run-record-DEjx43cI.js} +6 -7
- package/dist/{run-record-DhEJgoPz.js.map → run-record-DEjx43cI.js.map} +1 -1
- package/dist/{sandbox-harness-BlSOu4LX.d.ts → sandbox-harness-B3Kx1fOA.d.ts} +1 -3
- package/dist/sandbox-harness-B3Kx1fOA.d.ts.map +1 -0
- package/dist/{schema-D6EVKzTB.d.ts → schema-CkIvnmLU.d.ts} +2 -43
- package/dist/schema-CkIvnmLU.d.ts.map +1 -0
- package/dist/{schema-Bt2vLFm3.js → schema-D-xu3MU_.js} +2 -3
- package/dist/{schema-Bt2vLFm3.js.map → schema-D-xu3MU_.js.map} +1 -1
- package/dist/{schema-C-ziyJD7.d.ts → schema-DkFJr3Y8.d.ts} +111 -48
- package/dist/schema-DkFJr3Y8.d.ts.map +1 -0
- package/dist/{schema-CvhfLjtZ.js → schema-YUIXT8iW.js} +37 -7
- package/dist/schema-YUIXT8iW.js.map +1 -0
- package/dist/search/index.d.ts +3 -35
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +4 -5
- package/dist/{search-kernel-CctpiDd2.d.ts → search-kernel-CBdwFZ05.d.ts} +10 -36
- package/dist/search-kernel-CBdwFZ05.d.ts.map +1 -0
- package/dist/{search-ledger-CZRqtFbW.js → search-ledger-BsVi-Ngv.js} +17 -26
- package/dist/{search-ledger-CZRqtFbW.js.map → search-ledger-BsVi-Ngv.js.map} +1 -1
- package/dist/{search-ledger-file-Bd5Tioq6.js → search-ledger-file-DTBD6X-y.js} +6 -8
- package/dist/{search-ledger-file-Bd5Tioq6.js.map → search-ledger-file-DTBD6X-y.js.map} +1 -1
- package/dist/{search-ledger-types-p2xKfiDJ.d.ts → search-ledger-types-qiYRUo_N.d.ts} +5 -9
- package/dist/search-ledger-types-qiYRUo_N.d.ts.map +1 -0
- package/dist/{search-shipper-Dn3NLsuH.js → search-shipper-pdg4viK7.js} +8 -13
- package/dist/{search-shipper-Dn3NLsuH.js.map → search-shipper-pdg4viK7.js.map} +1 -1
- package/dist/{search-summary-D4bwYnAE.js → search-summary-Ct7SrmVc.js} +6 -7
- package/dist/{search-summary-D4bwYnAE.js.map → search-summary-Ct7SrmVc.js.map} +1 -1
- package/dist/{sequential-CimQrbjv.js → sequential-B1I0tRfL.js} +6 -7
- package/dist/{sequential-CimQrbjv.js.map → sequential-B1I0tRfL.js.map} +1 -1
- package/dist/{sequential-KwGspfeR.d.ts → sequential-Bb_pdTqG.d.ts} +1 -3
- package/dist/sequential-Bb_pdTqG.d.ts.map +1 -0
- package/dist/{sequential-BVv1sjsw.js → sequential-Bjs5roiK.js} +2 -3
- package/dist/{sequential-BVv1sjsw.js.map → sequential-Bjs5roiK.js.map} +1 -1
- package/dist/{sequential-eprocess-DodI6RoF.js → sequential-eprocess-C1YLwFaz.js} +3 -4
- package/dist/{sequential-eprocess-DodI6RoF.js.map → sequential-eprocess-C1YLwFaz.js.map} +1 -1
- package/dist/{server-ChhXPCgX.js → server-DA6h3co5.js} +11 -17
- package/dist/{server-ChhXPCgX.js.map → server-DA6h3co5.js.map} +1 -1
- package/dist/{single-run-lock-Dekd8_Wv.js → single-run-lock-BGlW3OSk.js} +3 -4
- package/dist/{single-run-lock-Dekd8_Wv.js.map → single-run-lock-BGlW3OSk.js.map} +1 -1
- package/dist/{skillopt-optimization-method-sB_-yi1G.js → skillopt-optimization-method-qB1M554K.js} +38 -57
- package/dist/{skillopt-optimization-method-sB_-yi1G.js.map → skillopt-optimization-method-qB1M554K.js.map} +1 -1
- package/dist/{spans-CVngGij3.d.ts → spans-vZoW__3q.d.ts} +2 -4
- package/dist/spans-vZoW__3q.d.ts.map +1 -0
- package/dist/{statistical-heldout-BjzSOmLH.d.ts → statistical-heldout-Cei036nE.d.ts} +9 -37
- package/dist/statistical-heldout-Cei036nE.d.ts.map +1 -0
- package/dist/{statistical-heldout-Bksv92Th.js → statistical-heldout-TP6ndL0B.js} +4 -5
- package/dist/{statistical-heldout-Bksv92Th.js.map → statistical-heldout-TP6ndL0B.js.map} +1 -1
- package/dist/{steps-DlepJPwD.d.ts → steps-B8fYY_Vo.d.ts} +1 -3
- package/dist/steps-B8fYY_Vo.d.ts.map +1 -0
- package/dist/{store-B3nWRy3B.d.ts → store-CMs5wGXP.d.ts} +2 -4
- package/dist/store-CMs5wGXP.d.ts.map +1 -0
- package/dist/{store-BhNuLdJw.js → store-ZykIyQmy.js} +2 -3
- package/dist/{store-BhNuLdJw.js.map → store-ZykIyQmy.js.map} +1 -1
- package/dist/{store-otlp-CFf27E8_.js → store-otlp-DmLm65XW.js} +8 -13
- package/dist/{store-otlp-CFf27E8_.js.map → store-otlp-DmLm65XW.js.map} +1 -1
- package/dist/{store-tool-spans-DxsFwtdr.d.ts → store-tool-spans-B3i3fl0A.d.ts} +11 -29
- package/dist/store-tool-spans-B3i3fl0A.d.ts.map +1 -0
- package/dist/{store-tool-spans-BK_8FjGG.js → store-tool-spans-C2g8UYm-.js} +17 -41
- package/dist/{store-tool-spans-BK_8FjGG.js.map → store-tool-spans-C2g8UYm-.js.map} +1 -1
- package/dist/storyboard/index.d.ts +1 -5
- package/dist/storyboard/index.d.ts.map +1 -1
- package/dist/storyboard/index.js +3 -5
- package/dist/storyboard/index.js.map +1 -1
- package/dist/{summary-report-C8V49Jt3.d.ts → summary-report-0La5vejY.d.ts} +5 -13
- package/dist/summary-report-0La5vejY.d.ts.map +1 -0
- package/dist/{summary-report-DHDWxe6p.js → summary-report-CPfsrLac.js} +21 -30
- package/dist/summary-report-CPfsrLac.js.map +1 -0
- package/dist/supervisor-run/index.d.ts +30 -29
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +6 -7
- package/dist/{systemone-CHnqwmYg.d.ts → systemone-Cw2txK5m.d.ts} +12 -24
- package/dist/systemone-Cw2txK5m.d.ts.map +1 -0
- package/dist/{systemone-protocol-Bl2EI2KQ.d.ts → systemone-protocol-C4t7JH4Y.d.ts} +1 -3
- package/dist/systemone-protocol-C4t7JH4Y.d.ts.map +1 -0
- package/dist/systemone-protocol.d.ts +1 -1
- package/dist/systemone-protocol.js +2 -3
- package/dist/{systemone-review-cQ9acAsb.d.ts → systemone-review-BLgxt-4Q.d.ts} +8 -10
- package/dist/systemone-review-BLgxt-4Q.d.ts.map +1 -0
- package/dist/{systemone-review-DFGtIUcf.js → systemone-review-S49gsy_y.js} +5 -6
- package/dist/{systemone-review-DFGtIUcf.js.map → systemone-review-S49gsy_y.js.map} +1 -1
- package/dist/systemone.d.ts +4 -4
- package/dist/systemone.js +3 -3
- package/dist/{task-failure-attributes-BMsblaDh.js → task-failure-attributes-CC6VuIpk.js} +12 -11
- package/dist/task-failure-attributes-CC6VuIpk.js.map +1 -0
- package/dist/{tool-groups-b3oU_D88.d.ts → tool-groups-C3K-d3gd.d.ts} +3 -5
- package/dist/tool-groups-C3K-d3gd.d.ts.map +1 -0
- package/dist/{tool-waste-CkjzWmeY.d.ts → tool-waste-BFG1vwTV.d.ts} +4 -16
- package/dist/tool-waste-BFG1vwTV.d.ts.map +1 -0
- package/dist/{tool-waste-DLsjS_p-.js → tool-waste-CLJ46AbT.js} +10 -26
- package/dist/{tool-waste-DLsjS_p-.js.map → tool-waste-CLJ46AbT.js.map} +1 -1
- package/dist/trace-attributes.d.ts +1 -1
- package/dist/trace-attributes.js +1 -2
- package/dist/{trace-questions-BmT8M6UQ.d.ts → trace-questions-ej5AEJ5X.d.ts} +4 -6
- package/dist/trace-questions-ej5AEJ5X.d.ts.map +1 -0
- package/dist/trace-repair/index.d.ts +46 -92
- package/dist/trace-repair/index.d.ts.map +1 -1
- package/dist/trace-repair/index.js +32 -54
- package/dist/trace-repair/index.js.map +1 -1
- package/dist/traces.d.ts +13 -29
- package/dist/traces.d.ts.map +1 -1
- package/dist/traces.js +18 -22
- package/dist/traces.js.map +1 -1
- package/dist/{trajectory-D_7rLrvE.js → trajectory-O3GDHmev.js} +2 -3
- package/dist/{trajectory-D_7rLrvE.js.map → trajectory-O3GDHmev.js.map} +1 -1
- package/dist/trajectory-replay/index.d.ts +2 -22
- package/dist/trajectory-replay/index.d.ts.map +1 -1
- package/dist/trajectory-replay/index.js +19 -30
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/{tree-DSqwJpL9.js → tree-DrIChF4a.js} +39 -68
- package/dist/{tree-DSqwJpL9.js.map → tree-DrIChF4a.js.map} +1 -1
- package/dist/{types-B_IFcKp5.d.ts → types-0KglnQ9o.d.ts} +3 -15
- package/dist/types-0KglnQ9o.d.ts.map +1 -0
- package/dist/{types-DZ0mYVw9.d.ts → types-0oMg7zee.d.ts} +3 -5
- package/dist/types-0oMg7zee.d.ts.map +1 -0
- package/dist/{types-CnWmj8NW.js → types-BK0blWhe.js} +3 -4
- package/dist/{types-CnWmj8NW.js.map → types-BK0blWhe.js.map} +1 -1
- package/dist/{types-CmXY0PQf.d.ts → types-C-aOqgt2.d.ts} +2 -5
- package/dist/types-C-aOqgt2.d.ts.map +1 -0
- package/dist/{types-M6eF9m-r.d.ts → types-C54Uk_a1.d.ts} +84 -24
- package/dist/types-C54Uk_a1.d.ts.map +1 -0
- package/dist/{types-BXgASBCL.js → types-DK4vNv5q.js} +2 -3
- package/dist/{types-BXgASBCL.js.map → types-DK4vNv5q.js.map} +1 -1
- package/dist/{types-6Lfdlshp.d.ts → types-DzCO-S1m.d.ts} +50 -62
- package/dist/types-DzCO-S1m.d.ts.map +1 -0
- package/dist/{verdict-BGQmxQ8A.js → verdict-C8TcdwfD.js} +3 -4
- package/dist/{verdict-BGQmxQ8A.js.map → verdict-C8TcdwfD.js.map} +1 -1
- package/dist/{verdict-C24NELtN.d.ts → verdict-D_qiBQ6_.d.ts} +1 -5
- package/dist/verdict-D_qiBQ6_.d.ts.map +1 -0
- package/dist/{verdict-cache-CL_7tePD.js → verdict-cache-BVH-fl18.js} +3 -4
- package/dist/{verdict-cache-CL_7tePD.js.map → verdict-cache-BVH-fl18.js.map} +1 -1
- package/dist/wire/index.d.ts +43 -51
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +1 -2
- package/docs/concepts.md +1 -0
- package/docs/eval-surface-map.md +15 -0
- package/docs/rollout.md +132 -6
- package/package.json +18 -18
- package/dist/adversarial-smnADNFS.d.ts.map +0 -1
- package/dist/agent-profile-CNmwfaqq.d.ts.map +0 -1
- package/dist/agent-profile-cell-BcpFbNd5.d.ts.map +0 -1
- package/dist/analyze-runs-DfX6dHP0.d.ts.map +0 -1
- package/dist/attribute-vocabulary-CcXqHODT.d.ts.map +0 -1
- package/dist/benchmark-command-Cnjfo0Zh.js.map +0 -1
- package/dist/campaign-evidence-DunzcJGv.js.map +0 -1
- package/dist/campaign-uddTlFg5.js.map +0 -1
- package/dist/canonical-CFpojCN5.d.ts.map +0 -1
- package/dist/client-hwo3cJjR.d.ts.map +0 -1
- package/dist/completion-verifier-asaV1nSj.js.map +0 -1
- package/dist/cost-ledger-C1W3ICmP.d.ts.map +0 -1
- package/dist/dataset-DQqhOCPt.d.ts.map +0 -1
- package/dist/default-registry-CLG5YqGS.d.ts.map +0 -1
- package/dist/define-agent-eval-JKt3gMQr.d.ts.map +0 -1
- package/dist/descriptive-B2iPaT9J.d.ts +0 -89
- package/dist/descriptive-B2iPaT9J.d.ts.map +0 -1
- package/dist/descriptive-CVNy48rR.js.map +0 -1
- package/dist/emitter-DABYYTcH.d.ts.map +0 -1
- package/dist/engine-dtRVeuQs.d.ts.map +0 -1
- package/dist/errors-DEE6u6ot.d.ts.map +0 -1
- package/dist/evaluation-DblGquCB.d.ts.map +0 -1
- package/dist/exact-types-Do63KoKn.d.ts.map +0 -1
- package/dist/exporters-DWvM16LE.js.map +0 -1
- package/dist/exporters-Dk3oEbK_.d.ts.map +0 -1
- package/dist/failure-cluster-DN0t63Z0.d.ts.map +0 -1
- package/dist/feedback-trajectory-CYVJXolG.d.ts.map +0 -1
- package/dist/hf-dataset-CKxIJQba.js.map +0 -1
- package/dist/index-CHxwfW5g.d.ts.map +0 -1
- package/dist/index-CTIRz-AB.d.ts.map +0 -1
- package/dist/index-CalAsXMR.d.ts.map +0 -1
- package/dist/index-CdEVr8-O.d.ts.map +0 -1
- package/dist/index-CfJULcW5.d.ts.map +0 -1
- package/dist/index-D7fmC-1K.d.ts.map +0 -1
- package/dist/index-jnuFLxOs.d.ts.map +0 -1
- package/dist/integrity-D-s2iHiT.js.map +0 -1
- package/dist/integrity-D9lBnv_K.d.ts.map +0 -1
- package/dist/interval-ohuOJurX.d.ts.map +0 -1
- package/dist/judge-calibration-DFtEMlde.d.ts.map +0 -1
- package/dist/llm-judge-Cybq29bL.js.map +0 -1
- package/dist/lock-holder-DaJbfpci.d.ts.map +0 -1
- package/dist/matrix-B8l-Nsxd.js.map +0 -1
- package/dist/matrix-DtkZLD_3.d.ts.map +0 -1
- package/dist/mint-CkzpVPdz.d.ts +0 -81
- package/dist/mint-CkzpVPdz.d.ts.map +0 -1
- package/dist/multi-layer-verifier-DEgMUk6v.d.ts.map +0 -1
- package/dist/multiplicity-DIWHvysC.d.ts.map +0 -1
- package/dist/paired-promotion-decision-CQMJ5xGN.d.ts.map +0 -1
- package/dist/pareto-BiBnQXAE.js.map +0 -1
- package/dist/prime-bridge-transport-6feEglLf.d.ts.map +0 -1
- package/dist/prime-protocol-BGxjfhM4.d.ts.map +0 -1
- package/dist/promotion-gate-CkVZHagC.d.ts.map +0 -1
- package/dist/query-Cmv_U8vf.d.ts.map +0 -1
- package/dist/random-DGEyr3zG.d.ts.map +0 -1
- package/dist/redact-DXdlFb_U.d.ts.map +0 -1
- package/dist/registry-BcdJmyoU.d.ts.map +0 -1
- package/dist/release-confidence-CYIFH-fp.js.map +0 -1
- package/dist/render-BhJqXoBH.js.map +0 -1
- package/dist/researcher-DKWtoMWk.d.ts.map +0 -1
- package/dist/reward-BeUgVVC_.d.ts.map +0 -1
- package/dist/reward-hacking-WTxUbtbb.d.ts.map +0 -1
- package/dist/rollout-Dd1ucT_M.js.map +0 -1
- package/dist/rubric-predictive-validity-Cd5SCtAf.d.ts.map +0 -1
- package/dist/run-record-C3awiXPf.d.ts.map +0 -1
- package/dist/sandbox-harness-BlSOu4LX.d.ts.map +0 -1
- package/dist/schema-C-ziyJD7.d.ts.map +0 -1
- package/dist/schema-CvhfLjtZ.js.map +0 -1
- package/dist/schema-D6EVKzTB.d.ts.map +0 -1
- package/dist/search-kernel-CctpiDd2.d.ts.map +0 -1
- package/dist/search-ledger-types-p2xKfiDJ.d.ts.map +0 -1
- package/dist/sequential-KwGspfeR.d.ts.map +0 -1
- package/dist/spans-CVngGij3.d.ts.map +0 -1
- package/dist/statistical-heldout-BjzSOmLH.d.ts.map +0 -1
- package/dist/steps-DlepJPwD.d.ts.map +0 -1
- package/dist/store-B3nWRy3B.d.ts.map +0 -1
- package/dist/store-tool-spans-DxsFwtdr.d.ts.map +0 -1
- package/dist/summary-report-C8V49Jt3.d.ts.map +0 -1
- package/dist/summary-report-DHDWxe6p.js.map +0 -1
- package/dist/systemone-CHnqwmYg.d.ts.map +0 -1
- package/dist/systemone-protocol-Bl2EI2KQ.d.ts.map +0 -1
- package/dist/systemone-review-cQ9acAsb.d.ts.map +0 -1
- package/dist/task-failure-attributes-BMsblaDh.js.map +0 -1
- package/dist/terminal-record-CB9BFtjS.js.map +0 -1
- package/dist/tool-groups-b3oU_D88.d.ts.map +0 -1
- package/dist/tool-waste-CkjzWmeY.d.ts.map +0 -1
- package/dist/trace-questions-BmT8M6UQ.d.ts.map +0 -1
- package/dist/types-6Lfdlshp.d.ts.map +0 -1
- package/dist/types-B_IFcKp5.d.ts.map +0 -1
- package/dist/types-CmXY0PQf.d.ts.map +0 -1
- package/dist/types-DZ0mYVw9.d.ts.map +0 -1
- package/dist/types-M6eF9m-r.d.ts.map +0 -1
- package/dist/verdict-C24NELtN.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-CFpojCN5.d.ts","names":[],"sources":["../src/ledger-core/canonical.ts"],"mappings":";;KAqBY;;cAGC,qBAAmB;;cAGnB,oCAAoC;;;;iBAKjC,gBAAgB;iBAQhB,cAAc,iBAAiB;;;;;;;;;;;;;;;;iBAuB/B,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-hwo3cJjR.d.ts","names":[],"sources":["../src/hosted/search-ledger-wire.ts","../src/hosted/types.ts","../src/hosted/client.ts"],"mappings":";;;;;cAqCa;cAEA;;cAsBA,qBAAmB,EAAA;;;;KACpB,gBAAgB,EAAE,aAAa;;;cAI9B,wBAAsB,EAAA;;;;GAM/B,EAAA,KAAA;KACQ,mBAAmB,EAAE,aAAa;cAEjC,iCAA+B,EAAA;;;;;;;;;GAkBxC,EAAA,KAAA;KACQ,4BAA4B,EAAE,aAAa;;cAG1C,4BAA0B,EAAA;;;;;;;;;;;GAM5B,EAAA,KAAA;KACC,uBAAuB,EAAE,aAAa;;;cAIrC,6BAA2B,EAAA;;;;;;;;GAM7B,EAAA,KAAA;KACC,wBAAwB,EAAE,aAAa;KA+BvC;EAEN;;EAEA,SAAS;EACT;;EAEA,MAAM;;EAEN;EAAoB,UAAU;;UAEnB;EACf,SAAS;;EAET,MAAM;;EAEN,gBAAgB,mBAAmB;;;;;;;;iBASrB,uBACd,OAAO,8BACN;;;;;;;;;;;;;;;;;;;;;;;;;cCtJU;KACD,2BAA2B;;UAKtB;;EAEf;;EAEA;;EAEA,yBAAyB;;EAEzB;;;;;;KASU;;;;;;UAOK;EACf;EACA;EACA;EACA;EACA,mBAAmB;EACnB,iBAAiB;EACjB,YAAY;EACZ,SAAS;IACP,cAAc;IACd;IACA,aAAa;;EAEf;IAAW;IAAgC;;;EAE3C;;EAEA;;EAEA;;EAEA;;UAKe;EACf,aAAa;EACb,OAAO;;UAGQ;;EAEf;;EAEA,UAAU;IAAQ;IAAe;;;;;UC7ClB;;EAEf;;EAEA;;EAEA;;EAEA,mBAAmB;;EAEnB;;EAEA;;;KAIU;EACN;EAAoB,MAAM;;EAC1B;EAAoB,UAAU;;UAEnB;EACf,aAAa,OAAO,kBAAkB,0BAA0B,QAAQ;;EAExE,iBAAiB,kBAAkB,SAAS,cAAc,QAAQ;EAClE,mBACE,SAAS,2BACT,SAAS,cACR,QAAQ;EACX,cACE,4BACA,OAAO,WAAW,cAClB,qBACA,SAAS,cACR,QAAQ;WACF,QAAQ;WACR,aAAa;;iBA8IR,mBAAmB,QAAQ,eAAe;;;;;;;;;;iBAqG1C,oBACd,YAAW,QAAQ;EAAkB,MAAM;IAC1C;;;iBAmBa,oBACd,YAAW,QAAQ;EAAkB,MAAM;IAC1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"completion-verifier-asaV1nSj.js","names":[],"sources":["../src/agent-profile.ts","../src/completion-verifier.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport type { AgentProfile } from '@tangle-network/agent-interface'\nimport { type HarnessType, harnessSupportsModel } from '@tangle-network/agent-interface'\nimport { ValidationError } from './errors'\nimport { canonicalString } from './ledger-core/canonical'\n\nexport type { AgentProfile, HarnessType } from '@tangle-network/agent-interface'\n\n/**\n * The agentic coding harnesses an eval sweeps by default — the ones we care about\n * ranking. This is the SINGLE source of that list; consumers import it instead of\n * re-declaring their own (a re-declared list is how the fleet drifts). Pass an\n * explicit `harnesses` (e.g. `harnessTypeSchema.options` for literally every known\n * harness) to widen beyond these.\n */\nexport const CODING_HARNESSES: readonly HarnessType[] = [\n 'opencode',\n 'claude-code',\n 'codex',\n 'kimi-code',\n]\n\nexport interface ProfileAxisSpec {\n /** The domain profile to sweep. Its prompt/tools/skills are held fixed; only the\n * harness and model vary. `model.default` is the fallback model. */\n base: AgentProfile\n /** Harnesses to cross. Default: {@link CODING_HARNESSES}. */\n harnesses?: readonly HarnessType[]\n /** Models to cross. Default: `[base.model.default]` — one model, i.e. today's\n * single-model behaviour, so omitting this never changes an existing run. */\n models?: readonly string[]\n /** Force every (harness, model) pair verbatim, even ones the harness can't run —\n * for deliberately testing failure modes. Default (false): SNAP instead — a\n * vendor-locked harness runs only the swept models in its family, or its native\n * default when it supports none, so no harness is dropped and none gets a\n * guaranteed-failing foreign-model cell. */\n keepIncompatible?: boolean\n}\n\n/** Model sentinel for a vendor-locked harness that supports none of the swept models:\n * it carries no provider prefix, so `harnessSupportsModel` accepts it and the harness\n * resolves it to its own native default model at runtime (e.g. kimi-code → its Kimi\n * model). Lets `expandProfileAxes` snap-instead-of-drop without a per-harness flagship\n * table that would rot as router catalogs change. */\nexport const HARNESS_NATIVE_MODEL = 'default'\n\n/**\n * Expand a base profile across the harness × model matrix into the `AgentProfile[]`\n * that `runProfileMatrix` / `selfImprove` score — the ONE place \"which harnesses ×\n * which models do we evaluate\" lives, so no product hand-rolls its own harness list\n * or column→profile mapping (the pattern that let those copies drift and silently\n * break the harness pivot).\n *\n * Each cell clones `base`, sets the canonical top-level `harness` and `model.default`,\n * and stamps `metadata.harness` + `metadata.harnessModel` for matrix grouping. Both\n * metadata fields are hash-bearing, so every cell gets a distinct `agentProfileId` row\n * and results join back by harness/model via {@link harnessAxisOf} with no\n * hand-recomputed key. A vendor-locked harness snaps to its family's swept models — or\n * its native default ({@link HARNESS_NATIVE_MODEL}) when it supports none — so every\n * requested harness runs; `keepIncompatible` forces every pair verbatim.\n *\n * Omit `harnesses`/`models` to sweep the full default set — the \"turn it on for\n * everything we care about\" switch, identical in shape whether one harness or all.\n */\nexport function expandProfileAxes(spec: ProfileAxisSpec): AgentProfile[] {\n const harnesses = spec.harnesses ?? CODING_HARNESSES\n if (harnesses.length === 0) throw new ValidationError('expandProfileAxes: no harnesses to sweep')\n const baseModel = spec.base.model?.default\n const models = spec.models ?? (baseModel ? [baseModel] : [])\n if (models.length === 0) {\n throw new ValidationError(\n 'expandProfileAxes: no models to sweep — base profile has no model.default and none were supplied',\n )\n }\n const out: AgentProfile[] = []\n const seen = new Set<string>()\n for (const harness of harnesses) {\n // A universal (router-backed) harness — opencode/pi/claudish, and claude-code/codex\n // since agent-interface 5.6.0 — runs every swept model. A vendor-locked harness\n // (kimi-code) runs only the swept models in its own family; when it supports NONE\n // of them it snaps to its native default (the `HARNESS_NATIVE_MODEL` sentinel it\n // resolves at runtime) rather than being dropped, so every requested harness still appears in the\n // sweep on a model it can actually run — e.g. sweeping `deepseek/x` puts opencode\n // on deepseek and kimi-code on its own Kimi model, a real head-to-head.\n // `keepIncompatible` forces every (harness, model) pair verbatim (failure-mode runs).\n const supported = spec.keepIncompatible\n ? models\n : models.filter((model) => harnessSupportsModel(harness, model))\n const effective = supported.length > 0 ? supported : [HARNESS_NATIVE_MODEL]\n for (const model of effective) {\n const profile: AgentProfile = {\n ...spec.base,\n harness,\n name: `${spec.base.name ?? 'agent'}/${harness}/${model}`,\n model: { ...spec.base.model, default: model },\n metadata: { ...(spec.base.metadata ?? {}), harness, harnessModel: model },\n }\n const id = agentProfileId(profile)\n if (seen.has(id)) continue\n seen.add(id)\n out.push(profile)\n }\n }\n if (out.length === 0) {\n // Unreachable in normal use — snapping guarantees ≥1 cell per harness — but keep a\n // fail-closed guard so a future refactor can't silently produce an empty sweep.\n throw new ValidationError(\n `expandProfileAxes: produced no profiles (harnesses=[${harnesses.join(', ')}], models=[${models.join(', ')}]).`,\n )\n }\n return out\n}\n\n/**\n * Read the (harness, model) a matrix cell ran under, off a profile or a result row's\n * profile — the join-back for a `byHarness` pivot. Returns undefined when the profile\n * wasn't produced by {@link expandProfileAxes}. Callers group `result.byProfile` by\n * this instead of recomputing an id (recomputing the wrong key is what broke the pivot\n * in the hand-rolled copies).\n */\nexport function harnessAxisOf(\n profile: Pick<AgentProfile, 'metadata'>,\n): { harness: HarnessType; model: string } | undefined {\n const m = profile.metadata as Record<string, unknown> | undefined\n const harness = m?.harness\n const model = m?.harnessModel\n if (typeof harness === 'string' && typeof model === 'string') {\n return { harness: harness as HarnessType, model }\n }\n return undefined\n}\n\n/**\n * Collision-resistant, path-safe, human-readable profile id for eval artifacts.\n * Scorecard joins still use `agentProfileHash`; this id is for run ids, matrix\n * keys, and directory names where two profiles must not collapse onto one row.\n * The suffix is the first 64 bits of the behaviour hash, enough for ordinary\n * eval matrices while keeping filenames readable.\n */\nexport function agentProfileId(profile: AgentProfile): string {\n const label = pathSafeProfileLabel(agentProfileDisplayLabel(profile)) ?? 'profile'\n return `${label}-${agentProfileHash(profile).slice(0, 16)}`\n}\n\n/**\n * Model snapshot used for `RunRecord.model`. Eval surfaces require a concrete\n * model id because run records reject bare/missing model aliases.\n */\nexport function agentProfileModelId(profile: AgentProfile): string {\n const model = profile.model?.default?.trim()\n if (!model) {\n const label = agentProfileDisplayLabel(profile) ?? 'unnamed profile'\n throw new ValidationError(\n `AgentProfile \"${label}\" has no model.default — cannot record eval run`,\n )\n }\n return model\n}\n\nfunction agentProfileDisplayLabel(profile: AgentProfile): string | undefined {\n return profile.name?.trim() || profile.version?.trim() || undefined\n}\n\nfunction pathSafeProfileLabel(label: string | undefined): string | undefined {\n const safe = label\n ?.trim()\n .replace(/[^A-Za-z0-9._-]+/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '')\n return safe || undefined\n}\n\nfunction compact<T extends Record<string, unknown>>(input: T): Partial<T> {\n const out: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(input)) {\n if (value !== undefined) out[key] = value\n }\n return out as Partial<T>\n}\n\n/**\n * Deterministic behaviour identity for the canonical\n * `@tangle-network/agent-interface` AgentProfile.\n *\n * `name` and `description` are labels and do not affect the hash. Profile\n * `version`, prompt, model hints, tools, resources, hooks, modes, permissions,\n * and extensions do affect the hash. Resource array order is hash-bearing\n * because mount order can change agent behaviour. Undefined fields are treated\n * as absent; explicit `null` fields remain hash-bearing.\n */\nexport function agentProfileHash(profile: AgentProfile): string {\n const model = agentProfileModelId(profile)\n const behaviour = compact({\n ...profile,\n name: undefined,\n description: undefined,\n tags: profile.tags ? [...profile.tags].sort() : undefined,\n model: compact({ ...profile.model, default: model }),\n })\n return createHash('sha256').update(canonicalString(behaviour)).digest('hex')\n}\n","/**\n * Completion verifier — the task-completion oracle.\n *\n * Answers the only eval question that is not a proxy: did the agent actually\n * COMPLETE the task — produce every required deliverable, persisted and\n * correct — rather than describe what should be done. A fluent transcript\n * that never produces the artifact scores zero here.\n *\n * Per requirement, a two-stage check:\n * 1. Structural — a produced item (vault artifact / approved proposal /\n * tool call) of the right kind is matched against the requirement and\n * carries non-empty content. Deterministic; no LLM.\n * 2. Correctness — only if structurally present AND the matched item\n * carries content, one targeted check decides whether that item\n * actually fulfils the requirement. A hallucinated artifact fails here;\n * an absent one already failed stage 1.\n *\n * `completionRate` is satisfied / MEASURABLE requirements (unmeasured rows —\n * checker failures — are excluded from the denominator, never scored as\n * zeros). Quality dimensions are meaningless on an incomplete task — callers\n * gate on `fullyComplete` / `completionRate` before scoring quality.\n */\n\nimport { randomUUID } from 'node:crypto'\nimport type { ChatClient, ChatRequest } from './analyst/chat-client'\nimport type { ValidatedArtifact } from './artifact-validator'\nimport { CostLedger, type CostLedgerHandle } from './cost-ledger'\nimport { assertServedModel, ModelSubstitutionError } from './integrity/served-model'\nimport { recoverTruncatedJson } from './json-recovery'\nimport { JudgeParseError } from './judges'\nimport {\n costReceiptFromLlm,\n costReceiptFromLlmError,\n maximumChargeForLlmRequest,\n} from './llm-client'\nimport type { RawProviderEvent, RawProviderSink } from './trace/raw-provider-sink'\nimport {\n certificationEvidenceDigest,\n type DefaultVerdict,\n type VerdictCertification,\n} from './verdict'\nimport type { CheckerIdentity, VerificationStrategySource } from './verification-strategy'\n\n/** What kind of produced state can satisfy a requirement structurally. */\nexport type SatisfiedBy = 'artifact' | 'proposal' | 'tool-call' | 'any'\n\nexport interface CompletionRequirement {\n /** Stable id from the task gold (e.g. a persona's `expected_requirements[].req_id`). */\n reqId: string\n /** Human-readable description of the required deliverable. */\n title: string\n /** Optional kind/category hint, matched against a produced item's kind. */\n category?: string\n /** What produced state satisfies this requirement. Defaults to 'any'. */\n satisfiedBy?: SatisfiedBy\n}\n\nexport interface TaskGold {\n taskId: string\n requirements: CompletionRequirement[]\n}\n\nexport interface ProducedProposal {\n id: string\n title: string\n status: 'pending' | 'approved' | 'rejected'\n /** Optional persisted body — when present, enables a correctness check. */\n content?: string\n}\n\n/** Everything observable about what a run actually produced. */\nexport interface ProducedState {\n /** Persisted vault artifacts. Reuses the shared `ValidatedArtifact` shape. */\n artifacts: ValidatedArtifact[]\n /** Proposals / filings the agent created. */\n proposals: ProducedProposal[]\n /** Names of tools the agent invoked. */\n toolCalls: string[]\n}\n\nexport interface RequirementCheck {\n reqId: string\n title: string\n /** A produced item of the right kind matched the requirement, non-empty. */\n structurallyPresent: boolean\n /**\n * Whether the matched item actually fulfils the requirement. `null` when\n * not structurally present, when the matched item carries no content\n * to assess, or when the correctness check itself failed (`unmeasured`).\n */\n correct: boolean | null\n /** structurallyPresent && !unmeasured && correct !== false. */\n satisfied: boolean\n /**\n * Set when the correctness check itself errored (LLM call failure or an\n * unparseable response after retry). The requirement's fulfilment is\n * UNKNOWN — `correct` stays null, `satisfied` is false, and\n * `completionVerdict` excludes the row from `completionRate`'s\n * denominator. Never folded into a zero: a synthetic zero is\n * indistinguishable from a real failure (see `JudgeParseError`).\n */\n unmeasured?: true\n /** Why the correctness check could not be measured (present iff `unmeasured`). */\n unmeasuredReason?: string\n /** Human-readable evidence for the verdict. */\n evidence: string[]\n}\n\n/** Extends the substrate verdict spine: `valid` = `fullyComplete` and\n * `score` = `completionRate` — derived in `completionVerdict()`, the one\n * place those equalities hold by construction. */\nexport interface CompletionVerdict extends DefaultVerdict {\n taskId: string\n requirements: RequirementCheck[]\n /** satisfied / MEASURABLE requirements (unmeasured rows leave the denominator). */\n completionRate: number\n /** Every measurable requirement satisfied (false when anything is unmeasured). */\n fullyComplete: boolean\n /** Requirements whose correctness check errored — reported, never scored as zero. */\n unmeasuredCount: number\n}\n\n/**\n * Construct a `CompletionVerdict` from the per-requirement checks, deriving\n * `completionRate` / `fullyComplete` and the spine fields (`valid` =\n * `fullyComplete`, `score` = `completionRate`) in one place. Throws on zero\n * requirements — a verdict over nothing is a misconfiguration, mirroring\n * `verifyCompletion`'s gold-spec guard.\n */\nexport function completionVerdict(input: {\n taskId: string\n requirements: RequirementCheck[]\n /** What certified the correctness stage, when anything did. Omitted =\n * an uncertified verdict — the honest default for a bare checker. */\n certification?: VerdictCertification\n}): CompletionVerdict {\n if (input.requirements.length === 0) {\n throw new Error(\n `completionVerdict: task '${input.taskId}' has no requirement checks — nothing to derive a verdict from`,\n )\n }\n const measurable = input.requirements.filter((r) => !r.unmeasured)\n const unmeasuredCount = input.requirements.length - measurable.length\n if (measurable.length === 0) {\n // Every check errored: this is an infrastructure failure, not a scored\n // run. A 0-rate verdict here would be a fabricated measurement.\n throw new Error(\n `completionVerdict: task '${input.taskId}' has no measurable requirements — all ${input.requirements.length} correctness checks failed (${input.requirements[0]?.unmeasuredReason ?? 'unknown reason'})`,\n )\n }\n const satisfiedCount = measurable.filter((r) => r.satisfied).length\n const completionRate = satisfiedCount / measurable.length\n // A run with unmeasured rows can still report a rate over what WAS\n // measured, but must not claim full completion.\n const fullyComplete = unmeasuredCount === 0 && satisfiedCount === measurable.length\n return {\n taskId: input.taskId,\n requirements: input.requirements,\n completionRate,\n fullyComplete,\n unmeasuredCount,\n valid: fullyComplete,\n score: completionRate,\n ...(input.certification === undefined ? {} : { certification: input.certification }),\n }\n}\n\n/**\n * What a correctness checker declares about itself so the completion\n * verdict can carry a certification: which strategy member it discharges,\n * its exact identity, and the steps its answers rest on unverified.\n */\nexport interface CorrectnessCheckerAttestation {\n strategy: VerificationStrategySource\n checker: CheckerIdentity\n assumptions: string[]\n}\n\n/**\n * Decides whether a produced item's content actually fulfils a requirement.\n * Injected so the structural verifier stays pure and unit-testable; the\n * production implementation is `createLlmCorrectnessChecker`.\n *\n * `attestation` is optional metadata on the function value: a checker that\n * carries one yields certified completion verdicts; a bare function yields\n * the same verdict uncertified. A plain arrow function remains a valid\n * checker.\n */\nexport interface CorrectnessChecker {\n (\n requirement: CompletionRequirement,\n content: string,\n ): Promise<{ correct: boolean; reason: string }>\n attestation?: CorrectnessCheckerAttestation\n}\n\nconst STOPWORDS = new Set([\n 'the',\n 'a',\n 'an',\n 'of',\n 'for',\n 'and',\n 'or',\n 'to',\n 'in',\n 'on',\n 'with',\n 'by',\n])\n\n// Deliverable-FORM vocabulary — words that name the SHAPE of an output, not its\n// domain content. A correct \"swap-comparison view persisted as a ui/** artifact\"\n// is an OpenUI JSON whose body says nothing about \"artifact\" / \"persisted\" /\n// \"view\"; the discriminative tokens are the domain nouns (swap, comparison).\n// Stripped from the REQUIREMENT side of structural recall so a deliverable is\n// matched on what it IS about, not on the boilerplate describing its form. The\n// correctness checker strips the same class via TITLE_STOPWORDS. Anti-game holds:\n// the distinctive domain tokens remain, so an off-topic item still fails.\nconst REQUIREMENT_FORM_STOPWORDS = new Set([\n 'generated',\n 'generate',\n 'view',\n 'render',\n 'rendered',\n 'persisted',\n 'persist',\n 'artifact',\n 'file',\n 'document',\n 'note',\n 'proposal',\n 'deliverable',\n 'output',\n 'created',\n 'create',\n 'produce',\n 'produced',\n 'flag',\n])\n\nconst MATCH_THRESHOLD = 0.5\nconst MIN_CONTENT_CHARS = 50\n\nfunction tokens(s: string, extraStop?: Set<string>): Set<string> {\n return new Set(\n s\n .toLowerCase()\n .split(/[^a-z0-9]+/)\n .filter((t) => t.length > 1 && !STOPWORDS.has(t) && !extraStop?.has(t)),\n )\n}\n\n/**\n * Recall of the requirement's tokens within a candidate's identifying text.\n * Recall, not Jaccard — a candidate's path/id legitimately carries extra\n * tokens the requirement does not name. The requirement side drops\n * deliverable-FORM vocabulary so recall keys on the distinctive domain tokens.\n */\nfunction tokenRecall(requirementText: string, candidateText: string): number {\n const req = tokens(requirementText, REQUIREMENT_FORM_STOPWORDS)\n if (req.size === 0) return 0\n const cand = tokens(candidateText)\n let hit = 0\n for (const t of req) if (cand.has(t)) hit++\n return hit / req.size\n}\n\ninterface Candidate {\n reqIndex: number\n /** Unique key for a produced item — each item satisfies at most one requirement. */\n itemKey: string\n score: number\n evidence: string\n /** Content to correctness-check, or null when the matched item has none. */\n content: string | null\n}\n\nfunction artifactCandidates(\n req: CompletionRequirement,\n reqIndex: number,\n artifacts: ValidatedArtifact[],\n): Candidate[] {\n const reqText = `${req.title} ${req.category ?? ''}`\n const out: Candidate[] = []\n artifacts.forEach((a, i) => {\n if ((a.content ?? '').trim().length < MIN_CONTENT_CHARS) return\n // Match against the artifact CONTENT too, not just its path + kind — a\n // generated view / note whose path is generic still satisfies a requirement\n // when its body covers it (e.g. an OpenUI comparison grounded in the on-file\n // figures). Bounded slice keeps the recall text cheap; MATCH_THRESHOLD holds.\n let score = tokenRecall(\n reqText,\n `${a.path ?? ''} ${a.kind} ${(a.content ?? '').slice(0, 4000)}`,\n )\n if (req.category && a.kind && req.category.toLowerCase() === a.kind.toLowerCase()) {\n score = Math.max(score, 1)\n }\n if (score < MATCH_THRESHOLD) return\n out.push({\n reqIndex,\n itemKey: `artifact:${i}`,\n score,\n evidence: `artifact '${a.path ?? a.kind}' matched (token recall ${score.toFixed(2)})`,\n content: a.content ?? null,\n })\n })\n return out\n}\n\nfunction proposalCandidates(\n req: CompletionRequirement,\n reqIndex: number,\n proposals: ProducedProposal[],\n): Candidate[] {\n const reqText = `${req.title} ${req.category ?? ''}`\n const out: Candidate[] = []\n for (const p of proposals) {\n // Pending or rejected work is not a completed deliverable.\n if (p.status !== 'approved') continue\n // A proposal needs an assessable BODY to be a deliverable. A bare title is\n // not completion: correctness cannot be judged on it, so a title-only match\n // would auto-pass the oracle (structurallyPresent && correct===null →\n // satisfied) with no verifiable content. Tool calls are the only\n // legitimately content-less deliverable (`toolCallCandidates`).\n const body = (p.content ?? '').trim()\n if (body.length < MIN_CONTENT_CHARS) continue\n // Match against the body as well as the (often short) title — a refusal /\n // flag / analysis proposal whose title is a label still satisfies a\n // descriptively-worded requirement when its content covers it. MATCH_THRESHOLD\n // + the requirement's distinctive tokens keep an off-topic proposal out;\n // correctness (a SEMANTIC checker, NOT this lexical pass) then judges\n // polarity/fulfilment, so a negation that merely contains the tokens fails.\n // Structural and correctness must use different evidence or the two-stage\n // check collapses to one lexical gate.\n const score = tokenRecall(reqText, `${p.title} ${body}`)\n if (score < MATCH_THRESHOLD) continue\n out.push({\n reqIndex,\n itemKey: `proposal:${p.id}`,\n score,\n evidence: `approved proposal '${p.title}' matched (token recall ${score.toFixed(2)})`,\n content: body,\n })\n }\n return out\n}\n\nfunction toolCallCandidates(\n req: CompletionRequirement,\n reqIndex: number,\n toolCalls: string[],\n): Candidate[] {\n const out: Candidate[] = []\n toolCalls.forEach((name, i) => {\n const score = tokenRecall(req.title, name)\n if (score < MATCH_THRESHOLD) return\n out.push({\n reqIndex,\n itemKey: `tool:${i}`,\n score,\n evidence: `tool call '${name}' matched (token recall ${score.toFixed(2)})`,\n content: null,\n })\n })\n return out\n}\n\n/**\n * Verify whether a run completed the task. `checkCorrectness` is injected —\n * `createLlmCorrectnessChecker` for production, a deterministic stub in tests.\n *\n * Throws on a gold spec with no requirements: an eval task that requires\n * nothing is a misconfiguration, not a vacuously-complete task.\n */\nexport async function verifyCompletion(\n gold: TaskGold,\n state: ProducedState,\n checkCorrectness: CorrectnessChecker,\n): Promise<CompletionVerdict> {\n if (gold.requirements.length === 0) {\n throw new Error(\n `verifyCompletion: task '${gold.taskId}' has no requirements — malformed gold spec`,\n )\n }\n\n // Collect every above-threshold (requirement, produced-item) candidate, then\n // assign greedily by descending score: each requirement and each produced\n // item is used at most once. One deliverable fulfils one requirement.\n const candidates: Candidate[] = []\n gold.requirements.forEach((req, i) => {\n const by = req.satisfiedBy ?? 'any'\n if (by === 'artifact' || by === 'any') {\n candidates.push(...artifactCandidates(req, i, state.artifacts))\n }\n if (by === 'proposal' || by === 'any') {\n candidates.push(...proposalCandidates(req, i, state.proposals))\n }\n if (by === 'tool-call' || by === 'any') {\n candidates.push(...toolCallCandidates(req, i, state.toolCalls))\n }\n })\n candidates.sort((a, b) => b.score - a.score)\n\n const assigned = new Map<number, Candidate>()\n const itemTaken = new Set<string>()\n for (const c of candidates) {\n if (assigned.has(c.reqIndex) || itemTaken.has(c.itemKey)) continue\n assigned.set(c.reqIndex, c)\n itemTaken.add(c.itemKey)\n }\n\n const requirements: RequirementCheck[] = []\n for (let i = 0; i < gold.requirements.length; i++) {\n const req = gold.requirements[i]!\n const match = assigned.get(i)\n const evidence: string[] = []\n let correct: boolean | null = null\n let unmeasuredReason: string | undefined\n\n if (match) {\n evidence.push(match.evidence)\n if (match.content !== null) {\n try {\n const r = await checkCorrectness(req, match.content)\n correct = r.correct\n evidence.push(`correctness: ${r.correct ? 'pass' : 'fail'} — ${r.reason}`)\n } catch (err) {\n // The CHECKER failed, not the requirement. Recording this as a\n // zero would fabricate a model failure out of an infrastructure\n // one; the requirement is unmeasured and leaves the denominator.\n unmeasuredReason =\n err instanceof JudgeParseError\n ? `checker response unparseable after retry: ${err.raw.slice(0, 200)}`\n : `checker call failed: ${err instanceof Error ? err.message : String(err)}`\n evidence.push(`correctness: UNMEASURED — ${unmeasuredReason}`)\n }\n } else {\n evidence.push('correctness: not assessed — matched item carries no content')\n }\n } else {\n const by = req.satisfiedBy ?? 'any'\n const kind = by === 'any' ? 'artifact/proposal/tool-call' : by\n evidence.push(`no produced ${kind} matched this requirement`)\n }\n\n const structurallyPresent = match !== undefined\n const unmeasured = unmeasuredReason !== undefined\n const satisfied = structurallyPresent && !unmeasured && correct !== false\n requirements.push({\n reqId: req.reqId,\n title: req.title,\n structurallyPresent,\n correct,\n satisfied,\n ...(unmeasured ? { unmeasured: true as const, unmeasuredReason } : {}),\n evidence,\n })\n }\n\n // The verdict blends the deterministic structural stage with the injected\n // correctness stage, so the certification names the checker's own member\n // and carries the structural stage's lexical nature as an assumption. A\n // checker without an attestation yields an uncertified verdict.\n const attestation = checkCorrectness.attestation\n const certification: VerdictCertification | undefined = attestation\n ? {\n strategy: attestation.strategy,\n checker: attestation.checker,\n assumptions: [\n 'structural matching is lexical token recall over produced items — the correctness stage only sees items it matched',\n ...attestation.assumptions,\n ],\n evidenceDigest: certificationEvidenceDigest({ taskId: gold.taskId, requirements }),\n }\n : undefined\n\n return completionVerdict({\n taskId: gold.taskId,\n requirements,\n ...(certification === undefined ? {} : { certification }),\n })\n}\n\nexport interface LlmCorrectnessCheckerOpts {\n model?: string\n /** Optional ledger for direct use. */\n costLedger?: CostLedgerHandle\n costPhase?: string\n costTags?: Record<string, string>\n signal?: AbortSignal\n /** Max chars of artifact content sent to the checker. */\n maxContentChars?: number\n /**\n * Checker LLM calls per requirement before giving up (parse failures and\n * call errors both consume attempts). The failure then surfaces as an\n * `unmeasured` requirement, never a zero.\n */\n maxAttempts?: number\n /**\n * Forensic capture of every checker request/response/error — without it a\n * checker failure is unauditable (the agent-turn raws never contain the\n * checker's own calls). Same sink contract as `LlmClient`.\n */\n rawSink?: RawProviderSink\n}\n\n/**\n * Parse the correctness checker's model response. Tolerates a response\n * truncated mid-JSON (max_tokens cap) by auto-closing the prefix — the\n * verdict boolean usually lands in the first few tokens, so a recovered\n * prefix with a boolean `correct` is a real measurement, not a guess.\n * Fails loud (JudgeParseError) when no boolean verdict is recoverable.\n */\nfunction parseCorrectnessResponse(raw: string): { correct: boolean; reason: string } {\n const readVerdict = (candidate: unknown): { correct: boolean; reason: string } | null => {\n if (candidate === null || typeof candidate !== 'object') return null\n const { correct, reason } = candidate as { correct?: unknown; reason?: unknown }\n if (typeof correct !== 'boolean') return null\n return { correct, reason: typeof reason === 'string' ? reason : '' }\n }\n\n const match = raw.match(/\\{[\\s\\S]*\\}/)\n if (match) {\n try {\n const strict = readVerdict(JSON.parse(match[0]))\n if (strict) return strict\n } catch {\n // fall through to truncation recovery\n }\n }\n // The strict path needs a closing `}`; a cap-hit response has none. Take\n // everything from the first `{` and auto-close it.\n const start = raw.indexOf('{')\n if (start !== -1) {\n const recovered = readVerdict(recoverTruncatedJson(raw.slice(start)))\n if (recovered) return recovered\n }\n throw new JudgeParseError('correctness-checker', raw)\n}\n\n/**\n * Production `CorrectnessChecker` — one LLM call per matched artifact,\n * deterministic (temperature 0), structured JSON out. Judges fulfilment\n * only: a plan, a gesture, or a description of what should be done does not\n * fulfil a requirement — the artifact must BE the deliverable.\n */\nexport function createLlmCorrectnessChecker(\n chat: ChatClient,\n opts: LlmCorrectnessCheckerOpts = {},\n): CorrectnessChecker {\n const model = opts.model ?? 'claude-sonnet-4-6'\n const maxContentChars = opts.maxContentChars ?? 8000\n const maxAttempts = opts.maxAttempts ?? 2\n const costLedger = opts.costLedger ?? new CostLedger()\n const sink = opts.rawSink\n const record = async (event: RawProviderEvent): Promise<void> => {\n // Forensic capture is best-effort; the verdict is the system of record.\n try {\n await sink?.record(event)\n } catch {\n // Intentionally swallowed.\n }\n }\n const checker: CorrectnessChecker = async (requirement, content) => {\n const request = {\n model,\n messages: [\n {\n role: 'system' as const,\n content:\n 'You verify whether a produced work artifact actually fulfils a stated requirement. Judge fulfilment only — is the deliverable substantively present and on-point — not polish. A plan to do it later, a vague gesture, or a description of what should be done does NOT fulfil a requirement; the artifact must BE the deliverable. Respond with a single JSON object: {\"correct\": boolean, \"reason\": string (<= 30 words)}.',\n },\n {\n role: 'user' as const,\n content: `Requirement: ${requirement.title}\\n${\n requirement.category ? `Category: ${requirement.category}\\n` : ''\n }\\nProduced artifact:\\n${content.slice(0, maxContentChars)}`,\n },\n ],\n temperature: 0,\n maxTokens: 200,\n } satisfies ChatRequest\n let lastErr: unknown\n for (let attempt = 0; attempt < maxAttempts; attempt++) {\n const started = Date.now()\n await record({\n eventId: randomUUID(),\n provider: chat.transport,\n model,\n endpoint: '/chat',\n baseUrl: '',\n attemptIndex: attempt,\n direction: 'request',\n timestamp: started,\n requestBody: request,\n redactedFields: [],\n })\n try {\n const paid = await costLedger.runPaidCall({\n channel: 'verifier',\n phase: opts.costPhase ?? 'completion.correctness',\n actor: 'correctness-checker',\n model,\n maximumCharge:\n chat.maximumAttempts === undefined\n ? undefined\n : maximumChargeForLlmRequest(request, { maximumAttempts: chat.maximumAttempts }),\n tags: {\n ...opts.costTags,\n requirementId: requirement.reqId,\n attempt: String(attempt),\n },\n signal: opts.signal,\n execute: (signal, callId) => chat.chat(request, { signal, idempotencyKey: callId }),\n receipt: costReceiptFromLlm,\n receiptFromError: costReceiptFromLlmError,\n })\n if (!paid.succeeded) throw paid.error\n const resp = paid.value\n // Hold the transport to its own word: a verdict produced by a model\n // other than the one requested is not this model's verdict. A\n // transport that echoes no id cannot be made to prove identity here —\n // callers needing that proof enable it at the client\n // (`LlmClientOptions.assertServedModel`) or gate on `assertModelsServed`.\n assertServedModel(model, resp.servedModel, {\n allowUnreported: true,\n context: `correctness checker for requirement ${requirement.reqId}`,\n })\n const raw = resp.content\n await record({\n eventId: randomUUID(),\n provider: chat.transport,\n model,\n endpoint: '/chat',\n baseUrl: '',\n attemptIndex: attempt,\n direction: 'response',\n timestamp: Date.now(),\n durationMs: Date.now() - started,\n responseBody: resp,\n redactedFields: [],\n })\n return parseCorrectnessResponse(raw)\n } catch (err) {\n lastErr = err\n await record({\n eventId: randomUUID(),\n provider: chat.transport,\n model,\n endpoint: '/chat',\n baseUrl: '',\n attemptIndex: attempt,\n direction: 'error',\n timestamp: Date.now(),\n durationMs: Date.now() - started,\n errorMessage: err instanceof Error ? err.message : String(err),\n redactedFields: [],\n })\n // Substitution is a verdict about identity, not a transient fault:\n // another attempt reaches the same wrong model and spends more tokens.\n if (err instanceof ModelSubstitutionError) throw err\n }\n }\n throw lastErr instanceof Error ? lastErr : new Error(String(lastErr))\n }\n checker.attestation = {\n strategy: 'judge',\n checker: { name: 'llm-correctness-checker', version: model },\n assumptions: [\n 'served-model identity is accepted when the transport reports none (assertServedModel allowUnreported)',\n ],\n }\n return checker\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAeA,MAAa,mBAA2C;CACtD;CACA;CACA;CACA;AACF;;;;;;AAwBA,MAAa,uBAAuB;;;;;;;;;;;;;;;;;;;AAoBpC,SAAgB,kBAAkB,MAAuC;CACvE,MAAM,YAAY,KAAK,aAAa;CACpC,IAAI,UAAU,WAAW,GAAG,MAAM,IAAI,gBAAgB,0CAA0C;CAChG,MAAM,YAAY,KAAK,KAAK,OAAO;CACnC,MAAM,SAAS,KAAK,WAAW,YAAY,CAAC,SAAS,IAAI,CAAC;CAC1D,IAAI,OAAO,WAAW,GACpB,MAAM,IAAI,gBACR,kGACF;CAEF,MAAM,MAAsB,CAAC;CAC7B,MAAM,uBAAO,IAAI,IAAY;CAC7B,KAAK,MAAM,WAAW,WAAW;EAS/B,MAAM,YAAY,KAAK,mBACnB,SACA,OAAO,QAAQ,UAAU,qBAAqB,SAAS,KAAK,CAAC;EACjE,MAAM,YAAY,UAAU,SAAS,IAAI,YAAY,CAAC,oBAAoB;EAC1E,KAAK,MAAM,SAAS,WAAW;GAC7B,MAAM,UAAwB;IAC5B,GAAG,KAAK;IACR;IACA,MAAM,GAAG,KAAK,KAAK,QAAQ,QAAQ,GAAG,QAAQ,GAAG;IACjD,OAAO;KAAE,GAAG,KAAK,KAAK;K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;MAAQ,gBAAgB;KAAO,CAAC;KAClF,SAAS;KACT,kBAAkB;IACpB,CAAC;IACD,IAAI,CAAC,KAAK,WAAW,MAAM,KAAK;IAChC,MAAM,OAAO,KAAK;IAMlB,kBAAkB,OAAO,KAAK,aAAa;KACzC,iBAAiB;KACjB,SAAS,uCAAuC,YAAY;IAC9D,CAAC;IACD,MAAM,MAAM,KAAK;IACjB,MAAM,OAAO;KACX,SAAS,WAAW;KACpB,UAAU,KAAK;KACf;KACA,UAAU;KACV,SAAS;KACT,cAAc;KACd,WAAW;KACX,WAAW,KAAK,IAAI;KACpB,YAAY,KAAK,IAAI,IAAI;KACzB,cAAc;KACd,gBAAgB,CAAC;IACnB,CAAC;IACD,OAAO,yBAAyB,GAAG;GACrC,SAAS,KAAK;IACZ,UAAU;IACV,MAAM,OAAO;KACX,SAAS,WAAW;KACpB,UAAU,KAAK;KACf;KACA,UAAU;KACV,SAAS;KACT,cAAc;KACd,WAAW;KACX,WAAW,KAAK,IAAI;KACpB,YAAY,KAAK,IAAI,IAAI;KACzB,cAAc,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;KAC7D,gBAAgB,CAAC;IACnB,CAAC;IAGD,IAAI,eAAe,wBAAwB,MAAM;GACnD;EACF;EACA,MAAM,mBAAmB,QAAQ,UAAU,IAAI,MAAM,OAAO,OAAO,CAAC;CACtE;CACA,QAAQ,cAAc;EACpB,UAAU;EACV,SAAS;GAAE,MAAM;GAA2B,SAAS;EAAM;EAC3D,aAAa,CACX,uGACF;CACF;CACA,OAAO;AACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cost-ledger-C1W3ICmP.d.ts","names":[],"sources":["../src/cost-ledger/contract.ts","../src/cost-ledger.ts"],"mappings":";KAGY;;KAGA;EACN;EAAkB;;EAClB;EAAmB;;EACnB;EAAoB;;;UAGT;EACf,QAAQ;EACR,SAAS;;EAET;IACM;IAAmB;;IACnB;IAAoB;IAAe;;;EAEzC,SAAS;IACP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eAAe;;EA8GnE,YAAY,UAAS,wBAA6B;;EA0BxD,UACE,gBACA,UAAU,kBACV;IAAW;IAAkB;MAC5B;EAiBH,KAAK,SAAS,mBAAmB;;EAQjC,YAAY,SAAS,mBAAmB;EAcxC,QAAQ,SAAS,mBAAmB;EAIpC,cAAc;EAYd;UAIc;UAoDN;UAsCA;UAKM;UAoBN;UAmBA;UAkBA;UAcA;;UAgCA;UAwBA;UAYA;UAMA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataset-DQqhOCPt.d.ts","names":[],"sources":["../src/dataset.ts"],"mappings":";;;;;;;;;;;;;;;;;KAiBY;KACA;UAEK;EACf;;EAEA;EACA,QAAQ;EACR,aAAa;;EAEb;;;;;;;;;;EAUA;EACA,OAAO;;UAGQ;EACf;EACA;EACA;EACA;EACA;;EAEA;;UAGe;EACf;EACA,YAAY;;EAEZ;EACA;EACA,aAAa,OAAO;;UAGZ;EACR,QAAQ;EACR,aAAa;;EAEb;EACA;;EAEA,UAAU,UAAU;;EAEpB;;cAeW;WACF;WACA,YAAY;UACb;UACA;EAER,YAAY;IACV;IACA,YAAY;IACZ,WAAW;IACX;;;EASF,gBAAgB;MAIZ;;;;;EAQJ,MAAM,UAAS,eAAoB;;;;;EAqB7B,YAAY,QAAQ;;EAgB1B,MAAM,YAAW;IAAU;IAAc;OAA0B;EAWnE;EAIA,IAAI,UAAU;EAQd,OAAO;;;;;;EAYP;SAQO,UACL,eACA,UAAU,KAAK,oEACd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-registry-CLG5YqGS.d.ts","names":[],"sources":["../src/analyst/behavioral-trace-questions.ts","../src/analyst/behavioral-analyst.ts","../src/analyst/kind-factory.ts","../src/analyst/default-registry.ts"],"mappings":";;;;;;;;cAYa;;cAGA;;aAET;aACA;aAEA;eACE;eACA;eACA;;;;aAIF;aACA;aAEA;eACE;eACA;eACA;;;;aAIF;aACA;aAEA;eACE;eACA;eACA;;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,mBACd,YAAY,wBACZ,SAAS,4BACR,oBAAoB;;;UCrKN;;;;;;EAMf,SAAS;EACT,uBAAuB;;EAEvB;EACA,aAAa;EACb,WAAW;;iBAGG,4BACd,UAAS,gCACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"define-agent-eval-JKt3gMQr.d.ts","names":["_$__0.FinalEvidenceUse","_$__0.GateResult"],"sources":["../src/campaign/presets/run-final-comparison.ts","../src/contract/self-improve-method.ts","../src/contract/self-improve.ts","../src/contract/define-agent-eval.ts"],"mappings":";;;;;;;;;;UAaU,uBAAuB,kBAAkB,UAAU,mBACnD,KAAK,mBAAmB,WAAW;EAC3C,iBAAiB;EACjB,eAAe;EACf,sBACE,SAAS,gBACT,UAAU,WACV,KAAK,WAAW,mBAAmB,WAAW,+BAC3C,QAAQ;EACb,MAAM,KAAK,WAAW;EACtB,QAAQ;EACR,gBAAgB;EAChB;EACA;EACA,cAAc,QAAQ,gBAAgB,UAAU,mBAAmB;;;iBAI/C,mBAAmB,kBAAkB,UAAU,WACnE,MAAM,uBAAuB,WAAW,aAAU;;;;;;;;;;;;kBAA5CA;;;;;;;;;;;UCAS;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBAAoB,YAAY,0BAA0B;EAC1D,QAAQ;EACR;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA,sBAAsB;;EAExB,MAAM,QAAQ,kBAAkB;EAChC;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;;UAGe,wBAAwB,kBAAkB,UAAU,mBAC3D,KACN,0BAA0B,WAAW;EAWvC;IAAa,UAAU;IAAiB,QAAQ;;EAChD,uBAAuB;EACvB;;EAEA,UAAU,0BAA0B,WAAW;EAC/C,QAAQ,KAAK,0BAA0B,WAAW;IAChD;;EAEF,YAAY;EACZ,cAAc,YAAY,0BAA0B,WAAW;;EAE/D,MAAM;;EAEN,YAAY;EACZ,UAAU,0BAA0B,WAAW;EAC/C,KAAK,QAAQ,k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,YAAY,WAAW;;EAEhC;;KAGU,wBAAwB,kBAAkB,UAAU,aAAa,KAC3E,QAAQ,mBAAmB,WAAW;EAGtC,SAAS,QAAQ;EACjB,eAAe,QAAQ;;UAGR,iBAAiB,kBAAkB,UAAU;;WAEnD,oBAAoB;;WAEpB,iBAAiB;;;;;EAK1B,SACE,OAAO,yBAAyB,WAAW,aAC1C,QAAQ,eAAe,WAAW;;;;;;;EAOrC,QACE,OAAO,wBAAwB,WAAW,aACzC,QAAQ,kBAAkB,WAAW;;;;;;;;;iBAU1B,gBAAgB,kBAAkB,UAAU,WAC1D,UAAU,uBAAuB,WAAW,aAC3C,iBAAiB,WAAW"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
//#region src/statistics/descriptive.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Descriptive statistics: means, bootstrap spread, correlation, and the
|
|
4
|
-
* weighted judge-dimension composite. Nothing here is a significance test.
|
|
5
|
-
*/
|
|
6
|
-
/** Weighted mean — falls back to uniform weights when omitted */
|
|
7
|
-
declare function weightedMean(scores: {
|
|
8
|
-
score: number;
|
|
9
|
-
weight?: number;
|
|
10
|
-
}[]): number;
|
|
11
|
-
/**
|
|
12
|
-
* Percentile bootstrap confidence interval on the mean of `scores`.
|
|
13
|
-
*
|
|
14
|
-
* Descriptive spread. It is not a significance test, and at small n its bounds
|
|
15
|
-
* are anti-conservative in the same way {@link pairedBootstrap}'s are — see
|
|
16
|
-
* {@link BOOTSTRAP_GATE_MIN_N}. With no `seed` the resampling is seeded from
|
|
17
|
-
* the scores themselves, so the interval is reproducible either way.
|
|
18
|
-
*/
|
|
19
|
-
declare function confidenceInterval(scores: number[], confidence?: number, opts?: {
|
|
20
|
-
seed?: number;
|
|
21
|
-
resamples?: number;
|
|
22
|
-
}): {
|
|
23
|
-
mean: number;
|
|
24
|
-
lower: number;
|
|
25
|
-
upper: number;
|
|
26
|
-
};
|
|
27
|
-
/** Partial credit: returns 0-1 ratio of current toward target */
|
|
28
|
-
declare function partialCredit(current: number, target: number): number;
|
|
29
|
-
/** Distribution summary of a number series: count, extremes, quantiles, sum. */
|
|
30
|
-
interface SeriesDistribution {
|
|
31
|
-
readonly n: number;
|
|
32
|
-
readonly min: number;
|
|
33
|
-
readonly p50: number;
|
|
34
|
-
readonly p90: number;
|
|
35
|
-
readonly max: number;
|
|
36
|
-
readonly sum: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Fold a number series into its distribution summary. Quantiles use the
|
|
40
|
-
* nearest-rank definition — the `ceil(q·n)`-th order statistic — so every
|
|
41
|
-
* reported quantile is a value from the series. Returns `null` for an empty
|
|
42
|
-
* series: an empty series has no distribution, and a zero-filled summary
|
|
43
|
-
* would read as a measured all-zero series.
|
|
44
|
-
*/
|
|
45
|
-
declare function summarizeNumberSeries(values: readonly number[]): SeriesDistribution | null;
|
|
46
|
-
/**
|
|
47
|
-
* Average-rank-with-ties transform (1-indexed). Tied values receive the mean
|
|
48
|
-
* of the ranks they span, the standard correction for Spearman's ρ.
|
|
49
|
-
*/
|
|
50
|
-
declare function ranks(xs: number[]): number[];
|
|
51
|
-
/**
|
|
52
|
-
* Pearson product-moment correlation coefficient r ∈ [-1, 1] between two
|
|
53
|
-
* equal-length series. See the edge-case contract above: NaN for n < 2 or
|
|
54
|
-
* unequal lengths, 1 when both series are constant, 0 when exactly one is.
|
|
55
|
-
*/
|
|
56
|
-
declare function pearsonR(a: number[], b: number[]): number;
|
|
57
|
-
/**
|
|
58
|
-
* Spearman's rank correlation ρ — Pearson over the average-rank-with-ties
|
|
59
|
-
* transform of each series. Same edge-case contract as {@link pearsonR}.
|
|
60
|
-
*/
|
|
61
|
-
declare function spearmanR(a: number[], b: number[]): number;
|
|
62
|
-
interface WeightedCompositeInput {
|
|
63
|
-
/** Per-dimension scores (typically 0..1). */
|
|
64
|
-
dims: Record<string, number>;
|
|
65
|
-
/** Weight per dimension. Every weighted dimension MUST be present in
|
|
66
|
-
* `dims` — a weight for an absent dimension is a config error and throws,
|
|
67
|
-
* because silently dropping it would renormalise the composite onto a
|
|
68
|
-
* different denominator than intended. */
|
|
69
|
-
weights: Record<string, number>;
|
|
70
|
-
/** Optional pass threshold; when set, the result reports `pass`. */
|
|
71
|
-
threshold?: number;
|
|
72
|
-
}
|
|
73
|
-
interface WeightedCompositeResult {
|
|
74
|
-
composite: number;
|
|
75
|
-
pass?: boolean;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Weighted composite over judge dimensions: `Σ(score_d · w_d) / Σ(w_d)` across
|
|
79
|
-
* the weighted dimensions. The canonical replacement for the per-consumer
|
|
80
|
-
* hand-rolled composite math (tax/legal/creative/gtm each ship a copy).
|
|
81
|
-
*
|
|
82
|
-
* Fail-loud: throws if a weighted dimension is missing from `dims`, if any
|
|
83
|
-
* weight is negative, or if the weights sum to 0 — none of which can produce
|
|
84
|
-
* a meaningful composite.
|
|
85
|
-
*/
|
|
86
|
-
declare function weightedComposite(input: WeightedCompositeInput): WeightedCompositeResult;
|
|
87
|
-
//#endregion
|
|
88
|
-
export { partialCredit as a, spearmanR as c, weightedMean as d, confidenceInterval as i, summarizeNumberSeries as l, WeightedCompositeInput as n, pearsonR as o, WeightedCompositeResult as r, ranks as s, SeriesDistribution as t, weightedComposite as u };
|
|
89
|
-
//# sourceMappingURL=descriptive-B2iPaT9J.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptive-B2iPaT9J.d.ts","names":[],"sources":["../src/statistics/descriptive.ts"],"mappings":";;;;;;iBAQgB,aAAa;EAAU;EAAe;;;;;;;;;;iBAoBtC,mBACd,kBACA,qBACA;EAAQ;EAAe;;EACpB;EAAc;EAAe;;;iBAiClB,cAAc,iBAAiB;;UAM9B;WACN;WACA;WACA;WACA;WACA;WACA;;;;;;;;;iBAUK,sBAAsB,4BAA4B;;;;;iBA8BlD,MAAM;;;;;;iBAmBN,SAAS,aAAa;;;;;iBAuBtB,UAAU,aAAa;UAKtB;;EAEf,MAAM;;;;;EAKN,SAAS;;EAET;;UAGe;EACf;EACA;;;;;;;;;;;iBAYc,kBAAkB,OAAO,yBAAyB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptive-CVNy48rR.js","names":[],"sources":["../src/statistics/descriptive.ts"],"sourcesContent":["/**\n * Descriptive statistics: means, bootstrap spread, correlation, and the\n * weighted judge-dimension composite. Nothing here is a significance test.\n */\n\nimport { makeRng } from './internal'\n\n/** Weighted mean — falls back to uniform weights when omitted */\nexport function weightedMean(scores: { score: number; weight?: number }[]): number {\n if (scores.length === 0) return 0\n let totalWeight = 0\n let weightedSum = 0\n for (const { score, weight } of scores) {\n const w = weight ?? 1\n weightedSum += score * w\n totalWeight += w\n }\n return totalWeight > 0 ? weightedSum / totalWeight : 0\n}\n\n/**\n * Percentile bootstrap confidence interval on the mean of `scores`.\n *\n * Descriptive spread. It is not a significance test, and at small n its bounds\n * are anti-conservative in the same way {@link pairedBootstrap}'s are — see\n * {@link BOOTSTRAP_GATE_MIN_N}. With no `seed` the resampling is seeded from\n * the scores themselves, so the interval is reproducible either way.\n */\nexport function confidenceInterval(\n scores: number[],\n confidence = 0.95,\n opts: { seed?: number; resamples?: number } = {},\n): { mean: number; lower: number; upper: number } {\n if (scores.length === 0) return { mean: 0, lower: 0, upper: 0 }\n if (scores.length === 1) return { mean: scores[0]!, lower: scores[0]!, upper: scores[0]! }\n\n const n = scores.length\n const mean = scores.reduce((a, b) => a + b, 0) / n\n\n const B = opts.resamples ?? 1000\n const rng = makeRng(opts.seed, scores)\n const bootstrapMeans: number[] = []\n\n for (let i = 0; i < B; i++) {\n let sum = 0\n for (let j = 0; j < n; j++) {\n sum += scores[Math.floor(rng() * n)]!\n }\n bootstrapMeans.push(sum / n)\n }\n\n bootstrapMeans.sort((a, b) => a - b)\n\n const alpha = 1 - confidence\n const lowerIdx = Math.floor((alpha / 2) * B)\n const upperIdx = Math.floor((1 - alpha / 2) * B) - 1\n\n return {\n mean,\n lower: bootstrapMeans[lowerIdx]!,\n upper: bootstrapMeans[Math.min(upperIdx, B - 1)]!,\n }\n}\n\n/** Partial credit: returns 0-1 ratio of current toward target */\nexport function partialCredit(current: number, target: number): number {\n if (target <= 0) return 1\n return Math.min(1, Math.max(0, current / target))\n}\n\n/** Distribution summary of a number series: count, extremes, quantiles, sum. */\nexport interface SeriesDistribution {\n readonly n: number\n readonly min: number\n readonly p50: number\n readonly p90: number\n readonly max: number\n readonly sum: number\n}\n\n/**\n * Fold a number series into its distribution summary. Quantiles use the\n * nearest-rank definition — the `ceil(q·n)`-th order statistic — so every\n * reported quantile is a value from the series. Returns `null` for an empty\n * series: an empty series has no distribution, and a zero-filled summary\n * would read as a measured all-zero series.\n */\nexport function summarizeNumberSeries(values: readonly number[]): SeriesDistribution | null {\n if (values.length === 0) return null\n const sorted = [...values].sort((a, b) => a - b)\n const rank = (q: number): number =>\n sorted[Math.min(sorted.length - 1, Math.max(0, Math.ceil(q * sorted.length) - 1))] as number\n return {\n n: sorted.length,\n min: sorted[0] as number,\n p50: rank(0.5),\n p90: rank(0.9),\n max: sorted[sorted.length - 1] as number,\n sum: sorted.reduce((a, b) => a + b, 0),\n }\n}\n\n// ── Correlation (Pearson / Spearman) ─────────────────────────────────\n//\n// The single source for linear (Pearson) and rank (Spearman) correlation.\n// Edge-case contract is explicit so every caller agrees on what a\n// degenerate input means:\n// - length mismatch or n < 2 → NaN (correlation is undefined; not 0)\n// - both series constant → 1 (degenerate perfect agreement)\n// - exactly one series constant → 0 (no covariation to detect)\n// Returning NaN for n < 2 (rather than 0) keeps \"not enough data\" distinct\n// from \"measured zero correlation\", which a 0 would silently conflate.\n\n/**\n * Average-rank-with-ties transform (1-indexed). Tied values receive the mean\n * of the ranks they span, the standard correction for Spearman's ρ.\n */\nexport function ranks(xs: number[]): number[] {\n const indexed = xs.map((v, i) => ({ v, i })).sort((a, b) => a.v - b.v)\n const r = new Array<number>(xs.length)\n let i = 0\n while (i < indexed.length) {\n let j = i\n while (j + 1 < indexed.length && indexed[j + 1]!.v === indexed[i]!.v) j++\n const avg = (i + j) / 2 + 1\n for (let k = i; k <= j; k++) r[indexed[k]!.i] = avg\n i = j + 1\n }\n return r\n}\n\n/**\n * Pearson product-moment correlation coefficient r ∈ [-1, 1] between two\n * equal-length series. See the edge-case contract above: NaN for n < 2 or\n * unequal lengths, 1 when both series are constant, 0 when exactly one is.\n */\nexport function pearsonR(a: number[], b: number[]): number {\n if (a.length !== b.length || a.length < 2) return Number.NaN\n const n = a.length\n const meanA = a.reduce((s, v) => s + v, 0) / n\n const meanB = b.reduce((s, v) => s + v, 0) / n\n let num = 0\n let varA = 0\n let varB = 0\n for (let i = 0; i < n; i++) {\n const da = a[i]! - meanA\n const db = b[i]! - meanB\n num += da * db\n varA += da * da\n varB += db * db\n }\n if (varA === 0 || varB === 0) return varA === 0 && varB === 0 ? 1 : 0\n return num / Math.sqrt(varA * varB)\n}\n\n/**\n * Spearman's rank correlation ρ — Pearson over the average-rank-with-ties\n * transform of each series. Same edge-case contract as {@link pearsonR}.\n */\nexport function spearmanR(a: number[], b: number[]): number {\n if (a.length !== b.length || a.length < 2) return Number.NaN\n return pearsonR(ranks(a), ranks(b))\n}\n\nexport interface WeightedCompositeInput {\n /** Per-dimension scores (typically 0..1). */\n dims: Record<string, number>\n /** Weight per dimension. Every weighted dimension MUST be present in\n * `dims` — a weight for an absent dimension is a config error and throws,\n * because silently dropping it would renormalise the composite onto a\n * different denominator than intended. */\n weights: Record<string, number>\n /** Optional pass threshold; when set, the result reports `pass`. */\n threshold?: number\n}\n\nexport interface WeightedCompositeResult {\n composite: number\n pass?: boolean\n}\n\n/**\n * Weighted composite over judge dimensions: `Σ(score_d · w_d) / Σ(w_d)` across\n * the weighted dimensions. The canonical replacement for the per-consumer\n * hand-rolled composite math (tax/legal/creative/gtm each ship a copy).\n *\n * Fail-loud: throws if a weighted dimension is missing from `dims`, if any\n * weight is negative, or if the weights sum to 0 — none of which can produce\n * a meaningful composite.\n */\nexport function weightedComposite(input: WeightedCompositeInput): WeightedCompositeResult {\n const entries = Object.entries(input.weights)\n if (entries.length === 0) {\n throw new Error('weightedComposite: `weights` is empty — nothing to combine')\n }\n let weightedSum = 0\n let weightTotal = 0\n for (const [dim, weight] of entries) {\n if (weight < 0) {\n throw new Error(`weightedComposite: weight for '${dim}' is negative (${weight})`)\n }\n if (!(dim in input.dims)) {\n throw new Error(\n `weightedComposite: weighted dimension '${dim}' is absent from \\`dims\\` — ` +\n 'refusing to renormalise onto a different denominator',\n )\n }\n weightedSum += input.dims[dim]! * weight\n weightTotal += weight\n }\n if (weightTotal === 0) {\n throw new Error('weightedComposite: weights sum to 0 — composite is undefined')\n }\n const composite = weightedSum / weightTotal\n return input.threshold === undefined\n ? { composite }\n : { composite, pass: composite >= input.threshold }\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,aAAa,QAAsD;CACjF,IAAI,OAAO,WAAW,GAAG,OAAO;CAChC,IAAI,cAAc;CAClB,IAAI,cAAc;CAClB,KAAK,MAAM,EAAE,OAAO,YAAY,QAAQ;EACtC,MAAM,IAAI,UAAU;EACpB,eAAe,QAAQ;EACvB,eAAe;CACjB;CACA,OAAO,cAAc,IAAI,cAAc,cAAc;AACvD;;;;;;;;;AAUA,SAAgB,mBACd,QACA,aAAa,KACb,OAA8C,CAAC,GACC;CAChD,IAAI,OAAO,WAAW,GAAG,OAAO;EAAE,MAAM;EAAG,OAAO;EAAG,OAAO;CAAE;CAC9D,IAAI,OAAO,WAAW,GAAG,OAAO;EAAE,MAAM,OAAO;EAAK,OAAO,OAAO;EAAK,OAAO,OAAO;CAAI;CAEzF,MAAM,IAAI,OAAO;CACjB,MAAM,OAAO,OAAO,QAAQ,GAAG,MAAM,IAAI,GAAG,CAAC,IAAI;CAEjD,MAAM,IAAI,KAAK,aAAa;CAC5B,MAAM,MAAM,QAAQ,KAAK,MAAM,MAAM;CACrC,MAAM,iBAA2B,CAAC;CAElC,KAAK,IAAI,IAAI,GAAG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a;MACX,QAAQ,KAAK,0DAChB,QAAQ,WAAW;;;;;;UASR;UAkBN;EAqCR,IACE,MAAM,KAAK,sDACV,QAAQ,WAAW;EAItB,KACE,MAAM,KAAK,uDACV,QAAQ,WAAW;EAItB,UACE,MAAM,KAAK,4DACV,QAAQ,WAAW;EAIhB,YACJ,SAAS,KAAK,oEACb,QAAQ;EAgBX,QACE,MAAM,KAAK,0DACV,QAAQ,WAAW;EAMhB,KAAK;IACT,MAAM;IACN;IACA,UAAU;MACR,QAAQ;EAeN,aACJ,OAAO,KAAK;IAA8C;MACzD,QAAQ;EAwBL,eAAe,UAAU,KAAK,oCAAoC,QAAQ;;;;;;;;EAe1E,OAAO,GACX,MAAM,WAAW,0BACjB,KAAK,QAAQ,eAAe,QAAQ,KACnC,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"engine-dtRVeuQs.d.ts","names":[],"sources":["../src/eval-tools.ts","../src/trace-analyst/tools.ts","../src/analyst/finding-signature.ts","../src/analyst/engine.ts"],"mappings":";;;;;;;;;;;;;;;;;;;UAsBiB;EACf;EACA;EACA,YAAY;EACZ,UAAU,eAAe;IAAQ,SAAS;QAAkB;;;;cCZjD;;;;;;cAOA;UAGI,uCAAuC;EACtD,OAAO;;UAGQ,oCAAoC;EACnD,kBAAkB;;EAElB;;EAEA;;;iBAMc,kCACd,SAAS,iCACR;;;cC7BG,0BAAwB,EAAA;;;GAKnB,EAAA,KAAA;KAEC,qBAAqB,EAAE,aAAa;cAiBnC,yBAAuB,EAAA;;;;;;;;;;;;;;;;;GAKzB,EAAA,KAAA;KAEC,oBAAoB,EAAE,aAAa;;;;;;cAOlC;;iBAYG,2BAA2B,SAAS,oBAAoB;iBAQxD,gBACd,cACA,OAAO,aAAa,SAAS,mCAC5B;;;;UCpEc;;EAEf;;EAEA;;EAEA;;EAEA;;UA0Be;EACf;EACA;EACA;EACA,gBAAgB;;;;;;;;;;;EAWhB,aAAa,SAAS;EACtB,QAAQ;EACR,YAAY;EACZ;EACA,WAAW;EACX,SAAS;EACT,OAAO,iBAAiB,SAAS;;;UAIlB;EACf;EACA,UAAU;;EAEV;;;;;EAKA;;EAEA;EACA,SAAS;;;;;;;;;UAUM;WACN;WACA;WACA;;WAEA;;;;;;;;WAQA,iBAAiB,SAAS;EACnC,QAAQ,SAAS,6BAA6B,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors-DEE6u6ot.d.ts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;KAeY;;;;;cAiBC,uBAAuB;;WAEzB,MAAM;EAEf,YAAY,MAAM,oBAAoB,iBAAiB;IAAY;;;;cAQxD,wBAAwB;EACnC,YAAY,iBAAiB;IAAY;;;;cAM9B,2BAA2B;EACtC,YAAY,iBAAiB;IAAY;;;;cAM9B,sBAAsB;EACjC,YAAY,iBAAiB;IAAY;;;;cAM9B,oBAAoB;EAC/B,YAAY,iBAAiB;IAAY;;;;;;;;cAU9B,8BAA8B;EACzC,YAAY,iBAAiB;IAAY;;;;cAM9B,mBAAmB;EAC9B,YAAY,iBAAiB;IAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluation-DblGquCB.d.ts","names":[],"sources":["../src/evaluation.ts"],"mappings":";;;;UAYiB,iBAAiB;EAChC,OAAO;EACP,SAAS;EACT;;UAGe;;;EAGf;EACA,SAAS;EACT,aAAa;EACb;EACA,UAAU;EACV;EACA,WAAW;EACX,gBAAgB;;EAEhB,aAAa,SAAS,uBAAuB;;KAGnC,gBAAgB,GAAG,MAC7B,OAAO,GACP,UAAU,sBACP,QAAQ,iBAAiB;UAEb,iBAAiB,GAAG;EACnC,UAAU,OAAO,GAAG;IAAW,QAAQ;IAAa;QAA6B,QAAQ;EACzF,UAAU,OAAO,MAAM;EACvB,oBAAoB,OAAO,UAAU;EACrC,mBAAmB,OAAO;EAC1B,aAAa;EACb,gBAAgB;;EAEhB,YAAY,OAAO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;EAEnC;;KAGU;EACN;;EAEA;EACA;IAAS;IAAe;;;UAGb,8BAA8B;EAC7C,aAAa;EACb,gBAAgB;EAChB,YAAY;;;KAIF,wBACP,QAAQ;EAAmB;;EAC1B,gBAAgB;MAEjB,KAAK,QAAQ;EAAmB;;EAC/B,SAAS;KAEX,QAAQ;EAAmB;MAC1B,KAAK,QAAQ;EAAmB;;EAC/B,SAAS;MAEV,KAAK,QAAQ;EAAmB;;EAC/B,QAAQ;;cAwCR,uBAAqB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAOzB,EAAA,KAAA;cAII,sBAAoB,EAAA,uBAAA,EAAA;;;;;;;;;;;GAaxB,EAAA,KAAA;cAiBI,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYxB,EAAA,KAAA;cAEI,0BAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+E1B,EAAA,KAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exporters-DWvM16LE.js","names":[],"sources":["../src/rollout/exporters.ts"],"sourcesContent":["/**\n * Pure exporters over `tangle.rollout.v1` lines → the training-data shapes\n * the improvement loops feed:\n * - SFT chat JSONL (clean trainable successes, {messages, metadata})\n * - reward rows (every scored line, success or failure, with steps)\n * - Prime Intellect verifiers RolloutOutput (prompt/completion split + reward)\n * - OpenAI RFT items (prompt turns + verdict reference fields)\n *\n * All exporters are pure functions of the lines — filtering (never train on\n * holdout, reward thresholds, the realness gate) happens HERE, on inline\n * labels, no joins.\n *\n * Every exporter takes `MintedRolloutLine[]`, not `RolloutLine[]`: the reward\n * on a minted line has been checked against the anti-Goodhart invariant, and\n * the brand is what stops a hand-built object literal claiming a positive\n * reward on a gamed run from being handed to an exporter that copies it\n * verbatim into training data.\n */\n\nimport type {\n ChatMessage,\n MintedRolloutLine,\n RolloutLine,\n RolloutSplit,\n RolloutStep,\n ToolDef,\n} from './schema'\nimport { assertRewardGate } from './schema'\n\n// ---------------------------------------------------------------------------\n// The realness claims every emitted row carries.\n// ---------------------------------------------------------------------------\n\n/**\n * The gate's two claims, which travel TOGETHER on every emitted row.\n *\n * `realness_gated` alone is ambiguous, and the ambiguity is exploitable:\n * `false` reads as \"we screened it and nothing fired\", so a producer that has no\n * screen at all emitted rows indistinguishable from screened-clean ones, and\n * every consumer of the published dataset read them as clean. The second field\n * is what separates the two claims, and it only removes the ambiguity if it\n * reaches the WIRE — for a round it existed on `RolloutOutcome` and on no\n * exported row shape at all, which left the published rows exactly as ambiguous\n * as before.\n *\n * So there is one helper and every row shape spreads it. A row that states one\n * claim without the other is not constructible by copying the pattern, and\n * `exporters.test.ts` walks every emitted shape to prove none does.\n */\nexport interface RealnessLabels {\n /** The screen's VERDICT: the run faked its success signal. */\n realness_gated: boolean\n /**\n * Whether a screen RAN at all. `true` = it ran, so `realness_gated` is its\n * verdict. `false` = the producer declares it has none. `null` = not stated\n * (pre-unification producers), which is \"unknown\" and never \"clean\".\n */\n realness_screened: boolean | null\n}\n\nfunction realnessLabels(line: MintedRolloutLine): RealnessLabels {\n return {\n realness_gated: line.outcome.realness_gated === true,\n // `?? null` rather than `?? false`: absent means the producer never stated\n // it, and `false` is a load-bearing claim (\"no screen exists\") that would be\n // an invention here.\n realness_screened: line.outcome.realness_screened ?? null,\n }\n}\n\n// ---------------------------------------------------------------------------\n// (a) SFT chat JSONL\n// ---------------------------------------------------------------------------\n\nexport interface TrainingExportOptions {\n /** Include held-out evaluation data in training output. Default false. */\n allowHeldOutTrainingData?: boolean\n /** Require reward to be strictly greater than this value. Default 0. */\n minimumQualityExclusive?: number\n /**\n * Explicit split selection, replacing the default trainable-split rule.\n * Use this only when producing a deliberately named non-training slice\n * (e.g. `['holdout']` for a holdout-only evaluation bundle).\n */\n splitFilter?: RolloutSplit[]\n}\n\n/**\n * What a signed-signal exporter (verifiers, RFT) does with lines that are not\n * clean trainable successes — realness-gated lines above all.\n *\n * - 'exclude' — the default, the same fail-closed policy as every\n * other training export: positive, completed,\n * non-gated rows on a trainable split.\n * - 'zero-and-flag' — keep them, at their non-positive (or null) reward,\n * with `RealnessLabels` on the row. The dataset release\n * sets this per `FORMAT_GATE_DISPOSITION`: in these\n * formats the reward is a signed learning signal, so a\n * gamed trajectory at reward 0 is a correct negative,\n * and dropping it would bias the negative population\n * toward honest failures and leave a trainer no example\n * of gaming being penalized. The split policy is NOT\n * relaxed: held-out lines still need the named opt-in.\n *\n * SFT deliberately has no such option — an SFT row is an imitation target and\n * a gamed trajectory must never appear in one at any weight.\n */\ntype GatedLineDisposition = 'exclude' | 'zero-and-flag'\n\ninterface SignedSignalExportOptions extends TrainingExportOptions {\n /** Disposition for non-trainable lines. Default 'exclude'. */\n gatedLines?: GatedLineDisposition\n}\n\nexport type SftExportOptions = TrainingExportOptions\n\nexport interface SftRow {\n messages: ChatMessage[]\n metadata: {\n rollout_id: string\n run_id: string\n candidate_id: string | null\n instance_id: string\n reward: number\n } & RealnessLabels\n}\n\n/**\n * Supervised fine-tune rows: the completed conversation of each qualifying\n * line. Fail-closed filters: trainable split only (never holdout/canary unless\n * an explicit `splitFilter` names a non-training slice),\n * reward strictly above `minimumQualityExclusive` (default 0), realness-gated\n * lines never qualify, gap lines carry no trainable content, and\n * copied-context turns are dropped from the transcript (Harbor ATIF RFC 0001\n * rule 7 — see `ChatMessage.is_copied_context`).\n *\n * `realness_gated` is therefore always `false` on an emitted row. It is carried\n * anyway: an SFT row is a pure imitation target, so the row states its realness\n * claims instead of making the reader know the format's policy, and carrying\n * both flags on all four shapes is what lets the release accounting measure\n * every config with one rule rather than skipping the one whose row shape\n * happened to omit the field.\n */\nexport function toSftRows(lines: MintedRolloutLine[], options: SftExportOptions = {}): SftRow[] {\n for (const line of lines) assertRewardGate(line, 'SFT export')\n return lines\n .filter((line) => isTrainingLineEligible(line, options) && line.messages.length > 0)\n .map((line) => ({\n // Dropped, not kept-and-masked: a copied-context turn was authored by\n // another agent, and an SFT trainer has no notion of \"present but not a\n // target\" — every message it is handed is something to imitate.\n messages: line.messages.filter((message) => message.is_copied_context !== true),\n metadata: {\n rollout_id: line.rollout_id,\n run_id: line.run_id,\n candidate_id: line.candidate_id ?? null,\n instance_id: line.task.instance_id,\n reward: line.outcome.reward as number,\n ...realnessLabels(line),\n },\n }))\n .filter((row) => row.messages.length > 0)\n}\n\n// ---------------------------------------------------------------------------\n// (b) Reward rows\n// ---------------------------------------------------------------------------\n\nexport interface RewardRow {\n /** First user turn — the task prompt. */\n prompt: string\n steps: RolloutStep[]\n reward: number\n metadata: {\n rollout_id: string\n run_id: string\n candidate_id: string | null\n instance_id: string\n split: RolloutSplit\n /**\n * The anti-Goodhart verdict AND whether a screen produced it, carried on the\n * row rather than left implicit in a reward of 0. Zeroing alone is lossy: it\n * makes a run that FAKED its success indistinguishable from one that\n * honestly failed, so a consumer can neither drop the gamed population nor\n * mine it (a labeled gamed trajectory is the training signal for a gaming\n * detector). `realness_gated` alone is lossy the same way in the other\n * direction — see `RealnessLabels`.\n */\n } & RealnessLabels\n}\n\n/**\n * Reward-labeled rows for completed, positive-quality training runs.\n */\nexport function toRewardRows(\n lines: MintedRolloutLine[],\n options: TrainingExportOptions = {},\n): RewardRow[] {\n for (const line of lines) assertRewardGate(line, 'reward-row export')\n return lines\n .filter(\n (line) =>\n isTrainingLineEligible(line, options) &&\n line.messages.some(\n (message) =>\n message.role === 'user' &&\n typeof message.content === 'string' &&\n message.content.length > 0,\n ),\n )\n .map((line) => ({\n prompt: line.messages.find((m) => m.role === 'user')?.content ?? '',\n steps: line.steps ?? [],\n reward: line.outcome.reward as number,\n metadata: {\n rollout_id: line.rollout_id,\n run_id: line.run_id,\n candidate_id: line.candidate_id ?? null,\n instance_id: line.task.instance_id,\n split: line.task.split,\n ...realnessLabels(line),\n },\n }))\n}\n\n// ---------------------------------------------------------------------------\n// (c) Prime Intellect verifiers RolloutOutput\n// ---------------------------------------------------------------------------\n\nexport interface VerifiersTokenUsage {\n input_tokens: number | null\n output_tokens: number | null\n reasoning_tokens: number | null\n cache_read_tokens: number | null\n cache_write_tokens: number | null\n}\n\nexport interface VerifiersRolloutOutput {\n /** Messages through the last turn BEFORE the first assistant turn. */\n prompt: ChatMessage[]\n /** The first assistant turn onward — what the policy produced. */\n completion: ChatMessage[]\n reward: number | null\n metrics: Record<string, unknown>\n tool_defs: ToolDef[]\n token_usage: VerifiersTokenUsage\n info: {\n task: RolloutLine['task']\n policy: RolloutLine['policy']\n rollout_id: string\n run_id: string\n experiment_id: string | null\n candidate_id: string | null\n generation: number | null\n candidate_index: number | null\n role: RolloutLine['role']\n } & RealnessLabels\n}\n\n/** Index of the first assistant turn; messages.length when none exists. */\nfunction firstAssistantIndex(messages: ChatMessage[]): number {\n const index = messages.findIndex((m) => m.role === 'assistant')\n return index === -1 ? messages.length : index\n}\n\nfunction assertCompleteProjection(line: MintedRolloutLine, context: string): void {\n if (line.provenance.lossy_projection === true) {\n throw new Error(`${context}: rollout ${line.rollout_id} has a lossy projection`)\n }\n}\n\nexport function toVerifiersRolloutOutput(line: MintedRolloutLine): VerifiersRolloutOutput {\n assertRewardGate(line, 'verifiers export')\n assertCompleteProjection(line, 'verifiers export')\n const split = firstAssistantIndex(line.messages)\n return {\n prompt: line.messages.slice(0, split),\n completion: line.messages.slice(split),\n reward: line.outcome.reward,\n metrics: line.outcome.metrics,\n tool_defs: line.tool_defs,\n token_usage: {\n input_tokens: line.cost.tokens_in,\n output_tokens: line.cost.tokens_out,\n reasoning_tokens: line.cost.tokens_reasoning,\n cache_read_tokens: line.cost.cache_read,\n cache_write_tokens: line.cost.cache_write,\n },\n info: {\n task: line.task,\n policy: line.policy,\n rollout_id: line.rollout_id,\n run_id: line.run_id,\n experiment_id: line.experiment_id ?? null,\n candidate_id: line.candidate_id ?? null,\n generation: line.generation,\n candidate_index: line.candidate_index,\n role: line.role,\n ...realnessLabels(line),\n },\n }\n}\n\nexport function toVerifiersRolloutOutputs(\n lines: MintedRolloutLine[],\n options: SignedSignalExportOptions = {},\n): VerifiersRolloutOutput[] {\n if (options.gatedLines === 'zero-and-flag') {\n return lines\n .filter(\n (line) =>\n isSplitEligible(line, options) &&\n line.provenance.lossy_projection !== true &&\n line.messages.length > 0,\n )\n .map(toVerifiersRolloutOutput)\n }\n return lines\n .filter(\n (line) =>\n isTrainingLineEligible(line, options) &&\n firstAssistantIndex(line.messages) > 0 &&\n firstAssistantIndex(line.messages) < line.messages.length,\n )\n .map(toVerifiersRolloutOutput)\n}\n\n// ---------------------------------------------------------------------------\n// (d) OpenAI RFT items\n// ---------------------------------------------------------------------------\n\nexport interface RftItem {\n /** Prompt turns only — the graded completion is re-sampled during RFT. */\n messages: ChatMessage[]\n /** Verdict/label fields the grader references as item.reference.* */\n reference: {\n reward: number | null\n reward_source: string | null\n verdict: unknown\n instance_id: string\n suite: string\n split: RolloutSplit\n rollout_id: string\n } & RealnessLabels\n}\n\nexport function toRftItem(line: MintedRolloutLine): RftItem {\n assertRewardGate(line, 'RFT export')\n assertCompleteProjection(line, 'RFT export')\n const split = firstAssistantIndex(line.messages)\n return {\n messages: line.messages.slice(0, split),\n reference: {\n reward: line.outcome.reward,\n reward_source: line.outcome.reward_source,\n verdict: line.outcome.verdict,\n instance_id: line.task.instance_id,\n suite: line.task.suite,\n split: line.task.split,\n rollout_id: line.rollout_id,\n ...realnessLabels(line),\n },\n }\n}\n\n/** RFT needs a real prompt: lines whose transcript starts with prompt turns. */\nexport function toRftItems(\n lines: MintedRolloutLine[],\n options: SignedSignalExportOptions = {},\n): RftItem[] {\n return lines\n .filter(\n (line) =>\n (options.gatedLines === 'zero-and-flag'\n ? isSplitEligible(line, options) && line.provenance.lossy_projection !== true\n : isTrainingLineEligible(line, options)) &&\n line.messages.length > 0 &&\n firstAssistantIndex(line.messages) > 0,\n )\n .map(toRftItem)\n}\n\n// ---------------------------------------------------------------------------\n// Serialization — one JSON object per line, the interchange format for\n// every export. `tangle.rollout.v1` lines and export rows alike.\n// ---------------------------------------------------------------------------\n\nexport function toJsonl(rows: ReadonlyArray<unknown>): string {\n return rows.map((r) => JSON.stringify(r)).join('\\n') + (rows.length ? '\\n' : '')\n}\n\n/**\n * The split half of the training policy alone: `search` is trainable, held-out\n * needs the named opt-in, `dev` and `canary` never ship. This is the ONE check\n * `'zero-and-flag'` does not relax — a gated line is shipped as a labeled\n * negative, not as a licence to train on evaluation data. An explicit\n * `splitFilter` names a non-training slice instead of the default rule.\n *\n * Exported as the single implementation of that rule: `rl/exporters` applies\n * it on its line paths too, so the two waists cannot drift on which splits are\n * trainable.\n */\nexport function isSplitEligible(\n line: RolloutLine,\n options: Pick<TrainingExportOptions, 'allowHeldOutTrainingData' | 'splitFilter'>,\n): boolean {\n if (options.splitFilter !== undefined) return options.splitFilter.includes(line.task.split)\n if (line.task.split === 'search') return true\n return line.task.split === 'holdout' && options.allowHeldOutTrainingData === true\n}\n\n/**\n * The whole fail-closed training policy for one line: scored, positive above\n * the floor, completed, not gated, on an eligible split. Shared with\n * `rl/exporters` so its text-lookup adapter cannot drift from this rule.\n */\nexport function isTrainingLineEligible(\n line: RolloutLine,\n options: TrainingExportOptions,\n): line is RolloutLine & { outcome: RolloutLine['outcome'] & { reward: number } } {\n const minimumQualityExclusive = options.minimumQualityExclusive ?? 0\n if (!Number.isFinite(minimumQualityExclusive)) {\n throw new Error('minimumQualityExclusive must be finite')\n }\n\n const reward = line.outcome.reward\n if (reward === null) return false\n if (!Number.isFinite(reward)) {\n throw new Error(`training reward for rollout \"${line.rollout_id}\" must be finite`)\n }\n if (reward <= minimumQualityExclusive) return false\n if (!line.outcome.is_completed || line.outcome.is_truncated || line.outcome.error !== null) {\n return false\n }\n if (line.outcome.realness_gated === true) return false\n if (line.provenance.lossy_projection === true) return false\n return isSplitEligible(line, options)\n}\n"],"mappings":";;AA4DA,SAAS,eAAe,MAAyC;CAC/D,OAAO;EACL,gBAAgB,KAAK,QAAQ,m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S,MAAM,GACzB,MAAM,IAAI,MAAM,gCAAgC,KAAK,WAAW,iBAAiB;CAEnF,IAAI,UAAU,yBAAyB,OAAO;CAC9C,IAAI,CAAC,KAAK,QAAQ,gBAAgB,KAAK,QAAQ,gBAAgB,KAAK,QAAQ,UAAU,MACpF,OAAO;CAET,IAAI,KAAK,QAAQ,mBAAmB,MAAM,OAAO;CACjD,IAAI,KAAK,WAAW,qBAAqB,MAAM,OAAO;CACtD,OAAO,gBAAgB,MAAM,OAAO;AACtC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exporters-Dk3oEbK_.d.ts","names":[],"sources":["../src/rollout/exporters.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAiDiB;;EAEf;;;;;;EAMA;;UAiBe;;EAEf;;EAEA;;;;;;EAMA,cAAc;;;;;;;;;;;;;;;;;;;;;;KAuBX;UAEK,kCAAkC;;EAE1C,aAAa;;KAGH,mBAAmB;UAEd;EACf,UAAU;EACV;IACE;IACA;IACA;IACA;IACA;MACE;;;;;;;;;;;;;;;;;;iBAmBU,UAAU,OAAO,qBAAqB,UAAS,mBAAwB;UAyBtE;;EAEf;EACA,OAAO;EACP;EACA;IACE;IACA;IACA;IACA;IACA,OAAO;MAUL;;;;;iBAMU,aACd,OAAO,qBACP,UAAS,wBACR;UAgCc;EACf;EACA;EACA;EACA;EACA;;UAGe;;EAEf,QAAQ;;EAER,YAAY;EACZ;EACA,SAAS;EACT,WAAW;EACX,aAAa;EACb;IACE,MAAM;IACN,QAAQ;IACR;IACA;IACA;IACA;IACA;IACA;IACA,MAAM;MACJ;;iBA+CU,0BACd,OAAO,qBACP,UAAS,4BACR;UAyBc;;EAEf,UAAU;;EAEV;IACE;IACA;IACA;IACA;IACA;IACA,OAAO;IACP;MACE;;;iBAuBU,WACd,OAAO,qBACP,UAAS,4BACR;iBAkBa,QAAQ,MAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"failure-cluster-DN0t63Z0.d.ts","names":[],"sources":["../src/failure-taxonomy.ts","../src/pipelines/failure-cluster.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KA6CY;;iBAuHI,aAAa,cAAc,eAAe;UAIzC;EACf,KAAK;EACL,OAAO;EACP,QAAQ;;UAGO;EACf,cAAc;;EAEd,OAAO;EACP;EACA;EACA;;;UAIe;EACf;EACA,QAAQ,KAAK;IACX,cAAc;IACd;;IAEA,QAAQ;IACR;IACA;;;;;;;;;;UAWa;;EAEf,cAAc;EACd,SAAS;;EAET,QAAQ;;;;;;;;;;;;iBAwEM,sBACd,mCACA,iBAAgB,sBACf;;;;;;;;;;iBAkba,gBACd,KAAK,gBACL,QAAO,eACP,uBAAsB,sBACrB;;;UCpsBc;EACf,cAAc;;EAEd;;EAEA;;;;;;;EAOA;EACA;EACA;EACA;EACA;;UAGe;EACf,UAAU;EACV;EACA;;iBAGoB,mBACpB,OAAO,YACP;EAAW,QAAQ;EAAe;IACjC,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-trajectory-CYVJXolG.d.ts","names":[],"sources":["../src/control-runtime/contract.ts","../src/feedback-trajectory-review.ts","../src/feedback-trajectory.ts"],"mappings":";;;;;;;KAIY;KAEA;UAEK;;EAEf;;EAEA;;EAEA;;EAEA,WAAW;;EAEX;;EAEA;;EAEA;;EAEA,WAAW;;UAGI;EACf;EACA;EACA;;UAGe,oBAAoB,QAAQ;;;;;EAK3C;;;;;EAKA;;EAEA;;EAEA,oBAAoB,OAAO;;EAE3B,qBAAqB,QAAQ;;UAGd,eACf,QACA,SACA,eACA,cAAc,oBAAoB;EAElC;EACA,OAAO;EACP,OAAO;EACP,SAAS,YAAY,QAAQ,SAAS,eAAe;EACrD,QAAQ;EACR;EACA;EACA;EACA;EACA,aAAa;EACb,UAAU;;KAGA,gBAAgB;EAEtB;EACA,QAAQ;EACR;;EAGA;EACA;EACA;EACA;;EAEA,eAAe;;UAGJ;EACf;EACA;EACA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ACA,OAAO,eACP,qBACC,QAAQ;;cAsBA,6CAA6C;mBACvC;mBACA;UACT;EAER,YAAY;IAAW;;EAIjB,KAAK,YAAY,qBAAqB;EAMtC,IAAI,aAAa,QAAQ;EAKzB,KAAK,SAAQ,2BAAgC,QAAQ;EAKrD,cAAc,YAAY,SAAS,kBAAkB,QAAQ;EAO7D,YACJ,YACA,OAAO,eACP,qBACC,QAAQ;UAOG;UAWA;;iBA8BA,yBAAyB;EACvC;EACA;EACA;EACA,MAAM;EACN,WAAW;EACX,SAAS;EACT,UAAU;EACV,QAAQ;EACR,OAAO;EACP;EACA,WAAW;IACT;;iBAqBY,+BACd,KAAK,kBACL,SAAS,mCACR;;iBAsFa,2BACd,KAAK,kBACL;EAAW;IACV;iBA4Da,oBACd,YAAY,KAAK,iEACjB,SAAQ,sBACP;iBAca,0BACd,YAAY,oBACZ,SAAS,sBACR;iBAuBa,uCACd,cAAc,uBACb;iBAIa,iCACd,YAAY,qBACX;iBA6Ca,oCACd,cAAc,uBACb;iBAyCa,0BACd,cAAc,sBACd;EAAW;IACV;iBA2Ba,+BAA+B,SAAS;iBAWxC,+BAA+B,QAAQ,SAAS,eAC9D,KAAK,iBAAiB,QAAQ,SAAS,gBACvC;EACE;EACA;EACA,eAAe;EACf,oBAAoB,MAAM,YAAY,QAAQ,SAAS;EACvD,0BACE,MAAM,YAAY,QAAQ,SAAS,mBAChC;EACL;IAED"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hf-dataset-CKxIJQba.js","names":[],"sources":["../src/rollout/ledger.ts","../src/rollout/release/gate-report.ts","../src/rollout/release/card.ts","../src/rollout/release/scrub.ts","../src/rollout/release/hf-dataset.ts"],"sourcesContent":["/**\n * Rollout-ledger file API — append-only JSONL of validated `tangle.rollout.v1`\n * lines. Writes validate BEFORE touching disk (a bad line never lands);\n * reads validate line-by-line and fail loud with the line number, because a\n * silently-skipped rollout is a corrupted dataset.\n *\n * \"Validate\" includes the anti-Goodhart invariant (a realness-gated line may\n * not carry a positive reward), so a poisoned line can neither enter a ledger\n * nor leave one.\n *\n * Two read modes, matching the two write-side row classes: `readRolloutLedger`\n * re-validates under the mint policy (training data), `readRolloutJournal`\n * under the write policy (supervision journals, whose unscreened positive\n * rewards are writable and must stay readable).\n */\n\nimport { appendFile, mkdir, readFile, writeFile } from 'node:fs/promises'\nimport { dirname } from 'node:path'\nimport { assertMinted, assertRolloutLine, type MintedRolloutLine, type RolloutLine } from './schema'\n\nfunction serialize(lines: RolloutLine[]): string {\n for (const [i, line] of lines.entries()) assertRolloutLine(line, `rollout line [${i}]`)\n return lines.map((line) => JSON.stringify(line)).join('\\n') + (lines.length > 0 ? '\\n' : '')\n}\n\n/** Replace the ledger file with exactly `lines`. */\nexport async function writeRolloutLedger(path: string, lines: RolloutLine[]): Promise<void> {\n const payload = serialize(lines)\n await mkdir(dirname(path), { recursive: true })\n await writeFile(path, payload)\n}\n\n/** Append `lines` to the ledger file (created if absent). */\nexport async function appendRolloutLines(path: string, lines: RolloutLine[]): Promise<void> {\n if (lines.length === 0) return\n const payload = serialize(lines)\n await mkdir(dirname(path), { recursive: true })\n await appendFile(path, payload)\n}\n\n/**\n * Read and validate every line. Throws on the first malformed/invalid line\n * (with its 1-based line number) — fail-closed, never a silent drop.\n *\n * Validation includes the anti-Goodhart invariant, which is why the result is\n * `MintedRolloutLine[]`: a ledger file is the main way a rollout reaches this\n * process from outside the type system (another run, another machine, a\n * hand-edited JSONL), so this read is the runtime boundary where a poisoned\n * line is refused rather than exported.\n */\nexport async function readRolloutLedger(path: string): Promise<MintedRolloutLine[]> {\n return readLines(path, (parsed, context) => assertMinted(parsed, context))\n}\n\n\n\nasync function readLines<T>(\n path: string,\n admit: (parsed: unknown, context: string) => T,\n): Promise<T[]> {\n const raw = await readFile(path, 'utf8')\n const lines: T[] = []\n const rawLines = raw.split('\\n')\n for (let i = 0; i < rawLines.length; i++) {\n const text = rawLines[i]\n if (!text?.trim()) continue\n let parsed: unknown\n try {\n parsed = JSON.parse(text)\n } catch (error) {\n throw new Error(\n `${path}:${i + 1}: malformed JSON — ${error instanceof Error ? error.message : String(error)}`,\n )\n }\n lines.push(admit(parsed, `${path}:${i + 1}`))\n }\n return lines\n}\n","/**\n * Per-format accounting of the anti-Goodhart gate for one dataset release.\n *\n * The defect this exists to make impossible: a dataset card that STATES what\n * the gate does while the build does something else. A sentence in a README is\n * a claim about bytes it never reads, so it drifts the moment an exporter\n * changes — and the drift ships to whoever downloads the dataset.\n *\n * So the card is not allowed to assert anything about the gate. The build\n * measures the rows it is ABOUT TO WRITE (`measureFormatGate`), the measurement\n * is checked against the declared per-format disposition (`assertGateReport`,\n * which throws rather than warns), and the card renders only numbers handed to\n * it. A card that disagrees with its own data files cannot be produced without\n * failing the build first.\n *\n * The dispositions themselves are the release policy, stated once as data:\n *\n * sft EXCLUDE — an SFT row is an imitation target. A gamed\n * trajectory must never be imitated, at any weight.\n * verifiers ZERO_AND_FLAG — reward is a signed learning signal here, so a\n * gamed trajectory at reward 0 is a correct\n * negative. Dropping it would bias the negative\n * population toward honest failures and leave a\n * trainer no example of what gaming looks like\n * when it is penalized.\n * rft ZERO_AND_FLAG — RFT re-samples the completion; only the prompt\n * and the grader's `reference.*` verdict ship, so\n * nothing gamed is imitated. The flag is what lets\n * a grader author skip the instance.\n * raw ZERO_AND_FLAG — a faithful audit dump. Removing rows from it\n * would defeat its only purpose, and the gated\n * row is the one an auditor most wants.\n *\n * `ZERO_AND_FLAG` is never `reward: 0` alone. Zeroing without the label makes a\n * faked success indistinguishable from an honest failure — it hides the gamed\n * population from the buyer instead of disclosing it. Every included format\n * carries `realness_gated` on the row itself.\n *\n * And `ZERO_AND_FLAG` means the whole outcome, not the scalar. A gated row that\n * ships `reward: 0` beside the per-layer verifier scores the reward was\n * computed from has not been zeroed in any sense a trainer respects; the\n * accounting therefore measures every reward-derived number each format writes,\n * not just the one field.\n */\n\nimport type { RftItem, SftRow, VerifiersRolloutOutput } from '../exporters'\nimport {\n GATE_CHECK_IDS,\n GATE_POLICIES,\n type GateCheckId,\n undeclaredStepPayload,\n} from '../gate-checks'\nimport type { MintedRolloutLine } from '../schema'\nimport type { ReleaseFormat } from './card'\n\n/** What a format does with a line the realness gate flagged. */\nexport type GateDisposition = 'exclude' | 'zero-and-flag'\n\nexport const FORMAT_GATE_DISPOSITION: Record<ReleaseFormat, GateDisposition> = {\n sft: 'exclude',\n verifiers: 'zero-and-flag',\n rft: 'zero-and-flag',\n raw: 'zero-and-flag',\n}\n\n/** What the gate accounting reads off an emitted row, per format. */\nexport interface ReleaseRowRef {\n rollout_id: string\n reward: number | null\n /**\n * The rest of the row that was DERIVED from the reward — the per-layer score\n * dict, the judge verdict record, whatever this format ships beside the\n * scalar. Walked for positive numbers, so the certification is about the\n * whole outcome rather than one field.\n *\n * Absent when the format's row carries nothing but the scalar. NOT the whole\n * row: `cost.tokens_in`, `wall_s` and `total_steps` are positive numbers that\n * have nothing to do with the reward, and a certification that flags them is\n * a certification nobody can act on.\n */\n evidence?: unknown\n /**\n * The screen claim AS EMITTED — read off the row, not off the line it came\n * from, because what ships is what matters. Required, not optional: an\n * optional field is how a format quietly opts out of the check that reads it,\n * and every emitted row shape carries `RealnessLabels` precisely so no adapter\n * has to.\n */\n realness_screened: boolean | null\n /**\n * The part of an emitted `steps[]` the wire format does not declare.\n *\n * Separate from `evidence` because the declared step fields are FULL of\n * legitimate positive numbers — `durationMs`, `llm_call_count`,\n * `prompt_token_ids` — and a certification that flags those is one nobody can\n * act on. Only the undeclared remainder is unclassified reward-bearing\n * payload, which is the same partition the check applies.\n *\n * Set only by formats whose row carries steps: today `raw` alone.\n */\n stepEvidence?: unknown\n}\n\n/** A positive number found inside an emitted gated row, with where it was. */\nexport interface EmittedEvidence {\n /** JSON-ish path from the row's evidence root, e.g. `metrics['layer.tests']`. */\n path: string\n value: number\n}\n\nexport interface FormatGateCounts {\n /** Gated lines that reached this format's exporter. */\n input: number\n /** Gated rows the format actually wrote. */\n emitted: number\n /**\n * Gated lines this format did not write. Not all of these are the gate:\n * `verifiers` also drops gap lines (empty transcript) and `rft` drops lines\n * with no prompt turn, so an excluded count can mix both causes.\n */\n excluded: number\n /** Highest reward on an emitted gated row; `null` when none was emitted. */\n maxEmittedReward: number | null\n /**\n * The largest positive number found in the reward-DERIVED payload of an\n * emitted gated row, and its path; `null` when there is none.\n *\n * This column exists because the release once certified CLEAN while leaking.\n * `assertGateReport` inspected `outcome.reward` alone, so a gated row shipping\n * `reward: 0` next to `metrics['layer.tests']: 1` — the deterministic verifier\n * score the reward was computed from, and the per-rubric score dict of the\n * Prime Intellect verifiers format — passed, and the card rendered \"max reward\n * | 0\" over a file that carried the gamed signal at full value. A wrong\n * certification is worse than the leak: it is the leak plus a document saying\n * there isn't one.\n */\n maxEmittedEvidence: EmittedEvidence | null\n /**\n * Rows this format wrote carrying a positive reward whose producer DECLARED\n * that no authenticity screen ever ran on it (`realness_screened: false`).\n *\n * Measured over EVERY emitted row, not just the gated ones: an unscreened\n * reward is by definition one the gate never had a verdict on, so it is not in\n * the gated set and a measurement scoped to that set would report 0 forever.\n * `assertMinted` already refuses these, which is exactly why the release still\n * measures them — the last door before a public dataset does not get to assume\n * the earlier doors held.\n */\n unscreenedPositiveRows: number\n /** Highest reward on such a row; `null` when there is none. */\n maxUnscreenedReward: number | null\n /**\n * The largest positive number found in an emitted gated row's UNDECLARED\n * per-step payload, and its path; `null` when there is none.\n *\n * The column exists because the gate read `outcome` and nothing else for\n * three rounds, so a gated line shipping `steps: [{kind, name, reward: 0.86}]`\n * certified clean — the release accounting agreed with the exporter that a\n * per-step reward was not a reward.\n */\n maxEmittedStepEvidence: EmittedEvidence | null\n}\n\nexport interface GateReport {\n /** Gated lines in the release input, after the split/proposer filters. */\n gatedLines: number\n byFormat: Partial<Record<ReleaseFormat, FormatGateCounts>>\n}\n\n/** Rollout ids of every gated line, the key the emitted rows are matched on. */\nexport function gatedRolloutIds(lines: readonly MintedRolloutLine[]): Set<string> {\n return new Set(lines.filter((line) => line.outcome.realness_gated).map((line) => line.rollout_id))\n}\n\n/**\n * Row refs per format. Written as one adapter per format so that the knowledge\n * of WHERE the id and reward live in each published shape sits next to the\n * assertion that uses it — an exporter that moves either field breaks here\n * rather than silently reporting zero gated rows.\n */\nexport const releaseRowRefs = {\n // An SFT row is `{messages, metadata}` and `metadata` holds ids plus the\n // scalar — no reward-derived payload beyond `reward` itself, and the gated\n // disposition is EXCLUDE anyway.\n sft: (rows: readonly SftRow[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.metadata.rollout_id,\n reward: row.metadata.reward,\n realness_screened: row.metadata.realness_screened,\n })),\n // `metrics` IS the per-rubric score dict in the Prime Intellect verifiers\n // format — the same numbers the reward was computed from. This is the leak\n // that shipped.\n verifiers: (rows: readonly VerifiersRolloutOutput[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.info.rollout_id,\n reward: row.reward,\n evidence: row.metrics,\n realness_screened: row.info.realness_screened,\n })),\n // RFT re-samples the completion, but the grader reads `item.reference.*`, so\n // the verbatim judge verdict is a reward-bearing field on the row.\n rft: (rows: readonly RftItem[]): ReleaseRowRef[] =>\n rows.map((row) => ({\n rollout_id: row.reference.rollout_id,\n reward: row.reference.reward,\n evidence: row.reference.verdict,\n realness_screened: row.reference.realness_screened,\n })),\n raw: (lines: readonly MintedRolloutLine[]): ReleaseRowRef[] =>\n lines.map((line) => ({\n rollout_id: line.rollout_id,\n reward: line.outcome.reward,\n // `provenance.gated_evidence` is deliberately NOT walked: relocating the\n // diagnostics there is what the gate DOES, and the raw config is the\n // audit dump those diagnostics exist for.\n evidence: { metrics: line.outcome.metrics, verdict: line.outcome.verdict },\n // `raw` is the only config that writes the whole line, so it is the only\n // one whose rows can carry a per-step reward.\n stepEvidence: undeclaredStepPayload(line.steps),\n realness_screened: line.outcome.realness_screened ?? null,\n })),\n}\n\n/** Every positive finite number inside a row's reward-derived payload, with its path. */\nfunction positiveNumbersIn(value: unknown, path: string): EmittedEvidence[] {\n if (typeof value === 'number') {\n return Number.isFinite(value) && value > 0 ? [{ path, value }] : []\n }\n if (Array.isArray(value)) {\n return value.flatMap((item, i) => positiveNumbersIn(item, `${path}[${i}]`))\n }\n if (typeof value === 'object' && value !== null) {\n return Object.entries(value).flatMap(([key, child]) =>\n positiveNumbersIn(child, path === '' ? key : `${path}.${key}`),\n )\n }\n return []\n}\n\n/** Measure one format's gated rows from the refs of the rows about to be written. */\nexport function measureFormatGate(\n gated: ReadonlySet<string>,\n refs: readonly ReleaseRowRef[],\n): FormatGateCounts {\n const emitted = refs.filter((ref) => gated.has(ref.rollout_id))\n const rewards = emitted.map((ref) => ref.reward).filter((r): r is number => r !== null)\n const evidence = emitted.flatMap((ref) => positiveNumbersIn(ref.evidence, ''))\n const stepEvidence = emitted.flatMap((ref) => positiveNumbersIn(ref.stepEvidence, 'steps'))\n const unscreened = refs\n .filter((ref) => ref.realness_screened === false)\n .map((ref) => ref.reward)\n .filter((r): r is number => r !== null && r > 0)\n return {\n input: gated.size,\n emitted: emitted.length,\n excluded: gated.size - emitted.length,\n maxEmittedReward: rewards.length === 0 ? null : Math.max(...rewards),\n maxEmittedEvidence: evidence.reduce<EmittedEvidence | null>(\n (best, found) => (best === null || found.value > best.value ? found : best),\n null,\n ),\n unscreenedPositiveRows: unscreened.length,\n maxUnscreenedReward: unscreened.length === 0 ? null : Math.max(...unscreened),\n maxEmittedStepEvidence: stepEvidence.reduce<EmittedEvidence | null>(\n (best, found) => (best === null || found.value > best.value ? found : best),\n null,\n ),\n }\n}\n\n/**\n * The measured form of each canonical gate check, over the rows a release is\n * ABOUT TO WRITE. Returns the failure message, or `null` when the format is\n * clean on that check.\n *\n * TOTAL over `GateCheckId` — this map and `GATE_POLICIES.assertGateReport` are\n * the two things a new check breaks here, so the release certifier cannot be\n * left behind by a check added anywhere else in the package. That is the whole\n * point: for four rounds each guard composed its own subset by hand, and a\n * release certifying CLEAN while leaking is the most expensive version of that\n * mistake, because it is the leak plus a document saying there isn't one.\n */\nconst REPORT_MEASURES: {\n readonly [K in GateCheckId]: (format: ReleaseFormat, counts: FormatGateCounts) => string | null\n} = {\n 'reward-relationship': (format, counts) =>\n counts.maxEmittedReward === null || counts.maxEmittedReward <= 0\n ? null\n : `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `reward (max ${counts.maxEmittedReward}). A run flagged as gamed may not ship a ` +\n 'positive reward in any config.',\n 'gated-evidence': (format, counts) => {\n if (counts.maxEmittedEvidence === null) return null\n const { path, value } = counts.maxEmittedEvidence\n return (\n `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `reward-derived number (${path} = ${value}). Zeroing the scalar is not enough — the ` +\n 'per-layer scores and judge verdict a fabricated reward was computed FROM are the ' +\n 'same signal in component form, and in this format they are read as training input. ' +\n 'They belong in `provenance.gated_evidence` (see `gateGamedOutcome`), not on the row.'\n )\n },\n 'undeclared-step-payload': (format, counts) => {\n if (counts.maxEmittedStepEvidence === null) return null\n const { path, value } = counts.maxEmittedStepEvidence\n return (\n `release format \"${format}\": ${counts.emitted} realness-gated row(s) carry a positive ` +\n `per-step number under a field \\`tangle.rollout.v1\\` does not declare (${path} = ${value}). ` +\n 'A per-step reward is the same training signal as the scalar, in credit-assignment form, ' +\n 'and the exporters copy `steps` through verbatim — so the row ships it beside a `reward` ' +\n 'of 0. It belongs in `provenance.gated_evidence.steps` (see `gateGamedOutcome`).'\n )\n },\n 'unscreened-reward': (format, counts) =>\n counts.maxUnscreenedReward === null\n ? null\n : `release format \"${format}\": ${counts.unscreenedPositiveRows} row(s) carry a positive ` +\n `reward (max ${counts.maxUnscreenedReward}) whose producer declares that NO authenticity ` +\n 'screen ran on it (`realness_screened: false`). Nothing has established those successes ' +\n 'are real, and a published dataset may not present an unqualified verdict as a measured ' +\n 'one. Screen the runs, or publish them at `reward: null`.',\n}\n\n/**\n * Fail the build when the measurement disagrees with the declared policy.\n *\n * Throws, never filters: an emitted positive reward on a gated row means an\n * exporter upstream stopped applying the gate, and silently dropping the row\n * would hide the producer that made it — the producer is the actual defect.\n *\n * Certifies the whole emitted outcome, not `reward` alone. The earlier version\n * checked one field and therefore certified a release CLEAN while its\n * `verifiers/train.jsonl` shipped the gamed run's per-layer scores at 1.0 in\n * the top-level `metrics` dict — the card then rendered \"max reward | 0\" over\n * exactly that file. A certification that is wrong is worse than an\n * uncertified leak, so the checks it runs are no longer written down here at\n * all: it iterates `GATE_CHECK_IDS` under its own declared policy.\n */\nexport function assertGateReport(report: GateReport): void {\n for (const [format, counts] of Object.entries(report.byFormat) as Array<\n [ReleaseFormat, FormatGateCounts]\n >) {\n for (const id of GATE_CHECK_IDS) {\n if (GATE_POLICIES.assertGateReport[id].kind !== 'enforce') continue\n const failure = REPORT_MEASURES[id](format, counts)\n if (failure !== null) throw new Error(failure)\n }\n // Not a gate check: this one is the RELEASE POLICY (`FORMAT_GATE_DISPOSITION`)\n // rather than the anti-Goodhart invariant — it asks whether the format did\n // what it said it would with gated rows, not whether a row is poisoned.\n if (FORMAT_GATE_DISPOSITION[format] === 'exclude' && counts.emitted > 0) {\n throw new Error(\n `release format \"${format}\" declares gated lines EXCLUDED but wrote ${counts.emitted} ` +\n 'of them.',\n )\n }\n }\n}\n","/**\n * HuggingFace dataset-card (README.md) generation for a rollout-ledger release.\n *\n * The card is a pure function of the SCRUBBED lines plus the release options —\n * no timestamps, no environment reads — so rebuilding from the same ledger\n * yields byte-identical output. It documents the schema, provenance (run ids,\n * generations, the official judge), per-role reward semantics including the\n * inherited/contribution caveat, and a role × reward counts table.\n */\n\nimport { type MintedRolloutLine, ROLLOUT_ROLES, ROLLOUT_SCHEMA, type RolloutRole } from '../schema'\nimport { assertGateReport, FORMAT_GATE_DISPOSITION, type GateReport } from './gate-report'\nimport type { ScrubCounts } from './scrub'\n\nexport const RELEASE_FORMATS = ['sft', 'verifiers', 'rft', 'raw'] as const\nexport type ReleaseFormat = (typeof RELEASE_FORMATS)[number]\n\n/** Format → data file path inside the dataset dir (train split only). */\nexport const FORMAT_FILES: Record<ReleaseFormat, string> = {\n sft: 'sft/train.jsonl',\n verifiers: 'verifiers/train.jsonl',\n rft: 'rft/train.jsonl',\n raw: 'raw/train.jsonl',\n}\n\nconst FORMAT_DESCRIPTIONS: Record<ReleaseFormat, string> = {\n sft: 'Successful trainable-split transcripts (`reward >= 1`, never realness-gated) as `{messages, metadata}` chat JSONL.',\n verifiers:\n 'Prime Intellect verifiers `RolloutOutput`: prompt/completion split at the first assistant turn, plus reward, metrics, tool defs, and token usage.',\n rft: 'OpenAI RFT items: prompt turns plus `reference.*` verdict fields for a grader (completions are re-sampled during RFT).',\n raw: `Full \\`${ROLLOUT_SCHEMA}\\` ledger lines (scrubbed), one per agent invocation.`,\n}\n\nexport interface DatasetCardInputs {\n /** Scrubbed, release-filtered lines (what actually ships). */\n lines: MintedRolloutLine[]\n formats: ReleaseFormat[]\n includeProposers: boolean\n /** Source ledger basenames, for provenance. */\n sourceFiles: string[]\n scrubTotals: ScrubCounts\n excluded: { proposers: number; nonTrain: number }\n formatCounts: Partial<Record<ReleaseFormat, number>>\n /**\n * Per-format anti-Goodhart accounting MEASURED on the rows the build wrote.\n * Required, not optional: the card's only statement about the gate is a\n * render of these numbers, so a card cannot be produced without them and\n * cannot drift from the data files it ships beside.\n */\n gate: GateReport\n}\n\nfunction unique(values: Array<string | null>): string[] {\n return [...new Set(values.filter((v): v is string => v !== null))].sort()\n}\n\nfunction formatReward(reward: number | null): string {\n if (reward === null) return 'null'\n return Number.isInteger(reward) ? String(reward) : reward.toFixed(4)\n}\n\nfunction markdownTable(header: string[], rows: string[][]): string {\n return [\n `| ${header.join(' | ')} |`,\n `| ${header.map(() => '---').join(' | ')} |`,\n ...rows.map((row) => `| ${row.join(' | ')} |`),\n ].join('\\n')\n}\n\n/** Where the anti-Goodhart flag lives on each format's emitted row. */\nconst GATE_FLAG_FIELD: Record<ReleaseFormat, string> = {\n sft: '— (no gated row is written)',\n verifiers: '`info.realness_gated`',\n rft: '`reference.realness_gated`',\n raw: '`outcome.realness_gated`',\n}\n\nconst GATE_POLICY_LABEL: Record<ReleaseFormat, string> = {\n sft: 'EXCLUDED — an SFT row is an imitation target',\n verifiers: 'INCLUDED, reward forced to 0, flagged',\n rft: 'INCLUDED, reward forced to 0, flagged',\n raw: 'INCLUDED verbatim, flagged',\n}\n\nfunction gateSection(formats: ReleaseFormat[], gate: GateReport, totalLines: number): string {\n const rows = formats.map((format) => {\n const counts = gate.byFormat[format]\n return [\n format,\n GATE_POLICY_LABEL[format],\n String(counts?.emitted ?? 0),\n String(counts?.excluded ?? 0),\n counts?.maxEmittedReward === null || counts === undefined\n ? '—'\n : formatReward(counts.maxEmittedReward),\n counts?.maxEmittedEvidence == null\n ? '—'\n : `${counts.maxEmittedEvidence.path} = ${counts.maxEmittedEvidence.value}`,\n GATE_FLAG_FIELD[format],\n ]\n })\n const mixedExclusion = formats.some(\n (format) => FORMAT_GATE_DISPOSITION[format] === 'zero-and-flag',\n )\n return [\n `\\`outcome.realness_gated: true\\` marks a run whose success signal was faked (it satisfied the proxy without doing the work). **${gate.gatedLines} of ${totalLines} lines in this release are gated.**`,\n '',\n 'The gate is enforced, not asserted. A line pairing `realness_gated: true` with a reward above 0 is rejected by the schema validator, so it cannot be read out of a source ledger or written into `raw/train.jsonl` at all; on a gated line the numbers the reward was computed from (`outcome.metrics`, the verbatim judge `outcome.verdict`, and any per-step field the schema does not declare — a per-step reward is the same signal in credit-assignment form) are moved out of `outcome` and `steps[]` and into `provenance.gated_evidence`, where no config reads them as training input; the exporters re-check the same invariant on every line; and the release build measures the rows it is about to write and refuses to write ANY file if a gated row carries a positive reward — or any positive number derived from one — in ANY config.',\n '',\n 'The table below is **measured on the rows in this release**, not a description of intent — the build counts the emitted rows and this card renders those counts:',\n '',\n markdownTable(\n [\n 'config',\n 'policy',\n 'gated rows written',\n 'gated rows not written',\n 'max reward',\n 'max reward-derived number',\n 'flag',\n ],\n rows,\n ),\n '',\n 'Why gated rows are kept where they are kept: an SFT row is imitated verbatim, so a gamed trajectory must never appear in one at any weight. In `verifiers` the reward is a signed learning signal, and a gamed trajectory at reward 0 is a correct negative — dropping it would bias the negative population toward honest failures and leave a trainer no example of gaming being penalized. `rft` re-samples the completion, so only the prompt and the grader reference ship. `raw` is a faithful audit dump, where the gated row is the one an auditor most wants.',\n '',\n \"Reward 0 is never the only label: every included config carries the flag on the row itself, because zeroing alone makes a faked success indistinguishable from an honest failure. Filter on the flag to drop the gamed population, or select on it to mine it. The gated run's own measurements are not destroyed either — they are parked verbatim under `provenance.gated_evidence` in `raw/train.jsonl`, which is where an auditor can see what the run claimed and why it was flagged.\",\n mixedExclusion\n ? '\\n\"Gated rows not written\" is not all gate: `verifiers` also drops gap lines (empty transcript) and `rft` drops lines with no prompt turn, so that column can mix both causes.'\n : '',\n ]\n .join('\\n')\n .trimEnd()\n}\n\nfunction roleRewardRows(lines: MintedRolloutLine[]): string[][] {\n const counts = new Map<RolloutRole, Map<string, number>>()\n for (const line of lines) {\n const byReward = counts.get(line.role) ?? new Map<string, number>()\n const key = formatReward(line.outcome.reward)\n byReward.set(key, (byReward.get(key) ?? 0) + 1)\n counts.set(line.role, byReward)\n }\n const rows: string[][] = []\n for (const role of ROLLOUT_ROLES) {\n const byReward = counts.get(role)\n if (!byReward) continue\n const keys = [...byReward.keys()].sort((a, b) => {\n if (a === 'null') return 1\n if (b === 'null') return -1\n return Number(b) - Number(a)\n })\n for (const key of keys) rows.push([role, key, String(byReward.get(key))])\n }\n return rows\n}\n\nexport function buildDatasetCard(inputs: DatasetCardInputs): string {\n const {\n lines,\n formats,\n includeProposers,\n sourceFiles,\n scrubTotals,\n excluded,\n formatCounts,\n gate,\n } = inputs\n // The card is the artifact a buyer reads; it may not render a gate report\n // that violates the release policy even when called outside the build.\n assertGateReport(gate)\n\n const runIds = unique(lines.map((line) => line.run_id))\n const generations = [...new Set(lines.map((line) => line.generation))]\n .filter((g): g is number => g !== null)\n .sort((a, b) => a - b)\n const models = unique(lines.map((line) => line.policy.model))\n const harnesses = unique(lines.map((line) => line.policy.harness))\n const captures = unique(lines.map((line) => line.provenance.capture))\n const rewardSources = unique(lines.map((line) => line.outcome.reward_source))\n const gapLines = lines.filter((line) => line.messages.length === 0).length\n const gatedLines = lines.filter((line) => line.outcome.realness_gated).length\n if (gatedLines !== gate.gatedLines) {\n throw new Error(\n `dataset card: gate report claims ${gate.gatedLines} realness-gated line(s) but the lines ` +\n `it describes contain ${gatedLines} — the card and the build measured different data.`,\n )\n }\n\n const configs = formats\n .map((format) =>\n [\n ` - config_name: ${format}`,\n ' data_files:',\n ' - split: train',\n ` path: ${FORMAT_FILES[format]}`,\n ].join('\\n'),\n )\n .join('\\n')\n\n const frontmatter = [\n '---',\n 'license: unknown',\n 'pretty_name: Tangle rollout ledger — agent trajectories',\n 'configs:',\n configs,\n '---',\n ].join('\\n')\n\n const formatsTable = markdownTable(\n ['config', 'path', 'rows', 'contents'],\n formats.map((format) => [\n format,\n `\\`${FORMAT_FILES[format]}\\``,\n String(formatCounts[format] ?? 0),\n FORMAT_DESCRIPTIONS[format],\n ]),\n )\n\n const countsTable = markdownTable(['role', 'reward', 'lines'], roleRewardRows(lines))\n\n const scrubTable = markdownTable(\n ['rule', 'rewrites'],\n Object.entries(scrubTotals).map(([rule, count]) => [rule, String(count)]),\n )\n\n const proposerNote = includeProposers\n ? 'Proposer sessions are INCLUDED (`--include-proposers`); their transcripts contain improvement-loop harness source.'\n : `Proposer sessions are excluded by default (${excluded.proposers} lines dropped); they contain improvement-loop harness source. Rebuild with \\`--include-proposers\\` to keep them.`\n\n return `${frontmatter}\n\n# Tangle rollout ledger — agent trajectories\n\nOne line per agent invocation (supervisor episode, worker session, proposer shot, judge call, analyst pass) captured by the \\`${ROLLOUT_SCHEMA}\\` rollout ledger, labeled with improvement-loop coordinates and the official-judge reward, with the full message transcript inline.\n\nThis release contains the **trainable split only** (\\`search\\`). Holdout, dev, and canary splits are structurally excluded at build time, and the build additionally drops any non-trainable line as a fail-closed filter (${excluded.nonTrain} dropped here).\n\n## Formats\n\n${formatsTable}\n\n## Anti-Goodhart gate (\\`realness_gated\\`)\n\n${gateSection(formats, gate, lines.length)}\n\n## Schema (\\`${ROLLOUT_SCHEMA}\\`)\n\nEach raw line carries:\n\n- \\`rollout_id\\` / \\`parent_rollout_id\\` — invocation identity; workers point at their spawning supervisor episode.\n- \\`run_id\\`, \\`experiment_id\\`, \\`candidate_id\\` — run/experiment/candidate identity from the producing RunRecord, when present.\n- \\`generation\\`, \\`candidate_index\\` — improvement-loop coordinates (\\`-1\\` = baseline campaign; \\`null\\` = not an improvement loop).\n- \\`role\\` — one of ${ROLLOUT_ROLES.map((role) => `\\`${role}\\``).join(', ')}.\n- \\`task\\` — suite, instance id, split, seed, replicate index.\n- \\`policy\\` — harness, model, provider, profile commit, prompt/config hashes, sampling params.\n- \\`messages\\` / \\`tool_defs\\` — full transcript in canonical OpenAI chat-with-tools form (including \\`reasoning_content\\`). An empty \\`messages\\` array is a labeled gap line; \\`provenance.gap\\` says why the transcript could not be recovered (${gapLines} gap lines in this release).\n- \\`outcome\\` — \\`reward\\` (the single scalar), \\`reward_source\\`, the verbatim judge \\`verdict\\`, non-scalar \\`metrics\\`, and \\`realness_gated\\` (anti-Goodhart flag; see [Anti-Goodhart gate](#anti-goodhart-gate-realness_gated) for the per-config treatment and the measured counts).\n- \\`cost\\` — usd, token counts, wall time.\n- \\`artifacts\\` / \\`provenance\\` — patch/run-dir/transcript pointers (scrubbed) and capture metadata.\n\n## Provenance\n\n- Source ledgers: ${sourceFiles.map((file) => `\\`${file}\\``).join(', ')}\n- Run ids: ${runIds.map((id) => `\\`${id}\\``).join(', ')}\n- Generations: ${generations.join(', ')} (\\`-1\\` = baseline campaign)\n- Models: ${models.map((m) => `\\`${m}\\``).join(', ')}\n- Harnesses: ${harnesses.map((h) => `\\`${h}\\``).join(', ')}\n- Capture modes: ${captures.join(', ')}\n- Every reward traces to a named source (reward sources in this release: ${rewardSources.map((s) => `\\`${s}\\``).join(', ')}).\n\n${proposerNote}\n\n## Reward semantics per role\n\n- **agent** — the producing RunRecord's holdout/search score, with the realness gate forcing gamed successes to 0.\n- **supervisor** — the official-judge verdict on the episode's delivered artifact (1 = resolved, 0 = not).\n- **worker** — INHERITED from the parent supervisor episode (\\`…/inherited\\`). Caveat: reward 1 does not establish this worker's individual contribution (sibling workers in the same episode share the episode outcome), and reward 0 does not prove this worker failed.\n- **proposer** — the fraction of improvement-set instances the proposed candidate resolved (\\`…/candidate-resolved-fraction\\`); a scalar in [0, 1], not a binary verdict.\n- **judge / analyst** — carry the episode verdict where one applies; otherwise \\`reward: null\\` (a labeled gap, never 0).\n\n## Counts\n\n${countsTable}\n\nTotal lines: ${lines.length}\n\n## Scrubbing\n\nAbsolute home paths were rewritten to \\`$WORK\\`, credential-shaped strings were replaced with \\`[REDACTED:<kind>]\\` markers, internal hostnames were normalized to \\`*.internal.example\\`, and username-bearing incidentals (\\`ls -l\\` owner columns, per-user pytest tmpdirs) were normalized to \\`user\\` / \\`$USER\\`. Rewrite counts for this release (full per-file breakdown in \\`scrub-report.json\\`):\n\n${scrubTable}\n\n## License\n\n\\`license: unknown\\` is a placeholder — the releasing operator must set the real SPDX license id in the frontmatter above before publishing.\n\n## Citation\n\n\\`\\`\\`bibtex\n@misc{tangle_rollout_ledger,\n title = {Tangle rollout ledger — agent trajectories},\n author = {{Tangle Network}},\n howpublished = {HuggingFace Datasets},\n note = {Operator: fill in the repository URL, authors, and year before publishing}\n}\n\\`\\`\\`\n`\n}\n","/**\n * Deterministic scrubbing pass over rollout-ledger lines before public release.\n *\n * Every rule is a pure regex rewrite applied to every string value in a line\n * (messages, artifacts, run ids, tool arguments — everywhere), so the scrubbed\n * line is still a valid `tangle.rollout.v1` line. Rules are idempotent:\n * scrub(scrub(x)) === scrub(x), and a second pass counts zero hits — that is\n * the property the release pipeline relies on to prove nothing half-scrubbed\n * ships. Rule order matters: whole `KEY=value` env pairs are redacted before\n * the bare-key rule so one secret is never counted twice.\n */\n\nimport { assertMinted, type MintedRolloutLine } from '../schema'\n\nexport interface ScrubRule {\n name: string\n pattern: RegExp\n /** Rewrite for one match; `g1` is the first capture group when present. */\n rewrite: (match: string, g1?: string) => string\n}\n\nconst SCRUB_RULES: readonly ScrubRule[] = [\n {\n // /home/<user> and /Users/<user> prefixes → $WORK ($HOME-derived paths).\n name: 'home-path',\n pattern: /\\/(?:home|Users)\\/[A-Za-z0-9._-]+/g,\n rewrite: () => '$WORK',\n },\n {\n // Harness stores encode cwd as a dashed path segment (-home-drew-…);\n // strip the leading -home-<user> so the username never ships.\n name: 'home-path-encoded',\n pattern: /(?<=\\/)-(?:home|Users)-[A-Za-z0-9_.]+/g,\n rewrite: () => '$WORK',\n },\n {\n // pytest names its tmpdir after the invoking user (/tmp/pytest-of-drew).\n name: 'tmp-user-dir',\n pattern: /\\/tmp\\/pytest-of-[A-Za-z0-9._-]+/g,\n rewrite: () => '/tmp/pytest-of-$USER',\n },\n {\n // `ls -l` owner/group columns leak the username in captured tool output.\n // The `(?!user user…)` guard keeps a second pass at zero rewrites.\n name: 'ls-owner',\n pattern:\n /([-bcdlps][-rwxsStT]{9}[.+@]?\\s+\\d+\\s+)(?!user user(?=\\s))[A-Za-z0-9._-]+\\s+[A-Za-z0-9._-]+(?=\\s)/g,\n rewrite: (_match, prefix) => `${prefix}user user`,\n },\n {\n // Env-var-shaped secrets: NAME=value where NAME looks credential-bearing.\n // The (?!\\[REDACTED:) guard keeps the rule idempotent on its own output.\n name: 'env-secret',\n pattern:\n /\\b([A-Z][A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CREDENTIALS?))=(?!\\[REDACTED:)(\"[^\"]*\"|'[^']*'|[^\\s\"']+)/g,\n rewrite: (_match, name) => `${name}=[REDACTED:env]`,\n },\n {\n name: 'bearer-token',\n pattern: /\\b(Bearer|Basic)\\s+(?!\\[REDACTED:)[A-Za-z0-9\\-._~+/=]{8,}/g,\n rewrite: (_match, scheme) => `${scheme} [REDACTED:bearer]`,\n },\n {\n // Bare provider-prefixed keys (OpenAI/Anthropic sk-, GitHub ghp_/gho_/…,\n // fine-grained PATs, HuggingFace hf_, Slack xox*, AWS AKIA).\n name: 'api-key',\n pattern:\n /\\b(?:sk-[A-Za-z0-9_-]{16,}|gh[pousr]_[A-Za-z0-9]{16,}|github_pat_[A-Za-z0-9_]{20,}|hf_[A-Za-z0-9]{16,}|xox[baprs]-[A-Za-z0-9-]{10,}|AKIA[0-9A-Z]{16})\\b/g,\n rewrite: () => '[REDACTED:api-key]',\n },\n {\n // Our infra hostnames → placeholder domain, subdomain preserved\n // (router.tangle.tools → router.internal.example).\n name: 'infra-host',\n pattern: /(?<![A-Za-z0-9.-])((?:[A-Za-z0-9-]+\\.)*)tangle\\.(?:tools|network)(?![A-Za-z0-9-])/g,\n rewrite: (_match, prefix) => `${prefix ?? ''}internal.example`,\n },\n {\n // Known workstation hostnames leak through email Message-IDs and fqdn\n // lookups inside captured test output; extend the list as machines join.\n name: 'machine-host',\n pattern: /\\b[A-Za-z0-9]+-GTR-Pro\\b/g,\n rewrite: () => 'workstation',\n },\n]\n\n/** Rule name → number of matches rewritten. Always carries every rule (0 is data). */\nexport type ScrubCounts = Record<string, number>\n\nexport function emptyScrubCounts(): ScrubCounts {\n return Object.fromEntries(SCRUB_RULES.map((rule) => [rule.name, 0]))\n}\n\nexport function addScrubCounts(into: ScrubCounts, from: ScrubCounts): ScrubCounts {\n for (const [name, count] of Object.entries(from)) into[name] = (into[name] ?? 0) + count\n return into\n}\n\nexport function scrubText(text: string, counts: ScrubCounts): string {\n let out = text\n for (const rule of SCRUB_RULES) {\n out = out.replace(rule.pattern, (match: string, ...rest: unknown[]) => {\n counts[rule.name] = (counts[rule.name] ?? 0) + 1\n return rule.rewrite(match, typeof rest[0] === 'string' ? rest[0] : undefined)\n })\n }\n return out\n}\n\nfunction scrubValue(value: unknown, counts: ScrubCounts): unknown {\n if (typeof value === 'string') return scrubText(value, counts)\n if (Array.isArray(value)) return value.map((item) => scrubValue(item, counts))\n if (value !== null && typeof value === 'object') {\n const out: Record<string, unknown> = {}\n for (const [key, item] of Object.entries(value)) out[key] = scrubValue(item, counts)\n return out\n }\n return value\n}\n\n/**\n * Scrub every string value in a line; structure and key order are preserved.\n *\n * `assertMinted` on the way out rather than a cast: scrubbing rebuilds the\n * object, so the brand has to be re-earned, and re-validating proves the rules\n * did not rewrite a field the schema constrains (`reward` is a number, not a\n * string, so no rule should ever touch it — this is what checks that).\n */\nfunction scrubRolloutLine(line: MintedRolloutLine, counts: ScrubCounts): MintedRolloutLine {\n return assertMinted(scrubValue(line, counts), `scrubbed rollout line ${line.rollout_id}`)\n}\n\nexport function scrubLines(lines: MintedRolloutLine[]): {\n lines: MintedRolloutLine[]\n counts: ScrubCounts\n} {\n const counts = emptyScrubCounts()\n return { lines: lines.map((line) => scrubRolloutLine(line, counts)), counts }\n}\n\n/**\n * A `RolloutScrubber` (text → text) applying the full rule set — the\n * default hook to pass to `mintRolloutRows({ scrub })` so lines are\n * scrubbed at mint time, before they ever reach a ledger file. Release\n * builds re-run `scrubLines` regardless (idempotent), so double-scrubbing\n * is safe and counted as zero.\n */\nexport function defaultRolloutScrubber(text: string): string {\n return scrubText(text, emptyScrubCounts())\n}\n","/**\n * One-command HuggingFace dataset release from rollout ledgers:\n *\n * agent-eval rollout-release <ledger.jsonl...> --out <dir> \\\n * [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]\n *\n * Pipeline per input ledger: read + validate → fail-closed filters\n * (trainable split only; proposer sessions dropped unless\n * --include-proposers, they contain improvement-loop harness source) →\n * deterministic scrub → export the requested formats + scrub-report.json +\n * auto-generated README.md card. Deterministic: same inputs and flags →\n * byte-identical output dir.\n *\n * --push uploads the built dir with `huggingface-cli upload` only when the\n * CLI exists on PATH and HF_TOKEN is present in the env; the token is\n * never printed. Everything else runs fully offline.\n */\n\nimport { spawnSync } from 'node:child_process'\nimport { mkdir, writeFile } from 'node:fs/promises'\nimport { basename, dirname, join } from 'node:path'\nimport { toJsonl, toRftItems, toSftRows, toVerifiersRolloutOutputs } from '../exporters'\nimport { readRolloutLedger, writeRolloutLedger } from '../ledger'\nimport { isTrainableSplit, type MintedRolloutLine } from '../schema'\nimport { buildDatasetCard, FORMAT_FILES, RELEASE_FORMATS, type ReleaseFormat } from './card'\nimport {\n assertGateReport,\n FORMAT_GATE_DISPOSITION,\n type GateReport,\n gatedRolloutIds,\n measureFormatGate,\n releaseRowRefs,\n} from './gate-report'\nimport { addScrubCounts, emptyScrubCounts, type ScrubCounts, scrubLines } from './scrub'\n\nexport interface BuildOptions {\n out: string\n formats: ReleaseFormat[]\n includeProposers: boolean\n}\n\nexport interface ScrubReport {\n /** Input ledger path → rule → rewrite count (only shipped lines are scrubbed). */\n files: Record<string, ScrubCounts>\n totals: ScrubCounts\n excluded: { proposers: number; nonTrain: number }\n}\n\nexport interface BuildSummary {\n inputs: string[]\n read: number\n kept: number\n scrub: ScrubReport\n formatCounts: Partial<Record<ReleaseFormat, number>>\n /** Per-format anti-Goodhart accounting, measured on the rows written. */\n gate: GateReport\n files: string[]\n}\n\nexport async function buildHfDataset(\n inputs: string[],\n options: BuildOptions,\n): Promise<BuildSummary> {\n if (inputs.length === 0) throw new Error('no input ledgers given')\n if (options.formats.length === 0) throw new Error('no formats selected')\n\n const report: ScrubReport = {\n files: {},\n totals: emptyScrubCounts(),\n excluded: { proposers: 0, nonTrain: 0 },\n }\n const kept: MintedRolloutLine[] = []\n let read = 0\n\n for (const input of inputs) {\n const lines = await readRolloutLedger(input)\n read += lines.length\n const shippable = lines.filter((line) => {\n if (!isTrainableSplit(line.task.split)) {\n report.excluded.nonTrain += 1\n return false\n }\n if (!options.includeProposers && line.role === 'proposer') {\n report.excluded.proposers += 1\n return false\n }\n return true\n })\n const scrubbed = scrubLines(shippable)\n report.files[input] = scrubbed.counts\n addScrubCounts(report.totals, scrubbed.counts)\n kept.push(...scrubbed.lines)\n }\n\n const formatCounts: Partial<Record<ReleaseFormat, number>> = {}\n const files: string[] = []\n const gated = gatedRolloutIds(kept)\n const gate: GateReport = { gatedLines: gated.size, byFormat: {} }\n\n // Every selected format's rows are exported and gate-measured BEFORE the\n // first byte is written. A build that would ship a gamed run at a positive\n // reward fails with nothing on disk, rather than leaving a poisoned config\n // behind for someone to `--push`.\n const pending: Array<{ path: string; write: () => Promise<void> }> = []\n\n for (const format of options.formats) {\n const path = join(options.out, FORMAT_FILES[format])\n if (format === 'raw') {\n // writeRolloutLedger re-validates every scrubbed line before it lands.\n gate.byFormat.raw = measureFormatGate(gated, releaseRowRefs.raw(kept))\n formatCounts.raw = kept.length\n pending.push({ path, write: () => writeRolloutLedger(path, kept) })\n } else if (format === 'sft') {\n const rows = toSftRows(kept)\n gate.byFormat.sft = measureFormatGate(gated, releaseRowRefs.sft(rows))\n formatCounts.sft = rows.length\n pending.push({ path, write: () => writeFile(path, toJsonl(rows)) })\n } else if (format === 'verifiers') {\n // The declared disposition drives the exporter: 'zero-and-flag' ships\n // gated lines and honest failures as labeled negatives at reward 0.\n const outputs = toVerifiersRolloutOutputs(kept, {\n gatedLines: FORMAT_GATE_DISPOSITION.verifiers,\n })\n gate.byFormat.verifiers = measureFormatGate(gated, releaseRowRefs.verifiers(outputs))\n formatCounts.verifiers = outputs.length\n pending.push({ path, write: () => writeFile(path, toJsonl(outputs)) })\n } else {\n const items = toRftItems(kept, { gatedLines: FORMAT_GATE_DISPOSITION.rft })\n gate.byFormat.rft = measureFormatGate(gated, releaseRowRefs.rft(items))\n formatCounts.rft = items.length\n pending.push({ path, write: () => writeFile(path, toJsonl(items)) })\n }\n }\n\n assertGateReport(gate)\n\n for (const { path, write } of pending) {\n await mkdir(dirname(path), { recursive: true })\n await write()\n files.push(path)\n }\n\n const reportPath = join(options.out, 'scrub-report.json')\n await writeFile(reportPath, `${JSON.stringify(report, null, 2)}\\n`)\n files.push(reportPath)\n\n const cardPath = join(options.out, 'README.md')\n await writeFile(\n cardPath,\n buildDatasetCard({\n lines: kept,\n formats: options.formats,\n includeProposers: options.includeProposers,\n sourceFiles: inputs.map((input) => basename(input)),\n scrubTotals: report.totals,\n excluded: report.excluded,\n formatCounts,\n gate,\n }),\n )\n files.push(cardPath)\n\n return { inputs, read, kept: kept.length, scrub: report, formatCounts, gate, files }\n}\n\nfunction planPushCommand(repo: string, outDir: string): string[] {\n return ['huggingface-cli', 'upload', repo, outDir, '.', '--repo-type', 'dataset']\n}\n\nfunction pushDataset(repo: string, outDir: string): void {\n const found = spawnSync('which', ['huggingface-cli'], { stdio: 'ignore' })\n if (found.status !== 0) {\n throw new Error(\n 'huggingface-cli not found on PATH — install huggingface_hub[cli] before --push',\n )\n }\n if (!process.env.HF_TOKEN) {\n throw new Error('HF_TOKEN not present in env — refusing to push')\n }\n const [command, ...args] = planPushCommand(repo, outDir) as [string, ...string[]]\n // Token stays in the inherited env; it is never echoed or interpolated.\n const run = spawnSync(command, args, { stdio: 'inherit' })\n if (run.status !== 0) throw new Error(`huggingface-cli upload exited ${String(run.status)}`)\n}\n\nexport interface RolloutReleaseCliArgs extends BuildOptions {\n inputs: string[]\n push: string | null\n}\n\nconst ROLLOUT_RELEASE_USAGE =\n 'usage: agent-eval rollout-release <ledger.jsonl...> --out <dir> [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]'\n\nfunction parseRolloutReleaseArgs(argv: string[]): RolloutReleaseCliArgs {\n const args: RolloutReleaseCliArgs = {\n inputs: [],\n out: '',\n formats: [...RELEASE_FORMATS],\n includeProposers: false,\n push: null,\n }\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i]!\n if (arg === '--out') {\n args.out = argv[++i] ?? ''\n } else if (arg === '--formats') {\n const raw = (argv[++i] ?? '').split(',').filter(Boolean)\n for (const format of raw) {\n if (!RELEASE_FORMATS.includes(format as ReleaseFormat)) {\n throw new Error(\n `unknown format \"${format}\" — expected one of ${RELEASE_FORMATS.join(',')}`,\n )\n }\n }\n args.formats = raw as ReleaseFormat[]\n } else if (arg === '--include-proposers') {\n args.includeProposers = true\n } else if (arg === '--push') {\n args.push = argv[++i] ?? null\n } else if (arg.startsWith('--')) {\n throw new Error(`unknown flag \"${arg}\"`)\n } else {\n args.inputs.push(arg)\n }\n }\n if (args.inputs.length === 0 || !args.out) {\n throw new Error(ROLLOUT_RELEASE_USAGE)\n }\n if (args.push !== null && !/^[\\w.-]+\\/[\\w.-]+$/.test(args.push)) {\n throw new Error(`--push expects <org/name>, got \"${args.push}\"`)\n }\n return args\n}\n\n/** CLI driver for `agent-eval rollout-release`. Returns the process exit code. */\nexport async function runRolloutReleaseCli(argv: string[]): Promise<number> {\n let args: RolloutReleaseCliArgs\n try {\n args = parseRolloutReleaseArgs(argv)\n } catch (error) {\n process.stderr.write(`${error instanceof Error ? error.message : String(error)}\\n`)\n return 2\n }\n const summary = await buildHfDataset(args.inputs, args)\n process.stdout.write(\n `${JSON.stringify(\n {\n read: summary.read,\n kept: summary.kept,\n formatCounts: summary.formatCounts,\n gate: summary.gate,\n scrub: summary.scrub,\n },\n null,\n 2,\n )}\\n`,\n )\n process.stdout.write(`dataset → ${args.out} (${summary.files.length} files)\\n`)\n if (args.push !== null) {\n pushDataset(args.push, args.out)\n process.stdout.write(`pushed → ${args.push}\\n`)\n }\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,UAAU,OAA8B;CAC/C,KAAK,MAAM,CAAC,GAAG,SAAS,MAAM,QAAQ,GAAG,kBAAkB,MAAM,iBAAiB,EAAE,EAAE;CACtF,OAAO,MAAM,KAAK,SAAS,KAAK,UAAU,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,MAAM,SAAS,IAAI,OAAO;AAC3F;;AAGA,eAAsB,mBAAmB,MAAc,OAAqC;CAC1F,MAAM,UAAU,UAAU,KAAK;CAC/B,MAAM,MAAM,QAAQ,IAAI,GAAG,EAAE,WAAW,KAAK,CAAC;CAC9C,MAAM,UAAU,MAAM,OAAO;AAC/B;;AAGA,eA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M;;;;;;EAMN,UAAU,MAAM,eAAe,QAAQ,WAAW;;EAElD;;EAEA,UAAU,MAAM,KAAK;;EAErB;;EAEA;;;;;EAKA;;;;;;;;;;;;;EAaA;;EAEA,kBAAkB,MAAM,YAAY,QAAQ,WAAW;;;EAGvD,SAAS;;;;iBC1BW,eAAe,QACnC,MAAM,sBAAsB,UAC3B,QAAQ,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CTIRz-AB.d.ts","names":[],"sources":["../src/semantic-concept-judge.ts","../src/analyst/chat-trace-engine.ts","../src/analyst/trace-tool-callback.ts","../src/analyst/dspy-rlm-engine.ts","../src/analyst/finding-subject.ts","../src/analyst/kinds/control-integrity.ts","../src/analyst/kinds/failure-mode.ts","../src/analyst/kinds/improvement.ts","../src/analyst/kinds/knowledge-gap.ts","../src/analyst/kinds/knowledge-poisoning.ts","../src/analyst/kinds/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDY;UAEK;EACf;;EAEA;;EAEA;;EAEA,aAAa;;UAGE;EACf;EACA;;EAEA;EACA;EACA,UAAU;;UAGK;;EAEf;;EAEA;;EAEA,aAAa;IAAQ;IAAc;;;EAEnC,kBAAkB;;EAElB;EACA;;UAGe;EACf;EACA;;EAEA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;;EAEA;EACA;;;;;;;;KASU;UAQK;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,MAAM;;EAEN,UAAU;EACV,aAAa;EACb;EACA,WAAW;EACX,SAAS;;;;;;EAMT,iBAAiB;;EAEjB,oBAAoB,QAAQ,OAAO;;cAKxB;;;;;;iBAkGS,wBACpB,OAAO,2BACP,SAAS,8BACR,QAAQ;;;UChMM;;;;;EAKf,MAAM;;EAEN;;EAEA,UAAU;;EAEV;;EAEA;;EAEA,WAAW;;EAEX;;;;;;;;;;EAUA;;;;;;iBAkCc,sBAAsB,SAAS,yBAAyB;;;KCr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[],"sources":["../src/ledger-core/atomic-file-lock.ts","../src/ledger-core/journal-file.ts","../src/ledger-core/trusted-head.ts","../src/ledger-core/journal.ts","../src/ledger-core/merkle.ts","../src/ledger-core/projector-snapshot.ts"],"mappings":";;;;;;;UA8BiB,4BAA4B;WAClC;;UAGM;WACN,OAAO;EAChB;;KAGU;WACG;WAA0B;WAAyB,QAAQ;;WAC3D;WAA0B;;KAE7B;WACG;WAAyB,MAAM;IAC1C;UAEa;WACN;WACA;;;;;;;;iBA8BK,yBACd,SAAS,wBACR;;;;;UC/Dc;;EAEf;EACA,eAAe,iBAAiB;IAAY;MAAoB;;;;;iBAkDlD,0BACd,cACA,kBACA,SAAS;KA6CC,eAAe;EAAO;EAAgB,OAAO;;EAAQ;;iBAEjD,sBAAsB,GACpC,cACA,SAAS,mBACT,WAAW,IACV,eAAe;;;;UCnED;EACf;EACA,WAAW;;;UAII;EACf;EACA,WAAW;;;;;;;;KA8FD;EACN;EAAe,MAAM;EAAmB;;EACxC;EAAe;EAAY;EAAoB;;EAC/C;EAAgB;;;UAsCL;;EAEf;;;EAGA;;;;;UC7Ie;EACf;;;;;UAMe,kBAAkB,cAAc;EAC/C;EACA,cAAc;EACd,OAAO;EACP,WAAW;;KAGD,cAAc,uBAAuB,cAAc,mBAAmB,SAChF,kBAAkB;UAEH;EACf;EACA;;;;;;;;;;UAWe,gBAAgB,OAAO;EACtC,MAAM,OAAO,OAAO;;;;EAIpB,YAAY;;;;;;;;;;UAWG,6BAA6B,OAAO;EACnD,UAAU,YAAY;EACtB,QAAQ,sBAAsB,gBAAgB,OAAO;;UAGtC,mBACf,uBACA,cAAc,iBACd,oBACQ;;EAER,QAAQ;EACR,cAAc,kBAAkB;;;;;;EAMhC,WAAW,cAAc,SAAS,oBAAoB,cAAc,QAAQ;;EAE5E,iBAAiB,OAAO,cAAc,QAAQ,QAAQ;EACtD,mBAAmB,gBAAgB,cAAc,QAAQ,QAAQ;EACjE,qBAAqB,6BAA6B,cAAc,QAAQ,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