@tangle-network/agent-eval 0.172.1 → 0.173.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 +19 -0
- package/README.md +17 -2
- package/dist/adapters/http.d.ts +2 -2
- package/dist/analyst/index.d.ts +13 -13
- package/dist/analyst/index.js +7 -6
- package/dist/analyst/index.js.map +1 -1
- package/dist/{attestation-CJBGmMVh.d.ts → attestation-c1QvaBdX.d.ts} +2 -2
- package/dist/{attestation-CJBGmMVh.d.ts.map → attestation-c1QvaBdX.d.ts.map} +1 -1
- package/dist/{backend-integrity-e79K3UPD.d.ts → backend-integrity-CeuTgqsd.d.ts} +3 -4
- package/dist/backend-integrity-CeuTgqsd.d.ts.map +1 -0
- package/dist/{benchmark-h-h4bfqj.d.ts → benchmark-BjLGkfnN.d.ts} +3 -3
- package/dist/{benchmark-h-h4bfqj.d.ts.map → benchmark-BjLGkfnN.d.ts.map} +1 -1
- package/dist/{benchmark-command--qeZUHbu.js → benchmark-command-9S20PRel.js} +9 -9
- package/dist/{benchmark-command--qeZUHbu.js.map → benchmark-command-9S20PRel.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +5 -5
- package/dist/benchmarks/index.js +3 -3
- package/dist/{bounded-process-VIi0KSL2.js → bounded-process-BBZob7vl.js} +30 -7
- package/dist/bounded-process-BBZob7vl.js.map +1 -0
- package/dist/builder-eval/index.d.ts +3 -3
- package/dist/builder-eval/index.js +2 -2
- package/dist/campaign/index.d.ts +9 -9
- package/dist/campaign/index.js +6 -6
- package/dist/{campaign-Dp35pBbS.js → campaign-pxS0wmo4.js} +8 -8
- package/dist/{campaign-Dp35pBbS.js.map → campaign-pxS0wmo4.js.map} +1 -1
- package/dist/chat-client-Db4bqYfA.js +115 -0
- package/dist/chat-client-Db4bqYfA.js.map +1 -0
- package/dist/{chat-json-call-5Jxna-aV.js → chat-json-call-C26igCih.js} +16 -6
- package/dist/chat-json-call-C26igCih.js.map +1 -0
- package/dist/cli.js +31 -17
- package/dist/cli.js.map +1 -1
- package/dist/{client-BvwNkIRN.js → client-BlLY6o2w.js} +2 -2
- package/dist/{client-BvwNkIRN.js.map → client-BlLY6o2w.js.map} +1 -1
- package/dist/{client-Df7wdslk.d.ts → client-DlqdbM7n.d.ts} +4 -4
- package/dist/{client-Df7wdslk.d.ts.map → client-DlqdbM7n.d.ts.map} +1 -1
- package/dist/contract/index.d.ts +13 -13
- package/dist/contract/index.js +202 -10
- package/dist/contract/index.js.map +1 -1
- package/dist/{counterfactual-Bee5_BIn.d.ts → counterfactual-CLgrwhkY.d.ts} +4 -4
- package/dist/{counterfactual-Bee5_BIn.d.ts.map → counterfactual-CLgrwhkY.d.ts.map} +1 -1
- package/dist/{chat-client-DI79OPye.js → default-registry-B0bKikCb.js} +3 -39
- package/dist/default-registry-B0bKikCb.js.map +1 -0
- package/dist/{default-registry-XxedTLwu.d.ts → default-registry-BKwc8bN5.d.ts} +6 -6
- package/dist/{default-registry-XxedTLwu.d.ts.map → default-registry-BKwc8bN5.d.ts.map} +1 -1
- package/dist/{define-agent-eval-0wW7gFhr.d.ts → define-agent-eval-CY6qdlGV.d.ts} +6 -6
- package/dist/{define-agent-eval-0wW7gFhr.d.ts.map → define-agent-eval-CY6qdlGV.d.ts.map} +1 -1
- package/dist/{define-agent-eval-jS8xj_Q_.js → define-agent-eval-D_i_s69h.js} +7 -7
- package/dist/{define-agent-eval-jS8xj_Q_.js.map → define-agent-eval-D_i_s69h.js.map} +1 -1
- package/dist/{dspy-rlm-engine-CS3qcCEk.js → dspy-rlm-engine-D5byiHn9.js} +5 -6
- package/dist/dspy-rlm-engine-D5byiHn9.js.map +1 -0
- package/dist/{emitter-Bvnu0VzL.d.ts → emitter-Cs0egaFd.d.ts} +3 -3
- package/dist/{emitter-Bvnu0VzL.d.ts.map → emitter-Cs0egaFd.d.ts.map} +1 -1
- package/dist/{engine-BfRay1qD.d.ts → engine-DhFir3Ys.d.ts} +23 -8
- package/dist/{engine-BfRay1qD.d.ts.map → engine-DhFir3Ys.d.ts.map} +1 -1
- package/dist/{eval-campaign-JDTeE6Pl.js → eval-campaign-BeAjdhzC.js} +2 -2
- package/dist/{eval-campaign-JDTeE6Pl.js.map → eval-campaign-BeAjdhzC.js.map} +1 -1
- package/dist/{exact-types-BEecmnWm.d.ts → exact-types-BKOEILRP.d.ts} +2 -2
- package/dist/{exact-types-BEecmnWm.d.ts.map → exact-types-BKOEILRP.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +4 -4
- package/dist/{external-optimizer-contracts-szBJ_1vh.d.ts → external-optimizer-contracts-CQCpyrIL.d.ts} +2 -2
- package/dist/{external-optimizer-contracts-szBJ_1vh.d.ts.map → external-optimizer-contracts-CQCpyrIL.d.ts.map} +1 -1
- package/dist/{external-optimizer-process-CQxylYeG.js → external-optimizer-process-Cq_Pg15r.js} +2 -2
- package/dist/{external-optimizer-process-CQxylYeG.js.map → external-optimizer-process-Cq_Pg15r.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-Cex8Da2i.js → external-optimizer-subprocess-DgNebftP.js} +2 -2
- package/dist/{external-optimizer-subprocess-Cex8Da2i.js.map → external-optimizer-subprocess-DgNebftP.js.map} +1 -1
- package/dist/failure-cluster-OldNRoAt.d.ts +154 -0
- package/dist/failure-cluster-OldNRoAt.d.ts.map +1 -0
- package/dist/{feedback-trajectory-DIqpCyF0.d.ts → feedback-trajectory-CMnv_uYs.d.ts} +6 -6
- package/dist/{feedback-trajectory-DIqpCyF0.d.ts.map → feedback-trajectory-CMnv_uYs.d.ts.map} +1 -1
- package/dist/{heldout-gate-JgNRDZwZ.d.ts → heldout-gate-Df5hsqmm.d.ts} +7 -7
- package/dist/{heldout-gate-JgNRDZwZ.d.ts.map → heldout-gate-Df5hsqmm.d.ts.map} +1 -1
- package/dist/hosted/index.d.ts +2 -2
- package/dist/hosted/index.js +1 -1
- package/dist/{index-DnglhM0A.d.ts → index-BQqOjerE.d.ts} +94 -13
- package/dist/index-BQqOjerE.d.ts.map +1 -0
- package/dist/{index-_vPrVMRX.d.ts → index-CFDffsKz.d.ts} +11 -11
- package/dist/{index-_vPrVMRX.d.ts.map → index-CFDffsKz.d.ts.map} +1 -1
- package/dist/{index-DDAPhUJJ.d.ts → index-D0Db5X-4.d.ts} +45 -9
- package/dist/index-D0Db5X-4.d.ts.map +1 -0
- package/dist/{index-DMoxLG8P.d.ts → index-e7LXeRVa.d.ts} +3 -3
- package/dist/{index-DMoxLG8P.d.ts.map → index-e7LXeRVa.d.ts.map} +1 -1
- package/dist/index.d.ts +130 -42
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -41
- package/dist/index.js.map +1 -1
- package/dist/{insight-report-08F022xN.d.ts → insight-report-DETqPc_A.d.ts} +4 -4
- package/dist/{insight-report-08F022xN.d.ts.map → insight-report-DETqPc_A.d.ts.map} +1 -1
- package/dist/{integrity-B_EDELom.d.ts → integrity-BKTcA-HP.d.ts} +3 -3
- package/dist/{integrity-B_EDELom.d.ts.map → integrity-BKTcA-HP.d.ts.map} +1 -1
- package/dist/{kind-factory-DMeEoMQZ.js → kind-factory-gP6lDySe.js} +164 -149
- package/dist/kind-factory-gP6lDySe.js.map +1 -0
- package/dist/{llm-client-BFMRpmqb.js → llm-client-CxQtdtd6.js} +12 -5
- package/dist/llm-client-CxQtdtd6.js.map +1 -0
- package/dist/{llm-judge-aQHIk5_-.js → llm-judge-B2YxbAJb.js} +81 -7
- package/dist/{llm-judge-aQHIk5_-.js.map → llm-judge-B2YxbAJb.js.map} +1 -1
- package/dist/{matrix-Ch8JO1pG.d.ts → matrix-DGu8KhSs.d.ts} +2 -2
- package/dist/{matrix-Ch8JO1pG.d.ts.map → matrix-DGu8KhSs.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +100 -5
- package/dist/meta-eval/index.d.ts.map +1 -1
- package/dist/meta-eval/index.js +200 -2
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/{mint-DjfDUMHr.js → mint-vWOdD8Ae.js} +2 -2
- package/dist/{mint-DjfDUMHr.js.map → mint-vWOdD8Ae.js.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/pipelines/index.d.ts +5 -5
- package/dist/pipelines/index.js +3 -3
- package/dist/{pre-registration-DHz6P_6f.d.ts → pre-registration-BoI4ucR3.d.ts} +2 -2
- package/dist/{pre-registration-DHz6P_6f.d.ts.map → pre-registration-BoI4ucR3.d.ts.map} +1 -1
- package/dist/{produced-state-CxmbFxFd.js → produced-state-7VYDwtkk.js} +3 -3
- package/dist/{produced-state-CxmbFxFd.js.map → produced-state-7VYDwtkk.js.map} +1 -1
- package/dist/{promotion-policy-BBBcz5_3.d.ts → promotion-policy-CvMda3kU.d.ts} +2 -2
- package/dist/{promotion-policy-BBBcz5_3.d.ts.map → promotion-policy-CvMda3kU.d.ts.map} +1 -1
- package/dist/{provenance-Dp-vvyrU.d.ts → provenance-CRY67X50.d.ts} +39 -165
- package/dist/provenance-CRY67X50.d.ts.map +1 -0
- package/dist/{query-BPGMVlbM.js → query-D1nLIKt7.js} +2 -2
- package/dist/{query-BPGMVlbM.js.map → query-D1nLIKt7.js.map} +1 -1
- package/dist/{query-Na5gEIGd.d.ts → query-D6W6MaGx.d.ts} +3 -3
- package/dist/{query-Na5gEIGd.d.ts.map → query-D6W6MaGx.d.ts.map} +1 -1
- package/dist/{registry-xEb_xfns.d.ts → registry-7pOUBrtX.d.ts} +4 -4
- package/dist/{registry-xEb_xfns.d.ts.map → registry-7pOUBrtX.d.ts.map} +1 -1
- package/dist/{release-confidence-D6lQw_o7.d.ts → release-confidence-BAcNYOf1.d.ts} +4 -4
- package/dist/{release-confidence-D6lQw_o7.d.ts.map → release-confidence-BAcNYOf1.d.ts.map} +1 -1
- package/dist/{release-confidence-CzUHc4z4.js → release-confidence-BsGEg_xg.js} +3 -3
- package/dist/{release-confidence-CzUHc4z4.js.map → release-confidence-BsGEg_xg.js.map} +1 -1
- package/dist/reporting.d.ts +3 -3
- package/dist/reporting.js +1 -1
- package/dist/{researcher-CMUTQXD7.d.ts → researcher-jsW1X94L.d.ts} +7 -8
- package/dist/researcher-jsW1X94L.d.ts.map +1 -0
- package/dist/{reward-hacking-SkxYgT0x.js → reward-hacking-CKW4teig.js} +2 -2
- package/dist/{reward-hacking-SkxYgT0x.js.map → reward-hacking-CKW4teig.js.map} +1 -1
- package/dist/{reward-hacking-CgPRUesA.d.ts → reward-hacking-ZXEi9VCq.d.ts} +2 -2
- package/dist/{reward-hacking-CgPRUesA.d.ts.map → reward-hacking-ZXEi9VCq.d.ts.map} +1 -1
- package/dist/rl.d.ts +7 -7
- package/dist/rl.js +4 -4
- package/dist/rollout/index.d.ts +1 -1
- package/dist/rollout/index.js +2 -2
- package/dist/{rollout-Crypdx8s.js → rollout-C-znbbYg.js} +2 -2
- package/dist/{rollout-Crypdx8s.js.map → rollout-C-znbbYg.js.map} +1 -1
- package/dist/{rubric-predictive-validity-DluJLCKQ.d.ts → rubric-predictive-validity-Dl1dvKCv.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-DluJLCKQ.d.ts.map → rubric-predictive-validity-Dl1dvKCv.d.ts.map} +1 -1
- package/dist/{run-record-DQjRcYwA.d.ts → run-record-DTv1MdjK.d.ts} +2 -2
- package/dist/{run-record-DQjRcYwA.d.ts.map → run-record-DTv1MdjK.d.ts.map} +1 -1
- package/dist/{run-record-DLORoL7t.js → run-record-ZIsR9Fif.js} +2 -2
- package/dist/{run-record-DLORoL7t.js.map → run-record-ZIsR9Fif.js.map} +1 -1
- package/dist/{schema-DID1Cqct.d.ts → schema-CR5cpjQ3.d.ts} +57 -2
- package/dist/{schema-DID1Cqct.d.ts.map → schema-CR5cpjQ3.d.ts.map} +1 -1
- package/dist/{schema-CdIX2aHu.js → schema-CSf6qWgZ.js} +35 -1
- package/dist/{schema-CdIX2aHu.js.map → schema-CSf6qWgZ.js.map} +1 -1
- package/dist/semantic-concept-judge-Ct3QU7t5.js +780 -0
- package/dist/semantic-concept-judge-Ct3QU7t5.js.map +1 -0
- package/dist/{series-convergence-D9WgpXGi.d.ts → series-convergence-DeG33RpC.d.ts} +2 -2
- package/dist/{series-convergence-D9WgpXGi.d.ts.map → series-convergence-DeG33RpC.d.ts.map} +1 -1
- package/dist/{server-CCEnywOR.js → server-BR6onwZB.js} +2 -2
- package/dist/{server-CCEnywOR.js.map → server-BR6onwZB.js.map} +1 -1
- package/dist/{skillopt-optimization-method-LHi02MzH.js → skillopt-optimization-method-BzdphODy.js} +6 -6
- package/dist/{skillopt-optimization-method-LHi02MzH.js.map → skillopt-optimization-method-BzdphODy.js.map} +1 -1
- package/dist/{statistical-heldout-Yldkntvy.d.ts → statistical-heldout-DTyB_6-1.d.ts} +3 -3
- package/dist/{statistical-heldout-Yldkntvy.d.ts.map → statistical-heldout-DTyB_6-1.d.ts.map} +1 -1
- package/dist/{store-Cq9oOrI1.d.ts → store-BErPvYBr.d.ts} +2 -2
- package/dist/{store-Cq9oOrI1.d.ts.map → store-BErPvYBr.d.ts.map} +1 -1
- package/dist/{store-otlp-CHjBvWQY.js → store-otlp-Dow0pk_5.js} +2 -2
- package/dist/{store-otlp-CHjBvWQY.js.map → store-otlp-Dow0pk_5.js.map} +1 -1
- package/dist/{store-tool-spans-BvdUbeOB.d.ts → store-tool-spans-CCZNsihA.d.ts} +8 -8
- package/dist/{store-tool-spans-BvdUbeOB.d.ts.map → store-tool-spans-CCZNsihA.d.ts.map} +1 -1
- package/dist/{store-tool-spans-B9o6tU8f.js → store-tool-spans-CeNj_m2L.js} +3 -3
- package/dist/{store-tool-spans-B9o6tU8f.js.map → store-tool-spans-CeNj_m2L.js.map} +1 -1
- package/dist/storyboard/index.d.ts +1 -1
- package/dist/{summary-report-DRstQNBX.d.ts → summary-report-gMrbYawB.d.ts} +3 -3
- package/dist/{summary-report-DRstQNBX.d.ts.map → summary-report-gMrbYawB.d.ts.map} +1 -1
- package/dist/{task-failure-attributes-CBGtLS_H.js → task-failure-attributes-CZjZeBsY.js} +3 -3
- package/dist/{task-failure-attributes-CBGtLS_H.js.map → task-failure-attributes-CZjZeBsY.js.map} +1 -1
- package/dist/{tool-groups-DjwlMBvW.d.ts → tool-groups-Cp4Xdzrp.d.ts} +3 -3
- package/dist/tool-groups-Cp4Xdzrp.d.ts.map +1 -0
- package/dist/{tool-waste-CwGHzBzX.js → tool-waste-B9tdWV6g.js} +253 -6
- package/dist/tool-waste-B9tdWV6g.js.map +1 -0
- package/dist/{tool-waste-BrmLKxMw.d.ts → tool-waste-D23I0zWm.d.ts} +4 -4
- package/dist/{tool-waste-BrmLKxMw.d.ts.map → tool-waste-D23I0zWm.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +2 -2
- package/dist/traces.d.ts +10 -10
- package/dist/traces.js +7 -7
- package/dist/{trajectory-r1bQqvBQ.d.ts → trajectory-D7qrNvaN.d.ts} +3 -3
- package/dist/{trajectory-r1bQqvBQ.d.ts.map → trajectory-D7qrNvaN.d.ts.map} +1 -1
- package/dist/trajectory-replay/index.d.ts +3 -3
- package/dist/{types-CCZ34qmV.d.ts → types-BDV4PiMR.d.ts} +3 -3
- package/dist/{types-CCZ34qmV.d.ts.map → types-BDV4PiMR.d.ts.map} +1 -1
- package/dist/{types-nokrtr7M.d.ts → types-Ba5UQyVD.d.ts} +4 -4
- package/dist/{types-nokrtr7M.d.ts.map → types-Ba5UQyVD.d.ts.map} +1 -1
- package/dist/{types-DMoNFDWi.d.ts → types-DN2WdT5S.d.ts} +3 -3
- package/dist/{types-DMoNFDWi.d.ts.map → types-DN2WdT5S.d.ts.map} +1 -1
- package/dist/types-gvRsyJLh.d.ts +831 -0
- package/dist/types-gvRsyJLh.d.ts.map +1 -0
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/plants.md +69 -1
- package/docs/public-api.md +6 -4
- package/docs/trace-analysis.md +55 -8
- package/package.json +1 -1
- package/dist/backend-integrity-e79K3UPD.d.ts.map +0 -1
- package/dist/bounded-process-VIi0KSL2.js.map +0 -1
- package/dist/chat-client-DI79OPye.js.map +0 -1
- package/dist/chat-json-call-5Jxna-aV.js.map +0 -1
- package/dist/dspy-rlm-engine-CS3qcCEk.js.map +0 -1
- package/dist/failure-cluster-6YSvsKlp.d.ts +0 -58
- package/dist/failure-cluster-6YSvsKlp.d.ts.map +0 -1
- package/dist/index-DDAPhUJJ.d.ts.map +0 -1
- package/dist/index-DnglhM0A.d.ts.map +0 -1
- package/dist/kind-factory-DMeEoMQZ.js.map +0 -1
- package/dist/llm-client-BFMRpmqb.js.map +0 -1
- package/dist/provenance-Dp-vvyrU.d.ts.map +0 -1
- package/dist/raw-provider-sink-BU29Sh8h.d.ts +0 -134
- package/dist/raw-provider-sink-BU29Sh8h.d.ts.map +0 -1
- package/dist/researcher-CMUTQXD7.d.ts.map +0 -1
- package/dist/semantic-concept-judge-I36eejJx.js +0 -382
- package/dist/semantic-concept-judge-I36eejJx.js.map +0 -1
- package/dist/tool-groups-DjwlMBvW.d.ts.map +0 -1
- package/dist/tool-waste-CwGHzBzX.js.map +0 -1
- package/dist/types-Bfk0uxRj.d.ts +0 -443
- package/dist/types-Bfk0uxRj.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as FailureClass } from "./schema-
|
|
2
|
-
import { l as RunTerminalOutcome } from "./run-record-
|
|
1
|
+
import { o as FailureClass } from "./schema-CR5cpjQ3.js";
|
|
2
|
+
import { l as RunTerminalOutcome } from "./run-record-DTv1MdjK.js";
|
|
3
3
|
import { r as ContinuousAgreement } from "./judge-calibration-C5CbMYce.js";
|
|
4
|
-
import { i as ParetoFigureSpec, t as GainDistributionBin } from "./summary-report-
|
|
4
|
+
import { i as ParetoFigureSpec, t as GainDistributionBin } from "./summary-report-gMrbYawB.js";
|
|
5
5
|
//#region src/contract/insight-report.d.ts
|
|
6
6
|
interface InsightReport {
|
|
7
7
|
/** Number of runs analyzed. */
|
|
@@ -403,4 +403,4 @@ interface Recommendation {
|
|
|
403
403
|
}
|
|
404
404
|
//#endregion
|
|
405
405
|
export { FailureClusterInsight as a, JudgeInsight as c, Recommendation as d, ReleaseSummary as f, FailureClassTally as i, LiftInsight as l, TokenUsageInsight as m, ExecutionErrorOutcomeCell as n, InsightReport as o, ScalarDistribution as p, ExecutionInsight as r, InterRaterInsight as s, CostProvenanceSummary as t, OutcomeCorrelationInsight as u };
|
|
406
|
-
//# sourceMappingURL=insight-report-
|
|
406
|
+
//# sourceMappingURL=insight-report-DETqPc_A.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insight-report-
|
|
1
|
+
{"version":3,"file":"insight-report-DETqPc_A.d.ts","names":[],"sources":["../src/contract/insight-report.ts"],"mappings":";;;;;UAqCiB;;EAEf;;;;EAKA,WAAW;;EAGX,WAAW;;;EAIX,cAAc,eAAe;;EAG7B;IACE,MAAM;IACN,QAAQ;;;;IAIR,aAAa;;;;;IAKb;MAAa;MAAe;;;;;;EAM9B,QAAQ,eAAe;;;;EAKvB,aAAa;;;;EAKb,OAAO;;;EAIP,kBAAkB;;;EAIlB,gBAAgB;;;;;EAMhB,qBAAqB;;;;;EAMrB,SAAS;;;;;;EAOT,wBAAwB;;;;EAKxB,iBAAiB;;;EAIjB,iBAAiB;;UAGF;EACf;IAAY;IAAW;;EACvB;IAAa;IAAW;;EACxB;IAAc;;EACd;;UAGe;;EAEf,YAAY;;EAEZ,SAAS;;;EAGT,YAAY;;;EAGZ;IACE;IACA,YAAY;IACZ,SAAS;IACT;;;EAGF,QAAQ;IAAQ;IAAe;;;;;EAI/B;IACE;IACA;IACA;;;;;EAKF;IACE;;;IAGA;;IAEA;;IAEA;;IAEA;;IAEA;;;;;IAKA,mBAAmB,OAAO,oBAAoB;;;;EAIhD;IACE;IACA;IACA;IACA;IACA;;;UAIa;;EAEf;;EAEA;;EAEA;;UAGe;EACf,OAAO;EACP,QAAQ;EACR,WAAW;EACX,QAAQ;EACR,YAAY;EACZ;IACE;IACA;IACA;IACA;IACA;;;;UAOa;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,WAAW;;;;;EAKX,WAAW;IAAQ;IAAe;;;UAGnB;;EAEf;;EAEA;;;EAGA,cAAc;;;EAGd;;;EAGA;;;EAGA;;UAGe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;EAET,mBAAmB;IACjB;IACA,SAAS;MAAQ;MAAe;;IAChC;;;UAIa;EACf;EACA;;EAEA;;EAEA;;;EAGA;;EAEA;;EAEA;;;;;;;;;;;EAWA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf,UAAU;IACR;IACA;;IAEA;;IAEA;;IAEA;;EAEF;;;;;UAMe;;EAEf,cAAc;;EAEd;;EAEA;;UAGe;;EAEf;;;EAGA;EACA,UAAU;IAAQ;IAAe;IAAgB;;;UAGlC;;;EAGf;;EAEA;;EAEA;;EAEA;;EAEA;IACE;IACA;IACA;;;UAIa;;;EAGf;EACA,MAAM;IACJ;IACA;IACA;;;;EAIF;;UAGQ;;EAER;;EAEA;;;;EAIA;;EAEA;EACA;;KAGU,eACP;EACC;;EAEA;;EAEA;;EAEA;;EAEA;MAED;EACC;;EAEA;EACA;EACA;EACA;;UAGW;;EAEf;EACA;;EAEA;;;;EAIA,SAAS,eAAe;;;EAGxB;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA;EACA;;EAEA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as CaptureIntegrityError } from "./errors-DEE6u6ot.js";
|
|
2
|
-
import {
|
|
3
|
-
import { s as TraceStore } from "./store-
|
|
2
|
+
import { Y as RawProviderSink } from "./types-gvRsyJLh.js";
|
|
3
|
+
import { s as TraceStore } from "./store-BErPvYBr.js";
|
|
4
4
|
//#region src/trace/integrity.d.ts
|
|
5
5
|
interface RunIntegrityExpectations {
|
|
6
6
|
/** Minimum LLM span count. Default 0 (no requirement). */
|
|
@@ -58,4 +58,4 @@ declare function assertRunCaptured(store: TraceStore, runId: string, expectation
|
|
|
58
58
|
declare function throwIfRunIncomplete(report: RunIntegrityReport): void;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { RunIntegrityReport as a, RunIntegrityIssueCode as i, RunIntegrityExpectations as n, assertRunCaptured as o, RunIntegrityIssue as r, throwIfRunIncomplete as s, RunIntegrityError as t };
|
|
61
|
-
//# sourceMappingURL=integrity-
|
|
61
|
+
//# sourceMappingURL=integrity-BKTcA-HP.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrity-
|
|
1
|
+
{"version":3,"file":"integrity-BKTcA-HP.d.ts","names":[],"sources":["../src/trace/integrity.ts"],"mappings":";;;;UAyBiB;;EAEf;;EAEA;;EAEA;;;;;EAKA,UAAU;;EAEV;;;;;;EAMA;;EAEA;;KAGU;UAUK;EACf,MAAM;EACN;EACA,SAAS;;UAGM;EACf;EACA;EACA;EACA;EACA;EACA;;;;;;EAMA;IAAmB;IAAiB;;EACpC,QAAQ;;cAGG,0BAA0B;WACT,QAAQ;EAApC,YAA4B,QAAQ;;iBAOhB,kBACpB,OAAO,YACP,eACA,eAAc,2BACb,QAAQ;;iBA6GK,qBAAqB,QAAQ"}
|
|
@@ -286,153 +286,6 @@ function stringifyTraceValue(value) {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
//#endregion
|
|
289
|
-
//#region src/trace-analyst/otlp-span.ts
|
|
290
|
-
/**
|
|
291
|
-
* Canonical OTLP-flat-line readers shared by every consumer of the
|
|
292
|
-
* OTLP-JSONL wire shape (one OTLP span per line; the form
|
|
293
|
-
* `flattenOtlpExportToNdjson` produces and the form AppWorld / HALO
|
|
294
|
-
* emit via their OpenInference OTLP exporter).
|
|
295
|
-
*
|
|
296
|
-
* `OtlpFileTraceStore` indexes spans with these; `otlpToRunRecords`
|
|
297
|
-
* aggregates spans into `RunRecord`s with the same readers. One parser,
|
|
298
|
-
* one vocabulary — a divergence between the analyst's view of a trace and
|
|
299
|
-
* the RunRecord projected from it is a class of bug this consolidation
|
|
300
|
-
* removes by construction.
|
|
301
|
-
*
|
|
302
|
-
* Vocabulary. The readers understand BOTH dialects that appear in the
|
|
303
|
-
* wild:
|
|
304
|
-
* - the substrate's own `llm.*` / `tool.*` / `span.kind` attributes
|
|
305
|
-
* (`flattenSpanAttributes` in `trace/otel.ts`), and
|
|
306
|
-
* - the OpenInference / inference-export attributes AppWorld / HALO
|
|
307
|
-
* emit (`openinference.span.kind`, `inference.observation_kind`,
|
|
308
|
-
* `inference.llm.input_tokens`, `llm.token_count.prompt`, …).
|
|
309
|
-
*
|
|
310
|
-
* Pure, no I/O.
|
|
311
|
-
*/
|
|
312
|
-
/**
|
|
313
|
-
* Project one parsed OTLP-JSONL object to `ProjectedOtlpSpan`, or `null`
|
|
314
|
-
* when the line is missing the mandatory `trace_id` + `span_id`.
|
|
315
|
-
*/
|
|
316
|
-
function projectOtlpFlatLine(raw) {
|
|
317
|
-
const trace_id = stringField(raw, "trace_id") ?? stringField(raw, "traceId");
|
|
318
|
-
const span_id = stringField(raw, "span_id") ?? stringField(raw, "spanId");
|
|
319
|
-
if (!trace_id || !span_id) return null;
|
|
320
|
-
const parent_id = normalizeParentSpanId(trace_id, span_id, stringField(raw, "parent_span_id") ?? stringField(raw, "parentSpanId") ?? null);
|
|
321
|
-
const name = stringField(raw, "name") ?? "unknown";
|
|
322
|
-
const start_time = stringField(raw, "start_time") ?? stringField(raw, "startTime") ?? "";
|
|
323
|
-
const end_time = stringField(raw, "end_time") ?? stringField(raw, "endTime") ?? start_time;
|
|
324
|
-
const status = readOtlpStatus(raw);
|
|
325
|
-
const attributes = extractOtlpAttributes(raw);
|
|
326
|
-
const service_name = asString(attributes["service.name"]) ?? asString(attributes["resource.attributes.service.name"]) ?? null;
|
|
327
|
-
const agent_name = asString(attributes["agent.name"]) ?? asString(attributes["inference.agent.name"]) ?? asString(attributes["inference.agent_name"]) ?? null;
|
|
328
|
-
const model_name = firstStringAttr(attributes, LLM_MODEL_ATTR_KEYS);
|
|
329
|
-
const tool_name = firstStringAttr(attributes, TOOL_NAME_ATTR_KEYS);
|
|
330
|
-
const kind = inferOtlpKind(attributes);
|
|
331
|
-
let duration_ms = 0;
|
|
332
|
-
if (start_time && end_time) {
|
|
333
|
-
const a = spanEpochMillis(start_time);
|
|
334
|
-
const b = spanEpochMillis(end_time);
|
|
335
|
-
if (a !== null && b !== null) duration_ms = Math.max(0, b - a);
|
|
336
|
-
}
|
|
337
|
-
return {
|
|
338
|
-
trace_id,
|
|
339
|
-
span_id,
|
|
340
|
-
parent_span_id: parent_id && parent_id.length > 0 ? parent_id : null,
|
|
341
|
-
name,
|
|
342
|
-
kind,
|
|
343
|
-
start_time,
|
|
344
|
-
end_time,
|
|
345
|
-
duration_ms,
|
|
346
|
-
status: status.code,
|
|
347
|
-
status_message: status.message,
|
|
348
|
-
service_name,
|
|
349
|
-
agent_name,
|
|
350
|
-
model_name,
|
|
351
|
-
tool_name,
|
|
352
|
-
attributes
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
function normalizeParentSpanId(traceId, spanId, parentId) {
|
|
356
|
-
if (!parentId) return null;
|
|
357
|
-
const prefix = `${traceId}:`;
|
|
358
|
-
return spanId.startsWith(prefix) && !parentId.startsWith(prefix) ? `${prefix}${parentId}` : parentId;
|
|
359
|
-
}
|
|
360
|
-
function readOtlpStatus(raw) {
|
|
361
|
-
const status = raw.status;
|
|
362
|
-
if (status && typeof status === "object" && !Array.isArray(status)) {
|
|
363
|
-
const codeRaw = status.code;
|
|
364
|
-
const code = codeRaw === "STATUS_CODE_OK" || codeRaw === "OK" ? "OK" : codeRaw === "STATUS_CODE_ERROR" || codeRaw === "ERROR" ? "ERROR" : "UNSET";
|
|
365
|
-
const messageRaw = status.message;
|
|
366
|
-
return {
|
|
367
|
-
code,
|
|
368
|
-
message: typeof messageRaw === "string" && messageRaw.length > 0 ? messageRaw : void 0
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
return {
|
|
372
|
-
code: "UNSET",
|
|
373
|
-
message: void 0
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
function inferOtlpKind(attrs) {
|
|
377
|
-
const opik = firstStringAttr(attrs, SPAN_KIND_ATTR_KEYS);
|
|
378
|
-
if (opik) {
|
|
379
|
-
const upper = opik.toUpperCase();
|
|
380
|
-
if (upper === "AGENT" || upper === "LLM" || upper === "TOOL" || upper === "CHAIN" || upper === "EVALUATOR" || upper === "GUARDRAIL" || upper === "SPAN") return upper;
|
|
381
|
-
}
|
|
382
|
-
return "UNKNOWN";
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Flatten OTLP `attributes` + `resource.attributes` into a single
|
|
386
|
-
* dotted-key map. Span attributes override resource attributes when keys
|
|
387
|
-
* overlap. Nested objects/arrays are preserved as-is.
|
|
388
|
-
*/
|
|
389
|
-
function extractOtlpAttributes(raw) {
|
|
390
|
-
const out = {};
|
|
391
|
-
const resource = raw.resource;
|
|
392
|
-
if (resource && typeof resource === "object" && !Array.isArray(resource)) {
|
|
393
|
-
const ra = resource.attributes;
|
|
394
|
-
if (ra && typeof ra === "object" && !Array.isArray(ra)) for (const [k, v] of Object.entries(ra)) out[k] = v;
|
|
395
|
-
}
|
|
396
|
-
const spanAttrs = raw.attributes;
|
|
397
|
-
if (spanAttrs && typeof spanAttrs === "object" && !Array.isArray(spanAttrs)) for (const [k, v] of Object.entries(spanAttrs)) out[k] = v;
|
|
398
|
-
return out;
|
|
399
|
-
}
|
|
400
|
-
function stringField(raw, key) {
|
|
401
|
-
const v = raw[key];
|
|
402
|
-
return typeof v === "string" ? v : void 0;
|
|
403
|
-
}
|
|
404
|
-
function asString(v) {
|
|
405
|
-
return typeof v === "string" && v.length > 0 ? v : null;
|
|
406
|
-
}
|
|
407
|
-
/** First non-empty string value across a list of candidate attribute keys. */
|
|
408
|
-
function firstStringAttr(attrs, keys) {
|
|
409
|
-
for (const k of keys) {
|
|
410
|
-
const s = asString(attrs[k]);
|
|
411
|
-
if (s !== null) return s;
|
|
412
|
-
}
|
|
413
|
-
return null;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Parse a span timestamp to epoch millis, or null when empty/unparseable. The
|
|
417
|
-
* OTLP readers accept BOTH ISO-8601 and epoch-millis-string dialects, so raw
|
|
418
|
-
* string comparison (`<`, `localeCompare`) mis-orders across dialects and
|
|
419
|
-
* `Date.parse` returns NaN for a bare epoch-millis string.
|
|
420
|
-
*/
|
|
421
|
-
function spanEpochMillis(ts) {
|
|
422
|
-
if (!ts) return null;
|
|
423
|
-
if (/^\d+$/.test(ts)) return Number(ts);
|
|
424
|
-
const n = Date.parse(ts);
|
|
425
|
-
return Number.isNaN(n) ? null : n;
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* Order comparator for span timestamps across mixed ISO/epoch dialects.
|
|
429
|
-
* Unparseable timestamps sort as epoch 0 (earliest), never NaN (which would
|
|
430
|
-
* make the sort non-deterministic).
|
|
431
|
-
*/
|
|
432
|
-
function compareSpanTime(a, b) {
|
|
433
|
-
return (spanEpochMillis(a) ?? 0) - (spanEpochMillis(b) ?? 0);
|
|
434
|
-
}
|
|
435
|
-
//#endregion
|
|
436
289
|
//#region src/analyst/engine.ts
|
|
437
290
|
const DEFAULT_TRACE_ANALYST_LIMITS = {
|
|
438
291
|
maxIterations: 12,
|
|
@@ -440,6 +293,21 @@ const DEFAULT_TRACE_ANALYST_LIMITS = {
|
|
|
440
293
|
maxToolCalls: 48,
|
|
441
294
|
maxOutputChars: 1e4
|
|
442
295
|
};
|
|
296
|
+
/**
|
|
297
|
+
* Completion cap one engine turn asks for when the caller names none.
|
|
298
|
+
*
|
|
299
|
+
* Shared by every engine because the number is load-bearing and has one
|
|
300
|
+
* failure story, not two: 4096 is below what current coding models emit for a
|
|
301
|
+
* full findings array — glm-5.2 through an OpenAI-compatible gateway returns
|
|
302
|
+
* 8192 and the request is rejected outright (`502 — provider reported 8192
|
|
303
|
+
* completion tokens, exceeding requested limit 4096`), which failed 2 of 2
|
|
304
|
+
* smoke cases before any analysis ran. Two engines holding private copies of
|
|
305
|
+
* this would have to move in lockstep or diverge on spend behaviour silently.
|
|
306
|
+
*
|
|
307
|
+
* The cap exists to bound a single response, not to bound spend: the cost
|
|
308
|
+
* ledger does that directly, so this starts above what a real report needs.
|
|
309
|
+
*/
|
|
310
|
+
const DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS = 16384;
|
|
443
311
|
function resolveTraceAnalystLimits(limits) {
|
|
444
312
|
const resolved = {
|
|
445
313
|
...DEFAULT_TRACE_ANALYST_LIMITS,
|
|
@@ -906,6 +774,153 @@ function parseTraceSpanEvidenceUri(uri) {
|
|
|
906
774
|
}
|
|
907
775
|
}
|
|
908
776
|
//#endregion
|
|
777
|
+
//#region src/trace-analyst/otlp-span.ts
|
|
778
|
+
/**
|
|
779
|
+
* Canonical OTLP-flat-line readers shared by every consumer of the
|
|
780
|
+
* OTLP-JSONL wire shape (one OTLP span per line; the form
|
|
781
|
+
* `flattenOtlpExportToNdjson` produces and the form AppWorld / HALO
|
|
782
|
+
* emit via their OpenInference OTLP exporter).
|
|
783
|
+
*
|
|
784
|
+
* `OtlpFileTraceStore` indexes spans with these; `otlpToRunRecords`
|
|
785
|
+
* aggregates spans into `RunRecord`s with the same readers. One parser,
|
|
786
|
+
* one vocabulary — a divergence between the analyst's view of a trace and
|
|
787
|
+
* the RunRecord projected from it is a class of bug this consolidation
|
|
788
|
+
* removes by construction.
|
|
789
|
+
*
|
|
790
|
+
* Vocabulary. The readers understand BOTH dialects that appear in the
|
|
791
|
+
* wild:
|
|
792
|
+
* - the substrate's own `llm.*` / `tool.*` / `span.kind` attributes
|
|
793
|
+
* (`flattenSpanAttributes` in `trace/otel.ts`), and
|
|
794
|
+
* - the OpenInference / inference-export attributes AppWorld / HALO
|
|
795
|
+
* emit (`openinference.span.kind`, `inference.observation_kind`,
|
|
796
|
+
* `inference.llm.input_tokens`, `llm.token_count.prompt`, …).
|
|
797
|
+
*
|
|
798
|
+
* Pure, no I/O.
|
|
799
|
+
*/
|
|
800
|
+
/**
|
|
801
|
+
* Project one parsed OTLP-JSONL object to `ProjectedOtlpSpan`, or `null`
|
|
802
|
+
* when the line is missing the mandatory `trace_id` + `span_id`.
|
|
803
|
+
*/
|
|
804
|
+
function projectOtlpFlatLine(raw) {
|
|
805
|
+
const trace_id = stringField(raw, "trace_id") ?? stringField(raw, "traceId");
|
|
806
|
+
const span_id = stringField(raw, "span_id") ?? stringField(raw, "spanId");
|
|
807
|
+
if (!trace_id || !span_id) return null;
|
|
808
|
+
const parent_id = normalizeParentSpanId(trace_id, span_id, stringField(raw, "parent_span_id") ?? stringField(raw, "parentSpanId") ?? null);
|
|
809
|
+
const name = stringField(raw, "name") ?? "unknown";
|
|
810
|
+
const start_time = stringField(raw, "start_time") ?? stringField(raw, "startTime") ?? "";
|
|
811
|
+
const end_time = stringField(raw, "end_time") ?? stringField(raw, "endTime") ?? start_time;
|
|
812
|
+
const status = readOtlpStatus(raw);
|
|
813
|
+
const attributes = extractOtlpAttributes(raw);
|
|
814
|
+
const service_name = asString(attributes["service.name"]) ?? asString(attributes["resource.attributes.service.name"]) ?? null;
|
|
815
|
+
const agent_name = asString(attributes["agent.name"]) ?? asString(attributes["inference.agent.name"]) ?? asString(attributes["inference.agent_name"]) ?? null;
|
|
816
|
+
const model_name = firstStringAttr(attributes, LLM_MODEL_ATTR_KEYS);
|
|
817
|
+
const tool_name = firstStringAttr(attributes, TOOL_NAME_ATTR_KEYS);
|
|
818
|
+
const kind = inferOtlpKind(attributes);
|
|
819
|
+
let duration_ms = 0;
|
|
820
|
+
if (start_time && end_time) {
|
|
821
|
+
const a = spanEpochMillis(start_time);
|
|
822
|
+
const b = spanEpochMillis(end_time);
|
|
823
|
+
if (a !== null && b !== null) duration_ms = Math.max(0, b - a);
|
|
824
|
+
}
|
|
825
|
+
return {
|
|
826
|
+
trace_id,
|
|
827
|
+
span_id,
|
|
828
|
+
parent_span_id: parent_id && parent_id.length > 0 ? parent_id : null,
|
|
829
|
+
name,
|
|
830
|
+
kind,
|
|
831
|
+
start_time,
|
|
832
|
+
end_time,
|
|
833
|
+
duration_ms,
|
|
834
|
+
status: status.code,
|
|
835
|
+
status_message: status.message,
|
|
836
|
+
service_name,
|
|
837
|
+
agent_name,
|
|
838
|
+
model_name,
|
|
839
|
+
tool_name,
|
|
840
|
+
attributes
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
function normalizeParentSpanId(traceId, spanId, parentId) {
|
|
844
|
+
if (!parentId) return null;
|
|
845
|
+
const prefix = `${traceId}:`;
|
|
846
|
+
return spanId.startsWith(prefix) && !parentId.startsWith(prefix) ? `${prefix}${parentId}` : parentId;
|
|
847
|
+
}
|
|
848
|
+
function readOtlpStatus(raw) {
|
|
849
|
+
const status = raw.status;
|
|
850
|
+
if (status && typeof status === "object" && !Array.isArray(status)) {
|
|
851
|
+
const codeRaw = status.code;
|
|
852
|
+
const code = codeRaw === "STATUS_CODE_OK" || codeRaw === "OK" ? "OK" : codeRaw === "STATUS_CODE_ERROR" || codeRaw === "ERROR" ? "ERROR" : "UNSET";
|
|
853
|
+
const messageRaw = status.message;
|
|
854
|
+
return {
|
|
855
|
+
code,
|
|
856
|
+
message: typeof messageRaw === "string" && messageRaw.length > 0 ? messageRaw : void 0
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
return {
|
|
860
|
+
code: "UNSET",
|
|
861
|
+
message: void 0
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
function inferOtlpKind(attrs) {
|
|
865
|
+
const opik = firstStringAttr(attrs, SPAN_KIND_ATTR_KEYS);
|
|
866
|
+
if (opik) {
|
|
867
|
+
const upper = opik.toUpperCase();
|
|
868
|
+
if (upper === "AGENT" || upper === "LLM" || upper === "TOOL" || upper === "CHAIN" || upper === "EVALUATOR" || upper === "GUARDRAIL" || upper === "SPAN") return upper;
|
|
869
|
+
}
|
|
870
|
+
return "UNKNOWN";
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Flatten OTLP `attributes` + `resource.attributes` into a single
|
|
874
|
+
* dotted-key map. Span attributes override resource attributes when keys
|
|
875
|
+
* overlap. Nested objects/arrays are preserved as-is.
|
|
876
|
+
*/
|
|
877
|
+
function extractOtlpAttributes(raw) {
|
|
878
|
+
const out = {};
|
|
879
|
+
const resource = raw.resource;
|
|
880
|
+
if (resource && typeof resource === "object" && !Array.isArray(resource)) {
|
|
881
|
+
const ra = resource.attributes;
|
|
882
|
+
if (ra && typeof ra === "object" && !Array.isArray(ra)) for (const [k, v] of Object.entries(ra)) out[k] = v;
|
|
883
|
+
}
|
|
884
|
+
const spanAttrs = raw.attributes;
|
|
885
|
+
if (spanAttrs && typeof spanAttrs === "object" && !Array.isArray(spanAttrs)) for (const [k, v] of Object.entries(spanAttrs)) out[k] = v;
|
|
886
|
+
return out;
|
|
887
|
+
}
|
|
888
|
+
function stringField(raw, key) {
|
|
889
|
+
const v = raw[key];
|
|
890
|
+
return typeof v === "string" ? v : void 0;
|
|
891
|
+
}
|
|
892
|
+
function asString(v) {
|
|
893
|
+
return typeof v === "string" && v.length > 0 ? v : null;
|
|
894
|
+
}
|
|
895
|
+
/** First non-empty string value across a list of candidate attribute keys. */
|
|
896
|
+
function firstStringAttr(attrs, keys) {
|
|
897
|
+
for (const k of keys) {
|
|
898
|
+
const s = asString(attrs[k]);
|
|
899
|
+
if (s !== null) return s;
|
|
900
|
+
}
|
|
901
|
+
return null;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Parse a span timestamp to epoch millis, or null when empty/unparseable. The
|
|
905
|
+
* OTLP readers accept BOTH ISO-8601 and epoch-millis-string dialects, so raw
|
|
906
|
+
* string comparison (`<`, `localeCompare`) mis-orders across dialects and
|
|
907
|
+
* `Date.parse` returns NaN for a bare epoch-millis string.
|
|
908
|
+
*/
|
|
909
|
+
function spanEpochMillis(ts) {
|
|
910
|
+
if (!ts) return null;
|
|
911
|
+
if (/^\d+$/.test(ts)) return Number(ts);
|
|
912
|
+
const n = Date.parse(ts);
|
|
913
|
+
return Number.isNaN(n) ? null : n;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Order comparator for span timestamps across mixed ISO/epoch dialects.
|
|
917
|
+
* Unparseable timestamps sort as epoch 0 (earliest), never NaN (which would
|
|
918
|
+
* make the sort non-deterministic).
|
|
919
|
+
*/
|
|
920
|
+
function compareSpanTime(a, b) {
|
|
921
|
+
return (spanEpochMillis(a) ?? 0) - (spanEpochMillis(b) ?? 0);
|
|
922
|
+
}
|
|
923
|
+
//#endregion
|
|
909
924
|
//#region src/trace-analyst/errors.ts
|
|
910
925
|
/** Invalid trace-tool arguments, including malformed filters and regexes. */
|
|
911
926
|
var TraceAnalysisValidationError = class extends ValidationError {};
|
|
@@ -2050,6 +2065,6 @@ function truncateForContext(value, max) {
|
|
|
2050
2065
|
return `${value.slice(0, max - 3).trimEnd()}...`;
|
|
2051
2066
|
}
|
|
2052
2067
|
//#endregion
|
|
2053
|
-
export {
|
|
2068
|
+
export { RAW_FINDING_SCHEMA_PROMPT as A, parseFindingSubject as B, asString as C, projectOtlpFlatLine as D, firstStringAttr as E, stripCodeFences as F, classifyOtlpSpanRole as G, DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS as H, FINDING_SUBJECT_KINDS as I, snapshotExactExecutionComponentIdentity as J, isOtlpModelCall as K, FINDING_SUBJECT_SYNTAX as L, evidenceRefsFromRawFinding as M, parseRawFinding as N, spanEpochMillis as O, coerceJson as P, KIND_EXPECTED_SUBJECTS as R, TraceNotFoundError as S, extractOtlpAttributes as T, resolveTraceAnalystLimits as U, renderFindingSubject as V, applyToolSpanOtlpAttributes as W, snapshotExactExecutionPlan as Y, TraceAnalysisStoreContractError as _, TRACE_ANALYST_TOOL_NAMESPACE as a, TraceFileMissingError as b, createBoundedTraceAnalysisStore as c, validateInteger as d, DEFAULT_TRACE_ANALYST_BUDGETS as f, TraceAnalysisLimitError as g, SpanNotFoundError as h, buildTraceToolsForGroup as i, RawAnalystFindingSchema as j, stringField as k, compileSearchRegex as l, TRACE_ANALYSIS_LIMITS as m, renderPriorFindings as n, buildTraceAnalysisToolDescriptors as o, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX as p, traceSpanKindToOpenInferenceKind as q, runTraceAnalyst as r, traceAnalystFunctionGroup as s, createTraceAnalyst as t, truncateForBudget as u, TraceAnalysisValidationError as v, compareSpanTime as w, TraceFileTooLargeError as x, TraceFileMalformedError as y, findingSubjectGrammarPromptFor as z };
|
|
2054
2069
|
|
|
2055
|
-
//# sourceMappingURL=kind-factory-
|
|
2070
|
+
//# sourceMappingURL=kind-factory-gP6lDySe.js.map
|