@tangle-network/agent-eval 0.192.0 → 0.193.2

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 (141) hide show
  1. package/CHANGELOG.md +45 -2
  2. package/dist/adapters/http.d.ts +2 -2
  3. package/dist/analyst/index.d.ts +6 -6
  4. package/dist/analyst/index.js +4 -4
  5. package/dist/{analyze-runs-SCSWYpy0.js → analyze-runs-B6gv7vAT.js} +2 -2
  6. package/dist/{analyze-runs-SCSWYpy0.js.map → analyze-runs-B6gv7vAT.js.map} +1 -1
  7. package/dist/{benchmark-command-C458yEFK.js → benchmark-command-N5r3GXMP.js} +8 -8
  8. package/dist/{benchmark-command-C458yEFK.js.map → benchmark-command-N5r3GXMP.js.map} +1 -1
  9. package/dist/benchmarks/index.d.ts +3 -3
  10. package/dist/benchmarks/index.js +3 -3
  11. package/dist/campaign/index.d.ts +5 -5
  12. package/dist/campaign/index.js +11 -10
  13. package/dist/{campaign-BVQVBEfH.js → campaign-DnL0S4XL.js} +11 -10
  14. package/dist/{campaign-BVQVBEfH.js.map → campaign-DnL0S4XL.js.map} +1 -1
  15. package/dist/{campaign-evidence-DcQiYhJI.js → campaign-evidence-DJc60F9C.js} +2 -2
  16. package/dist/{campaign-evidence-DcQiYhJI.js.map → campaign-evidence-DJc60F9C.js.map} +1 -1
  17. package/dist/{chat-client-B_ItsSBw.js → chat-client-CJORSG_J.js} +2 -2
  18. package/dist/{chat-client-B_ItsSBw.js.map → chat-client-CJORSG_J.js.map} +1 -1
  19. package/dist/{chat-json-call-CXHBvUz8.js → chat-json-call-DnlDjpco.js} +2 -2
  20. package/dist/{chat-json-call-CXHBvUz8.js.map → chat-json-call-DnlDjpco.js.map} +1 -1
  21. package/dist/cli.js +49 -12
  22. package/dist/cli.js.map +1 -1
  23. package/dist/{client-wFyDisxi.d.ts → client-dMMKoQNS.d.ts} +2 -2
  24. package/dist/{client-wFyDisxi.d.ts.map → client-dMMKoQNS.d.ts.map} +1 -1
  25. package/dist/contract/index.d.ts +7 -7
  26. package/dist/contract/index.js +11 -11
  27. package/dist/{default-registry-DdqA_-_o.d.ts → default-registry-C3HTE08O.d.ts} +3 -3
  28. package/dist/{default-registry-DdqA_-_o.d.ts.map → default-registry-C3HTE08O.d.ts.map} +1 -1
  29. package/dist/{define-agent-eval-DcludNJS.d.ts → define-agent-eval-DQJvVa1P.d.ts} +6 -6
  30. package/dist/{define-agent-eval-DcludNJS.d.ts.map → define-agent-eval-DQJvVa1P.d.ts.map} +1 -1
  31. package/dist/{define-agent-eval-DQuos3Aw.js → define-agent-eval-qxAPjMSL.js} +6 -6
  32. package/dist/{define-agent-eval-DQuos3Aw.js.map → define-agent-eval-qxAPjMSL.js.map} +1 -1
  33. package/dist/diagnosis/index.d.ts +1 -1
  34. package/dist/diagnosis/index.d.ts.map +1 -1
  35. package/dist/diagnosis/index.js +12 -6
  36. package/dist/diagnosis/index.js.map +1 -1
  37. package/dist/{dspy-rlm-engine-BX34vPVY.js → dspy-rlm-engine-k_QdEBZo.js} +2 -2
  38. package/dist/{dspy-rlm-engine-BX34vPVY.js.map → dspy-rlm-engine-k_QdEBZo.js.map} +1 -1
  39. package/dist/{engine-C1DIAEpn.d.ts → engine-DjRV55F9.d.ts} +2 -2
  40. package/dist/{engine-C1DIAEpn.d.ts.map → engine-DjRV55F9.d.ts.map} +1 -1
  41. package/dist/{eval-campaign-CwsBn0Gm.js → eval-campaign-CXT2WYUe.js} +2 -2
  42. package/dist/{eval-campaign-CwsBn0Gm.js.map → eval-campaign-CXT2WYUe.js.map} +1 -1
  43. package/dist/evaluation.d.ts +1 -1
  44. package/dist/experiment/index.d.ts +2 -2
  45. package/dist/experiment/index.js +4 -4
  46. package/dist/{external-optimizer-process-D-Sab4v3.js → external-optimizer-process-_YIECYJ7.js} +2 -2
  47. package/dist/{external-optimizer-process-D-Sab4v3.js.map → external-optimizer-process-_YIECYJ7.js.map} +1 -1
  48. package/dist/{external-optimizer-subprocess-kbqC-iWf.js → external-optimizer-subprocess-BrghTvEp.js} +2 -2
  49. package/dist/{external-optimizer-subprocess-kbqC-iWf.js.map → external-optimizer-subprocess-BrghTvEp.js.map} +1 -1
  50. package/dist/hosted/index.d.ts +2 -2
  51. package/dist/hosted/index.js +1 -1
  52. package/dist/{index-DBoXFaz0.d.ts → index-0jEtpSM7.d.ts} +3 -3
  53. package/dist/{index-DBoXFaz0.d.ts.map → index-0jEtpSM7.d.ts.map} +1 -1
  54. package/dist/{index-DwQxdWve.d.ts → index-DMPLG226.d.ts} +89 -272
  55. package/dist/index-DMPLG226.d.ts.map +1 -0
  56. package/dist/{index-DNVzu9Vv.d.ts → index-DWQNDqPd.d.ts} +7 -7
  57. package/dist/{index-DNVzu9Vv.d.ts.map → index-DWQNDqPd.d.ts.map} +1 -1
  58. package/dist/index.d.ts +10 -10
  59. package/dist/index.js +60 -308
  60. package/dist/index.js.map +1 -1
  61. package/dist/jev.d.ts +1 -1
  62. package/dist/ledger-core/index.d.ts +1 -1
  63. package/dist/{llm-client-KYQBh9C8.js → llm-client-c_bKHTXz.js} +2 -2
  64. package/dist/{llm-client-KYQBh9C8.js.map → llm-client-c_bKHTXz.js.map} +1 -1
  65. package/dist/{llm-judge-Z6MkTkd0.js → llm-judge-Cififl_V.js} +1024 -237
  66. package/dist/llm-judge-Cififl_V.js.map +1 -0
  67. package/dist/{matrix-CQMMrEQ5.d.ts → matrix-CNu13gg8.d.ts} +2 -2
  68. package/dist/{matrix-CQMMrEQ5.d.ts.map → matrix-CNu13gg8.d.ts.map} +1 -1
  69. package/dist/multishot/golden/index.d.ts +1 -1
  70. package/dist/multishot/index.d.ts +2 -2
  71. package/dist/openapi.json +1 -1
  72. package/dist/{otel-spans-DS7t1t1J.js → otel-spans-CQmSxtcS.js} +2 -2
  73. package/dist/{otel-spans-DS7t1t1J.js.map → otel-spans-CQmSxtcS.js.map} +1 -1
  74. package/dist/paired-delta-test-BF-FEP8V.js +78 -0
  75. package/dist/paired-delta-test-BF-FEP8V.js.map +1 -0
  76. package/dist/{paired-promotion-decision-6cn3bLc3.js → paired-promotion-decision-DTKl6-G8.js} +4 -77
  77. package/dist/paired-promotion-decision-DTKl6-G8.js.map +1 -0
  78. package/dist/pipelines/index.d.ts +1 -1
  79. package/dist/{produced-state-CVmCPQDJ.js → produced-state-B2AhDRnq.js} +4 -4
  80. package/dist/{produced-state-CVmCPQDJ.js.map → produced-state-B2AhDRnq.js.map} +1 -1
  81. package/dist/{promotion-policy-CfMNUro2.js → promotion-policy-Cy5OV8BV.js} +3 -3
  82. package/dist/{promotion-policy-CfMNUro2.js.map → promotion-policy-Cy5OV8BV.js.map} +1 -1
  83. package/dist/{raw-provider-sink-DYh4Bszw.js → raw-provider-sink-CXuOhLvT.js} +2 -2
  84. package/dist/{raw-provider-sink-DYh4Bszw.js.map → raw-provider-sink-CXuOhLvT.js.map} +1 -1
  85. package/dist/{redact-CopuMxll.d.ts → redact-Cveoq6fJ.d.ts} +2 -2
  86. package/dist/{redact-CopuMxll.d.ts.map → redact-Cveoq6fJ.d.ts.map} +1 -1
  87. package/dist/{redact-B7rt9Zot.js → redact-Dk1ZdJEm.js} +59 -26
  88. package/dist/redact-Dk1ZdJEm.js.map +1 -0
  89. package/dist/rl.d.ts +1 -1
  90. package/dist/rl.js +2 -2
  91. package/dist/{search-ledger-Ck7tok0h.js → search-ledger-CJiAEU3j.js} +89 -27
  92. package/dist/search-ledger-CJiAEU3j.js.map +1 -0
  93. package/dist/{search-ledger-types-C9anU2DX.d.ts → search-ledger-types-B3El5xgS.d.ts} +95 -11
  94. package/dist/search-ledger-types-B3El5xgS.d.ts.map +1 -0
  95. package/dist/{search-shipper-BG182p-U.js → search-shipper-DUlwlCsK.js} +2 -2
  96. package/dist/{search-shipper-BG182p-U.js.map → search-shipper-DUlwlCsK.js.map} +1 -1
  97. package/dist/search-summary-BhY8p0Av.js +378 -0
  98. package/dist/search-summary-BhY8p0Av.js.map +1 -0
  99. package/dist/{semantic-concept-judge-Bg-560H0.js → semantic-concept-judge-Bh5lvKGg.js} +4 -4
  100. package/dist/{semantic-concept-judge-Bg-560H0.js.map → semantic-concept-judge-Bh5lvKGg.js.map} +1 -1
  101. package/dist/{sequential-lwJOTRON.js → sequential-C21_PP7F.js} +2 -2
  102. package/dist/{sequential-lwJOTRON.js.map → sequential-C21_PP7F.js.map} +1 -1
  103. package/dist/{server-DtetGGoA.js → server-D56r1lhp.js} +2 -2
  104. package/dist/{server-DtetGGoA.js.map → server-D56r1lhp.js.map} +1 -1
  105. package/dist/{skillopt-optimization-method-DoayuM6D.js → skillopt-optimization-method-C6DbFKnw.js} +8 -8
  106. package/dist/{skillopt-optimization-method-DoayuM6D.js.map → skillopt-optimization-method-C6DbFKnw.js.map} +1 -1
  107. package/dist/{spans-BWtjk_9c.d.ts → spans-D9_ehFuk.d.ts} +2 -2
  108. package/dist/{spans-BWtjk_9c.d.ts.map → spans-D9_ehFuk.d.ts.map} +1 -1
  109. package/dist/{statistical-heldout-C1Ej5Ce8.d.ts → statistical-heldout-D-xBpbrd.d.ts} +2 -2
  110. package/dist/{statistical-heldout-C1Ej5Ce8.d.ts.map → statistical-heldout-D-xBpbrd.d.ts.map} +1 -1
  111. package/dist/{statistical-heldout-GcLIPxk4.js → statistical-heldout-DANVmyug.js} +2 -2
  112. package/dist/{statistical-heldout-GcLIPxk4.js.map → statistical-heldout-DANVmyug.js.map} +1 -1
  113. package/dist/{store-tool-spans-BcC_5ef-.js → store-tool-spans-BaGakFc2.js} +2 -2
  114. package/dist/{store-tool-spans-BcC_5ef-.js.map → store-tool-spans-BaGakFc2.js.map} +1 -1
  115. package/dist/{store-tool-spans-ByLdU26j.d.ts → store-tool-spans-BxrfuU2t.d.ts} +4 -4
  116. package/dist/{store-tool-spans-ByLdU26j.d.ts.map → store-tool-spans-BxrfuU2t.d.ts.map} +1 -1
  117. package/dist/{task-failure-attributes-CEqEfuIY.js → task-failure-attributes-DngaLdE4.js} +4 -3
  118. package/dist/task-failure-attributes-DngaLdE4.js.map +1 -0
  119. package/dist/{tool-groups-DiBi16ns.d.ts → tool-groups-BC9O7Epn.d.ts} +2 -2
  120. package/dist/tool-groups-BC9O7Epn.d.ts.map +1 -0
  121. package/dist/trace-repair/index.d.ts +1 -1
  122. package/dist/traces.d.ts +3 -3
  123. package/dist/traces.js +4 -4
  124. package/dist/{types-C1CAD70_.d.ts → types-BWwRXofp.d.ts} +328 -4
  125. package/dist/types-BWwRXofp.d.ts.map +1 -0
  126. package/dist/{types-ByZslIlr.d.ts → types-qoxUfKQg.d.ts} +2 -2
  127. package/dist/{types-ByZslIlr.d.ts.map → types-qoxUfKQg.d.ts.map} +1 -1
  128. package/dist/wire/index.js +1 -1
  129. package/docs/search-ledger.md +71 -6
  130. package/package.json +2 -2
  131. package/dist/claim-BGOUqoMq.d.ts +0 -38
  132. package/dist/claim-BGOUqoMq.d.ts.map +0 -1
  133. package/dist/index-DwQxdWve.d.ts.map +0 -1
  134. package/dist/llm-judge-Z6MkTkd0.js.map +0 -1
  135. package/dist/paired-promotion-decision-6cn3bLc3.js.map +0 -1
  136. package/dist/redact-B7rt9Zot.js.map +0 -1
  137. package/dist/search-ledger-Ck7tok0h.js.map +0 -1
  138. package/dist/search-ledger-types-C9anU2DX.d.ts.map +0 -1
  139. package/dist/task-failure-attributes-CEqEfuIY.js.map +0 -1
  140. package/dist/tool-groups-DiBi16ns.d.ts.map +0 -1
  141. package/dist/types-C1CAD70_.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"store-tool-spans-ByLdU26j.d.ts","names":[],"sources":["../src/trace/extract-usage.ts","../src/trace/capture-fetch.ts","../src/trace/otel.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":";;;;;;;;;;;KAgBY,iBAAiB;KACjB;UAEK;;EAEf,OAAO;;;;;;;iBAuDO,aAAa,gBAAgB;;;;;;iBA6C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B;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;;;;cC18BU,8BAA8B;EACzC;;;;;;iBASc,8BACd,gBAAgB,+BAChB,UAAS,uCACR"}
1
+ {"version":3,"file":"store-tool-spans-BxrfuU2t.d.ts","names":[],"sources":["../src/trace/extract-usage.ts","../src/trace/capture-fetch.ts","../src/trace/otel.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":";;;;;;;;;;;KAgBY,iBAAiB;KACjB;UAEK;;EAEf,OAAO;;;;;;;iBAuDO,aAAa,gBAAgB;;;;;;iBA6C7B,oBACd,cACA,UAAS,6BACR;;;;;;;iBA4DmB,yBACpB,UAAU,UACV,aAAa,6BACZ,QAAQ;;;UCrKM;;;EAGf;;EAEA;;;EAGA;;EAEA;;EAEA;;UAGe;;EAEf,WAAW;;;EAGX;;;EAGA;;;;;;;;EAQA,WAAW,OAAO,gBAAgB,KAAK;;EAEvC,eAAe;;iBAkDD,sBACd,cAAc,WAAW,OACzB,MAAM,iBACN,KAAK,qBACL,OAAM,6BACE,WAAW;;;cCxFR;EAA0B;EAAoC;;UAE1D;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YA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ACA;EAEjB,YAAY,MAAM;;;YAYF,WAAW,SAAS,cAAc,QAAQ;YAkBhD;;;iBAwBI,6BACd,cACA,OAAM,uCACL;;;;cC18BU,8BAA8B;EACzC;;;;;;iBASc,8BACd,gBAAgB,+BAChB,UAAS,uCACR"}
@@ -2,6 +2,7 @@ import { s as ValidationError } from "./errors-Dngq5h35.js";
2
2
  import { t as FAILURE_CLASSES } from "./schema-CSf6qWgZ.js";
3
3
  import { LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_COST_ATTR_KEYS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKEN_ATTR_KEYS, RUN_COST_ATTR_KEYS } from "./trace-attributes.js";
4
4
  import "./otlp-attributes-D9ptWaIJ.js";
5
+ import { isModelCallKind } from "@tangle-network/agent-trace-contract";
5
6
  //#region src/trace/error-classification.ts
6
7
  /**
7
8
  * Classify errored spans without counting a propagated parent status as a
@@ -66,8 +67,8 @@ const EXECUTION_MEASUREMENT_KEY_GROUPS = [...TOKEN_MEASUREMENT_KEY_GROUPS, LLM_C
66
67
  function summarizeExecutionMeasurements(source) {
67
68
  const spans = source.map((span) => ({
68
69
  ...span,
69
- modelCall: span.kind === "LLM",
70
- aggregate: span.kind !== "LLM" && span.kind !== "UNKNOWN"
70
+ modelCall: isModelCallKind(span.kind),
71
+ aggregate: !isModelCallKind(span.kind) && span.kind !== "UNKNOWN"
71
72
  }));
72
73
  const byId = /* @__PURE__ */ new Map();
73
74
  for (const span of spans) {
@@ -316,4 +317,4 @@ function readConsistentRootString(roots, key, context) {
316
317
  //#endregion
317
318
  export { summarizeTraceErrors as i, recordAggregateMeasurements as n, summarizeExecutionMeasurements as r, readTaskFailureLabels as t };
318
319
 
319
- //# sourceMappingURL=task-failure-attributes-CEqEfuIY.js.map
320
+ //# sourceMappingURL=task-failure-attributes-DngaLdE4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-failure-attributes-DngaLdE4.js","names":[],"sources":["../src/trace/error-classification.ts","../src/trace/execution-measurements.ts","../src/trace/task-failure-attributes.ts"],"sourcesContent":["import type { SpanKind } from '@tangle-network/agent-trace-contract'\n\nexport type TraceErrorRole = SpanKind\n\nexport interface TraceErrorSignal {\n id: string\n parentId?: string\n role: TraceErrorRole\n error: boolean\n processRoot: boolean\n}\n\nexport interface TraceErrorSummary {\n total: number\n execution: number\n process: number\n guardrail: number\n evaluation: number\n propagated: number\n unclassified: number\n}\n\n/**\n * Classify errored spans without counting a propagated parent status as a\n * second execution failure.\n */\nexport function summarizeTraceErrors(signals: readonly TraceErrorSignal[]): TraceErrorSummary {\n const byId = new Map<string, TraceErrorSignal>()\n for (const signal of signals) {\n if (byId.has(signal.id)) {\n throw new Error(`summarizeTraceErrors: duplicate span id '${signal.id}'`)\n }\n byId.set(signal.id, signal)\n }\n\n const propagated = new Set<string>()\n for (const signal of signals) {\n if (!signal.error) continue\n const visited = new Set<string>()\n let parentId = signal.parentId\n while (parentId && !visited.has(parentId)) {\n visited.add(parentId)\n const parent = byId.get(parentId)\n if (!parent) break\n if (parent.error) propagated.add(parent.id)\n parentId = parent.parentId\n }\n }\n\n const summary: TraceErrorSummary = {\n total: 0,\n execution: 0,\n process: 0,\n guardrail: 0,\n evaluation: 0,\n propagated: 0,\n unclassified: 0,\n }\n\n for (const signal of signals) {\n if (!signal.error) continue\n summary.total += 1\n if (signal.role === 'GUARDRAIL') {\n summary.guardrail += 1\n } else if (signal.role === 'EVALUATOR') {\n summary.evaluation += 1\n } else if (signal.processRoot) {\n summary.process += 1\n } else if (propagated.has(signal.id)) {\n summary.propagated += 1\n } else if (signal.role !== 'UNKNOWN') {\n summary.execution += 1\n } else {\n summary.unclassified += 1\n }\n }\n\n return summary\n}\n","import { isModelCallKind, type SpanKind } from '@tangle-network/agent-trace-contract'\nimport type { RunTokenUsage } from '../run-record'\nimport {\n LLM_CACHE_WRITE_TOKEN_ATTR_KEYS,\n LLM_CACHED_TOKEN_ATTR_KEYS,\n LLM_COST_ATTR_KEYS,\n LLM_INPUT_TOKEN_ATTR_KEYS,\n LLM_OUTPUT_TOKEN_ATTR_KEYS,\n LLM_REASONING_TOKEN_ATTR_KEYS,\n RUN_COST_ATTR_KEYS,\n} from './otlp-attributes'\n\nexport interface ExecutionMeasurementSpan {\n id: string\n parentId?: string\n attributes: Record<string, unknown>\n /**\n * The contract kind, declared or inferred. `LLM`, `EMBEDDING` and `RERANKER`\n * ({@link isModelCallKind}) are each a leaf model call. Any other known kind\n * (an agent, a workflow step, a tool) is an aggregate whose tokens total the\n * calls beneath it. `UNKNOWN` is neither: its tokens count only when no model\n * call beneath it reports the same field.\n */\n kind: SpanKind\n}\n\ninterface MeasuredSpan extends ExecutionMeasurementSpan {\n modelCall: boolean\n aggregate: boolean\n}\n\nexport interface MeasurementCoverage {\n value?: number\n reportingCalls: number\n complete: boolean\n}\n\nexport interface ExecutionMeasurements {\n tokenUsage: RunTokenUsage\n modelCallCount: number\n callSpanIds: string[]\n cost: MeasurementCoverage\n aggregate?: {\n tokenUsage: RunTokenUsage\n costUsd?: number\n }\n}\n\nconst TOKEN_MEASUREMENT_KEY_GROUPS = [\n LLM_INPUT_TOKEN_ATTR_KEYS,\n LLM_OUTPUT_TOKEN_ATTR_KEYS,\n LLM_REASONING_TOKEN_ATTR_KEYS,\n LLM_CACHED_TOKEN_ATTR_KEYS,\n LLM_CACHE_WRITE_TOKEN_ATTR_KEYS,\n] as const\n\nconst EXECUTION_MEASUREMENT_KEY_GROUPS = [\n ...TOKEN_MEASUREMENT_KEY_GROUPS,\n LLM_COST_ATTR_KEYS,\n] as const\n\ninterface RetainedCallSummary {\n callCount: number\n measurements: Array<{\n total: number\n reportingCalls: number\n }>\n}\n\n/**\n * Reconcile execution measurements across nested telemetry wrappers.\n * A measured parent is used only when a descendant call does not report the\n * same field, so aggregate wrappers neither duplicate complete child data nor\n * erase complementary parent fields.\n */\nexport function summarizeExecutionMeasurements(\n source: readonly ExecutionMeasurementSpan[],\n): ExecutionMeasurements {\n const spans: MeasuredSpan[] = source.map((span) => ({\n ...span,\n // EMBEDDING and RERANKER are leaf model calls too, billed like LLM — only a\n // wrapper kind (AGENT/CHAIN/TOOL/RETRIEVER/GUARDRAIL/EVALUATOR/PROMPT) is an\n // aggregate whose totals restate a descendant's.\n modelCall: isModelCallKind(span.kind),\n aggregate: !isModelCallKind(span.kind) && span.kind !== 'UNKNOWN',\n }))\n const byId = new Map<string, MeasuredSpan>()\n for (const span of spans) {\n if (byId.has(span.id)) {\n throw new Error(`summarizeExecutionMeasurements: duplicate span id \"${span.id}\"`)\n }\n byId.set(span.id, span)\n }\n const tokenMeasurementKeys = TOKEN_MEASUREMENT_KEY_GROUPS.flat()\n const candidates = spans.filter(\n (span) =>\n span.modelCall ||\n (!span.aggregate && readNumber(span.attributes, tokenMeasurementKeys) !== undefined),\n )\n const candidateIds = new Set(candidates.map((span) => span.id))\n const candidateChildren = new Map<string, MeasuredSpan[]>()\n for (const candidate of candidates) {\n const parentId = nearestCandidateParent(candidate, byId, candidateIds)\n if (!parentId) continue\n const children = candidateChildren.get(parentId) ?? []\n children.push(candidate)\n candidateChildren.set(parentId, children)\n }\n const aggregateIds = classifyAggregateSpans(candidates, candidateChildren)\n const untypedRunCostIds = new Set(\n spans\n .filter(\n (span) =>\n !span.modelCall &&\n !span.aggregate &&\n !candidateIds.has(span.id) &&\n readNumber(span.attributes, RUN_COST_ATTR_KEYS) !== undefined,\n )\n .map((span) => span.id),\n )\n const aggregateSourceIds = new Set(\n spans\n .filter(\n (span) => span.aggregate || aggregateIds.has(span.id) || untypedRunCostIds.has(span.id),\n )\n .map((span) => span.id),\n )\n\n const calls = candidates.filter((span) => !aggregateIds.has(span.id))\n const input = reconcileMeasurement(calls, byId, aggregateSourceIds, LLM_INPUT_TOKEN_ATTR_KEYS)\n const reasoning = reconcileMeasurement(\n calls,\n byId,\n aggregateSourceIds,\n LLM_REASONING_TOKEN_ATTR_KEYS,\n )\n const output = reconcileMeasurement(\n calls,\n byId,\n aggregateSourceIds,\n LLM_OUTPUT_TOKEN_ATTR_KEYS,\n LLM_REASONING_TOKEN_ATTR_KEYS,\n )\n const cached = reconcileMeasurement(calls, byId, aggregateSourceIds, LLM_CACHED_TOKEN_ATTR_KEYS)\n const cacheWrite = reconcileMeasurement(\n calls,\n byId,\n aggregateSourceIds,\n LLM_CACHE_WRITE_TOKEN_ATTR_KEYS,\n )\n const aggregate = summarizeAggregateMeasurements(\n spans,\n byId,\n new Set([...aggregateIds, ...untypedRunCostIds]),\n )\n\n // A trace whose only token-bearing span is an aggregate (a run or tool\n // span that reports totals but has no llm_call events beneath it) has no\n // model-call candidates, so `input`/`output`/etc. above are all undefined.\n // Fall back to the aggregate measurement's own field before defaulting to\n // 0, so \"no model call reported this\" does not read the same as \"measured\n // zero\". When neither reports a field, it really is 0/unset.\n const reasoningValue = reasoning.value ?? aggregate?.tokenUsage.reasoning\n const cachedValue = cached.value ?? aggregate?.tokenUsage.cached\n const cacheWriteValue = cacheWrite.value ?? aggregate?.tokenUsage.cacheWrite\n\n return {\n tokenUsage: {\n input: input.value ?? aggregate?.tokenUsage.input ?? 0,\n output: Math.max(output.value ?? aggregate?.tokenUsage.output ?? 0, reasoningValue ?? 0),\n ...(reasoningValue !== undefined ? { reasoning: reasoningValue } : {}),\n ...(cachedValue !== undefined ? { cached: cachedValue } : {}),\n ...(cacheWriteValue !== undefined ? { cacheWrite: cacheWriteValue } : {}),\n },\n modelCallCount: calls.length,\n callSpanIds: calls.map((span) => span.id),\n cost: reconcileMeasurement(calls, byId, aggregateSourceIds, LLM_COST_ATTR_KEYS),\n ...(aggregate ? { aggregate } : {}),\n }\n}\n\nexport function recordAggregateMeasurements(\n raw: Record<string, number>,\n aggregate: ExecutionMeasurements['aggregate'],\n): void {\n if (!aggregate) return\n raw.aggregate_prompt_tokens = aggregate.tokenUsage.input\n raw.aggregate_completion_tokens = aggregate.tokenUsage.output\n if (aggregate.tokenUsage.reasoning !== undefined)\n raw.aggregate_reasoning_tokens = aggregate.tokenUsage.reasoning\n if (aggregate.tokenUsage.cached !== undefined)\n raw.aggregate_cached_tokens = aggregate.tokenUsage.cached\n if (aggregate.tokenUsage.cacheWrite !== undefined)\n raw.aggregate_cache_write_tokens = aggregate.tokenUsage.cacheWrite\n if (aggregate.costUsd !== undefined) raw.aggregate_cost_usd = aggregate.costUsd\n}\n\nfunction summarizeAggregateMeasurements(\n spans: MeasuredSpan[],\n byId: Map<string, MeasuredSpan>,\n aggregateIds: Set<string>,\n): ExecutionMeasurements['aggregate'] {\n const aggregates = spans.filter((span) => span.aggregate || aggregateIds.has(span.id))\n const input = reconcileTopLevelMeasurement(aggregates, byId, LLM_INPUT_TOKEN_ATTR_KEYS)\n const output = reconcileTopLevelMeasurement(aggregates, byId, LLM_OUTPUT_TOKEN_ATTR_KEYS)\n const reasoning = reconcileTopLevelMeasurement(aggregates, byId, LLM_REASONING_TOKEN_ATTR_KEYS)\n const cached = reconcileTopLevelMeasurement(aggregates, byId, LLM_CACHED_TOKEN_ATTR_KEYS)\n const cacheWrite = reconcileTopLevelMeasurement(aggregates, byId, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS)\n const costUsd = reconcileTopLevelMeasurement(aggregates, byId, LLM_COST_ATTR_KEYS)\n if (\n input === undefined &&\n output === undefined &&\n reasoning === undefined &&\n cached === undefined &&\n cacheWrite === undefined &&\n costUsd === undefined\n )\n return undefined\n return {\n tokenUsage: {\n input: input ?? 0,\n output: output ?? reasoning ?? 0,\n ...(reasoning !== undefined ? { reasoning } : {}),\n ...(cached !== undefined ? { cached } : {}),\n ...(cacheWrite !== undefined ? { cacheWrite } : {}),\n },\n ...(costUsd !== undefined ? { costUsd } : {}),\n }\n}\n\nfunction reconcileTopLevelMeasurement(\n spans: MeasuredSpan[],\n byId: Map<string, MeasuredSpan>,\n keys: readonly string[],\n): number | undefined {\n const selected = new Map<string, number>()\n for (const span of spans) {\n const value = readNumber(span.attributes, keys)\n if (value !== undefined) selected.set(span.id, value)\n }\n for (const spanId of [...selected.keys()]) {\n const span = byId.get(spanId)\n if (!span) continue\n if (ancestorIds(span, byId).some((ancestorId) => selected.has(ancestorId))) {\n selected.delete(spanId)\n }\n }\n return selected.size > 0\n ? [...selected.values()].reduce((total, value) => total + value, 0)\n : undefined\n}\n\nfunction reconcileMeasurement(\n calls: MeasuredSpan[],\n byId: Map<string, MeasuredSpan>,\n aggregateSourceIds: Set<string>,\n keys: readonly string[],\n fallbackKeys?: readonly string[],\n): MeasurementCoverage {\n const selected = new Map<string, number>()\n const callIds = new Set(calls.map((call) => call.id))\n let reportingCalls = 0\n\n for (const call of calls) {\n const primary = nearestMeasurement(call, byId, callIds, aggregateSourceIds, keys)\n const fallback = fallbackKeys\n ? nearestMeasurement(call, byId, callIds, aggregateSourceIds, fallbackKeys)\n : undefined\n const source =\n primary && fallback && primary.span.id === fallback.span.id\n ? { span: primary.span, value: Math.max(primary.value, fallback.value) }\n : (primary ?? fallback)\n if (!source) continue\n reportingCalls += 1\n selected.set(source.span.id, source.value)\n }\n\n for (const spanId of [...selected.keys()]) {\n const span = byId.get(spanId)\n if (!span) continue\n if (\n ancestorIds(span, byId).some(\n (ancestorId) => selected.has(ancestorId) && !callIds.has(ancestorId),\n )\n ) {\n selected.delete(spanId)\n }\n }\n\n return {\n ...(selected.size > 0\n ? { value: [...selected.values()].reduce((total, value) => total + value, 0) }\n : {}),\n reportingCalls,\n complete: calls.length > 0 && reportingCalls === calls.length,\n }\n}\n\nfunction nearestMeasurement(\n call: MeasuredSpan,\n byId: Map<string, MeasuredSpan>,\n callIds: Set<string>,\n aggregateSourceIds: Set<string>,\n keys: readonly string[],\n): { span: MeasuredSpan; value: number } | undefined {\n let current: MeasuredSpan | undefined = call\n const seen = new Set<string>()\n while (current && !seen.has(current.id)) {\n seen.add(current.id)\n const value = readNumber(current.attributes, keys)\n if (\n value !== undefined &&\n (current.id === call.id || (!callIds.has(current.id) && aggregateSourceIds.has(current.id)))\n ) {\n return { span: current, value }\n }\n current = current.parentId ? byId.get(current.parentId) : undefined\n }\n return undefined\n}\n\nfunction classifyAggregateSpans(\n candidates: MeasuredSpan[],\n childrenById: Map<string, MeasuredSpan[]>,\n): Set<string> {\n const aggregateIds = new Set<string>()\n const summaries = new Map<string, RetainedCallSummary>()\n const visiting = new Set<string>()\n\n const visit = (span: MeasuredSpan): RetainedCallSummary => {\n const cached = summaries.get(span.id)\n if (cached) return cached\n if (visiting.has(span.id)) return emptyRetainedCallSummary()\n visiting.add(span.id)\n\n const descendants = emptyRetainedCallSummary()\n for (const child of childrenById.get(span.id) ?? []) {\n const childDescendants = visit(child)\n if (!aggregateIds.has(child.id)) addRetainedCall(descendants, child)\n addRetainedCallSummary(descendants, childDescendants)\n }\n\n if (\n descendants.callCount > 0 &&\n (!span.modelCall || hasCompatibleDescendantMeasurements(span, descendants))\n ) {\n aggregateIds.add(span.id)\n }\n\n visiting.delete(span.id)\n summaries.set(span.id, descendants)\n return descendants\n }\n\n for (const candidate of candidates) visit(candidate)\n return aggregateIds\n}\n\nfunction emptyRetainedCallSummary(): RetainedCallSummary {\n return {\n callCount: 0,\n measurements: EXECUTION_MEASUREMENT_KEY_GROUPS.map(() => ({\n total: 0,\n reportingCalls: 0,\n })),\n }\n}\n\nfunction addRetainedCall(summary: RetainedCallSummary, span: MeasuredSpan): void {\n summary.callCount += 1\n for (let index = 0; index < EXECUTION_MEASUREMENT_KEY_GROUPS.length; index += 1) {\n const value = readNumber(span.attributes, EXECUTION_MEASUREMENT_KEY_GROUPS[index]!)\n if (value === undefined) continue\n const measurement = summary.measurements[index]!\n measurement.total += value\n measurement.reportingCalls += 1\n }\n}\n\nfunction addRetainedCallSummary(target: RetainedCallSummary, source: RetainedCallSummary): void {\n target.callCount += source.callCount\n for (let index = 0; index < target.measurements.length; index += 1) {\n const measurement = target.measurements[index]!\n const sourceMeasurement = source.measurements[index]!\n measurement.total += sourceMeasurement.total\n measurement.reportingCalls += sourceMeasurement.reportingCalls\n }\n}\n\nfunction hasCompatibleDescendantMeasurements(\n span: MeasuredSpan,\n descendants: RetainedCallSummary,\n): boolean {\n let parentMeasurements = 0\n let descendantMeasurements = 0\n for (let index = 0; index < EXECUTION_MEASUREMENT_KEY_GROUPS.length; index += 1) {\n const keys = EXECUTION_MEASUREMENT_KEY_GROUPS[index]!\n const parentValue = readNumber(span.attributes, keys)\n const measurement = descendants.measurements[index]!\n if (parentValue !== undefined) parentMeasurements += 1\n if (measurement.reportingCalls > 0) descendantMeasurements += 1\n if (parentValue === undefined || measurement.reportingCalls === 0) continue\n if (measurement.reportingCalls !== descendants.callCount) continue\n if (Math.abs(parentValue - measurement.total) > 1e-12) return false\n }\n return parentMeasurements === 0 || descendantMeasurements > 0\n}\n\nfunction ancestorIds(span: MeasuredSpan, byId: Map<string, MeasuredSpan>): string[] {\n const ids: string[] = []\n const seen = new Set<string>()\n let parentId = span.parentId\n while (parentId && !seen.has(parentId)) {\n ids.push(parentId)\n seen.add(parentId)\n parentId = byId.get(parentId)?.parentId\n }\n return ids\n}\n\nfunction nearestCandidateParent(\n span: MeasuredSpan,\n byId: Map<string, MeasuredSpan>,\n candidateIds: Set<string>,\n): string | undefined {\n const seen = new Set<string>()\n let parentId = span.parentId\n while (parentId && !seen.has(parentId)) {\n if (candidateIds.has(parentId)) return parentId\n seen.add(parentId)\n parentId = byId.get(parentId)?.parentId\n }\n return undefined\n}\n\nfunction readNumber(\n attributes: Record<string, unknown>,\n keys: readonly string[],\n): number | undefined {\n for (const key of keys) {\n const value = attributes[key]\n const parsed =\n typeof value === 'number'\n ? value\n : typeof value === 'string' && value.length > 0\n ? Number(value)\n : Number.NaN\n if (Number.isFinite(parsed) && parsed >= 0) return parsed\n }\n return undefined\n}\n","import { ValidationError } from '../errors'\nimport { FAILURE_CLASSES, type FailureClass } from './schema'\n\nconst TASK_FAILURE_CLASS_ATTR = 'tangle.task.failure_class'\nconst TASK_FAILURE_MODE_ATTR = 'tangle.task.failure_mode'\n\ninterface AttributeCarrier {\n attributes: Record<string, unknown>\n}\n\nexport type TaskFailureLabels =\n | { failureClass?: undefined; failureMode?: undefined }\n | { failureClass: 'success'; failureMode?: undefined }\n | { failureClass: Exclude<FailureClass, 'success'>; failureMode?: string }\n\nexport function readTaskFailureLabels(\n roots: readonly AttributeCarrier[],\n context: string,\n): TaskFailureLabels {\n const failureClass = readConsistentRootString(roots, TASK_FAILURE_CLASS_ATTR, context)\n const failureMode = readConsistentRootString(roots, TASK_FAILURE_MODE_ATTR, context)\n\n if (failureClass !== undefined && !FAILURE_CLASSES.includes(failureClass as FailureClass)) {\n throw new ValidationError(\n `${context}: ${TASK_FAILURE_CLASS_ATTR} must be one of ${FAILURE_CLASSES.join(', ')}`,\n )\n }\n if (failureMode !== undefined && (failureClass === undefined || failureClass === 'success')) {\n throw new ValidationError(\n `${context}: ${TASK_FAILURE_MODE_ATTR} requires a non-success ${TASK_FAILURE_CLASS_ATTR}`,\n )\n }\n\n if (failureClass === undefined) return {}\n if (failureClass === 'success') return { failureClass }\n return {\n failureClass: failureClass as Exclude<FailureClass, 'success'>,\n ...(failureMode ? { failureMode } : {}),\n }\n}\n\nfunction readConsistentRootString(\n roots: readonly AttributeCarrier[],\n key: string,\n context: string,\n): string | undefined {\n const values = new Set<string>()\n for (const root of roots) {\n if (!Object.hasOwn(root.attributes, key)) continue\n const value = root.attributes[key]\n if (typeof value !== 'string' || value.trim().length === 0) {\n throw new ValidationError(`${context}: ${key} must be a non-empty string`)\n }\n values.add(value)\n }\n\n if (values.size > 1) {\n throw new ValidationError(\n `${context}: conflicting ${key} values: ${[...values].sort().join(', ')}`,\n )\n }\n return values.values().next().value\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAgB,qBAAqB,SAAyD;CAC5F,MAAM,uBAAO,IAAI,IAA8B;CAC/C,KAAK,MAAM,UAAU,SAAS;EAC5B,IAAI,KAAK,IAAI,OAAO,EAAE,GACpB,MAAM,IAAI,MAAM,4CAA4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tD,OAAO;EACS;EACd,GAAI,cAAc,EAAE,YAAY,IAAI,CAAC;CACvC;AACF;AAEA,SAAS,yBACP,OACA,KACA,SACoB;CACpB,MAAM,yBAAS,IAAI,IAAY;CAC/B,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,CAAC,OAAO,OAAO,KAAK,YAAY,GAAG,GAAG;EAC1C,MAAM,QAAQ,KAAK,WAAW;EAC9B,IAAI,OAAO,UAAU,YAAY,MAAM,KAAK,CAAC,CAAC,WAAW,GACvD,MAAM,IAAI,gBAAgB,GAAG,QAAQ,IAAI,IAAI,4BAA4B;EAE3E,OAAO,IAAI,KAAK;CAClB;CAEA,IAAI,OAAO,OAAO,GAChB,MAAM,IAAI,gBACR,GAAG,QAAQ,gBAAgB,IAAI,WAAW,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,GACxE;CAEF,OAAO,OAAO,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;AAChC"}
@@ -1,5 +1,5 @@
1
1
  import { O as TraceAnalysisStore } from "./types-CeDfCRXp.js";
2
- import { h as TraceAnalysisToolDescriptor } from "./engine-C1DIAEpn.js";
2
+ import { h as TraceAnalysisToolDescriptor } from "./engine-DjRV55F9.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-DiBi16ns.d.ts.map
28
+ //# sourceMappingURL=tool-groups-BC9O7Epn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-groups-BC9O7Epn.d.ts","names":[],"sources":["../src/analyst/tool-groups.ts"],"mappings":";;;;KAmBY;;;;;;;;;;;;;;;;;;;;iBAyDI,wBACd,OAAO,oBACP,OAAO,qBACN"}
@@ -2,7 +2,7 @@ import { r as CaptureIntegrityError } from "../errors-DEE6u6ot.js";
2
2
  import { b as CustomTokenPricing, c as CostLedgerHandle, p as CostProvenance } from "../cost-ledger-DbQdN3nO.js";
3
3
  import { d as RunTokenUsage } from "../run-record-DF-fuu31.js";
4
4
  import { t as DefaultVerdict } from "../verdict-E4eRNf7-.js";
5
- import { a as TraceAnalystLimits, n as TraceAnalysisEngine } from "../engine-C1DIAEpn.js";
5
+ import { a as TraceAnalystLimits, n as TraceAnalysisEngine } from "../engine-DjRV55F9.js";
6
6
  import { t as PrimeBridgeTransport } from "../prime-bridge-transport-6feEglLf.js";
7
7
  import { a as RecordedTrajectoryStep, h as isRecordedTimeout } from "../steps-Bg5-KVx1.js";
8
8
  //#region src/trace-repair/mini-swe-scaffold.d.ts
package/dist/traces.d.ts CHANGED
@@ -4,11 +4,11 @@ import { a as RunRecord, c as RunSplitTag, d as RunTokenUsage, u as RunTerminalO
4
4
  import { A as DEFAULT_TRACE_ANALYST_BUDGETS, B as TraceAnalystSpan, C as BoundedTraceAnalysisStoreOptions, D as TRACE_ANALYSIS_LIMITS, E as SpanSourceReader, F as SearchTraceResult, G as ViewTraceOversized, H as TraceAnalystSpanStatus, I as SpanMatchRecord, K as ViewTraceResult, L as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, M as ErrorCluster, N as QueryTracesPage, O as TraceAnalysisStore, P as SearchSpanResult, R as TraceAnalystByteBudgets, S as createBoundedTraceAnalysisStore, T as ReadSpanSourceResult, U as TraceAnalystTraceSummary, V as TraceAnalystSpanKind, W as ViewSpansResult, j as DatasetOverview, k as TraceAnalysisStoreContext, w as ReadSpanSourceInput, z as TraceAnalystFilters } from "./types-CeDfCRXp.js";
5
5
  import { $ as NoopRawProviderSink, Q as InMemoryRawProviderSinkOptions, X as FileSystemRawProviderSinkOptions, Y as FileSystemRawProviderSink, Z as InMemoryRawProviderSink, at as defaultProviderRedactor, et as ProviderRedactor, it as RawProviderSinkFilter, nt as RawProviderEvent, ot as providerFromBaseUrl, rt as RawProviderSink, tt as RawProviderDirection } from "./types-C0bWoSKC.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-C4avFjIi.js";
7
- import { _ as buildTraceAnalysisToolDescriptors, g as UNTRUSTED_TRACE_TEXT, h as TraceAnalysisToolDescriptor, m as TRACE_ANALYST_TOOL_NAMESPACE, p as BuildTraceAnalysisToolsOptions, v as traceAnalystFunctionGroup } from "./engine-C1DIAEpn.js";
7
+ import { _ as buildTraceAnalysisToolDescriptors, g as UNTRUSTED_TRACE_TEXT, h as TraceAnalysisToolDescriptor, m as TRACE_ANALYST_TOOL_NAMESPACE, p as BuildTraceAnalysisToolsOptions, v as traceAnalystFunctionGroup } from "./engine-DjRV55F9.js";
8
8
  import { a as SpanHandle, i as RunCompleteHookContext, n as CaptureWrite, o as TraceEmitter, r as RunCompleteHook, s as TraceEmitterOptions, t as CaptureErrorHandler } from "./emitter-HcCmFQl_.js";
9
- import { S as shareAllowed, _ as emptyRedactionReport, a as RedactionFinding, b as redactForShare, c as SafetyCategory, d as ShareSafetyVerdict, f as assessShareSafety, g as detectPersonalData, h as detectCredential, i as RedactOptions, l as ShareSafetyFinding, m as combineVerdicts, n as REDACTION_PROFILES, o as RedactionProfile, p as classifyKey, r as REDACTION_VERSION, s as RedactionReport, t as AssessOptions, u as ShareSafetyStatus, v as normalizeKey, x as redactText, y as redact } from "./redact-CopuMxll.js";
9
+ import { S as shareAllowed, _ as emptyRedactionReport, a as RedactionFinding, b as redactForShare, c as SafetyCategory, d as ShareSafetyVerdict, f as assessShareSafety, g as detectPersonalData, h as detectCredential, i as RedactOptions, l as ShareSafetyFinding, m as combineVerdicts, n as REDACTION_PROFILES, o as RedactionProfile, p as classifyKey, r as REDACTION_VERSION, s as RedactionReport, t as AssessOptions, u as ShareSafetyStatus, v as normalizeKey, x as redactText, y as redact } from "./redact-Cveoq6fJ.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-CcXqHODT.js";
11
- import { A as AnalyzeTracesInput, B as CaptureFetchContext, C as inferDomainKeywords, D as planTraceInsightQuestions, E as isTraceInsightEvidence, F as OTEL_AGENT_EVAL_SCOPE, G as SseUsageMode, H as captureFetchToRawSink, I as OtlpExport, J as extractUsageFromSse, K as extractUsage, L as OtlpResourceSpans, M as AnalyzeTracesResult, N as analyzeTraces, O as scoreTraceInsightReadiness, P as OtlpFlatLine, R as OtlpSpan, S as domainEvidencePattern, T as isTraceInsightAttribution, U as ExtractUsageFromSseOptions, V as CaptureFetchOptions, W as ExtractedUsage, _ as TraceInsightTask, a as ToolSpansToTraceAnalysisStoreOptions, b as defaultTraceInsightPanel, c as TraceInsightContext, d as TraceInsightPanelRole, f as TraceInsightPromptInput, g as TraceInsightSuite, h as TraceInsightReadiness, i as OtlpFileTraceStoreOptions, j as AnalyzeTracesOptions, k as tokenizeDomainWords, l as TraceInsightEvidence, m as TraceInsightQuestion, n as toolSpansToTraceAnalysisStore, o as otlpTextToTraceAnalysisStore, p as TraceInsightQualityGate, q as extractUsageFromResponse, r as OtlpFileTraceStore, s as TraceInsightAttribution, t as ToolTraceMissingError, u as TraceInsightFinding, v as buildTraceInsightContext, w as isTraceInsightArtifact, x as describeTraceInsightScope, y as buildTraceInsightPrompt, z as exportRunAsOtlp } from "./store-tool-spans-ByLdU26j.js";
11
+ import { A as AnalyzeTracesInput, B as CaptureFetchContext, C as inferDomainKeywords, D as planTraceInsightQuestions, E as isTraceInsightEvidence, F as OTEL_AGENT_EVAL_SCOPE, G as SseUsageMode, H as captureFetchToRawSink, I as OtlpExport, J as extractUsageFromSse, K as extractUsage, L as OtlpResourceSpans, M as AnalyzeTracesResult, N as analyzeTraces, O as scoreTraceInsightReadiness, P as OtlpFlatLine, R as OtlpSpan, S as domainEvidencePattern, T as isTraceInsightAttribution, U as ExtractUsageFromSseOptions, V as CaptureFetchOptions, W as ExtractedUsage, _ as TraceInsightTask, a as ToolSpansToTraceAnalysisStoreOptions, b as defaultTraceInsightPanel, c as TraceInsightContext, d as TraceInsightPanelRole, f as TraceInsightPromptInput, g as TraceInsightSuite, h as TraceInsightReadiness, i as OtlpFileTraceStoreOptions, j as AnalyzeTracesOptions, k as tokenizeDomainWords, l as TraceInsightEvidence, m as TraceInsightQuestion, n as toolSpansToTraceAnalysisStore, o as otlpTextToTraceAnalysisStore, p as TraceInsightQualityGate, q as extractUsageFromResponse, r as OtlpFileTraceStore, s as TraceInsightAttribution, t as ToolTraceMissingError, u as TraceInsightFinding, v as buildTraceInsightContext, w as isTraceInsightArtifact, x as describeTraceInsightScope, y as buildTraceInsightPrompt, z as exportRunAsOtlp } from "./store-tool-spans-BxrfuU2t.js";
12
12
  import { a as RunIntegrityReport, i as RunIntegrityIssueCode, n as RunIntegrityExpectations, o as assertRunCaptured, r as RunIntegrityIssue, s as throwIfRunIncomplete, t as RunIntegrityError } from "./integrity-CaeNeusS.js";
13
13
  import { a as groupBy, c as judgeSpans, d as runMetricExtractor, f as runsForScenario, i as argHash, l as llmSpans, n as RunMetric, o as hasCapturedToolArgs, p as toolSpans, r as aggregateLlm, s as isRunMetric, t as RUN_METRICS, u as runFailureClass } from "./query-DBUQhehH.js";
14
14
  import { SpanKind as SpanKind$1 } from "@tangle-network/agent-trace-contract";
package/dist/traces.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { a as isToolSpan, i as isLlmSpan, n as TRACE_SCHEMA_VERSION, r as isJudgeSpan, t as FAILURE_CLASSES } from "./schema-CSf6qWgZ.js";
2
2
  import { a as hasCapturedToolArgs, c as llmSpans, d as runsForScenario, f as toolSpans, i as groupBy, l as runFailureClass, n as aggregateLlm, o as isRunMetric, r as argHash, s as judgeSpans, t as RUN_METRICS, u as runMetricExtractor } from "./query-DlV0pdx4.js";
3
3
  import { i as modelHasSnapshot, u as validateRunRecord } from "./run-record-BRlM99rX.js";
4
- import { a as combineVerdicts, c as emptyRedactionReport, d as redactForShare, f as redactText, i as classifyKey, l as normalizeKey, n as REDACTION_VERSION, o as detectCredential, p as shareAllowed, r as assessShareSafety, s as detectPersonalData, t as REDACTION_PROFILES, u as redact } from "./redact-B7rt9Zot.js";
4
+ import { a as combineVerdicts, c as emptyRedactionReport, d as redactForShare, f as redactText, i as classifyKey, l as normalizeKey, n as REDACTION_VERSION, o as detectCredential, p as shareAllowed, r as assessShareSafety, s as detectPersonalData, t as REDACTION_PROFILES, u as redact } from "./redact-Dk1ZdJEm.js";
5
5
  import { t as TraceEmitter } from "./emitter-DbMXUIVP.js";
6
6
  import { A as spanEpochMillis, C as TraceFileTooLargeError, D as extractOtlpAttributes, E as compareSpanTime, O as firstStringAttr, S as TraceFileMissingError, T as asString, _ as SpanNotFoundError, a as TRACE_ANALYST_TOOL_NAMESPACE, b as TraceAnalysisValidationError, c as traceAnalystFunctionGroup, g as TRACE_ANALYSIS_LIMITS, h as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, j as stringField, k as projectOtlpFlatLine, m as DEFAULT_TRACE_ANALYST_BUDGETS, o as UNTRUSTED_TRACE_TEXT, s as buildTraceAnalysisToolDescriptors, u as createBoundedTraceAnalysisStore, v as TraceAnalysisLimitError, w as TraceNotFoundError, x as TraceFileMalformedError, y as TraceAnalysisStoreContractError } from "./kind-factory-CdPPHtGZ.js";
7
7
  import { INPUT_VALUE, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, OPENINFERENCE_SPAN_KIND, OUTPUT_VALUE, RUN_COST_ATTR_KEYS, SPAN_KIND_ATTR_KEYS, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS, applyLlmSpanOtlpAttributes, asNumber, contextInputTokens, firstNumberAttr } from "./trace-attributes.js";
8
8
  import { n as extractUsageFromResponse, r as extractUsageFromSse, t as extractUsage } from "./extract-usage-DFATEuWW.js";
9
- import { a as providerFromBaseUrl, i as defaultProviderRedactor, n as InMemoryRawProviderSink, r as NoopRawProviderSink, t as FileSystemRawProviderSink } from "./raw-provider-sink-DYh4Bszw.js";
10
- import { C as spanIdForWire, S as exportRunAsOtlp, T as captureFetchToRawSink, _ as tokenizeDomainWords, a as spanStatusToOtlp, b as TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, c as defaultTraceInsightPanel, d as inferDomainKeywords, f as isTraceInsightArtifact, g as scoreTraceInsightReadiness, h as planTraceInsightQuestions, i as epochMillisToIso, l as describeTraceInsightScope, m as isTraceInsightEvidence, n as toolSpansToTraceAnalysisStore, o as buildTraceInsightContext, p as isTraceInsightAttribution, r as createOtlpFlatLine, s as buildTraceInsightPrompt, t as ToolTraceMissingError, u as domainEvidencePattern, v as analyzeTraces, w as traceIdForWire, x as OTEL_AGENT_EVAL_SCOPE, y as TRACE_ANALYST_ACTOR_DESCRIPTION } from "./store-tool-spans-BcC_5ef-.js";
9
+ import { a as providerFromBaseUrl, i as defaultProviderRedactor, n as InMemoryRawProviderSink, r as NoopRawProviderSink, t as FileSystemRawProviderSink } from "./raw-provider-sink-CXuOhLvT.js";
10
+ import { C as spanIdForWire, S as exportRunAsOtlp, T as captureFetchToRawSink, _ as tokenizeDomainWords, a as spanStatusToOtlp, b as TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, c as defaultTraceInsightPanel, d as inferDomainKeywords, f as isTraceInsightArtifact, g as scoreTraceInsightReadiness, h as planTraceInsightQuestions, i as epochMillisToIso, l as describeTraceInsightScope, m as isTraceInsightEvidence, n as toolSpansToTraceAnalysisStore, o as buildTraceInsightContext, p as isTraceInsightAttribution, r as createOtlpFlatLine, s as buildTraceInsightPrompt, t as ToolTraceMissingError, u as domainEvidencePattern, v as analyzeTraces, w as traceIdForWire, x as OTEL_AGENT_EVAL_SCOPE, y as TRACE_ANALYST_ACTOR_DESCRIPTION } from "./store-tool-spans-BaGakFc2.js";
11
11
  import { n as assertRunCaptured, r as throwIfRunIncomplete, t as RunIntegrityError } from "./integrity-BFP4kjGj.js";
12
12
  import { n as traceSpanKindToOpenInferenceKind, t as applyToolSpanOtlpAttributes } from "./otlp-attributes-D9ptWaIJ.js";
13
13
  import { n as InMemoryTraceStore, t as FileSystemTraceStore } from "./store-DNe_Uv1Q.js";
14
14
  import { i as otlpTextToTraceAnalysisStore, n as OtlpFileTraceStore } from "./store-otlp-BPowgPm6.js";
15
- import { i as summarizeTraceErrors, n as recordAggregateMeasurements, r as summarizeExecutionMeasurements, t as readTaskFailureLabels } from "./task-failure-attributes-CEqEfuIY.js";
15
+ import { i as summarizeTraceErrors, n as recordAggregateMeasurements, r as summarizeExecutionMeasurements, t as readTaskFailureLabels } from "./task-failure-attributes-DngaLdE4.js";
16
16
  import { readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
17
17
  import { join } from "node:path";
18
18
  import { resolveSpanKind } from "@tangle-network/agent-trace-contract";
@@ -1,8 +1,317 @@
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
- import { d as RunTokenUsage } from "./run-record-DF-fuu31.js";
2
+ import { d as RunTokenUsage, s as RunSearchCoordinates } from "./run-record-DF-fuu31.js";
3
3
  import { _ as ProposalFinding } from "./types-CeDfCRXp.js";
4
4
  import { M as LlmCallMetadata } from "./types-C0bWoSKC.js";
5
5
  import { t as SeriesDistribution } from "./descriptive-B2iPaT9J.js";
6
+ import { A as SearchLedgerHash, G as SearchSplit, I as SearchNodeStatus, L as SearchOpenedEvent, N as SearchNodeDecision, O as SearchLedgerEntry, P as SearchNodeRef, Q as SearchTaskOutcome, R as SearchOperationKind, U as SearchReservation, Z as SearchTask, b as SearchClosedEvent, d as SearchCellCancelledEvent, i as SearchArtifactRef, l as SearchCandidateSurface, o as SearchAudit, p as SearchCellStage, t as NodeEstimate, w as SearchEdgeRecordedEvent, z as SearchOperationRecordedEvent } from "./search-ledger-types-B3El5xgS.js";
7
+ import { p as LedgerProjector } from "./index-Bj96W0jZ.js";
8
+ import { i as RolloutSearchLineage } from "./mint-C9Lojt1V.js";
9
+ //#region src/campaign/search-state.d.ts
10
+ /** Deterministic node id: identical content in one search is one node. */
11
+ declare function searchNodeId(searchId: string, artifactDigest: string): string;
12
+ /** Deterministic cell id: one node on one task in one split at one repeat. */
13
+ declare function searchCellId(searchId: string, nodeId: string, taskId: string, split: SearchSplit, rep: number): string;
14
+ /** Digest a split's task list in taskId order. */
15
+ declare function searchTaskSetDigest(tasks: readonly SearchTask[]): SearchLedgerHash;
16
+ interface SearchDecisionRecord {
17
+ sequence: number;
18
+ decision: SearchNodeDecision;
19
+ basis: NodeEstimate | null;
20
+ rule: string;
21
+ reason: string;
22
+ }
23
+ interface SearchSpend {
24
+ knownUsd: number;
25
+ floorUsd: number;
26
+ unknownCostCells: number;
27
+ boxMinutes: number;
28
+ }
29
+ /** Scores of one node on one unit of one split: the sum and count of its
30
+ * scored cells. Repeats and sibling tasks of the unit average inside it. */
31
+ interface SearchUnitScore {
32
+ unitId: string;
33
+ sum: number;
34
+ count: number;
35
+ mean: number;
36
+ }
37
+ /** A cell's scored attempt: the inputs of every per-unit statistic. */
38
+ interface SearchScoredCell {
39
+ cellId: string;
40
+ unitId: string;
41
+ /** The attempt that produced the score, which is the cell's last. */
42
+ attempt: number;
43
+ score: number;
44
+ }
45
+ /**
46
+ * Per-unit means of scored cells, in unitId order. Each unit sums its cells in
47
+ * cellId order, so the result depends on the set of cells alone, never on the
48
+ * order they settled in: a verifier that reads the same cells from a database
49
+ * gets the same bits.
50
+ */
51
+ declare function searchUnitScores(cells: readonly SearchScoredCell[]): SearchUnitScore[];
52
+ interface SearchNode {
53
+ nodeId: string;
54
+ /** Registration order; the root is 0. */
55
+ ordinal: number;
56
+ artifactDigest: SearchLedgerHash;
57
+ artifact: SearchArtifactRef;
58
+ surfaces: readonly SearchCandidateSurface[];
59
+ /** First in-search parent of the node's first edge; null for the root, a
60
+ * derived root, or a node whose parents are unknown. */
61
+ primaryParentId: string | null;
62
+ /** Edges from the root along primary parents; null while unknown. */
63
+ depth: number | null;
64
+ /** Every parent named by any edge into the node, in edge order. */
65
+ parents: readonly SearchNodeRef[];
66
+ children: readonly string[];
67
+ edgeIds: readonly string[];
68
+ status: SearchNodeStatus | null;
69
+ rung: number | null;
70
+ /** The node was decided `finalist` at some point, so its test cells are legal. */
71
+ finalist: boolean;
72
+ decisions: readonly SearchDecisionRecord[];
73
+ cellCount: number;
74
+ spend: SearchSpend;
75
+ registeredSequence: number;
76
+ updatedSequence: number;
77
+ }
78
+ interface SearchCell {
79
+ cellId: string;
80
+ nodeId: string;
81
+ taskId: string;
82
+ unitId: string;
83
+ split: SearchSplit;
84
+ rep: number;
85
+ stage: SearchCellStage;
86
+ lane: string | null;
87
+ reservation: SearchReservation | null;
88
+ attempts: number;
89
+ lastRunId: string | null;
90
+ outcome: SearchTaskOutcome['status'] | null;
91
+ /** Score of the scored attempt; null when no attempt was scored. */
92
+ score: number | null;
93
+ /** No further attempt is legal: a scored or non-retryable outcome. */
94
+ final: boolean;
95
+ cancelled: SearchCellCancelledEvent['reason'] | null;
96
+ /** Known cost plus proven floors across attempts. */
97
+ spentUsd: number;
98
+ /** Every attempt's cost is known. */
99
+ costKnown: boolean;
100
+ traceId: string | null;
101
+ allocatedSequence: number;
102
+ updatedSequence: number;
103
+ }
104
+ interface SearchOperation {
105
+ operationId: string;
106
+ operationKind: SearchOperationKind;
107
+ reservation: SearchReservation | null;
108
+ recorded: boolean;
109
+ /** The recorded outcome; null until the operation is recorded. */
110
+ outcome: SearchOperationRecordedEvent['outcome']['status'] | null;
111
+ /** Artifacts the started event bound, then those the recorded event bound,
112
+ * for example a claim's plan or a proposal's output. */
113
+ artifacts: readonly SearchArtifactRef[];
114
+ spentUsd: number;
115
+ }
116
+ interface SearchCompletion {
117
+ complete: boolean;
118
+ reasons: string[];
119
+ }
120
+ /**
121
+ * The pure, incremental projection of one search ledger. `apply` refuses any
122
+ * entry that breaks an invariant; the journal then discards this instance and
123
+ * replays into a new one, so a refused entry leaves no partial state behind.
124
+ */
125
+ declare class SearchState implements LedgerProjector<SearchLedgerEntry, SearchStateView> {
126
+ readonly searchId: string;
127
+ private version;
128
+ private header;
129
+ private closed;
130
+ private head;
131
+ private lastOccurredAt;
132
+ private lastOccurredAtText;
133
+ private readonly tasks;
134
+ private readonly nodes;
135
+ private readonly nodeOrder;
136
+ private readonly nodeByDigest;
137
+ private readonly edges;
138
+ private readonly edgeOrder;
139
+ private readonly cells;
140
+ private readonly operations;
141
+ private selectedNodeId;
142
+ private claimUsedUsd;
143
+ /** Nodes ever decided `finalist`. */
144
+ private readonly finalists;
145
+ /** Claim cells allocated. Once one exists, the finalists are fixed. */
146
+ private claimCells;
147
+ private readonly audit;
148
+ constructor(searchId: string);
149
+ apply(entry: SearchLedgerEntry, index: number): void;
150
+ snapshot(): SearchStateView;
151
+ /** @internal Views check this before every read of the live indexes. */
152
+ isAt(version: number): boolean;
153
+ private applyEvent;
154
+ private open;
155
+ private startOperation;
156
+ private recordOperation;
157
+ private registerNode;
158
+ private recordEdge;
159
+ private allocateCell;
160
+ private settleCell;
161
+ private cancelCell;
162
+ private decideNode;
163
+ private close;
164
+ private checkClaim;
165
+ /** Once the first finalist is decided, the search only runs its claim:
166
+ * nothing new is proposed, registered or allocated outside the test. */
167
+ private assertSearching;
168
+ /** @internal */
169
+ incompleteReasons(): string[];
170
+ /** Book an attempt's or operation's accounting into the running totals. An
171
+ * unknown cost counts as its proven floor. */
172
+ private book;
173
+ /** A cell's share of the open reservations, its overspend, and what it draws
174
+ * from the claim reserve: the larger of its hold and its spend. */
175
+ private reservationParts;
176
+ /** The admission rule: committed spend, open holds, the unspent claim
177
+ * reserve and the new hold stay within the cap. A claim cell draws on the
178
+ * claim reserve instead of adding to it. */
179
+ private admit;
180
+ /** @internal The largest hold a new non-claim cell or operation may take,
181
+ * and the claim reserve still unspent. */
182
+ readBudget(): {
183
+ headroomUsd: number | null;
184
+ claimReserveUsd: number;
185
+ };
186
+ /** @internal */
187
+ readHeader(): SearchOpenedEvent | null;
188
+ /** @internal */
189
+ readClosed(): SearchClosedEvent | null;
190
+ /** @internal */
191
+ readHead(): {
192
+ sequence: number;
193
+ entryHash: SearchLedgerHash;
194
+ } | null;
195
+ /** @internal */
196
+ readLastOccurredAt(): string | null;
197
+ /** @internal */
198
+ readAudit(): SearchAudit;
199
+ /** @internal */
200
+ readNode(nodeId: string): SearchNode | undefined;
201
+ /** @internal */
202
+ readNodeIds(): readonly string[];
203
+ /** @internal */
204
+ readHasNode(nodeId: string): boolean;
205
+ /** @internal */
206
+ readNodeIdForDigest(artifactDigest: string): string | undefined;
207
+ /** @internal */
208
+ readEdge(edgeId: string): SearchEdgeRecordedEvent | undefined;
209
+ /** @internal */
210
+ readEdgeIds(): readonly string[];
211
+ /** @internal */
212
+ readCell(cellId: string): SearchCell | undefined;
213
+ /** @internal */
214
+ readCellIds(nodeId?: string): readonly string[];
215
+ /** @internal */
216
+ readOperation(operationId: string): SearchOperation | undefined;
217
+ /** @internal */
218
+ readScoredCells(nodeId: string, split: SearchSplit): SearchScoredCell[];
219
+ }
220
+ /**
221
+ * A read of `SearchState` at one ledger position. Header, head, audit and
222
+ * claim are values. Node, edge, cell and score reads go to the live indexes and
223
+ * throw once the state has applied a later entry.
224
+ */
225
+ declare class SearchStateView {
226
+ readonly searchId: string;
227
+ readonly header: SearchOpenedEvent | null;
228
+ readonly closed: SearchClosedEvent | null;
229
+ readonly head: {
230
+ sequence: number;
231
+ entryHash: SearchLedgerHash;
232
+ } | null;
233
+ /** `occurredAt` of the head entry; a writer stamps later events at or after it. */
234
+ readonly lastOccurredAt: string | null;
235
+ readonly audit: SearchAudit;
236
+ readonly completion: SearchCompletion;
237
+ /**
238
+ * The admission rule's room: `headroomUsd` is the largest reservation a new
239
+ * non-claim cell or operation may hold (committed spend, open holds and the
240
+ * unspent claim reserve all count against the cap), or null when the search
241
+ * declares no cap. `claimReserveUsd` is what claim cells may still draw.
242
+ */
243
+ readonly budget: {
244
+ headroomUsd: number | null;
245
+ claimReserveUsd: number;
246
+ };
247
+ private readonly state;
248
+ private readonly version;
249
+ constructor(state: SearchState, version: number);
250
+ /** The node the search started from: the first registered. */
251
+ get rootNodeId(): string | null;
252
+ node(nodeId: string): SearchNode | undefined;
253
+ hasNode(nodeId: string): boolean;
254
+ /** Node ids in registration order. */
255
+ nodeIds(): string[];
256
+ /** Nodes in registration order. */
257
+ nodes(): SearchNode[];
258
+ nodeIdForDigest(artifactDigest: string): string | undefined;
259
+ edge(edgeId: string): SearchEdgeRecordedEvent | undefined;
260
+ /** Edges in ledger order. */
261
+ edges(): SearchEdgeRecordedEvent[];
262
+ cell(cellId: string): SearchCell | undefined;
263
+ /** Cells in allocation order, optionally of one node. */
264
+ cells(filter?: {
265
+ nodeId?: string;
266
+ }): SearchCell[];
267
+ operation(operationId: string): SearchOperation | undefined;
268
+ /** A node's scored cells on one split, in allocation order. Unscored cells
269
+ * (errored, cancelled or in flight) are absent, never zero. */
270
+ scoredCells(nodeId: string, split: SearchSplit): SearchScoredCell[];
271
+ /** Per-unit score means of a node on one split, in unitId order. */
272
+ unitScores(nodeId: string, split: SearchSplit): SearchUnitScore[];
273
+ /** The lineage a RunRecord mint needs for one cell attempt. */
274
+ lineage(coordinates: RunSearchCoordinates): RolloutSearchLineage;
275
+ private live;
276
+ }
277
+ //#endregion
278
+ //#region src/campaign/search-summary.d.ts
279
+ /** The proposer's own read of a search: its node's cells on the train split,
280
+ * the only split a proposer may ever see. */
281
+ interface SearchProposerView {
282
+ readonly searchId: string;
283
+ readonly direction: 'maximize' | 'minimize';
284
+ /** `nodeId`'s scored train cells. Unscored cells (errored, cancelled or in
285
+ * flight) are absent, never zero. */
286
+ scoredCells(nodeId: string): readonly SearchScoredCell[];
287
+ /** Per-unit train-split means of `nodeId`, in unitId order. */
288
+ unitScores(nodeId: string): readonly SearchUnitScore[];
289
+ }
290
+ /** The train-only view `ProposeContext.train` carries. */
291
+ declare function searchProposerView(state: SearchStateView): SearchProposerView;
292
+ interface SearchSummaryOptions {
293
+ /**
294
+ * The split every estimate in the summary is computed on. A proposer's
295
+ * context must always pass `'train'`: the selection and test splits stay
296
+ * unread by anything a proposer's text can reach. The CLI passes the
297
+ * search's own ranking split, `'selection'` when the search declares one
298
+ * else `'train'`, matching `searchPolicyView`.
299
+ */
300
+ split: SearchSplit;
301
+ /** Nodes shown under "Leading" and under "Recently discarded". Default 5. */
302
+ limit?: number;
303
+ }
304
+ /**
305
+ * `SearchState` as compact text: a header line with the search's shape and
306
+ * spend, the leading nodes against the root with their estimates, the most
307
+ * recently discarded nodes with the measurement that discarded them, and a
308
+ * log of recent proposals (operator and label — the ledger's inline,
309
+ * redacted summary of each rationale; the full rationale is a blob this
310
+ * function never reads, so it stays a pure, I/O-free projection of the
311
+ * state already in hand).
312
+ */
313
+ declare function renderSearchSummary(state: SearchStateView, options: SearchSummaryOptions): string;
314
+ //#endregion
6
315
  //#region src/campaign/types.d.ts
7
316
  /** Stable identifier + kind tag for any scenario. Consumers
8
317
  * extend with their per-domain payload (persona, task, requirement, ...). */
@@ -267,12 +576,27 @@ interface ScoredSurfaceOutcome {
267
576
  * Final evaluation data is not represented in this contract. */
268
577
  interface ProposeContext<TFindings = ProposalFinding> {
269
578
  /** The parent surface this proposal mutates: the node the search policy
270
- * chose (the incumbent by default). */
579
+ * chose (the incumbent by default). Equal to `parents[0].artifact` when
580
+ * `parents` is present. */
271
581
  readonly currentSurface: MutableSurface;
272
582
  /** How the child should derive from the parent: `improve` for a hill-climb
273
583
  * step; other policies ask for `draft`, `debug` or `merge`. Absent outside
274
584
  * a search. */
275
585
  readonly operator?: 'draft' | 'improve' | 'debug' | 'merge';
586
+ /** Every parent the policy chose, primary first, with its artifact. A
587
+ * `merge` proposal needs every parent; other operators name exactly one.
588
+ * Absent outside a search. */
589
+ readonly parents?: ReadonlyArray<{
590
+ nodeId: string;
591
+ artifact: MutableSurface;
592
+ }>;
593
+ /** The proposer's own read of the search: its nodes' cells on the train
594
+ * split only. Absent outside a search. See {@link SearchProposerView}. */
595
+ readonly train?: SearchProposerView;
596
+ /** `renderSearchSummary` of the search so far, computed on the train
597
+ * split: the leading nodes, recently discarded ideas and recent proposals,
598
+ * as compact text. Absent outside a search. */
599
+ readonly summary?: string;
276
600
  /** One record per earlier proposal: its candidates' measurements and the
277
601
  * candidate that took the lead, if any. */
278
602
  readonly history: ReadonlyArray<GenerationRecord>;
@@ -668,5 +992,5 @@ interface CampaignResult<TArtifact = unknown, TScenario extends Scenario = Scena
668
992
  scenarios: Array<CampaignScenarioIdentity & Pick<TScenario, 'id' | 'kind'>>;
669
993
  }
670
994
  //#endregion
671
- 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 };
672
- //# sourceMappingURL=types-C1CAD70_.d.ts.map
995
+ export { SearchNode as $, 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, renderSearchSummary as J, SearchProposerView as K, RedactionStatus as L, OptimizerConfig as M, ParetoParent as N, LabeledScenarioSource as O, ProposalTrackContext as P, SearchDecisionRecord as Q, Scenario as R, JudgeConfig as S, LabelTrust as T, TraceSpan as U, SessionScript as V, isProposedCandidate as W, SearchCell as X, searchProposerView as Y, SearchCompletion as Z, GateDecision as _, CampaignResult as a, SearchUnitScore as at, GenerationRecord as b, CampaignTraceWriter as c, searchTaskSetDigest as ct, DispatchContext as d, SearchOperation as et, DispatchFn as f, GateContribution as g, GateContext as h, CampaignCostMeter as i, SearchStateView as it, MutableSurface as j, LabeledScenarioStore as k, CodeSurface as l, searchUnitScores as lt, GateCheckStatus as m, CampaignArtifactWriter as n, SearchSpend as nt, CampaignScenarioIdentity as o, searchCellId as ot, Gate as p, SearchSummaryOptions as q, CampaignCellResult as r, SearchState as rt, CampaignTokenUsage as s, searchNodeId as st, CampaignAggregates as t, SearchScoredCell as tt, ComponentSurface as u, GateResult as v, JudgeScore as w, JudgeAggregate as x, GenerationCandidate as y, ScenarioAggregate as z };
996
+ //# sourceMappingURL=types-BWwRXofp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BWwRXofp.d.ts","names":[],"sources":["../src/campaign/search-state.ts","../src/campaign/search-summary.ts","../src/campaign/types.ts"],"mappings":";;;;;;;;;;iBAwDgB,aAAa,kBAAkB;;iBAK/B,aACd,kBACA,gBACA,gBACA,OAAO,aACP;;iBAMc,oBAAoB,gBAAgB,eAAe;UAkBlD;EACf;EACA,UAAU;EACV,OAAO;EACP;EACA;;UAGe;EACf;EACA;EACA;EACA;;;;UAKe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;;EAEA;EACA;;;;;;;;iBASc,iBAAiB,gBAAgB,qBAAqB;UAoBrD;EACf;;EAEA;EACA,gBAAgB;EAChB,UAAU;EACV,mBAAmB;;;EAGnB;;EAEA;;EAEA,kBAAkB;EAClB;EACA;EACA,QAAQ;EACR;;EAEA;EACA,oBAAoB;EACpB;EACA,OAAO;EACP;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,OAAO;EACP;EACA,OAAO;EACP;EACA,aAAa;EACb;EACA;EACA,SAAS;;EAET;;EAEA;EACA,WAAW;;EAEX;;EAEA;EACA;EACA;EACA;;UAGe;EACf;EACA,eAAe;EACf,aAAa;EACb;;EAEA,SAAS;;;EAGT,oBAAoB;EACpB;;UAGe;EACf;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;EACA,iBAAiB;;;EAGjB,WAAW,MAAM,2BAA2B,KAAK"}
@@ -1,5 +1,5 @@
1
1
  import { c as RunSplitTag } from "./run-record-DF-fuu31.js";
2
- import { R as Scenario, d as DispatchContext } from "./types-C1CAD70_.js";
2
+ import { R as Scenario, d as DispatchContext } from "./types-BWwRXofp.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';
@@ -99,4 +99,4 @@ declare const BENCHMARK_SPLIT_SEED = "agent-eval-v1";
99
99
  declare function deterministicSplit(itemId: string, seed?: string): RunSplitTag;
100
100
  //#endregion
101
101
  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 };
102
- //# sourceMappingURL=types-ByZslIlr.d.ts.map
102
+ //# sourceMappingURL=types-qoxUfKQg.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-ByZslIlr.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;;EAEA;EACA;EACA;;EAEA;;;;;EAKA;;;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-qoxUfKQg.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;;EAEA;EACA;EACA;;EAEA;;;;;EAKA;;;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,2 +1,2 @@
1
- import { A as WIRE_VERSION, C as RUBRIC_VERSION_SCHEME, D as TracesIngestRequestSchema, E as TraceEventSchema, O as TracesIngestResponseSchema, S as ListRubricsResponseSchema, T as RubricSchema, _ as FeedbackIngestResponseSchema, a as runRpcBatch, b as JudgeRequestSchema, c as WireError, d as handleListRubrics, f as handleTracesIngest, g as ErrorResponseSchema, h as listBuiltinRubrics, i as dispatchRpc, j as hashRubric, k as VersionResponseSchema, l as handleFeedbackIngest, m as getBuiltinRubric, n as startServer, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi, t as createApp, u as handleJudge, v as FeedbackTrajectorySchema, w as RubricDimensionSchema, x as JudgeResultSchema, y as HealthResponseSchema } from "../server-DtetGGoA.js";
1
+ import { A as WIRE_VERSION, C as RUBRIC_VERSION_SCHEME, D as TracesIngestRequestSchema, E as TraceEventSchema, O as TracesIngestResponseSchema, S as ListRubricsResponseSchema, T as RubricSchema, _ as FeedbackIngestResponseSchema, a as runRpcBatch, b as JudgeRequestSchema, c as WireError, d as handleListRubrics, f as handleTracesIngest, g as ErrorResponseSchema, h as listBuiltinRubrics, i as dispatchRpc, j as hashRubric, k as VersionResponseSchema, l as handleFeedbackIngest, m as getBuiltinRubric, n as startServer, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi, t as createApp, u as handleJudge, v as FeedbackTrajectorySchema, w as RubricDimensionSchema, x as JudgeResultSchema, y as HealthResponseSchema } from "../server-D56r1lhp.js";
2
2
  export { ErrorResponseSchema, FeedbackIngestResponseSchema, FeedbackTrajectorySchema, HealthResponseSchema, JudgeRequestSchema, JudgeResultSchema, ListRubricsResponseSchema, RUBRIC_VERSION_SCHEME, RubricDimensionSchema, RubricSchema, TraceEventSchema, TracesIngestRequestSchema, TracesIngestResponseSchema, VersionResponseSchema, WIRE_VERSION, WireError, buildOpenApi, createApp, dispatchRpc, getBuiltinRubric, handleFeedbackIngest, handleJudge, handleListRubrics, handleTracesIngest, handleVersion, hashRubric, listBuiltinRubrics, runRpcBatch, runRpcOnce, startServer, startServerAsync };