@tangle-network/agent-eval 0.216.1 → 0.217.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +102 -57
- package/README.md +2 -2
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-VFcQncbW.d.ts → agent-profile-DTt8uGP9.d.ts} +4 -17
- package/dist/agent-profile-DTt8uGP9.d.ts.map +1 -0
- package/dist/{agent-profile-cell-BK8mlqlq.js → agent-profile-cell-B1V1gUZs.js} +4 -53
- package/dist/agent-profile-cell-B1V1gUZs.js.map +1 -0
- package/dist/{agent-profile-cell-BNp-Js9F.d.ts → agent-profile-cell-BcpFbNd5.d.ts} +2 -22
- package/dist/agent-profile-cell-BcpFbNd5.d.ts.map +1 -0
- package/dist/{agreement-irr-BEWLIF3_.js → agreement-irr-BhAqjluA.js} +5 -5
- package/dist/agreement-irr-BhAqjluA.js.map +1 -0
- package/dist/analyst/index.d.ts +36 -169
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +17 -192
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-C84irm4i.js → analyze-runs-DqPJaJ4X.js} +225 -21
- package/dist/analyze-runs-DqPJaJ4X.js.map +1 -0
- package/dist/{analyze-runs-D68fd-su.d.ts → analyze-runs-DyeNcenW.d.ts} +5 -5
- package/dist/{analyze-runs-D68fd-su.d.ts.map → analyze-runs-DyeNcenW.d.ts.map} +1 -1
- package/dist/authenticity/index.d.ts +0 -23
- package/dist/authenticity/index.d.ts.map +1 -1
- package/dist/authenticity/index.js +1 -34
- package/dist/authenticity/index.js.map +1 -1
- package/dist/{benchmark-command-By0vh8q7.js → benchmark-command-xQK8nOI6.js} +554 -89
- package/dist/benchmark-command-xQK8nOI6.js.map +1 -0
- package/dist/benchmarks/index.d.ts +5 -6
- package/dist/benchmarks/index.d.ts.map +1 -1
- package/dist/benchmarks/index.js +4 -4
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/builder-eval/index.d.ts +3 -3
- package/dist/builder-eval/index.js +2 -2
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/campaign/index.d.ts +7 -7
- package/dist/campaign/index.js +15 -15
- package/dist/{campaign-BudZ70zo.js → campaign-CJGkxAQ6.js} +23 -530
- package/dist/campaign-CJGkxAQ6.js.map +1 -0
- package/dist/{campaign-evidence-Clrn4hBV.js → campaign-evidence-CQYw8_0H.js} +10 -18
- package/dist/{campaign-evidence-Clrn4hBV.js.map → campaign-evidence-CQYw8_0H.js.map} +1 -1
- package/dist/{canonical-B2RqLofv.js → canonical-Dq2hOQ8L.js} +2 -2
- package/dist/{canonical-B2RqLofv.js.map → canonical-Dq2hOQ8L.js.map} +1 -1
- package/dist/cell-spend-DEWR3nj-.js +90 -0
- package/dist/cell-spend-DEWR3nj-.js.map +1 -0
- package/dist/{chat-client-l-MVDlDk.js → chat-client-ldqxYYTN.js} +2 -2
- package/dist/{chat-client-l-MVDlDk.js.map → chat-client-ldqxYYTN.js.map} +1 -1
- package/dist/{chat-json-call-puMArmtW.js → chat-json-call-DavzexSp.js} +3 -2
- package/dist/chat-json-call-DavzexSp.js.map +1 -0
- package/dist/{claim-q4HQhK1G.js → claim-BPVuyHuy.js} +3 -3
- package/dist/{claim-q4HQhK1G.js.map → claim-BPVuyHuy.js.map} +1 -1
- package/dist/cli.js +113 -12
- package/dist/cli.js.map +1 -1
- package/dist/{client-BzL9niqi.d.ts → client-hwo3cJjR.d.ts} +3 -16
- package/dist/client-hwo3cJjR.d.ts.map +1 -0
- package/dist/{cluster-bootstrap-qcUWYFl-.js → cluster-bootstrap-DEwwhl0C.js} +3 -3
- package/dist/{cluster-bootstrap-qcUWYFl-.js.map → cluster-bootstrap-DEwwhl0C.js.map} +1 -1
- package/dist/{produced-state-BsDmnwxc.js → completion-verifier-B_jw6C9p.js} +9 -64
- package/dist/completion-verifier-B_jw6C9p.js.map +1 -0
- package/dist/contract/index.d.ts +12 -12
- package/dist/contract/index.js +25 -401
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-BP8V4kUQ.js → cost-ledger-D0352Z4d.js} +4 -8
- package/dist/cost-ledger-D0352Z4d.js.map +1 -0
- package/dist/dataset-DQqhOCPt.d.ts.map +1 -1
- package/dist/{default-registry-COhk9g36.js → default-registry-ClYjq3QE.js} +8 -11
- package/dist/default-registry-ClYjq3QE.js.map +1 -0
- package/dist/{default-registry-DzHiGruW.d.ts → default-registry-DXgLmoDI.d.ts} +7 -50
- package/dist/default-registry-DXgLmoDI.d.ts.map +1 -0
- package/dist/{define-agent-eval-CNTPzIkp.js → define-agent-eval-BDxNlP3D.js} +10 -10
- package/dist/{define-agent-eval-CNTPzIkp.js.map → define-agent-eval-BDxNlP3D.js.map} +1 -1
- package/dist/{define-agent-eval-WSck0CZJ.d.ts → define-agent-eval-BIkH_gAR.d.ts} +8 -8
- package/dist/define-agent-eval-BIkH_gAR.d.ts.map +1 -0
- package/dist/{descriptive-DboxPZrG.js → descriptive-CVNy48rR.js} +2 -2
- package/dist/{descriptive-DboxPZrG.js.map → descriptive-CVNy48rR.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +4 -14
- package/dist/diagnosis/index.d.ts.map +1 -1
- package/dist/diagnosis/index.js +67 -28
- package/dist/diagnosis/index.js.map +1 -1
- package/dist/{dspy-rlm-engine-LRCu61m5.js → dspy-rlm-engine-DhdCr1Dc.js} +5 -10
- package/dist/dspy-rlm-engine-DhdCr1Dc.js.map +1 -0
- package/dist/{emitter-HcCmFQl_.d.ts → emitter-DABYYTcH.d.ts} +5 -5
- package/dist/emitter-DABYYTcH.d.ts.map +1 -0
- package/dist/emitter-DbMXUIVP.js.map +1 -1
- package/dist/{engine-3A_4jOlI.d.ts → engine-BvZ0R-36.d.ts} +17 -21
- package/dist/engine-BvZ0R-36.d.ts.map +1 -0
- package/dist/{equal-terms-BtdXayCJ.js → equal-terms-DbPGcVtI.js} +2 -2
- package/dist/equal-terms-DbPGcVtI.js.map +1 -0
- package/dist/{errors-DVZiqS7K.js → errors-BcOs5MKW.js} +2 -8
- package/dist/{errors-DVZiqS7K.js.map → errors-BcOs5MKW.js.map} +1 -1
- package/dist/{eval-campaign-90jeaCAI.js → eval-campaign-BLEfBGbA.js} +6 -6
- package/dist/{eval-campaign-90jeaCAI.js.map → eval-campaign-BLEfBGbA.js.map} +1 -1
- package/dist/{evaluation-6Yoi74gM.d.ts → evaluation-jTjC_QQD.d.ts} +7 -7
- package/dist/evaluation-jTjC_QQD.d.ts.map +1 -0
- package/dist/evaluation.d.ts +2 -2
- package/dist/evaluation.js +1 -1
- package/dist/evaluation.js.map +1 -1
- package/dist/{exact-types-ClugMJfI.d.ts → exact-types-CflbJ9f3.d.ts} +2 -2
- package/dist/{exact-types-ClugMJfI.d.ts.map → exact-types-CflbJ9f3.d.ts.map} +1 -1
- package/dist/{exec-ChJ6d5if.js → exec-CpbtOXVt.js} +2 -24
- package/dist/{exec-ChJ6d5if.js.map → exec-CpbtOXVt.js.map} +1 -1
- package/dist/execution-tracks-CpgFPpS5.js.map +1 -1
- package/dist/experiment/index.d.ts +9 -112
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +149 -241
- package/dist/experiment/index.js.map +1 -1
- package/dist/{exporters-X4xwla8A.js → exporters-Cl6IeNAu.js} +3 -3
- package/dist/exporters-Cl6IeNAu.js.map +1 -0
- package/dist/{exporters-ChTnR90l.d.ts → exporters-Dk3oEbK_.d.ts} +2 -4
- package/dist/{exporters-ChTnR90l.d.ts.map → exporters-Dk3oEbK_.d.ts.map} +1 -1
- package/dist/{external-optimizer-process-BjMGUuds.js → external-optimizer-process-KVFGvYX1.js} +4 -3
- package/dist/external-optimizer-process-KVFGvYX1.js.map +1 -0
- package/dist/{external-optimizer-subprocess-BqW0hHcI.js → external-optimizer-subprocess-XIHBOSKt.js} +9 -11
- package/dist/external-optimizer-subprocess-XIHBOSKt.js.map +1 -0
- package/dist/{extract-usage-BrnzRJ6H.js → extract-usage-BZLU01kR.js} +2 -23
- package/dist/{extract-usage-BrnzRJ6H.js.map → extract-usage-BZLU01kR.js.map} +1 -1
- package/dist/{failure-cluster-CbgEDcFJ.d.ts → failure-cluster-DN0t63Z0.d.ts} +4 -43
- package/dist/failure-cluster-DN0t63Z0.d.ts.map +1 -0
- package/dist/{failure-taxonomy-CjabTATj.js → failure-taxonomy-Bx5oWqaW.js} +2 -19
- package/dist/{failure-taxonomy-CjabTATj.js.map → failure-taxonomy-Bx5oWqaW.js.map} +1 -1
- package/dist/{feedback-trajectory-C4EG0nNH.d.ts → feedback-trajectory-BWmhRBGu.d.ts} +7 -9
- package/dist/feedback-trajectory-BWmhRBGu.d.ts.map +1 -0
- package/dist/{semantic-concept-judge-BQF8te0T.js → findings-store-BMVQtEsm.js} +9 -249
- package/dist/findings-store-BMVQtEsm.js.map +1 -0
- package/dist/fuzz.d.ts +19 -62
- package/dist/fuzz.d.ts.map +1 -1
- package/dist/fuzz.js +62 -108
- package/dist/fuzz.js.map +1 -1
- package/dist/{hf-dataset-BR2yhuNn.js → hf-dataset-D9f7-oX7.js} +4 -24
- package/dist/hf-dataset-D9f7-oX7.js.map +1 -0
- package/dist/hosted/index.d.ts +2 -2
- package/dist/hosted/index.js +2 -2
- package/dist/{index-DHKEAv3s.d.ts → index-9jJ2fKSX.d.ts} +2 -64
- package/dist/index-9jJ2fKSX.d.ts.map +1 -0
- package/dist/{index-DV-jSzxF.d.ts → index-BLGqZ81N.d.ts} +10 -15
- package/dist/{index-DV-jSzxF.d.ts.map → index-BLGqZ81N.d.ts.map} +1 -1
- package/dist/{index-DPcngtwt.d.ts → index-BiT6RtNH.d.ts} +11 -36
- package/dist/index-BiT6RtNH.d.ts.map +1 -0
- package/dist/{index-BO41eGj5.d.ts → index-CX-GAUpw.d.ts} +3 -7
- package/dist/index-CX-GAUpw.d.ts.map +1 -0
- package/dist/{index-BFRO6chs.d.ts → index-CiRwLv2R.d.ts} +5 -69
- package/dist/index-CiRwLv2R.d.ts.map +1 -0
- package/dist/{index-CyszSg4O.d.ts → index-ZuWx52WG.d.ts} +115 -347
- package/dist/index-ZuWx52WG.d.ts.map +1 -0
- package/dist/index.d.ts +211 -218
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +402 -1040
- package/dist/index.js.map +1 -1
- package/dist/{integrity-dLiDe2kD.js → integrity-DOd9Q86O.js} +7 -9
- package/dist/integrity-DOd9Q86O.js.map +1 -0
- package/dist/{integrity-BXOsAb3i.js → integrity-W4CADcFc.js} +3 -7
- package/dist/{integrity-BXOsAb3i.js.map → integrity-W4CADcFc.js.map} +1 -1
- package/dist/{integrity-DAMEDFaC.d.ts → integrity-_qgZLA5p.d.ts} +4 -6
- package/dist/{integrity-DAMEDFaC.d.ts.map → integrity-_qgZLA5p.d.ts.map} +1 -1
- package/dist/{internal-Epl-YBZW.js → internal-BTK91Bqt.js} +3 -3
- package/dist/{internal-Epl-YBZW.js.map → internal-BTK91Bqt.js.map} +1 -1
- package/dist/{interval-CELpye1n.js → interval-Dq9gt7jx.js} +3 -3
- package/dist/{interval-CELpye1n.js.map → interval-Dq9gt7jx.js.map} +1 -1
- package/dist/{journal-DfRz9kps.js → journal-CR4QikYp.js} +110 -110
- package/dist/journal-CR4QikYp.js.map +1 -0
- package/dist/json-BhdsJaOQ.js +111 -0
- package/dist/json-BhdsJaOQ.js.map +1 -0
- package/dist/{judge-calibration-BpCy5XQl.js → judge-calibration-BkXMIWA4.js} +3 -3
- package/dist/{judge-calibration-BpCy5XQl.js.map → judge-calibration-BkXMIWA4.js.map} +1 -1
- package/dist/{judge-gate-iY9s4L44.js → judge-gate-Co5tuh57.js} +4 -27
- package/dist/{judge-gate-iY9s4L44.js.map → judge-gate-Co5tuh57.js.map} +1 -1
- package/dist/{judge-gate-CE7CQAgt.d.ts → judge-gate-DsL0yFcb.d.ts} +8 -9
- package/dist/judge-gate-DsL0yFcb.d.ts.map +1 -0
- package/dist/{kind-factory-BobI5Jy3.js → kind-factory-Gy4fXixd.js} +88 -17
- package/dist/kind-factory-Gy4fXixd.js.map +1 -0
- package/dist/ledger-core/index.d.ts +2 -2
- package/dist/ledger-core/index.js +4 -4
- package/dist/{ledger-core-Gq7yp8lP.js → ledger-core-DrJhbms9.js} +5 -84
- package/dist/ledger-core-DrJhbms9.js.map +1 -0
- package/dist/{llm-client-CyBAoYiX.js → llm-client-BshCREn6.js} +6 -108
- package/dist/llm-client-BshCREn6.js.map +1 -0
- package/dist/{llm-judge-CG12SQJq.js → llm-judge-C8jMTNNG.js} +24 -32
- package/dist/llm-judge-C8jMTNNG.js.map +1 -0
- package/dist/matrix/index.d.ts +3 -3
- package/dist/matrix/index.js +3 -2
- package/dist/{matrix-Dm0BQW7U.js → matrix-B8l-Nsxd.js} +3 -88
- package/dist/matrix-B8l-Nsxd.js.map +1 -0
- package/dist/{matrix-DSrSxjjy.d.ts → matrix-DHe-dwVJ.d.ts} +9 -18
- package/dist/matrix-DHe-dwVJ.d.ts.map +1 -0
- package/dist/{mean-DHoMiudD.js → mean-BbA_JCzW.js} +39 -5
- package/dist/mean-BbA_JCzW.js.map +1 -0
- package/dist/meta-eval/index.d.ts +5 -5
- package/dist/meta-eval/index.js +10 -10
- package/dist/metrics-BKaPBtIG.js.map +1 -1
- package/dist/{mint-DNU8QPG4.d.ts → mint-BRZXuwRi.d.ts} +4 -4
- package/dist/{mint-DNU8QPG4.d.ts.map → mint-BRZXuwRi.d.ts.map} +1 -1
- package/dist/{mint-QaD5cA0u.js → mint-zszyYlpA.js} +4 -4
- package/dist/{mint-QaD5cA0u.js.map → mint-zszyYlpA.js.map} +1 -1
- package/dist/{multi-layer-verifier-BUaQ4C17.d.ts → multi-layer-verifier-DEgMUk6v.d.ts} +2 -2
- package/dist/{multi-layer-verifier-BUaQ4C17.d.ts.map → multi-layer-verifier-DEgMUk6v.d.ts.map} +1 -1
- package/dist/{multiplicity-DQUFcbW4.js → multiplicity-Sg0U7h8j.js} +2 -2
- package/dist/{multiplicity-DQUFcbW4.js.map → multiplicity-Sg0U7h8j.js.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -23
- package/dist/multishot/golden/index.d.ts.map +1 -1
- package/dist/multishot/golden/index.js +3 -3
- package/dist/multishot/golden/index.js.map +1 -1
- package/dist/multishot/index.d.ts +3 -12
- package/dist/multishot/index.d.ts.map +1 -1
- package/dist/multishot/index.js +4 -3
- package/dist/multishot/index.js.map +1 -1
- package/dist/openapi.json +114 -10
- package/dist/{otel-spans-B9tUXRHF.js → otel-spans-CdN909k1.js} +3 -3
- package/dist/{otel-spans-B9tUXRHF.js.map → otel-spans-CdN909k1.js.map} +1 -1
- package/dist/{paired-arms-CwMGJsrS.js → paired-arms-Ct4LTKc1.js} +32 -9
- package/dist/paired-arms-Ct4LTKc1.js.map +1 -0
- package/dist/{paired-binary-CvpFHfKZ.js → paired-binary-B_nejA44.js} +3 -36
- package/dist/paired-binary-B_nejA44.js.map +1 -0
- package/dist/{paired-promotion-decision-DPKz8ZnF.d.ts → paired-promotion-decision-CQMJ5xGN.d.ts} +2 -34
- package/dist/paired-promotion-decision-CQMJ5xGN.d.ts.map +1 -0
- package/dist/{paired-promotion-decision-DsAPYGCm.js → paired-promotion-decision-D0SHb-ZL.js} +3 -3
- package/dist/{paired-promotion-decision-DsAPYGCm.js.map → paired-promotion-decision-D0SHb-ZL.js.map} +1 -1
- package/dist/{pareto-Cm6ndrWN.js → pareto-BzsxidFD.js} +11 -11
- package/dist/pareto-BzsxidFD.js.map +1 -0
- package/dist/pipelines/index.d.ts +16 -19
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js +4 -68
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{power-and-mde-Hj2ubb4B.js → power-and-mde-N5nU4_Ly.js} +3 -3
- package/dist/{power-and-mde-Hj2ubb4B.js.map → power-and-mde-N5nU4_Ly.js.map} +1 -1
- package/dist/{prime-protocol-CHKgA3a6.js → prime-protocol-BFgGrEMP.js} +3 -3
- package/dist/prime-protocol-BFgGrEMP.js.map +1 -0
- package/dist/{prime-protocol-HiB9HX7E.d.ts → prime-protocol-BWG2DQIk.d.ts} +3 -21
- package/dist/prime-protocol-BWG2DQIk.d.ts.map +1 -0
- package/dist/profile-cell.d.ts +2 -2
- package/dist/profile-cell.js +2 -2
- package/dist/{promotion-gate-BawrdPYr.d.ts → promotion-gate-DaY95yU6.d.ts} +7 -8
- package/dist/{promotion-gate-BawrdPYr.d.ts.map → promotion-gate-DaY95yU6.d.ts.map} +1 -1
- package/dist/{promotion-policy-KO57gbyV.js → promotion-policy-6A8osGr_.js} +4 -4
- package/dist/{promotion-policy-KO57gbyV.js.map → promotion-policy-6A8osGr_.js.map} +1 -1
- package/dist/{proposal-findings-CY1xKn_a.js → proposal-findings-BbWidvUk.js} +3 -3
- package/dist/proposal-findings-BbWidvUk.js.map +1 -0
- package/dist/{query-BUCZCK7F.js → query-B_RZ36an.js} +5 -5
- package/dist/query-B_RZ36an.js.map +1 -0
- package/dist/{query-DK1nWcmp.d.ts → query-Cmv_U8vf.d.ts} +4 -24
- package/dist/{query-DK1nWcmp.d.ts.map → query-Cmv_U8vf.d.ts.map} +1 -1
- package/dist/{random-ByUSnV9w.js → random-DDDcC7YU.js} +2 -2
- package/dist/{random-ByUSnV9w.js.map → random-DDDcC7YU.js.map} +1 -1
- package/dist/{raw-provider-sink-DoHz4JNG.js → raw-provider-sink-75w4FWBj.js} +2 -2
- package/dist/{raw-provider-sink-DoHz4JNG.js.map → raw-provider-sink-75w4FWBj.js.map} +1 -1
- package/dist/{redact-mtCCcT8z.d.ts → redact-DXdlFb_U.d.ts} +2 -3
- package/dist/redact-DXdlFb_U.d.ts.map +1 -0
- package/dist/{redact-B5xXKqQ3.js → redact-mtkTiJVk.js} +2 -7
- package/dist/{redact-B5xXKqQ3.js.map → redact-mtkTiJVk.js.map} +1 -1
- package/dist/{registry-D7_hm2fK.d.ts → registry-ssNoHzwD.d.ts} +4 -4
- package/dist/{registry-D7_hm2fK.d.ts.map → registry-ssNoHzwD.d.ts.map} +1 -1
- package/dist/{release-confidence-CpuP65S5.js → release-confidence-CYIFH-fp.js} +6 -11
- package/dist/release-confidence-CYIFH-fp.js.map +1 -0
- package/dist/{report-command-SC9nqb4M.js → render-C-w2EZ6p.js} +205 -363
- package/dist/render-C-w2EZ6p.js.map +1 -0
- package/dist/reporting.d.ts +6 -6
- package/dist/reporting.js +8 -8
- package/dist/{researcher-CEcfku-T.d.ts → researcher-0ABVIdGa.d.ts} +9 -9
- package/dist/{researcher-CEcfku-T.d.ts.map → researcher-0ABVIdGa.d.ts.map} +1 -1
- package/dist/{reward-CpCmAM8L.d.ts → reward-DrZ71vnf.d.ts} +3 -26
- package/dist/reward-DrZ71vnf.d.ts.map +1 -0
- package/dist/{reward-hacking-E0d-WVcP.js → reward-hacking-ByuETaIb.js} +3 -3
- package/dist/{reward-hacking-E0d-WVcP.js.map → reward-hacking-ByuETaIb.js.map} +1 -1
- package/dist/{reward-hacking-RVdZ6Kkt.d.ts → reward-hacking-E52wq86n.d.ts} +5 -18
- package/dist/reward-hacking-E52wq86n.d.ts.map +1 -0
- package/dist/reward-nw2xZGZG.js.map +1 -1
- package/dist/rl.d.ts +117 -295
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +27 -747
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +5 -5
- package/dist/rollout/index.js +7 -8
- package/dist/{rollout-DZV1t2Wg.js → rollout-D6C50mfA.js} +88 -13
- package/dist/rollout-D6C50mfA.js.map +1 -0
- package/dist/{rubric-predictive-validity-DaFW70y9.js → rubric-predictive-validity-D3_oI72N.js} +3 -3
- package/dist/{rubric-predictive-validity-DaFW70y9.js.map → rubric-predictive-validity-D3_oI72N.js.map} +1 -1
- package/dist/{rubric-predictive-validity-C03EC7ZE.d.ts → rubric-predictive-validity-DiwT8PbL.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-C03EC7ZE.d.ts.map → rubric-predictive-validity-DiwT8PbL.d.ts.map} +1 -1
- package/dist/{run-record-C1E24G2A.d.ts → run-record-CaxbLq6Y.d.ts} +4 -10
- package/dist/run-record-CaxbLq6Y.d.ts.map +1 -0
- package/dist/{run-record-C5e7FjhJ.js → run-record-CysKLB93.js} +3 -3
- package/dist/run-record-CysKLB93.js.map +1 -0
- package/dist/{run-record-Boc5IUTp.js → run-record-DhEJgoPz.js} +4 -4
- package/dist/{run-record-Boc5IUTp.js.map → run-record-DhEJgoPz.js.map} +1 -1
- package/dist/sandbox-harness-BlSOu4LX.d.ts.map +1 -1
- package/dist/{schema-CSf6qWgZ.js → schema-Bt2vLFm3.js} +2 -14
- package/dist/schema-Bt2vLFm3.js.map +1 -0
- package/dist/schema-C-ziyJD7.d.ts.map +1 -1
- package/dist/{schema-2g7trUwH.d.ts → schema-D6EVKzTB.d.ts} +4 -5
- package/dist/schema-D6EVKzTB.d.ts.map +1 -0
- package/dist/{schema-BuiujZ-g.js → schema-DxcKTzbi.js} +2 -2
- package/dist/schema-DxcKTzbi.js.map +1 -0
- package/dist/search/index.d.ts +3 -31
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +4 -4
- package/dist/{search-kernel-DyNEa6IU.d.ts → search-kernel-DxqjBxA-.d.ts} +10 -27
- package/dist/search-kernel-DxqjBxA-.d.ts.map +1 -0
- package/dist/{search-ledger-CVUGLDZp.js → search-ledger-TUvB5gWH.js} +7 -7
- package/dist/{search-ledger-CVUGLDZp.js.map → search-ledger-TUvB5gWH.js.map} +1 -1
- package/dist/{search-ledger-file-DDQUgvCg.js → search-ledger-file-UKCO2r8a.js} +4 -4
- package/dist/search-ledger-file-UKCO2r8a.js.map +1 -0
- package/dist/{search-shipper-BOSD46qv.js → search-shipper-Cw2z3-td.js} +4 -4
- package/dist/search-shipper-Cw2z3-td.js.map +1 -0
- package/dist/{search-summary-BQCSWf1g.js → search-summary-DQIvJsSB.js} +5 -5
- package/dist/{search-summary-BQCSWf1g.js.map → search-summary-DQIvJsSB.js.map} +1 -1
- package/dist/{sequential-CzK5DarL.js → sequential-BVv1sjsw.js} +2 -32
- package/dist/{sequential-CzK5DarL.js.map → sequential-BVv1sjsw.js.map} +1 -1
- package/dist/{sequential-Bf_pbE50.js → sequential-CimQrbjv.js} +5 -5
- package/dist/sequential-CimQrbjv.js.map +1 -0
- package/dist/{sequential-BhsrMupG.d.ts → sequential-KwGspfeR.d.ts} +2 -9
- package/dist/{sequential-BhsrMupG.d.ts.map → sequential-KwGspfeR.d.ts.map} +1 -1
- package/dist/{sequential-eprocess-DM_qENCl.js → sequential-eprocess-DodI6RoF.js} +2 -2
- package/dist/{sequential-eprocess-DM_qENCl.js.map → sequential-eprocess-DodI6RoF.js.map} +1 -1
- package/dist/{server-e9oWO_bN.js → server-DoVbqqtJ.js} +101 -101
- package/dist/server-DoVbqqtJ.js.map +1 -0
- package/dist/{single-run-lock-CV9Eyd_q.js → single-run-lock-U58yf8N6.js} +2 -2
- package/dist/{single-run-lock-CV9Eyd_q.js.map → single-run-lock-U58yf8N6.js.map} +1 -1
- package/dist/{skillopt-optimization-method-BiwA8nfX.js → skillopt-optimization-method-kyL94-ri.js} +17 -95
- package/dist/skillopt-optimization-method-kyL94-ri.js.map +1 -0
- package/dist/{spans-BHAUXMGN.d.ts → spans-CVngGij3.d.ts} +2 -2
- package/dist/{spans-BHAUXMGN.d.ts.map → spans-CVngGij3.d.ts.map} +1 -1
- package/dist/{statistical-heldout-42NlCNDe.js → statistical-heldout-Bksv92Th.js} +3 -3
- package/dist/statistical-heldout-Bksv92Th.js.map +1 -0
- package/dist/{statistical-heldout-CYpGaoDH.d.ts → statistical-heldout-C9AbgREN.d.ts} +8 -67
- package/dist/statistical-heldout-C9AbgREN.d.ts.map +1 -0
- package/dist/{steps-Bg5-KVx1.d.ts → steps-DlepJPwD.d.ts} +2 -56
- package/dist/steps-DlepJPwD.d.ts.map +1 -0
- package/dist/{store-C4avFjIi.d.ts → store-B3nWRy3B.d.ts} +2 -2
- package/dist/{store-C4avFjIi.d.ts.map → store-B3nWRy3B.d.ts.map} +1 -1
- package/dist/{store-otlp-DJ9dtA5x.js → store-otlp-BteDAbHK.js} +3 -3
- package/dist/{store-otlp-DJ9dtA5x.js.map → store-otlp-BteDAbHK.js.map} +1 -1
- package/dist/{store-tool-spans-CIX5arAG.js → store-tool-spans-D5l_OfTJ.js} +8 -8
- package/dist/store-tool-spans-D5l_OfTJ.js.map +1 -0
- package/dist/{store-tool-spans-DdCSPa7C.d.ts → store-tool-spans-DZS0HWVf.d.ts} +9 -18
- package/dist/store-tool-spans-DZS0HWVf.d.ts.map +1 -0
- package/dist/storyboard/index.d.ts +4 -11
- package/dist/storyboard/index.d.ts.map +1 -1
- package/dist/storyboard/index.js +1 -16
- package/dist/storyboard/index.js.map +1 -1
- package/dist/{summary-report-V_JACR4Y.js → summary-report-BsXJoYX5.js} +88 -10
- package/dist/summary-report-BsXJoYX5.js.map +1 -0
- package/dist/{summary-report-bdFDXq0b.d.ts → summary-report-DM7tlml1.d.ts} +10 -19
- package/dist/summary-report-DM7tlml1.d.ts.map +1 -0
- package/dist/supervisor-run/index.d.ts +60 -28
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +4 -458
- package/dist/supervisor-run/index.js.map +1 -1
- package/dist/{systemone-BomhHr2c.d.ts → systemone-Bp_Ac0p1.d.ts} +5 -5
- package/dist/{systemone-BomhHr2c.d.ts.map → systemone-Bp_Ac0p1.d.ts.map} +1 -1
- package/dist/systemone-protocol.js +1 -1
- package/dist/{systemone-review-CUVcQJu6.d.ts → systemone-review-CwE6JGIp.d.ts} +2 -2
- package/dist/{systemone-review-CUVcQJu6.d.ts.map → systemone-review-CwE6JGIp.d.ts.map} +1 -1
- package/dist/{systemone-review-D7sXwsqq.js → systemone-review-DzdOJ8I6.js} +3 -3
- package/dist/{systemone-review-D7sXwsqq.js.map → systemone-review-DzdOJ8I6.js.map} +1 -1
- package/dist/systemone.d.ts +5 -5
- package/dist/systemone.js +5 -5
- package/dist/systemone.js.map +1 -1
- package/dist/{task-failure-attributes-hEmASjix.js → task-failure-attributes-BMsblaDh.js} +3 -3
- package/dist/task-failure-attributes-BMsblaDh.js.map +1 -0
- package/dist/{terminal-record-DZyQZ3pz.js → terminal-record-78g6E4vh.js} +5 -5
- package/dist/terminal-record-78g6E4vh.js.map +1 -0
- package/dist/{tool-groups-C3NEcdCM.d.ts → tool-groups-DyNz2JZ_.d.ts} +3 -3
- package/dist/tool-groups-DyNz2JZ_.d.ts.map +1 -0
- package/dist/{tool-waste-BKgvd-TP.d.ts → tool-waste-CkjzWmeY.d.ts} +25 -28
- package/dist/tool-waste-CkjzWmeY.d.ts.map +1 -0
- package/dist/{tool-waste-BlesqTqW.js → tool-waste-DLsjS_p-.js} +5 -5
- package/dist/{tool-waste-BlesqTqW.js.map → tool-waste-DLsjS_p-.js.map} +1 -1
- package/dist/{trace-questions-CM2CAocU.d.ts → trace-questions-xxwgsuMi.d.ts} +4 -9
- package/dist/{trace-questions-CM2CAocU.d.ts.map → trace-questions-xxwgsuMi.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +14 -211
- package/dist/trace-repair/index.d.ts.map +1 -1
- package/dist/trace-repair/index.js +865 -981
- package/dist/trace-repair/index.js.map +1 -1
- package/dist/traces.d.ts +18 -46
- package/dist/traces.d.ts.map +1 -1
- package/dist/traces.js +13 -13
- package/dist/traces.js.map +1 -1
- package/dist/trajectory-replay/index.d.ts +3 -117
- package/dist/trajectory-replay/index.d.ts.map +1 -1
- package/dist/trajectory-replay/index.js +98 -56
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/{tree-C1XYeXvy.js → tree-BGRglkKd.js} +13 -10
- package/dist/tree-BGRglkKd.js.map +1 -0
- package/dist/{types-B3jzCp0p.js → types-BXgASBCL.js} +2 -2
- package/dist/{types-B3jzCp0p.js.map → types-BXgASBCL.js.map} +1 -1
- package/dist/{types-C1tnkEgM.d.ts → types-CW8ewATZ.d.ts} +4 -113
- package/dist/types-CW8ewATZ.d.ts.map +1 -0
- package/dist/{types-BqkVmHfv.d.ts → types-CmXY0PQf.d.ts} +2 -4
- package/dist/types-CmXY0PQf.d.ts.map +1 -0
- package/dist/{types-C02qtnG8.d.ts → types-D-mgRzlh.d.ts} +7 -28
- package/dist/types-D-mgRzlh.d.ts.map +1 -0
- package/dist/{types-Cq8mSbq8.d.ts → types-D8GhJoHk.d.ts} +7 -9
- package/dist/{types-Cq8mSbq8.d.ts.map → types-D8GhJoHk.d.ts.map} +1 -1
- package/dist/{types-IXD2HJzu.js → types-DqFMNTgK.js} +2 -4
- package/dist/types-DqFMNTgK.js.map +1 -0
- package/dist/{types-Cbe2fWBa.d.ts → types-DtMbFw6U.d.ts} +3 -3
- package/dist/{types-Cbe2fWBa.d.ts.map → types-DtMbFw6U.d.ts.map} +1 -1
- package/dist/{verdict-Dl0tiT1X.js → verdict-BGQmxQ8A.js} +3 -3
- package/dist/verdict-BGQmxQ8A.js.map +1 -0
- package/dist/{verdict-E4eRNf7-.d.ts → verdict-C24NELtN.d.ts} +2 -15
- package/dist/{verdict-E4eRNf7-.d.ts.map → verdict-C24NELtN.d.ts.map} +1 -1
- package/dist/{verdict-cache-Bm8EKL2s.js → verdict-cache-CL_7tePD.js} +2 -2
- package/dist/verdict-cache-CL_7tePD.js.map +1 -0
- package/dist/wire/index.d.ts +31 -410
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +2 -2
- package/docs/changes/jev-evidence-review.md +1 -1
- package/docs/changes/jev-product-adoption.md +1 -1
- package/docs/changes/jev-recorded-evidence.md +1 -1
- package/docs/design/statistics-decisions.md +17 -17
- package/docs/design.md +1 -1
- package/docs/evaluation-integrity.md +1 -1
- package/docs/proofs/campaign-attempt-retention-20261001/README.md +2 -2
- package/docs/public-api.md +138 -529
- package/docs/rollout.md +1 -1
- package/docs/trace-repair-admission.md +1 -1
- package/docs/wire-protocol.md +1 -1
- package/package.json +1 -1
- package/dist/active-curriculum-B_Lc9kfO.js +0 -61
- package/dist/active-curriculum-B_Lc9kfO.js.map +0 -1
- package/dist/agent-profile-VFcQncbW.d.ts.map +0 -1
- package/dist/agent-profile-cell-BK8mlqlq.js.map +0 -1
- package/dist/agent-profile-cell-BNp-Js9F.d.ts.map +0 -1
- package/dist/agreement-irr-BEWLIF3_.js.map +0 -1
- package/dist/analyze-runs-C84irm4i.js.map +0 -1
- package/dist/baseline-Udi_PLuT.js +0 -259
- package/dist/baseline-Udi_PLuT.js.map +0 -1
- package/dist/benchmark-CXmVVHH2.js +0 -562
- package/dist/benchmark-CXmVVHH2.js.map +0 -1
- package/dist/benchmark-command-By0vh8q7.js.map +0 -1
- package/dist/campaign-BudZ70zo.js.map +0 -1
- package/dist/chat-json-call-puMArmtW.js.map +0 -1
- package/dist/claude-jsonl-dZir12m6.js +0 -86
- package/dist/claude-jsonl-dZir12m6.js.map +0 -1
- package/dist/client-BzL9niqi.d.ts.map +0 -1
- package/dist/cost-ledger-BP8V4kUQ.js.map +0 -1
- package/dist/counterfactual-CPaWN99-.d.ts +0 -60
- package/dist/counterfactual-CPaWN99-.d.ts.map +0 -1
- package/dist/counterfactual-Dn3veueY.js +0 -98
- package/dist/counterfactual-Dn3veueY.js.map +0 -1
- package/dist/default-registry-COhk9g36.js.map +0 -1
- package/dist/default-registry-DzHiGruW.d.ts.map +0 -1
- package/dist/define-agent-eval-WSck0CZJ.d.ts.map +0 -1
- package/dist/dspy-rlm-engine-LRCu61m5.js.map +0 -1
- package/dist/effect-sizes-BhzEpXMc.js +0 -82
- package/dist/effect-sizes-BhzEpXMc.js.map +0 -1
- package/dist/emitter-HcCmFQl_.d.ts.map +0 -1
- package/dist/engine-3A_4jOlI.d.ts.map +0 -1
- package/dist/equal-terms-BtdXayCJ.js.map +0 -1
- package/dist/evaluation-6Yoi74gM.d.ts.map +0 -1
- package/dist/exporters-X4xwla8A.js.map +0 -1
- package/dist/external-optimizer-process-BjMGUuds.js.map +0 -1
- package/dist/external-optimizer-subprocess-BqW0hHcI.js.map +0 -1
- package/dist/failure-cluster-CbgEDcFJ.d.ts.map +0 -1
- package/dist/feedback-trajectory-C4EG0nNH.d.ts.map +0 -1
- package/dist/hf-dataset-BR2yhuNn.js.map +0 -1
- package/dist/index-BFRO6chs.d.ts.map +0 -1
- package/dist/index-BO41eGj5.d.ts.map +0 -1
- package/dist/index-CyszSg4O.d.ts.map +0 -1
- package/dist/index-DHKEAv3s.d.ts.map +0 -1
- package/dist/index-DPcngtwt.d.ts.map +0 -1
- package/dist/integrity-dLiDe2kD.js.map +0 -1
- package/dist/journal-DfRz9kps.js.map +0 -1
- package/dist/judge-gate-CE7CQAgt.d.ts.map +0 -1
- package/dist/kind-factory-BobI5Jy3.js.map +0 -1
- package/dist/ledger-core-Gq7yp8lP.js.map +0 -1
- package/dist/llm-client-CyBAoYiX.js.map +0 -1
- package/dist/llm-judge-CG12SQJq.js.map +0 -1
- package/dist/matrix-DSrSxjjy.d.ts.map +0 -1
- package/dist/matrix-Dm0BQW7U.js.map +0 -1
- package/dist/mean-DHoMiudD.js.map +0 -1
- package/dist/normal-DsJZtrJc.js +0 -25
- package/dist/normal-DsJZtrJc.js.map +0 -1
- package/dist/paired-arms-CwMGJsrS.js.map +0 -1
- package/dist/paired-binary-CvpFHfKZ.js.map +0 -1
- package/dist/paired-promotion-decision-DPKz8ZnF.d.ts.map +0 -1
- package/dist/pareto-Cm6ndrWN.js.map +0 -1
- package/dist/prime-protocol-CHKgA3a6.js.map +0 -1
- package/dist/prime-protocol-HiB9HX7E.d.ts.map +0 -1
- package/dist/produced-state-BsDmnwxc.js.map +0 -1
- package/dist/proposal-findings-CY1xKn_a.js.map +0 -1
- package/dist/query-BUCZCK7F.js.map +0 -1
- package/dist/redact-mtCCcT8z.d.ts.map +0 -1
- package/dist/release-confidence-CpuP65S5.js.map +0 -1
- package/dist/report-command-SC9nqb4M.js.map +0 -1
- package/dist/reward-CpCmAM8L.d.ts.map +0 -1
- package/dist/reward-hacking-RVdZ6Kkt.d.ts.map +0 -1
- package/dist/rollout-DZV1t2Wg.js.map +0 -1
- package/dist/run-record-C1E24G2A.d.ts.map +0 -1
- package/dist/run-record-C5e7FjhJ.js.map +0 -1
- package/dist/schema-2g7trUwH.d.ts.map +0 -1
- package/dist/schema-BuiujZ-g.js.map +0 -1
- package/dist/schema-CSf6qWgZ.js.map +0 -1
- package/dist/search-kernel-DyNEa6IU.d.ts.map +0 -1
- package/dist/search-ledger-file-DDQUgvCg.js.map +0 -1
- package/dist/search-shipper-BOSD46qv.js.map +0 -1
- package/dist/semantic-concept-judge-BQF8te0T.js.map +0 -1
- package/dist/sequential-Bf_pbE50.js.map +0 -1
- package/dist/server-e9oWO_bN.js.map +0 -1
- package/dist/skillopt-optimization-method-BiwA8nfX.js.map +0 -1
- package/dist/statistical-heldout-42NlCNDe.js.map +0 -1
- package/dist/statistical-heldout-CYpGaoDH.d.ts.map +0 -1
- package/dist/steps-Bg5-KVx1.d.ts.map +0 -1
- package/dist/store-tool-spans-CIX5arAG.js.map +0 -1
- package/dist/store-tool-spans-DdCSPa7C.d.ts.map +0 -1
- package/dist/student-t-DVPW7CdL.js +0 -39
- package/dist/student-t-DVPW7CdL.js.map +0 -1
- package/dist/summary-report-V_JACR4Y.js.map +0 -1
- package/dist/summary-report-bdFDXq0b.d.ts.map +0 -1
- package/dist/task-failure-attributes-hEmASjix.js.map +0 -1
- package/dist/terminal-record-DZyQZ3pz.js.map +0 -1
- package/dist/tool-groups-C3NEcdCM.d.ts.map +0 -1
- package/dist/tool-waste-BKgvd-TP.d.ts.map +0 -1
- package/dist/trajectory-Y1fmdlw7.d.ts +0 -24
- package/dist/trajectory-Y1fmdlw7.d.ts.map +0 -1
- package/dist/tree-C1XYeXvy.js.map +0 -1
- package/dist/types-BqkVmHfv.d.ts.map +0 -1
- package/dist/types-C02qtnG8.d.ts.map +0 -1
- package/dist/types-C1tnkEgM.d.ts.map +0 -1
- package/dist/types-IXD2HJzu.js.map +0 -1
- package/dist/usage-receipt-Cx3xNeyB.js +0 -76
- package/dist/usage-receipt-Cx3xNeyB.js.map +0 -1
- package/dist/verdict-Dl0tiT1X.js.map +0 -1
- package/dist/verdict-cache-Bm8EKL2s.js.map +0 -1
- package/docs/design/self-improvement-evidence-audit.md +0 -263
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { o as summarizeNumberSeries } from "./descriptive-DboxPZrG.js";
|
|
1
|
+
import { a as hashCanonical } from "./canonical-Dq2hOQ8L.js";
|
|
2
|
+
import { o as summarizeNumberSeries } from "./descriptive-CVNy48rR.js";
|
|
4
3
|
import { t as roundDecimal } from "./round-decimal-COrKglMh.js";
|
|
5
|
-
import { a as nonEmptyString, c as parseSupervisorTree, d as NO_SOURCE_LIMITS, g as unavailable, h as showMeasured, i as asRecord, l as recordOrNull, m as isUnavailable, o as
|
|
6
|
-
import { join
|
|
7
|
-
import {
|
|
4
|
+
import { a as nonEmptyString, c as parseSupervisorTree, d as NO_SOURCE_LIMITS, g as unavailable, h as showMeasured, i as asRecord, l as recordOrNull, m as isUnavailable, o as parseJsonRecord, p as SUPERVISOR_RUN_SCHEMA, r as readTerminalRecord, s as parseJsonl, u as workerSourceKey } from "./terminal-record-78g6E4vh.js";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { readFile, readdir, stat } from "node:fs/promises";
|
|
8
7
|
//#region src/supervisor-run/patch-stats.ts
|
|
9
8
|
/** Unified-diff stats. Counts `+++ b/<path>` targets, body +/- lines, and test-file touches. */
|
|
10
9
|
function parsePatch(text) {
|
|
@@ -60,12 +59,12 @@ function analyzeSupervisorRunSources(src, now = Date.now) {
|
|
|
60
59
|
const haveJournal = src.journal !== null;
|
|
61
60
|
const tree = parseSupervisorTree(src);
|
|
62
61
|
const state = tree.state;
|
|
63
|
-
const result =
|
|
64
|
-
const judge =
|
|
62
|
+
const result = parseJsonRecord(src.result);
|
|
63
|
+
const judge = parseJsonRecord(src.judge);
|
|
65
64
|
const terminal = readTerminalRecord({
|
|
66
65
|
state,
|
|
67
66
|
result,
|
|
68
|
-
failure: src.failure === void 0 ? void 0 :
|
|
67
|
+
failure: src.failure === void 0 ? void 0 : parseJsonRecord(src.failure)
|
|
69
68
|
});
|
|
70
69
|
const { rootId, workerSpawns, workerCloses, startedAt, completedAt } = tree;
|
|
71
70
|
const rootSpawn = rootId === null ? null : tree.spawns.find((spawn) => spawn.id === rootId) ?? null;
|
|
@@ -482,212 +481,6 @@ function pickString(rec, key) {
|
|
|
482
481
|
return typeof v === "string" ? v : null;
|
|
483
482
|
}
|
|
484
483
|
//#endregion
|
|
485
|
-
//#region src/supervisor-run/render.ts
|
|
486
|
-
/**
|
|
487
|
-
* Human-readable renderings of a supervisor-run report. Zero and unavailable
|
|
488
|
-
* render differently on purpose (`0` vs `unavailable — <reason>`), because the
|
|
489
|
-
* two have driven opposite conclusions about the same architecture.
|
|
490
|
-
*/
|
|
491
|
-
/**
|
|
492
|
-
* The block appended to a run log after every run — the answers an operator asks
|
|
493
|
-
* for, in the log tail, with no extra command.
|
|
494
|
-
*/
|
|
495
|
-
function renderSupervisorRunHeadline(r) {
|
|
496
|
-
const o = r.orchestration;
|
|
497
|
-
const steerNote = isUnavailable(o.steers) ? `unavailable — ${o.steers.unavailable}` : o.steers === 0 ? "0 (spawn→wait→respawn only; no mid-task steering)" : `${o.steers} queued / ${showMeasured(o.steersDelivered)} delivered`;
|
|
498
|
-
return [
|
|
499
|
-
`RUN-REPORT ${r.instanceId ?? "?"} [${r.arm ?? "?"}]`,
|
|
500
|
-
` status=${showMeasured(r.outcome.supStatus)} source=${showMeasured(r.outcome.supStatusSource)} reason=${showMeasured(r.outcome.supReason)} failure=${fmtFailure(r.outcome.failure)}`,
|
|
501
|
-
` steers=${steerNote}`,
|
|
502
|
-
` waves=${showMeasured(o.waves)} sizes=${isUnavailable(o.waveSizes) ? `unavailable — ${o.waveSizes.unavailable}` : `[${o.waveSizes.join(",")}]`} workers=${showMeasured(o.workersSpawned)} settled=${showMeasured(o.workersSettled)} cancelled=${showMeasured(o.workersCancelled)}`,
|
|
503
|
-
` concurrency max=${showMeasured(o.maxConcurrency)} utilization=${showMeasured(o.workerUtilization)} idle=${fmtMs(o.idleMs)} (${showMeasured(o.idlePct)}%) wall=${fmtMs(o.supervisorWallMs)}${o.supervisorWallSource === "journal-span" ? " (journal-span lower bound)" : ""}`,
|
|
504
|
-
` respawns=${showMeasured(o.respawns)} evidence→respawn=${showMeasured(r.decision.observeThenRespawn)} blind-respawn=${showMeasured(r.decision.respawnWithoutEvidence)} depth=${showMeasured(o.delegationDepth)}`,
|
|
505
|
-
` accepted=${showMeasured(r.decision.accepted)} rejected=${showMeasured(r.decision.rejected)} empty-pass=${showMeasured(r.decision.emptyPass)}`,
|
|
506
|
-
` brain=$${showMeasured(r.economics.brain.usd)} total=$${showMeasured(r.economics.totalUsd)} judge.resolved=${showMeasured(r.outcome.judgeResolved)} score=${showMeasured(r.outcome.judgeScore)} verify=${showMeasured(r.outcome.verifyPass)}`,
|
|
507
|
-
r.gaps.length > 0 ? ` gaps(${r.gaps.length}): ${r.gaps.join("; ")}` : " gaps: none"
|
|
508
|
-
].join("\n");
|
|
509
|
-
}
|
|
510
|
-
/**
|
|
511
|
-
* The recorded error on one line; `none recorded` and `unavailable` stay
|
|
512
|
-
* distinct, and a throw the run outlived is labeled so it is not read as the
|
|
513
|
-
* outcome of the settled result beside it.
|
|
514
|
-
*/
|
|
515
|
-
function fmtFailure(v) {
|
|
516
|
-
if (isUnavailable(v)) return `unavailable — ${v.unavailable}`;
|
|
517
|
-
if (v === null) return "none recorded";
|
|
518
|
-
const name = v.name ?? "unavailable — record has no error.name";
|
|
519
|
-
const message = v.message ?? "unavailable — record has no error.message";
|
|
520
|
-
const attempt = v.earlierAttempt ? ", earlier attempt" : "";
|
|
521
|
-
return `${name}: ${message} [${v.source}${v.at === null ? "" : ` at ${v.at}`}${attempt}]`;
|
|
522
|
-
}
|
|
523
|
-
function resourceRows(records) {
|
|
524
|
-
if (isUnavailable(records)) return [`unavailable — ${records.unavailable}`, ""];
|
|
525
|
-
const out = [
|
|
526
|
-
"Receipts are source records, not additive totals.",
|
|
527
|
-
"A false completeness flag means the amount is a recorded subtotal, not complete usage.",
|
|
528
|
-
"",
|
|
529
|
-
"| Node | Source | Resource | Unit | Amount | Known |",
|
|
530
|
-
"|---|---|---|---|---:|---|"
|
|
531
|
-
];
|
|
532
|
-
const cell = (value) => value.replace(/\|/g, "\\|").replace(/\r?\n/g, " ");
|
|
533
|
-
for (const record of records) {
|
|
534
|
-
const prefix = `| ${cell(record.nodeId ?? "unavailable")} | ${cell(record.source)} |`;
|
|
535
|
-
if (isUnavailable(record.resources)) out.push(`${prefix} ${cell(showMeasured(record.resources))} | — | — | — |`);
|
|
536
|
-
else if (record.resources.length === 0) out.push(`${prefix} recorded empty map | — | — | — |`);
|
|
537
|
-
else for (const receipt of record.resources) out.push(`${prefix} ${cell(showMeasured(receipt.name))} | ${cell(showMeasured(receipt.unit))} | ${cell(showMeasured(receipt.amount))} | ${cell(showMeasured(receipt.known))} |`);
|
|
538
|
-
}
|
|
539
|
-
if (!records.length) out.push("| — | — | no spend records | — | — | — |");
|
|
540
|
-
out.push("");
|
|
541
|
-
return out;
|
|
542
|
-
}
|
|
543
|
-
function fmtMs(v) {
|
|
544
|
-
if (isUnavailable(v)) return `unavailable — ${v.unavailable}`;
|
|
545
|
-
if (v < 1e3) return `${v}ms`;
|
|
546
|
-
const s = v / 1e3;
|
|
547
|
-
if (s < 120) return `${roundDecimal(s, 1)}s`;
|
|
548
|
-
return `${roundDecimal(s / 60, 1)}min`;
|
|
549
|
-
}
|
|
550
|
-
function renderSupervisorRunMarkdown(r) {
|
|
551
|
-
const o = r.orchestration;
|
|
552
|
-
const d = r.decision;
|
|
553
|
-
const e = r.economics;
|
|
554
|
-
const out = [];
|
|
555
|
-
out.push(`# Run report — ${r.instanceId ?? "unknown instance"} [${r.arm ?? "unknown arm"}]`);
|
|
556
|
-
out.push("");
|
|
557
|
-
out.push("```");
|
|
558
|
-
out.push(renderSupervisorRunHeadline(r));
|
|
559
|
-
out.push("```");
|
|
560
|
-
out.push("");
|
|
561
|
-
out.push(`- Run: \`${r.runRef}\``);
|
|
562
|
-
out.push(`- Supervisor: \`${showMeasured(r.supervisorId)}\``);
|
|
563
|
-
out.push(`- Supervisor profile: \`${showMeasured(r.supervisorProfileDigest)}\``);
|
|
564
|
-
out.push(`- Generated: ${r.generatedAt}`);
|
|
565
|
-
out.push("");
|
|
566
|
-
out.push("## Orchestration");
|
|
567
|
-
out.push("");
|
|
568
|
-
out.push("| Metric | Value |");
|
|
569
|
-
out.push("|---|---|");
|
|
570
|
-
out.push(`| Workers spawned | ${showMeasured(o.workersSpawned)} |`);
|
|
571
|
-
out.push(`| Workers settled | ${showMeasured(o.workersSettled)} |`);
|
|
572
|
-
out.push(`| Workers cancelled | ${showMeasured(o.workersCancelled)} |`);
|
|
573
|
-
out.push(`| **Steers (mid-task messages to live workers)** | **${showMeasured(o.steers)}** |`);
|
|
574
|
-
out.push(`| Steers delivered | ${showMeasured(o.steersDelivered)} |`);
|
|
575
|
-
out.push(`| Outer-driver \`supervisor_steer\` calls | ${showMeasured(o.driverSteerCalls)} |`);
|
|
576
|
-
out.push(`| Spawn waves | ${showMeasured(o.waves)} |`);
|
|
577
|
-
out.push(`| Wave sizes | ${isUnavailable(o.waveSizes) ? showMeasured(o.waveSizes) : `[${o.waveSizes.join(", ")}]`} |`);
|
|
578
|
-
out.push(`| Max concurrency | ${showMeasured(o.maxConcurrency)} |`);
|
|
579
|
-
out.push(`| Respawns (after same parent's first settle) | ${showMeasured(o.respawns)} |`);
|
|
580
|
-
out.push(`| Repeated labels | ${isUnavailable(o.repeatedLabels) ? showMeasured(o.repeatedLabels) : o.repeatedLabels.length === 0 ? "none" : o.repeatedLabels.join(", ")} |`);
|
|
581
|
-
out.push(`| Delegation depth | ${showMeasured(o.delegationDepth)} |`);
|
|
582
|
-
out.push(`| Time to first spawn | ${fmtMs(o.timeToFirstSpawnMs)} |`);
|
|
583
|
-
out.push(`| Supervisor wall | ${fmtMs(o.supervisorWallMs)}${isUnavailable(o.supervisorWallSource) ? "" : ` (source: ${o.supervisorWallSource}${o.supervisorWallSource === "journal-span" ? ", lower bound" : ""})`} |`);
|
|
584
|
-
out.push(`| Idle (zero live workers) | ${fmtMs(o.idleMs)} (${showMeasured(o.idlePct)}%) |`);
|
|
585
|
-
out.push(`| Worker utilization (Σ worker wall ÷ supervisor wall) | ${showMeasured(o.workerUtilization)} |`);
|
|
586
|
-
out.push("");
|
|
587
|
-
if (!isUnavailable(o.steersByWorker) && o.steersByWorker.length > 0) {
|
|
588
|
-
out.push("### Steers per worker");
|
|
589
|
-
out.push("");
|
|
590
|
-
out.push("| Worker id | Label | Queued | Delivered |");
|
|
591
|
-
out.push("|---|---|---:|---:|");
|
|
592
|
-
for (const s of o.steersByWorker) out.push(`| ${s.workerId === null ? "unavailable — worker id absent; label join used" : `\`${s.workerId}\``} | \`${s.worker}\` | ${s.queued} | ${s.delivered} |`);
|
|
593
|
-
out.push("");
|
|
594
|
-
} else if (isUnavailable(o.steersByWorker)) out.push(`### Steers per worker\n\nunavailable — ${o.steersByWorker.unavailable}\n`);
|
|
595
|
-
out.push("## Decision quality");
|
|
596
|
-
out.push("");
|
|
597
|
-
out.push("| Metric | Value |");
|
|
598
|
-
out.push("|---|---|");
|
|
599
|
-
out.push(`| Settled by status | ${fmtCounts(d.settledByStatus)} |`);
|
|
600
|
-
out.push(`| Settled verdicts | ${fmtCounts(d.settledVerdicts)} |`);
|
|
601
|
-
out.push(`| Accepted (verify green + patch bytes) | ${showMeasured(d.accepted)} |`);
|
|
602
|
-
out.push(`| Rejected (verify red) | ${showMeasured(d.rejected)} |`);
|
|
603
|
-
out.push(`| Empty pass (green, no patch) | ${showMeasured(d.emptyPass)} |`);
|
|
604
|
-
out.push(`| Evidence → respawn sequences | ${showMeasured(d.observeThenRespawn)} |`);
|
|
605
|
-
out.push(`| Respawn with no same-parent settled evidence in front | ${showMeasured(d.respawnWithoutEvidence)} |`);
|
|
606
|
-
out.push(`| Review actions (steers + worker questions) | ${showMeasured(d.reviewActions)} |`);
|
|
607
|
-
out.push(`| Worker evidence returned | ${isUnavailable(d.workerEvidenceBytes) ? showMeasured(d.workerEvidenceBytes) : `${d.workerEvidenceBytes} bytes`} |`);
|
|
608
|
-
out.push("");
|
|
609
|
-
out.push("## Economics");
|
|
610
|
-
out.push("");
|
|
611
|
-
out.push("| Role | Tokens in | Tokens out | Cache read | Cache write | USD | Source |");
|
|
612
|
-
out.push("|---|---:|---:|---:|---:|---:|---|");
|
|
613
|
-
out.push(`| brain | ${showMeasured(e.brain.tokensIn)} | ${showMeasured(e.brain.tokensOut)} | ${showMeasured(e.brain.cacheRead)} | ${showMeasured(e.brain.cacheWrite)} | ${showMeasured(e.brain.usd)} | ${e.brain.source} |`);
|
|
614
|
-
out.push(`| workers | ${showMeasured(e.workers.tokensIn)} | ${showMeasured(e.workers.tokensOut)} | ${showMeasured(e.workers.cacheRead)} | ${showMeasured(e.workers.cacheWrite)} | ${showMeasured(e.workers.usd)} | ${e.workers.source} |`);
|
|
615
|
-
out.push("");
|
|
616
|
-
if (!isUnavailable(e.brainTruncations) && e.brainTruncations > 0) out.push(`- **BRAIN OUTPUT TRUNCATED: ${e.brainTruncations} completion(s) hit \`finish_reason: "length"\`** — the supervisor acted on a half-written plan. Its output ceiling is too low; see \`brain.jsonl\` for the per-call \`req_max_tokens\`.`);
|
|
617
|
-
else out.push(`- Brain completions truncated (finish_reason=length): ${showMeasured(e.brainTruncations)}`);
|
|
618
|
-
out.push(`- Total USD: ${showMeasured(e.totalUsd)} (source: ${e.totalUsdSource})`);
|
|
619
|
-
out.push(`- Spend measured two ways: journal-derived $${showMeasured(e.spend.journalDerived.usd)} over ${e.spend.journalDerived.records} journal record(s) (execution accounting) · close-record $${showMeasured(e.spend.closeRecord.usd)} over ${e.spend.closeRecord.records} close record(s) (billing-shaped). Divergence is a signal, not an error.`);
|
|
620
|
-
out.push(`- Cost per accepted patch: ${showMeasured(e.costPerAcceptedPatchUsd)}`);
|
|
621
|
-
if (isUnavailable(e.workerWallMsDistribution)) out.push(`- Worker wall distribution: unavailable — ${e.workerWallMsDistribution.unavailable}`);
|
|
622
|
-
else {
|
|
623
|
-
const w = e.workerWallMsDistribution;
|
|
624
|
-
out.push(`- Worker wall (n=${w.n}): min ${fmtMs(w.min)} / p50 ${fmtMs(w.p50)} / p90 ${fmtMs(w.p90)} / max ${fmtMs(w.max)} / Σ ${fmtMs(w.sum)}`);
|
|
625
|
-
}
|
|
626
|
-
out.push("");
|
|
627
|
-
if (!isUnavailable(e.perWorker) && e.perWorker.length > 0) {
|
|
628
|
-
out.push("| Worker id | Label | Role | Runtime | Profile digest | Status | Failure | Infra | Wall | Tokens in | Tokens out | Patch bytes | Verify passed | Score |");
|
|
629
|
-
out.push("|---|---|---|---|---|---|---|---|---:|---:|---:|---:|---|---:|");
|
|
630
|
-
for (const w of e.perWorker) out.push(`| ${w.workerId === null ? "unavailable — worker id absent; label join used" : `\`${w.workerId}\``} | \`${w.worker}\` | ${w.role ?? "unavailable — source recorded no role"} | ${w.runtime ?? "unavailable — source recorded no runtime"} | ${w.profileDigest === null ? "unavailable — source recorded no profile digest" : `\`${w.profileDigest}\``} | ${w.status ?? "unavailable — no terminal event"} | ${w.failure ?? "none recorded"} | ${w.infra ?? "unavailable"} | ${w.wallMs === null ? "unavailable — no spawn/finish pair" : fmtMs(w.wallMs)} | ${w.tokensIn ?? "unavailable — store does not attribute tokens per worker"} | ${w.tokensOut ?? "unavailable — store does not attribute tokens per worker"} | ${w.patchBytes ?? "unavailable — no worker patch file"} | ${w.passed === null ? "unavailable — no verdict" : String(w.passed)} | ${w.score ?? "unavailable — no numeric score"} |`);
|
|
631
|
-
out.push("");
|
|
632
|
-
}
|
|
633
|
-
if (e.resourceRecords !== void 0) out.push("## Named resource receipts", "", ...resourceRows(e.resourceRecords));
|
|
634
|
-
out.push("## Outcome");
|
|
635
|
-
out.push("");
|
|
636
|
-
out.push("| Metric | Value |");
|
|
637
|
-
out.push("|---|---|");
|
|
638
|
-
out.push(`| Supervisor status | ${showMeasured(r.outcome.supStatus)} |`);
|
|
639
|
-
out.push(`| Status source | ${showMeasured(r.outcome.supStatusSource)} |`);
|
|
640
|
-
out.push(`| Terminal reason | ${showMeasured(r.outcome.supReason)} |`);
|
|
641
|
-
out.push(`| Failure | ${fmtFailure(r.outcome.failure)} |`);
|
|
642
|
-
out.push(`| Supervisor verdict | ${showMeasured(r.outcome.supVerdict)} |`);
|
|
643
|
-
out.push(`| Delivered | ${showMeasured(r.outcome.delivered)} |`);
|
|
644
|
-
out.push(`| Judge resolved | ${showMeasured(r.outcome.judgeResolved)} |`);
|
|
645
|
-
out.push(`| Judge score | ${showMeasured(r.outcome.judgeScore)} |`);
|
|
646
|
-
out.push(`| Judge passed / total | ${showMeasured(r.outcome.judgePassed)} / ${showMeasured(r.outcome.judgeTotal)} |`);
|
|
647
|
-
out.push(`| Judge source | ${r.outcome.judgeSource ?? "unavailable — no judge.json and no ledger row"} |`);
|
|
648
|
-
out.push(`| Verify gate | pass=${showMeasured(r.outcome.verifyPass)} rc=${showMeasured(r.outcome.verifyRc)} |`);
|
|
649
|
-
if (isUnavailable(r.outcome.patch)) out.push(`| Patch | unavailable — ${r.outcome.patch.unavailable} |`);
|
|
650
|
-
else {
|
|
651
|
-
const p = r.outcome.patch;
|
|
652
|
-
out.push(`| Patch | ${p.files} file(s), +${p.linesAdded}/-${p.linesRemoved}, test files touched: ${p.testFilesTouched.length === 0 ? "none" : p.testFilesTouched.join(", ")} |`);
|
|
653
|
-
}
|
|
654
|
-
out.push("");
|
|
655
|
-
out.push("## Gaps");
|
|
656
|
-
out.push("");
|
|
657
|
-
if (r.gaps.length === 0) out.push("None — every metric above is backed by a present artifact.");
|
|
658
|
-
else for (const g of r.gaps) out.push(`- ${g}`);
|
|
659
|
-
out.push("");
|
|
660
|
-
out.push(`> Harness-session view of the same run (model calls, stuck loops, tool errors): \`${r.traceCommand}\``);
|
|
661
|
-
out.push("");
|
|
662
|
-
return out.join("\n");
|
|
663
|
-
}
|
|
664
|
-
function fmtCounts(v) {
|
|
665
|
-
if (isUnavailable(v)) return showMeasured(v);
|
|
666
|
-
const entries = Object.entries(v);
|
|
667
|
-
return entries.length === 0 ? "none" : entries.map(([k, n]) => `${k}=${n}`).join(", ");
|
|
668
|
-
}
|
|
669
|
-
function renderSupervisorRollupMarkdown(rollup, title = "Round rollup") {
|
|
670
|
-
const out = [];
|
|
671
|
-
out.push(`# ${title}`);
|
|
672
|
-
out.push("");
|
|
673
|
-
out.push(`- Cells: ${rollup.cells}`);
|
|
674
|
-
out.push(`- **Steers across all cells: ${showMeasured(rollup.steersTotal)}** (cells with ≥1 steer: ${showMeasured(rollup.cellsWithSteers)}; cells where the steer count is unavailable: ${rollup.cellsWithUnavailableSteers})`);
|
|
675
|
-
out.push(`- Waves per cell (mean): ${showMeasured(rollup.wavesMean)}`);
|
|
676
|
-
out.push(`- Max concurrency observed: ${showMeasured(rollup.maxConcurrencyMax)}`);
|
|
677
|
-
out.push(`- Worker utilization (mean): ${showMeasured(rollup.utilizationMean)}`);
|
|
678
|
-
out.push(`- Idle share (mean): ${showMeasured(rollup.idlePctMean)}%`);
|
|
679
|
-
out.push(`- Workers spawned: ${showMeasured(rollup.workersSpawnedTotal)} · accepted: ${showMeasured(rollup.acceptedTotal)}`);
|
|
680
|
-
out.push(`- Spend: $${showMeasured(rollup.usdTotal)} · judged resolved: ${showMeasured(rollup.resolvedCount)}/${rollup.cells}`);
|
|
681
|
-
out.push(`- Spend measured two ways: journal-derived $${showMeasured(rollup.spendUsd.journalDerived.value)} over ${rollup.spendUsd.journalDerived.runs}/${rollup.cells} runs (execution accounting) · close-record $${showMeasured(rollup.spendUsd.closeRecord.value)} over ${rollup.spendUsd.closeRecord.runs}/${rollup.cells} runs (billing-shaped)`);
|
|
682
|
-
out.push("");
|
|
683
|
-
out.push("| Instance | Arm | Steers | Waves | Utilization | Idle % | Resolved | USD |");
|
|
684
|
-
out.push("|---|---|---:|---:|---:|---:|---|---:|");
|
|
685
|
-
for (const c of rollup.perCell) out.push(`| ${c.instanceId ?? "?"} | ${c.arm ?? "?"} | ${showMeasured(c.steers)} | ${showMeasured(c.waves)} | ${showMeasured(c.utilization)} | ${showMeasured(c.idlePct)} | ${showMeasured(c.resolved)} | ${showMeasured(c.usd)} |`);
|
|
686
|
-
out.push("");
|
|
687
|
-
for (const cell of rollup.perCell) if (cell.resourceRecords !== void 0) out.push(`## Resource receipts — ${cell.instanceId ?? "?"} [${cell.arm ?? "?"}]`, "", ...resourceRows(cell.resourceRecords));
|
|
688
|
-
return out.join("\n");
|
|
689
|
-
}
|
|
690
|
-
//#endregion
|
|
691
484
|
//#region src/supervisor-run/coordination-reader.ts
|
|
692
485
|
/**
|
|
693
486
|
* Optional Runtime run-dir files, read as bytes.
|
|
@@ -1368,13 +1161,6 @@ async function readRuntimeSupervisorRun(runDir, opts = {}) {
|
|
|
1368
1161
|
traceCommand: nativeTraceSummary(workers, transcripts.get(normalized.root))
|
|
1369
1162
|
};
|
|
1370
1163
|
}
|
|
1371
|
-
/** The agent-runtime file-backed layout as a `SupervisorRunReader`. */
|
|
1372
|
-
function runtimeSupervisorRunReader(runDir, opts = {}) {
|
|
1373
|
-
return {
|
|
1374
|
-
runRef: runDir,
|
|
1375
|
-
read: () => readRuntimeSupervisorRun(runDir, opts)
|
|
1376
|
-
};
|
|
1377
|
-
}
|
|
1378
1164
|
/**
|
|
1379
1165
|
* True when a directory holds any file only Runtime's durable layer writes:
|
|
1380
1166
|
* the spawn journal, the observer journal, or the failure record. A run that
|
|
@@ -1413,56 +1199,6 @@ function isReader(input) {
|
|
|
1413
1199
|
return typeof input.read === "function";
|
|
1414
1200
|
}
|
|
1415
1201
|
/**
|
|
1416
|
-
* Read a completed run, write `run-report.json` + `run-report.md` beside its
|
|
1417
|
-
* artifacts, and append the headline block to the run log. Never throws on a
|
|
1418
|
-
* missing artifact — a run that produced nothing still yields a report whose
|
|
1419
|
-
* every metric says why.
|
|
1420
|
-
*/
|
|
1421
|
-
async function writeSupervisorRunReport(runDir, opts = {}) {
|
|
1422
|
-
const report = analyzeSupervisorRunSources(await readRuntimeSupervisorRun(runDir));
|
|
1423
|
-
const md = renderSupervisorRunMarkdown(report);
|
|
1424
|
-
const dest = opts.reportDir ?? runDir;
|
|
1425
|
-
const stem = opts.reportDir === void 0 ? "run-report" : supervisorReportStem(runDir);
|
|
1426
|
-
if (opts.reportDir !== void 0) await mkdir(opts.reportDir, { recursive: true }).catch(() => {});
|
|
1427
|
-
await writeFile(join(dest, `${stem}.json`), JSON.stringify(report, null, 1)).catch(() => {});
|
|
1428
|
-
await writeFile(join(dest, `${stem}.md`), md).catch(() => {});
|
|
1429
|
-
const headline = renderSupervisorRunHeadline(report);
|
|
1430
|
-
if (opts.appendHeadlineTo !== void 0) await appendFile(opts.appendHeadlineTo, `${headline}\n`).catch(() => {});
|
|
1431
|
-
if (opts.echo !== false) console.log(headline);
|
|
1432
|
-
return report;
|
|
1433
|
-
}
|
|
1434
|
-
/**
|
|
1435
|
-
* File stem for out-of-tree reports. Built from the run path's identifying
|
|
1436
|
-
* segments — candidate tag (the segment under `arm-runs/`), rep, instance, arm
|
|
1437
|
-
* — so two runs of the same instance from different candidates/reps never
|
|
1438
|
-
* overwrite each other.
|
|
1439
|
-
*/
|
|
1440
|
-
function supervisorReportStem(runDir) {
|
|
1441
|
-
const parts = runDir.split("/").filter(Boolean);
|
|
1442
|
-
const arm = parts[parts.length - 1] ?? "cell";
|
|
1443
|
-
const iid = parts[parts.length - 2] ?? "instance";
|
|
1444
|
-
const rep = parts.find((p) => /^rep-\d+$/.test(p));
|
|
1445
|
-
const armRunsIdx = parts.indexOf("arm-runs");
|
|
1446
|
-
return [
|
|
1447
|
-
armRunsIdx >= 0 ? parts[armRunsIdx + 1] : void 0,
|
|
1448
|
-
rep,
|
|
1449
|
-
iid,
|
|
1450
|
-
arm
|
|
1451
|
-
].filter((s) => s !== void 0 && s !== "runs").join(".").replace(/[^A-Za-z0-9._-]/g, "_");
|
|
1452
|
-
}
|
|
1453
|
-
/**
|
|
1454
|
-
* Best-effort wrapper for a hot path: a reporting failure must never kill a run
|
|
1455
|
-
* that already produced real work. Returns null and logs the reason instead.
|
|
1456
|
-
*/
|
|
1457
|
-
async function writeSupervisorRunReportSafe(runDir, opts = {}) {
|
|
1458
|
-
try {
|
|
1459
|
-
return await writeSupervisorRunReport(runDir, opts);
|
|
1460
|
-
} catch (err) {
|
|
1461
|
-
console.log(`RUN-REPORT failed for ${runDir}: ${err instanceof Error ? err.message : String(err)}`);
|
|
1462
|
-
return null;
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
/**
|
|
1466
1202
|
* Every Runtime supervisor run below `root`.
|
|
1467
1203
|
*
|
|
1468
1204
|
* When `root` itself is one run, return no children so callers can distinguish
|
|
@@ -1489,106 +1225,212 @@ async function findSupervisorRunDirs(root) {
|
|
|
1489
1225
|
return found.sort();
|
|
1490
1226
|
}
|
|
1491
1227
|
//#endregion
|
|
1492
|
-
//#region src/supervisor-run/
|
|
1228
|
+
//#region src/supervisor-run/render.ts
|
|
1493
1229
|
/**
|
|
1494
|
-
*
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
* same path and the status comes from the record `terminal-record.ts` names.
|
|
1498
|
-
*
|
|
1499
|
-
* Exit codes follow the other self-parsing subcommands: 2 for a usage error,
|
|
1500
|
-
* 1 when the directory cannot be read (missing, not a directory, or a corrupt
|
|
1501
|
-
* journal or terminal record), 0 after the report was written to stdout.
|
|
1230
|
+
* Human-readable renderings of a supervisor-run report. Zero and unavailable
|
|
1231
|
+
* render differently on purpose (`0` vs `unavailable — <reason>`), because the
|
|
1232
|
+
* two have driven opposite conclusions about the same architecture.
|
|
1502
1233
|
*/
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
const
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
let runDir = null;
|
|
1522
|
-
let format = "headline";
|
|
1523
|
-
for (let i = 0; i < argv.length; i++) {
|
|
1524
|
-
const arg = argv[i];
|
|
1525
|
-
if (arg === "--format") {
|
|
1526
|
-
const raw = argv[++i];
|
|
1527
|
-
if (raw === void 0 || !isFormat(raw)) throw new Error(`--format expects one of ${FORMATS.join("|")}, got ${JSON.stringify(raw ?? "")}`);
|
|
1528
|
-
format = raw;
|
|
1529
|
-
} else if (arg.startsWith("--format=")) {
|
|
1530
|
-
const raw = arg.slice(9);
|
|
1531
|
-
if (!isFormat(raw)) throw new Error(`--format expects one of ${FORMATS.join("|")}, got ${JSON.stringify(raw)}`);
|
|
1532
|
-
format = raw;
|
|
1533
|
-
} else if (arg.startsWith("--")) throw new Error(`unknown flag "${arg}"`);
|
|
1534
|
-
else if (runDir === null) runDir = arg;
|
|
1535
|
-
else throw new Error(`unexpected argument "${arg}"`);
|
|
1536
|
-
}
|
|
1537
|
-
if (runDir === null) throw new Error(SUPERVISOR_RUN_USAGE);
|
|
1538
|
-
return {
|
|
1539
|
-
runDir,
|
|
1540
|
-
format
|
|
1541
|
-
};
|
|
1234
|
+
/**
|
|
1235
|
+
* The block appended to a run log after every run — the answers an operator asks
|
|
1236
|
+
* for, in the log tail, with no extra command.
|
|
1237
|
+
*/
|
|
1238
|
+
function renderSupervisorRunHeadline(r) {
|
|
1239
|
+
const o = r.orchestration;
|
|
1240
|
+
const steerNote = isUnavailable(o.steers) ? `unavailable — ${o.steers.unavailable}` : o.steers === 0 ? "0 (spawn→wait→respawn only; no mid-task steering)" : `${o.steers} queued / ${showMeasured(o.steersDelivered)} delivered`;
|
|
1241
|
+
return [
|
|
1242
|
+
`RUN-REPORT ${r.instanceId ?? "?"} [${r.arm ?? "?"}]`,
|
|
1243
|
+
` status=${showMeasured(r.outcome.supStatus)} source=${showMeasured(r.outcome.supStatusSource)} reason=${showMeasured(r.outcome.supReason)} failure=${fmtFailure(r.outcome.failure)}`,
|
|
1244
|
+
` steers=${steerNote}`,
|
|
1245
|
+
` waves=${showMeasured(o.waves)} sizes=${isUnavailable(o.waveSizes) ? `unavailable — ${o.waveSizes.unavailable}` : `[${o.waveSizes.join(",")}]`} workers=${showMeasured(o.workersSpawned)} settled=${showMeasured(o.workersSettled)} cancelled=${showMeasured(o.workersCancelled)}`,
|
|
1246
|
+
` concurrency max=${showMeasured(o.maxConcurrency)} utilization=${showMeasured(o.workerUtilization)} idle=${fmtMs(o.idleMs)} (${showMeasured(o.idlePct)}%) wall=${fmtMs(o.supervisorWallMs)}${o.supervisorWallSource === "journal-span" ? " (journal-span lower bound)" : ""}`,
|
|
1247
|
+
` respawns=${showMeasured(o.respawns)} evidence→respawn=${showMeasured(r.decision.observeThenRespawn)} blind-respawn=${showMeasured(r.decision.respawnWithoutEvidence)} depth=${showMeasured(o.delegationDepth)}`,
|
|
1248
|
+
` accepted=${showMeasured(r.decision.accepted)} rejected=${showMeasured(r.decision.rejected)} empty-pass=${showMeasured(r.decision.emptyPass)}`,
|
|
1249
|
+
` brain=$${showMeasured(r.economics.brain.usd)} total=$${showMeasured(r.economics.totalUsd)} judge.resolved=${showMeasured(r.outcome.judgeResolved)} score=${showMeasured(r.outcome.judgeScore)} verify=${showMeasured(r.outcome.verifyPass)}`,
|
|
1250
|
+
r.gaps.length > 0 ? ` gaps(${r.gaps.length}): ${r.gaps.join("; ")}` : " gaps: none"
|
|
1251
|
+
].join("\n");
|
|
1542
1252
|
}
|
|
1543
1253
|
/**
|
|
1544
|
-
*
|
|
1545
|
-
*
|
|
1254
|
+
* The recorded error on one line; `none recorded` and `unavailable` stay
|
|
1255
|
+
* distinct, and a throw the run outlived is labeled so it is not read as the
|
|
1256
|
+
* outcome of the settled result beside it.
|
|
1546
1257
|
*/
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
if (
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1258
|
+
function fmtFailure(v) {
|
|
1259
|
+
if (isUnavailable(v)) return `unavailable — ${v.unavailable}`;
|
|
1260
|
+
if (v === null) return "none recorded";
|
|
1261
|
+
const name = v.name ?? "unavailable — record has no error.name";
|
|
1262
|
+
const message = v.message ?? "unavailable — record has no error.message";
|
|
1263
|
+
const attempt = v.earlierAttempt ? ", earlier attempt" : "";
|
|
1264
|
+
return `${name}: ${message} [${v.source}${v.at === null ? "" : ` at ${v.at}`}${attempt}]`;
|
|
1265
|
+
}
|
|
1266
|
+
function resourceRows(records) {
|
|
1267
|
+
if (isUnavailable(records)) return [`unavailable — ${records.unavailable}`, ""];
|
|
1268
|
+
const out = [
|
|
1269
|
+
"Receipts are source records, not additive totals.",
|
|
1270
|
+
"A false completeness flag means the amount is a recorded subtotal, not complete usage.",
|
|
1271
|
+
"",
|
|
1272
|
+
"| Node | Source | Resource | Unit | Amount | Known |",
|
|
1273
|
+
"|---|---|---|---|---:|---|"
|
|
1274
|
+
];
|
|
1275
|
+
const cell = (value) => value.replace(/\|/g, "\\|").replace(/\r?\n/g, " ");
|
|
1276
|
+
for (const record of records) {
|
|
1277
|
+
const prefix = `| ${cell(record.nodeId ?? "unavailable")} | ${cell(record.source)} |`;
|
|
1278
|
+
if (isUnavailable(record.resources)) out.push(`${prefix} ${cell(showMeasured(record.resources))} | — | — | — |`);
|
|
1279
|
+
else if (record.resources.length === 0) out.push(`${prefix} recorded empty map | — | — | — |`);
|
|
1280
|
+
else for (const receipt of record.resources) out.push(`${prefix} ${cell(showMeasured(receipt.name))} | ${cell(showMeasured(receipt.unit))} | ${cell(showMeasured(receipt.amount))} | ${cell(showMeasured(receipt.known))} |`);
|
|
1560
1281
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1282
|
+
if (!records.length) out.push("| — | — | no spend records | — | — | — |");
|
|
1283
|
+
out.push("");
|
|
1284
|
+
return out;
|
|
1285
|
+
}
|
|
1286
|
+
function fmtMs(v) {
|
|
1287
|
+
if (isUnavailable(v)) return `unavailable — ${v.unavailable}`;
|
|
1288
|
+
if (v < 1e3) return `${v}ms`;
|
|
1289
|
+
const s = v / 1e3;
|
|
1290
|
+
if (s < 120) return `${roundDecimal(s, 1)}s`;
|
|
1291
|
+
return `${roundDecimal(s / 60, 1)}min`;
|
|
1292
|
+
}
|
|
1293
|
+
function renderSupervisorRunMarkdown(r) {
|
|
1294
|
+
const o = r.orchestration;
|
|
1295
|
+
const d = r.decision;
|
|
1296
|
+
const e = r.economics;
|
|
1297
|
+
const out = [];
|
|
1298
|
+
out.push(`# Run report — ${r.instanceId ?? "unknown instance"} [${r.arm ?? "unknown arm"}]`);
|
|
1299
|
+
out.push("");
|
|
1300
|
+
out.push("```");
|
|
1301
|
+
out.push(renderSupervisorRunHeadline(r));
|
|
1302
|
+
out.push("```");
|
|
1303
|
+
out.push("");
|
|
1304
|
+
out.push(`- Run: \`${r.runRef}\``);
|
|
1305
|
+
out.push(`- Supervisor: \`${showMeasured(r.supervisorId)}\``);
|
|
1306
|
+
out.push(`- Supervisor profile: \`${showMeasured(r.supervisorProfileDigest)}\``);
|
|
1307
|
+
out.push(`- Generated: ${r.generatedAt}`);
|
|
1308
|
+
out.push("");
|
|
1309
|
+
out.push("## Orchestration");
|
|
1310
|
+
out.push("");
|
|
1311
|
+
out.push("| Metric | Value |");
|
|
1312
|
+
out.push("|---|---|");
|
|
1313
|
+
out.push(`| Workers spawned | ${showMeasured(o.workersSpawned)} |`);
|
|
1314
|
+
out.push(`| Workers settled | ${showMeasured(o.workersSettled)} |`);
|
|
1315
|
+
out.push(`| Workers cancelled | ${showMeasured(o.workersCancelled)} |`);
|
|
1316
|
+
out.push(`| **Steers (mid-task messages to live workers)** | **${showMeasured(o.steers)}** |`);
|
|
1317
|
+
out.push(`| Steers delivered | ${showMeasured(o.steersDelivered)} |`);
|
|
1318
|
+
out.push(`| Outer-driver \`supervisor_steer\` calls | ${showMeasured(o.driverSteerCalls)} |`);
|
|
1319
|
+
out.push(`| Spawn waves | ${showMeasured(o.waves)} |`);
|
|
1320
|
+
out.push(`| Wave sizes | ${isUnavailable(o.waveSizes) ? showMeasured(o.waveSizes) : `[${o.waveSizes.join(", ")}]`} |`);
|
|
1321
|
+
out.push(`| Max concurrency | ${showMeasured(o.maxConcurrency)} |`);
|
|
1322
|
+
out.push(`| Respawns (after same parent's first settle) | ${showMeasured(o.respawns)} |`);
|
|
1323
|
+
out.push(`| Repeated labels | ${isUnavailable(o.repeatedLabels) ? showMeasured(o.repeatedLabels) : o.repeatedLabels.length === 0 ? "none" : o.repeatedLabels.join(", ")} |`);
|
|
1324
|
+
out.push(`| Delegation depth | ${showMeasured(o.delegationDepth)} |`);
|
|
1325
|
+
out.push(`| Time to first spawn | ${fmtMs(o.timeToFirstSpawnMs)} |`);
|
|
1326
|
+
out.push(`| Supervisor wall | ${fmtMs(o.supervisorWallMs)}${isUnavailable(o.supervisorWallSource) ? "" : ` (source: ${o.supervisorWallSource}${o.supervisorWallSource === "journal-span" ? ", lower bound" : ""})`} |`);
|
|
1327
|
+
out.push(`| Idle (zero live workers) | ${fmtMs(o.idleMs)} (${showMeasured(o.idlePct)}%) |`);
|
|
1328
|
+
out.push(`| Worker utilization (Σ worker wall ÷ supervisor wall) | ${showMeasured(o.workerUtilization)} |`);
|
|
1329
|
+
out.push("");
|
|
1330
|
+
if (!isUnavailable(o.steersByWorker) && o.steersByWorker.length > 0) {
|
|
1331
|
+
out.push("### Steers per worker");
|
|
1332
|
+
out.push("");
|
|
1333
|
+
out.push("| Worker id | Label | Queued | Delivered |");
|
|
1334
|
+
out.push("|---|---|---:|---:|");
|
|
1335
|
+
for (const s of o.steersByWorker) out.push(`| ${s.workerId === null ? "unavailable — worker id absent; label join used" : `\`${s.workerId}\``} | \`${s.worker}\` | ${s.queued} | ${s.delivered} |`);
|
|
1336
|
+
out.push("");
|
|
1337
|
+
} else if (isUnavailable(o.steersByWorker)) out.push(`### Steers per worker\n\nunavailable — ${o.steersByWorker.unavailable}\n`);
|
|
1338
|
+
out.push("## Decision quality");
|
|
1339
|
+
out.push("");
|
|
1340
|
+
out.push("| Metric | Value |");
|
|
1341
|
+
out.push("|---|---|");
|
|
1342
|
+
out.push(`| Settled by status | ${fmtCounts(d.settledByStatus)} |`);
|
|
1343
|
+
out.push(`| Settled verdicts | ${fmtCounts(d.settledVerdicts)} |`);
|
|
1344
|
+
out.push(`| Accepted (verify green + patch bytes) | ${showMeasured(d.accepted)} |`);
|
|
1345
|
+
out.push(`| Rejected (verify red) | ${showMeasured(d.rejected)} |`);
|
|
1346
|
+
out.push(`| Empty pass (green, no patch) | ${showMeasured(d.emptyPass)} |`);
|
|
1347
|
+
out.push(`| Evidence → respawn sequences | ${showMeasured(d.observeThenRespawn)} |`);
|
|
1348
|
+
out.push(`| Respawn with no same-parent settled evidence in front | ${showMeasured(d.respawnWithoutEvidence)} |`);
|
|
1349
|
+
out.push(`| Review actions (steers + worker questions) | ${showMeasured(d.reviewActions)} |`);
|
|
1350
|
+
out.push(`| Worker evidence returned | ${isUnavailable(d.workerEvidenceBytes) ? showMeasured(d.workerEvidenceBytes) : `${d.workerEvidenceBytes} bytes`} |`);
|
|
1351
|
+
out.push("");
|
|
1352
|
+
out.push("## Economics");
|
|
1353
|
+
out.push("");
|
|
1354
|
+
out.push("| Role | Tokens in | Tokens out | Cache read | Cache write | USD | Source |");
|
|
1355
|
+
out.push("|---|---:|---:|---:|---:|---:|---|");
|
|
1356
|
+
out.push(`| brain | ${showMeasured(e.brain.tokensIn)} | ${showMeasured(e.brain.tokensOut)} | ${showMeasured(e.brain.cacheRead)} | ${showMeasured(e.brain.cacheWrite)} | ${showMeasured(e.brain.usd)} | ${e.brain.source} |`);
|
|
1357
|
+
out.push(`| workers | ${showMeasured(e.workers.tokensIn)} | ${showMeasured(e.workers.tokensOut)} | ${showMeasured(e.workers.cacheRead)} | ${showMeasured(e.workers.cacheWrite)} | ${showMeasured(e.workers.usd)} | ${e.workers.source} |`);
|
|
1358
|
+
out.push("");
|
|
1359
|
+
if (!isUnavailable(e.brainTruncations) && e.brainTruncations > 0) out.push(`- **BRAIN OUTPUT TRUNCATED: ${e.brainTruncations} completion(s) hit \`finish_reason: "length"\`** — the supervisor acted on a half-written plan. Its output ceiling is too low; see \`brain.jsonl\` for the per-call \`req_max_tokens\`.`);
|
|
1360
|
+
else out.push(`- Brain completions truncated (finish_reason=length): ${showMeasured(e.brainTruncations)}`);
|
|
1361
|
+
out.push(`- Total USD: ${showMeasured(e.totalUsd)} (source: ${e.totalUsdSource})`);
|
|
1362
|
+
out.push(`- Spend measured two ways: journal-derived $${showMeasured(e.spend.journalDerived.usd)} over ${e.spend.journalDerived.records} journal record(s) (execution accounting) · close-record $${showMeasured(e.spend.closeRecord.usd)} over ${e.spend.closeRecord.records} close record(s) (billing-shaped). Divergence is a signal, not an error.`);
|
|
1363
|
+
out.push(`- Cost per accepted patch: ${showMeasured(e.costPerAcceptedPatchUsd)}`);
|
|
1364
|
+
if (isUnavailable(e.workerWallMsDistribution)) out.push(`- Worker wall distribution: unavailable — ${e.workerWallMsDistribution.unavailable}`);
|
|
1365
|
+
else {
|
|
1366
|
+
const w = e.workerWallMsDistribution;
|
|
1367
|
+
out.push(`- Worker wall (n=${w.n}): min ${fmtMs(w.min)} / p50 ${fmtMs(w.p50)} / p90 ${fmtMs(w.p90)} / max ${fmtMs(w.max)} / Σ ${fmtMs(w.sum)}`);
|
|
1567
1368
|
}
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1369
|
+
out.push("");
|
|
1370
|
+
if (!isUnavailable(e.perWorker) && e.perWorker.length > 0) {
|
|
1371
|
+
out.push("| Worker id | Label | Role | Runtime | Profile digest | Status | Failure | Infra | Wall | Tokens in | Tokens out | Patch bytes | Verify passed | Score |");
|
|
1372
|
+
out.push("|---|---|---|---|---|---|---|---|---:|---:|---:|---:|---|---:|");
|
|
1373
|
+
for (const w of e.perWorker) out.push(`| ${w.workerId === null ? "unavailable — worker id absent; label join used" : `\`${w.workerId}\``} | \`${w.worker}\` | ${w.role ?? "unavailable — source recorded no role"} | ${w.runtime ?? "unavailable — source recorded no runtime"} | ${w.profileDigest === null ? "unavailable — source recorded no profile digest" : `\`${w.profileDigest}\``} | ${w.status ?? "unavailable — no terminal event"} | ${w.failure ?? "none recorded"} | ${w.infra ?? "unavailable"} | ${w.wallMs === null ? "unavailable — no spawn/finish pair" : fmtMs(w.wallMs)} | ${w.tokensIn ?? "unavailable — store does not attribute tokens per worker"} | ${w.tokensOut ?? "unavailable — store does not attribute tokens per worker"} | ${w.patchBytes ?? "unavailable — no worker patch file"} | ${w.passed === null ? "unavailable — no verdict" : String(w.passed)} | ${w.score ?? "unavailable — no numeric score"} |`);
|
|
1374
|
+
out.push("");
|
|
1573
1375
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1376
|
+
if (e.resourceRecords !== void 0) out.push("## Named resource receipts", "", ...resourceRows(e.resourceRecords));
|
|
1377
|
+
out.push("## Outcome");
|
|
1378
|
+
out.push("");
|
|
1379
|
+
out.push("| Metric | Value |");
|
|
1380
|
+
out.push("|---|---|");
|
|
1381
|
+
out.push(`| Supervisor status | ${showMeasured(r.outcome.supStatus)} |`);
|
|
1382
|
+
out.push(`| Status source | ${showMeasured(r.outcome.supStatusSource)} |`);
|
|
1383
|
+
out.push(`| Terminal reason | ${showMeasured(r.outcome.supReason)} |`);
|
|
1384
|
+
out.push(`| Failure | ${fmtFailure(r.outcome.failure)} |`);
|
|
1385
|
+
out.push(`| Supervisor verdict | ${showMeasured(r.outcome.supVerdict)} |`);
|
|
1386
|
+
out.push(`| Delivered | ${showMeasured(r.outcome.delivered)} |`);
|
|
1387
|
+
out.push(`| Judge resolved | ${showMeasured(r.outcome.judgeResolved)} |`);
|
|
1388
|
+
out.push(`| Judge score | ${showMeasured(r.outcome.judgeScore)} |`);
|
|
1389
|
+
out.push(`| Judge passed / total | ${showMeasured(r.outcome.judgePassed)} / ${showMeasured(r.outcome.judgeTotal)} |`);
|
|
1390
|
+
out.push(`| Judge source | ${r.outcome.judgeSource ?? "unavailable — no judge.json and no ledger row"} |`);
|
|
1391
|
+
out.push(`| Verify gate | pass=${showMeasured(r.outcome.verifyPass)} rc=${showMeasured(r.outcome.verifyRc)} |`);
|
|
1392
|
+
if (isUnavailable(r.outcome.patch)) out.push(`| Patch | unavailable — ${r.outcome.patch.unavailable} |`);
|
|
1393
|
+
else {
|
|
1394
|
+
const p = r.outcome.patch;
|
|
1395
|
+
out.push(`| Patch | ${p.files} file(s), +${p.linesAdded}/-${p.linesRemoved}, test files touched: ${p.testFilesTouched.length === 0 ? "none" : p.testFilesTouched.join(", ")} |`);
|
|
1589
1396
|
}
|
|
1397
|
+
out.push("");
|
|
1398
|
+
out.push("## Gaps");
|
|
1399
|
+
out.push("");
|
|
1400
|
+
if (r.gaps.length === 0) out.push("None — every metric above is backed by a present artifact.");
|
|
1401
|
+
else for (const g of r.gaps) out.push(`- ${g}`);
|
|
1402
|
+
out.push("");
|
|
1403
|
+
out.push(`> Harness-session view of the same run (model calls, stuck loops, tool errors): \`${r.traceCommand}\``);
|
|
1404
|
+
out.push("");
|
|
1405
|
+
return out.join("\n");
|
|
1406
|
+
}
|
|
1407
|
+
function fmtCounts(v) {
|
|
1408
|
+
if (isUnavailable(v)) return showMeasured(v);
|
|
1409
|
+
const entries = Object.entries(v);
|
|
1410
|
+
return entries.length === 0 ? "none" : entries.map(([k, n]) => `${k}=${n}`).join(", ");
|
|
1411
|
+
}
|
|
1412
|
+
function renderSupervisorRollupMarkdown(rollup, title = "Round rollup") {
|
|
1413
|
+
const out = [];
|
|
1414
|
+
out.push(`# ${title}`);
|
|
1415
|
+
out.push("");
|
|
1416
|
+
out.push(`- Cells: ${rollup.cells}`);
|
|
1417
|
+
out.push(`- **Steers across all cells: ${showMeasured(rollup.steersTotal)}** (cells with ≥1 steer: ${showMeasured(rollup.cellsWithSteers)}; cells where the steer count is unavailable: ${rollup.cellsWithUnavailableSteers})`);
|
|
1418
|
+
out.push(`- Waves per cell (mean): ${showMeasured(rollup.wavesMean)}`);
|
|
1419
|
+
out.push(`- Max concurrency observed: ${showMeasured(rollup.maxConcurrencyMax)}`);
|
|
1420
|
+
out.push(`- Worker utilization (mean): ${showMeasured(rollup.utilizationMean)}`);
|
|
1421
|
+
out.push(`- Idle share (mean): ${showMeasured(rollup.idlePctMean)}%`);
|
|
1422
|
+
out.push(`- Workers spawned: ${showMeasured(rollup.workersSpawnedTotal)} · accepted: ${showMeasured(rollup.acceptedTotal)}`);
|
|
1423
|
+
out.push(`- Spend: $${showMeasured(rollup.usdTotal)} · judged resolved: ${showMeasured(rollup.resolvedCount)}/${rollup.cells}`);
|
|
1424
|
+
out.push(`- Spend measured two ways: journal-derived $${showMeasured(rollup.spendUsd.journalDerived.value)} over ${rollup.spendUsd.journalDerived.runs}/${rollup.cells} runs (execution accounting) · close-record $${showMeasured(rollup.spendUsd.closeRecord.value)} over ${rollup.spendUsd.closeRecord.runs}/${rollup.cells} runs (billing-shaped)`);
|
|
1425
|
+
out.push("");
|
|
1426
|
+
out.push("| Instance | Arm | Steers | Waves | Utilization | Idle % | Resolved | USD |");
|
|
1427
|
+
out.push("|---|---|---:|---:|---:|---:|---|---:|");
|
|
1428
|
+
for (const c of rollup.perCell) out.push(`| ${c.instanceId ?? "?"} | ${c.arm ?? "?"} | ${showMeasured(c.steers)} | ${showMeasured(c.waves)} | ${showMeasured(c.utilization)} | ${showMeasured(c.idlePct)} | ${showMeasured(c.resolved)} | ${showMeasured(c.usd)} |`);
|
|
1429
|
+
out.push("");
|
|
1430
|
+
for (const cell of rollup.perCell) if (cell.resourceRecords !== void 0) out.push(`## Resource receipts — ${cell.instanceId ?? "?"} [${cell.arm ?? "?"}]`, "", ...resourceRows(cell.resourceRecords));
|
|
1431
|
+
return out.join("\n");
|
|
1590
1432
|
}
|
|
1591
1433
|
//#endregion
|
|
1592
|
-
export {
|
|
1434
|
+
export { findSupervisorRunDirs as a, analyzeSupervisorRunSources as c, analyzeSupervisorRun as i, parsePatch as l, renderSupervisorRunHeadline as n, isRuntimeSupervisorRunDir as o, renderSupervisorRunMarkdown as r, readRuntimeSupervisorRun as s, renderSupervisorRollupMarkdown as t };
|
|
1593
1435
|
|
|
1594
|
-
//# sourceMappingURL=
|
|
1436
|
+
//# sourceMappingURL=render-C-w2EZ6p.js.map
|