@tangle-network/agent-eval 0.149.0 → 0.150.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +5 -1
  3. package/dist/analyst/index.d.ts +13 -13
  4. package/dist/analyst/index.d.ts.map +1 -1
  5. package/dist/analyst/index.js +4 -4
  6. package/dist/{backend-integrity-Bz8nSrRE.d.ts → backend-integrity-DOCa_QrR.d.ts} +2 -2
  7. package/dist/{backend-integrity-Bz8nSrRE.d.ts.map → backend-integrity-DOCa_QrR.d.ts.map} +1 -1
  8. package/dist/{benchmark-Cn7ZMFNW.d.ts → benchmark-BtAWA8nT.d.ts} +3 -3
  9. package/dist/{benchmark-Cn7ZMFNW.d.ts.map → benchmark-BtAWA8nT.d.ts.map} +1 -1
  10. package/dist/{benchmark-command-gufocQ-N.js → benchmark-command-CAFwbH0L.js} +8 -7
  11. package/dist/benchmark-command-CAFwbH0L.js.map +1 -0
  12. package/dist/benchmarks/index.d.ts +4 -4
  13. package/dist/benchmarks/index.js +3 -3
  14. package/dist/campaign/index.d.ts +9 -9
  15. package/dist/campaign/index.js +6 -6
  16. package/dist/{campaign-BcfXzmPM.js → campaign-CN_7xJdV.js} +90 -8
  17. package/dist/campaign-CN_7xJdV.js.map +1 -0
  18. package/dist/{capture-fetch-BAx3Gntt.d.ts → capture-fetch-BBVFzhkk.d.ts} +2 -2
  19. package/dist/{capture-fetch-BAx3Gntt.d.ts.map → capture-fetch-BBVFzhkk.d.ts.map} +1 -1
  20. package/dist/{chat-client-BX8Wh3fn.js → chat-client-2bVfrzhN.js} +2 -2
  21. package/dist/{chat-client-BX8Wh3fn.js.map → chat-client-2bVfrzhN.js.map} +1 -1
  22. package/dist/cli.js +2 -2
  23. package/dist/{client-BV7icIfy.d.ts → client-kPQYT_56.d.ts} +2 -2
  24. package/dist/{client-BV7icIfy.d.ts.map → client-kPQYT_56.d.ts.map} +1 -1
  25. package/dist/contract/index.d.ts +10 -10
  26. package/dist/contract/index.js +5 -5
  27. package/dist/{default-registry-BUtRMRKk.d.ts → default-registry-Cw0Ohdoj.d.ts} +6 -6
  28. package/dist/{default-registry-BUtRMRKk.d.ts.map → default-registry-Cw0Ohdoj.d.ts.map} +1 -1
  29. package/dist/{define-agent-eval-BWuk2O_N.d.ts → define-agent-eval-CEQWL9Hy.d.ts} +5 -5
  30. package/dist/{define-agent-eval-BWuk2O_N.d.ts.map → define-agent-eval-CEQWL9Hy.d.ts.map} +1 -1
  31. package/dist/{define-agent-eval-CvZQW4u9.js → define-agent-eval-rqNyVhVV.js} +4 -4
  32. package/dist/{define-agent-eval-CvZQW4u9.js.map → define-agent-eval-rqNyVhVV.js.map} +1 -1
  33. package/dist/{dspy-rlm-engine-BmtOl_kP.js → dspy-rlm-engine-DHI0WrUU.js} +2 -2
  34. package/dist/{dspy-rlm-engine-BmtOl_kP.js.map → dspy-rlm-engine-DHI0WrUU.js.map} +1 -1
  35. package/dist/{engine-CIy18RTX.d.ts → engine-BLzhNzoY.d.ts} +4 -4
  36. package/dist/{engine-CIy18RTX.d.ts.map → engine-BLzhNzoY.d.ts.map} +1 -1
  37. package/dist/{eval-campaign-bmZ6NIIP.js → eval-campaign-C4jmuM-b.js} +2 -2
  38. package/dist/{eval-campaign-bmZ6NIIP.js.map → eval-campaign-C4jmuM-b.js.map} +1 -1
  39. package/dist/{exact-types-rdKFzEnK.d.ts → exact-types-ccQAyut1.d.ts} +2 -2
  40. package/dist/{exact-types-rdKFzEnK.d.ts.map → exact-types-ccQAyut1.d.ts.map} +1 -1
  41. package/dist/experiment/index.d.ts +73 -4
  42. package/dist/experiment/index.d.ts.map +1 -1
  43. package/dist/experiment/index.js +175 -1
  44. package/dist/experiment/index.js.map +1 -1
  45. package/dist/{experiment-tracker-D9VHwRm-.d.ts → experiment-tracker-0MhuPArU.d.ts} +2 -2
  46. package/dist/{experiment-tracker-D9VHwRm-.d.ts.map → experiment-tracker-0MhuPArU.d.ts.map} +1 -1
  47. package/dist/{external-optimizer-contracts-CSjDLLmr.d.ts → external-optimizer-contracts-DbLsm4Po.d.ts} +13 -6
  48. package/dist/{external-optimizer-contracts-CSjDLLmr.d.ts.map → external-optimizer-contracts-DbLsm4Po.d.ts.map} +1 -1
  49. package/dist/{external-optimizer-process-C4AyCcQd.js → external-optimizer-process-Bhmzngf-.js} +4 -4
  50. package/dist/{external-optimizer-process-C4AyCcQd.js.map → external-optimizer-process-Bhmzngf-.js.map} +1 -1
  51. package/dist/{external-optimizer-subprocess-DU1KM8yV.js → external-optimizer-subprocess-Dn90UqN2.js} +572 -25
  52. package/dist/external-optimizer-subprocess-Dn90UqN2.js.map +1 -0
  53. package/dist/{feedback-trajectory-niGeR6uJ.d.ts → feedback-trajectory-DpTTjo0q.d.ts} +3 -3
  54. package/dist/{feedback-trajectory-niGeR6uJ.d.ts.map → feedback-trajectory-DpTTjo0q.d.ts.map} +1 -1
  55. package/dist/hosted/index.d.ts +2 -2
  56. package/dist/index-C1ravkGA.d.ts +1 -0
  57. package/dist/{index-aHDnhBC7.d.ts → index-CTKpu9ry.d.ts} +7 -7
  58. package/dist/{index-aHDnhBC7.d.ts.map → index-CTKpu9ry.d.ts.map} +1 -1
  59. package/dist/{index-BCDyf_kT.d.ts → index-IQccV3Ou.d.ts} +47 -11
  60. package/dist/index-IQccV3Ou.d.ts.map +1 -0
  61. package/dist/index.d.ts +20 -20
  62. package/dist/index.js +8 -8
  63. package/dist/{integrity-CGfpTE5-.d.ts → integrity-B0dZ96EO.d.ts} +2 -2
  64. package/dist/{integrity-CGfpTE5-.d.ts.map → integrity-B0dZ96EO.d.ts.map} +1 -1
  65. package/dist/{llm-client-BMuxYoZy.js → llm-client-Bg32RW0j.js} +61 -7
  66. package/dist/llm-client-Bg32RW0j.js.map +1 -0
  67. package/dist/{llm-judge-DWq1Ptco.js → llm-judge-CVq33oz1.js} +5 -4
  68. package/dist/llm-judge-CVq33oz1.js.map +1 -0
  69. package/dist/{matrix-Bc111FKv.d.ts → matrix-DrVnRp4G.d.ts} +2 -2
  70. package/dist/{matrix-Bc111FKv.d.ts.map → matrix-DrVnRp4G.d.ts.map} +1 -1
  71. package/dist/meta-eval/index.d.ts +1 -1
  72. package/dist/multishot/golden/index.d.ts +1 -1
  73. package/dist/multishot/index.d.ts +2 -2
  74. package/dist/openapi.json +1 -1
  75. package/dist/{produced-state-C0oJ4vr-.js → produced-state-jfk8Du3b.js} +3 -3
  76. package/dist/{produced-state-C0oJ4vr-.js.map → produced-state-jfk8Du3b.js.map} +1 -1
  77. package/dist/{promotion-policy-CewdjfCJ.d.ts → promotion-policy-DLOUkYhI.d.ts} +2 -2
  78. package/dist/{promotion-policy-CewdjfCJ.d.ts.map → promotion-policy-DLOUkYhI.d.ts.map} +1 -1
  79. package/dist/{provenance-DA-Pmyfv.d.ts → provenance-oA4-zUqm.d.ts} +17 -6
  80. package/dist/{provenance-DA-Pmyfv.d.ts.map → provenance-oA4-zUqm.d.ts.map} +1 -1
  81. package/dist/{registry-CaqJIDdN.d.ts → registry-BQwrSYpC.d.ts} +4 -4
  82. package/dist/{registry-CaqJIDdN.d.ts.map → registry-BQwrSYpC.d.ts.map} +1 -1
  83. package/dist/{researcher-BySlpla_.d.ts → researcher-DJnoUE8c.d.ts} +3 -3
  84. package/dist/{researcher-BySlpla_.d.ts.map → researcher-DJnoUE8c.d.ts.map} +1 -1
  85. package/dist/{reward-hacking-DFo2FU5J.js → reward-hacking-DKI9T52l.js} +19 -1
  86. package/dist/reward-hacking-DKI9T52l.js.map +1 -0
  87. package/dist/rl.d.ts +2 -2
  88. package/dist/rl.js +2 -2
  89. package/dist/{semantic-concept-judge-BI7Rrl5-.js → semantic-concept-judge-laMCnTLn.js} +2 -2
  90. package/dist/{semantic-concept-judge-BI7Rrl5-.js.map → semantic-concept-judge-laMCnTLn.js.map} +1 -1
  91. package/dist/{series-convergence-D2fsoJ2w.d.ts → series-convergence-BxKEgBwA.d.ts} +2 -2
  92. package/dist/{series-convergence-D2fsoJ2w.d.ts.map → series-convergence-BxKEgBwA.d.ts.map} +1 -1
  93. package/dist/{server-D9wQclzG.js → server-dIWwF3j_.js} +2 -2
  94. package/dist/{server-D9wQclzG.js.map → server-dIWwF3j_.js.map} +1 -1
  95. package/dist/{skillopt-optimization-method-ChCTN4FD.d.ts → skillopt-optimization-method-BDD_o1xE.d.ts} +19 -13
  96. package/dist/{skillopt-optimization-method-ChCTN4FD.d.ts.map → skillopt-optimization-method-BDD_o1xE.d.ts.map} +1 -1
  97. package/dist/{skillopt-optimization-method-Donmq4sq.js → skillopt-optimization-method-DLeUcK-K.js} +92 -14
  98. package/dist/skillopt-optimization-method-DLeUcK-K.js.map +1 -0
  99. package/dist/{statistical-heldout-uxSpFEjm.d.ts → statistical-heldout-_woZ9q9j.d.ts} +2 -2
  100. package/dist/{statistical-heldout-uxSpFEjm.d.ts.map → statistical-heldout-_woZ9q9j.d.ts.map} +1 -1
  101. package/dist/{store-tool-spans-D5FhM0_A.d.ts → store-tool-spans-Br2_IUhm.d.ts} +4 -4
  102. package/dist/{store-tool-spans-D5FhM0_A.d.ts.map → store-tool-spans-Br2_IUhm.d.ts.map} +1 -1
  103. package/dist/{tool-groups-zpufabP8.d.ts → tool-groups-B4tqh8jB.d.ts} +3 -3
  104. package/dist/tool-groups-B4tqh8jB.d.ts.map +1 -0
  105. package/dist/trace-repair/index.d.ts +1 -1
  106. package/dist/traces.d.ts +7 -7
  107. package/dist/{types-BohHewKK.d.ts → types-B2NsbrNy.d.ts} +2 -2
  108. package/dist/{types-BohHewKK.d.ts.map → types-B2NsbrNy.d.ts.map} +1 -1
  109. package/dist/{types-ColZlZtc.d.ts → types-CLAwnY-L.d.ts} +2 -2
  110. package/dist/{types-ColZlZtc.d.ts.map → types-CLAwnY-L.d.ts.map} +1 -1
  111. package/dist/{types-C1Bmeb8X.d.ts → types-DdFNuyxQ.d.ts} +3 -3
  112. package/dist/{types-C1Bmeb8X.d.ts.map → types-DdFNuyxQ.d.ts.map} +1 -1
  113. package/dist/{types-DOhGq4S1.d.ts → types-jUBXJ7Iz.d.ts} +50 -5
  114. package/dist/types-jUBXJ7Iz.d.ts.map +1 -0
  115. package/dist/wire/index.d.ts +2 -2
  116. package/dist/wire/index.js +1 -1
  117. package/docs/campaign-proposers.md +67 -3
  118. package/docs/experiment.md +2 -0
  119. package/docs/multishot-golden-records.md +3 -0
  120. package/package.json +4 -2
  121. package/dist/benchmark-command-gufocQ-N.js.map +0 -1
  122. package/dist/campaign-BcfXzmPM.js.map +0 -1
  123. package/dist/external-optimizer-subprocess-DU1KM8yV.js.map +0 -1
  124. package/dist/index-BCDyf_kT.d.ts.map +0 -1
  125. package/dist/index-CKblBxtr.d.ts +0 -1
  126. package/dist/llm-client-BMuxYoZy.js.map +0 -1
  127. package/dist/llm-judge-DWq1Ptco.js.map +0 -1
  128. package/dist/reward-hacking-DFo2FU5J.js.map +0 -1
  129. package/dist/skillopt-optimization-method-Donmq4sq.js.map +0 -1
  130. package/dist/tool-groups-zpufabP8.d.ts.map +0 -1
  131. package/dist/types-DOhGq4S1.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"store-tool-spans-D5FhM0_A.d.ts","names":[],"sources":["../src/trace/otel.ts","../src/trace/redact.ts","../src/trace-analyst/store-boundary.ts","../src/trace/otlp-flat.ts","../src/trace-analyst/analyst.ts","../src/trace-analyst/insights.ts","../src/trace-analyst/store-otlp.ts","../src/trace-analyst/store-tool-spans.ts"],"mappings":";;;;;;;;cAqBa;EAA0B;EAAoC;;UAE1D;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;IACV;IACA;MAAS;MAAsB;MAAmB;MAAsB;;;EAE1E,SAAS;IAAQ;IAAsB;IAAc,aAAa;;EAClE;IAAW;IAAc;;;UAGV;EACf;IAAY,YAAY;;EACxB,YAAY;IAAQ,cAAc;IAAuB,OAAO;;;UAGjD;EACf,eAAe;;;iBAIK,gBACpB,OAAO,YACP,eACA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B,SAAS,sBAAsB;iBA2D1D,4BAA4B;iBA6B5B,wBAAwB,OAAO;;;UC1K9B;;EAEf;;EAEA;;EAEA;;EAEA;;KAGG,gCAAgC;UAEpB,kCAAkC;;EAEjD;;;;;;;;EAQA;;uBAMa,kCAAkC;mBAC9B;mBACA;mBACA;mBACA;UACT;UACA;UACA;UACA;EAER,YAAY,MAAM;EAyBZ,SAAS,kBAAkB,UAAU,4BAA4B;EAOjE,SACJ;IAAQ;IAAkB;KAC1B,UAAU,4BACT;EAeG,YACJ,UAAU,qBACV,UAAU,4BACT,QAAQ;EAoDL,YACJ;IAAQ,UAAU;IAAqB;IAAe;KACtD,UAAU,4BACT,QAAQ;EAmBL,YACJ,UAAU,qBACV,UAAU,4BACT;EAMG,UACJ;IAAQ;IAAkB;KAC1B,UAAU,4BACT,QAAQ;EAuCL,UACJ;IAAQ;IAAkB;IAA6B;KACvD,UAAU,4BACT,QAAQ;EAsFL,YACJ;IAAQ;IAAkB;IAAuB;KACjD,UAAU,4BACT,QAAQ;EA4CL,WACJ;IAAQ;IAAkB;IAAiB;IAAuB;KAClE,UAAU,4BACT,QAAQ;;;EA6CL,cAAc,UAAU,4BAA4B;UAI5C;qBAmBK,WAAW,SAAS,cAAc,QAAQ;qBAE1C;UAEL;UAmBA;UAsHA;UA+DN;UAkBA;UAwDA;UAmBM;;cA+CH,2BAA2B;mBACrB;mBACA;EAEjB,YAAY,MAAM;;;YAYF,WAAW,SAAS,cAAc,QAAQ;YAkBhD;;;iBAwBI,6BACd,cACA,OAAM,uCACL;;;;cC/7BU,8BAA8B;EACzC;;;;;;iBASc,8BACd,gBAAgB,+BAChB,UAAS,uCACR"}
1
+ {"version":3,"file":"store-tool-spans-Br2_IUhm.d.ts","names":[],"sources":["../src/trace/otel.ts","../src/trace/redact.ts","../src/trace-analyst/store-boundary.ts","../src/trace/otlp-flat.ts","../src/trace-analyst/analyst.ts","../src/trace-analyst/insights.ts","../src/trace-analyst/store-otlp.ts","../src/trace-analyst/store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;YAkBhD;;;iBAwBI,6BACd,cACA,OAAM,uCACL;;;;cC/7BU,8BAA8B;EACzC;;;;;;iBASc,8BACd,gBAAgB,+BAChB,UAAS,uCACR"}
@@ -1,5 +1,5 @@
1
- import { w as TraceAnalysisStore } from "./types-BohHewKK.js";
2
- import { _ as TraceAnalysisToolDescriptor } from "./engine-CIy18RTX.js";
1
+ import { w as TraceAnalysisStore } from "./types-B2NsbrNy.js";
2
+ import { _ as TraceAnalysisToolDescriptor } from "./engine-BLzhNzoY.js";
3
3
  //#region src/analyst/tool-groups.d.ts
4
4
  /** Named tool sets. Kinds pass `tools: TRACE_TOOL_GROUPS.failureForensics` etc. */
5
5
  type TraceToolGroupName =
@@ -25,4 +25,4 @@ type TraceToolGroupName =
25
25
  declare function buildTraceToolsForGroup(group: TraceToolGroupName, store: TraceAnalysisStore): TraceAnalysisToolDescriptor[];
26
26
  //#endregion
27
27
  export { buildTraceToolsForGroup as n, TraceToolGroupName as t };
28
- //# sourceMappingURL=tool-groups-zpufabP8.d.ts.map
28
+ //# sourceMappingURL=tool-groups-B4tqh8jB.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-groups-B4tqh8jB.d.ts","names":[],"sources":["../src/analyst/tool-groups.ts"],"mappings":";;;;KAmBY;;;;;;;;;;;;;;;;;;;;iBAgDI,wBACd,OAAO,oBACP,OAAO,qBACN"}
@@ -2,7 +2,7 @@ import { r as CaptureIntegrityError } from "../errors-DEE6u6ot.js";
2
2
  import { t as DefaultVerdict } from "../verdict-E4eRNf7-.js";
3
3
  import { b as CustomTokenPricing, c as CostLedgerHandle, p as CostProvenance } from "../cost-ledger-DbQdN3nO.js";
4
4
  import { u as RunTokenUsage } from "../run-record-DVV82Gwh.js";
5
- import { a as TraceAnalystLimits, n as TraceAnalysisEngine } from "../engine-CIy18RTX.js";
5
+ import { a as TraceAnalystLimits, n as TraceAnalysisEngine } from "../engine-BLzhNzoY.js";
6
6
  import { t as PrimeBridgeTransport } from "../prime-bridge-transport-6feEglLf.js";
7
7
  import { g as isRecordedTimeout, o as RecordedTrajectoryStep } from "../steps-AmkT-GIM.js";
8
8
  //#region src/trace-repair/mini-swe-scaffold.d.ts
package/dist/traces.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import { c as ValidationError, o as LimitExceededError, r as CaptureIntegrityError, s as NotFoundError, t as AgentEvalError } from "./errors-DEE6u6ot.js";
2
2
  import { C as TraceEvent, D as isSandboxSpan, E as isRetrievalSpan, O as isToolSpan, S as ToolSpan, T as isLlmSpan, _ as Span, a as FAILURE_CLASSES, b as SpanStatus, c as JudgeSpan, d as RetrievalSpan, f as Run, g as SandboxSpan, h as RunStatus, i as EventKind, l as LlmSpan, m as RunOutcome, n as BudgetLedgerEntry, o as FailureClass, p as RunLayer, r as BudgetSpec, s as GenericSpan, t as Artifact, u as Message, v as SpanBase, w as isJudgeSpan, x as TRACE_SCHEMA_VERSION, y as SpanKind } from "./schema-BtVldJ3T.js";
3
3
  import { a as RunRecord, l as RunTerminalOutcome, s as RunSplitTag, u as RunTokenUsage } from "./run-record-DVV82Gwh.js";
4
- import { a as ExtractedUsage, c as extractUsageFromResponse, i as ExtractUsageFromSseOptions, l as extractUsageFromSse, n as CaptureFetchOptions, o as SseUsageMode, r as captureFetchToRawSink, s as extractUsage, t as CaptureFetchContext } from "./capture-fetch-BAx3Gntt.js";
5
- import { _t as providerFromBaseUrl, ct as InMemoryRawProviderSink, dt as ProviderRedactor, ft as RawProviderDirection, gt as defaultProviderRedactor, ht as RawProviderSinkFilter, lt as InMemoryRawProviderSinkOptions, mt as RawProviderSink, ot as FileSystemRawProviderSink, pt as RawProviderEvent, st as FileSystemRawProviderSinkOptions, ut as NoopRawProviderSink } from "./types-DOhGq4S1.js";
4
+ import { a as ExtractedUsage, c as extractUsageFromResponse, i as ExtractUsageFromSseOptions, l as extractUsageFromSse, n as CaptureFetchOptions, o as SseUsageMode, r as captureFetchToRawSink, s as extractUsage, t as CaptureFetchContext } from "./capture-fetch-BBVFzhkk.js";
5
+ import { _t as defaultProviderRedactor, ct as FileSystemRawProviderSinkOptions, dt as NoopRawProviderSink, ft as ProviderRedactor, gt as RawProviderSinkFilter, ht as RawProviderSink, lt as InMemoryRawProviderSink, mt as RawProviderEvent, pt as RawProviderDirection, st as FileSystemRawProviderSink, ut as InMemoryRawProviderSinkOptions, vt as providerFromBaseUrl } from "./types-jUBXJ7Iz.js";
6
6
  import { a as RunFilter, i as InMemoryTraceStore, n as FileSystemTraceStore, o as SpanFilter, r as FileSystemTraceStoreOptions, s as TraceStore, t as EventFilter } from "./store-CT9YIIve.js";
7
7
  import { a as TraceEmitterOptions, i as TraceEmitter, n as RunCompleteHookContext, o as llmSpanFromProvider, r as SpanHandle, t as RunCompleteHook } from "./emitter-DGQGoLyj.js";
8
- import { a as RunIntegrityReport, i as RunIntegrityIssueCode, n as RunIntegrityExpectations, o as assertRunCaptured, r as RunIntegrityIssue, s as throwIfRunIncomplete, t as RunIntegrityError } from "./integrity-CGfpTE5-.js";
9
- import { A as createBoundedTraceAnalysisStore, B as OtlpSpan, C as scoreTraceInsightReadiness, D as AnalyzeTracesResult, E as AnalyzeTracesOptions, F as redactString, I as redactValue, L as OTEL_AGENT_EVAL_SCOPE, M as REDACTION_VERSION, N as RedactionReport, O as analyzeTraces, P as RedactionRule, R as OtlpExport, S as planTraceInsightQuestions, T as AnalyzeTracesInput, V as exportRunAsOtlp, _ as buildTraceInsightPrompt, a as ToolSpansToTraceAnalysisStoreOptions, b as domainEvidencePattern, c as TraceInsightFinding, d as TraceInsightQualityGate, f as TraceInsightQuestion, g as buildTraceInsightContext, h as TraceInsightTask, i as OtlpFileTraceStoreOptions, j as DEFAULT_REDACTION_RULES, k as OtlpFlatLine, l as TraceInsightPanelRole, m as TraceInsightSuite, n as toolSpansToTraceAnalysisStore, o as otlpTextToTraceAnalysisStore, p as TraceInsightReadiness, r as OtlpFileTraceStore, s as TraceInsightContext, t as ToolTraceMissingError, u as TraceInsightPromptInput, v as defaultTraceInsightPanel, w as tokenizeDomainWords, x as inferDomainKeywords, y as describeTraceInsightScope, z as OtlpResourceSpans } from "./store-tool-spans-D5FhM0_A.js";
8
+ import { a as RunIntegrityReport, i as RunIntegrityIssueCode, n as RunIntegrityExpectations, o as assertRunCaptured, r as RunIntegrityIssue, s as throwIfRunIncomplete, t as RunIntegrityError } from "./integrity-B0dZ96EO.js";
9
+ import { A as createBoundedTraceAnalysisStore, B as OtlpSpan, C as scoreTraceInsightReadiness, D as AnalyzeTracesResult, E as AnalyzeTracesOptions, F as redactString, I as redactValue, L as OTEL_AGENT_EVAL_SCOPE, M as REDACTION_VERSION, N as RedactionReport, O as analyzeTraces, P as RedactionRule, R as OtlpExport, S as planTraceInsightQuestions, T as AnalyzeTracesInput, V as exportRunAsOtlp, _ as buildTraceInsightPrompt, a as ToolSpansToTraceAnalysisStoreOptions, b as domainEvidencePattern, c as TraceInsightFinding, d as TraceInsightQualityGate, f as TraceInsightQuestion, g as buildTraceInsightContext, h as TraceInsightTask, i as OtlpFileTraceStoreOptions, j as DEFAULT_REDACTION_RULES, k as OtlpFlatLine, l as TraceInsightPanelRole, m as TraceInsightSuite, n as toolSpansToTraceAnalysisStore, o as otlpTextToTraceAnalysisStore, p as TraceInsightReadiness, r as OtlpFileTraceStore, s as TraceInsightContext, t as ToolTraceMissingError, u as TraceInsightPromptInput, v as defaultTraceInsightPanel, w as tokenizeDomainWords, x as inferDomainKeywords, y as describeTraceInsightScope, z as OtlpResourceSpans } from "./store-tool-spans-Br2_IUhm.js";
10
10
  import { C as TOOL_LATENCY_MS, D as asNumber, E as applyLlmSpanOtlpAttributes, O as contextInputTokens, S as TOOL_ARGS_CAPTURED, T as TOOL_NAME_ATTR_KEYS, _ as LlmSpanOtlpInput, a as LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, b as RUN_COST_ATTR_KEYS, c as LLM_COST_USD, d as LLM_MODEL_ATTR_KEYS, f as LLM_MODEL_NAME, g as LLM_REASONING_TOKEN_ATTR_KEYS, h as LLM_REASONING_TOKENS, i as LLM_CACHE_WRITE_TOKENS, k as firstNumberAttr, l as LLM_INPUT_TOKENS, m as LLM_OUTPUT_TOKEN_ATTR_KEYS, n as LLM_CACHED_TOKENS, o as LLM_CONTEXT_TOKENS, p as LLM_OUTPUT_TOKENS, r as LLM_CACHED_TOKEN_ATTR_KEYS, s as LLM_COST_ATTR_KEYS, t as INPUT_VALUE, u as LLM_INPUT_TOKEN_ATTR_KEYS, v as OPENINFERENCE_SPAN_KIND, w as TOOL_NAME, x as SPAN_KIND_ATTR_KEYS, y as OUTPUT_VALUE } from "./attribute-vocabulary-DLJ6303h.js";
11
11
  import { a as judgeSpans, c as runsForScenario, i as hasCapturedToolArgs, l as toolSpans, n as argHash, o as llmSpans, r as groupBy, s as runFailureClass, t as aggregateLlm } from "./query-CJ_DX8vl.js";
12
- import "./index-CKblBxtr.js";
13
- import { A as SearchSpanResult, B as ViewSpansResult, C as TRACE_ANALYSIS_LIMITS, D as DatasetOverview, E as DEFAULT_TRACE_ANALYST_BUDGETS, F as TraceAnalystFilters, H as ViewTraceResult, I as TraceAnalystSpan, L as TraceAnalystSpanKind, M as SpanMatchRecord, N as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, O as ErrorCluster, P as TraceAnalystByteBudgets, R as TraceAnalystSpanStatus, S as BoundedTraceAnalysisStoreOptions, T as TraceAnalysisStoreContext, V as ViewTraceOversized, j as SearchTraceResult, k as QueryTracesPage, w as TraceAnalysisStore, z as TraceAnalystTraceSummary } from "./types-BohHewKK.js";
14
- import { _ as TraceAnalysisToolDescriptor, g as TRACE_ANALYST_TOOL_NAMESPACE, h as BuildTraceAnalysisToolsOptions, v as buildTraceAnalysisToolDescriptors, y as traceAnalystFunctionGroup } from "./engine-CIy18RTX.js";
12
+ import "./index-C1ravkGA.js";
13
+ import { A as SearchSpanResult, B as ViewSpansResult, C as TRACE_ANALYSIS_LIMITS, D as DatasetOverview, E as DEFAULT_TRACE_ANALYST_BUDGETS, F as TraceAnalystFilters, H as ViewTraceResult, I as TraceAnalystSpan, L as TraceAnalystSpanKind, M as SpanMatchRecord, N as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, O as ErrorCluster, P as TraceAnalystByteBudgets, R as TraceAnalystSpanStatus, S as BoundedTraceAnalysisStoreOptions, T as TraceAnalysisStoreContext, V as ViewTraceOversized, j as SearchTraceResult, k as QueryTracesPage, w as TraceAnalysisStore, z as TraceAnalystTraceSummary } from "./types-B2NsbrNy.js";
14
+ import { _ as TraceAnalysisToolDescriptor, g as TRACE_ANALYST_TOOL_NAMESPACE, h as BuildTraceAnalysisToolsOptions, v as buildTraceAnalysisToolDescriptors, y as traceAnalystFunctionGroup } from "./engine-BLzhNzoY.js";
15
15
  //#region src/trace/otlp-attributes.d.ts
16
16
  type ToolSpanOtlpInput = Pick<ToolSpan, 'toolName' | 'args' | 'argsCaptured' | 'result' | 'latencyMs'>;
17
17
  type OtlpSpanRole = 'AGENT' | 'CHAIN' | 'EVALUATOR' | 'GUARDRAIL' | 'LLM' | 'SPAN' | 'TOOL' | 'UNKNOWN';
@@ -1,6 +1,6 @@
1
1
  import { c as CostLedgerHandle } from "./cost-ledger-DbQdN3nO.js";
2
2
  import { a as RunRecord, n as RunCostProvenance, u as RunTokenUsage } from "./run-record-DVV82Gwh.js";
3
- import { a as JudgeInput, p as ChatClient } from "./types-DOhGq4S1.js";
3
+ import { a as JudgeInput, p as ChatClient } from "./types-jUBXJ7Iz.js";
4
4
  import { RE2JS } from "re2js";
5
5
  //#region src/trace-analyst/types.d.ts
6
6
  /**
@@ -594,4 +594,4 @@ type AnalystRunEvent = {
594
594
  };
595
595
  //#endregion
596
596
  export { SearchSpanResult as A, ViewSpansResult as B, TRACE_ANALYSIS_LIMITS as C, DatasetOverview as D, DEFAULT_TRACE_ANALYST_BUDGETS as E, TraceAnalystFilters as F, ViewTraceResult as H, TraceAnalystSpan as I, TraceAnalystSpanKind as L, SpanMatchRecord as M, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX as N, ErrorCluster as O, TraceAnalystByteBudgets as P, TraceAnalystSpanStatus as R, BoundedTraceAnalysisStoreOptions as S, TraceAnalysisStoreContext as T, ViewTraceOversized as V, ProposalFinding as _, AnalystInputKind as a, makeFinding as b, AnalystRunInputs as c, AnalystSeverity as d, AnalystUsageReceipt as f, ExecutionProbeRequest as g, ExecutionProbeOutcome as h, AnalystFinding as i, SearchTraceResult as j, QueryTracesPage as k, AnalystRunResult as l, ExecutionProbe as m, AnalystContext as n, AnalystRequirements as o, EvidenceRef as p, AnalystCost as r, AnalystRunEvent as s, Analyst as t, AnalystRunSummary as u, ProposalFindingOrigin as v, TraceAnalysisStore as w, makeProposalFinding as x, computeFindingId as y, TraceAnalystTraceSummary as z };
597
- //# sourceMappingURL=types-BohHewKK.d.ts.map
597
+ //# sourceMappingURL=types-B2NsbrNy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-BohHewKK.d.ts","names":[],"sources":["../src/trace-analyst/types.ts","../src/trace-analyst/store-contract.ts","../src/analyst/types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAgBY;KAUA;;;;UAKK;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;;;EAGA,YAAY;;UAGG;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA;;;;;;;UAQe;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;IAAU;IAAqB;;;;;;EAK/B,gBAAgB;EAChB;IAAc;IAAkB;;;UAGjB;EACf,QAAQ;EACR;EACA;;;;;UAMe;EACf;EACA,QAAQ;EACR,YAAY;;UAGG;EACf;;EAEA,gBAAgB;;EAEhB;EACA;;UAGe;EACf;EACA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,cAAc;;;;;EAKjC,eAAe,SAAS;;EAExB,OAAO;;EAEP,OAAO,aAAa,SAAS;;EAE7B,SAAS;;;;;;;;EAQT,QAAQ;;;UAMO;EACf;;EAEA;;EAEA;;EAEA;EACA,SAAS;;;;;;;KAQC;EAEN;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EAAkB;IAAS;IAAe;;;;;;;;UAO/B;;WAEN;EACT,QAAQ,SAAS,wBAAwB,QAAQ;;;;;;;;UASlC,QAAQ;;WAEd;;WAEA;WACA,WAAW;WACX,MAAM;WACN,WAAW;;WAEX;EACT,QAAQ,OAAO,QAAQ,KAAK,iBAAiB,QAAQ;;;UAItC;;EAEf;;EAEA,QAAQ;;EAER,MAAM;;EAEN;;;;;;;;EAQA;IAAkB;IAAsB;;;;;;;;EAOxC;;;;;;;;;;iBAac,iBAAiB;EAC/B;EACA;EACA;EACA;;EAEA;;;;;;iBAyBc,YACd,MAAM,KAAK;EACT;EACA;IAED;;iBAiBa,oBACd,MAAM,KAAK;EACT;EACA;IAED;UAOc;EACf;EACA;;EAEA;EACA;EACA;;EAEA,OAAO;;EAEP;IAAU;IAAe;;;UAGV;EACf;EACA;EACA;EACA;EACA,UAAU;EACV,aAAa;;EAEb;;;;;EAKA,wBAAwB;;;;;;;;;;;;;;;KAkBd;EAEN;EACA;EACA;EACA;;EAEA,aAAa;;EAGb;EACA,SAAS;;EAGT;EACA;EACA;;EAGA;;EAEA,SAAS;EACT,UAAU,cAAc;;EAGxB;EACA,QAAQ"}
1
+ {"version":3,"file":"types-B2NsbrNy.d.ts","names":[],"sources":["../src/trace-analyst/types.ts","../src/trace-analyst/store-contract.ts","../src/analyst/types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAgBY;KAUA;;;;UAKK;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;;;EAGA,YAAY;;UAGG;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA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S;;EAGT;EACA;EACA;;EAGA;;EAEA,SAAS;EACT,UAAU,cAAc;;EAGxB;EACA,QAAQ"}
@@ -1,5 +1,5 @@
1
1
  import { s as RunSplitTag } from "./run-record-DVV82Gwh.js";
2
- import { R as Scenario, d as DispatchContext } from "./types-C1Bmeb8X.js";
2
+ import { R as Scenario, d as DispatchContext } from "./types-DdFNuyxQ.js";
3
3
  //#region src/benchmarks/types.d.ts
4
4
  type BenchmarkTaskKind = 'retrieval' | 'rag-answer' | 'hallucination' | 'kb-improvement' | 'routing' | 'custom';
5
5
  type BenchmarkFamily = 'beir' | 'mteb-retrieval' | 'msmarco' | 'trec-dl' | 'miracl' | 'lotte' | 'bright' | 'crag' | 'hotpotqa' | 'kilt' | 'ragtruth' | 'faithbench' | 'first-party' | 'custom';
@@ -90,4 +90,4 @@ declare const BENCHMARK_SPLIT_SEED = "agent-eval-v1";
90
90
  declare function deterministicSplit(itemId: string, seed?: string): RunSplitTag;
91
91
  //#endregion
92
92
  export { BenchmarkFamily as a, BenchmarkSource as c, BenchmarkEvaluation as i, BenchmarkTaskKind as l, BenchmarkAdapter as n, BenchmarkResponder as o, BenchmarkDatasetItem as r, BenchmarkScenario as s, BENCHMARK_SPLIT_SEED as t, deterministicSplit as u };
93
- //# sourceMappingURL=types-ColZlZtc.d.ts.map
93
+ //# sourceMappingURL=types-CLAwnY-L.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-ColZlZtc.d.ts","names":[],"sources":["../src/benchmarks/types.ts"],"mappings":";;;KASY;KAQA;UAgBK,qBAAqB;;;EAGpC;;EAEA,SAAS;;EAET,QAAQ;;EAER,SAAS;;EAET,WAAW;;EAEX;;EAEA,SAAS;EACT,WAAW;;UAGI;;;;EAIf;;EAEA;;EAEA,aAAa;;;EAGb,KAAK;EACL;;UAGe;EACf;EACA;EACA;EACA;EACA;;;UAQe,iBAAiB,kBAAkB,oBAAoB;;EAEtE;EACA,SAAS;EACT,WAAW;EACX;EACA,SAAS;EACT;;;;;EAKA,YAAY,OAAO,cAAc,QAAQ,qBAAqB;;EAE9D,SAAS,MAAM,qBAAqB,WAAW,UAAU,YAAY,QAAQ;;;;EAI7E,YAAY,iBAAiB;;UAGd,kBAAkB,4BAA4B;EAC7D;EACA;EACA,QAAQ;EACR,UAAU;EACV,UAAU;EACV,MAAM,qBAAqB;;KAGjB,mBAAmB,oBAAoB,uBAAuB;EACxE,UAAU,kBAAkB;EAC5B,MAAM,qBAAqB;EAC3B,SAAS;MACL,QAAQ,aAAa;;;cAoBd;;;;;;;;;iBAUG,mBACd,gBACA,gBACC"}
1
+ {"version":3,"file":"types-CLAwnY-L.d.ts","names":[],"sources":["../src/benchmarks/types.ts"],"mappings":";;;KASY;KAQA;UAgBK,qBAAqB;;;EAGpC;;EAEA,SAAS;;EAET,QAAQ;;EAER,SAAS;;EAET,WAAW;;EAEX;;EAEA,SAAS;EACT,WAAW;;UAGI;;;;EAIf;;EAEA;;EAEA,aAAa;;;EAGb,KAAK;EACL;;UAGe;EACf;EACA;EACA;EACA;EACA;;;UAQe,iBAAiB,kBAAkB,oBAAoB;;EAEtE;EACA,SAAS;EACT,WAAW;EACX;EACA,SAAS;EACT;;;;;EAKA,YAAY,OAAO,cAAc,QAAQ,qBAAqB;;EAE9D,SAAS,MAAM,qBAAqB,WAAW,UAAU,YAAY,QAAQ;;;;EAI7E,YAAY,iBAAiB;;UAGd,kBAAkB,4BAA4B;EAC7D;EACA;EACA,QAAQ;EACR,UAAU;EACV,UAAU;EACV,MAAM,qBAAqB;;KAGjB,mBAAmB,oBAAoB,uBAAuB;EACxE,UAAU,kBAAkB;EAC5B,MAAM,qBAAqB;EAC3B,SAAS;MACL,QAAQ,aAAa;;;cAoBd;;;;;;;;;iBAUG,mBACd,gBACA,gBACC"}
@@ -1,7 +1,7 @@
1
1
  import { S as PaidCallResult, T as RunPaidCallInput, a as CostChannel, c as CostLedgerHandle, f as CostLedgerSummary, p as CostProvenance } from "./cost-ledger-DbQdN3nO.js";
2
2
  import { u as RunTokenUsage } from "./run-record-DVV82Gwh.js";
3
- import { E as LlmCallMetadata } from "./types-DOhGq4S1.js";
4
- import { _ as ProposalFinding } from "./types-BohHewKK.js";
3
+ import { E as LlmCallMetadata } from "./types-jUBXJ7Iz.js";
4
+ import { _ as ProposalFinding } from "./types-B2NsbrNy.js";
5
5
  //#region src/campaign/types.d.ts
6
6
  /** Stable identifier + kind tag for any scenario. Consumers
7
7
  * extend with their per-domain payload (persona, task, requirement, ...). */
@@ -626,4 +626,4 @@ interface CampaignResult<TArtifact = unknown, TScenario extends Scenario = Scena
626
626
  }
627
627
  //#endregion
628
628
  export { LabeledScenarioWrite as A, ScoredSurfaceOutcome as B, JudgeDimension as C, LabeledScenarioSampleArgs as D, LabeledScenarioRecord as E, ProposeContext as F, labelTrustRank as G, SurfaceProposer as H, ProposedCandidate as I, RedactionStatus as L, OptimizerConfig as M, ParetoParent as N, LabeledScenarioSource as O, ProposalTrackContext as P, Scenario as R, JudgeConfig as S, LabelTrust as T, TraceSpan as U, SessionScript as V, isProposedCandidate as W, GateDecision as _, CampaignResult as a, GenerationRecord as b, CampaignTraceWriter as c, DispatchContext as d, DispatchFn as f, GateContribution as g, GateContext as h, CampaignCostMeter as i, MutableSurface as j, LabeledScenarioStore as k, CodeSurface as l, GateCheckStatus as m, CampaignArtifactWriter as n, CampaignScenarioIdentity as o, Gate as p, CampaignCellResult as r, CampaignTokenUsage as s, CampaignAggregates as t, ComponentSurface as u, GateResult as v, JudgeScore as w, JudgeAggregate as x, GenerationCandidate as y, ScenarioAggregate as z };
629
- //# sourceMappingURL=types-C1Bmeb8X.d.ts.map
629
+ //# sourceMappingURL=types-DdFNuyxQ.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-C1Bmeb8X.d.ts","names":[],"sources":["../src/campaign/types.ts"],"mappings":";;;;;;;UAgCiB;EACf;EACA;EACA;;;;;EAKA;;;UAIe,iCAAiC,KAAK;EACrD;;;;;UAMe;EACf;;EAEA;EACA;EAC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mBAAmB;;;EAGlC;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,aAAa,eAAe;;;EAG5B;;EAEA,gBAAgB;;EAEhB;;;EAGA,YAAY;;;EAGZ;;;EAGA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;UAGe;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA,YAAY;EACZ;;;;;;UAOe;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA;;;;EAIA;;;;EAIA;IACE;IACA;IACA,iBAAiB;MAAQ;MAAgB;;;;;EAI3C,YAAY;;;;;;;;;;EAUZ,WAAW;IAAQ;IAAoB;IAAmB;IAAgB;;;;EAG1E;;;;EAIA;;UAGe;EACf,SAAS,eAAe;EACxB,YAAY,eAAe;;EAE3B,MAAM;;EAEN;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe,eAAe,qBAAqB,kBAAkB,WAAW;;EAEhF;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA,OAAO,MAAM,mBAAmB;EAChC,YAAY;EACZ;IACE,aAAa;IACb;;EAEF,OAAO;EACP;EACA;EACA,iBAAiB;;;EAGjB,WAAW,MAAM,2BAA2B,KAAK"}
@@ -219,6 +219,14 @@ declare class ModelSubstitutionError extends AgentEvalError {
219
219
  readonly checks: ReadonlyArray<ServedModelCheck>;
220
220
  constructor(message: string, checks: ReadonlyArray<ServedModelCheck>);
221
221
  }
222
+ /**
223
+ * Consumer-facing name for the substitution policy a metered surface applies.
224
+ * `'exact'` rejects every substitution. `'allow-within-family'` accepts a
225
+ * different model of the same provider family; it keeps family-level claims
226
+ * valid and forfeits per-model claims. Maps to
227
+ * `AssertServedModelOptions.allowWithinFamily`.
228
+ */
229
+ type ServedModelPolicy = 'exact' | 'allow-within-family';
222
230
  interface AssertServedModelOptions {
223
231
  /**
224
232
  * Accept a different model of the same provider family (e.g. requested
@@ -281,7 +289,7 @@ declare function assertCrossFamilyServed(pairs: ReadonlyArray<{
281
289
  //#endregion
282
290
  //#region src/llm-client.d.ts
283
291
  interface LlmMessage {
284
- role: 'system' | 'user' | 'assistant';
292
+ role: 'system' | 'user' | 'assistant' | 'tool';
285
293
  /**
286
294
  * Either a plain text content string OR a multimodal content array
287
295
  * (text + image_url parts) for vision-capable models.
@@ -296,8 +304,35 @@ interface LlmMessage {
296
304
  detail?: 'auto' | 'low' | 'high';
297
305
  };
298
306
  }>;
307
+ /** Tool invocations made by an `assistant` message earlier in the turn. */
308
+ toolCalls?: LlmToolCall[];
309
+ /** The invocation a `tool` message answers. Required when role is `tool`. */
310
+ toolCallId?: string;
299
311
  }
300
312
  type LlmThinkingMode = 'enabled' | 'disabled';
313
+ /** Canonical function-tool definition offered to the model. */
314
+ interface LlmToolDefinition {
315
+ type: 'function';
316
+ function: {
317
+ name: string;
318
+ description?: string;
319
+ parameters: Record<string, unknown>;
320
+ };
321
+ }
322
+ /** Canonical tool-choice policy; meaningful only when `tools` is present. */
323
+ type LlmToolChoice = 'auto' | 'none' | 'required' | {
324
+ type: 'function';
325
+ function: {
326
+ name: string;
327
+ };
328
+ };
329
+ /** One tool invocation on a response or an assistant history message. */
330
+ interface LlmToolCall {
331
+ id: string;
332
+ name: string;
333
+ /** JSON-encoded arguments, exactly as the provider produced them. */
334
+ argumentsJson: string;
335
+ }
301
336
  interface LlmCallRequest {
302
337
  model: string;
303
338
  messages: LlmMessage[];
@@ -308,6 +343,10 @@ interface LlmCallRequest {
308
343
  name: string;
309
344
  schema: Record<string, unknown>;
310
345
  };
346
+ /** Function tools offered to the model for this call. */
347
+ tools?: LlmToolDefinition[];
348
+ /** Tool-choice policy for `tools`. */
349
+ toolChoice?: LlmToolChoice;
311
350
  temperature?: number;
312
351
  maxTokens?: number;
313
352
  /** OpenAI-compatible reasoning mode. Omitted when the provider default should apply. */
@@ -319,7 +358,7 @@ interface LlmCallRequest {
319
358
  * Returns undefined when output or multimodal input is not bounded, causing a
320
359
  * capped CostLedger to reject the call before execution. Pass
321
360
  * `customTokenPricing` when package pricing does not cover the model or endpoint. */
322
- declare function maximumChargeForLlmRequest(request: Pick<LlmCallRequest, 'model' | 'messages' | 'jsonSchema' | 'maxTokens' | 'thinking'>, options?: LlmClientOptions): MaximumCharge | undefined;
361
+ declare function maximumChargeForLlmRequest(request: Pick<LlmCallRequest, 'model' | 'messages' | 'jsonSchema' | 'tools' | 'toolChoice' | 'maxTokens' | 'thinking'>, options?: LlmClientOptions): MaximumCharge | undefined;
323
362
  interface LlmUsage {
324
363
  promptTokens: number;
325
364
  completionTokens: number;
@@ -334,6 +373,8 @@ interface LlmUsage {
334
373
  interface LlmCallResult {
335
374
  /** The text content of the first choice. Empty string if none. */
336
375
  content: string;
376
+ /** Tool invocations from the first choice, when the model called tools. */
377
+ toolCalls?: LlmToolCall[];
337
378
  usage: LlmUsage;
338
379
  /**
339
380
  * Cost in USD. Uses the provider's reported cost when present, otherwise
@@ -383,7 +424,11 @@ interface LlmCallResult {
383
424
  raw: Record<string, unknown>;
384
425
  }
385
426
  type LlmCallMetadata = Pick<LlmCallResult, 'usage' | 'costUsd' | 'model' | 'durationMs'>;
386
- /** Convert a provider result into the canonical paid-call receipt input. */
427
+ /** Convert a provider result into the canonical paid-call receipt input.
428
+ * The receipt is JSON-clean: absent optional fields are omitted, never carried
429
+ * as explicit-undefined keys. Receipts cross JSON boundaries (the external
430
+ * optimizer's loopback proxy validates them with `assertJsonValue`), where an
431
+ * explicit-undefined value is rejected as non-serializable. */
387
432
  declare function costReceiptFromLlm(result: LlmCallResult, customTokenPricing?: CustomTokenPricing): CostReceiptInput;
388
433
  /** Structured-response failures retain their completed provider receipt. */
389
434
  declare function costReceiptFromLlmError(error: Error, customTokenPricing?: CustomTokenPricing): CostReceiptInput | undefined;
@@ -835,5 +880,5 @@ interface CheckResult {
835
880
  actual: string;
836
881
  }
837
882
  //#endregion
838
- export { checkServedModel as $, LlmClientOptions as A, isTransientLlmError as B, SandboxSdkTransportOpts as C, LlmCallRequest as D, LlmCallMetadata as E, assertLlmRoute as F, AssertServedModelOptions as G, probeLlm as H, callLlm as I, ServedModelCheck as J, ModelSubstitutionError as K, callLlmJson as L, LlmResponseError as M, LlmRouteRequirements as N, LlmCallResult as O, LlmUsage as P, assertServedModels as Q, costReceiptFromLlm as R, RouterTransportOpts as S, LlmCallError as T, stripFencedJson as U, maximumChargeForLlmRequest as V, AssertCrossFamilyServedOptions as W, assertCrossFamilyServed as X, ServedModelVerdict as Y, assertServedModel as Z, CliBridgeTransportOpts as _, providerFromBaseUrl as _t, JudgeInput as a, judgeFamily as at, DirectProviderTransportOpts as b, PersonaConfig as c, InMemoryRawProviderSink as ct, Scenario as d, ProviderRedactor as dt, servedModelAcceptable as et, ChatCallOpts as f, RawProviderDirection as ft, ChatTransport as g, defaultProviderRedactor as gt, ChatResponse as h, RawProviderSinkFilter as ht, JudgeFn as i, assertCrossFamily as it, LlmMessage as j, LlmClient as k, ProductClientConfig as l, InMemoryRawProviderSinkOptions as lt, ChatRequest as m, RawProviderSink as mt, CompletionCriterion as n, CrossFamilyError as nt, JudgeRubric as o, FileSystemRawProviderSink as ot, ChatClient as p, RawProviderEvent as pt, ServedCrossFamilyError as q, DriverState as r, JudgeFamily as rt, JudgeScore as s, FileSystemRawProviderSinkOptions as st, CheckResult as t, AssertCrossFamilyOptions as tt, RouteMap as u, NoopRawProviderSink as ut, CreateChatClientOpts as v, createChatClient as w, MockTransportOpts as x, CustomTransportOpts as y, costReceiptFromLlmError as z };
839
- //# sourceMappingURL=types-DOhGq4S1.d.ts.map
883
+ export { assertServedModels as $, LlmClientOptions as A, isTransientLlmError as B, SandboxSdkTransportOpts as C, LlmCallRequest as D, LlmCallMetadata as E, assertLlmRoute as F, AssertServedModelOptions as G, probeLlm as H, callLlm as I, ServedModelCheck as J, ModelSubstitutionError as K, callLlmJson as L, LlmResponseError as M, LlmRouteRequirements as N, LlmCallResult as O, LlmUsage as P, assertServedModel as Q, costReceiptFromLlm as R, RouterTransportOpts as S, LlmCallError as T, stripFencedJson as U, maximumChargeForLlmRequest as V, AssertCrossFamilyServedOptions as W, ServedModelVerdict as X, ServedModelPolicy as Y, assertCrossFamilyServed as Z, CliBridgeTransportOpts as _, defaultProviderRedactor as _t, JudgeInput as a, assertCrossFamily as at, DirectProviderTransportOpts as b, PersonaConfig as c, FileSystemRawProviderSinkOptions as ct, Scenario as d, NoopRawProviderSink as dt, checkServedModel as et, ChatCallOpts as f, ProviderRedactor as ft, ChatTransport as g, RawProviderSinkFilter as gt, ChatResponse as h, RawProviderSink as ht, JudgeFn as i, JudgeFamily as it, LlmMessage as j, LlmClient as k, ProductClientConfig as l, InMemoryRawProviderSink as lt, ChatRequest as m, RawProviderEvent as mt, CompletionCriterion as n, AssertCrossFamilyOptions as nt, JudgeRubric as o, judgeFamily as ot, ChatClient as p, RawProviderDirection as pt, ServedCrossFamilyError as q, DriverState as r, CrossFamilyError as rt, JudgeScore as s, FileSystemRawProviderSink as st, CheckResult as t, servedModelAcceptable as tt, RouteMap as u, InMemoryRawProviderSinkOptions as ut, CreateChatClientOpts as v, providerFromBaseUrl as vt, createChatClient as w, MockTransportOpts as x, CustomTransportOpts as y, costReceiptFromLlmError as z };
884
+ //# sourceMappingURL=types-jUBXJ7Iz.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-jUBXJ7Iz.d.ts","names":[],"sources":["../src/trace/raw-provider-sink.ts","../src/judge-families.ts","../src/integrity/served-model.ts","../src/llm-client.ts","../src/analyst/chat-client.ts","../src/types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BY;UAEK;;EAEf;;EAEA;EACA;;;;;;EAMA;EACA;;EAEA;;EAEA;;EAEA;EACA,WAAW;;EAEX;;EAEA;EACA;EACA,iBAAiB;EACjB;EACA,kBAAkB;EAClB;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA,YAAY;EACZ;;UAGe;EACf,OAAO,OAAO,mBAAmB;;EAEjC,MAAM,SAAS,wBAAwB,QAAQ;;EAE/C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;EACA;EACA;EACA;EACA;;UAGe;EACf;IAAc;IAAc;;EAC5B;IAAmB;IAAc,QAAQ;;EACzC;IAAc;IAAkB;;EAChC;;UAKe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;GACC;;UAGc;EACf;EACA,QAAQ;;EAER;;UAyBe;EACf;EACA,QAAQ,OAAO;EACf,YAAY,OAAO;;;;;;;;;;KAWT;UAEK;EACf;EACA;EACA;EACA,oBAAoB;EACpB;;EAEA,QAAQ;;;;;;;EAOR;;;;;;;EAOA;;;;;;EAMA;;UAGe;EACf;EACA;EACA;IAAa;IAAiB;IAAkB;;EAChD;EACA;EACA;;UAGe;EACf,UAAU;EACV,OAAO;EACP,WAAW;;EAEX,aAAa;EACb;EACA,WAAW;EACX,SAAS;;KAGC,WAAW,MAAM,YAAY,OAAO,eAAe,QAAQ;UAYtD;EACf;EACA;EACA;EACA"}
@@ -1,7 +1,7 @@
1
1
  import { c as CostLedgerHandle } from "../cost-ledger-DbQdN3nO.js";
2
- import { A as LlmClientOptions, N as LlmRouteRequirements } from "../types-DOhGq4S1.js";
2
+ import { A as LlmClientOptions, N as LlmRouteRequirements } from "../types-jUBXJ7Iz.js";
3
3
  import { s as TraceStore } from "../store-CT9YIIve.js";
4
- import { m as FeedbackTrajectoryStore } from "../feedback-trajectory-niGeR6uJ.js";
4
+ import { m as FeedbackTrajectoryStore } from "../feedback-trajectory-DpTTjo0q.js";
5
5
  import { z } from "zod";
6
6
  import { ServerType } from "@hono/node-server";
7
7
  import { Hono } from "hono";
@@ -1,2 +1,2 @@
1
- import { A as TraceEventSchema, C as HealthResponseSchema, D as RubricDimensionSchema, E as ListRubricsResponseSchema, F as hashRubric, M as TracesIngestResponseSchema, N as VersionResponseSchema, O as RubricInfoSchema, P as WIRE_VERSION, S as FeedbackTrajectorySchema, T as JudgeResultSchema, _ as ErrorResponseSchema, a as runRpcBatch, b as FeedbackIngestResponseSchema, c as WireError, d as handleListRubrics, f as handleTracesIngest, g as listBuiltinRubrics, h as getBuiltinRubric, i as dispatchRpc, j as TracesIngestRequestSchema, k as RubricSchema, l as handleFeedbackIngest, m as BUILTIN_RUBRICS, n as startServer, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi, t as createApp, u as handleJudge, v as FailureModeSchema, w as JudgeRequestSchema, x as FeedbackLabelSchema, y as FeedbackAttemptSchema } from "../server-D9wQclzG.js";
1
+ import { A as TraceEventSchema, C as HealthResponseSchema, D as RubricDimensionSchema, E as ListRubricsResponseSchema, F as hashRubric, M as TracesIngestResponseSchema, N as VersionResponseSchema, O as RubricInfoSchema, P as WIRE_VERSION, S as FeedbackTrajectorySchema, T as JudgeResultSchema, _ as ErrorResponseSchema, a as runRpcBatch, b as FeedbackIngestResponseSchema, c as WireError, d as handleListRubrics, f as handleTracesIngest, g as listBuiltinRubrics, h as getBuiltinRubric, i as dispatchRpc, j as TracesIngestRequestSchema, k as RubricSchema, l as handleFeedbackIngest, m as BUILTIN_RUBRICS, n as startServer, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi, t as createApp, u as handleJudge, v as FailureModeSchema, w as JudgeRequestSchema, x as FeedbackLabelSchema, y as FeedbackAttemptSchema } from "../server-dIWwF3j_.js";
2
2
  export { BUILTIN_RUBRICS, ErrorResponseSchema, FailureModeSchema, FeedbackAttemptSchema, FeedbackIngestResponseSchema, FeedbackLabelSchema, FeedbackTrajectorySchema, HealthResponseSchema, JudgeRequestSchema, JudgeResultSchema, ListRubricsResponseSchema, RubricDimensionSchema, RubricInfoSchema, RubricSchema, TraceEventSchema, TracesIngestRequestSchema, TracesIngestResponseSchema, VersionResponseSchema, WIRE_VERSION, WireError, buildOpenApi, createApp, dispatchRpc, getBuiltinRubric, handleFeedbackIngest, handleJudge, handleListRubrics, handleTracesIngest, handleVersion, hashRubric, listBuiltinRubrics, runRpcBatch, runRpcOnce, startServer, startServerAsync };
@@ -11,6 +11,15 @@ Use it for caller-defined logic, an agent-runtime worker, or declared parameter
11
11
  Do not wrap a complete external optimizer in `SurfaceProposer`.
12
12
  That would split its search state from its own selection behavior and make budgets harder to compare.
13
13
 
14
+ ## Choose The Entry Point
15
+
16
+ An `OptimizationMethod` plugs into exactly two entry points.
17
+ `selfImprove()` from `/contract` is the improvement entry: one call gives the method disjoint train and selection partitions, re-scores the selected surface on a held-out split, and returns a `gateDecision`.
18
+ Use it when one surface must get better.
19
+ `compareOptimizationMethods()` from `/campaign` is the measurement entry: it gives every method equal inputs and scores the selected surfaces on final cases no method received.
20
+ Use it when two or more methods must be compared at equal budget.
21
+ Runnable versions: [`examples/self-improve-optimizer`](../examples/self-improve-optimizer/) and [`examples/compare-optimization-methods`](../examples/compare-optimization-methods/).
22
+
14
23
  ## Adapt A Third-Party Text Optimizer
15
24
 
16
25
  `externalTextOptimizationMethod()` is the general adapter for a package that already owns text or component search.
@@ -300,10 +309,45 @@ const method = gepaOptimizationMethod({
300
309
 
301
310
  Replace the rates with the exact rates charged by your endpoint.
302
311
  If billed USD is unknown, omit `maxCostUsd`, `pricing`, and `maxProposerCostUsd`; the recorded cost remains unknown rather than becoming a guessed zero.
303
- With `optimizer`, every recipe stage must use the standard `gepa` engine.
312
+ With `optimizer`, every recipe stage must use the standard `gepa` engine or a metered agent CLI engine (below).
304
313
  Agent Eval receives no provider key, enforces the declared request and token budget, and records the execution owner's exact usage and opaque finite JSON evidence.
305
314
  `maxProposerCostUsd` also limits each individual GEPA engine stage.
306
315
 
316
+ When no execution package owns the call, build the callback with `createOpenAiCompatibleExecutionOwner` from `/campaign`:
317
+
318
+ ```ts
319
+ import { createOpenAiCompatibleExecutionOwner } from '@tangle-network/agent-eval/campaign'
320
+
321
+ const call = createOpenAiCompatibleExecutionOwner({
322
+ baseUrl: 'https://api.openai.com/v1',
323
+ apiKey: process.env.LLM_API_KEY!,
324
+ model: 'gpt-4.1-mini',
325
+ pricing: { inputUsdPerMillion: 0.4, outputUsdPerMillion: 1.6 },
326
+ })
327
+ ```
328
+
329
+ It executes each admitted request against any OpenAI-compatible `/chat/completions` endpoint and returns the typed outcome with a JSON-clean receipt.
330
+ The credential stays inside the owner closure; the proxy still enforces every budget and identity check.
331
+
332
+ ### Metered agent CLI engines
333
+
334
+ The `autoresearch` and `meta_harness` engines drive a `claude` CLI subprocess.
335
+ Set `optimizer.anthropicEndpoint: true` to admit them in proxied mode.
336
+ The loopback proxy then also serves `POST /v1/messages` (Anthropic Messages API) and the bridge child receives `ANTHROPIC_BASE_URL`, an ephemeral `ANTHROPIC_AUTH_TOKEN`, and `ANTHROPIC_MODEL` in its environment.
337
+ Every CLI call becomes one canonical execution-owner call with the same reservation, receipt, and budget pipeline as reflection traffic; the run fails if the receipt count differs from the admitted call count.
338
+ Each agent engine run must set `engineConfig.model` to `optimizer.model`, because the engines pass `--model` and that flag beats the injected environment.
339
+ The endpoint translates text and tool-use conversations.
340
+ Anthropic `tools`, `tool_choice`, `tool_use`, and `tool_result` map onto the canonical execution-owner contract, and a tool-calling response is synthesized back as the Anthropic stream shape the CLI expects.
341
+ Claude-specific control fields (`thinking`, `context_management`, `output_config`) carry no token-billing semantics on the owner wire; the shim strips them and records the names in the ledger tag `strippedFields`.
342
+ It still refuses images, server tools, `top_p`, `top_k`, and `stop_sequences` with a loud Anthropic error envelope.
343
+ A budget refusal surfaces to the CLI as HTTP 402, which the CLI treats as terminal instead of retrying.
344
+ Agent sessions are chatty: size `budget.maxRequests` for tens of calls per engine run.
345
+ Without the flag, agent engines stay rejected in proxied mode.
346
+
347
+ One measured pothole: `selfImprove` defaults `expectUsage` to `'assert'`.
348
+ A deterministic evaluator that makes no LLM calls records zero usage, so the assertion fails the run.
349
+ Set `expectUsage: 'off'` when the evaluator is deterministic and makes no LLM calls.
350
+
307
351
  Other official engines can still receive their own settings:
308
352
 
309
353
  ```ts
@@ -321,7 +365,10 @@ recipe: {
321
365
  ```
322
366
 
323
367
  Their external model spend remains incomplete unless that engine reports it.
324
- Keep API keys in environment variables or `runner.env`.
368
+ Supply provider API keys only through `runner.env`.
369
+ An exported shell variable never reaches the bridge child.
370
+ The spawn builds the child environment from a fixed allowlist of benign variables (PATH, HOME, locale, `PYTHONPATH`) plus `runner.env`, so the parent environment is stripped by construction.
371
+ When `optimizer` is set, `removeCredentialEnvironment` also deletes credential-shaped keys from `runner.env`; the child then receives only the loopback proxy URL and an ephemeral key inside the input JSON.
325
372
  Do not place credentials in `engineConfig` because run settings are persisted.
326
373
 
327
374
  `describeScenario()` controls the train and selection data sent to GEPA.
@@ -331,6 +378,22 @@ Neither callback can receive a final test case.
331
378
  A direct standard GEPA run records `provenance.gepaCandidatePopulation`.
332
379
  Pass that summary to `readGepaCandidatePopulationArtifact()` to verify and read every accepted candidate, its parent indices, and its selection scores.
333
380
  Use `readExternalOptimizerObservationArtifact()` for every distinct callback submission, including proposals that GEPA rejected or the callback refused.
381
+ `provenance.evaluationCount` is the callback-metered evaluation total.
382
+ `provenance.upstreamReportedEvaluations` is GEPA's self-reported total; a difference means upstream skipped, cached, or double-counted work.
383
+
384
+ ## Runtime Knobs
385
+
386
+ Each knob below has a default that works for small text campaigns and fails for agentic or slow-settling runs.
387
+ The table names the failure so you can set the knob before the run dies mid-spend.
388
+
389
+ | Knob | Default | What breaks when wrong | Where to set it |
390
+ |---|---|---|---|
391
+ | `timeoutMs` | 30 minutes | The whole bridge process tree is killed with `GEPA bridge exceeded 1800000ms`. An agentic run (40 evaluations over 45 s each) exceeds the default mid-spend. The same value bounds each callback POST and the runtime inspect pass. | `gepaOptimizationMethod({ timeoutMs })`, `skillOptOptimizationMethod({ timeoutMs })` |
392
+ | `dispatchShutdownTimeoutMs` | 5 seconds | A dispatch that cancels or settles paid calls slowly fails the cell with `CostAccountingIncompleteError` after the evaluations completed. | `runCampaign({ dispatchShutdownTimeoutMs })`; for comparisons, `compareOptimizationMethods` `optimizationRunOptions` |
393
+ | `servedModelPolicy` | `'exact'` | A router that substitutes a same-family model fails every proxied reflection call with a 502 `model substitution` error. `'allow-within-family'` accepts the substitute, keeps family-level claims, and forfeits per-model claims. | `optimizer.servedModelPolicy` |
394
+ | `reflection_lm_kwargs.num_retries` | litellm default (3) | Each failed reflection request retries 3 times inside litellm, so the proxy meters 4 request attempts per logical call and `budget.maxRequests` exhausts 4x early. Set `num_retries: 0`; the proxy already accounts each attempt. | `recipe.run.engineConfig.reflection.reflection_lm_kwargs` |
395
+ | `reflection_lm_kwargs.max_tokens` | `budget.maxOutputTokensPerRequest` | Every reflection request ships the full budget cap as `max_tokens`. A provider family with a lower completion cap rejects every call. A reasoning model also needs headroom for hidden reasoning tokens. Set a value at or below the smallest family cap; it must not exceed `budget.maxOutputTokensPerRequest`. | `recipe.run.engineConfig.reflection.reflection_lm_kwargs` |
396
+ | `maxProposerCostUsd` | unset | Without it, one engine stage can spend up to `optimizer.budget.maxCostUsd` or the campaign `costCeiling` before any limit fires. Supply it only when the execution owner can enforce billed USD. | `recipe.run.maxProposerCostUsd` |
334
397
 
335
398
  ## Install Official SkillOpt
336
399
 
@@ -464,7 +527,8 @@ Use `reps` when one surface needs repeated measurements.
464
527
  - The same dispatch and judges score every method.
465
528
  - Missing cost remains unknown.
466
529
  - A method must declare bounded work before it starts.
467
- - Credentials belong in process environment variables.
530
+ - Credentials reach a bridge child only through `runner.env`; the child never inherits the parent process environment.
531
+ - The metered proxy path replaces provider credentials with a loopback URL and an ephemeral key.
468
532
  - Resumed state must match every input that can change the result.
469
533
 
470
534
  These rules make method comparisons inspectable without pretending different optimizers have identical internals.
@@ -2,6 +2,8 @@
2
2
 
3
3
  `@tangle-network/agent-eval/experiment` turns an experiment's registration into the object that runs it.
4
4
 
5
+ The registry of measured claims those experiments produce lives in [`evidence/`](../evidence/README.md); a sealed experiment's digest is the `experimentDigest` its registry record carries.
6
+
5
7
  ## The covenant
6
8
 
7
9
  1. **The registered rule is the executed rule.**
@@ -42,6 +42,9 @@ describe('my engine reproduces the multishot golden records', () => {
42
42
  `checkMultishotGolden` runs every SHOT scenario in one call; the matrix scenarios have their own pair below.
43
43
  It refuses an `only` id the catalog does not hold, so a stale id after a rename stops the check instead of greening a run of zero scenarios.
44
44
 
45
+ An external conversation engine plugs into the matrix through one seam: `RunMultishotMatrixOptions.runShot`.
46
+ The matrix runs that engine for every cell and reads its result through `MultishotCellOutput`, so the same golden checks grade any engine that implements the seam.
47
+
45
48
  The matrix pair is `assertMultishotMatrixGoldenScenario` / `checkMultishotMatrixGoldenScenario`; both take a `runDir` the engine may write into, and both install a deterministic judge wire on `globalThis.fetch` for the duration of the run.
46
49
  That wire is process-wide, so run matrix checks serially within one process and keep other fetch traffic out of it.
47
50
  Both rules are enforced, not just documented: a second concurrent install throws, and the wire fails loud on any request it does not recognise rather than answering it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-eval",
3
- "version": "0.149.0",
3
+ "version": "0.150.1",
4
4
  "description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
5
5
  "homepage": "https://github.com/tangle-network/agent-eval#readme",
6
6
  "repository": {
@@ -180,7 +180,9 @@
180
180
  "check:model-ids": "node scripts/check-model-id-requests.mjs",
181
181
  "check:analyst-benchmark": "node scripts/check-analyst-benchmark-implementation.mjs",
182
182
  "openapi": "node dist/cli.js openapi --out dist/openapi.json",
183
- "verify:package": "pnpm check:analyst-benchmark && pnpm run check:skill && pnpm run check:model-ids && publint && attw --pack --profile esm-only . && node scripts/verify-package-exports.mjs"
183
+ "verify:package": "pnpm check:analyst-benchmark && pnpm run check:skill && pnpm run check:model-ids && publint && attw --pack --profile esm-only . && node scripts/verify-package-exports.mjs && pnpm run evidence:check",
184
+ "evidence:render": "tsx scripts/render-evidence-index.ts",
185
+ "evidence:check": "tsx scripts/render-evidence-index.ts --check"
184
186
  },
185
187
  "dependencies": {
186
188
  "@asteasolutions/zod-to-openapi": "^9.1.0",