@tangle-network/agent-eval 0.128.2 → 0.130.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 +279 -0
- package/README.md +19 -0
- package/dist/active-curriculum-C4mk67HP.js +214 -0
- package/dist/active-curriculum-C4mk67HP.js.map +1 -0
- package/dist/adversarial-smnADNFS.d.ts +21 -0
- package/dist/adversarial-smnADNFS.d.ts.map +1 -0
- package/dist/analyst/index.d.ts +83 -2932
- package/dist/analyst/index.d.ts.map +1 -0
- package/dist/analyst/index.js +319 -364
- package/dist/analyst/index.js.map +1 -1
- package/dist/analyst-BkTS3C58.d.ts +89 -0
- package/dist/analyst-BkTS3C58.d.ts.map +1 -0
- package/dist/analyst-LsnNpSkm.js +152 -0
- package/dist/analyst-LsnNpSkm.js.map +1 -0
- package/dist/analyze-runs-C1CavBMk.js +1067 -0
- package/dist/analyze-runs-C1CavBMk.js.map +1 -0
- package/dist/analyze-runs-FsgYCinh.d.ts +72 -0
- package/dist/analyze-runs-FsgYCinh.d.ts.map +1 -0
- package/dist/attribute-vocabulary-DLJ6303h.d.ts +54 -0
- package/dist/attribute-vocabulary-DLJ6303h.d.ts.map +1 -0
- package/dist/authenticity/index.d.ts +81 -79
- package/dist/authenticity/index.d.ts.map +1 -0
- package/dist/authenticity/index.js +209 -193
- package/dist/authenticity/index.js.map +1 -1
- package/dist/baseline-HsBvw_dk.js +550 -0
- package/dist/baseline-HsBvw_dk.js.map +1 -0
- package/dist/baseline-hG3K85h4.d.ts +125 -0
- package/dist/baseline-hG3K85h4.d.ts.map +1 -0
- package/dist/belief-state/index.d.ts +448 -1205
- package/dist/belief-state/index.d.ts.map +1 -0
- package/dist/belief-state/index.js +1617 -1710
- package/dist/belief-state/index.js.map +1 -1
- package/dist/benchmarks/index.d.ts +2 -894
- package/dist/benchmarks/index.js +2 -59
- package/dist/benchmarks-DviOvUNr.js +754 -0
- package/dist/benchmarks-DviOvUNr.js.map +1 -0
- package/dist/builder-eval/index.d.ts +150 -662
- package/dist/builder-eval/index.d.ts.map +1 -0
- package/dist/builder-eval/index.js +356 -345
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/calibration-CNWWA6K8.js +94 -0
- package/dist/calibration-CNWWA6K8.js.map +1 -0
- package/dist/campaign/index.d.ts +5 -6390
- package/dist/campaign/index.js +3 -212
- package/dist/campaign-CBKZvQ1H.js +3885 -0
- package/dist/campaign-CBKZvQ1H.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +164 -174
- package/dist/cli.js.map +1 -1
- package/dist/client-C97NMzqi.d.ts +581 -0
- package/dist/client-C97NMzqi.d.ts.map +1 -0
- package/dist/client-CYzbdJOZ.js +637 -0
- package/dist/client-CYzbdJOZ.js.map +1 -0
- package/dist/code-agent-session-BjkMTQ7H.js +1390 -0
- package/dist/code-agent-session-BjkMTQ7H.js.map +1 -0
- package/dist/code-agent-session-DqqgOJaz.d.ts +143 -0
- package/dist/code-agent-session-DqqgOJaz.d.ts.map +1 -0
- package/dist/concurrency-DIxRZF_J.js +85 -0
- package/dist/concurrency-DIxRZF_J.js.map +1 -0
- package/dist/contract/index.d.ts +645 -5605
- package/dist/contract/index.d.ts.map +1 -0
- package/dist/contract/index.js +1730 -1937
- package/dist/contract/index.js.map +1 -1
- package/dist/control.d.ts +3 -1030
- package/dist/control.js +2 -32
- package/dist/cost-ledger-DIgQUFZZ.js +801 -0
- package/dist/cost-ledger-DIgQUFZZ.js.map +1 -0
- package/dist/cost-ledger-Dye6jCgg.d.ts +236 -0
- package/dist/cost-ledger-Dye6jCgg.d.ts.map +1 -0
- package/dist/dataset-BvtnC8Dc.d.ts +115 -0
- package/dist/dataset-BvtnC8Dc.d.ts.map +1 -0
- package/dist/default-registry-C-vFCSEc.js +2579 -0
- package/dist/default-registry-C-vFCSEc.js.map +1 -0
- package/dist/default-registry-CNPo-Vsb.d.ts +540 -0
- package/dist/default-registry-CNPo-Vsb.d.ts.map +1 -0
- package/dist/emitter-CPBAhxum.js +266 -0
- package/dist/emitter-CPBAhxum.js.map +1 -0
- package/dist/emitter-DGQGoLyj.d.ts +113 -0
- package/dist/emitter-DGQGoLyj.d.ts.map +1 -0
- package/dist/errors-8YnH8WlF.js +64 -0
- package/dist/errors-8YnH8WlF.js.map +1 -0
- package/dist/errors-CEk209JS.d.ts +76 -0
- package/dist/errors-CEk209JS.d.ts.map +1 -0
- package/dist/eval-campaign-DEm6c8ru.js +349 -0
- package/dist/eval-campaign-DEm6c8ru.js.map +1 -0
- package/dist/execution-tracks-CpgFPpS5.js +93 -0
- package/dist/execution-tracks-CpgFPpS5.js.map +1 -0
- package/dist/exporters-q9iL-2Jf.js +148 -0
- package/dist/exporters-q9iL-2Jf.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 +59 -0
- package/dist/failure-cluster-CqcvCcdR.d.ts.map +1 -0
- package/dist/feedback-trajectory-CVaeREXV.d.ts +340 -0
- package/dist/feedback-trajectory-CVaeREXV.d.ts.map +1 -0
- package/dist/fuzz.d.ts +320 -646
- package/dist/fuzz.d.ts.map +1 -0
- package/dist/fuzz.js +670 -617
- package/dist/fuzz.js.map +1 -1
- package/dist/hf-dataset-DBJXXoY1.js +763 -0
- package/dist/hf-dataset-DBJXXoY1.js.map +1 -0
- package/dist/hosted/index.d.ts +11 -831
- package/dist/hosted/index.d.ts.map +1 -0
- package/dist/hosted/index.js +2 -37
- package/dist/index-2JJSA6-r2.d.ts +926 -0
- package/dist/index-2JJSA6-r2.d.ts.map +1 -0
- package/dist/index-6N0aYmpW.d.ts +217 -0
- package/dist/index-6N0aYmpW.d.ts.map +1 -0
- package/dist/index-BAvgST_9.d.ts +131 -0
- package/dist/index-BAvgST_9.d.ts.map +1 -0
- package/dist/index-BvnJuTGD.d.ts +68 -0
- package/dist/index-BvnJuTGD.d.ts.map +1 -0
- package/dist/index-C61Wi7yg.d.ts +547 -0
- package/dist/index-C61Wi7yg.d.ts.map +1 -0
- package/dist/index-CAPUUKaM.d.ts +335 -0
- package/dist/index-CAPUUKaM.d.ts.map +1 -0
- package/dist/index-DE5fb3EC.d.ts +2244 -0
- package/dist/index-DE5fb3EC.d.ts.map +1 -0
- package/dist/index-DSC51roc.d.ts +102 -0
- package/dist/index-DSC51roc.d.ts.map +1 -0
- package/dist/index.d.ts +3776 -15120
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11185 -11191
- package/dist/index.js.map +1 -1
- package/dist/integrity-BzRbCHzi.js +424 -0
- package/dist/integrity-BzRbCHzi.js.map +1 -0
- package/dist/integrity-rmVhXWA7.d.ts +61 -0
- package/dist/integrity-rmVhXWA7.d.ts.map +1 -0
- package/dist/judge-calibration-DFtEMlde.d.ts +146 -0
- package/dist/judge-calibration-DFtEMlde.d.ts.map +1 -0
- package/dist/ledger-core/index.d.ts +2 -0
- package/dist/ledger-core/index.js +2 -0
- package/dist/ledger-core-DtZz1RG0.js +388 -0
- package/dist/ledger-core-DtZz1RG0.js.map +1 -0
- package/dist/llm-client--GR4JbZE.js +687 -0
- package/dist/llm-client--GR4JbZE.js.map +1 -0
- package/dist/llm-client-B_nIBlYo.d.ts +290 -0
- package/dist/llm-client-B_nIBlYo.d.ts.map +1 -0
- package/dist/matrix/index.d.ts +3 -155
- package/dist/matrix/index.js +2 -8
- package/dist/matrix-BzQnu2S6.js +270 -0
- package/dist/matrix-BzQnu2S6.js.map +1 -0
- package/dist/meta-eval/index.d.ts +4 -1027
- package/dist/meta-eval/index.js +393 -390
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/metrics-C9YY1OcL.js +239 -0
- package/dist/metrics-C9YY1OcL.js.map +1 -0
- package/dist/mint-yN2M2eh0.js +201 -0
- package/dist/mint-yN2M2eh0.js.map +1 -0
- package/dist/multi-layer-verifier-BHY1gWAc.d.ts +138 -0
- package/dist/multi-layer-verifier-BHY1gWAc.d.ts.map +1 -0
- package/dist/multishot/index.d.ts +273 -481
- package/dist/multishot/index.d.ts.map +1 -0
- package/dist/multishot/index.js +595 -548
- package/dist/multishot/index.js.map +1 -1
- package/dist/off-policy-DvgzvtIx.js +220 -0
- package/dist/off-policy-DvgzvtIx.js.map +1 -0
- package/dist/off-policy-mskQw8Mb.d.ts +153 -0
- package/dist/off-policy-mskQw8Mb.d.ts.map +1 -0
- package/dist/openapi.json +1 -1
- package/dist/opencode-sqlite-BGrHeDu3.js +318 -0
- package/dist/opencode-sqlite-BGrHeDu3.js.map +1 -0
- package/dist/outcome-store-BYHIuO0e.d.ts +65 -0
- package/dist/outcome-store-BYHIuO0e.d.ts.map +1 -0
- package/dist/outcome-store-ChBKlTd_.js +75 -0
- package/dist/outcome-store-ChBKlTd_.js.map +1 -0
- package/dist/paired-arms-D9D0wXj2.js +260 -0
- package/dist/paired-arms-D9D0wXj2.js.map +1 -0
- package/dist/pipelines/index.d.ts +95 -532
- package/dist/pipelines/index.d.ts.map +1 -0
- package/dist/pipelines/index.js +497 -478
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pre-registration-DakwTRXk.js +96 -0
- package/dist/pre-registration-DakwTRXk.js.map +1 -0
- package/dist/propose-review-control-LhIWGzHl.js +1458 -0
- package/dist/propose-review-control-LhIWGzHl.js.map +1 -0
- package/dist/query-CJ_DX8vl.d.ts +28 -0
- package/dist/query-CJ_DX8vl.d.ts.map +1 -0
- package/dist/query-Di7eEQ79.js +83 -0
- package/dist/query-Di7eEQ79.js.map +1 -0
- package/dist/raw-provider-sink-BQd7mzyT.js +201 -0
- package/dist/raw-provider-sink-BQd7mzyT.js.map +1 -0
- package/dist/raw-provider-sink-BU29Sh8h.d.ts +134 -0
- package/dist/raw-provider-sink-BU29Sh8h.d.ts.map +1 -0
- package/dist/redact-7Aq1ukl-.js +107 -0
- package/dist/redact-7Aq1ukl-.js.map +1 -0
- package/dist/release-report-Cz9NKH39.js +603 -0
- package/dist/release-report-Cz9NKH39.js.map +1 -0
- package/dist/release-report-mvB2G4_J.d.ts +244 -0
- package/dist/release-report-mvB2G4_J.d.ts.map +1 -0
- package/dist/replay-GnyotH0J.js +1741 -0
- package/dist/replay-GnyotH0J.js.map +1 -0
- package/dist/replay-OoidtG1E.d.ts +749 -0
- package/dist/replay-OoidtG1E.d.ts.map +1 -0
- package/dist/reporting.d.ts +6 -1298
- package/dist/reporting.js +6 -50
- package/dist/researcher-CwTdwXG1.d.ts +314 -0
- package/dist/researcher-CwTdwXG1.d.ts.map +1 -0
- package/dist/reward-hacking-eAnOsynk.d.ts +224 -0
- package/dist/reward-hacking-eAnOsynk.d.ts.map +1 -0
- package/dist/reward-hacking-qipEpKvY.js +596 -0
- package/dist/reward-hacking-qipEpKvY.js.map +1 -0
- package/dist/reward-nw2xZGZG.js +137 -0
- package/dist/reward-nw2xZGZG.js.map +1 -0
- package/dist/rl.d.ts +916 -3596
- package/dist/rl.d.ts.map +1 -0
- package/dist/rl.js +2362 -1751
- package/dist/rl.js.map +1 -1
- package/dist/rolldown-runtime-8H4AJuhK.js +14 -0
- package/dist/rollout/index.d.ts +3 -1048
- package/dist/rollout/index.js +8 -110
- package/dist/rollout-BOYjemfR.js +624 -0
- package/dist/rollout-BOYjemfR.js.map +1 -0
- package/dist/rubric-predictive-validity-B3xmbmS1.js +141 -0
- package/dist/rubric-predictive-validity-B3xmbmS1.js.map +1 -0
- package/dist/rubric-predictive-validity-Ku_clp_1.d.ts +74 -0
- package/dist/rubric-predictive-validity-Ku_clp_1.d.ts.map +1 -0
- package/dist/run-evidence-ClRX_8A9.d.ts +225 -0
- package/dist/run-evidence-ClRX_8A9.d.ts.map +1 -0
- package/dist/run-record-BuoE80Dq.js +467 -0
- package/dist/run-record-BuoE80Dq.js.map +1 -0
- package/dist/run-record-CnZu_gjl.d.ts +357 -0
- package/dist/run-record-CnZu_gjl.d.ts.map +1 -0
- package/dist/run-score-iEEAWiBY.js +41 -0
- package/dist/run-score-iEEAWiBY.js.map +1 -0
- package/dist/runtime-trajectory-1gyaTOoC.js +93 -0
- package/dist/runtime-trajectory-1gyaTOoC.js.map +1 -0
- package/dist/runtime-trajectory-BvSZcCHD.d.ts +50 -0
- package/dist/runtime-trajectory-BvSZcCHD.d.ts.map +1 -0
- package/dist/schema-BtVldJ3T.d.ts +206 -0
- package/dist/schema-BtVldJ3T.d.ts.map +1 -0
- package/dist/schema-C6DW4ZHR.js +821 -0
- package/dist/schema-C6DW4ZHR.js.map +1 -0
- package/dist/schema-CRhEY1SO.js +69 -0
- package/dist/schema-CRhEY1SO.js.map +1 -0
- package/dist/schema-Cef2cFmb.d.ts +408 -0
- package/dist/schema-Cef2cFmb.d.ts.map +1 -0
- package/dist/semantic-concept-judge-B6cWNJ2K.js +725 -0
- package/dist/semantic-concept-judge-B6cWNJ2K.js.map +1 -0
- package/dist/sequential-Br0mAPHA.js +148 -0
- package/dist/sequential-Br0mAPHA.js.map +1 -0
- package/dist/sequential-CYwq6Ff_.d.ts +141 -0
- package/dist/sequential-CYwq6Ff_.d.ts.map +1 -0
- package/dist/series-convergence-CjO2QdRW.js +43 -0
- package/dist/series-convergence-CjO2QdRW.js.map +1 -0
- package/dist/series-convergence-ofsqPWhs.d.ts +35 -0
- package/dist/series-convergence-ofsqPWhs.d.ts.map +1 -0
- package/dist/server-m5D9cvnG.js +1040 -0
- package/dist/server-m5D9cvnG.js.map +1 -0
- package/dist/skill-usage-C_pXm7lP.d.ts +534 -0
- package/dist/skill-usage-C_pXm7lP.d.ts.map +1 -0
- package/dist/skillopt-optimization-method-B7wX7XkF.d.ts +1739 -0
- package/dist/skillopt-optimization-method-B7wX7XkF.d.ts.map +1 -0
- package/dist/skillopt-optimization-method-D4ODwFVV.js +7712 -0
- package/dist/skillopt-optimization-method-D4ODwFVV.js.map +1 -0
- package/dist/statistics-Cmj6nynr.d.ts +514 -0
- package/dist/statistics-Cmj6nynr.d.ts.map +1 -0
- package/dist/statistics-CnnxdpOg.js +1437 -0
- package/dist/statistics-CnnxdpOg.js.map +1 -0
- package/dist/store-CT9YIIve.d.ts +117 -0
- package/dist/store-CT9YIIve.d.ts.map +1 -0
- package/dist/store-CxJry_cs.d.ts +229 -0
- package/dist/store-CxJry_cs.d.ts.map +1 -0
- package/dist/storyboard/index.d.ts +84 -203
- package/dist/storyboard/index.d.ts.map +1 -0
- package/dist/storyboard/index.js +609 -542
- package/dist/storyboard/index.js.map +1 -1
- package/dist/summary-report-BNs5nmXI.js +862 -0
- package/dist/summary-report-BNs5nmXI.js.map +1 -0
- package/dist/summary-report-Cj9gdw4i.d.ts +407 -0
- package/dist/summary-report-Cj9gdw4i.d.ts.map +1 -0
- package/dist/supervisor-run/index.d.ts +2 -849
- package/dist/supervisor-run/index.js +2 -64
- package/dist/supervisor-run-_lnTLM3z.js +1679 -0
- package/dist/supervisor-run-_lnTLM3z.js.map +1 -0
- package/dist/task-failure-attributes-CQZlB3et.js +311 -0
- package/dist/task-failure-attributes-CQZlB3et.js.map +1 -0
- package/dist/test-graded-scenario-BsqWLmPt.js +318 -0
- package/dist/test-graded-scenario-BsqWLmPt.js.map +1 -0
- package/dist/test-graded-scenario-D1TaI2va.d.ts +141 -0
- package/dist/test-graded-scenario-D1TaI2va.d.ts.map +1 -0
- package/dist/tools-BmuN627J.js +1085 -0
- package/dist/tools-BmuN627J.js.map +1 -0
- package/dist/trace-attributes.d.ts +2 -52
- package/dist/trace-attributes.js +131 -61
- package/dist/trace-attributes.js.map +1 -1
- package/dist/traces.d.ts +12 -2365
- package/dist/traces.js +12 -251
- package/dist/trajectory-D_7rLrvE.js +56 -0
- package/dist/trajectory-D_7rLrvE.js.map +1 -0
- package/dist/types-DGsxbAEd.d.ts +387 -0
- package/dist/types-DGsxbAEd.d.ts.map +1 -0
- package/dist/types-k9tZGKUg.d.ts +640 -0
- package/dist/types-k9tZGKUg.d.ts.map +1 -0
- package/dist/verdict-Dps8_okt.d.ts +37 -0
- package/dist/verdict-Dps8_okt.d.ts.map +1 -0
- package/dist/wire/index.d.ts +702 -1174
- package/dist/wire/index.d.ts.map +1 -0
- package/dist/wire/index.js +2 -81
- package/docs/feature-guide.md +1 -1
- package/docs/rollout.md +116 -2
- package/package.json +18 -10
- package/dist/benchmarks/index.js.map +0 -1
- package/dist/campaign/index.js.map +0 -1
- package/dist/chunk-2JX3CFMB.js +0 -695
- package/dist/chunk-2JX3CFMB.js.map +0 -1
- package/dist/chunk-2MKQIFS4.js +0 -183
- package/dist/chunk-2MKQIFS4.js.map +0 -1
- package/dist/chunk-3RF76KTD.js +0 -84
- package/dist/chunk-3RF76KTD.js.map +0 -1
- package/dist/chunk-5DTSBUL2.js +0 -159
- package/dist/chunk-5DTSBUL2.js.map +0 -1
- package/dist/chunk-7ZZMD7UK.js +0 -386
- package/dist/chunk-7ZZMD7UK.js.map +0 -1
- package/dist/chunk-BOD4O7OF.js +0 -40
- package/dist/chunk-BOD4O7OF.js.map +0 -1
- package/dist/chunk-BYT7ELPS.js +0 -1553
- package/dist/chunk-BYT7ELPS.js.map +0 -1
- package/dist/chunk-DJKY2TSY.js +0 -2428
- package/dist/chunk-DJKY2TSY.js.map +0 -1
- package/dist/chunk-DPUHNQLN.js +0 -232
- package/dist/chunk-DPUHNQLN.js.map +0 -1
- package/dist/chunk-DRYIUNWY.js +0 -622
- package/dist/chunk-DRYIUNWY.js.map +0 -1
- package/dist/chunk-EJGRPCO3.js +0 -617
- package/dist/chunk-EJGRPCO3.js.map +0 -1
- package/dist/chunk-EOSZT7PL.js +0 -2001
- package/dist/chunk-EOSZT7PL.js.map +0 -1
- package/dist/chunk-EZJEIH2R.js +0 -1559
- package/dist/chunk-EZJEIH2R.js.map +0 -1
- package/dist/chunk-GGE4NNQT.js +0 -65
- package/dist/chunk-GGE4NNQT.js.map +0 -1
- package/dist/chunk-HHWE3POT.js +0 -94
- package/dist/chunk-HHWE3POT.js.map +0 -1
- package/dist/chunk-IHQDPH7D.js +0 -171
- package/dist/chunk-IHQDPH7D.js.map +0 -1
- package/dist/chunk-JHCHEVET.js +0 -274
- package/dist/chunk-JHCHEVET.js.map +0 -1
- package/dist/chunk-K4DBDHLK.js +0 -158
- package/dist/chunk-K4DBDHLK.js.map +0 -1
- package/dist/chunk-K6N6XJJX.js +0 -306
- package/dist/chunk-K6N6XJJX.js.map +0 -1
- package/dist/chunk-MA6HLL3S.js +0 -65
- package/dist/chunk-MA6HLL3S.js.map +0 -1
- package/dist/chunk-MAZ26DC7.js +0 -99
- package/dist/chunk-MAZ26DC7.js.map +0 -1
- package/dist/chunk-MHELPNRP.js +0 -1212
- package/dist/chunk-MHELPNRP.js.map +0 -1
- package/dist/chunk-NACAGYSY.js +0 -1040
- package/dist/chunk-NACAGYSY.js.map +0 -1
- package/dist/chunk-NKAGIDE2.js +0 -7633
- package/dist/chunk-NKAGIDE2.js.map +0 -1
- package/dist/chunk-NPCTHQIO.js +0 -91
- package/dist/chunk-NPCTHQIO.js.map +0 -1
- package/dist/chunk-NYLOYM6N.js +0 -332
- package/dist/chunk-NYLOYM6N.js.map +0 -1
- package/dist/chunk-ONWEPEDO.js +0 -57
- package/dist/chunk-ONWEPEDO.js.map +0 -1
- package/dist/chunk-P5W7RQKK.js +0 -576
- package/dist/chunk-P5W7RQKK.js.map +0 -1
- package/dist/chunk-P6FYH6K4.js +0 -1161
- package/dist/chunk-P6FYH6K4.js.map +0 -1
- package/dist/chunk-PBE2LOSS.js +0 -669
- package/dist/chunk-PBE2LOSS.js.map +0 -1
- package/dist/chunk-PC4UYEBM.js +0 -166
- package/dist/chunk-PC4UYEBM.js.map +0 -1
- package/dist/chunk-PXE2VKMX.js +0 -140
- package/dist/chunk-PXE2VKMX.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
- package/dist/chunk-RZTMDUO7.js +0 -49
- package/dist/chunk-RZTMDUO7.js.map +0 -1
- package/dist/chunk-S5YLIBFX.js +0 -136
- package/dist/chunk-S5YLIBFX.js.map +0 -1
- package/dist/chunk-SZLVEKMJ.js +0 -1446
- package/dist/chunk-SZLVEKMJ.js.map +0 -1
- package/dist/chunk-T4SQEITX.js +0 -95
- package/dist/chunk-T4SQEITX.js.map +0 -1
- package/dist/chunk-TBL77AUT.js +0 -355
- package/dist/chunk-TBL77AUT.js.map +0 -1
- package/dist/chunk-TSN7JT6D.js +0 -1646
- package/dist/chunk-TSN7JT6D.js.map +0 -1
- package/dist/chunk-TT4KNT67.js +0 -124
- package/dist/chunk-TT4KNT67.js.map +0 -1
- package/dist/chunk-UB2LOJ6Q.js +0 -4461
- package/dist/chunk-UB2LOJ6Q.js.map +0 -1
- package/dist/chunk-UWZZKKU7.js +0 -237
- package/dist/chunk-UWZZKKU7.js.map +0 -1
- package/dist/chunk-VBQ3CRKH.js +0 -291
- package/dist/chunk-VBQ3CRKH.js.map +0 -1
- package/dist/chunk-VGRCHJON.js +0 -163
- package/dist/chunk-VGRCHJON.js.map +0 -1
- package/dist/chunk-VI2UW6B6.js +0 -162
- package/dist/chunk-VI2UW6B6.js.map +0 -1
- package/dist/chunk-VLOATJQ2.js +0 -908
- package/dist/chunk-VLOATJQ2.js.map +0 -1
- package/dist/chunk-VQMK5FMP.js +0 -247
- package/dist/chunk-VQMK5FMP.js.map +0 -1
- package/dist/chunk-VZSRQ272.js +0 -149
- package/dist/chunk-VZSRQ272.js.map +0 -1
- package/dist/chunk-WGXIEX7P.js +0 -116
- package/dist/chunk-WGXIEX7P.js.map +0 -1
- package/dist/chunk-WS3NZZQQ.js +0 -929
- package/dist/chunk-WS3NZZQQ.js.map +0 -1
- package/dist/chunk-XDWDC2MP.js +0 -695
- package/dist/chunk-XDWDC2MP.js.map +0 -1
- package/dist/chunk-XPRT64IE.js +0 -766
- package/dist/chunk-XPRT64IE.js.map +0 -1
- package/dist/chunk-YJBNWCAA.js +0 -1056
- package/dist/chunk-YJBNWCAA.js.map +0 -1
- package/dist/chunk-ZET2UAYW.js +0 -89
- package/dist/chunk-ZET2UAYW.js.map +0 -1
- package/dist/chunk-ZUUWPZCV.js +0 -752
- package/dist/chunk-ZUUWPZCV.js.map +0 -1
- package/dist/control.js.map +0 -1
- package/dist/hosted/index.js.map +0 -1
- package/dist/matrix/index.js.map +0 -1
- package/dist/reporting.js.map +0 -1
- package/dist/rollout/index.js.map +0 -1
- package/dist/run-campaign-ISHFZ7FJ.js +0 -17
- package/dist/run-campaign-ISHFZ7FJ.js.map +0 -1
- package/dist/supervisor-run/index.js.map +0 -1
- package/dist/traces.js.map +0 -1
- package/dist/wire/index.js.map +0 -1
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { c as ValidationError } from "./errors-CEk209JS.js";
|
|
2
|
+
import { o as FailureClass } from "./schema-BtVldJ3T.js";
|
|
3
|
+
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
4
|
+
//#region src/agent-profile-cell.d.ts
|
|
5
|
+
type AgentProfileCellSchemaVersion = 'agent-profile-cell/v1';
|
|
6
|
+
type AgentProfileJsonObject = {
|
|
7
|
+
[key: string]: AgentProfileJson;
|
|
8
|
+
};
|
|
9
|
+
type AgentProfileJson = string | number | boolean | null | AgentProfileJson[] | AgentProfileJsonObject;
|
|
10
|
+
type AgentProfileDimensionValue = string | number | boolean | null;
|
|
11
|
+
interface AgentProfileSource {
|
|
12
|
+
/** Runtime/profile contract being fingerprinted, e.g. `agent-interface-profile`. */
|
|
13
|
+
kind: string;
|
|
14
|
+
/** sha256 over the canonical source profile object. */
|
|
15
|
+
hash: string;
|
|
16
|
+
}
|
|
17
|
+
interface AgentProfileSourceInput {
|
|
18
|
+
kind: string;
|
|
19
|
+
/** Precomputed sha256 for callers that already sign their profile artifact. */
|
|
20
|
+
hash?: string;
|
|
21
|
+
/** Full canonical runtime profile; hashed and then discarded from the cell. */
|
|
22
|
+
profile?: AgentProfileJson;
|
|
23
|
+
}
|
|
24
|
+
interface AgentProfileHarness {
|
|
25
|
+
id: string;
|
|
26
|
+
version?: string;
|
|
27
|
+
hash?: string;
|
|
28
|
+
}
|
|
29
|
+
interface AgentProfileCellInput {
|
|
30
|
+
profileId: string;
|
|
31
|
+
sourceProfile: AgentProfileSourceInput;
|
|
32
|
+
harness?: AgentProfileHarness;
|
|
33
|
+
model?: string;
|
|
34
|
+
promptHash?: string;
|
|
35
|
+
dimensions?: Record<string, AgentProfileDimensionValue>;
|
|
36
|
+
}
|
|
37
|
+
interface AgentProfileCell {
|
|
38
|
+
schemaVersion: AgentProfileCellSchemaVersion;
|
|
39
|
+
cellId: string;
|
|
40
|
+
profileId: string;
|
|
41
|
+
sourceProfile: AgentProfileSource;
|
|
42
|
+
harness?: AgentProfileHarness;
|
|
43
|
+
model?: string;
|
|
44
|
+
promptHash?: string;
|
|
45
|
+
dimensions?: Record<string, AgentProfileDimensionValue>;
|
|
46
|
+
}
|
|
47
|
+
declare class AgentProfileCellValidationError extends ValidationError {
|
|
48
|
+
readonly path: string;
|
|
49
|
+
constructor(message: string, path?: string);
|
|
50
|
+
}
|
|
51
|
+
declare function buildAgentProfileCell(input: AgentProfileCellInput): Promise<AgentProfileCell>;
|
|
52
|
+
declare function agentProfileCellHashMaterial(cell: AgentProfileCell): Omit<AgentProfileCell, 'cellId'>;
|
|
53
|
+
/**
|
|
54
|
+
* Verify an `AgentProfileCell`'s `cellId` matches the sha256 of its hash-material fields, confirming the record has not been tampered with.
|
|
55
|
+
*/
|
|
56
|
+
declare function verifyAgentProfileCell(cell: AgentProfileCell): Promise<boolean>;
|
|
57
|
+
declare function validateAgentProfileCell(input: unknown): AgentProfileCell;
|
|
58
|
+
declare function requireAgentProfileCell(record: {
|
|
59
|
+
runId: string;
|
|
60
|
+
agentProfile?: AgentProfileCell;
|
|
61
|
+
}): AgentProfileCell;
|
|
62
|
+
declare function agentProfileCellKey(record: {
|
|
63
|
+
runId: string;
|
|
64
|
+
agentProfile?: AgentProfileCell;
|
|
65
|
+
}): string;
|
|
66
|
+
declare function assertRunAgentProfileCell(record: {
|
|
67
|
+
runId: string;
|
|
68
|
+
model: string;
|
|
69
|
+
promptHash: string;
|
|
70
|
+
agentProfile?: AgentProfileCell;
|
|
71
|
+
}): Promise<AgentProfileCell>;
|
|
72
|
+
declare function groupRunsByAgentProfileCell<T extends {
|
|
73
|
+
runId: string;
|
|
74
|
+
agentProfile?: AgentProfileCell;
|
|
75
|
+
}>(records: readonly T[]): Map<string, T[]>;
|
|
76
|
+
/** Canonical `sourceProfile.kind` values. Two products fingerprinting the
|
|
77
|
+
* same canonical profile MUST use the same kind for their cells to share
|
|
78
|
+
* `sourceProfile.hash`. Extend rather than create new strings — adding a
|
|
79
|
+
* new kind is a deliberate cross-product schema change. */
|
|
80
|
+
declare const AGENT_PROFILE_KINDS: {
|
|
81
|
+
/** A profile declared via `defineAgentProfile(...)` from
|
|
82
|
+
* `@tangle-network/agent-interface`. The default kind for router-backed
|
|
83
|
+
* and sandbox-backed products. */
|
|
84
|
+
readonly AGENT_INTERFACE_PROFILE: 'agent-interface-profile';
|
|
85
|
+
};
|
|
86
|
+
type AgentProfileKind = (typeof AGENT_PROFILE_KINDS)[keyof typeof AGENT_PROFILE_KINDS];
|
|
87
|
+
/** Canonicalize an arbitrary value into `AgentProfileJson` by JSON
|
|
88
|
+
* round-trip. Throws when the value contains anything not representable
|
|
89
|
+
* as JSON (functions, BigInt, cycles) — non-portable profiles fail loud
|
|
90
|
+
* rather than silently dropping fields. */
|
|
91
|
+
declare function toAgentProfileJson(value: unknown): AgentProfileJson;
|
|
92
|
+
/** Canonical AgentProfile shape required when deriving a stable cell id. */
|
|
93
|
+
type AgentInterfaceProfileLike = AgentProfile & {
|
|
94
|
+
name: string;
|
|
95
|
+
version: string;
|
|
96
|
+
};
|
|
97
|
+
/** Higher-level helper that hard-codes the canonical
|
|
98
|
+
* `agent-interface-profile` kind plus the JSON canonicalization. Equivalent
|
|
99
|
+
* to calling `buildAgentProfileCell` with `profileId = \`${name}@${version}\``
|
|
100
|
+
* and `sourceProfile = { kind: AGENT_INTERFACE_PROFILE, profile: <round-tripped> }`.
|
|
101
|
+
*
|
|
102
|
+
* Use this from any product consuming an agent-interface `AgentProfile`; the
|
|
103
|
+
* manual `buildAgentProfileCell` call is reserved for advanced cases
|
|
104
|
+
* (custom kinds, pre-computed source hashes, alternate profileId
|
|
105
|
+
* conventions). */
|
|
106
|
+
declare function buildAgentInterfaceProfileCell(profile: AgentInterfaceProfileLike, input: Omit<AgentProfileCellInput, 'profileId' | 'sourceProfile'>): Promise<AgentProfileCell>;
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/run-record.d.ts
|
|
109
|
+
/** Search/dev/holdout split tag. 'search' is the paper-grade alias for the
|
|
110
|
+
* combined train+test pool that the optimizer is allowed to read. */
|
|
111
|
+
type RunSplitTag = 'search' | 'dev' | 'holdout';
|
|
112
|
+
/**
|
|
113
|
+
* Explicit execution-lifecycle result for a run.
|
|
114
|
+
*
|
|
115
|
+
* This is separate from task quality (`outcome`) and failure classification.
|
|
116
|
+
* Producers set it only from root-run or process evidence.
|
|
117
|
+
*/
|
|
118
|
+
type RunTerminalOutcome = 'succeeded' | 'failed' | 'cancelled' | 'incomplete' | 'unknown';
|
|
119
|
+
interface RunTokenUsage {
|
|
120
|
+
input: number;
|
|
121
|
+
/** All generated tokens charged as output, including reasoning tokens. */
|
|
122
|
+
output: number;
|
|
123
|
+
/** Reasoning-token subset of `output`, when the provider reports it. */
|
|
124
|
+
reasoning?: number;
|
|
125
|
+
/** Prompt tokens served from a provider cache. */
|
|
126
|
+
cached?: number;
|
|
127
|
+
/** Prompt tokens written into a provider cache. */
|
|
128
|
+
cacheWrite?: number;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* How a run's USD amount was obtained.
|
|
132
|
+
*/
|
|
133
|
+
type RunCostProvenance = {
|
|
134
|
+
kind: 'observed';
|
|
135
|
+
usd: number;
|
|
136
|
+
} | {
|
|
137
|
+
kind: 'estimated';
|
|
138
|
+
usd: number;
|
|
139
|
+
} | {
|
|
140
|
+
kind: 'uncaptured';
|
|
141
|
+
usd: null;
|
|
142
|
+
};
|
|
143
|
+
interface RunJudgeMetadata {
|
|
144
|
+
model: string;
|
|
145
|
+
promptVersion: string;
|
|
146
|
+
/** [0,1] confidence the judge declared. Constant judge confidence
|
|
147
|
+
* across many runs is a fallback signal (see `canary.ts`). */
|
|
148
|
+
confidence: number;
|
|
149
|
+
/** True if the judge degraded to a fallback path (rules-only,
|
|
150
|
+
* prior-call cache, etc.). The canary uses this to alert. */
|
|
151
|
+
fallback: boolean;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Per-judge / per-dimension breakdown for runs scored by an ensemble of
|
|
155
|
+
* judges over a multi-dimensional rubric.
|
|
156
|
+
*
|
|
157
|
+
* The collapsed `outcome.searchScore` / `holdoutScore` carries the
|
|
158
|
+
* composite the gate uses. The full breakdown belongs here so consumers
|
|
159
|
+
* can answer "which judge disagreed?", "which dimension dragged the
|
|
160
|
+
* composite down?", and "did half the panel fail?" without re-running.
|
|
161
|
+
*
|
|
162
|
+
* `perJudge[judgeId][dim]` is the canonical source; `perDimMean` and
|
|
163
|
+
* `composite` are convenience projections — derivable but precomputed so
|
|
164
|
+
* downstream IRR primitives (`interRaterReliability`,
|
|
165
|
+
* `corpusInterRaterAgreement`) and reporters don't pay the same
|
|
166
|
+
* aggregation twice.
|
|
167
|
+
*
|
|
168
|
+
* Fail-loud discipline: judges that errored out land in `failedJudges`
|
|
169
|
+
* by id. A missing key in `perJudge` is ambiguous (silent zero vs not
|
|
170
|
+
* run); the explicit list makes a partial-failure recorded as such.
|
|
171
|
+
*/
|
|
172
|
+
interface JudgeScoresRecord {
|
|
173
|
+
/** Per-judge per-dimension scores. `{ "kimi-k2.6": { helpfulness: 0.8, clarity: 0.7 }, ... }`. */
|
|
174
|
+
perJudge: Record<string, Record<string, number>>;
|
|
175
|
+
/** Per-dim mean across judges. Convenience — derivable from `perJudge`. */
|
|
176
|
+
perDimMean: Record<string, number>;
|
|
177
|
+
/** Composite mean across successful judges. Mirrors the task score only
|
|
178
|
+
* when `failedJudges` is empty. */
|
|
179
|
+
composite: number;
|
|
180
|
+
/** Judges that errored or returned an unparseable verdict. Recorded
|
|
181
|
+
* by id (e.g. `['glm-5.1']`) so a partial-failure case is explicit,
|
|
182
|
+
* not inferred from missing keys in `perJudge`. */
|
|
183
|
+
failedJudges?: string[];
|
|
184
|
+
/** Free-form notes the judges emitted (joined across judges or
|
|
185
|
+
* first-judge only — consumer's choice). */
|
|
186
|
+
notes?: string;
|
|
187
|
+
}
|
|
188
|
+
interface RunOutcome {
|
|
189
|
+
/** Score on the search/optimization split. Optional for holdout-only and
|
|
190
|
+
* execution-only records. */
|
|
191
|
+
searchScore?: number;
|
|
192
|
+
/** Score on the held-out split. Optional for search-only and execution-only
|
|
193
|
+
* records. When both scores are absent, the run is explicitly unlabeled. */
|
|
194
|
+
holdoutScore?: number;
|
|
195
|
+
/** Bag of any other metric the run produced — judge dimensions,
|
|
196
|
+
* pass/fail counters, latency stats, etc. Numeric only — keeps
|
|
197
|
+
* reporters honest. */
|
|
198
|
+
raw: Record<string, number>;
|
|
199
|
+
/** Per-judge / per-dim breakdown. Consumers writing ensemble
|
|
200
|
+
* judgements populate this; substrate primitives like
|
|
201
|
+
* `interRaterReliability` and `corpusInterRaterAgreement` accept
|
|
202
|
+
* these records as input. Optional — single-judge or scalar-only
|
|
203
|
+
* runs leave it unset. */
|
|
204
|
+
judgeScores?: JudgeScoresRecord;
|
|
205
|
+
/** Authenticity / realness verdict — did the run build the REAL thing on the
|
|
206
|
+
* intended infra, or fake it (see `./authenticity`)? Optional: only domains
|
|
207
|
+
* with an authenticity config populate it. Carried in the corpus so the
|
|
208
|
+
* flywheel / off-policy learning can optimize for real completion, not gamed
|
|
209
|
+
* pass-rate. `score` is 0-1; `gated` is the anti-Goodhart flag — a gated run
|
|
210
|
+
* must not count as a real success regardless of `score`. */
|
|
211
|
+
realness?: {
|
|
212
|
+
score: number;
|
|
213
|
+
gated: boolean;
|
|
214
|
+
reason?: string;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Mandatory paper-grade fields for a single evaluation run. Optional
|
|
219
|
+
* fields are extension points; mandatory fields throw if missing.
|
|
220
|
+
*
|
|
221
|
+
* Hash discipline:
|
|
222
|
+
* - `promptHash` is the sha256 of the EFFECTIVE prompt sent to the
|
|
223
|
+
* model (after any steering bundle merge).
|
|
224
|
+
* - `configHash` is the sha256 of the effective run config (model,
|
|
225
|
+
* temperature, tools, judges, splits). The pair (promptHash,
|
|
226
|
+
* configHash) uniquely identifies an experiment cell.
|
|
227
|
+
*
|
|
228
|
+
* Model snapshot discipline:
|
|
229
|
+
* - `model` MUST encode a snapshot version. Bare aliases like
|
|
230
|
+
* `claude-sonnet-4` or `gpt-4o` are banned — they remap silently.
|
|
231
|
+
* Use `claude-sonnet-4-6@2025-04-15` or `gpt-4o-2024-11-20`.
|
|
232
|
+
*/
|
|
233
|
+
interface RunRecord {
|
|
234
|
+
/** UUID for the run. */
|
|
235
|
+
runId: string;
|
|
236
|
+
/** Logical experiment grouping (a treatment vs a baseline within
|
|
237
|
+
* the same sweep should share `experimentId`). */
|
|
238
|
+
experimentId: string;
|
|
239
|
+
/** Stable identifier for the candidate (variant) being run. The
|
|
240
|
+
* promotion gate compares two `candidateId`s on matched items. */
|
|
241
|
+
candidateId: string;
|
|
242
|
+
/** RNG seed for the run. Always recorded — silent re-seeding is
|
|
243
|
+
* the most common cause of non-reproducible numbers. */
|
|
244
|
+
seed: number;
|
|
245
|
+
/** Model identifier WITH snapshot version. */
|
|
246
|
+
model: string;
|
|
247
|
+
/** sha256 of the effective prompt (post-steering). */
|
|
248
|
+
promptHash: string;
|
|
249
|
+
/** sha256 of the effective config. */
|
|
250
|
+
configHash: string;
|
|
251
|
+
/** Git SHA the harness was run from. */
|
|
252
|
+
commitSha: string;
|
|
253
|
+
/** End-to-end wall-clock duration in milliseconds. */
|
|
254
|
+
wallMs: number;
|
|
255
|
+
/** Time spent queued before execution started, if known. */
|
|
256
|
+
queueMs?: number;
|
|
257
|
+
/** Total USD cost, or null when the producer could not capture one. */
|
|
258
|
+
costUsd: number | null;
|
|
259
|
+
/** Whether `costUsd` came from billing data, a price calculation, or is unavailable. */
|
|
260
|
+
costProvenance: RunCostProvenance;
|
|
261
|
+
/** Token usage breakdown. */
|
|
262
|
+
tokenUsage: RunTokenUsage;
|
|
263
|
+
/** Root-run or process terminal result. Never inferred from a child span. */
|
|
264
|
+
terminalOutcome: RunTerminalOutcome;
|
|
265
|
+
/** Root-run or process failure reason. Valid only for a failed, cancelled,
|
|
266
|
+
* or incomplete terminal result; never populated from a child span. */
|
|
267
|
+
terminalFailureReason?: string;
|
|
268
|
+
/** Judge-side metadata, if a judge was used. */
|
|
269
|
+
judgeMetadata?: RunJudgeMetadata;
|
|
270
|
+
/** Per-split scores + raw bag. */
|
|
271
|
+
outcome: RunOutcome;
|
|
272
|
+
/** Canonical task-failure class drawn from the shared
|
|
273
|
+
* `FAILURE_CLASSES` taxonomy. Producers set it only from task-result
|
|
274
|
+
* evidence. Execution errors belong in
|
|
275
|
+
* `outcome.raw.execution_error_count`. */
|
|
276
|
+
failureClass?: FailureClass;
|
|
277
|
+
/** Free-form task-failure detail scoped under a non-success
|
|
278
|
+
* `failureClass`. It is invalid without that class. */
|
|
279
|
+
failureMode?: string;
|
|
280
|
+
/** Which split this run was drawn from. */
|
|
281
|
+
splitTag: RunSplitTag;
|
|
282
|
+
/**
|
|
283
|
+
* Stable scenario identifier the run observed or was scored against.
|
|
284
|
+
* Comparison primitives match this identity rather than input order.
|
|
285
|
+
*/
|
|
286
|
+
scenarioId: string;
|
|
287
|
+
/**
|
|
288
|
+
* Canonical identity for the agent profile cell that produced this row:
|
|
289
|
+
* profile artifact hash plus optional harness/model/prompt/reporting
|
|
290
|
+
* dimensions. Use `agentProfile.cellId` to group persona sweeps and
|
|
291
|
+
* longitudinal reports by the complete source profile, not by a loose
|
|
292
|
+
* candidate label or opaque config hash.
|
|
293
|
+
*/
|
|
294
|
+
agentProfile?: AgentProfileCell;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Canonical task-result classification.
|
|
298
|
+
*
|
|
299
|
+
* A producer may omit classification, record explicit success, or attach
|
|
300
|
+
* domain-specific detail to a non-success class. Detail can never stand alone.
|
|
301
|
+
* Execution errors belong in `outcome.raw.execution_error_count`.
|
|
302
|
+
*/
|
|
303
|
+
type RunTaskFailure = {
|
|
304
|
+
failureClass?: undefined;
|
|
305
|
+
failureMode?: undefined;
|
|
306
|
+
} | {
|
|
307
|
+
failureClass: 'success';
|
|
308
|
+
failureMode?: undefined;
|
|
309
|
+
} | {
|
|
310
|
+
failureClass: Exclude<FailureClass, 'success'>;
|
|
311
|
+
failureMode?: string;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Return task quality, preferring held-out evidence when both scores exist.
|
|
315
|
+
*
|
|
316
|
+
* RAW: no realness protection is applied. Built on `observedScore` rather
|
|
317
|
+
* than repeating the split derivation, so only `rollout/reward.ts` reads the
|
|
318
|
+
* raw fields. Anything that becomes training data must use `trainingScore` or
|
|
319
|
+
* `trainingReward` instead.
|
|
320
|
+
*/
|
|
321
|
+
declare function runTaskScore(record: RunRecord): number | undefined;
|
|
322
|
+
declare class RunRecordValidationError extends ValidationError {
|
|
323
|
+
readonly path: string;
|
|
324
|
+
constructor(message: string, path?: string);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Strict validator. Throws `RunRecordValidationError` on the first
|
|
328
|
+
* missing or wrongly-typed field. Returns the input cast to
|
|
329
|
+
* `RunRecord` on success — the validator does not coerce.
|
|
330
|
+
*/
|
|
331
|
+
declare function validateRunRecord(input: unknown): RunRecord;
|
|
332
|
+
/** Boolean validator — convenience for filtering arrays. */
|
|
333
|
+
declare function isRunRecord(input: unknown): input is RunRecord;
|
|
334
|
+
/** Non-throwing validator — returns a discriminated union. */
|
|
335
|
+
declare function parseRunRecordSafe(input: unknown): {
|
|
336
|
+
ok: true;
|
|
337
|
+
value: RunRecord;
|
|
338
|
+
} | {
|
|
339
|
+
ok: false;
|
|
340
|
+
error: RunRecordValidationError;
|
|
341
|
+
};
|
|
342
|
+
/** Round-trip helper — `JSON.parse(JSON.stringify(record))` then validate. */
|
|
343
|
+
declare function roundTripRunRecord(record: RunRecord): RunRecord;
|
|
344
|
+
/**
|
|
345
|
+
* Heuristic snapshot check. Accepts:
|
|
346
|
+
* - `name@YYYY-MM-DD` (Anthropic style: `claude-sonnet-4-6@2025-04-15`)
|
|
347
|
+
* - `name-YYYYMMDD` (OpenAI style: `gpt-4o-2024-11-20`)
|
|
348
|
+
* - `name@<arbitrary-token>` (allow opaque snapshots like `@v3`)
|
|
349
|
+
* - explicit `:date-...` Vertex-style tags
|
|
350
|
+
*
|
|
351
|
+
* Rejects bare aliases like `claude-sonnet-4` or `gpt-4o` that remap
|
|
352
|
+
* silently as providers ship new snapshots.
|
|
353
|
+
*/
|
|
354
|
+
declare function modelHasSnapshot(model: string): boolean;
|
|
355
|
+
//#endregion
|
|
356
|
+
export { agentProfileCellHashMaterial as A, AgentProfileDimensionValue as C, AgentProfileKind as D, AgentProfileJsonObject as E, groupRunsByAgentProfileCell as F, requireAgentProfileCell as I, toAgentProfileJson as L, assertRunAgentProfileCell as M, buildAgentInterfaceProfileCell as N, AgentProfileSource as O, buildAgentProfileCell as P, validateAgentProfileCell as R, AgentProfileCellValidationError as S, AgentProfileJson as T, AGENT_PROFILE_KINDS as _, RunRecord as a, AgentProfileCellInput as b, RunTaskFailure as c, isRunRecord as d, modelHasSnapshot as f, validateRunRecord as g, runTaskScore as h, RunOutcome as i, agentProfileCellKey as j, AgentProfileSourceInput as k, RunTerminalOutcome as l, roundTripRunRecord as m, RunCostProvenance as n, RunRecordValidationError as o, parseRunRecordSafe as p, RunJudgeMetadata as r, RunSplitTag as s, JudgeScoresRecord as t, RunTokenUsage as u, AgentInterfaceProfileLike as v, AgentProfileHarness as w, AgentProfileCellSchemaVersion as x, AgentProfileCell as y, verifyAgentProfileCell as z };
|
|
357
|
+
//# sourceMappingURL=run-record-CnZu_gjl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-record-CnZu_gjl.d.ts","names":[],"sources":["../src/agent-profile-cell.ts","../src/run-record.ts"],"mappings":";;;;KAIY;KAEA;GAA4B,cAAc;;KAE1C,sDAKR,qBACA;KAEQ;UAEK;;EAEf;;EAEA;;UAGe;EACf;;EAEA;;EAEA,UAAU;;UAGK;EACf;EACA;EACA;;UAGe;EACf;EACA,eAAe;EACf,UAAU;EACV;EACA;EACA,aAAa,eAAe;;UAGb;EACf,eAAe;EACf;EACA;EACA,eAAe;EACf,UAAU;EACV;EACA;EACA,aAAa,eAAe;;cAGjB,wCAAwC;WAC1C;EACT,YAAY,iBAAiB;;iBAST,sBACpB,OAAO,wBACN,QAAQ;iBAMK,6BACd,MAAM,mBACL,KAAK;;;;iBASc,uBAAuB,MAAM,mBAAmB;iBAQtD,yBAAyB,iBAAiB;iBAqB1C,wBAAwB;EACtC;EACA,eAAe;IACb;iBAUY,oBAAoB;EAClC;EACA,eAAe;;iBAKK,0BAA0B;EAC9C;EACA;EACA;EACA,eAAe;IACb,QAAQ;iBAuBI,4BACd;EAAY;EAAe,eAAe;GAC1C,kBAAkB,MAAM,YAAY;;;;;cA0NzB;;;;WAIX;;KAGU,2BAA2B,kCAAkC;;;;;iBAMzD,mBAAmB,iBAAiB;;KAoBxC,4BAA4B;EAAiB;EAAc;;;;;;;;;;;iBAWjD,+BACpB,SAAS,2BACT,OAAO,KAAK,wDACX,QAAQ;;;;;KC5YC;;;;;;;KAQA;UAEK;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;KAMU;EACN;EAAkB;;EAClB;EAAmB;;EACnB;EAAoB;;UAET;EACf;EACA;;;EAGA;;;EAGA;;;;;;;;;;;;;;;;;;;;;UAsBe;;EAEf,UAAU,eAAe;;EAEzB,YAAY;;;EAGZ;;;;EAIA;;;EAGA;;UAGe;;;EAGf;;;EAGA;;;;EAIA,KAAK;;;;;;EAML,cAAc;;;;;;;EAOd;IAAa;IAAe;IAAgB;;;;;;;;;;;;;;;;;;;UAmB7B;;EAEf;;;EAGA;;;EAGA;;;EAGA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,gBAAgB;;EAEhB,YAAY;;EAEZ,iBAAiB;;;EAGjB;;EAEA,gBAAgB;;EAEhB,SAAS;;;;;EAKT,eAAe;;;EAGf;;EAEA,UAAU;;;;;EAKV;;;;;;;;EAQA,eAAe;;;;;;;;;KAUL;EACN;EAA0B;;EAC1B;EAAyB;;EAEzB,cAAc,QAAQ;EACtB;;;;;;;;;;iBAWU,aAAa,QAAQ;cAmCxB,iCAAiC;WACnC;EACT,YAAY,iBAAiB;;;;;;;iBAWf,kBAAkB,iBAAiB;;iBAiOnC,YAAY,iBAAiB,SAAS;;iBAUtC,mBACd;EACG;EAAU,OAAO;;EAAgB;EAAW,OAAO;;;iBAUxC,mBAAmB,QAAQ,YAAY;;;;;;;;;;;iBA2FvC,iBAAiB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/abort-signal.ts
|
|
2
|
+
/** Combine active cancellation sources without wrapping a single source. */
|
|
3
|
+
function combineAbortSignals(...signals) {
|
|
4
|
+
const active = [...new Set(signals.filter((signal) => signal !== void 0))];
|
|
5
|
+
if (active.length === 0) return void 0;
|
|
6
|
+
if (active.length === 1) return active[0];
|
|
7
|
+
return AbortSignal.any(active);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/run-score.ts
|
|
11
|
+
const DEFAULT_RUN_SCORE_WEIGHTS = {
|
|
12
|
+
success: 4,
|
|
13
|
+
goalProgress: 2,
|
|
14
|
+
repoGroundedness: 1.5,
|
|
15
|
+
driftPenalty: -1.5,
|
|
16
|
+
toolUseQuality: 1,
|
|
17
|
+
patchQuality: 1.25,
|
|
18
|
+
testReality: 1.5,
|
|
19
|
+
finalGate: 3,
|
|
20
|
+
reviewerBlockers: -2,
|
|
21
|
+
costUsd: -.2,
|
|
22
|
+
wallSeconds: -.1
|
|
23
|
+
};
|
|
24
|
+
function aggregateRunScore(score, weights = {}) {
|
|
25
|
+
const w = {
|
|
26
|
+
...DEFAULT_RUN_SCORE_WEIGHTS,
|
|
27
|
+
...weights
|
|
28
|
+
};
|
|
29
|
+
return w.success * clamp01(score.success) + w.goalProgress * clamp01(score.goalProgress) + w.repoGroundedness * clamp01(score.repoGroundedness) + w.driftPenalty * clamp01(score.driftPenalty) + w.toolUseQuality * clamp01(score.toolUseQuality) + w.patchQuality * clamp01(score.patchQuality) + w.testReality * clamp01(score.testReality) + w.finalGate * clamp01(score.finalGate) + w.reviewerBlockers * clamp01(score.reviewerBlockers) + w.costUsd * Math.max(0, finiteOrZero(score.costUsd)) + w.wallSeconds * Math.max(0, finiteOrZero(score.wallSeconds) / 60);
|
|
30
|
+
}
|
|
31
|
+
function clamp01(value) {
|
|
32
|
+
if (!Number.isFinite(value)) return 0;
|
|
33
|
+
return Math.max(0, Math.min(1, value));
|
|
34
|
+
}
|
|
35
|
+
function finiteOrZero(value) {
|
|
36
|
+
return Number.isFinite(value) ? value : 0;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { combineAbortSignals as i, aggregateRunScore as n, clamp01 as r, DEFAULT_RUN_SCORE_WEIGHTS as t };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=run-score-iEEAWiBY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-score-iEEAWiBY.js","names":[],"sources":["../src/abort-signal.ts","../src/run-score.ts"],"sourcesContent":["/** Combine active cancellation sources without wrapping a single source. */\nexport function combineAbortSignals(\n ...signals: Array<AbortSignal | undefined>\n): AbortSignal | undefined {\n const active = [\n ...new Set(signals.filter((signal): signal is AbortSignal => signal !== undefined)),\n ]\n if (active.length === 0) return undefined\n if (active.length === 1) return active[0]\n return AbortSignal.any(active)\n}\n","export interface RunScore {\n success: number\n goalProgress: number\n repoGroundedness: number\n driftPenalty: number\n toolUseQuality: number\n patchQuality: number\n testReality: number\n finalGate: number\n reviewerBlockers: number\n costUsd: number\n wallSeconds: number\n notes?: string[]\n}\n\nexport interface RunScoreWeights {\n success: number\n goalProgress: number\n repoGroundedness: number\n driftPenalty: number\n toolUseQuality: number\n patchQuality: number\n testReality: number\n finalGate: number\n reviewerBlockers: number\n costUsd: number\n wallSeconds: number\n}\n\nexport const DEFAULT_RUN_SCORE_WEIGHTS: RunScoreWeights = {\n success: 4,\n goalProgress: 2,\n repoGroundedness: 1.5,\n driftPenalty: -1.5,\n toolUseQuality: 1,\n patchQuality: 1.25,\n testReality: 1.5,\n finalGate: 3,\n reviewerBlockers: -2,\n costUsd: -0.2,\n wallSeconds: -0.1,\n}\n\nexport function aggregateRunScore(score: RunScore, weights: Partial<RunScoreWeights> = {}): number {\n const w = { ...DEFAULT_RUN_SCORE_WEIGHTS, ...weights }\n return (\n w.success * clamp01(score.success) +\n w.goalProgress * clamp01(score.goalProgress) +\n w.repoGroundedness * clamp01(score.repoGroundedness) +\n w.driftPenalty * clamp01(score.driftPenalty) +\n w.toolUseQuality * clamp01(score.toolUseQuality) +\n w.patchQuality * clamp01(score.patchQuality) +\n w.testReality * clamp01(score.testReality) +\n w.finalGate * clamp01(score.finalGate) +\n w.reviewerBlockers * clamp01(score.reviewerBlockers) +\n w.costUsd * Math.max(0, finiteOrZero(score.costUsd)) +\n w.wallSeconds * Math.max(0, finiteOrZero(score.wallSeconds) / 60)\n )\n}\n\nexport function clamp01(value: number): number {\n if (!Number.isFinite(value)) return 0\n return Math.max(0, Math.min(1, value))\n}\n\nfunction finiteOrZero(value: number): number {\n return Number.isFinite(value) ? value : 0\n}\n"],"mappings":";;AACA,SAAgB,oBACd,GAAG,SACsB;CACzB,MAAM,SAAS,CACb,GAAG,IAAI,IAAI,QAAQ,QAAQ,WAAkC,WAAW,KAAA,CAAS,CAAC,CACpF;CACA,IAAI,OAAO,WAAW,GAAG,OAAO,KAAA;CAChC,IAAI,OAAO,WAAW,GAAG,OAAO,OAAO;CACvC,OAAO,YAAY,IAAI,MAAM;AAC/B;;;ACmBA,MAAa,4BAA6C;CACxD,SAAS;CACT,cAAc;CACd,kBAAkB;CAClB,cAAc;CACd,gBAAgB;CAChB,cAAc;CACd,aAAa;CACb,WAAW;CACX,kBAAkB;CAClB,SAAS;CACT,aAAa;AACf;AAEA,SAAgB,kBAAkB,OAAiB,UAAoC,CAAC,GAAW;CACjG,MAAM,IAAI;EAAE,GAAG;EAA2B,GAAG;CAAQ;CACrD,OACE,EAAE,UAAU,QAAQ,MAAM,OAAO,IACjC,EAAE,eAAe,QAAQ,MAAM,YAAY,IAC3C,EAAE,mBAAmB,QAAQ,MAAM,gBAAgB,IACnD,EAAE,eAAe,QAAQ,MAAM,YAAY,IAC3C,EAAE,iBAAiB,QAAQ,MAAM,cAAc,IAC/C,EAAE,eAAe,QAAQ,MAAM,YAAY,IAC3C,EAAE,cAAc,QAAQ,MAAM,WAAW,IACzC,EAAE,YAAY,QAAQ,MAAM,SAAS,IACrC,EAAE,mBAAmB,QAAQ,MAAM,gBAAgB,IACnD,EAAE,UAAU,KAAK,IAAI,GAAG,aAAa,MAAM,OAAO,CAAC,IACnD,EAAE,cAAc,KAAK,IAAI,GAAG,aAAa,MAAM,WAAW,IAAI,EAAE;AAEpE;AAEA,SAAgB,QAAQ,OAAuB;CAC7C,IAAI,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CACpC,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC;AACvC;AAEA,SAAS,aAAa,OAAuB;CAC3C,OAAO,OAAO,SAAS,KAAK,IAAI,QAAQ;AAC1C"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//#region src/runtime-trajectory.ts
|
|
2
|
+
const DEFAULT_SPLIT_TAG = "search";
|
|
3
|
+
function projectRuntimeTrajectoryEvidence(options) {
|
|
4
|
+
const diagnostics = [];
|
|
5
|
+
const runsById = /* @__PURE__ */ new Map();
|
|
6
|
+
const events = [];
|
|
7
|
+
let recordWithRuntimeEventsCount = 0;
|
|
8
|
+
let defaultedSplitCount = 0;
|
|
9
|
+
for (let recordIndex = 0; recordIndex < options.records.length; recordIndex += 1) {
|
|
10
|
+
const record = options.records[recordIndex];
|
|
11
|
+
const key = runtimeTrajectoryRecordKey(record, recordIndex, options.recordIdOf);
|
|
12
|
+
const splitTag = record.splitTag ?? options.defaultSplitTag ?? DEFAULT_SPLIT_TAG;
|
|
13
|
+
if (record.splitTag === void 0) defaultedSplitCount += 1;
|
|
14
|
+
const rawEvents = record.runtimeEvents;
|
|
15
|
+
if (!Array.isArray(rawEvents)) {
|
|
16
|
+
diagnostics.push(`${key}: runtimeEvents is not an array; no runtime run join can be extracted`);
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
if (rawEvents.length === 0) {
|
|
20
|
+
diagnostics.push(`${key}: no runtimeEvents; no runtime run join can be extracted`);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
recordWithRuntimeEventsCount += 1;
|
|
24
|
+
for (let index = 0; index < rawEvents.length; index += 1) {
|
|
25
|
+
const event = parseRuntimeTrajectoryHookEvent(rawEvents[index]);
|
|
26
|
+
if (!event) {
|
|
27
|
+
diagnostics.push(`${key}: runtimeEvents[${index}] is not a RuntimeHookEvent`);
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
events.push(event);
|
|
31
|
+
const scenarioId = event.scenarioId ?? stringOrUndefined(options.scenarioIdOf?.(record, recordIndex)) ?? stringOrUndefined(record.scenarioId);
|
|
32
|
+
const prior = runsById.get(event.runId);
|
|
33
|
+
if (!prior) {
|
|
34
|
+
runsById.set(event.runId, {
|
|
35
|
+
runId: event.runId,
|
|
36
|
+
scenarioId,
|
|
37
|
+
splitTag
|
|
38
|
+
});
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (prior.scenarioId !== scenarioId || prior.splitTag !== splitTag) diagnostics.push(`${key}: runId ${event.runId} has conflicting scenario/split metadata`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const runs = [...runsById.values()];
|
|
45
|
+
return {
|
|
46
|
+
runs,
|
|
47
|
+
events,
|
|
48
|
+
summary: {
|
|
49
|
+
recordCount: options.records.length,
|
|
50
|
+
recordWithRuntimeEventsCount,
|
|
51
|
+
runtimeRunCount: runs.length,
|
|
52
|
+
lifecycleEventCount: events.length,
|
|
53
|
+
defaultedSplitCount
|
|
54
|
+
},
|
|
55
|
+
diagnostics
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function parseRuntimeTrajectoryHookEvent(input) {
|
|
59
|
+
if (!isRecord(input)) return null;
|
|
60
|
+
if (typeof input.id !== "string" || input.id.length === 0) return null;
|
|
61
|
+
if (typeof input.runId !== "string" || input.runId.length === 0) return null;
|
|
62
|
+
if (typeof input.target !== "string" || input.target.length === 0) return null;
|
|
63
|
+
if (typeof input.phase !== "string" || input.phase.length === 0) return null;
|
|
64
|
+
if (typeof input.timestamp !== "number" || !Number.isFinite(input.timestamp)) return null;
|
|
65
|
+
return {
|
|
66
|
+
id: input.id,
|
|
67
|
+
runId: input.runId,
|
|
68
|
+
scenarioId: stringOrUndefined(input.scenarioId),
|
|
69
|
+
target: input.target,
|
|
70
|
+
phase: input.phase,
|
|
71
|
+
timestamp: input.timestamp,
|
|
72
|
+
stepIndex: finiteNumberOrUndefined(input.stepIndex),
|
|
73
|
+
parentId: stringOrUndefined(input.parentId),
|
|
74
|
+
payload: input.payload,
|
|
75
|
+
metadata: isRecord(input.metadata) ? { ...input.metadata } : void 0
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function runtimeTrajectoryRecordKey(record, index, recordIdOf) {
|
|
79
|
+
return stringOrUndefined(recordIdOf?.(record, index)) ?? stringOrUndefined(record.id) ?? `record[${index}]`;
|
|
80
|
+
}
|
|
81
|
+
function isRecord(value) {
|
|
82
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
83
|
+
}
|
|
84
|
+
function stringOrUndefined(value) {
|
|
85
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
86
|
+
}
|
|
87
|
+
function finiteNumberOrUndefined(value) {
|
|
88
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { projectRuntimeTrajectoryEvidence as n, parseRuntimeTrajectoryHookEvent as t };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=runtime-trajectory-1gyaTOoC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-trajectory-1gyaTOoC.js","names":[],"sources":["../src/runtime-trajectory.ts"],"sourcesContent":["import type { RunSplitTag } from './run-record'\n\nexport interface RuntimeTrajectoryHookEvent {\n id: string\n runId: string\n scenarioId?: string\n target: string\n phase: string\n timestamp: number\n stepIndex?: number\n parentId?: string\n payload?: unknown\n metadata?: Record<string, unknown>\n}\n\nexport interface RuntimeTrajectoryRecord {\n id?: string\n scenarioId?: string\n splitTag?: RunSplitTag\n runtimeEvents?: unknown\n [key: string]: unknown\n}\n\nexport interface RuntimeTrajectoryRunRecord {\n runId: string\n scenarioId?: string\n splitTag: RunSplitTag\n}\n\nexport interface RuntimeTrajectoryEvidenceSummary {\n recordCount: number\n recordWithRuntimeEventsCount: number\n runtimeRunCount: number\n lifecycleEventCount: number\n defaultedSplitCount: number\n}\n\nexport interface RuntimeTrajectoryEvidenceProjection {\n runs: RuntimeTrajectoryRunRecord[]\n events: RuntimeTrajectoryHookEvent[]\n summary: RuntimeTrajectoryEvidenceSummary\n diagnostics: string[]\n}\n\nexport interface ProjectRuntimeTrajectoryEvidenceOptions<\n TRecord extends RuntimeTrajectoryRecord = RuntimeTrajectoryRecord,\n> {\n records: TRecord[]\n defaultSplitTag?: RunSplitTag\n recordIdOf?: (record: TRecord, index: number) => string | undefined\n scenarioIdOf?: (record: TRecord, index: number) => string | undefined\n}\n\nconst DEFAULT_SPLIT_TAG: RunSplitTag = 'search'\n\nexport function projectRuntimeTrajectoryEvidence<TRecord extends RuntimeTrajectoryRecord>(\n options: ProjectRuntimeTrajectoryEvidenceOptions<TRecord>,\n): RuntimeTrajectoryEvidenceProjection {\n const diagnostics: string[] = []\n const runsById = new Map<string, RuntimeTrajectoryRunRecord>()\n const events: RuntimeTrajectoryHookEvent[] = []\n let recordWithRuntimeEventsCount = 0\n let defaultedSplitCount = 0\n\n for (let recordIndex = 0; recordIndex < options.records.length; recordIndex += 1) {\n const record = options.records[recordIndex]!\n const key = runtimeTrajectoryRecordKey(record, recordIndex, options.recordIdOf)\n const splitTag = record.splitTag ?? options.defaultSplitTag ?? DEFAULT_SPLIT_TAG\n if (record.splitTag === undefined) defaultedSplitCount += 1\n\n const rawEvents = record.runtimeEvents\n if (!Array.isArray(rawEvents)) {\n diagnostics.push(\n `${key}: runtimeEvents is not an array; no runtime run join can be extracted`,\n )\n continue\n }\n if (rawEvents.length === 0) {\n diagnostics.push(`${key}: no runtimeEvents; no runtime run join can be extracted`)\n continue\n }\n recordWithRuntimeEventsCount += 1\n\n for (let index = 0; index < rawEvents.length; index += 1) {\n const event = parseRuntimeTrajectoryHookEvent(rawEvents[index])\n if (!event) {\n diagnostics.push(`${key}: runtimeEvents[${index}] is not a RuntimeHookEvent`)\n continue\n }\n events.push(event)\n\n const scenarioId =\n event.scenarioId ??\n stringOrUndefined(options.scenarioIdOf?.(record, recordIndex)) ??\n stringOrUndefined(record.scenarioId)\n const prior = runsById.get(event.runId)\n if (!prior) {\n runsById.set(event.runId, { runId: event.runId, scenarioId, splitTag })\n continue\n }\n if (prior.scenarioId !== scenarioId || prior.splitTag !== splitTag) {\n diagnostics.push(`${key}: runId ${event.runId} has conflicting scenario/split metadata`)\n }\n }\n }\n\n const runs = [...runsById.values()]\n return {\n runs,\n events,\n summary: {\n recordCount: options.records.length,\n recordWithRuntimeEventsCount,\n runtimeRunCount: runs.length,\n lifecycleEventCount: events.length,\n defaultedSplitCount,\n },\n diagnostics,\n }\n}\n\nexport function parseRuntimeTrajectoryHookEvent(input: unknown): RuntimeTrajectoryHookEvent | null {\n if (!isRecord(input)) return null\n if (typeof input.id !== 'string' || input.id.length === 0) return null\n if (typeof input.runId !== 'string' || input.runId.length === 0) return null\n if (typeof input.target !== 'string' || input.target.length === 0) return null\n if (typeof input.phase !== 'string' || input.phase.length === 0) return null\n if (typeof input.timestamp !== 'number' || !Number.isFinite(input.timestamp)) return null\n\n return {\n id: input.id,\n runId: input.runId,\n scenarioId: stringOrUndefined(input.scenarioId),\n target: input.target,\n phase: input.phase,\n timestamp: input.timestamp,\n stepIndex: finiteNumberOrUndefined(input.stepIndex),\n parentId: stringOrUndefined(input.parentId),\n payload: input.payload,\n metadata: isRecord(input.metadata) ? { ...input.metadata } : undefined,\n }\n}\n\nfunction runtimeTrajectoryRecordKey<TRecord extends RuntimeTrajectoryRecord>(\n record: TRecord,\n index: number,\n recordIdOf?: (record: TRecord, index: number) => string | undefined,\n): string {\n return (\n stringOrUndefined(recordIdOf?.(record, index)) ??\n stringOrUndefined(record.id) ??\n `record[${index}]`\n )\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nfunction stringOrUndefined(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined\n}\n\nfunction finiteNumberOrUndefined(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined\n}\n"],"mappings":";AAqDA,MAAM,oBAAiC;AAEvC,SAAgB,iCACd,SACqC;CACrC,MAAM,cAAwB,CAAC;CAC/B,MAAM,2BAAW,IAAI,IAAwC;CAC7D,MAAM,SAAuC,CAAC;CAC9C,IAAI,+BAA+B;CACnC,IAAI,sBAAsB;CAE1B,KAAK,IAAI,cAAc,GAAG,cAAc,QAAQ,QAAQ,QAAQ,eAAe,GAAG;EAChF,MAAM,SAAS,QAAQ,QAAQ;EAC/B,MAAM,MAAM,2BAA2B,QAAQ,aAAa,QAAQ,UAAU;EAC9E,MAAM,WAAW,OAAO,YAAY,QAAQ,mBAAmB;EAC/D,IAAI,OAAO,aAAa,KAAA,GAAW,uBAAuB;EAE1D,MAAM,YAAY,OAAO;EACzB,IAAI,CAAC,MAAM,QAAQ,SAAS,GAAG;GAC7B,YAAY,KACV,GAAG,IAAI,sEACT;GACA;EACF;EACA,IAAI,UAAU,WAAW,GAAG;GAC1B,YAAY,KAAK,GAAG,IAAI,yDAAyD;GACjF;EACF;EACA,gCAAgC;EAEhC,KAAK,IAAI,QAAQ,GAAG,QAAQ,UAAU,QAAQ,SAAS,GAAG;GACxD,MAAM,QAAQ,gCAAgC,UAAU,MAAM;GAC9D,IAAI,CAAC,OAAO;IACV,YAAY,KAAK,GAAG,IAAI,kBAAkB,MAAM,4BAA4B;IAC5E;GACF;GACA,OAAO,KAAK,KAAK;GAEjB,MAAM,aACJ,MAAM,cACN,kBAAkB,QAAQ,eAAe,QAAQ,WAAW,CAAC,KAC7D,kBAAkB,OAAO,UAAU;GACrC,MAAM,QAAQ,SAAS,IAAI,MAAM,KAAK;GACtC,IAAI,CAAC,OAAO;IACV,SAAS,IAAI,MAAM,OAAO;KAAE,OAAO,MAAM;KAAO;KAAY;IAAS,CAAC;IACtE;GACF;GACA,IAAI,MAAM,eAAe,cAAc,MAAM,aAAa,UACxD,YAAY,KAAK,GAAG,IAAI,UAAU,MAAM,MAAM,yCAAyC;EAE3F;CACF;CAEA,MAAM,OAAO,CAAC,GAAG,SAAS,OAAO,CAAC;CAClC,OAAO;EACL;EACA;EACA,SAAS;GACP,aAAa,QAAQ,QAAQ;GAC7B;GACA,iBAAiB,KAAK;GACtB,qBAAqB,OAAO;GAC5B;EACF;EACA;CACF;AACF;AAEA,SAAgB,gCAAgC,OAAmD;CACjG,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO;CAC7B,IAAI,OAAO,MAAM,OAAO,YAAY,MAAM,GAAG,WAAW,GAAG,OAAO;CAClE,IAAI,OAAO,MAAM,UAAU,YAAY,MAAM,MAAM,WAAW,GAAG,OAAO;CACxE,IAAI,OAAO,MAAM,WAAW,YAAY,MAAM,OAAO,WAAW,GAAG,OAAO;CAC1E,IAAI,OAAO,MAAM,UAAU,YAAY,MAAM,MAAM,WAAW,GAAG,OAAO;CACxE,IAAI,OAAO,MAAM,cAAc,YAAY,CAAC,OAAO,SAAS,MAAM,SAAS,GAAG,OAAO;CAErF,OAAO;EACL,IAAI,MAAM;EACV,OAAO,MAAM;EACb,YAAY,kBAAkB,MAAM,UAAU;EAC9C,QAAQ,MAAM;EACd,OAAO,MAAM;EACb,WAAW,MAAM;EACjB,WAAW,wBAAwB,MAAM,SAAS;EAClD,UAAU,kBAAkB,MAAM,QAAQ;EAC1C,SAAS,MAAM;EACf,UAAU,SAAS,MAAM,QAAQ,IAAI,EAAE,GAAG,MAAM,SAAS,IAAI,KAAA;CAC/D;AACF;AAEA,SAAS,2BACP,QACA,OACA,YACQ;CACR,OACE,kBAAkB,aAAa,QAAQ,KAAK,CAAC,KAC7C,kBAAkB,OAAO,EAAE,KAC3B,UAAU,MAAM;AAEpB;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,kBAAkB,OAAoC;CAC7D,OAAO,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,QAAQ,KAAA;AACjE;AAEA,SAAS,wBAAwB,OAAoC;CACnE,OAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAA;AACvE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { s as RunSplitTag } from "./run-record-CnZu_gjl.js";
|
|
2
|
+
//#region src/runtime-trajectory.d.ts
|
|
3
|
+
interface RuntimeTrajectoryHookEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
runId: string;
|
|
6
|
+
scenarioId?: string;
|
|
7
|
+
target: string;
|
|
8
|
+
phase: string;
|
|
9
|
+
timestamp: number;
|
|
10
|
+
stepIndex?: number;
|
|
11
|
+
parentId?: string;
|
|
12
|
+
payload?: unknown;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
interface RuntimeTrajectoryRecord {
|
|
16
|
+
id?: string;
|
|
17
|
+
scenarioId?: string;
|
|
18
|
+
splitTag?: RunSplitTag;
|
|
19
|
+
runtimeEvents?: unknown;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
interface RuntimeTrajectoryRunRecord {
|
|
23
|
+
runId: string;
|
|
24
|
+
scenarioId?: string;
|
|
25
|
+
splitTag: RunSplitTag;
|
|
26
|
+
}
|
|
27
|
+
interface RuntimeTrajectoryEvidenceSummary {
|
|
28
|
+
recordCount: number;
|
|
29
|
+
recordWithRuntimeEventsCount: number;
|
|
30
|
+
runtimeRunCount: number;
|
|
31
|
+
lifecycleEventCount: number;
|
|
32
|
+
defaultedSplitCount: number;
|
|
33
|
+
}
|
|
34
|
+
interface RuntimeTrajectoryEvidenceProjection {
|
|
35
|
+
runs: RuntimeTrajectoryRunRecord[];
|
|
36
|
+
events: RuntimeTrajectoryHookEvent[];
|
|
37
|
+
summary: RuntimeTrajectoryEvidenceSummary;
|
|
38
|
+
diagnostics: string[];
|
|
39
|
+
}
|
|
40
|
+
interface ProjectRuntimeTrajectoryEvidenceOptions<TRecord extends RuntimeTrajectoryRecord = RuntimeTrajectoryRecord> {
|
|
41
|
+
records: TRecord[];
|
|
42
|
+
defaultSplitTag?: RunSplitTag;
|
|
43
|
+
recordIdOf?: (record: TRecord, index: number) => string | undefined;
|
|
44
|
+
scenarioIdOf?: (record: TRecord, index: number) => string | undefined;
|
|
45
|
+
}
|
|
46
|
+
declare function projectRuntimeTrajectoryEvidence<TRecord extends RuntimeTrajectoryRecord>(options: ProjectRuntimeTrajectoryEvidenceOptions<TRecord>): RuntimeTrajectoryEvidenceProjection;
|
|
47
|
+
declare function parseRuntimeTrajectoryHookEvent(input: unknown): RuntimeTrajectoryHookEvent | null;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { RuntimeTrajectoryRecord as a, projectRuntimeTrajectoryEvidence as c, RuntimeTrajectoryHookEvent as i, RuntimeTrajectoryEvidenceProjection as n, RuntimeTrajectoryRunRecord as o, RuntimeTrajectoryEvidenceSummary as r, parseRuntimeTrajectoryHookEvent as s, ProjectRuntimeTrajectoryEvidenceOptions as t };
|
|
50
|
+
//# sourceMappingURL=runtime-trajectory-BvSZcCHD.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-trajectory-BvSZcCHD.d.ts","names":[],"sources":["../src/runtime-trajectory.ts"],"mappings":";;UAEiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf;EACA;EACA,WAAW;EACX;GACC;;UAGc;EACf;EACA;EACA,UAAU;;UAGK;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf,MAAM;EACN,QAAQ;EACR,SAAS;EACT;;UAGe,wCACf,gBAAgB,0BAA0B;EAE1C,SAAS;EACT,kBAAkB;EAClB,cAAc,QAAQ,SAAS;EAC/B,gBAAgB,QAAQ,SAAS;;iBAKnB,iCAAiC,gBAAgB,yBAC/D,SAAS,wCAAwC,WAChD;iBAgEa,gCAAgC,iBAAiB"}
|