@tangle-network/agent-eval 0.217.1 → 0.219.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 +57 -1
- package/dist/adapters/http.d.ts +3 -3
- package/dist/adapters/http.d.ts.map +1 -1
- package/dist/adapters/http.js +1 -0
- package/dist/adapters/http.js.map +1 -1
- package/dist/{agent-profile-DTt8uGP9.d.ts → agent-profile-D01Io2Xw.d.ts} +4 -4
- package/dist/{agent-profile-DTt8uGP9.d.ts.map → agent-profile-D01Io2Xw.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +13 -13
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +10 -10
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-DyeNcenW.d.ts → analyze-runs-BWAHBDAw.d.ts} +4 -4
- package/dist/{analyze-runs-DyeNcenW.d.ts.map → analyze-runs-BWAHBDAw.d.ts.map} +1 -1
- package/dist/{benchmark-command-xQK8nOI6.js → benchmark-command-BzmMTnvC.js} +664 -565
- package/dist/benchmark-command-BzmMTnvC.js.map +1 -0
- package/dist/benchmarks/index.d.ts +5 -5
- package/dist/benchmarks/index.js +3 -3
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/campaign/index.d.ts +8 -8
- package/dist/campaign/index.js +11 -11
- package/dist/{campaign-CJGkxAQ6.js → campaign-BVPC6ODQ.js} +452 -282
- package/dist/campaign-BVPC6ODQ.js.map +1 -0
- package/dist/{campaign-evidence-CQYw8_0H.js → campaign-evidence-DunzcJGv.js} +2 -2
- package/dist/campaign-evidence-DunzcJGv.js.map +1 -0
- package/dist/{chat-client-ldqxYYTN.js → chat-client-CMQ8_h4J.js} +2 -2
- package/dist/{chat-client-ldqxYYTN.js.map → chat-client-CMQ8_h4J.js.map} +1 -1
- package/dist/{chat-json-call-DavzexSp.js → chat-json-call-BrZKn0L3.js} +2 -2
- package/dist/{chat-json-call-DavzexSp.js.map → chat-json-call-BrZKn0L3.js.map} +1 -1
- package/dist/cli.js +10 -10
- package/dist/{completion-verifier-B_jw6C9p.js → completion-verifier-Cigap8CG.js} +5 -5
- package/dist/{completion-verifier-B_jw6C9p.js.map → completion-verifier-Cigap8CG.js.map} +1 -1
- package/dist/contract/index.d.ts +11 -11
- package/dist/contract/index.js +91 -11
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-D0352Z4d.js → cost-ledger-BGZB6yY2.js} +75 -2
- package/dist/cost-ledger-BGZB6yY2.js.map +1 -0
- package/dist/{cost-ledger-Jk62OBfF.d.ts → cost-ledger-C1W3ICmP.d.ts} +26 -2
- package/dist/cost-ledger-C1W3ICmP.d.ts.map +1 -0
- package/dist/{default-registry-ClYjq3QE.js → default-registry-BrKmT01n.js} +310 -278
- package/dist/{default-registry-ClYjq3QE.js.map → default-registry-BrKmT01n.js.map} +1 -1
- package/dist/{default-registry-DXgLmoDI.d.ts → default-registry-Cwg_QN3d.d.ts} +6 -6
- package/dist/{default-registry-DXgLmoDI.d.ts.map → default-registry-Cwg_QN3d.d.ts.map} +1 -1
- package/dist/{define-agent-eval-BIkH_gAR.d.ts → define-agent-eval-C2nFhHPu.d.ts} +8 -8
- package/dist/{define-agent-eval-BIkH_gAR.d.ts.map → define-agent-eval-C2nFhHPu.d.ts.map} +1 -1
- package/dist/{define-agent-eval-BDxNlP3D.js → define-agent-eval-UQY3VbJ2.js} +165 -105
- package/dist/define-agent-eval-UQY3VbJ2.js.map +1 -0
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/{dspy-rlm-engine-DhdCr1Dc.js → dspy-rlm-engine-Bn_Mt_LW.js} +3 -3
- package/dist/{dspy-rlm-engine-DhdCr1Dc.js.map → dspy-rlm-engine-Bn_Mt_LW.js.map} +1 -1
- package/dist/{engine-BvZ0R-36.d.ts → engine-BpGGw6cd.d.ts} +3 -3
- package/dist/{engine-BvZ0R-36.d.ts.map → engine-BpGGw6cd.d.ts.map} +1 -1
- package/dist/eval-campaign-BUMIxKTE.js +393 -0
- package/dist/eval-campaign-BUMIxKTE.js.map +1 -0
- package/dist/{evaluation-jTjC_QQD.d.ts → evaluation-CBdQt_kr.d.ts} +4 -4
- package/dist/{evaluation-jTjC_QQD.d.ts.map → evaluation-CBdQt_kr.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/evaluation.js +1 -1
- package/dist/{exact-types-CflbJ9f3.d.ts → exact-types-BYFmYq44.d.ts} +2 -2
- package/dist/{exact-types-CflbJ9f3.d.ts.map → exact-types-BYFmYq44.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +24 -1
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +110 -71
- package/dist/experiment/index.js.map +1 -1
- package/dist/{exporters-Cl6IeNAu.js → exporters-DWvM16LE.js} +2 -2
- package/dist/{exporters-Cl6IeNAu.js.map → exporters-DWvM16LE.js.map} +1 -1
- package/dist/{external-optimizer-process-KVFGvYX1.js → external-optimizer-process-wOLfzsCC.js} +2 -2
- package/dist/{external-optimizer-process-KVFGvYX1.js.map → external-optimizer-process-wOLfzsCC.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-XIHBOSKt.js → external-optimizer-subprocess-D670Oxf2.js} +4 -4
- package/dist/{external-optimizer-subprocess-XIHBOSKt.js.map → external-optimizer-subprocess-D670Oxf2.js.map} +1 -1
- package/dist/{feedback-trajectory-BWmhRBGu.d.ts → feedback-trajectory-DhB9WzYg.d.ts} +3 -3
- package/dist/{feedback-trajectory-BWmhRBGu.d.ts.map → feedback-trajectory-DhB9WzYg.d.ts.map} +1 -1
- package/dist/{findings-store-BMVQtEsm.js → findings-store-CvNo712L.js} +6 -6
- package/dist/{findings-store-BMVQtEsm.js.map → findings-store-CvNo712L.js.map} +1 -1
- package/dist/fuzz.d.ts +1 -1
- package/dist/fuzz.js +1 -1
- package/dist/{hf-dataset-D9f7-oX7.js → hf-dataset-CKxIJQba.js} +3 -3
- package/dist/{hf-dataset-D9f7-oX7.js.map → hf-dataset-CKxIJQba.js.map} +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/{index-CX-GAUpw.d.ts → index-CHxwfW5g.d.ts} +2 -2
- package/dist/{index-CX-GAUpw.d.ts.map → index-CHxwfW5g.d.ts.map} +1 -1
- package/dist/{index-BLGqZ81N.d.ts → index-CVFStrQD.d.ts} +8 -8
- package/dist/{index-BLGqZ81N.d.ts.map → index-CVFStrQD.d.ts.map} +1 -1
- package/dist/{index-9jJ2fKSX.d.ts → index-CalAsXMR.d.ts} +7 -5
- package/dist/index-CalAsXMR.d.ts.map +1 -0
- package/dist/{index-CiRwLv2R.d.ts → index-D7fmC-1K.d.ts} +3 -4
- package/dist/index-D7fmC-1K.d.ts.map +1 -0
- package/dist/{index-BiT6RtNH.d.ts → index-DAXfpVf7.d.ts} +10 -10
- package/dist/{index-BiT6RtNH.d.ts.map → index-DAXfpVf7.d.ts.map} +1 -1
- package/dist/{index-ZuWx52WG.d.ts → index-Q6DvdcwI.d.ts} +67 -24
- package/dist/index-Q6DvdcwI.d.ts.map +1 -0
- package/dist/index.d.ts +26 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +615 -692
- package/dist/index.js.map +1 -1
- package/dist/{integrity-DOd9Q86O.js → integrity-C8oUeB0g.js} +322 -197
- package/dist/integrity-C8oUeB0g.js.map +1 -0
- package/dist/{integrity-_qgZLA5p.d.ts → integrity-CCwvezWS.d.ts} +2 -2
- package/dist/{integrity-_qgZLA5p.d.ts.map → integrity-CCwvezWS.d.ts.map} +1 -1
- package/dist/{journal-CR4QikYp.js → journal-C7om8Gum.js} +48 -38
- package/dist/journal-C7om8Gum.js.map +1 -0
- package/dist/judge-gate-Co5tuh57.js.map +1 -1
- package/dist/{judge-gate-DsL0yFcb.d.ts → judge-gate-Dc_mXQsL.d.ts} +2 -2
- package/dist/judge-gate-Dc_mXQsL.d.ts.map +1 -0
- package/dist/{kind-factory-Gy4fXixd.js → kind-factory-BhxbtUsQ.js} +2 -2
- package/dist/{kind-factory-Gy4fXixd.js.map → kind-factory-BhxbtUsQ.js.map} +1 -1
- package/dist/ledger-core/index.d.ts +1 -1
- package/dist/ledger-core/index.js +2 -2
- package/dist/ledger-core/lock-holder.d.ts +2 -0
- package/dist/ledger-core/lock-holder.js +181 -0
- package/dist/ledger-core/lock-holder.js.map +1 -0
- package/dist/{ledger-core-DrJhbms9.js → ledger-core-CAxUdDk0.js} +2 -2
- package/dist/{ledger-core-DrJhbms9.js.map → ledger-core-CAxUdDk0.js.map} +1 -1
- package/dist/{llm-client-BshCREn6.js → llm-client-DXuOTseU.js} +239 -249
- package/dist/llm-client-DXuOTseU.js.map +1 -0
- package/dist/{llm-judge-C8jMTNNG.js → llm-judge-Cc8vDJh_.js} +648 -459
- package/dist/llm-judge-Cc8vDJh_.js.map +1 -0
- package/dist/lock-holder-DaJbfpci.d.ts +86 -0
- package/dist/lock-holder-DaJbfpci.d.ts.map +1 -0
- package/dist/matrix/index.d.ts +2 -2
- package/dist/{matrix-DHe-dwVJ.d.ts → matrix-Cf-AGxGh.d.ts} +4 -4
- package/dist/{matrix-DHe-dwVJ.d.ts.map → matrix-Cf-AGxGh.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +2 -2
- package/dist/{mint-zszyYlpA.js → mint-CbdwjTPW.js} +2 -2
- package/dist/{mint-zszyYlpA.js.map → mint-CbdwjTPW.js.map} +1 -1
- package/dist/{mint-BRZXuwRi.d.ts → mint-CkzpVPdz.d.ts} +3 -3
- package/dist/{mint-BRZXuwRi.d.ts.map → mint-CkzpVPdz.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/multishot/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{pareto-BzsxidFD.js → pareto-BiBnQXAE.js} +306 -212
- package/dist/pareto-BiBnQXAE.js.map +1 -0
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{prime-protocol-BWG2DQIk.d.ts → prime-protocol-CckHBxGu.d.ts} +3 -3
- package/dist/{prime-protocol-BWG2DQIk.d.ts.map → prime-protocol-CckHBxGu.d.ts.map} +1 -1
- package/dist/{promotion-gate-DaY95yU6.d.ts → promotion-gate-CkVZHagC.d.ts} +3 -3
- package/dist/{promotion-gate-DaY95yU6.d.ts.map → promotion-gate-CkVZHagC.d.ts.map} +1 -1
- package/dist/{proposal-findings-BbWidvUk.js → proposal-findings-E1aSC_cU.js} +2 -2
- package/dist/{proposal-findings-BbWidvUk.js.map → proposal-findings-E1aSC_cU.js.map} +1 -1
- package/dist/{registry-ssNoHzwD.d.ts → registry-B_yG-1jh.d.ts} +5 -5
- package/dist/{registry-ssNoHzwD.d.ts.map → registry-B_yG-1jh.d.ts.map} +1 -1
- package/dist/{render-C-w2EZ6p.js → render-Cs34y0iX.js} +404 -208
- package/dist/render-Cs34y0iX.js.map +1 -0
- package/dist/reporting.d.ts +3 -3
- package/dist/{researcher-0ABVIdGa.d.ts → researcher-H0p44OYC.d.ts} +5 -5
- package/dist/{researcher-0ABVIdGa.d.ts.map → researcher-H0p44OYC.d.ts.map} +1 -1
- package/dist/{reward-DrZ71vnf.d.ts → reward-BeUgVVC_.d.ts} +2 -2
- package/dist/{reward-DrZ71vnf.d.ts.map → reward-BeUgVVC_.d.ts.map} +1 -1
- package/dist/{reward-hacking-E52wq86n.d.ts → reward-hacking-WTxUbtbb.d.ts} +2 -2
- package/dist/{reward-hacking-E52wq86n.d.ts.map → reward-hacking-WTxUbtbb.d.ts.map} +1 -1
- package/dist/rl.d.ts +8 -8
- package/dist/rl.js +4 -4
- package/dist/rollout/index.d.ts +3 -3
- package/dist/rollout/index.js +5 -5
- package/dist/{rollout-D6C50mfA.js → rollout-Dd1ucT_M.js} +5 -5
- package/dist/{rollout-D6C50mfA.js.map → rollout-Dd1ucT_M.js.map} +1 -1
- package/dist/{rubric-predictive-validity-DiwT8PbL.d.ts → rubric-predictive-validity-noY7uE03.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-DiwT8PbL.d.ts.map → rubric-predictive-validity-noY7uE03.d.ts.map} +1 -1
- package/dist/{run-record-CaxbLq6Y.d.ts → run-record-C3awiXPf.d.ts} +2 -2
- package/dist/{run-record-CaxbLq6Y.d.ts.map → run-record-C3awiXPf.d.ts.map} +1 -1
- package/dist/schema-C-ziyJD7.d.ts.map +1 -1
- package/dist/{schema-DxcKTzbi.js → schema-CvhfLjtZ.js} +77 -47
- package/dist/schema-CvhfLjtZ.js.map +1 -0
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +2 -2
- package/dist/{search-kernel-DxqjBxA-.d.ts → search-kernel-Dloxd6gs.d.ts} +5 -5
- package/dist/{search-kernel-DxqjBxA-.d.ts.map → search-kernel-Dloxd6gs.d.ts.map} +1 -1
- package/dist/{search-ledger-TUvB5gWH.js → search-ledger-CZRqtFbW.js} +252 -245
- package/dist/search-ledger-CZRqtFbW.js.map +1 -0
- package/dist/{search-ledger-file-UKCO2r8a.js → search-ledger-file-Bd5Tioq6.js} +3 -3
- package/dist/{search-ledger-file-UKCO2r8a.js.map → search-ledger-file-Bd5Tioq6.js.map} +1 -1
- package/dist/{search-shipper-Cw2z3-td.js → search-shipper-Dn3NLsuH.js} +3 -3
- package/dist/{search-shipper-Cw2z3-td.js.map → search-shipper-Dn3NLsuH.js.map} +1 -1
- package/dist/{search-summary-DQIvJsSB.js → search-summary-D4bwYnAE.js} +3 -3
- package/dist/{search-summary-DQIvJsSB.js.map → search-summary-D4bwYnAE.js.map} +1 -1
- package/dist/{server-DoVbqqtJ.js → server-8TS8XCvg.js} +3 -3
- package/dist/{server-DoVbqqtJ.js.map → server-8TS8XCvg.js.map} +1 -1
- package/dist/{single-run-lock-U58yf8N6.js → single-run-lock-Dekd8_Wv.js} +7 -7
- package/dist/single-run-lock-Dekd8_Wv.js.map +1 -0
- package/dist/{skillopt-optimization-method-kyL94-ri.js → skillopt-optimization-method-DLKqdhcR.js} +1384 -1059
- package/dist/skillopt-optimization-method-DLKqdhcR.js.map +1 -0
- package/dist/{statistical-heldout-C9AbgREN.d.ts → statistical-heldout-3z3I-kJN.d.ts} +3 -3
- package/dist/{statistical-heldout-C9AbgREN.d.ts.map → statistical-heldout-3z3I-kJN.d.ts.map} +1 -1
- package/dist/{store-otlp-BteDAbHK.js → store-otlp-dyWE3wAG.js} +2 -2
- package/dist/{store-otlp-BteDAbHK.js.map → store-otlp-dyWE3wAG.js.map} +1 -1
- package/dist/{store-tool-spans-D5l_OfTJ.js → store-tool-spans-DIUgZbzu.js} +3 -3
- package/dist/{store-tool-spans-D5l_OfTJ.js.map → store-tool-spans-DIUgZbzu.js.map} +1 -1
- package/dist/{store-tool-spans-DZS0HWVf.d.ts → store-tool-spans-DPwXHQkH.d.ts} +7 -7
- package/dist/{store-tool-spans-DZS0HWVf.d.ts.map → store-tool-spans-DPwXHQkH.d.ts.map} +1 -1
- package/dist/{summary-report-DM7tlml1.d.ts → summary-report-C8V49Jt3.d.ts} +18 -3
- package/dist/summary-report-C8V49Jt3.d.ts.map +1 -0
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +3 -3
- package/dist/{systemone-Bp_Ac0p1.d.ts → systemone-DVA7t76V.d.ts} +6 -6
- package/dist/{systemone-Bp_Ac0p1.d.ts.map → systemone-DVA7t76V.d.ts.map} +1 -1
- package/dist/{systemone-review-CwE6JGIp.d.ts → systemone-review-CUBMuTLi.d.ts} +2 -2
- package/dist/{systemone-review-CwE6JGIp.d.ts.map → systemone-review-CUBMuTLi.d.ts.map} +1 -1
- package/dist/systemone.d.ts +3 -3
- package/dist/{terminal-record-78g6E4vh.js → terminal-record-D4Rv-j1W.js} +241 -193
- package/dist/{terminal-record-78g6E4vh.js.map → terminal-record-D4Rv-j1W.js.map} +1 -1
- package/dist/{tool-groups-DyNz2JZ_.d.ts → tool-groups-LISbBWCg.d.ts} +3 -3
- package/dist/tool-groups-LISbBWCg.d.ts.map +1 -0
- package/dist/{trace-questions-xxwgsuMi.d.ts → trace-questions-C42fYEE4.d.ts} +4 -4
- package/dist/{trace-questions-xxwgsuMi.d.ts.map → trace-questions-C42fYEE4.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +3 -3
- package/dist/traces.d.ts +6 -6
- package/dist/traces.js +3 -3
- package/dist/trajectory-replay/index.d.ts +4 -1
- package/dist/trajectory-replay/index.d.ts.map +1 -1
- package/dist/trajectory-replay/index.js +854 -823
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/{tree-BGRglkKd.js → tree-DSqwJpL9.js} +122 -14
- package/dist/tree-DSqwJpL9.js.map +1 -0
- package/dist/{types-CW8ewATZ.d.ts → types-8yQzNm8u.d.ts} +4 -4
- package/dist/{types-CW8ewATZ.d.ts.map → types-8yQzNm8u.d.ts.map} +1 -1
- package/dist/{types-D8GhJoHk.d.ts → types-CHfn1zg5.d.ts} +70 -72
- package/dist/types-CHfn1zg5.d.ts.map +1 -0
- package/dist/{types-DtMbFw6U.d.ts → types-D8GXK9Z5.d.ts} +3 -3
- package/dist/{types-DtMbFw6U.d.ts.map → types-D8GXK9Z5.d.ts.map} +1 -1
- package/dist/{types-D-mgRzlh.d.ts → types-eMhdacVp.d.ts} +2 -2
- package/dist/{types-D-mgRzlh.d.ts.map → types-eMhdacVp.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/campaign-proposers.md +16 -0
- package/docs/concepts.md +31 -0
- package/docs/design/statistics-decisions.md +1 -1
- package/docs/eval-surface-map.md +1 -0
- package/docs/profile-json-identity.md +1 -2
- package/docs/public-api.md +100 -88
- package/package.json +8 -6
- package/dist/benchmark-command-xQK8nOI6.js.map +0 -1
- package/dist/campaign-CJGkxAQ6.js.map +0 -1
- package/dist/campaign-evidence-CQYw8_0H.js.map +0 -1
- package/dist/cost-ledger-D0352Z4d.js.map +0 -1
- package/dist/cost-ledger-Jk62OBfF.d.ts.map +0 -1
- package/dist/define-agent-eval-BDxNlP3D.js.map +0 -1
- package/dist/eval-campaign-BLEfBGbA.js +0 -343
- package/dist/eval-campaign-BLEfBGbA.js.map +0 -1
- package/dist/index-9jJ2fKSX.d.ts.map +0 -1
- package/dist/index-CiRwLv2R.d.ts.map +0 -1
- package/dist/index-ZuWx52WG.d.ts.map +0 -1
- package/dist/integrity-DOd9Q86O.js.map +0 -1
- package/dist/journal-CR4QikYp.js.map +0 -1
- package/dist/judge-gate-DsL0yFcb.d.ts.map +0 -1
- package/dist/llm-client-BshCREn6.js.map +0 -1
- package/dist/llm-judge-C8jMTNNG.js.map +0 -1
- package/dist/pareto-BzsxidFD.js.map +0 -1
- package/dist/render-C-w2EZ6p.js.map +0 -1
- package/dist/schema-DxcKTzbi.js.map +0 -1
- package/dist/search-ledger-TUvB5gWH.js.map +0 -1
- package/dist/single-run-lock-U58yf8N6.js.map +0 -1
- package/dist/skillopt-optimization-method-kyL94-ri.js.map +0 -1
- package/dist/summary-report-DM7tlml1.d.ts.map +0 -1
- package/dist/tool-groups-DyNz2JZ_.d.ts.map +0 -1
- package/dist/tree-BGRglkKd.js.map +0 -1
- package/dist/types-D8GhJoHk.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as unscreenedRewardFields } from "./reward-nw2xZGZG.js";
|
|
2
2
|
import { n as isRecord } from "./json-BhdsJaOQ.js";
|
|
3
|
-
import { f as validateRolloutLine, r as ROLLOUT_SCHEMA, u as isRolloutLine } from "./schema-
|
|
4
|
-
import { a as nonEmptyString, c as parseSupervisorTree, i as asRecord, m as isUnavailable, o as parseJsonRecord, r as readTerminalRecord } from "./terminal-record-
|
|
3
|
+
import { f as validateRolloutLine, r as ROLLOUT_SCHEMA, u as isRolloutLine } from "./schema-CvhfLjtZ.js";
|
|
4
|
+
import { a as nonEmptyString, c as parseSupervisorTree, i as asRecord, m as isUnavailable, o as parseJsonRecord, r as readTerminalRecord } from "./terminal-record-D4Rv-j1W.js";
|
|
5
5
|
//#region src/supervisor-run/integrity-issues.ts
|
|
6
6
|
function evidence(path, value) {
|
|
7
7
|
return {
|
|
@@ -180,7 +180,7 @@ function steerIssues(joined, rootCompleted) {
|
|
|
180
180
|
* workers with a terminal event, because a live worker's current turn and session are still
|
|
181
181
|
* being written. A worker whose store records neither fact is not counted either way.
|
|
182
182
|
*/
|
|
183
|
-
function transcriptIssues(source, facts) {
|
|
183
|
+
function transcriptIssues$1(source, facts) {
|
|
184
184
|
if (source.workers === null) return [];
|
|
185
185
|
const closed = new Set(facts.closes.map((close) => close.id).filter((id) => id.length > 0));
|
|
186
186
|
const closedWorkers = source.workers.filter((worker) => worker.workerId !== void 0 && closed.has(worker.workerId));
|
|
@@ -439,7 +439,7 @@ function sourceIssues(source, facts, tree) {
|
|
|
439
439
|
}));
|
|
440
440
|
return out;
|
|
441
441
|
}
|
|
442
|
-
out.push(...transcriptIssues(source, facts));
|
|
442
|
+
out.push(...transcriptIssues$1(source, facts));
|
|
443
443
|
const joined = joinWorkerControls(facts);
|
|
444
444
|
if (joined.issue !== null) out.push(joined.issue);
|
|
445
445
|
const rootCompleted = tree.rootId !== null && tree.nodes.filter((node) => node.rollout_id === tree.rootId).length === 1 && tree.nodes.find((node) => node.rollout_id === tree.rootId)?.outcome.is_completed === true;
|
|
@@ -504,10 +504,30 @@ function unavailableNodeChecks(record) {
|
|
|
504
504
|
if (!isRecord(record.raw.outcome)) checks.push("timing", "terminal-state");
|
|
505
505
|
return [...new Set(checks)];
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
const out = [];
|
|
507
|
+
function buildTreeView(tree, uncertainty) {
|
|
509
508
|
const records = tree.nodes.map(nodeRecord);
|
|
510
509
|
const malformedSourceRows = tree.gaps.filter((gap) => gap.code === "source-row-malformed").reduce((count, gap) => count + (gap.count ?? 1), 0);
|
|
510
|
+
const byId = /* @__PURE__ */ new Map();
|
|
511
|
+
for (const record of records) {
|
|
512
|
+
if (record.id === null) continue;
|
|
513
|
+
const matches = byId.get(record.id) ?? [];
|
|
514
|
+
matches.push(record);
|
|
515
|
+
byId.set(record.id, matches);
|
|
516
|
+
}
|
|
517
|
+
const unknownIdentityRows = records.filter((record) => record.id === null).length + Math.max(malformedSourceRows, uncertainty.unknownIdentityRows ?? 0);
|
|
518
|
+
return {
|
|
519
|
+
tree,
|
|
520
|
+
uncertainty,
|
|
521
|
+
records,
|
|
522
|
+
byId,
|
|
523
|
+
unique: records.filter((record) => record.id !== null && byId.get(record.id)?.length === 1),
|
|
524
|
+
unknownIdentityRows
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
/** Nodes that fail canonical rollout validation, and the checks that cannot run for them. */
|
|
528
|
+
function schemaIssues(view) {
|
|
529
|
+
const { records } = view;
|
|
530
|
+
const out = [];
|
|
511
531
|
for (const record of records) {
|
|
512
532
|
if (record.errors.length === 0) continue;
|
|
513
533
|
out.push(issue({
|
|
@@ -538,13 +558,12 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
538
558
|
}
|
|
539
559
|
}));
|
|
540
560
|
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}
|
|
561
|
+
return out;
|
|
562
|
+
}
|
|
563
|
+
/** Rollout ids claimed by more than one node. */
|
|
564
|
+
function duplicateIdIssues(view) {
|
|
565
|
+
const { byId } = view;
|
|
566
|
+
const out = [];
|
|
548
567
|
for (const [rolloutId, matches] of byId) {
|
|
549
568
|
if (matches.length < 2) continue;
|
|
550
569
|
out.push(issue({
|
|
@@ -562,8 +581,12 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
562
581
|
recommendedAction: "Give every invocation one stable rollout id and regenerate the tree."
|
|
563
582
|
}));
|
|
564
583
|
}
|
|
565
|
-
|
|
566
|
-
|
|
584
|
+
return out;
|
|
585
|
+
}
|
|
586
|
+
/** Whether the declared root exists and is unambiguous; returns the root row when it does. */
|
|
587
|
+
function rootIssues(view) {
|
|
588
|
+
const { tree, records, byId, unknownIdentityRows } = view;
|
|
589
|
+
const out = [];
|
|
567
590
|
let root;
|
|
568
591
|
if (tree.rootId === null) out.push(issue({
|
|
569
592
|
code: "root-unavailable",
|
|
@@ -607,6 +630,15 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
607
630
|
recommendedAction: "Restore the root rollout row or correct rootId."
|
|
608
631
|
}));
|
|
609
632
|
}
|
|
633
|
+
return {
|
|
634
|
+
issues: out,
|
|
635
|
+
root
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
/** The root must be parentless and labeled a supervisor. */
|
|
639
|
+
function rootShapeIssues(view, root) {
|
|
640
|
+
const { tree } = view;
|
|
641
|
+
const out = [];
|
|
610
642
|
if (root !== void 0) {
|
|
611
643
|
if (root.parent !== void 0 && root.parent !== null) out.push(issue({
|
|
612
644
|
code: "root-has-parent",
|
|
@@ -629,6 +661,12 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
629
661
|
recommendedAction: "Preserve the root invocation role as supervisor when minting rollout rows."
|
|
630
662
|
}));
|
|
631
663
|
}
|
|
664
|
+
return out;
|
|
665
|
+
}
|
|
666
|
+
/** Parent-child edges: detached nodes, missing parents, cross-run edges and impossible orderings. */
|
|
667
|
+
function edgeIssues(view) {
|
|
668
|
+
const { tree, uncertainty, byId, unique, unknownIdentityRows } = view;
|
|
669
|
+
const out = [];
|
|
632
670
|
for (const record of unique) {
|
|
633
671
|
if (record.parent === void 0) continue;
|
|
634
672
|
if (record.parent === null) {
|
|
@@ -712,6 +750,12 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
712
750
|
recommendedAction: "Correct the causal timestamps or attach the child to its actual spawner."
|
|
713
751
|
}));
|
|
714
752
|
}
|
|
753
|
+
return out;
|
|
754
|
+
}
|
|
755
|
+
/** Invocations timestamped as closing before they started. */
|
|
756
|
+
function closeBeforeStartIssues(view) {
|
|
757
|
+
const { unique } = view;
|
|
758
|
+
const out = [];
|
|
715
759
|
for (const record of unique) {
|
|
716
760
|
const start = metric(record, ["spawned_at", "started_at"]);
|
|
717
761
|
const close = metric(record, [
|
|
@@ -731,6 +775,12 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
731
775
|
recommendedAction: "Correct the event ordering or retain clock-domain metadata."
|
|
732
776
|
}));
|
|
733
777
|
}
|
|
778
|
+
return out;
|
|
779
|
+
}
|
|
780
|
+
/** Parent cycles, each reported once. */
|
|
781
|
+
function parentCycleIssues(view) {
|
|
782
|
+
const { byId, unique } = view;
|
|
783
|
+
const out = [];
|
|
734
784
|
const emittedCycles = /* @__PURE__ */ new Set();
|
|
735
785
|
const resolved = /* @__PURE__ */ new Set();
|
|
736
786
|
for (const start of unique) {
|
|
@@ -773,6 +823,12 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
773
823
|
}
|
|
774
824
|
for (const id of path) resolved.add(id);
|
|
775
825
|
}
|
|
826
|
+
return out;
|
|
827
|
+
}
|
|
828
|
+
/** A completed run whose children never recorded a terminal outcome. */
|
|
829
|
+
function childTerminalIssues(view, root) {
|
|
830
|
+
const { unique } = view;
|
|
831
|
+
const out = [];
|
|
776
832
|
if (root?.completed === true) {
|
|
777
833
|
const missingTerminal = unique.filter((record) => record.id !== root?.id && record.terminal === false);
|
|
778
834
|
if (missingTerminal.length > 0) out.push(issue({
|
|
@@ -790,6 +846,12 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
790
846
|
}
|
|
791
847
|
}));
|
|
792
848
|
}
|
|
849
|
+
return out;
|
|
850
|
+
}
|
|
851
|
+
/** Rows with neither inlined messages nor a retained transcript. */
|
|
852
|
+
function transcriptIssues(view) {
|
|
853
|
+
const { records } = view;
|
|
854
|
+
const out = [];
|
|
793
855
|
const uninlined = records.filter((record) => record.messages?.length === 0);
|
|
794
856
|
const missingTranscripts = uninlined.filter((record) => record.transcriptRef === null);
|
|
795
857
|
if (missingTranscripts.length > 0) out.push(issue({
|
|
@@ -807,6 +869,12 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
807
869
|
retained_by_reference_count: uninlined.length - missingTranscripts.length
|
|
808
870
|
}
|
|
809
871
|
}));
|
|
872
|
+
return out;
|
|
873
|
+
}
|
|
874
|
+
/** Rows without the canonical agent-profile identity. */
|
|
875
|
+
function profileIssues(view) {
|
|
876
|
+
const { records } = view;
|
|
877
|
+
const out = [];
|
|
810
878
|
const missingProfiles = records.filter((record) => record.profileId === null);
|
|
811
879
|
if (missingProfiles.length > 0) out.push(issue({
|
|
812
880
|
code: "profile-id-unavailable",
|
|
@@ -824,6 +892,22 @@ function treeIssues(tree, uncertainty = {}) {
|
|
|
824
892
|
}));
|
|
825
893
|
return out;
|
|
826
894
|
}
|
|
895
|
+
function treeIssues(tree, uncertainty = {}) {
|
|
896
|
+
const view = buildTreeView(tree, uncertainty);
|
|
897
|
+
const { issues: rootProblems, root } = rootIssues(view);
|
|
898
|
+
return [
|
|
899
|
+
...schemaIssues(view),
|
|
900
|
+
...duplicateIdIssues(view),
|
|
901
|
+
...rootProblems,
|
|
902
|
+
...rootShapeIssues(view, root),
|
|
903
|
+
...edgeIssues(view),
|
|
904
|
+
...closeBeforeStartIssues(view),
|
|
905
|
+
...parentCycleIssues(view),
|
|
906
|
+
...childTerminalIssues(view, root),
|
|
907
|
+
...transcriptIssues(view),
|
|
908
|
+
...profileIssues(view)
|
|
909
|
+
];
|
|
910
|
+
}
|
|
827
911
|
//#endregion
|
|
828
912
|
//#region src/supervisor-run/integrity-types.ts
|
|
829
913
|
const SUPERVISOR_RUN_INTEGRITY_SCHEMA = "tangle.supervisor-run-integrity@1";
|
|
@@ -873,26 +957,8 @@ function hasWorkerId(worker) {
|
|
|
873
957
|
function supervisorRunRolloutLines(src, opts = {}) {
|
|
874
958
|
return supervisorRunRolloutLinesFromFacts(src, parseSupervisorTree(src), opts);
|
|
875
959
|
}
|
|
876
|
-
/**
|
|
877
|
-
function
|
|
878
|
-
const gaps = [];
|
|
879
|
-
if (src.journal === null) {
|
|
880
|
-
gaps.push({
|
|
881
|
-
code: "journal-unavailable",
|
|
882
|
-
message: `${src.supRunDir === null ? "no supervisor run dir" : "journal absent"}; no nodes recoverable`
|
|
883
|
-
});
|
|
884
|
-
return {
|
|
885
|
-
rootId: null,
|
|
886
|
-
nodes: [],
|
|
887
|
-
gaps
|
|
888
|
-
};
|
|
889
|
-
}
|
|
890
|
-
const malformedSourceRows = tree.journalInvalidRows + tree.spawns.filter((spawn) => !spawn.valid).length;
|
|
891
|
-
if (malformedSourceRows > 0) gaps.push({
|
|
892
|
-
code: "source-row-malformed",
|
|
893
|
-
message: `${malformedSourceRows} of ${tree.journalRows} journal row(s) were unusable and excluded from the tree`,
|
|
894
|
-
count: malformedSourceRows
|
|
895
|
-
});
|
|
960
|
+
/** What the root and worker rows share: the parsed run record, the row template and the gap collector. */
|
|
961
|
+
function rolloutContext(src, tree, opts, gaps) {
|
|
896
962
|
const state = tree.state;
|
|
897
963
|
const result = parseJsonRecord(src.result);
|
|
898
964
|
const judge = parseJsonRecord(src.judge);
|
|
@@ -925,7 +991,6 @@ function supervisorRunRolloutLinesFromFacts(src, tree, opts = {}) {
|
|
|
925
991
|
messages: [],
|
|
926
992
|
tool_defs: []
|
|
927
993
|
};
|
|
928
|
-
const nodes = [];
|
|
929
994
|
const noteCaptureGaps = (owner, nodeId, captures) => {
|
|
930
995
|
if (captures === null || captures?.length === 0) {
|
|
931
996
|
gaps.push({
|
|
@@ -949,173 +1014,233 @@ function supervisorRunRolloutLinesFromFacts(src, tree, opts = {}) {
|
|
|
949
1014
|
}
|
|
950
1015
|
return incomplete ? "workspace capture evidence incomplete" : null;
|
|
951
1016
|
};
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
agent_profile_cell_id: rootSpawn?.profileDigest ?? null,
|
|
976
|
-
sampling: null
|
|
977
|
-
},
|
|
978
|
-
outcome: {
|
|
979
|
-
...unscreenedRewardFields(reward),
|
|
980
|
-
reward_source: src.judgeSource,
|
|
981
|
-
verdict: judge ?? null,
|
|
982
|
-
metrics: {
|
|
983
|
-
arm: src.arm,
|
|
984
|
-
sup_status: isUnavailable(terminal.supStatus) ? null : terminal.supStatus,
|
|
985
|
-
sup_verdict: typeof state?.verdict === "string" ? state.verdict : null,
|
|
986
|
-
delivered: typeof stateResult.delivered === "boolean" ? stateResult.delivered : null,
|
|
987
|
-
verify_pass: typeof result?.verify_pass === "boolean" ? result.verify_pass : null,
|
|
988
|
-
started_at: tree.startedAt,
|
|
989
|
-
completed_at: tree.completedAt,
|
|
990
|
-
workers_spawned: tree.workerSpawns.length,
|
|
991
|
-
brain_metered_events: tree.brain.meteredCount,
|
|
992
|
-
runtime: rootSpawn?.runtime ?? null,
|
|
993
|
-
profile_digest: rootSpawn?.profileDigest ?? null
|
|
994
|
-
},
|
|
995
|
-
is_completed: terminal.completed === true,
|
|
996
|
-
is_truncated: false,
|
|
997
|
-
error: terminal.completed !== false ? null : !isUnavailable(terminal.supReason) && terminal.supReason !== null ? terminal.supReason : !isUnavailable(terminal.failure) && terminal.failure !== null ? terminal.failure.message ?? terminal.failure.name : null,
|
|
998
|
-
realness_gated: false
|
|
999
|
-
},
|
|
1000
|
-
cost: {
|
|
1001
|
-
...EMPTY_COST,
|
|
1002
|
-
usd: src.limits.spendUsd !== null ? null : typeof stateResult.spentUsd === "number" ? stateResult.spentUsd : tree.brain.usd,
|
|
1003
|
-
tokens_in: src.limits.managerTokens === null ? tree.brain.tokensIn : null,
|
|
1004
|
-
tokens_out: src.limits.managerTokens === null ? tree.brain.tokensOut : null,
|
|
1005
|
-
cache_read: src.limits.managerTokens === null && tree.brain.hasCache ? tree.brain.cacheRead : null,
|
|
1006
|
-
cache_write: src.limits.managerTokens === null && tree.brain.hasCache ? tree.brain.cacheWrite : null,
|
|
1007
|
-
wall_s: wallMs === null ? null : wallMs / 1e3
|
|
1008
|
-
},
|
|
1009
|
-
artifacts: {
|
|
1010
|
-
patch_path: typeof result?.patchPath === "string" ? result.patchPath : null,
|
|
1011
|
-
run_dir: src.supRunDir,
|
|
1012
|
-
transcript_ref: src.rootTranscriptRef ?? null
|
|
1013
|
-
},
|
|
1014
|
-
provenance: {
|
|
1015
|
-
captured_at: capturedAt,
|
|
1016
|
-
capture: "backfill",
|
|
1017
|
-
lossy_projection: true,
|
|
1018
|
-
...captures === void 0 ? {} : { workspace_captures: captures },
|
|
1019
|
-
gap: [src.rootTranscriptRef == null ? "supervision journal carries structure and spend, not the brain transcript" : "brain transcript retained by reference; messages not inlined into this row", captureGap].filter((reason) => reason !== null).join("; ")
|
|
1020
|
-
}
|
|
1017
|
+
return {
|
|
1018
|
+
src,
|
|
1019
|
+
tree,
|
|
1020
|
+
opts,
|
|
1021
|
+
gaps,
|
|
1022
|
+
state,
|
|
1023
|
+
result,
|
|
1024
|
+
judge,
|
|
1025
|
+
stateResult,
|
|
1026
|
+
terminal,
|
|
1027
|
+
rootId,
|
|
1028
|
+
capturedAt,
|
|
1029
|
+
base,
|
|
1030
|
+
noteCaptureGaps
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1033
|
+
/** The supervisor invocation row, or nothing when the journal never named a root. */
|
|
1034
|
+
function rootRolloutNode(ctx) {
|
|
1035
|
+
const { src, tree, opts, gaps, state, result, judge, stateResult, terminal, rootId, capturedAt, noteCaptureGaps, base } = ctx;
|
|
1036
|
+
if (rootId === null) {
|
|
1037
|
+
gaps.push({
|
|
1038
|
+
code: "root-spawn-unavailable",
|
|
1039
|
+
message: "no parentless spawned event in the journal"
|
|
1021
1040
|
});
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1041
|
+
return null;
|
|
1042
|
+
}
|
|
1043
|
+
const rootSpawn = tree.spawns.find((spawn) => spawn.valid && spawn.id === rootId);
|
|
1044
|
+
const judgeResolved = typeof judge?.resolved === "boolean" ? judge.resolved : null;
|
|
1045
|
+
const reward = (typeof judge?.score === "number" ? judge.score : null) ?? (judgeResolved === null ? null : judgeResolved ? 1 : 0);
|
|
1046
|
+
if (reward === null) gaps.push({
|
|
1047
|
+
code: "root-reward-unavailable",
|
|
1048
|
+
message: "no judge verdict for this run",
|
|
1049
|
+
nodeId: rootId
|
|
1025
1050
|
});
|
|
1026
|
-
const
|
|
1027
|
-
const
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1051
|
+
const wallMs = tree.startedAt !== null && tree.completedAt !== null && tree.completedAt >= tree.startedAt ? tree.completedAt - tree.startedAt : null;
|
|
1052
|
+
const captures = src.rootWorkspaceCaptures;
|
|
1053
|
+
const captureGap = noteCaptureGaps(`root ${JSON.stringify(rootId)}`, rootId, captures);
|
|
1054
|
+
return {
|
|
1055
|
+
...base,
|
|
1056
|
+
rollout_id: rootId,
|
|
1057
|
+
parent_rollout_id: null,
|
|
1058
|
+
role: rootSpawn?.role ?? "supervisor",
|
|
1059
|
+
policy: {
|
|
1060
|
+
harness: opts.supervisorHarness ?? null,
|
|
1061
|
+
harness_version: null,
|
|
1062
|
+
model: opts.supervisorModel ?? null,
|
|
1063
|
+
provider: null,
|
|
1064
|
+
profile_commit: null,
|
|
1065
|
+
agent_profile_cell_id: rootSpawn?.profileDigest ?? null,
|
|
1066
|
+
sampling: null
|
|
1067
|
+
},
|
|
1068
|
+
outcome: {
|
|
1069
|
+
...unscreenedRewardFields(reward),
|
|
1070
|
+
reward_source: src.judgeSource,
|
|
1071
|
+
verdict: judge ?? null,
|
|
1072
|
+
metrics: {
|
|
1073
|
+
arm: src.arm,
|
|
1074
|
+
sup_status: isUnavailable(terminal.supStatus) ? null : terminal.supStatus,
|
|
1075
|
+
sup_verdict: typeof state?.verdict === "string" ? state.verdict : null,
|
|
1076
|
+
delivered: typeof stateResult.delivered === "boolean" ? stateResult.delivered : null,
|
|
1077
|
+
verify_pass: typeof result?.verify_pass === "boolean" ? result.verify_pass : null,
|
|
1078
|
+
started_at: tree.startedAt,
|
|
1079
|
+
completed_at: tree.completedAt,
|
|
1080
|
+
workers_spawned: tree.workerSpawns.length,
|
|
1081
|
+
brain_metered_events: tree.brain.meteredCount,
|
|
1082
|
+
runtime: rootSpawn?.runtime ?? null,
|
|
1083
|
+
profile_digest: rootSpawn?.profileDigest ?? null
|
|
1084
|
+
},
|
|
1085
|
+
is_completed: terminal.completed === true,
|
|
1086
|
+
is_truncated: false,
|
|
1087
|
+
error: terminal.completed !== false ? null : !isUnavailable(terminal.supReason) && terminal.supReason !== null ? terminal.supReason : !isUnavailable(terminal.failure) && terminal.failure !== null ? terminal.failure.message ?? terminal.failure.name : null,
|
|
1088
|
+
realness_gated: false
|
|
1089
|
+
},
|
|
1090
|
+
cost: {
|
|
1091
|
+
...EMPTY_COST,
|
|
1092
|
+
usd: src.limits.spendUsd !== null ? null : typeof stateResult.spentUsd === "number" ? stateResult.spentUsd : tree.brain.usd,
|
|
1093
|
+
tokens_in: src.limits.managerTokens === null ? tree.brain.tokensIn : null,
|
|
1094
|
+
tokens_out: src.limits.managerTokens === null ? tree.brain.tokensOut : null,
|
|
1095
|
+
cache_read: src.limits.managerTokens === null && tree.brain.hasCache ? tree.brain.cacheRead : null,
|
|
1096
|
+
cache_write: src.limits.managerTokens === null && tree.brain.hasCache ? tree.brain.cacheWrite : null,
|
|
1097
|
+
wall_s: wallMs === null ? null : wallMs / 1e3
|
|
1098
|
+
},
|
|
1099
|
+
artifacts: {
|
|
1100
|
+
patch_path: typeof result?.patchPath === "string" ? result.patchPath : null,
|
|
1101
|
+
run_dir: src.supRunDir,
|
|
1102
|
+
transcript_ref: src.rootTranscriptRef ?? null
|
|
1103
|
+
},
|
|
1104
|
+
provenance: {
|
|
1105
|
+
captured_at: capturedAt,
|
|
1106
|
+
capture: "backfill",
|
|
1107
|
+
lossy_projection: true,
|
|
1108
|
+
...captures === void 0 ? {} : { workspace_captures: captures },
|
|
1109
|
+
gap: [src.rootTranscriptRef == null ? "supervision journal carries structure and spend, not the brain transcript" : "brain transcript retained by reference; messages not inlined into this row", captureGap].filter((reason) => reason !== null).join("; ")
|
|
1037
1110
|
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
/** The journal closes and the reader's worker sources, joined to spawns by stable id first and by label only as a fallback. */
|
|
1114
|
+
function workerLookups(ctx) {
|
|
1115
|
+
const { src, tree } = ctx;
|
|
1116
|
+
return {
|
|
1117
|
+
closeById: new Map(tree.closes.map((c) => [c.id, c])),
|
|
1118
|
+
sourceById: new Map((src.workers ?? []).filter(hasWorkerId).map((worker) => [worker.workerId, worker])),
|
|
1119
|
+
fallbackSourceByLabel: new Map((src.workers ?? []).filter((worker) => worker.workerId === void 0).map((worker) => [worker.label, worker]))
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
/** One worker row, or nothing when its spawn has no explicit role. */
|
|
1123
|
+
function workerRolloutNode(ctx, lookups, spawn) {
|
|
1124
|
+
const { src, tree, opts, gaps, capturedAt, noteCaptureGaps, base } = ctx;
|
|
1125
|
+
const { closeById, sourceById, fallbackSourceByLabel } = lookups;
|
|
1126
|
+
if (spawn.role === null) {
|
|
1127
|
+
gaps.push({
|
|
1128
|
+
code: "node-role-unavailable",
|
|
1129
|
+
message: `child ${JSON.stringify(spawn.label)} has no explicit invocation role`,
|
|
1048
1130
|
nodeId: spawn.id
|
|
1049
1131
|
});
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
profile_digest: spawn.profileDigest
|
|
1091
|
-
},
|
|
1092
|
-
is_completed: close?.kind === "settled" && close.status === "done",
|
|
1093
|
-
is_truncated: close?.kind === "cancelled",
|
|
1094
|
-
error: close?.kind === "cancelled" ? close.reason ?? "cancelled" : close?.status === "down" ? close.reason ?? "child down" : null,
|
|
1095
|
-
realness_gated: false
|
|
1096
|
-
},
|
|
1097
|
-
cost: {
|
|
1098
|
-
...EMPTY_COST,
|
|
1099
|
-
usd: src.limits.spendUsd !== null || !close?.hasSpend ? null : close.spend.usd,
|
|
1100
|
-
tokens_in: workerSource?.tokensIn ?? (close?.hasSpend ? close.spend.tokens.input : null),
|
|
1101
|
-
tokens_out: workerSource?.tokensOut ?? (close?.hasSpend ? close.spend.tokens.output : null),
|
|
1102
|
-
cache_read: workerSource?.cacheRead ?? (close?.hasSpend && close.spend.tokens.hasCache ? close.spend.tokens.cacheRead : null),
|
|
1103
|
-
cache_write: workerSource?.cacheWrite ?? (close?.hasSpend && close.spend.tokens.hasCache ? close.spend.tokens.cacheWrite : null),
|
|
1104
|
-
wall_s: wallMs === null ? null : wallMs / 1e3
|
|
1132
|
+
return null;
|
|
1133
|
+
}
|
|
1134
|
+
const close = closeById.get(spawn.id) ?? null;
|
|
1135
|
+
const workerSource = sourceById.get(spawn.id) ?? fallbackSourceByLabel.get(spawn.label) ?? null;
|
|
1136
|
+
const facts = tree.workerLogs.get(workerSource?.workerId ?? workerSource?.label ?? spawn.label) ?? null;
|
|
1137
|
+
const wallMs = facts?.started != null && facts.finishedAt != null ? facts.finishedAt - facts.started : null;
|
|
1138
|
+
const score = close?.score ?? facts?.score ?? null;
|
|
1139
|
+
const passed = close?.valid ?? facts?.passed ?? null;
|
|
1140
|
+
const reward = score ?? (passed === null ? null : passed ? 1 : 0);
|
|
1141
|
+
if (reward === null) gaps.push({
|
|
1142
|
+
code: "child-reward-unavailable",
|
|
1143
|
+
message: `child ${JSON.stringify(spawn.label)} has no verify verdict`,
|
|
1144
|
+
nodeId: spawn.id
|
|
1145
|
+
});
|
|
1146
|
+
const isSupervisor = spawn.role === "supervisor";
|
|
1147
|
+
const captures = workerSource?.workspaceCaptures;
|
|
1148
|
+
const captureGap = noteCaptureGaps(`child ${JSON.stringify(spawn.label)}`, spawn.id, captures);
|
|
1149
|
+
return {
|
|
1150
|
+
...base,
|
|
1151
|
+
rollout_id: spawn.id,
|
|
1152
|
+
parent_rollout_id: spawn.parent,
|
|
1153
|
+
role: spawn.role,
|
|
1154
|
+
policy: {
|
|
1155
|
+
harness: isSupervisor ? opts.supervisorHarness ?? null : opts.workerHarness ?? null,
|
|
1156
|
+
harness_version: null,
|
|
1157
|
+
model: isSupervisor ? opts.supervisorModel ?? null : opts.workerModel ?? null,
|
|
1158
|
+
provider: null,
|
|
1159
|
+
profile_commit: null,
|
|
1160
|
+
agent_profile_cell_id: spawn.profileDigest,
|
|
1161
|
+
sampling: null
|
|
1162
|
+
},
|
|
1163
|
+
outcome: {
|
|
1164
|
+
...unscreenedRewardFields(reward),
|
|
1165
|
+
reward_source: reward === null ? null : score === null ? "worker-self-verify" : "worker-verdict-score",
|
|
1166
|
+
verdict: close === null ? null : {
|
|
1167
|
+
kind: close.kind,
|
|
1168
|
+
status: close.status,
|
|
1169
|
+
verdict: close.rawVerdict,
|
|
1170
|
+
valid: close.valid,
|
|
1171
|
+
score: close.score
|
|
1105
1172
|
},
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1173
|
+
metrics: {
|
|
1174
|
+
label: spawn.label,
|
|
1175
|
+
spawned_at: spawn.at,
|
|
1176
|
+
settled_at: close?.at ?? null,
|
|
1177
|
+
started_at: facts?.started ?? null,
|
|
1178
|
+
finished_at: facts?.finishedAt ?? null,
|
|
1179
|
+
wall_ms: wallMs,
|
|
1180
|
+
patch_bytes: workerSource?.patchBytes ?? facts?.finishedPatchBytes ?? null,
|
|
1181
|
+
evidence_bytes: facts?.evidenceBytes ?? null,
|
|
1182
|
+
steers_queued: facts?.steersQueued ?? null,
|
|
1183
|
+
steers_delivered: facts?.steersDelivered ?? null,
|
|
1184
|
+
questions: facts?.questions ?? null,
|
|
1185
|
+
runtime: spawn.runtime,
|
|
1186
|
+
profile_digest: spawn.profileDigest
|
|
1110
1187
|
},
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1188
|
+
is_completed: close?.kind === "settled" && close.status === "done",
|
|
1189
|
+
is_truncated: close?.kind === "cancelled",
|
|
1190
|
+
error: close?.kind === "cancelled" ? close.reason ?? "cancelled" : close?.status === "down" ? close.reason ?? "child down" : null,
|
|
1191
|
+
realness_gated: false
|
|
1192
|
+
},
|
|
1193
|
+
cost: {
|
|
1194
|
+
...EMPTY_COST,
|
|
1195
|
+
usd: src.limits.spendUsd !== null || !close?.hasSpend ? null : close.spend.usd,
|
|
1196
|
+
tokens_in: workerSource?.tokensIn ?? (close?.hasSpend ? close.spend.tokens.input : null),
|
|
1197
|
+
tokens_out: workerSource?.tokensOut ?? (close?.hasSpend ? close.spend.tokens.output : null),
|
|
1198
|
+
cache_read: workerSource?.cacheRead ?? (close?.hasSpend && close.spend.tokens.hasCache ? close.spend.tokens.cacheRead : null),
|
|
1199
|
+
cache_write: workerSource?.cacheWrite ?? (close?.hasSpend && close.spend.tokens.hasCache ? close.spend.tokens.cacheWrite : null),
|
|
1200
|
+
wall_s: wallMs === null ? null : wallMs / 1e3
|
|
1201
|
+
},
|
|
1202
|
+
artifacts: {
|
|
1203
|
+
patch_path: workerSource?.patchPath ?? null,
|
|
1204
|
+
run_dir: src.supRunDir,
|
|
1205
|
+
transcript_ref: workerSource?.transcriptRef ?? null
|
|
1206
|
+
},
|
|
1207
|
+
provenance: {
|
|
1208
|
+
captured_at: capturedAt,
|
|
1209
|
+
capture: "backfill",
|
|
1210
|
+
lossy_projection: true,
|
|
1211
|
+
...captures === void 0 ? {} : { workspace_captures: captures },
|
|
1212
|
+
gap: [workerSource?.transcriptRef == null ? "no worker transcript was retained; messages unavailable" : "worker transcript retained by reference; messages not inlined into this row", captureGap].filter((reason) => reason !== null).join("; ")
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
/** Mint rollout rows from an already parsed source without reading its JSONL again. */
|
|
1217
|
+
function supervisorRunRolloutLinesFromFacts(src, tree, opts = {}) {
|
|
1218
|
+
const gaps = [];
|
|
1219
|
+
if (src.journal === null) {
|
|
1220
|
+
gaps.push({
|
|
1221
|
+
code: "journal-unavailable",
|
|
1222
|
+
message: `${src.supRunDir === null ? "no supervisor run dir" : "journal absent"}; no nodes recoverable`
|
|
1118
1223
|
});
|
|
1224
|
+
return {
|
|
1225
|
+
rootId: null,
|
|
1226
|
+
nodes: [],
|
|
1227
|
+
gaps
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
const malformedSourceRows = tree.journalInvalidRows + tree.spawns.filter((spawn) => !spawn.valid).length;
|
|
1231
|
+
if (malformedSourceRows > 0) gaps.push({
|
|
1232
|
+
code: "source-row-malformed",
|
|
1233
|
+
message: `${malformedSourceRows} of ${tree.journalRows} journal row(s) were unusable and excluded from the tree`,
|
|
1234
|
+
count: malformedSourceRows
|
|
1235
|
+
});
|
|
1236
|
+
const ctx = rolloutContext(src, tree, opts, gaps);
|
|
1237
|
+
const nodes = [];
|
|
1238
|
+
const root = rootRolloutNode(ctx);
|
|
1239
|
+
if (root) nodes.push(root);
|
|
1240
|
+
const lookups = workerLookups(ctx);
|
|
1241
|
+
for (const spawn of tree.workerSpawns) {
|
|
1242
|
+
const node = workerRolloutNode(ctx, lookups, spawn);
|
|
1243
|
+
if (node) nodes.push(node);
|
|
1119
1244
|
}
|
|
1120
1245
|
const invalid = nodes.filter((n) => !isRolloutLine(n));
|
|
1121
1246
|
if (invalid.length > 0) gaps.push({
|
|
@@ -1124,7 +1249,7 @@ function supervisorRunRolloutLinesFromFacts(src, tree, opts = {}) {
|
|
|
1124
1249
|
count: invalid.length
|
|
1125
1250
|
});
|
|
1126
1251
|
return {
|
|
1127
|
-
rootId,
|
|
1252
|
+
rootId: tree.rootId,
|
|
1128
1253
|
nodes,
|
|
1129
1254
|
gaps
|
|
1130
1255
|
};
|
|
@@ -1188,4 +1313,4 @@ function analyzeSupervisorRunIntegrity(input, options = {}) {
|
|
|
1188
1313
|
//#endregion
|
|
1189
1314
|
export { supervisorRunRolloutLines as n, SUPERVISOR_RUN_INTEGRITY_SCHEMA as r, analyzeSupervisorRunIntegrity as t };
|
|
1190
1315
|
|
|
1191
|
-
//# sourceMappingURL=integrity-
|
|
1316
|
+
//# sourceMappingURL=integrity-C8oUeB0g.js.map
|