@tangle-network/agent-eval 0.144.11 → 0.144.13
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 +11 -0
- package/dist/agent-profile-B9_GGsG8.d.ts +84 -0
- package/dist/agent-profile-B9_GGsG8.d.ts.map +1 -0
- package/dist/{agent-profile-cell-BOP-iA9Q.d.ts → agent-profile-cell-BkcRDikH.d.ts} +2 -2
- package/dist/{agent-profile-cell-BOP-iA9Q.d.ts.map → agent-profile-cell-BkcRDikH.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +134 -16
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +364 -10
- package/dist/analyst/index.js.map +1 -1
- package/dist/backend-integrity-CsVin_Wb.d.ts +280 -0
- package/dist/backend-integrity-CsVin_Wb.d.ts.map +1 -0
- package/dist/{baseline-C-GocmIW.js → baseline-BhPRQBVn.js} +3 -2
- package/dist/{baseline-C-GocmIW.js.map → baseline-BhPRQBVn.js.map} +1 -1
- package/dist/{benchmark-CWeqGl7x.js → benchmark-BhT16ep9.js} +2 -2
- package/dist/{benchmark-CWeqGl7x.js.map → benchmark-BhT16ep9.js.map} +1 -1
- package/dist/{agent-profile-DPi7IZg7.d.ts → benchmark-Ceoan7vk.d.ts} +4 -91
- package/dist/benchmark-Ceoan7vk.d.ts.map +1 -0
- package/dist/{benchmark-command-BteMFN62.js → benchmark-command-CY6cbhOB.js} +36 -79
- package/dist/benchmark-command-CY6cbhOB.js.map +1 -0
- package/dist/benchmarks/index.d.ts +244 -2
- package/dist/benchmarks/index.d.ts.map +1 -0
- package/dist/benchmarks/index.js +733 -1
- package/dist/benchmarks/index.js.map +1 -0
- package/dist/builder-eval/index.d.ts +23 -2
- package/dist/builder-eval/index.d.ts.map +1 -1
- package/dist/builder-eval/index.js +227 -3
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/campaign/index.d.ts +10 -8
- package/dist/campaign/index.js +9 -6
- package/dist/{campaign-C2TTzQII.js → campaign-BYjBAypg.js} +21 -634
- package/dist/campaign-BYjBAypg.js.map +1 -0
- package/dist/{canonical-D011XM8r.js → canonical-D-XsTQ6_.js} +2 -2
- package/dist/{canonical-D011XM8r.js.map → canonical-D-XsTQ6_.js.map} +1 -1
- package/dist/{index-CQTZ-4XN.d.ts → capture-fetch-DDvpjVRU.d.ts} +3 -3
- package/dist/capture-fetch-DDvpjVRU.d.ts.map +1 -0
- package/dist/{default-registry-BmktKy8r.js → chat-client-Bp4Ebuuc.js} +1276 -1276
- package/dist/chat-client-Bp4Ebuuc.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{client-C9gzZE59.d.ts → client-KUbGulm_.d.ts} +4 -4
- package/dist/{client-C9gzZE59.d.ts.map → client-KUbGulm_.d.ts.map} +1 -1
- package/dist/contract/index.d.ts +13 -390
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +18 -542
- package/dist/contract/index.js.map +1 -1
- package/dist/{cost-ledger-DMFxsLKr.js → cost-ledger-BSe92yAV.js} +3 -3
- package/dist/{cost-ledger-DMFxsLKr.js.map → cost-ledger-BSe92yAV.js.map} +1 -1
- package/dist/{cost-ledger-Bv_e8XHY.d.ts → cost-ledger-DbQdN3nO.d.ts} +2 -2
- package/dist/{cost-ledger-Bv_e8XHY.d.ts.map → cost-ledger-DbQdN3nO.d.ts.map} +1 -1
- package/dist/{counterfactual-CxmxAONP.d.ts → counterfactual--bpysZF0.d.ts} +2 -14
- package/dist/{counterfactual-CxmxAONP.d.ts.map → counterfactual--bpysZF0.d.ts.map} +1 -1
- package/dist/{counterfactual-CWPTrMH7.js → counterfactual-lDfCx0Uz.js} +3 -31
- package/dist/{counterfactual-CWPTrMH7.js.map → counterfactual-lDfCx0Uz.js.map} +1 -1
- package/dist/{dataset-C8xaLXdY.d.ts → dataset-CJjKqQfA.d.ts} +2 -8
- package/dist/dataset-CJjKqQfA.d.ts.map +1 -0
- package/dist/{default-registry-Bf8Woqmq.d.ts → default-registry-Di6HP6pG.d.ts} +7 -12
- package/dist/default-registry-Di6HP6pG.d.ts.map +1 -0
- package/dist/{analyze-runs-C30yljDJ.js → define-agent-eval-iqjT--ZZ.js} +542 -130
- package/dist/define-agent-eval-iqjT--ZZ.js.map +1 -0
- package/dist/define-agent-eval-sH24zBfM.d.ts +388 -0
- package/dist/define-agent-eval-sH24zBfM.d.ts.map +1 -0
- package/dist/descriptive-B5MwKfbf.js +144 -0
- package/dist/descriptive-B5MwKfbf.js.map +1 -0
- package/dist/{dspy-rlm-engine-DbTk4JdR.js → dspy-rlm-engine-B_qhSc21.js} +4 -4
- package/dist/{dspy-rlm-engine-DbTk4JdR.js.map → dspy-rlm-engine-B_qhSc21.js.map} +1 -1
- package/dist/effect-sizes-DiH8MGOH.js +82 -0
- package/dist/effect-sizes-DiH8MGOH.js.map +1 -0
- package/dist/{engine-3hL-XqwJ.d.ts → engine-otFpE2gF.d.ts} +10 -38
- package/dist/engine-otFpE2gF.d.ts.map +1 -0
- package/dist/{errors-CKPfb2aH.d.ts → errors-DEE6u6ot.d.ts} +2 -14
- package/dist/{errors-CKPfb2aH.d.ts.map → errors-DEE6u6ot.d.ts.map} +1 -1
- package/dist/{errors-D-LKuDhb.js → errors-Dngq5h35.js} +2 -8
- package/dist/{errors-D-LKuDhb.js.map → errors-Dngq5h35.js.map} +1 -1
- package/dist/{eval-campaign-B_7wcnav.js → eval-campaign-UB-usSQ2.js} +6 -6
- package/dist/{eval-campaign-B_7wcnav.js.map → eval-campaign-UB-usSQ2.js.map} +1 -1
- package/dist/{exact-types-DSFFpLLI.d.ts → exact-types-BH1twmAJ.d.ts} +2 -2
- package/dist/{exact-types-DSFFpLLI.d.ts.map → exact-types-BH1twmAJ.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +9 -6
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +11 -7
- package/dist/experiment/index.js.map +1 -1
- package/dist/experiment-tracker-C29gXM4B.js +269 -0
- package/dist/experiment-tracker-C29gXM4B.js.map +1 -0
- package/dist/{experiment-tracker-IMntXr6J.d.ts → experiment-tracker-DWHZBAYL.d.ts} +77 -121
- package/dist/experiment-tracker-DWHZBAYL.d.ts.map +1 -0
- package/dist/{external-optimizer-contracts-CZuJNcT5.d.ts → external-optimizer-contracts-lixrOZdX.d.ts} +3 -3
- package/dist/{external-optimizer-contracts-CZuJNcT5.d.ts.map → external-optimizer-contracts-lixrOZdX.d.ts.map} +1 -1
- package/dist/external-optimizer-process-BTiNB-RH.js +301 -0
- package/dist/external-optimizer-process-BTiNB-RH.js.map +1 -0
- package/dist/{single-run-lock-DFWHEB09.js → external-optimizer-subprocess-DrJ9hR8u.js} +144 -438
- package/dist/external-optimizer-subprocess-DrJ9hR8u.js.map +1 -0
- package/dist/extract-usage-BrQ8mCLX.js +155 -0
- package/dist/extract-usage-BrQ8mCLX.js.map +1 -0
- package/dist/{failure-cluster-CqcvCcdR.d.ts → failure-cluster-BLURuWG4.d.ts} +2 -3
- package/dist/failure-cluster-BLURuWG4.d.ts.map +1 -0
- package/dist/{feedback-trajectory-CacHpxsp.d.ts → feedback-trajectory-juOozjAc.d.ts} +5 -36
- package/dist/feedback-trajectory-juOozjAc.d.ts.map +1 -0
- package/dist/fuzz.d.ts +2 -2
- package/dist/fuzz.js +2 -2
- package/dist/hosted/index.d.ts +3 -3
- package/dist/{index-CvSN3IG1.d.ts → index-B8Ui1mr1.d.ts} +2 -2
- package/dist/{index-CvSN3IG1.d.ts.map → index-B8Ui1mr1.d.ts.map} +1 -1
- package/dist/{skill-usage-CO9OLRBx.d.ts → index-BWDrSVfw.d.ts} +11 -136
- package/dist/index-BWDrSVfw.d.ts.map +1 -0
- package/dist/index-Ba3YrbAL.d.ts +1 -0
- package/dist/{index-BnEuDAK2.d.ts → index-COQYtuRF.d.ts} +3 -3
- package/dist/{index-BnEuDAK2.d.ts.map → index-COQYtuRF.d.ts.map} +1 -1
- package/dist/{index-C3ssXVLv.d.ts → index-CvjYbU0D.d.ts} +2 -2
- package/dist/{index-C3ssXVLv.d.ts.map → index-CvjYbU0D.d.ts.map} +1 -1
- package/dist/{index-DPPGNJ_R.d.ts → index-DSmEylT9.d.ts} +17 -115
- package/dist/index-DSmEylT9.d.ts.map +1 -0
- package/dist/index.d.ts +2397 -5308
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5914 -10496
- package/dist/index.js.map +1 -1
- package/dist/{insight-report-CgX_s0Ez.d.ts → insight-report-CRi-Ufrj.d.ts} +4 -4
- package/dist/{insight-report-CgX_s0Ez.d.ts.map → insight-report-CRi-Ufrj.d.ts.map} +1 -1
- package/dist/{integrity-MLzHOfV9.js → integrity-Cy9WHAtb.js} +2 -2
- package/dist/{integrity-MLzHOfV9.js.map → integrity-Cy9WHAtb.js.map} +1 -1
- package/dist/{integrity-DY6tIbl0.js → integrity-DysDBWDu.js} +2 -2
- package/dist/{integrity-DY6tIbl0.js.map → integrity-DysDBWDu.js.map} +1 -1
- package/dist/{integrity-BuqEKu-x.d.ts → integrity-OrcI9Nau.d.ts} +3 -3
- package/dist/{integrity-BuqEKu-x.d.ts.map → integrity-OrcI9Nau.d.ts.map} +1 -1
- package/dist/internal-BDHPCnjk.js +230 -0
- package/dist/internal-BDHPCnjk.js.map +1 -0
- package/dist/judge-calibration-C5CbMYce.d.ts +117 -0
- package/dist/judge-calibration-C5CbMYce.d.ts.map +1 -0
- package/dist/judge-calibration-DZkWrm5H.js +317 -0
- package/dist/judge-calibration-DZkWrm5H.js.map +1 -0
- package/dist/{kind-factory-B8-r8-y8.js → kind-factory-CPmSd58s.js} +208 -208
- package/dist/{kind-factory-B8-r8-y8.js.map → kind-factory-CPmSd58s.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-DXZIqu17.js → ledger-core-BmZt19oQ.js} +110 -110
- package/dist/{ledger-core-DXZIqu17.js.map → ledger-core-BmZt19oQ.js.map} +1 -1
- package/dist/{llm-client-DzvMUsS_.js → llm-client-d0-2TT1g.js} +4 -64
- package/dist/{llm-client-DzvMUsS_.js.map → llm-client-d0-2TT1g.js.map} +1 -1
- package/dist/{skillopt-optimization-method-CQdVeM8k.js → llm-judge-dZ8P6nGI.js} +3349 -5401
- package/dist/llm-judge-dZ8P6nGI.js.map +1 -0
- package/dist/matrix/index.d.ts +2 -2
- package/dist/meta-eval/index.d.ts +3 -3
- package/dist/meta-eval/index.js +3 -3
- package/dist/{metrics-C9YY1OcL.js → metrics-Cl0L1KUy.js} +2 -108
- package/dist/{metrics-C9YY1OcL.js.map → metrics-Cl0L1KUy.js.map} +1 -1
- package/dist/{mint-B2O60ACG.js → mint-Dj9Ww_3I.js} +4 -4
- package/dist/{mint-B2O60ACG.js.map → mint-Dj9Ww_3I.js.map} +1 -1
- package/dist/{multi-layer-verifier-DnAqwl0h.d.ts → multi-layer-verifier-DIguZc8Z.d.ts} +3 -3
- package/dist/{multi-layer-verifier-DnAqwl0h.d.ts.map → multi-layer-verifier-DIguZc8Z.d.ts.map} +1 -1
- package/dist/multiplicity-DIWHvysC.d.ts +43 -0
- package/dist/multiplicity-DIWHvysC.d.ts.map +1 -0
- package/dist/multishot/index.d.ts +3 -3
- package/dist/multishot/index.js +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{opencode-sqlite-8r6WUfHc.js → opencode-sqlite-DJWAXLms.js} +2 -2
- package/dist/{opencode-sqlite-8r6WUfHc.js.map → opencode-sqlite-DJWAXLms.js.map} +1 -1
- package/dist/package-version-D7lQHt_-.js +34 -0
- package/dist/package-version-D7lQHt_-.js.map +1 -0
- package/dist/paired-arms-D-XRF_fy.js +1045 -0
- package/dist/paired-arms-D-XRF_fy.js.map +1 -0
- package/dist/paired-promotion-decision-CGzg0cI_.d.ts +251 -0
- package/dist/paired-promotion-decision-CGzg0cI_.d.ts.map +1 -0
- package/dist/paired-tests-BHIhYVdu.js +213 -0
- package/dist/paired-tests-BHIhYVdu.js.map +1 -0
- package/dist/pareto-BqNW3LJR.d.ts +117 -0
- package/dist/pareto-BqNW3LJR.d.ts.map +1 -0
- package/dist/pipelines/index.d.ts +3 -64
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js +4 -284
- package/dist/pipelines/index.js.map +1 -1
- package/dist/power-and-mde-CHIrXJll.js +195 -0
- package/dist/power-and-mde-CHIrXJll.js.map +1 -0
- package/dist/{promotion-policy-CrLrmys8.js → power-preflight-DEw-uC7q.js} +4 -184
- package/dist/power-preflight-DEw-uC7q.js.map +1 -0
- package/dist/pre-registration-CZwSFQS4.d.ts +577 -0
- package/dist/pre-registration-CZwSFQS4.d.ts.map +1 -0
- package/dist/{prime-protocol-BfSalTfR.js → prime-protocol-6tZTVsWm.js} +72 -21
- package/dist/prime-protocol-6tZTVsWm.js.map +1 -0
- package/dist/produced-state-DU79a81m.js +586 -0
- package/dist/produced-state-DU79a81m.js.map +1 -0
- package/dist/profile-cell.d.ts +1 -1
- package/dist/profile-cell.js +1 -1
- package/dist/promotion-policy-D0nPhkSy.d.ts +134 -0
- package/dist/promotion-policy-D0nPhkSy.d.ts.map +1 -0
- package/dist/promotion-policy-xzA40Evo.js +186 -0
- package/dist/promotion-policy-xzA40Evo.js.map +1 -0
- package/dist/{skillopt-optimization-method-USDKhxSA.d.ts → provenance-CCdxgLDT.d.ts} +57 -478
- package/dist/provenance-CCdxgLDT.d.ts.map +1 -0
- package/dist/registry-oJeeI4-a.d.ts +178 -0
- package/dist/registry-oJeeI4-a.d.ts.map +1 -0
- package/dist/{release-report-DA2BCu5a.d.ts → release-confidence-BFRE5WSp.d.ts} +180 -112
- package/dist/release-confidence-BFRE5WSp.d.ts.map +1 -0
- package/dist/{release-report-BUYmoKo2.js → release-confidence-CxDuiAev.js} +125 -217
- package/dist/release-confidence-CxDuiAev.js.map +1 -0
- package/dist/reporting.d.ts +6 -5
- package/dist/reporting.js +7 -5
- package/dist/{researcher-BchpD55R.d.ts → researcher-DaN4GST-.d.ts} +7 -40
- package/dist/{researcher-BchpD55R.d.ts.map → researcher-DaN4GST-.d.ts.map} +1 -1
- package/dist/{reward-hacking-BDToousL.js → reward-hacking-DNgjilrV.js} +3 -3
- package/dist/reward-hacking-DNgjilrV.js.map +1 -0
- package/dist/{reward-hacking-BI0OMAlo.d.ts → reward-hacking-DSSTuI9r.d.ts} +5 -5
- package/dist/{reward-hacking-BI0OMAlo.d.ts.map → reward-hacking-DSSTuI9r.d.ts.map} +1 -1
- package/dist/rl.d.ts +7 -7
- package/dist/rl.js +11 -10
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +2 -2
- package/dist/rollout/index.js +4 -4
- package/dist/{rollout-DRrksrcV.js → rollout-BWtw0I_6.js} +3 -3
- package/dist/{rollout-DRrksrcV.js.map → rollout-BWtw0I_6.js.map} +1 -1
- package/dist/{rubric-predictive-validity-DvkjPYCe.d.ts → rubric-predictive-validity-BgxtKe4G.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-DvkjPYCe.d.ts.map → rubric-predictive-validity-BgxtKe4G.d.ts.map} +1 -1
- package/dist/{rubric-predictive-validity-BRR632r1.js → rubric-predictive-validity-Cwwyd7ah.js} +2 -2
- package/dist/{rubric-predictive-validity-BRR632r1.js.map → rubric-predictive-validity-Cwwyd7ah.js.map} +1 -1
- package/dist/{run-record-BmSPWXJR.js → run-record-BvHPVS-i.js} +3 -3
- package/dist/{run-record-BmSPWXJR.js.map → run-record-BvHPVS-i.js.map} +1 -1
- package/dist/{run-record-CF4Dwpxr.d.ts → run-record-CKiihE6f.d.ts} +4 -4
- package/dist/{run-record-CF4Dwpxr.d.ts.map → run-record-CKiihE6f.d.ts.map} +1 -1
- package/dist/{proposal-findings-2GIUo1et.js → run-score-lDzV0X8j.js} +31 -31
- package/dist/run-score-lDzV0X8j.js.map +1 -0
- package/dist/sandbox-harness-BlSOu4LX.d.ts +70 -0
- package/dist/sandbox-harness-BlSOu4LX.d.ts.map +1 -0
- package/dist/{schema-Cef2cFmb2.d.ts → schema-Cef2cFmb.d.ts} +1 -1
- package/dist/schema-Cef2cFmb.d.ts.map +1 -0
- package/dist/semantic-concept-judge-BiJxScqe.js +406 -0
- package/dist/semantic-concept-judge-BiJxScqe.js.map +1 -0
- package/dist/{sequential-D-BLJBKU.js → sequential-C458DXNf.js} +4 -3
- package/dist/{sequential-D-BLJBKU.js.map → sequential-C458DXNf.js.map} +1 -1
- package/dist/sequential-eprocess-CbUt2htw.js +83 -0
- package/dist/sequential-eprocess-CbUt2htw.js.map +1 -0
- package/dist/series-convergence-D1cL1f-4.d.ts +129 -0
- package/dist/series-convergence-D1cL1f-4.d.ts.map +1 -0
- package/dist/{server-iu0ede49.js → server-ulsOdrTI.js} +5 -21
- package/dist/server-ulsOdrTI.js.map +1 -0
- package/dist/skillopt-optimization-method-C5cotF4E.d.ts +427 -0
- package/dist/skillopt-optimization-method-C5cotF4E.d.ts.map +1 -0
- package/dist/skillopt-optimization-method-jjdnc3YK.js +1999 -0
- package/dist/skillopt-optimization-method-jjdnc3YK.js.map +1 -0
- package/dist/{statistical-heldout-TQ-4CYiN.d.ts → statistical-heldout-DoFF5KJX.d.ts} +5 -278
- package/dist/statistical-heldout-DoFF5KJX.d.ts.map +1 -0
- package/dist/{store-otlp-Dw8PPIlL.js → store-otlp-CsptLYpN.js} +3 -3
- package/dist/{store-otlp-Dw8PPIlL.js.map → store-otlp-CsptLYpN.js.map} +1 -1
- package/dist/store-tool-spans-Cq9mFd-q.js +667 -0
- package/dist/store-tool-spans-Cq9mFd-q.js.map +1 -0
- package/dist/store-tool-spans-DbDLOBOb.d.ts +342 -0
- package/dist/store-tool-spans-DbDLOBOb.d.ts.map +1 -0
- package/dist/student-t-CvBq2mve.js +38 -0
- package/dist/student-t-CvBq2mve.js.map +1 -0
- package/dist/{summary-report-Lf-5I7xh.js → summary-report-Blysd6Z2.js} +6 -3
- package/dist/{summary-report-Lf-5I7xh.js.map → summary-report-Blysd6Z2.js.map} +1 -1
- package/dist/{summary-report-BNR7DWTj.d.ts → summary-report-CaL-Hnxt.d.ts} +5 -5
- package/dist/{summary-report-BNR7DWTj.d.ts.map → summary-report-CaL-Hnxt.d.ts.map} +1 -1
- package/dist/supervisor-run/index.d.ts +391 -3
- package/dist/supervisor-run/index.d.ts.map +1 -0
- package/dist/supervisor-run/index.js +1689 -2
- package/dist/{supervisor-run-D_sokXcO.js.map → supervisor-run/index.js.map} +1 -1
- package/dist/{extract-usage-CdZdoj1s.js → task-failure-attributes-CpQ4y5RD.js} +5 -157
- package/dist/task-failure-attributes-CpQ4y5RD.js.map +1 -0
- package/dist/{tool-groups-CZPGGlHf.d.ts → tool-groups-Cteb03Ps.d.ts} +3 -3
- package/dist/tool-groups-Cteb03Ps.d.ts.map +1 -0
- package/dist/tool-waste-BDdBZG1F.js +803 -0
- package/dist/tool-waste-BDdBZG1F.js.map +1 -0
- package/dist/tool-waste-DjRDEsuI.d.ts +128 -0
- package/dist/tool-waste-DjRDEsuI.d.ts.map +1 -0
- package/dist/trace-repair/index.d.ts +14 -5
- package/dist/trace-repair/index.d.ts.map +1 -1
- package/dist/trace-repair/index.js +35 -7
- package/dist/trace-repair/index.js.map +1 -1
- package/dist/traces.d.ts +406 -7
- package/dist/traces.d.ts.map +1 -0
- package/dist/traces.js +1011 -10
- package/dist/traces.js.map +1 -0
- package/dist/trajectory-replay/index.d.ts +16 -3
- package/dist/trajectory-replay/index.d.ts.map +1 -1
- package/dist/trajectory-replay/index.js +52 -5
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/types-BEPZc6eo.d.ts +93 -0
- package/dist/types-BEPZc6eo.d.ts.map +1 -0
- package/dist/{usage-receipt-t7vAzCRQ.js → types-BI4fT3HN.js} +67 -67
- package/dist/types-BI4fT3HN.js.map +1 -0
- package/dist/{types-BnjdJ70P.d.ts → types-BZ59Ahr8.d.ts} +5 -5
- package/dist/{types-BnjdJ70P.d.ts.map → types-BZ59Ahr8.d.ts.map} +1 -1
- package/dist/{types-D216SgwM.d.ts → types-Cx3YUh2r.d.ts} +4 -241
- package/dist/types-Cx3YUh2r.d.ts.map +1 -0
- package/dist/{types-BvDKaULh.d.ts → types-DLQx4mKU.d.ts} +4 -4
- package/dist/{types-BvDKaULh.d.ts.map → types-DLQx4mKU.d.ts.map} +1 -1
- package/dist/{types-D4mog56g.d.ts → types-yLK8gXE9.d.ts} +2 -2
- package/dist/{types-D4mog56g.d.ts.map → types-yLK8gXE9.d.ts.map} +1 -1
- package/dist/verdict-BndeTAh_.js +61 -0
- package/dist/verdict-BndeTAh_.js.map +1 -0
- package/dist/verdict-E4eRNf7-.d.ts +392 -0
- package/dist/verdict-E4eRNf7-.d.ts.map +1 -0
- package/dist/{verdict-cache-BCcOh0kF.js → verdict-cache-mZf5FEiY.js} +3 -55
- package/dist/{verdict-cache-BCcOh0kF.js.map → verdict-cache-mZf5FEiY.js.map} +1 -1
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +1 -1
- package/docs/charter.md +3 -3
- package/docs/control-runtime.md +3 -42
- package/docs/experiment.md +0 -1
- package/docs/feature-guide.md +2 -2
- package/docs/trace-repair-grader.md +1 -0
- package/docs/trajectory-replay.md +1 -0
- package/docs/verdicts.md +43 -0
- package/docs/verification-strategies.md +3 -2
- package/package.json +6 -11
- package/dist/agent-profile-DPi7IZg7.d.ts.map +0 -1
- package/dist/analyze-runs-C30yljDJ.js.map +0 -1
- package/dist/baseline-CavEbRyH.d.ts +0 -136
- package/dist/baseline-CavEbRyH.d.ts.map +0 -1
- package/dist/benchmark-command-BteMFN62.js.map +0 -1
- package/dist/benchmarks-Dzs8CKb1.js +0 -755
- package/dist/benchmarks-Dzs8CKb1.js.map +0 -1
- package/dist/campaign-C2TTzQII.js.map +0 -1
- package/dist/completion-verifier-DJA5BhPb.d.ts +0 -414
- package/dist/completion-verifier-DJA5BhPb.d.ts.map +0 -1
- package/dist/control.d.ts +0 -3
- package/dist/control.js +0 -2
- package/dist/dataset-C8xaLXdY.d.ts.map +0 -1
- package/dist/default-registry-Bf8Woqmq.d.ts.map +0 -1
- package/dist/default-registry-BmktKy8r.js.map +0 -1
- package/dist/engine-3hL-XqwJ.d.ts.map +0 -1
- package/dist/experiment-tracker-CnRICnMl.js +0 -500
- package/dist/experiment-tracker-CnRICnMl.js.map +0 -1
- package/dist/experiment-tracker-IMntXr6J.d.ts.map +0 -1
- package/dist/extract-usage-CdZdoj1s.js.map +0 -1
- package/dist/failure-cluster-CqcvCcdR.d.ts.map +0 -1
- package/dist/feedback-trajectory-CacHpxsp.d.ts.map +0 -1
- package/dist/index-BZ3-y4YL.d.ts +0 -391
- package/dist/index-BZ3-y4YL.d.ts.map +0 -1
- package/dist/index-CQTZ-4XN.d.ts.map +0 -1
- package/dist/index-DPPGNJ_R.d.ts.map +0 -1
- package/dist/index-YE4KdKbO2.d.ts +0 -335
- package/dist/index-YE4KdKbO2.d.ts.map +0 -1
- package/dist/paired-arms-iZ08VFMN.js +0 -260
- package/dist/paired-arms-iZ08VFMN.js.map +0 -1
- package/dist/paired-promotion-decision-B6zJ3gYM.d.ts +0 -114
- package/dist/paired-promotion-decision-B6zJ3gYM.d.ts.map +0 -1
- package/dist/prime-protocol-BfSalTfR.js.map +0 -1
- package/dist/promotion-policy-Ckjhzg_4.d.ts +0 -289
- package/dist/promotion-policy-Ckjhzg_4.d.ts.map +0 -1
- package/dist/promotion-policy-CrLrmys8.js.map +0 -1
- package/dist/proposal-findings-2GIUo1et.js.map +0 -1
- package/dist/propose-review-control-dSNPjFUH.js +0 -1458
- package/dist/propose-review-control-dSNPjFUH.js.map +0 -1
- package/dist/release-report-BUYmoKo2.js.map +0 -1
- package/dist/release-report-DA2BCu5a.d.ts.map +0 -1
- package/dist/replay-CohS93nE.js +0 -1859
- package/dist/replay-CohS93nE.js.map +0 -1
- package/dist/replay-DbhZ4Ked.d.ts +0 -834
- package/dist/replay-DbhZ4Ked.d.ts.map +0 -1
- package/dist/reward-hacking-BDToousL.js.map +0 -1
- package/dist/run-evidence-Dhi3C81V.d.ts +0 -225
- package/dist/run-evidence-Dhi3C81V.d.ts.map +0 -1
- package/dist/schema-Cef2cFmb2.d.ts.map +0 -1
- package/dist/semantic-concept-judge-D1z-KepS.js +0 -767
- package/dist/semantic-concept-judge-D1z-KepS.js.map +0 -1
- package/dist/series-convergence-ofsqPWhs.d.ts +0 -35
- package/dist/series-convergence-ofsqPWhs.d.ts.map +0 -1
- package/dist/server-iu0ede49.js.map +0 -1
- package/dist/single-run-lock-DFWHEB09.js.map +0 -1
- package/dist/skill-usage-CO9OLRBx.d.ts.map +0 -1
- package/dist/skillopt-optimization-method-CQdVeM8k.js.map +0 -1
- package/dist/skillopt-optimization-method-USDKhxSA.d.ts.map +0 -1
- package/dist/statistical-heldout-TQ-4CYiN.d.ts.map +0 -1
- package/dist/statistics-ByxzSiOM.js +0 -2212
- package/dist/statistics-ByxzSiOM.js.map +0 -1
- package/dist/statistics-D6Uebe_4.d.ts +0 -968
- package/dist/statistics-D6Uebe_4.d.ts.map +0 -1
- package/dist/supervisor-run-D_sokXcO.js +0 -1690
- package/dist/test-graded-scenario-D1TaI2va.d.ts +0 -141
- package/dist/test-graded-scenario-D1TaI2va.d.ts.map +0 -1
- package/dist/test-graded-scenario-JHcKQNpq.js +0 -318
- package/dist/test-graded-scenario-JHcKQNpq.js.map +0 -1
- package/dist/tool-groups-CZPGGlHf.d.ts.map +0 -1
- package/dist/tool-use-metrics-DEGMKycK.js +0 -370
- package/dist/tool-use-metrics-DEGMKycK.js.map +0 -1
- package/dist/types-D216SgwM.d.ts.map +0 -1
- package/dist/usage-receipt-t7vAzCRQ.js.map +0 -1
- package/dist/verdict-DExhxfgR.d.ts +0 -201
- package/dist/verdict-DExhxfgR.d.ts.map +0 -1
|
@@ -1,10 +1,212 @@
|
|
|
1
|
-
import { a as LimitExceededError,
|
|
2
|
-
import { i as CostLedger } from "./cost-ledger-
|
|
1
|
+
import { a as LimitExceededError, n as CaptureIntegrityError, o as NotFoundError, s as ValidationError, t as AgentEvalError } from "./errors-Dngq5h35.js";
|
|
2
|
+
import { i as CostLedger } from "./cost-ledger-BSe92yAV.js";
|
|
3
|
+
import { i as hashCanonical, r as canonicalString } from "./canonical-D-XsTQ6_.js";
|
|
4
|
+
import { a as settleUsageReceiptFromCostLedger, c as deepFreezeCanonicalJson, n as makeFinding, s as validateUsageSettlementTimeout } from "./types-BI4fT3HN.js";
|
|
3
5
|
import { INPUT_VALUE, LLM_MODEL_ATTR_KEYS, OUTPUT_VALUE, SPAN_KIND_ATTR_KEYS, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS } from "./trace-attributes.js";
|
|
4
|
-
import { a as deepFreezeCanonicalJson, i as validateUsageSettlementTimeout, n as settleUsageReceiptFromCostLedger, s as makeFinding } from "./usage-receipt-t7vAzCRQ.js";
|
|
5
|
-
import { i as hashCanonical, r as canonicalString } from "./canonical-D011XM8r.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { RE2JS } from "re2js";
|
|
8
|
+
//#region src/analyst/exact-types.ts
|
|
9
|
+
/** Canonical identity for any live component admitted to an exact run. */
|
|
10
|
+
function snapshotExactExecutionComponentIdentity(value, context) {
|
|
11
|
+
let detached;
|
|
12
|
+
try {
|
|
13
|
+
detached = JSON.parse(canonicalString(value));
|
|
14
|
+
} catch (cause) {
|
|
15
|
+
throw new TypeError(`${context} must have a canonical JSON representation`, { cause });
|
|
16
|
+
}
|
|
17
|
+
const parsed = componentIdentitySchema.safeParse(detached);
|
|
18
|
+
if (!parsed.success) throw new TypeError(`${context} requires non-empty id/version and object config`);
|
|
19
|
+
return deepFreezeCanonicalJson({
|
|
20
|
+
id: parsed.data.id,
|
|
21
|
+
version: parsed.data.version,
|
|
22
|
+
config_digest: hashCanonical(parsed.data.config)
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const nonEmptyString = z.string().min(1);
|
|
26
|
+
const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/);
|
|
27
|
+
const finiteNonnegative = z.number().finite().nonnegative();
|
|
28
|
+
const nonnegativeSafeInteger = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
29
|
+
const positiveTimeout = z.number().int().positive().max(2147483647);
|
|
30
|
+
const componentSnapshotSchema = z.strictObject({
|
|
31
|
+
id: nonEmptyString,
|
|
32
|
+
version: nonEmptyString,
|
|
33
|
+
config_digest: digest
|
|
34
|
+
});
|
|
35
|
+
const componentIdentitySchema = z.strictObject({
|
|
36
|
+
id: nonEmptyString,
|
|
37
|
+
version: nonEmptyString,
|
|
38
|
+
config: z.record(z.string(), z.unknown())
|
|
39
|
+
});
|
|
40
|
+
const deterministicCostSchema = z.strictObject({
|
|
41
|
+
kind: z.literal("deterministic"),
|
|
42
|
+
est_usd_per_run: finiteNonnegative.optional(),
|
|
43
|
+
models: z.array(nonEmptyString).optional()
|
|
44
|
+
});
|
|
45
|
+
const llmCostSchema = z.strictObject({
|
|
46
|
+
kind: z.literal("llm"),
|
|
47
|
+
est_usd_per_run: finiteNonnegative.optional(),
|
|
48
|
+
models: z.array(nonEmptyString).optional(),
|
|
49
|
+
settlement_timeout_ms: nonnegativeSafeInteger.optional()
|
|
50
|
+
});
|
|
51
|
+
const requirementsSchema = z.strictObject({
|
|
52
|
+
min_shots: nonnegativeSafeInteger.optional(),
|
|
53
|
+
capabilities: z.array(nonEmptyString).optional()
|
|
54
|
+
}).nullable();
|
|
55
|
+
const analystSnapshotSchema = z.strictObject({
|
|
56
|
+
id: nonEmptyString,
|
|
57
|
+
version: nonEmptyString,
|
|
58
|
+
input_kind: z.enum([
|
|
59
|
+
"trace-store",
|
|
60
|
+
"artifact-dir",
|
|
61
|
+
"run-record",
|
|
62
|
+
"judge-input",
|
|
63
|
+
"custom"
|
|
64
|
+
]),
|
|
65
|
+
cost: z.discriminatedUnion("kind", [deterministicCostSchema, llmCostSchema]),
|
|
66
|
+
requirements: requirementsSchema,
|
|
67
|
+
execution_config_digest: digest
|
|
68
|
+
});
|
|
69
|
+
const allocationsSchema = z.record(nonEmptyString, z.union([finiteNonnegative, z.null()]));
|
|
70
|
+
const weightsSchema = z.record(nonEmptyString, finiteNonnegative);
|
|
71
|
+
const budgetSnapshotSchema = z.discriminatedUnion("kind", [
|
|
72
|
+
z.strictObject({ kind: z.literal("none") }),
|
|
73
|
+
z.strictObject({
|
|
74
|
+
kind: z.literal("equal"),
|
|
75
|
+
total_usd: finiteNonnegative,
|
|
76
|
+
allocations_usd: allocationsSchema
|
|
77
|
+
}),
|
|
78
|
+
z.strictObject({
|
|
79
|
+
kind: z.literal("weighted"),
|
|
80
|
+
total_usd: finiteNonnegative,
|
|
81
|
+
weights: weightsSchema,
|
|
82
|
+
allocations_usd: allocationsSchema
|
|
83
|
+
})
|
|
84
|
+
]);
|
|
85
|
+
const priorFindingsSchema = z.discriminatedUnion("kind", [
|
|
86
|
+
z.strictObject({ kind: z.literal("none") }),
|
|
87
|
+
z.strictObject({
|
|
88
|
+
kind: z.literal("ordered"),
|
|
89
|
+
count: nonnegativeSafeInteger,
|
|
90
|
+
digest
|
|
91
|
+
}),
|
|
92
|
+
z.strictObject({
|
|
93
|
+
kind: z.literal("by_analyst"),
|
|
94
|
+
keys: z.array(nonEmptyString),
|
|
95
|
+
count: nonnegativeSafeInteger,
|
|
96
|
+
digest
|
|
97
|
+
})
|
|
98
|
+
]);
|
|
99
|
+
const exactRunPolicySchema = z.strictObject({
|
|
100
|
+
budget: budgetSnapshotSchema,
|
|
101
|
+
total_timeout_ms: positiveTimeout.nullable(),
|
|
102
|
+
signal_provided: z.boolean(),
|
|
103
|
+
cost_ledger: componentSnapshotSchema.nullable(),
|
|
104
|
+
cost_phase: nonEmptyString.nullable(),
|
|
105
|
+
tags: z.record(z.string(), z.string()).nullable(),
|
|
106
|
+
prior_findings: priorFindingsSchema,
|
|
107
|
+
chain_findings: z.boolean(),
|
|
108
|
+
missing_input_mode: z.enum(["skip", "abort"]),
|
|
109
|
+
registry_hooks: componentSnapshotSchema.nullable(),
|
|
110
|
+
registry_chat: componentSnapshotSchema.nullable()
|
|
111
|
+
});
|
|
112
|
+
const exactExecutionPlanSchema = z.strictObject({
|
|
113
|
+
schema_version: z.literal("1.0.0"),
|
|
114
|
+
analysts: z.array(analystSnapshotSchema).min(1),
|
|
115
|
+
policy: exactRunPolicySchema,
|
|
116
|
+
digest
|
|
117
|
+
}).superRefine((plan, context) => {
|
|
118
|
+
const issue = (path, message) => context.addIssue({
|
|
119
|
+
code: "custom",
|
|
120
|
+
path,
|
|
121
|
+
message
|
|
122
|
+
});
|
|
123
|
+
const analystIds = plan.analysts.map((analyst) => analyst.id);
|
|
124
|
+
if (new Set(analystIds).size !== analystIds.length) issue(["analysts"], "analyst ids must be unique");
|
|
125
|
+
if (plan.policy.cost_ledger === null && plan.policy.cost_phase !== null) issue(["policy", "cost_phase"], "cost phase requires a cost ledger");
|
|
126
|
+
if (plan.policy.prior_findings.kind === "by_analyst" && plan.policy.prior_findings.keys.some((key, index, keys) => index > 0 && key <= keys[index - 1])) issue([
|
|
127
|
+
"policy",
|
|
128
|
+
"prior_findings",
|
|
129
|
+
"keys"
|
|
130
|
+
], "keys must be sorted and unique");
|
|
131
|
+
const budget = plan.policy.budget;
|
|
132
|
+
if (budget.kind === "none") return;
|
|
133
|
+
const allocationIds = Object.keys(budget.allocations_usd).sort();
|
|
134
|
+
const selectedIds = [...analystIds].sort();
|
|
135
|
+
if (allocationIds.length !== selectedIds.length || allocationIds.some((id, index) => id !== selectedIds[index])) {
|
|
136
|
+
issue([
|
|
137
|
+
"policy",
|
|
138
|
+
"budget",
|
|
139
|
+
"allocations_usd"
|
|
140
|
+
], "allocations must name every analyst and no others");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const runnableIds = analystIds.filter((id) => budget.allocations_usd[id] !== null);
|
|
144
|
+
const epsilon = Math.max(1, budget.total_usd) * Number.EPSILON * 8;
|
|
145
|
+
if (runnableIds.length === 0) return;
|
|
146
|
+
if (budget.kind === "weighted") {
|
|
147
|
+
const weightIds = Object.keys(budget.weights).sort();
|
|
148
|
+
if (weightIds.length !== selectedIds.length || weightIds.some((id, index) => id !== selectedIds[index])) {
|
|
149
|
+
issue([
|
|
150
|
+
"policy",
|
|
151
|
+
"budget",
|
|
152
|
+
"weights"
|
|
153
|
+
], "weights must name every analyst and no others");
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const totalWeight = runnableIds.reduce((sum, id) => sum + (budget.weights[id] ?? 0), 0);
|
|
157
|
+
if (totalWeight === 0) {
|
|
158
|
+
issue([
|
|
159
|
+
"policy",
|
|
160
|
+
"budget",
|
|
161
|
+
"weights"
|
|
162
|
+
], "runnable analysts must have positive total weight");
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
for (const id of runnableIds) {
|
|
166
|
+
const expected = budget.total_usd * (budget.weights[id] ?? 0) / totalWeight;
|
|
167
|
+
if (Math.abs((budget.allocations_usd[id] ?? 0) - expected) > epsilon) issue([
|
|
168
|
+
"policy",
|
|
169
|
+
"budget",
|
|
170
|
+
"allocations_usd",
|
|
171
|
+
id
|
|
172
|
+
], "allocation does not match the weighted policy");
|
|
173
|
+
}
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const expected = budget.total_usd / runnableIds.length;
|
|
177
|
+
for (const id of runnableIds) if (Math.abs((budget.allocations_usd[id] ?? 0) - expected) > epsilon) issue([
|
|
178
|
+
"policy",
|
|
179
|
+
"budget",
|
|
180
|
+
"allocations_usd",
|
|
181
|
+
id
|
|
182
|
+
], "allocation does not match the equal policy");
|
|
183
|
+
});
|
|
184
|
+
/**
|
|
185
|
+
* Canonicalize and validate the one exact-plan representation shared by execution and archival.
|
|
186
|
+
* Unknown fields fail at every level; the returned graph is detached and deeply frozen.
|
|
187
|
+
*/
|
|
188
|
+
function snapshotExactExecutionPlan(value, context = "exact analyst execution plan") {
|
|
189
|
+
let detached;
|
|
190
|
+
try {
|
|
191
|
+
detached = JSON.parse(canonicalString(value));
|
|
192
|
+
} catch (cause) {
|
|
193
|
+
throw new TypeError(`${context} must have a canonical JSON representation`, { cause });
|
|
194
|
+
}
|
|
195
|
+
const parsed = exactExecutionPlanSchema.safeParse(detached);
|
|
196
|
+
if (!parsed.success) {
|
|
197
|
+
const issue = parsed.error.issues[0];
|
|
198
|
+
const path = issue?.path.length ? ` ${issue.path.join(".")}` : "";
|
|
199
|
+
throw new TypeError(`${context}${path}: ${issue?.message ?? "is invalid"}`);
|
|
200
|
+
}
|
|
201
|
+
const expectedDigest = hashCanonical({
|
|
202
|
+
schema_version: parsed.data.schema_version,
|
|
203
|
+
analysts: parsed.data.analysts,
|
|
204
|
+
policy: parsed.data.policy
|
|
205
|
+
});
|
|
206
|
+
if (parsed.data.digest !== expectedDigest) throw new TypeError(`${context} digest does not match its content`);
|
|
207
|
+
return deepFreezeCanonicalJson(parsed.data);
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
8
210
|
//#region src/trace/otlp-attributes.ts
|
|
9
211
|
/** Canonical OpenInference-over-OTLP attribute vocabulary used at the trace boundary. */
|
|
10
212
|
const TOOL_SPAN_ATTRIBUTE_KEYS = [
|
|
@@ -247,208 +449,6 @@ function resolveTraceAnalystLimits(limits) {
|
|
|
247
449
|
return resolved;
|
|
248
450
|
}
|
|
249
451
|
//#endregion
|
|
250
|
-
//#region src/analyst/exact-types.ts
|
|
251
|
-
/** Canonical identity for any live component admitted to an exact run. */
|
|
252
|
-
function snapshotExactExecutionComponentIdentity(value, context) {
|
|
253
|
-
let detached;
|
|
254
|
-
try {
|
|
255
|
-
detached = JSON.parse(canonicalString(value));
|
|
256
|
-
} catch (cause) {
|
|
257
|
-
throw new TypeError(`${context} must have a canonical JSON representation`, { cause });
|
|
258
|
-
}
|
|
259
|
-
const parsed = componentIdentitySchema.safeParse(detached);
|
|
260
|
-
if (!parsed.success) throw new TypeError(`${context} requires non-empty id/version and object config`);
|
|
261
|
-
return deepFreezeCanonicalJson({
|
|
262
|
-
id: parsed.data.id,
|
|
263
|
-
version: parsed.data.version,
|
|
264
|
-
config_digest: hashCanonical(parsed.data.config)
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
const nonEmptyString = z.string().min(1);
|
|
268
|
-
const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/);
|
|
269
|
-
const finiteNonnegative = z.number().finite().nonnegative();
|
|
270
|
-
const nonnegativeSafeInteger = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
271
|
-
const positiveTimeout = z.number().int().positive().max(2147483647);
|
|
272
|
-
const componentSnapshotSchema = z.strictObject({
|
|
273
|
-
id: nonEmptyString,
|
|
274
|
-
version: nonEmptyString,
|
|
275
|
-
config_digest: digest
|
|
276
|
-
});
|
|
277
|
-
const componentIdentitySchema = z.strictObject({
|
|
278
|
-
id: nonEmptyString,
|
|
279
|
-
version: nonEmptyString,
|
|
280
|
-
config: z.record(z.string(), z.unknown())
|
|
281
|
-
});
|
|
282
|
-
const deterministicCostSchema = z.strictObject({
|
|
283
|
-
kind: z.literal("deterministic"),
|
|
284
|
-
est_usd_per_run: finiteNonnegative.optional(),
|
|
285
|
-
models: z.array(nonEmptyString).optional()
|
|
286
|
-
});
|
|
287
|
-
const llmCostSchema = z.strictObject({
|
|
288
|
-
kind: z.literal("llm"),
|
|
289
|
-
est_usd_per_run: finiteNonnegative.optional(),
|
|
290
|
-
models: z.array(nonEmptyString).optional(),
|
|
291
|
-
settlement_timeout_ms: nonnegativeSafeInteger.optional()
|
|
292
|
-
});
|
|
293
|
-
const requirementsSchema = z.strictObject({
|
|
294
|
-
min_shots: nonnegativeSafeInteger.optional(),
|
|
295
|
-
capabilities: z.array(nonEmptyString).optional()
|
|
296
|
-
}).nullable();
|
|
297
|
-
const analystSnapshotSchema = z.strictObject({
|
|
298
|
-
id: nonEmptyString,
|
|
299
|
-
version: nonEmptyString,
|
|
300
|
-
input_kind: z.enum([
|
|
301
|
-
"trace-store",
|
|
302
|
-
"artifact-dir",
|
|
303
|
-
"run-record",
|
|
304
|
-
"judge-input",
|
|
305
|
-
"custom"
|
|
306
|
-
]),
|
|
307
|
-
cost: z.discriminatedUnion("kind", [deterministicCostSchema, llmCostSchema]),
|
|
308
|
-
requirements: requirementsSchema,
|
|
309
|
-
execution_config_digest: digest
|
|
310
|
-
});
|
|
311
|
-
const allocationsSchema = z.record(nonEmptyString, z.union([finiteNonnegative, z.null()]));
|
|
312
|
-
const weightsSchema = z.record(nonEmptyString, finiteNonnegative);
|
|
313
|
-
const budgetSnapshotSchema = z.discriminatedUnion("kind", [
|
|
314
|
-
z.strictObject({ kind: z.literal("none") }),
|
|
315
|
-
z.strictObject({
|
|
316
|
-
kind: z.literal("equal"),
|
|
317
|
-
total_usd: finiteNonnegative,
|
|
318
|
-
allocations_usd: allocationsSchema
|
|
319
|
-
}),
|
|
320
|
-
z.strictObject({
|
|
321
|
-
kind: z.literal("weighted"),
|
|
322
|
-
total_usd: finiteNonnegative,
|
|
323
|
-
weights: weightsSchema,
|
|
324
|
-
allocations_usd: allocationsSchema
|
|
325
|
-
})
|
|
326
|
-
]);
|
|
327
|
-
const priorFindingsSchema = z.discriminatedUnion("kind", [
|
|
328
|
-
z.strictObject({ kind: z.literal("none") }),
|
|
329
|
-
z.strictObject({
|
|
330
|
-
kind: z.literal("ordered"),
|
|
331
|
-
count: nonnegativeSafeInteger,
|
|
332
|
-
digest
|
|
333
|
-
}),
|
|
334
|
-
z.strictObject({
|
|
335
|
-
kind: z.literal("by_analyst"),
|
|
336
|
-
keys: z.array(nonEmptyString),
|
|
337
|
-
count: nonnegativeSafeInteger,
|
|
338
|
-
digest
|
|
339
|
-
})
|
|
340
|
-
]);
|
|
341
|
-
const exactRunPolicySchema = z.strictObject({
|
|
342
|
-
budget: budgetSnapshotSchema,
|
|
343
|
-
total_timeout_ms: positiveTimeout.nullable(),
|
|
344
|
-
signal_provided: z.boolean(),
|
|
345
|
-
cost_ledger: componentSnapshotSchema.nullable(),
|
|
346
|
-
cost_phase: nonEmptyString.nullable(),
|
|
347
|
-
tags: z.record(z.string(), z.string()).nullable(),
|
|
348
|
-
prior_findings: priorFindingsSchema,
|
|
349
|
-
chain_findings: z.boolean(),
|
|
350
|
-
missing_input_mode: z.enum(["skip", "abort"]),
|
|
351
|
-
registry_hooks: componentSnapshotSchema.nullable(),
|
|
352
|
-
registry_chat: componentSnapshotSchema.nullable()
|
|
353
|
-
});
|
|
354
|
-
const exactExecutionPlanSchema = z.strictObject({
|
|
355
|
-
schema_version: z.literal("1.0.0"),
|
|
356
|
-
analysts: z.array(analystSnapshotSchema).min(1),
|
|
357
|
-
policy: exactRunPolicySchema,
|
|
358
|
-
digest
|
|
359
|
-
}).superRefine((plan, context) => {
|
|
360
|
-
const issue = (path, message) => context.addIssue({
|
|
361
|
-
code: "custom",
|
|
362
|
-
path,
|
|
363
|
-
message
|
|
364
|
-
});
|
|
365
|
-
const analystIds = plan.analysts.map((analyst) => analyst.id);
|
|
366
|
-
if (new Set(analystIds).size !== analystIds.length) issue(["analysts"], "analyst ids must be unique");
|
|
367
|
-
if (plan.policy.cost_ledger === null && plan.policy.cost_phase !== null) issue(["policy", "cost_phase"], "cost phase requires a cost ledger");
|
|
368
|
-
if (plan.policy.prior_findings.kind === "by_analyst" && plan.policy.prior_findings.keys.some((key, index, keys) => index > 0 && key <= keys[index - 1])) issue([
|
|
369
|
-
"policy",
|
|
370
|
-
"prior_findings",
|
|
371
|
-
"keys"
|
|
372
|
-
], "keys must be sorted and unique");
|
|
373
|
-
const budget = plan.policy.budget;
|
|
374
|
-
if (budget.kind === "none") return;
|
|
375
|
-
const allocationIds = Object.keys(budget.allocations_usd).sort();
|
|
376
|
-
const selectedIds = [...analystIds].sort();
|
|
377
|
-
if (allocationIds.length !== selectedIds.length || allocationIds.some((id, index) => id !== selectedIds[index])) {
|
|
378
|
-
issue([
|
|
379
|
-
"policy",
|
|
380
|
-
"budget",
|
|
381
|
-
"allocations_usd"
|
|
382
|
-
], "allocations must name every analyst and no others");
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
const runnableIds = analystIds.filter((id) => budget.allocations_usd[id] !== null);
|
|
386
|
-
const epsilon = Math.max(1, budget.total_usd) * Number.EPSILON * 8;
|
|
387
|
-
if (runnableIds.length === 0) return;
|
|
388
|
-
if (budget.kind === "weighted") {
|
|
389
|
-
const weightIds = Object.keys(budget.weights).sort();
|
|
390
|
-
if (weightIds.length !== selectedIds.length || weightIds.some((id, index) => id !== selectedIds[index])) {
|
|
391
|
-
issue([
|
|
392
|
-
"policy",
|
|
393
|
-
"budget",
|
|
394
|
-
"weights"
|
|
395
|
-
], "weights must name every analyst and no others");
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
const totalWeight = runnableIds.reduce((sum, id) => sum + (budget.weights[id] ?? 0), 0);
|
|
399
|
-
if (totalWeight === 0) {
|
|
400
|
-
issue([
|
|
401
|
-
"policy",
|
|
402
|
-
"budget",
|
|
403
|
-
"weights"
|
|
404
|
-
], "runnable analysts must have positive total weight");
|
|
405
|
-
return;
|
|
406
|
-
}
|
|
407
|
-
for (const id of runnableIds) {
|
|
408
|
-
const expected = budget.total_usd * (budget.weights[id] ?? 0) / totalWeight;
|
|
409
|
-
if (Math.abs((budget.allocations_usd[id] ?? 0) - expected) > epsilon) issue([
|
|
410
|
-
"policy",
|
|
411
|
-
"budget",
|
|
412
|
-
"allocations_usd",
|
|
413
|
-
id
|
|
414
|
-
], "allocation does not match the weighted policy");
|
|
415
|
-
}
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
const expected = budget.total_usd / runnableIds.length;
|
|
419
|
-
for (const id of runnableIds) if (Math.abs((budget.allocations_usd[id] ?? 0) - expected) > epsilon) issue([
|
|
420
|
-
"policy",
|
|
421
|
-
"budget",
|
|
422
|
-
"allocations_usd",
|
|
423
|
-
id
|
|
424
|
-
], "allocation does not match the equal policy");
|
|
425
|
-
});
|
|
426
|
-
/**
|
|
427
|
-
* Canonicalize and validate the one exact-plan representation shared by execution and archival.
|
|
428
|
-
* Unknown fields fail at every level; the returned graph is detached and deeply frozen.
|
|
429
|
-
*/
|
|
430
|
-
function snapshotExactExecutionPlan(value, context = "exact analyst execution plan") {
|
|
431
|
-
let detached;
|
|
432
|
-
try {
|
|
433
|
-
detached = JSON.parse(canonicalString(value));
|
|
434
|
-
} catch (cause) {
|
|
435
|
-
throw new TypeError(`${context} must have a canonical JSON representation`, { cause });
|
|
436
|
-
}
|
|
437
|
-
const parsed = exactExecutionPlanSchema.safeParse(detached);
|
|
438
|
-
if (!parsed.success) {
|
|
439
|
-
const issue = parsed.error.issues[0];
|
|
440
|
-
const path = issue?.path.length ? ` ${issue.path.join(".")}` : "";
|
|
441
|
-
throw new TypeError(`${context}${path}: ${issue?.message ?? "is invalid"}`);
|
|
442
|
-
}
|
|
443
|
-
const expectedDigest = hashCanonical({
|
|
444
|
-
schema_version: parsed.data.schema_version,
|
|
445
|
-
analysts: parsed.data.analysts,
|
|
446
|
-
policy: parsed.data.policy
|
|
447
|
-
});
|
|
448
|
-
if (parsed.data.digest !== expectedDigest) throw new TypeError(`${context} digest does not match its content`);
|
|
449
|
-
return deepFreezeCanonicalJson(parsed.data);
|
|
450
|
-
}
|
|
451
|
-
//#endregion
|
|
452
452
|
//#region src/analyst/finding-subject.ts
|
|
453
453
|
/**
|
|
454
454
|
* Typed `FindingSubject` — the canonical grammar every analyst kind emits.
|
|
@@ -2125,6 +2125,6 @@ function truncateForContext(value, max) {
|
|
|
2125
2125
|
return `${value.slice(0, max - 3).trimEnd()}...`;
|
|
2126
2126
|
}
|
|
2127
2127
|
//#endregion
|
|
2128
|
-
export {
|
|
2128
|
+
export { classifyOtlpSpanRole as $, coerceJson as A, renderFindingSubject as B, TraceNotFoundError as C, RawAnalystFindingSchema as D, RawAnalystEvidenceSchema as E, FINDING_SUBJECT_SYNTAX as F, extractOtlpAttributes as G, resolveTraceAnalystLimits as H, FindingSubjectStringSchema as I, projectOtlpFlatLine as J, firstStringAttr as K, KIND_EXPECTED_SUBJECTS as L, stripCodeFences as M, FINDING_SUBJECT_GRAMMAR_PROMPT as N, evidenceRefsFromRawFinding as O, FINDING_SUBJECT_KINDS as P, applyToolSpanOtlpAttributes as Q, findingSubjectGrammarPromptFor as R, TraceFileTooLargeError as S, RAW_FINDING_SCHEMA_PROMPT as T, asString as U, DEFAULT_TRACE_ANALYST_LIMITS as V, compareSpanTime as W, spanEpochMillis as X, readOtlpStatus as Y, stringField as Z, TraceAnalysisLimitError as _, buildTraceToolsForGroup as a, TraceFileMalformedError as b, traceAnalystFunctionGroup as c, truncateForBudget as d, isOtlpModelCall as et, validateInteger as f, SpanNotFoundError as g, TRACE_ANALYSIS_LIMITS as h, runTraceAnalyst as i, coerceToFindingRows as j, parseRawFinding as k, createBoundedTraceAnalysisStore as l, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX as m, renderPriorFindings as n, snapshotExactExecutionComponentIdentity as nt, TRACE_ANALYST_TOOL_NAMESPACE as o, DEFAULT_TRACE_ANALYST_BUDGETS as p, inferOtlpKind as q, renderUpstreamFindings as r, snapshotExactExecutionPlan as rt, buildTraceAnalysisToolDescriptors as s, createTraceAnalyst as t, traceSpanKindToOpenInferenceKind as tt, compileSearchRegex as u, TraceAnalysisStoreContractError as v, ANALYST_SEVERITIES as w, TraceFileMissingError as x, TraceAnalysisValidationError as y, parseFindingSubject as z };
|
|
2129
2129
|
|
|
2130
|
-
//# sourceMappingURL=kind-factory-
|
|
2130
|
+
//# sourceMappingURL=kind-factory-CPmSd58s.js.map
|