@tangle-network/agent-eval 0.203.1 → 0.204.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/adapters/http.d.ts +2 -2
  3. package/dist/analyst/index.d.ts +6 -6
  4. package/dist/analyst/index.js +5 -5
  5. package/dist/{benchmark-command-6OBcB0sG.js → benchmark-command-Jv_puUGM.js} +5 -5
  6. package/dist/{benchmark-command-6OBcB0sG.js.map → benchmark-command-Jv_puUGM.js.map} +1 -1
  7. package/dist/benchmarks/index.d.ts +4 -4
  8. package/dist/benchmarks/index.js +2 -2
  9. package/dist/campaign/index.d.ts +4 -4
  10. package/dist/campaign/index.js +3 -3
  11. package/dist/{campaign-BbObY2c6.js → campaign-DYhg4SjN.js} +4 -4
  12. package/dist/{campaign-BbObY2c6.js.map → campaign-DYhg4SjN.js.map} +1 -1
  13. package/dist/cli.js +1 -1
  14. package/dist/contract/index.d.ts +7 -7
  15. package/dist/contract/index.js +4 -4
  16. package/dist/{default-registry-CxEBVA6W.d.ts → default-registry-BHEfZHQd.d.ts} +3 -3
  17. package/dist/{default-registry-CxEBVA6W.d.ts.map → default-registry-BHEfZHQd.d.ts.map} +1 -1
  18. package/dist/{default-registry-wInsQWlQ.js → default-registry-BthquIoC.js} +2 -2
  19. package/dist/{default-registry-wInsQWlQ.js.map → default-registry-BthquIoC.js.map} +1 -1
  20. package/dist/{define-agent-eval-Da8mHyc7.js → define-agent-eval-B25Cc3ki.js} +2 -2
  21. package/dist/{define-agent-eval-Da8mHyc7.js.map → define-agent-eval-B25Cc3ki.js.map} +1 -1
  22. package/dist/{define-agent-eval-BbEXdM3H.d.ts → define-agent-eval-D8bPoBM5.d.ts} +5 -5
  23. package/dist/{define-agent-eval-BbEXdM3H.d.ts.map → define-agent-eval-D8bPoBM5.d.ts.map} +1 -1
  24. package/dist/{dspy-rlm-engine-D0h-P2Mz.js → dspy-rlm-engine-DCQKNQMn.js} +2 -2
  25. package/dist/{dspy-rlm-engine-D0h-P2Mz.js.map → dspy-rlm-engine-DCQKNQMn.js.map} +1 -1
  26. package/dist/{engine-CaSqEVlL.d.ts → engine-F_PvwesR.d.ts} +2 -2
  27. package/dist/{engine-CaSqEVlL.d.ts.map → engine-F_PvwesR.d.ts.map} +1 -1
  28. package/dist/evaluation.d.ts +1 -1
  29. package/dist/experiment/index.d.ts +1 -1
  30. package/dist/{index-Ce2HACcP.d.ts → index-B8n12TR2.d.ts} +9 -11
  31. package/dist/index-B8n12TR2.d.ts.map +1 -0
  32. package/dist/{index-CIkxRsLS.d.ts → index-C9l_-23M.d.ts} +3 -3
  33. package/dist/{index-CIkxRsLS.d.ts.map → index-C9l_-23M.d.ts.map} +1 -1
  34. package/dist/{index-CGAwP9l3.d.ts → index-CG7mtu_G.d.ts} +6 -6
  35. package/dist/{index-CGAwP9l3.d.ts.map → index-CG7mtu_G.d.ts.map} +1 -1
  36. package/dist/index.d.ts +10 -10
  37. package/dist/index.js +10 -10
  38. package/dist/jev.d.ts +1 -1
  39. package/dist/{kind-factory-CdPPHtGZ.js → kind-factory-Cn1lbsAd.js} +5 -5
  40. package/dist/kind-factory-Cn1lbsAd.js.map +1 -0
  41. package/dist/{llm-judge-EUMHOZOQ.js → llm-judge-DyZdrp6I.js} +54 -12
  42. package/dist/llm-judge-DyZdrp6I.js.map +1 -0
  43. package/dist/{matrix-BqHiMKIj.d.ts → matrix-W1lbSx72.d.ts} +2 -2
  44. package/dist/{matrix-BqHiMKIj.d.ts.map → matrix-W1lbSx72.d.ts.map} +1 -1
  45. package/dist/multishot/golden/index.d.ts +1 -1
  46. package/dist/multishot/index.d.ts +2 -2
  47. package/dist/openapi.json +1 -1
  48. package/dist/{produced-state-g9BPgu4D.js → produced-state-DLToUXrD.js} +2 -2
  49. package/dist/{produced-state-g9BPgu4D.js.map → produced-state-DLToUXrD.js.map} +1 -1
  50. package/dist/rl.d.ts +2 -2
  51. package/dist/search/index.d.ts +2 -2
  52. package/dist/{search-kernel-C5jua_UB.d.ts → search-kernel-DNpsHb8P.d.ts} +2 -2
  53. package/dist/{search-kernel-C5jua_UB.d.ts.map → search-kernel-DNpsHb8P.d.ts.map} +1 -1
  54. package/dist/{semantic-concept-judge-BgWxa4L_.js → semantic-concept-judge-BbiYuv7U.js} +3 -3
  55. package/dist/{semantic-concept-judge-BgWxa4L_.js.map → semantic-concept-judge-BbiYuv7U.js.map} +1 -1
  56. package/dist/{skillopt-optimization-method-DZrdQGZl.js → skillopt-optimization-method-Dz5CGZb8.js} +2 -2
  57. package/dist/{skillopt-optimization-method-DZrdQGZl.js.map → skillopt-optimization-method-Dz5CGZb8.js.map} +1 -1
  58. package/dist/{statistical-heldout-CJYAO-4a.d.ts → statistical-heldout-Dq3pnmxd.d.ts} +2 -2
  59. package/dist/{statistical-heldout-CJYAO-4a.d.ts.map → statistical-heldout-Dq3pnmxd.d.ts.map} +1 -1
  60. package/dist/{store-otlp-yd9lDziN.js → store-otlp-BA7G1Du-.js} +44 -11
  61. package/dist/store-otlp-BA7G1Du-.js.map +1 -0
  62. package/dist/{store-tool-spans-fIE31bU8.d.ts → store-tool-spans-BYIarVrG.d.ts} +19 -10
  63. package/dist/{store-tool-spans-fIE31bU8.d.ts.map → store-tool-spans-BYIarVrG.d.ts.map} +1 -1
  64. package/dist/{store-tool-spans-D5kOU0mr.js → store-tool-spans-DKoVbE-w.js} +3 -3
  65. package/dist/{store-tool-spans-D5kOU0mr.js.map → store-tool-spans-DKoVbE-w.js.map} +1 -1
  66. package/dist/{tool-groups-DP8b5kjF.d.ts → tool-groups-B7_jUPHp.d.ts} +2 -2
  67. package/dist/tool-groups-B7_jUPHp.d.ts.map +1 -0
  68. package/dist/{trace-questions-Cd0Fyhbv.d.ts → trace-questions-Dd3AMf-U.d.ts} +2 -2
  69. package/dist/{trace-questions-Cd0Fyhbv.d.ts.map → trace-questions-Dd3AMf-U.d.ts.map} +1 -1
  70. package/dist/trace-repair/index.d.ts +1 -1
  71. package/dist/traces.d.ts +3 -3
  72. package/dist/traces.js +4 -4
  73. package/dist/{types-hH9APahd.d.ts → types-DZQpUJse.d.ts} +2 -2
  74. package/dist/{types-hH9APahd.d.ts.map → types-DZQpUJse.d.ts.map} +1 -1
  75. package/dist/{types-Duc6xOoW.d.ts → types-ZUy5HGY5.d.ts} +9 -3
  76. package/dist/{types-Duc6xOoW.d.ts.map → types-ZUy5HGY5.d.ts.map} +1 -1
  77. package/docs/eval-surface-map.md +12 -2
  78. package/docs/proofs/campaign-attempt-retention-20261001/README.md +70 -0
  79. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/artifacts/capture.json +3 -0
  80. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/identity.json +10 -0
  81. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/result.json +1 -0
  82. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/trace/spans.jsonl +0 -0
  83. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/cached-result.json +1 -0
  84. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/latest-attempt.json +1 -0
  85. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/artifacts/captured-response.json +4 -0
  86. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/identity.json +10 -0
  87. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/result.json +1 -0
  88. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/trace/spans.jsonl +1 -0
  89. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/cached-result.json +1 -0
  90. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/captured-response.json +6 -0
  91. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/failure-receipt.json +58 -0
  92. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/latest-attempt.json +1 -0
  93. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/spans.jsonl +1 -0
  94. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/artifacts/captured-response.json +4 -0
  95. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/identity.json +10 -0
  96. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/result.json +1 -0
  97. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/trace/spans.jsonl +1 -0
  98. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/cached-result.json +1 -0
  99. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/latest-attempt.json +1 -0
  100. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/artifacts/captured-response.json +4 -0
  101. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/failure-receipt.json +62 -0
  102. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/identity.json +10 -0
  103. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/result.json +1 -0
  104. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/trace/spans.jsonl +1 -0
  105. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/latest-attempt.json +1 -0
  106. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/artifacts/captured-response.json +4 -0
  107. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/identity.json +10 -0
  108. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/result.json +1 -0
  109. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/trace/spans.jsonl +1 -0
  110. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/cached-result.json +1 -0
  111. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/latest-attempt.json +1 -0
  112. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/first-interruption.json +38 -0
  113. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/19147243d263e55b1eaf1c940691947382a7cce17c5f49e4a4da765a473d2a55.json +1 -0
  114. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/5dd0d871d559d1c55b2ac04b3fbd26d62f7c9e25d7632d4542502cd292818fc0.json +1 -0
  115. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/5de45d632937e75ff90fec9f1f2ec425904d3632da71f6b26f83b1e1eb8cde5a.json +1 -0
  116. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/6caba627806e499aa3d9e156aec9d5a731a3ef30e29756d343b85b7217c77c11.json +1 -0
  117. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/ce2770851b3b7651f27cedcbad0372b9191e9a9b016665987e3ddd2ad53012b5.json +1 -0
  118. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/d8ac4ba8d9844afb4defa5cd277fe3cb944d99e58cf41c07d3ae199b6f467966.json +1 -0
  119. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/f59a02035fe96ea2f5582dd715d2e3ad8c184ae959310978962f1ac0780753bd.json +1 -0
  120. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/ledger.jsonl +23 -0
  121. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/ledger.jsonl.head +1 -0
  122. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/artifacts/capture.json +3 -0
  123. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/identity.json +10 -0
  124. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/result.json +1 -0
  125. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/trace/spans.jsonl +0 -0
  126. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/cached-result.json +1 -0
  127. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/latest-attempt.json +1 -0
  128. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/artifacts/captured-response.json +6 -0
  129. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/failure-receipt.json +81 -0
  130. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/identity.json +10 -0
  131. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/result.json +1 -0
  132. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/trace/spans.jsonl +2 -0
  133. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/artifacts/captured-response.json +6 -0
  134. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/identity.json +10 -0
  135. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/result.json +1 -0
  136. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/trace/spans.jsonl +2 -0
  137. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/cached-result.json +1 -0
  138. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/latest-attempt.json +1 -0
  139. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/observation.json +608 -0
  140. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/artifacts/captured-response.json +6 -0
  141. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/failure-receipt.json +81 -0
  142. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/identity.json +10 -0
  143. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/result.json +1 -0
  144. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/trace/spans.jsonl +2 -0
  145. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/artifacts/captured-response.json +6 -0
  146. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/identity.json +10 -0
  147. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/result.json +1 -0
  148. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/trace/spans.jsonl +2 -0
  149. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/cached-result.json +1 -0
  150. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/latest-attempt.json +1 -0
  151. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/observation.json +514 -0
  152. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-summary.json +1853 -0
  153. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/judge-attribution.json +140 -0
  154. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/qualification.log +1 -0
  155. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/qualify.mjs +165 -0
  156. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduce.mjs +39 -0
  157. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/cached-result.json +1 -0
  158. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/captured-response.json +5 -0
  159. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/failure-receipt.json +58 -0
  160. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/spans.jsonl +1 -0
  161. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/observer-retained-captures.json +20 -0
  162. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/cached-result.json +1 -0
  163. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/captured-response.json +5 -0
  164. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/failure-receipt.attempt-1.json +58 -0
  165. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/spans.jsonl +1 -0
  166. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/observer-retained-captures.json +20 -0
  167. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-summary.json +315 -0
  168. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction.log +1 -0
  169. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/source-and-build.json +2409 -0
  170. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/typecheck.log +1 -0
  171. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/verify-package.log +340 -0
  172. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/artifacts/captured-response.json +4 -0
  173. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/identity.json +10 -0
  174. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/result.json +1 -0
  175. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/trace/spans.jsonl +1 -0
  176. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/cached-result.json +1 -0
  177. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/captured-response.json +6 -0
  178. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/failure-receipt.json +58 -0
  179. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/latest-attempt.json +1 -0
  180. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/spans.jsonl +1 -0
  181. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/artifacts/captured-response.json +4 -0
  182. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/identity.json +10 -0
  183. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/result.json +1 -0
  184. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/trace/spans.jsonl +1 -0
  185. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/cached-result.json +1 -0
  186. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/latest-attempt.json +1 -0
  187. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/first-interruption.json +5 -0
  188. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/blobs/5de45d632937e75ff90fec9f1f2ec425904d3632da71f6b26f83b1e1eb8cde5a.json +1 -0
  189. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/ledger.jsonl +7 -0
  190. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/ledger.jsonl.head +1 -0
  191. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/artifacts/capture.json +3 -0
  192. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/identity.json +10 -0
  193. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/result.json +1 -0
  194. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/trace/spans.jsonl +0 -0
  195. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/cached-result.json +1 -0
  196. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/latest-attempt.json +1 -0
  197. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/artifacts/captured-response.json +6 -0
  198. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/failure-receipt.json +62 -0
  199. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/identity.json +10 -0
  200. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/result.json +1 -0
  201. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/trace/spans.jsonl +1 -0
  202. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/artifacts/captured-response.json +6 -0
  203. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/identity.json +10 -0
  204. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/result.json +1 -0
  205. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/trace/spans.jsonl +1 -0
  206. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/cached-result.json +1 -0
  207. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/latest-attempt.json +1 -0
  208. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/observation.json +458 -0
  209. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/artifacts/captured-response.json +6 -0
  210. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/failure-receipt.json +62 -0
  211. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/identity.json +10 -0
  212. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/result.json +1 -0
  213. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/trace/spans.jsonl +1 -0
  214. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/artifacts/captured-response.json +6 -0
  215. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/identity.json +10 -0
  216. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/result.json +1 -0
  217. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/trace/spans.jsonl +1 -0
  218. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/cached-result.json +1 -0
  219. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/latest-attempt.json +1 -0
  220. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/observation.json +380 -0
  221. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/cached-result.json +1 -0
  222. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/captured-response.json +6 -0
  223. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/failure-receipt.json +58 -0
  224. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/spans.jsonl +1 -0
  225. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/observation.json +198 -0
  226. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/cached-result.json +1 -0
  227. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/captured-response.json +6 -0
  228. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/failure-receipt.attempt-1.json +58 -0
  229. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/spans.jsonl +1 -0
  230. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/observation.json +121 -0
  231. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-summary.json +321 -0
  232. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.attribution.log +491 -0
  233. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.final.log +491 -0
  234. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.log +495 -0
  235. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualification.log +18 -0
  236. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualification.wrong-root.log +9 -0
  237. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualify.mjs +148 -0
  238. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualify.wrong-root.mjs +148 -0
  239. package/docs/proofs/campaign-attempt-retention-20261001/manifest.json +808 -0
  240. package/docs/trace-analysis.md +10 -0
  241. package/package.json +1 -1
  242. package/dist/index-Ce2HACcP.d.ts.map +0 -1
  243. package/dist/kind-factory-CdPPHtGZ.js.map +0 -1
  244. package/dist/llm-judge-EUMHOZOQ.js.map +0 -1
  245. package/dist/store-otlp-yd9lDziN.js.map +0 -1
  246. package/dist/tool-groups-DP8b5kjF.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dspy-rlm-engine-D0h-P2Mz.js","names":["isRecord"],"sources":["../src/analyst/finding-codec.ts","../src/analyst/trace-tool-callback.ts","../src/analyst/dspy-rlm-engine.ts"],"sourcesContent":["/**\n * The raw-finding wire contract — one decoder for both sides of the process\n * boundary.\n *\n * A finding array crosses a process boundary twice: an optimizer bridge writes\n * it in Python, TypeScript reads it back. Two decoders written independently\n * accept different shapes, so Python could report a completed investigation\n * whose rows TypeScript then dropped — the paid work disappearing between two\n * \"successes\". This module is the TypeScript half; `finding_contract.json`\n * carries the same rules to the Python half, generated from the schema here.\n *\n * Decoding never invents an empty result. A value that is not an array of rows\n * fails with the exact type it was, and a malformed row is reported with its\n * index and path while its valid siblings survive.\n */\n\nimport { type RawAnalystFinding, RawAnalystFindingSchema } from './finding-signature'\nimport { parseFindingSubject } from './finding-subject'\nimport { coerceJson } from './parse-tolerant'\n\n/**\n * Version of the wire contract both languages implement. Bump when the\n * accepted row shape changes; the Python package pins the same value, and the\n * emitted contract carries it so a mismatched pair is visible.\n */\nexport const FINDING_WIRE_CONTRACT_VERSION = 1\n\n/** Why one row was refused. Stable across languages: Python reports the same codes. */\nexport type FindingRejectionCode = 'not-an-object' | 'schema' | 'invalid-subject' | 'row-limit'\n\n/** A refused row, named precisely enough to repair or report. */\nexport interface RejectedFindingRow {\n /** Position in the submitted array. */\n readonly index: number\n /** Dotted path to the offending field, `''` for the row itself. */\n readonly path: string\n readonly code: FindingRejectionCode\n readonly message: string\n}\n\nexport interface DecodedFindingArray {\n readonly accepted: RawAnalystFinding[]\n readonly rejected: RejectedFindingRow[]\n /**\n * Set when the value was not a finding array at all — the array itself is\n * the failure, so `accepted` and `rejected` are both empty and a caller must\n * not read the result as \"no findings\".\n */\n readonly topLevelError?: string\n}\n\n/**\n * Rows past this count are refused rather than validated. A model that emits\n * thousands of rows has lost the plot, and the diagnostics for them would\n * dwarf the answer they came with.\n */\nexport const MAX_FINDING_ROWS = 500\n\n/**\n * Decode a submitted findings value into accepted rows plus per-row\n * diagnostics.\n *\n * Accepts an array of rows, or a string carrying one (a JSON array, possibly\n * fenced). Anything else — an object, a number, null, undefined — sets\n * `topLevelError` naming the type received: a caller that asked for findings\n * and got a number has a defect to report, not an empty result to record.\n */\nexport function decodeRawFindingArray(value: unknown): DecodedFindingArray {\n const rows = findingRows(value)\n if (typeof rows === 'string') return { accepted: [], rejected: [], topLevelError: rows }\n\n const accepted: RawAnalystFinding[] = []\n const rejected: RejectedFindingRow[] = []\n for (const [index, row] of rows.entries()) {\n if (index >= MAX_FINDING_ROWS) {\n rejected.push({\n index,\n path: '',\n code: 'row-limit',\n message: `findings array exceeds ${MAX_FINDING_ROWS} rows`,\n })\n continue\n }\n const decoded = decodeRow(row, index)\n if ('finding' in decoded) accepted.push(decoded.finding)\n else rejected.push(decoded.rejection)\n }\n return { accepted, rejected }\n}\n\nfunction decodeRow(\n row: unknown,\n index: number,\n): { finding: RawAnalystFinding } | { rejection: RejectedFindingRow } {\n if (row === null || typeof row !== 'object' || Array.isArray(row)) {\n return {\n rejection: {\n index,\n path: '',\n code: 'not-an-object',\n message: `finding row must be an object, received ${describe(row)}`,\n },\n }\n }\n const parsed = RawAnalystFindingSchema.safeParse(row)\n if (!parsed.success) {\n const issue = parsed.error.issues[0]\n const path = (issue?.path ?? []).join('.')\n // The schema refines `subject` against the grammar; name that refusal\n // separately so a repair turn can be told which rule the row broke.\n const code: FindingRejectionCode =\n path === 'subject' && parseFindingSubject((row as { subject?: string }).subject) === null\n ? 'invalid-subject'\n : 'schema'\n return {\n rejection: { index, path, code, message: issue?.message ?? 'row does not match the schema' },\n }\n }\n return { finding: parsed.data }\n}\n\n/**\n * Narrow a submitted value to candidate rows, or return the message naming why\n * it is not a findings array at all.\n */\nfunction findingRows(value: unknown): unknown[] | string {\n if (Array.isArray(value)) return value\n if (typeof value === 'string') {\n const parsed = coerceJson(value)\n if (parsed === undefined) {\n return 'findings must be a JSON array; the string received is not JSON'\n }\n if (Array.isArray(parsed)) return parsed\n const unwrapped = findingsProperty(parsed)\n if (unwrapped !== undefined) return unwrapped\n return `findings must be a JSON array, received ${describe(parsed)}`\n }\n const unwrapped = findingsProperty(value)\n if (unwrapped !== undefined) return unwrapped\n return `findings must be an array, received ${describe(value)}`\n}\n\n/** `{ findings: [...] }` is the one wrapper models emit often enough to unwrap. */\nfunction findingsProperty(value: unknown): unknown[] | undefined {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return undefined\n const inner = (value as Record<string, unknown>).findings\n return Array.isArray(inner) ? inner : undefined\n}\n\nfunction describe(value: unknown): string {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'an array'\n return `a ${typeof value}`\n}\n\n/** One line per refused row, for a repair prompt or an error message. */\nexport function describeRejectedRows(rejected: readonly RejectedFindingRow[]): string {\n return rejected\n .map((row) => `row ${row.index}${row.path ? ` field '${row.path}'` : ''}: ${row.message}`)\n .join('\\n')\n}\n","import { randomBytes } from 'node:crypto'\nimport { createServer, type IncomingMessage, type ServerResponse } from 'node:http'\nimport {\n type ExternalOptimizerCallbackLimits,\n resolveExternalOptimizerCallbackLimits,\n} from '../campaign/external-optimizer-contracts'\nimport {\n closeServer,\n listenLocal,\n sendJsonIfOpen,\n waitForActiveHandlers,\n} from '../campaign/external-optimizer-http'\nimport type { TraceAnalysisToolDescriptor } from '../trace-analyst/tools'\n\nexport interface TraceToolCallback {\n url: string\n token: string\n calls: () => number\n close: () => Promise<void>\n}\n\nexport type TraceToolCallbackLimits = ExternalOptimizerCallbackLimits\n\n/** Expose one bounded trace-tool set only on an authenticated loopback socket. */\nexport async function startTraceToolCallback(args: {\n tools: readonly TraceAnalysisToolDescriptor[]\n maxCalls: number\n /** Trace-tool request/response byte limits. Omitted fields use finite defaults. */\n limits?: Partial<TraceToolCallbackLimits>\n signal?: AbortSignal\n}): Promise<TraceToolCallback> {\n if (!Number.isSafeInteger(args.maxCalls) || args.maxCalls <= 0) {\n throw new TypeError('trace tool callback maxCalls must be a positive safe integer')\n }\n const limits = resolveExternalOptimizerCallbackLimits(args.limits, 'trace tool callback limits')\n args.signal?.throwIfAborted()\n const byName = new Map(args.tools.map((tool) => [tool.name, tool]))\n if (byName.size !== args.tools.length) {\n throw new Error('trace tool callback received duplicate tool names')\n }\n\n const token = randomBytes(32).toString('hex')\n let calls = 0\n let accepting = true\n let closePromise: Promise<void> | undefined\n const activeControllers = new Set<AbortController>()\n const activeHandlers = new Set<Promise<void>>()\n const server = createServer((request, response) => {\n if (!accepting) {\n sendJsonIfOpen(response, 503, { error: 'trace tool callback is closing' })\n return\n }\n const controller = new AbortController()\n const abortRequest = (): void => {\n request.destroy()\n response.destroy()\n }\n activeControllers.add(controller)\n controller.signal.addEventListener('abort', abortRequest, { once: true })\n\n let handler!: Promise<void>\n handler = handleRequest(request, response, controller.signal).finally(() => {\n controller.signal.removeEventListener('abort', abortRequest)\n activeControllers.delete(controller)\n activeHandlers.delete(handler)\n })\n activeHandlers.add(handler)\n void handler.catch(() => undefined)\n })\n const port = await listenLocal(server)\n const close = (): Promise<void> => {\n closePromise ??= closeCallback()\n return closePromise\n }\n const onAbort = (): void => {\n void close().catch(() => undefined)\n }\n args.signal?.addEventListener('abort', onAbort, { once: true })\n if (args.signal?.aborted) onAbort()\n\n return {\n url: `http://127.0.0.1:${port}/call`,\n token,\n calls: () => calls,\n close,\n }\n\n async function handleRequest(\n request: IncomingMessage,\n response: ServerResponse,\n signal: AbortSignal,\n ): Promise<void> {\n try {\n if (request.method !== 'POST' || request.url !== '/call') {\n sendJsonIfOpen(response, 404, { error: 'not found' })\n return\n }\n if (request.headers.authorization !== `Bearer ${token}`) {\n sendJsonIfOpen(response, 401, { error: 'unauthorized' })\n return\n }\n if (calls >= args.maxCalls) {\n sendJsonIfOpen(response, 429, { error: 'trace tool call limit reached' })\n return\n }\n const body = await readJson(request, limits.maxRequestBytes)\n if (!isRecord(body) || typeof body.name !== 'string' || !('args' in body)) {\n sendJsonIfOpen(response, 400, { error: 'name and args are required' })\n return\n }\n const tool = byName.get(body.name)\n if (!tool) {\n sendJsonIfOpen(response, 404, { error: `unknown trace tool '${body.name}'` })\n return\n }\n calls += 1\n const result = await tool.handler(body.args, { signal })\n const encoded = JSON.stringify({ result })\n if (Buffer.byteLength(encoded) > limits.maxResponseBytes) {\n sendJsonIfOpen(response, 413, { error: 'trace tool response too large' })\n return\n }\n response.writeHead(200, {\n 'content-type': 'application/json; charset=utf-8',\n 'content-length': String(Buffer.byteLength(encoded)),\n })\n response.end(encoded)\n } catch (error) {\n sendJsonIfOpen(response, signal.aborted ? 499 : 400, {\n error: error instanceof Error ? error.message : String(error),\n })\n }\n }\n\n async function closeCallback(): Promise<void> {\n args.signal?.removeEventListener('abort', onAbort)\n accepting = false\n const closingServer = closeServer(server)\n server.closeIdleConnections?.()\n for (const controller of activeControllers) controller.abort()\n const [serverResult] = await Promise.allSettled([\n closingServer,\n waitForActiveHandlers(activeHandlers),\n ])\n if (activeControllers.size !== 0 || activeHandlers.size !== 0) {\n throw new Error('trace tool callback closed with active requests')\n }\n if (serverResult?.status === 'rejected') throw serverResult.reason\n }\n}\n\nfunction readJson(request: IncomingMessage, maxRequestBytes: number): Promise<unknown> {\n return new Promise((resolve, reject) => {\n let size = 0\n const chunks: Buffer[] = []\n request.on('data', (chunk: Buffer) => {\n size += chunk.length\n if (size > maxRequestBytes) {\n reject(new Error('trace tool request too large'))\n request.destroy()\n return\n }\n chunks.push(chunk)\n })\n request.on('error', reject)\n request.on('end', () => {\n try {\n resolve(JSON.parse(Buffer.concat(chunks).toString('utf8')))\n } catch (error) {\n reject(error)\n }\n })\n })\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n","import {\n assertExternalOptimizerModelBudget,\n type ExternalOptimizerModelCall,\n type ExternalOptimizerModelExecutionObservation,\n type ExternalOptimizerModelProxy,\n type ExternalOptimizerRunnerCommand,\n removeCredentialEnvironment,\n resolveExternalOptimizerCallbackLimits,\n resolveExternalOptimizerProcessLimits,\n} from '../campaign/external-optimizer-contracts'\nimport { startExternalOptimizerModelProxy } from '../campaign/external-optimizer-model-proxy'\nimport { runWithCleanup } from '../campaign/external-optimizer-resources'\nimport { runExternalOptimizerProcess } from '../campaign/external-optimizer-subprocess'\nimport type { CustomTokenPricing } from '../cost-ledger'\nimport { resolveModelPricing } from '../metrics'\nimport {\n DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS,\n type TraceAnalysisEngine,\n type TraceAnalysisEngineResult,\n} from './engine'\nimport { decodeRawFindingArray } from './finding-codec'\nimport { startTraceToolCallback, type TraceToolCallbackLimits } from './trace-tool-callback'\n\nconst DEFAULT_TIMEOUT_MS = 10 * 60_000\nconst DEFAULT_MAX_COST_USD = 1\nconst DEFAULT_MAX_MODEL_REQUEST_BYTES = 16 * 1024 * 1024\nconst DEFAULT_MAX_MODEL_RESPONSE_BYTES = 4 * 1024 * 1024\nconst DEFAULT_TRACE_TOOL_TIMEOUT_MS = 60_000\nconst MAX_TIMER_DELAY_MS = 2_147_483_647\nconst BRIDGE_MODULE = 'agent_eval_rpc.dspy_rlm_bridge'\n/** Bumped whenever this engine's execution behavior changes. */\nconst DSPY_RLM_ENGINE_VERSION = '1.0.0'\n\nexport interface DspyRlmTraceEngineOptions {\n /** Caller-owned execution path. Agent Eval never receives provider credentials. */\n call: ExternalOptimizerModelCall\n /** Stable public identity for the caller-owned path, such as an AgentProfile digest. */\n callRef: string\n /** Persist the finite execution record returned for every admitted call. */\n recordExecution: (observation: ExternalOptimizerModelExecutionObservation) => void\n model: string\n /** Exact provider rates. Required when the model is absent from the pricing table. */\n pricing?: CustomTokenPricing\n /** Maximum provider spend for one investigation. Default: 1 USD. */\n maxCostUsd?: number\n /** Controller response cap. Default: {@link DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS}. */\n maxOutputTokens?: number\n /**\n * Thinking tokens one controller turn may bill on top of its completion.\n * A reasoning model bills these beyond `maxOutputTokens`, so the cost\n * reservation must cover them. Default: four times the completion cap.\n */\n maxReasoningTokens?: number\n /** Maximum caller-owned model invocations. Default derives from the analysis limits. */\n maxModelRequests?: number\n /** Maximum model request bytes. Default: 16 MiB. */\n maxModelRequestBytes?: number\n /** Maximum model response bytes. Default: 4 MiB. */\n maxModelResponseBytes?: number\n /** Deadline for one caller-owned model invocation. Default: the whole analysis deadline. */\n modelRequestTimeoutMs?: number\n /** Trace-tool loopback request/response byte limits. */\n traceToolLimits?: Partial<TraceToolCallbackLimits>\n /** Deadline for one Python-to-Node trace-tool call. Default: 60 seconds. */\n traceToolTimeoutMs?: number\n /**\n * How the controller's reasoning and code fields are obtained.\n *\n * `tolerant` parses marker output strictly first, then recovers the fields\n * deterministically from prose plus a fenced code block — the shape coding\n * models naturally emit — at no extra model cost. `two-step` extracts with a\n * second call per turn. `chat` accepts marker output only. Default:\n * `tolerant`.\n */\n controlAdapter?: 'chat' | 'two-step' | 'tolerant'\n /** Python command used to load agent-eval-rpc[dspy]. Default: python. */\n runner?: ExternalOptimizerRunnerCommand\n /** Whole investigation deadline. Default: 10 minutes. */\n timeoutMs?: number\n}\n\n/** Use the official DSPy RLM as a bounded recursive trace-analysis engine. */\nexport function createDspyRlmTraceEngine(options: DspyRlmTraceEngineOptions): TraceAnalysisEngine {\n assertOptions(options)\n const maxOutputTokens = options.maxOutputTokens ?? DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS\n if (!Number.isSafeInteger(maxOutputTokens) || maxOutputTokens <= 0) {\n throw new TypeError('DSPy RLM maxOutputTokens must be a positive safe integer')\n }\n const controlAdapter = options.controlAdapter ?? 'tolerant'\n const maxReasoningTokens = options.maxReasoningTokens ?? maxOutputTokens * 4\n if (!Number.isSafeInteger(maxReasoningTokens) || maxReasoningTokens < 0) {\n throw new TypeError('DSPy RLM maxReasoningTokens must be a non-negative safe integer')\n }\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS\n assertTimerDelay(timeoutMs, 'timeoutMs')\n const maxCostUsd = options.maxCostUsd ?? DEFAULT_MAX_COST_USD\n if (!Number.isFinite(maxCostUsd) || maxCostUsd <= 0) {\n throw new TypeError('DSPy RLM maxCostUsd must be positive and finite')\n }\n const pricing = options.pricing ?? pricingForModel(options.model)\n const maxModelRequestBytes = options.maxModelRequestBytes ?? DEFAULT_MAX_MODEL_REQUEST_BYTES\n const maxModelResponseBytes = options.maxModelResponseBytes ?? DEFAULT_MAX_MODEL_RESPONSE_BYTES\n const modelRequestTimeoutMs = options.modelRequestTimeoutMs ?? timeoutMs\n const traceToolTimeoutMs = options.traceToolTimeoutMs ?? DEFAULT_TRACE_TOOL_TIMEOUT_MS\n assertExternalOptimizerModelBudget(\n {\n maxCostUsd,\n maxRequests: options.maxModelRequests ?? 1,\n maxRequestBytes: maxModelRequestBytes,\n maxResponseBytes: maxModelResponseBytes,\n maxOutputTokensPerRequest: maxOutputTokens,\n maxReasoningTokensPerRequest: maxReasoningTokens,\n pricing,\n requestTimeoutMs: modelRequestTimeoutMs,\n },\n 'DSPy RLM model limits',\n )\n resolveExternalOptimizerCallbackLimits(options.traceToolLimits, 'DSPy RLM trace tool limits')\n assertTimerDelay(traceToolTimeoutMs, 'traceToolTimeoutMs')\n\n const runner = sanitizedRunner(options.runner)\n const processLimits = resolveExternalOptimizerProcessLimits(runner?.limits)\n return {\n id: 'dspy-rlm',\n description: 'Official DSPy RLM with bounded trace tools and metered model calls.',\n model: options.model,\n version: DSPY_RLM_ENGINE_VERSION,\n executionConfig: {\n bridge_module: BRIDGE_MODULE,\n call_ref: options.callRef,\n model: options.model,\n pricing: { ...pricing },\n max_cost_usd: maxCostUsd,\n max_output_tokens: maxOutputTokens,\n max_reasoning_tokens: maxReasoningTokens,\n control_adapter: controlAdapter,\n timeout_ms: timeoutMs,\n max_model_requests: options.maxModelRequests ?? null,\n max_request_bytes: maxModelRequestBytes,\n max_response_bytes: maxModelResponseBytes,\n model_request_timeout_ms: modelRequestTimeoutMs,\n trace_tool_limits: options.traceToolLimits ?? null,\n trace_tool_timeout_ms: traceToolTimeoutMs,\n process_limits: processLimits,\n runner: runner ? 'caller-supplied' : 'default',\n runner_command: runner?.command ?? null,\n },\n async analyze(request) {\n const callback = await startTraceToolCallback({\n tools: request.tools,\n maxCalls: request.limits.maxToolCalls,\n ...(options.traceToolLimits ? { limits: options.traceToolLimits } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n let modelProxy: ExternalOptimizerModelProxy | undefined\n const modelExecutions: ExternalOptimizerModelExecutionObservation[] = []\n const result = await runWithCleanup({\n label: 'DSPy RLM trace-analysis resources',\n run: async () => {\n modelProxy = await startExternalOptimizerModelProxy({\n call: options.call,\n callRef: options.callRef,\n recordExecution: (observation) => {\n modelExecutions.push(structuredClone(observation))\n options.recordExecution(observation)\n },\n model: options.model,\n budget: {\n maxCostUsd,\n maxRequests: resolveMaxModelRequests(options.maxModelRequests, request.limits),\n maxRequestBytes: maxModelRequestBytes,\n maxResponseBytes: maxModelResponseBytes,\n maxOutputTokensPerRequest: maxOutputTokens,\n maxReasoningTokensPerRequest: maxReasoningTokens,\n requestTimeoutMs: modelRequestTimeoutMs,\n pricing,\n },\n costLedger: request.costLedger,\n channel: 'analyst',\n phase: request.costPhase,\n actor: request.analystId,\n ...(request.costTags ? { tags: request.costTags } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n request.log?.('trace analyst engine started', {\n engine: 'dspy-rlm',\n model: options.model,\n tools: request.tools.map((tool) => tool.name),\n limits: request.limits,\n })\n const raw = await runExternalOptimizerProcess<unknown>({\n label: 'DSPy RLM trace analysis',\n tempPrefix: 'agent-eval-dspy-rlm-',\n module: BRIDGE_MODULE,\n input: {\n operation: 'analyze',\n question: request.question,\n instructions: request.instructions,\n modelProxy: {\n baseUrl: modelProxy.baseUrl,\n apiKey: modelProxy.apiKey,\n model: options.model,\n maxOutputTokens,\n },\n toolCallback: {\n url: callback.url,\n token: callback.token,\n timeoutMs: traceToolTimeoutMs,\n },\n toolSpecs: request.tools.map(({ name, description, parameters }) => ({\n name,\n description,\n parameters,\n })),\n controlAdapter,\n limits: {\n maxIterations: request.limits.maxIterations,\n maxLlmCalls: request.limits.maxLlmCalls,\n maxOutputChars: request.limits.maxOutputChars,\n },\n // Omitted entirely when the caller supplied none, so a request\n // without structured inputs sends the payload it always sent.\n ...(request.taskInputs ? { taskInputs: request.taskInputs } : {}),\n },\n ...(runner ? { runner } : {}),\n additionalArgs: ['--max-input-bytes', String(processLimits.maxInputBytes)],\n timeoutMs,\n ...(request.signal ? { signal: request.signal } : {}),\n })\n const parsed = parseBridgeOutput(raw, (index, reason) => {\n request.log?.('finding rejected: bridge row failed schema validation', {\n engine: 'dspy-rlm',\n index,\n reason,\n })\n })\n const successfulCompletions = modelProxy.successfulCompletions()\n const requestAttempts = modelProxy.requestAttempts()\n if (parsed.modelCalls !== successfulCompletions) {\n throw new Error(\n `DSPy RLM reported ${parsed.modelCalls} model calls, but the provider proxy recorded ${successfulCompletions}`,\n )\n }\n modelProxy.assertExecutionComplete()\n return {\n ...parsed,\n toolCalls: callback.calls(),\n runtime: {\n ...parsed.runtime,\n modelRequestAttempts: requestAttempts,\n modelSuccessfulCompletions: successfulCompletions,\n modelExecutions,\n },\n } satisfies TraceAnalysisEngineResult\n },\n cleanup: async () => {\n const results = await Promise.allSettled([\n ...(modelProxy ? [modelProxy.close()] : []),\n callback.close(),\n ])\n const errors = results.flatMap((entry) =>\n entry.status === 'rejected' ? [entry.reason] : [],\n )\n if (errors.length > 0) {\n throw new AggregateError(errors, 'DSPy RLM resource cleanup failed')\n }\n },\n })\n request.log?.('trace analyst engine completed', {\n engine: 'dspy-rlm',\n model_calls: result.modelCalls,\n model_request_attempts: result.runtime.modelRequestAttempts,\n tool_calls: result.toolCalls,\n findings: result.findings.length,\n })\n return result\n },\n }\n}\n\nfunction parseBridgeOutput(\n value: unknown,\n onRejectedFinding: (index: number, reason: string) => void,\n): Omit<TraceAnalysisEngineResult, 'toolCalls'> {\n if (!isRecord(value)) throw new Error('DSPy RLM bridge output must be an object')\n if (typeof value.answer !== 'string' || !value.answer.trim()) {\n throw new Error('DSPy RLM bridge returned no answer')\n }\n // Findings are model output: one malformed row is model noise, not a bridge\n // fault, and the rest of the paid investigation must survive it. The codec\n // is the same decoder the Python side runs, so a row this bridge accepts is\n // a row the optimizer could report, and vice versa.\n const decoded = decodeRawFindingArray(value.findings)\n if (decoded.topLevelError !== undefined) {\n throw new Error(`DSPy RLM bridge findings must be an array: ${decoded.topLevelError}`)\n }\n const findings = decoded.accepted\n const rejectedFindings = decoded.rejected.length\n for (const rejection of decoded.rejected) {\n onRejectedFinding(\n rejection.index,\n `${rejection.code}${rejection.path ? ` at ${rejection.path}` : ''}: ${rejection.message}`,\n )\n }\n if (!Array.isArray(value.trajectory)) {\n throw new Error('DSPy RLM bridge trajectory must be an array')\n }\n if (!Number.isSafeInteger(value.modelCalls) || (value.modelCalls as number) <= 0) {\n throw new Error('DSPy RLM bridge modelCalls must be a positive safe integer')\n }\n if (!isRecord(value.runtime)) {\n throw new Error('DSPy RLM bridge runtime must be an object')\n }\n return {\n answer: value.answer,\n findings,\n trajectory: value.trajectory,\n modelCalls: value.modelCalls as number,\n runtime: { ...value.runtime, rejectedFindings },\n }\n}\n\nfunction assertOptions(options: DspyRlmTraceEngineOptions): void {\n for (const [name, value] of [\n ['callRef', options.callRef],\n ['model', options.model],\n ] as const) {\n if (typeof value !== 'string' || !value.trim() || value !== value.trim()) {\n throw new TypeError(`DSPy RLM ${name} must be a trimmed non-empty string`)\n }\n }\n if (typeof options.call !== 'function') {\n throw new TypeError('DSPy RLM call must be a function')\n }\n if (typeof options.recordExecution !== 'function') {\n throw new TypeError('DSPy RLM recordExecution must be a function')\n }\n if (\n options.maxModelRequests !== undefined &&\n (!Number.isSafeInteger(options.maxModelRequests) || options.maxModelRequests <= 0)\n ) {\n throw new TypeError('DSPy RLM maxModelRequests must be a positive safe integer')\n }\n}\n\nfunction resolveMaxModelRequests(\n configured: number | undefined,\n limits: { maxIterations: number; maxLlmCalls: number },\n): number {\n if (configured !== undefined) return configured\n const derived = limits.maxIterations + limits.maxLlmCalls + 1\n if (!Number.isSafeInteger(derived) || derived <= 0) {\n throw new Error('DSPy RLM analysis limits produce an invalid model request limit')\n }\n return derived\n}\n\nfunction assertTimerDelay(value: number, field: string): void {\n if (!Number.isSafeInteger(value) || value <= 0 || value > MAX_TIMER_DELAY_MS) {\n throw new TypeError(`DSPy RLM ${field} must be between 1 and ${MAX_TIMER_DELAY_MS}`)\n }\n}\n\nfunction pricingForModel(model: string): CustomTokenPricing {\n const pricing = resolveModelPricing(model)\n if (!pricing) {\n throw new Error(\n `no pricing is configured for '${model}'; provide DspyRlmTraceEngineOptions.pricing`,\n )\n }\n return {\n inputUsdPerMillion: pricing.input * 1_000,\n outputUsdPerMillion: pricing.output * 1_000,\n }\n}\n\nfunction sanitizedRunner(\n runner: ExternalOptimizerRunnerCommand | undefined,\n): ExternalOptimizerRunnerCommand | undefined {\n if (!runner) return undefined\n return {\n ...(runner.command ? { command: runner.command } : {}),\n ...(runner.args ? { args: runner.args } : {}),\n ...(runner.env ? { env: removeCredentialEnvironment(runner.env) } : {}),\n ...(runner.limits ? { limits: { ...runner.limits } } : {}),\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n"],"mappings":";;;;;;;;;;;;;;AAmEA,SAAgB,sBAAsB,OAAqC;CACzE,MAAM,OAAO,YAAY,KAAK;CAC9B,IAAI,OAAO,SAAS,UAAU,OAAO;EAAE,UAAU,CAAC;EAAG,UAAU,CAAC;EAAG,eAAe;CAAK;CAEvF,MAAM,WAAgC,CAAC;CACvC,MAAM,WAAiC,CAAC;CACxC,KAAK,MAAM,CAAC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AoB;AAEvF;AAEA,SAAS,gBAAgB,OAAmC;CAC1D,MAAM,UAAU,oBAAoB,KAAK;CACzC,IAAI,CAAC,SACH,MAAM,IAAI,MACR,iCAAiC,MAAM,6CACzC;CAEF,OAAO;EACL,oBAAoB,QAAQ,QAAQ;EACpC,qBAAqB,QAAQ,SAAS;CACxC;AACF;AAEA,SAAS,gBACP,QAC4C;CAC5C,IAAI,CAAC,QAAQ,OAAO,KAAA;CACpB,OAAO;EACL,GAAI,OAAO,UAAU,EAAE,SAAS,OAAO,QAAQ,IAAI,CAAC;EACpD,GAAI,OAAO,OAAO,EAAE,MAAM,OAAO,KAAK,IAAI,CAAC;EAC3C,GAAI,OAAO,MAAM,EAAE,KAAK,4BAA4B,OAAO,GAAG,EAAE,IAAI,CAAC;EACrE,GAAI,OAAO,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,OAAO,EAAE,IAAI,CAAC;CAC1D;AACF;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E"}
1
+ {"version":3,"file":"dspy-rlm-engine-DCQKNQMn.js","names":["isRecord"],"sources":["../src/analyst/finding-codec.ts","../src/analyst/trace-tool-callback.ts","../src/analyst/dspy-rlm-engine.ts"],"sourcesContent":["/**\n * The raw-finding wire contract — one decoder for both sides of the process\n * boundary.\n *\n * A finding array crosses a process boundary twice: an optimizer bridge writes\n * it in Python, TypeScript reads it back. Two decoders written independently\n * accept different shapes, so Python could report a completed investigation\n * whose rows TypeScript then dropped — the paid work disappearing between two\n * \"successes\". This module is the TypeScript half; `finding_contract.json`\n * carries the same rules to the Python half, generated from the schema here.\n *\n * Decoding never invents an empty result. A value that is not an array of rows\n * fails with the exact type it was, and a malformed row is reported with its\n * index and path while its valid siblings survive.\n */\n\nimport { type RawAnalystFinding, RawAnalystFindingSchema } from './finding-signature'\nimport { parseFindingSubject } from './finding-subject'\nimport { coerceJson } from './parse-tolerant'\n\n/**\n * Version of the wire contract both languages implement. Bump when the\n * accepted row shape changes; the Python package pins the same value, and the\n * emitted contract carries it so a mismatched pair is visible.\n */\nexport const FINDING_WIRE_CONTRACT_VERSION = 1\n\n/** Why one row was refused. Stable across languages: Python reports the same codes. */\nexport type FindingRejectionCode = 'not-an-object' | 'schema' | 'invalid-subject' | 'row-limit'\n\n/** A refused row, named precisely enough to repair or report. */\nexport interface RejectedFindingRow {\n /** Position in the submitted array. */\n readonly index: number\n /** Dotted path to the offending field, `''` for the row itself. */\n readonly path: string\n readonly code: FindingRejectionCode\n readonly message: string\n}\n\nexport interface DecodedFindingArray {\n readonly accepted: RawAnalystFinding[]\n readonly rejected: RejectedFindingRow[]\n /**\n * Set when the value was not a finding array at all — the array itself is\n * the failure, so `accepted` and `rejected` are both empty and a caller must\n * not read the result as \"no findings\".\n */\n readonly topLevelError?: string\n}\n\n/**\n * Rows past this count are refused rather than validated. A model that emits\n * thousands of rows has lost the plot, and the diagnostics for them would\n * dwarf the answer they came with.\n */\nexport const MAX_FINDING_ROWS = 500\n\n/**\n * Decode a submitted findings value into accepted rows plus per-row\n * diagnostics.\n *\n * Accepts an array of rows, or a string carrying one (a JSON array, possibly\n * fenced). Anything else — an object, a number, null, undefined — sets\n * `topLevelError` naming the type received: a caller that asked for findings\n * and got a number has a defect to report, not an empty result to record.\n */\nexport function decodeRawFindingArray(value: unknown): DecodedFindingArray {\n const rows = findingRows(value)\n if (typeof rows === 'string') return { accepted: [], rejected: [], topLevelError: rows }\n\n const accepted: RawAnalystFinding[] = []\n const rejected: RejectedFindingRow[] = []\n for (const [index, row] of rows.entries()) {\n if (index >= MAX_FINDING_ROWS) {\n rejected.push({\n index,\n path: '',\n code: 'row-limit',\n message: `findings array exceeds ${MAX_FINDING_ROWS} rows`,\n })\n continue\n }\n const decoded = decodeRow(row, index)\n if ('finding' in decoded) accepted.push(decoded.finding)\n else rejected.push(decoded.rejection)\n }\n return { accepted, rejected }\n}\n\nfunction decodeRow(\n row: unknown,\n index: number,\n): { finding: RawAnalystFinding } | { rejection: RejectedFindingRow } {\n if (row === null || typeof row !== 'object' || Array.isArray(row)) {\n return {\n rejection: {\n index,\n path: '',\n code: 'not-an-object',\n message: `finding row must be an object, received ${describe(row)}`,\n },\n }\n }\n const parsed = RawAnalystFindingSchema.safeParse(row)\n if (!parsed.success) {\n const issue = parsed.error.issues[0]\n const path = (issue?.path ?? []).join('.')\n // The schema refines `subject` against the grammar; name that refusal\n // separately so a repair turn can be told which rule the row broke.\n const code: FindingRejectionCode =\n path === 'subject' && parseFindingSubject((row as { subject?: string }).subject) === null\n ? 'invalid-subject'\n : 'schema'\n return {\n rejection: { index, path, code, message: issue?.message ?? 'row does not match the schema' },\n }\n }\n return { finding: parsed.data }\n}\n\n/**\n * Narrow a submitted value to candidate rows, or return the message naming why\n * it is not a findings array at all.\n */\nfunction findingRows(value: unknown): unknown[] | string {\n if (Array.isArray(value)) return value\n if (typeof value === 'string') {\n const parsed = coerceJson(value)\n if (parsed === undefined) {\n return 'findings must be a JSON array; the string received is not JSON'\n }\n if (Array.isArray(parsed)) return parsed\n const unwrapped = findingsProperty(parsed)\n if (unwrapped !== undefined) return unwrapped\n return `findings must be a JSON array, received ${describe(parsed)}`\n }\n const unwrapped = findingsProperty(value)\n if (unwrapped !== undefined) return unwrapped\n return `findings must be an array, received ${describe(value)}`\n}\n\n/** `{ findings: [...] }` is the one wrapper models emit often enough to unwrap. */\nfunction findingsProperty(value: unknown): unknown[] | undefined {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return undefined\n const inner = (value as Record<string, unknown>).findings\n return Array.isArray(inner) ? inner : undefined\n}\n\nfunction describe(value: unknown): string {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'an array'\n return `a ${typeof value}`\n}\n\n/** One line per refused row, for a repair prompt or an error message. */\nexport function describeRejectedRows(rejected: readonly RejectedFindingRow[]): string {\n return rejected\n .map((row) => `row ${row.index}${row.path ? ` field '${row.path}'` : ''}: ${row.message}`)\n .join('\\n')\n}\n","import { randomBytes } from 'node:crypto'\nimport { createServer, type IncomingMessage, type ServerResponse } from 'node:http'\nimport {\n type ExternalOptimizerCallbackLimits,\n resolveExternalOptimizerCallbackLimits,\n} from '../campaign/external-optimizer-contracts'\nimport {\n closeServer,\n listenLocal,\n sendJsonIfOpen,\n waitForActiveHandlers,\n} from '../campaign/external-optimizer-http'\nimport type { TraceAnalysisToolDescriptor } from '../trace-analyst/tools'\n\nexport interface TraceToolCallback {\n url: string\n token: string\n calls: () => number\n close: () => Promise<void>\n}\n\nexport type TraceToolCallbackLimits = ExternalOptimizerCallbackLimits\n\n/** Expose one bounded trace-tool set only on an authenticated loopback socket. */\nexport async function startTraceToolCallback(args: {\n tools: readonly TraceAnalysisToolDescriptor[]\n maxCalls: number\n /** Trace-tool request/response byte limits. Omitted fields use finite defaults. */\n limits?: Partial<TraceToolCallbackLimits>\n signal?: AbortSignal\n}): Promise<TraceToolCallback> {\n if (!Number.isSafeInteger(args.maxCalls) || args.maxCalls <= 0) {\n throw new TypeError('trace tool callback maxCalls must be a positive safe integer')\n }\n const limits = resolveExternalOptimizerCallbackLimits(args.limits, 'trace tool callback limits')\n args.signal?.throwIfAborted()\n const byName = new Map(args.tools.map((tool) => [tool.name, tool]))\n if (byName.size !== args.tools.length) {\n throw new Error('trace tool callback received duplicate tool names')\n }\n\n const token = randomBytes(32).toString('hex')\n let calls = 0\n let accepting = true\n let closePromise: Promise<void> | undefined\n const activeControllers = new Set<AbortController>()\n const activeHandlers = new Set<Promise<void>>()\n const server = createServer((request, response) => {\n if (!accepting) {\n sendJsonIfOpen(response, 503, { error: 'trace tool callback is closing' })\n return\n }\n const controller = new AbortController()\n const abortRequest = (): void => {\n request.destroy()\n response.destroy()\n }\n activeControllers.add(controller)\n controller.signal.addEventListener('abort', abortRequest, { once: true })\n\n let handler!: Promise<void>\n handler = handleRequest(request, response, controller.signal).finally(() => {\n controller.signal.removeEventListener('abort', abortRequest)\n activeControllers.delete(controller)\n activeHandlers.delete(handler)\n })\n activeHandlers.add(handler)\n void handler.catch(() => undefined)\n })\n const port = await listenLocal(server)\n const close = (): Promise<void> => {\n closePromise ??= closeCallback()\n return closePromise\n }\n const onAbort = (): void => {\n void close().catch(() => undefined)\n }\n args.signal?.addEventListener('abort', onAbort, { once: true })\n if (args.signal?.aborted) onAbort()\n\n return {\n url: `http://127.0.0.1:${port}/call`,\n token,\n calls: () => calls,\n close,\n }\n\n async function handleRequest(\n request: IncomingMessage,\n response: ServerResponse,\n signal: AbortSignal,\n ): Promise<void> {\n try {\n if (request.method !== 'POST' || request.url !== '/call') {\n sendJsonIfOpen(response, 404, { error: 'not found' })\n return\n }\n if (request.headers.authorization !== `Bearer ${token}`) {\n sendJsonIfOpen(response, 401, { error: 'unauthorized' })\n return\n }\n if (calls >= args.maxCalls) {\n sendJsonIfOpen(response, 429, { error: 'trace tool call limit reached' })\n return\n }\n const body = await readJson(request, limits.maxRequestBytes)\n if (!isRecord(body) || typeof body.name !== 'string' || !('args' in body)) {\n sendJsonIfOpen(response, 400, { error: 'name and args are required' })\n return\n }\n const tool = byName.get(body.name)\n if (!tool) {\n sendJsonIfOpen(response, 404, { error: `unknown trace tool '${body.name}'` })\n return\n }\n calls += 1\n const result = await tool.handler(body.args, { signal })\n const encoded = JSON.stringify({ result })\n if (Buffer.byteLength(encoded) > limits.maxResponseBytes) {\n sendJsonIfOpen(response, 413, { error: 'trace tool response too large' })\n return\n }\n response.writeHead(200, {\n 'content-type': 'application/json; charset=utf-8',\n 'content-length': String(Buffer.byteLength(encoded)),\n })\n response.end(encoded)\n } catch (error) {\n sendJsonIfOpen(response, signal.aborted ? 499 : 400, {\n error: error instanceof Error ? error.message : String(error),\n })\n }\n }\n\n async function closeCallback(): Promise<void> {\n args.signal?.removeEventListener('abort', onAbort)\n accepting = false\n const closingServer = closeServer(server)\n server.closeIdleConnections?.()\n for (const controller of activeControllers) controller.abort()\n const [serverResult] = await Promise.allSettled([\n closingServer,\n waitForActiveHandlers(activeHandlers),\n ])\n if (activeControllers.size !== 0 || activeHandlers.size !== 0) {\n throw new Error('trace tool callback closed with active requests')\n }\n if (serverResult?.status === 'rejected') throw serverResult.reason\n }\n}\n\nfunction readJson(request: IncomingMessage, maxRequestBytes: number): Promise<unknown> {\n return new Promise((resolve, reject) => {\n let size = 0\n const chunks: Buffer[] = []\n request.on('data', (chunk: Buffer) => {\n size += chunk.length\n if (size > maxRequestBytes) {\n reject(new Error('trace tool request too large'))\n request.destroy()\n return\n }\n chunks.push(chunk)\n })\n request.on('error', reject)\n request.on('end', () => {\n try {\n resolve(JSON.parse(Buffer.concat(chunks).toString('utf8')))\n } catch (error) {\n reject(error)\n }\n })\n })\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n","import {\n assertExternalOptimizerModelBudget,\n type ExternalOptimizerModelCall,\n type ExternalOptimizerModelExecutionObservation,\n type ExternalOptimizerModelProxy,\n type ExternalOptimizerRunnerCommand,\n removeCredentialEnvironment,\n resolveExternalOptimizerCallbackLimits,\n resolveExternalOptimizerProcessLimits,\n} from '../campaign/external-optimizer-contracts'\nimport { startExternalOptimizerModelProxy } from '../campaign/external-optimizer-model-proxy'\nimport { runWithCleanup } from '../campaign/external-optimizer-resources'\nimport { runExternalOptimizerProcess } from '../campaign/external-optimizer-subprocess'\nimport type { CustomTokenPricing } from '../cost-ledger'\nimport { resolveModelPricing } from '../metrics'\nimport {\n DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS,\n type TraceAnalysisEngine,\n type TraceAnalysisEngineResult,\n} from './engine'\nimport { decodeRawFindingArray } from './finding-codec'\nimport { startTraceToolCallback, type TraceToolCallbackLimits } from './trace-tool-callback'\n\nconst DEFAULT_TIMEOUT_MS = 10 * 60_000\nconst DEFAULT_MAX_COST_USD = 1\nconst DEFAULT_MAX_MODEL_REQUEST_BYTES = 16 * 1024 * 1024\nconst DEFAULT_MAX_MODEL_RESPONSE_BYTES = 4 * 1024 * 1024\nconst DEFAULT_TRACE_TOOL_TIMEOUT_MS = 60_000\nconst MAX_TIMER_DELAY_MS = 2_147_483_647\nconst BRIDGE_MODULE = 'agent_eval_rpc.dspy_rlm_bridge'\n/** Bumped whenever this engine's execution behavior changes. */\nconst DSPY_RLM_ENGINE_VERSION = '1.0.0'\n\nexport interface DspyRlmTraceEngineOptions {\n /** Caller-owned execution path. Agent Eval never receives provider credentials. */\n call: ExternalOptimizerModelCall\n /** Stable public identity for the caller-owned path, such as an AgentProfile digest. */\n callRef: string\n /** Persist the finite execution record returned for every admitted call. */\n recordExecution: (observation: ExternalOptimizerModelExecutionObservation) => void\n model: string\n /** Exact provider rates. Required when the model is absent from the pricing table. */\n pricing?: CustomTokenPricing\n /** Maximum provider spend for one investigation. Default: 1 USD. */\n maxCostUsd?: number\n /** Controller response cap. Default: {@link DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS}. */\n maxOutputTokens?: number\n /**\n * Thinking tokens one controller turn may bill on top of its completion.\n * A reasoning model bills these beyond `maxOutputTokens`, so the cost\n * reservation must cover them. Default: four times the completion cap.\n */\n maxReasoningTokens?: number\n /** Maximum caller-owned model invocations. Default derives from the analysis limits. */\n maxModelRequests?: number\n /** Maximum model request bytes. Default: 16 MiB. */\n maxModelRequestBytes?: number\n /** Maximum model response bytes. Default: 4 MiB. */\n maxModelResponseBytes?: number\n /** Deadline for one caller-owned model invocation. Default: the whole analysis deadline. */\n modelRequestTimeoutMs?: number\n /** Trace-tool loopback request/response byte limits. */\n traceToolLimits?: Partial<TraceToolCallbackLimits>\n /** Deadline for one Python-to-Node trace-tool call. Default: 60 seconds. */\n traceToolTimeoutMs?: number\n /**\n * How the controller's reasoning and code fields are obtained.\n *\n * `tolerant` parses marker output strictly first, then recovers the fields\n * deterministically from prose plus a fenced code block — the shape coding\n * models naturally emit — at no extra model cost. `two-step` extracts with a\n * second call per turn. `chat` accepts marker output only. Default:\n * `tolerant`.\n */\n controlAdapter?: 'chat' | 'two-step' | 'tolerant'\n /** Python command used to load agent-eval-rpc[dspy]. Default: python. */\n runner?: ExternalOptimizerRunnerCommand\n /** Whole investigation deadline. Default: 10 minutes. */\n timeoutMs?: number\n}\n\n/** Use the official DSPy RLM as a bounded recursive trace-analysis engine. */\nexport function createDspyRlmTraceEngine(options: DspyRlmTraceEngineOptions): TraceAnalysisEngine {\n assertOptions(options)\n const maxOutputTokens = options.maxOutputTokens ?? DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS\n if (!Number.isSafeInteger(maxOutputTokens) || maxOutputTokens <= 0) {\n throw new TypeError('DSPy RLM maxOutputTokens must be a positive safe integer')\n }\n const controlAdapter = options.controlAdapter ?? 'tolerant'\n const maxReasoningTokens = options.maxReasoningTokens ?? maxOutputTokens * 4\n if (!Number.isSafeInteger(maxReasoningTokens) || maxReasoningTokens < 0) {\n throw new TypeError('DSPy RLM maxReasoningTokens must be a non-negative safe integer')\n }\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS\n assertTimerDelay(timeoutMs, 'timeoutMs')\n const maxCostUsd = options.maxCostUsd ?? DEFAULT_MAX_COST_USD\n if (!Number.isFinite(maxCostUsd) || maxCostUsd <= 0) {\n throw new TypeError('DSPy RLM maxCostUsd must be positive and finite')\n }\n const pricing = options.pricing ?? pricingForModel(options.model)\n const maxModelRequestBytes = options.maxModelRequestBytes ?? DEFAULT_MAX_MODEL_REQUEST_BYTES\n const maxModelResponseBytes = options.maxModelResponseBytes ?? DEFAULT_MAX_MODEL_RESPONSE_BYTES\n const modelRequestTimeoutMs = options.modelRequestTimeoutMs ?? timeoutMs\n const traceToolTimeoutMs = options.traceToolTimeoutMs ?? DEFAULT_TRACE_TOOL_TIMEOUT_MS\n assertExternalOptimizerModelBudget(\n {\n maxCostUsd,\n maxRequests: options.maxModelRequests ?? 1,\n maxRequestBytes: maxModelRequestBytes,\n maxResponseBytes: maxModelResponseBytes,\n maxOutputTokensPerRequest: maxOutputTokens,\n maxReasoningTokensPerRequest: maxReasoningTokens,\n pricing,\n requestTimeoutMs: modelRequestTimeoutMs,\n },\n 'DSPy RLM model limits',\n )\n resolveExternalOptimizerCallbackLimits(options.traceToolLimits, 'DSPy RLM trace tool limits')\n assertTimerDelay(traceToolTimeoutMs, 'traceToolTimeoutMs')\n\n const runner = sanitizedRunner(options.runner)\n const processLimits = resolveExternalOptimizerProcessLimits(runner?.limits)\n return {\n id: 'dspy-rlm',\n description: 'Official DSPy RLM with bounded trace tools and metered model calls.',\n model: options.model,\n version: DSPY_RLM_ENGINE_VERSION,\n executionConfig: {\n bridge_module: BRIDGE_MODULE,\n call_ref: options.callRef,\n model: options.model,\n pricing: { ...pricing },\n max_cost_usd: maxCostUsd,\n max_output_tokens: maxOutputTokens,\n max_reasoning_tokens: maxReasoningTokens,\n control_adapter: controlAdapter,\n timeout_ms: timeoutMs,\n max_model_requests: options.maxModelRequests ?? null,\n max_request_bytes: maxModelRequestBytes,\n max_response_bytes: maxModelResponseBytes,\n model_request_timeout_ms: modelRequestTimeoutMs,\n trace_tool_limits: options.traceToolLimits ?? null,\n trace_tool_timeout_ms: traceToolTimeoutMs,\n process_limits: processLimits,\n runner: runner ? 'caller-supplied' : 'default',\n runner_command: runner?.command ?? null,\n },\n async analyze(request) {\n const callback = await startTraceToolCallback({\n tools: request.tools,\n maxCalls: request.limits.maxToolCalls,\n ...(options.traceToolLimits ? { limits: options.traceToolLimits } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n let modelProxy: ExternalOptimizerModelProxy | undefined\n const modelExecutions: ExternalOptimizerModelExecutionObservation[] = []\n const result = await runWithCleanup({\n label: 'DSPy RLM trace-analysis resources',\n run: async () => {\n modelProxy = await startExternalOptimizerModelProxy({\n call: options.call,\n callRef: options.callRef,\n recordExecution: (observation) => {\n modelExecutions.push(structuredClone(observation))\n options.recordExecution(observation)\n },\n model: options.model,\n budget: {\n maxCostUsd,\n maxRequests: resolveMaxModelRequests(options.maxModelRequests, request.limits),\n maxRequestBytes: maxModelRequestBytes,\n maxResponseBytes: maxModelResponseBytes,\n maxOutputTokensPerRequest: maxOutputTokens,\n maxReasoningTokensPerRequest: maxReasoningTokens,\n requestTimeoutMs: modelRequestTimeoutMs,\n pricing,\n },\n costLedger: request.costLedger,\n channel: 'analyst',\n phase: request.costPhase,\n actor: request.analystId,\n ...(request.costTags ? { tags: request.costTags } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n request.log?.('trace analyst engine started', {\n engine: 'dspy-rlm',\n model: options.model,\n tools: request.tools.map((tool) => tool.name),\n limits: request.limits,\n })\n const raw = await runExternalOptimizerProcess<unknown>({\n label: 'DSPy RLM trace analysis',\n tempPrefix: 'agent-eval-dspy-rlm-',\n module: BRIDGE_MODULE,\n input: {\n operation: 'analyze',\n question: request.question,\n instructions: request.instructions,\n modelProxy: {\n baseUrl: modelProxy.baseUrl,\n apiKey: modelProxy.apiKey,\n model: options.model,\n maxOutputTokens,\n },\n toolCallback: {\n url: callback.url,\n token: callback.token,\n timeoutMs: traceToolTimeoutMs,\n },\n toolSpecs: request.tools.map(({ name, description, parameters }) => ({\n name,\n description,\n parameters,\n })),\n controlAdapter,\n limits: {\n maxIterations: request.limits.maxIterations,\n maxLlmCalls: request.limits.maxLlmCalls,\n maxOutputChars: request.limits.maxOutputChars,\n },\n // Omitted entirely when the caller supplied none, so a request\n // without structured inputs sends the payload it always sent.\n ...(request.taskInputs ? { taskInputs: request.taskInputs } : {}),\n },\n ...(runner ? { runner } : {}),\n additionalArgs: ['--max-input-bytes', String(processLimits.maxInputBytes)],\n timeoutMs,\n ...(request.signal ? { signal: request.signal } : {}),\n })\n const parsed = parseBridgeOutput(raw, (index, reason) => {\n request.log?.('finding rejected: bridge row failed schema validation', {\n engine: 'dspy-rlm',\n index,\n reason,\n })\n })\n const successfulCompletions = modelProxy.successfulCompletions()\n const requestAttempts = modelProxy.requestAttempts()\n if (parsed.modelCalls !== successfulCompletions) {\n throw new Error(\n `DSPy RLM reported ${parsed.modelCalls} model calls, but the provider proxy recorded ${successfulCompletions}`,\n )\n }\n modelProxy.assertExecutionComplete()\n return {\n ...parsed,\n toolCalls: callback.calls(),\n runtime: {\n ...parsed.runtime,\n modelRequestAttempts: requestAttempts,\n modelSuccessfulCompletions: successfulCompletions,\n modelExecutions,\n },\n } satisfies TraceAnalysisEngineResult\n },\n cleanup: async () => {\n const results = await Promise.allSettled([\n ...(modelProxy ? [modelProxy.close()] : []),\n callback.close(),\n ])\n const errors = results.flatMap((entry) =>\n entry.status === 'rejected' ? [entry.reason] : [],\n )\n if (errors.length > 0) {\n throw new AggregateError(errors, 'DSPy RLM resource cleanup failed')\n }\n },\n })\n request.log?.('trace analyst engine completed', {\n engine: 'dspy-rlm',\n model_calls: result.modelCalls,\n model_request_attempts: result.runtime.modelRequestAttempts,\n tool_calls: result.toolCalls,\n findings: result.findings.length,\n })\n return result\n },\n }\n}\n\nfunction parseBridgeOutput(\n value: unknown,\n onRejectedFinding: (index: number, reason: string) => void,\n): Omit<TraceAnalysisEngineResult, 'toolCalls'> {\n if (!isRecord(value)) throw new Error('DSPy RLM bridge output must be an object')\n if (typeof value.answer !== 'string' || !value.answer.trim()) {\n throw new Error('DSPy RLM bridge returned no answer')\n }\n // Findings are model output: one malformed row is model noise, not a bridge\n // fault, and the rest of the paid investigation must survive it. The codec\n // is the same decoder the Python side runs, so a row this bridge accepts is\n // a row the optimizer could report, and vice versa.\n const decoded = decodeRawFindingArray(value.findings)\n if (decoded.topLevelError !== undefined) {\n throw new Error(`DSPy RLM bridge findings must be an array: ${decoded.topLevelError}`)\n }\n const findings = decoded.accepted\n const rejectedFindings = decoded.rejected.length\n for (const rejection of decoded.rejected) {\n onRejectedFinding(\n rejection.index,\n `${rejection.code}${rejection.path ? ` at ${rejection.path}` : ''}: ${rejection.message}`,\n )\n }\n if (!Array.isArray(value.trajectory)) {\n throw new Error('DSPy RLM bridge trajectory must be an array')\n }\n if (!Number.isSafeInteger(value.modelCalls) || (value.modelCalls as number) <= 0) {\n throw new Error('DSPy RLM bridge modelCalls must be a positive safe integer')\n }\n if (!isRecord(value.runtime)) {\n throw new Error('DSPy RLM bridge runtime must be an object')\n }\n return {\n answer: value.answer,\n findings,\n trajectory: value.trajectory,\n modelCalls: value.modelCalls as number,\n runtime: { ...value.runtime, rejectedFindings },\n }\n}\n\nfunction assertOptions(options: DspyRlmTraceEngineOptions): void {\n for (const [name, value] of [\n ['callRef', options.callRef],\n ['model', options.model],\n ] as const) {\n if (typeof value !== 'string' || !value.trim() || value !== value.trim()) {\n throw new TypeError(`DSPy RLM ${name} must be a trimmed non-empty string`)\n }\n }\n if (typeof options.call !== 'function') {\n throw new TypeError('DSPy RLM call must be a function')\n }\n if (typeof options.recordExecution !== 'function') {\n throw new TypeError('DSPy RLM recordExecution must be a function')\n }\n if (\n options.maxModelRequests !== undefined &&\n (!Number.isSafeInteger(options.maxModelRequests) || options.maxModelRequests <= 0)\n ) {\n throw new TypeError('DSPy RLM maxModelRequests must be a positive safe integer')\n }\n}\n\nfunction resolveMaxModelRequests(\n configured: number | undefined,\n limits: { maxIterations: number; maxLlmCalls: number },\n): number {\n if (configured !== undefined) return configured\n const derived = limits.maxIterations + limits.maxLlmCalls + 1\n if (!Number.isSafeInteger(derived) || derived <= 0) {\n throw new Error('DSPy RLM analysis limits produce an invalid model request limit')\n }\n return derived\n}\n\nfunction assertTimerDelay(value: number, field: string): void {\n if (!Number.isSafeInteger(value) || value <= 0 || value > MAX_TIMER_DELAY_MS) {\n throw new TypeError(`DSPy RLM ${field} must be between 1 and ${MAX_TIMER_DELAY_MS}`)\n }\n}\n\nfunction pricingForModel(model: string): CustomTokenPricing {\n const pricing = resolveModelPricing(model)\n if (!pricing) {\n throw new Error(\n `no pricing is configured for '${model}'; provide DspyRlmTraceEngineOptions.pricing`,\n )\n }\n return {\n inputUsdPerMillion: pricing.input * 1_000,\n outputUsdPerMillion: pricing.output * 1_000,\n }\n}\n\nfunction sanitizedRunner(\n runner: ExternalOptimizerRunnerCommand | undefined,\n): ExternalOptimizerRunnerCommand | undefined {\n if (!runner) return undefined\n return {\n ...(runner.command ? { command: runner.command } : {}),\n ...(runner.args ? { args: runner.args } : {}),\n ...(runner.env ? { env: removeCredentialEnvironment(runner.env) } : {}),\n ...(runner.limits ? { limits: { ...runner.limits } } : {}),\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n"],"mappings":";;;;;;;;;;;;;;AAmEA,SAAgB,sBAAsB,OAAqC;CACzE,MAAM,OAAO,YAAY,KAAK;CAC9B,IAAI,OAAO,SAAS,UAAU,OAAO;EAAE,UAAU,CAAC;EAAG,UAAU,CAAC;EAAG,eAAe;CAAK;CAEvF,MAAM,WAAgC,CAAC;CACvC,MAAM,WAAiC,CAAC;CACxC,KAAK,MAAM,CAAC,OAAO,QAAQ,KAAK,QAAQ,GAAG;EACzC,IAAI,SAAA,KAA2B;GAC7B,SAAS,KAAK;IACZ;IACA,MAAM;IACN,MAAM;IACN,SAAS;GACX,CAAC;GACD;EACF;EACA,MAAM,UAAU,UAAU,KAAK,KAAK;EACpC,IAAI,aAAa,SAAS,SAAS,KAAK,QAAQ,OAAO;OAClD,SAAS,KAAK,QAAQ,SAAS;CACtC;CACA,OAAO;EAAE;EAAU;CAAS;AAC9B;AAEA,SAAS,UACP,KACA,OACoE;CACpE,IAAI,QAAQ,QAAQ,OAAO,QAAQ,YAAY,MAAM,QAAQ,GAAG,GAC9D,OAAO,EACL,WAAW;EACT;EACA,MAAM;EACN,MAAM;EACN,SAAS,2CAA2C,SAAS,GAAG;CAClE,EACF;CAEF,MAAM,SAAS,wBAAwB,UAAU,GAAG;CACpD,IAAI,CAAC,OAAO,SAAS;EACnB,MAAM,QAAQ,OAAO,MAAM,OAAO;EAClC,MAAM,QAAQ,OAAO,QAAQ,CAAC,EAAA,CAAG,KAAK,GAAG;EAOzC,OAAO,EACL,WAAW;GAAE;GAAO;GAAM,MAJ1B,SAAS,aAAa,oBAA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erHandle } from "./cost-ledger-DbQdN3nO.js";
2
2
  import { C as BoundedTraceAnalysisStoreOptions, O as TraceAnalysisStore, p as EvidenceRef } from "./types-6VEehmEg.js";
3
- import "./types-Duc6xOoW.js";
3
+ import "./types-ZUy5HGY5.js";
4
4
  import "./analyze-runs-Q74o4Hfj.js";
5
5
  import { z } from "zod";
6
6
  //#region src/eval-tools.d.ts
@@ -168,4 +168,4 @@ interface TraceAnalysisEngine {
168
168
  declare function resolveTraceAnalystLimits(limits: Partial<TraceAnalystLimits> | undefined): TraceAnalystLimits;
169
169
  //#endregion
170
170
  export { buildTraceAnalysisToolDescriptors as _, TraceAnalystLimits as a, RawAnalystEvidence as c, evidenceRefsFromRawFinding as d, parseRawFinding as f, UNTRUSTED_TRACE_TEXT as g, TraceAnalysisToolDescriptor as h, TraceAnalysisEngineResult as i, RawAnalystFinding as l, TRACE_ANALYST_TOOL_NAMESPACE as m, TraceAnalysisEngine as n, resolveTraceAnalystLimits as o, BuildTraceAnalysisToolsOptions as p, TraceAnalysisEngineRequest as r, RAW_FINDING_SCHEMA_PROMPT as s, DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS as t, RawAnalystFindingSchema as u, traceAnalystFunctionGroup as v };
171
- //# sourceMappingURL=engine-CaSqEVlL.d.ts.map
171
+ //# sourceMappingURL=engine-F_PvwesR.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine-CaSqEVlL.d.ts","names":[],"sources":["../src/eval-tools.ts","../src/trace-analyst/tools.ts","../src/analyst/finding-signature.ts","../src/analyst/engine.ts"],"mappings":";;;;;;;UA4BiB;EACf;EACA;EACA,YAAY;EACZ,UAAU,eAAe;IAAQ,SAAS;QAAkB;;;;cClBjD;;;;;;cAOA;UAGI,uCAAuC;EACtD,OAAO;;UAGQ,oCAAoC;EACnD,kBAAkB;;EAElB;;EAEA;;;iBAMc,kCACd,SAAS,iCACR;iBAyIa,0BAA0B,SAAS;EACjD;EACA;EACA;EACA;EACA,WAAW;;;;cC3KP,0BAAwB,EAAA;;;GAKnB,EAAA,KAAA;KAEC,qBAAqB,EAAE,aAAa;cAiBnC,yBAAuB,EAAA;;;;;;;;;;;;;;;;;GAKzB,EAAA,KAAA;KAEC,oBAAoB,EAAE,aAAa;;;;;;cAOlC;;iBAYG,2BAA2B,SAAS,oBAAoB;iBAQxD,gBACd,cACA,OAAO,aAAa,SAAS,mCAC5B;;;;UCpEc;;EAEf;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;cAwBW;UAEI;EACf;EACA;EACA;EACA,gBAAgB;;;;;;;;;;;EAWhB,aAAa,SAAS;EACtB,QAAQ;EACR,YAAY;EACZ;EACA,WAAW;EACX,SAAS;EACT,OAAO,iBAAiB,SAAS;;;UAIlB;EACf;EACA,UAAU;;EAEV;;;;;EAKA;;EAEA;EACA,SAAS;;;;;;;;;UAUM;WACN;WACA;WACA;;WAEA;;;;;;;;WAQA,iBAAiB,SAAS;EACnC,QAAQ,SAAS,6BAA6B,QAAQ;;iBAGxC,0BACd,QAAQ,QAAQ,kCACf"}
1
+ {"version":3,"file":"engine-F_PvwesR.d.ts","names":[],"sources":["../src/eval-tools.ts","../src/trace-analyst/tools.ts","../src/analyst/finding-signature.ts","../src/analyst/engine.ts"],"mappings":";;;;;;;UA4BiB;EACf;EACA;EACA,YAAY;EACZ,UAAU,eAAe;IAAQ,SAAS;QAAkB;;;;cClBjD;;;;;;cAOA;UAGI,uCAAuC;EACtD,OAAO;;UAGQ,oCAAoC;EACnD,kBAAkB;;EAElB;;EAEA;;;iBAMc,kCACd,SAAS,iCACR;iBAyIa,0BAA0B,SAAS;EACjD;EACA;EACA;EACA;EACA,WAAW;;;;cC3KP,0BAAwB,EAAA;;;GAKnB,EAAA,KAAA;KAEC,qBAAqB,EAAE,aAAa;cAiBnC,yBAAuB,EAAA;;;;;;;;;;;;;;;;;GAKzB,EAAA,KAAA;KAEC,oBAAoB,EAAE,aAAa;;;;;;cAOlC;;iBAYG,2BAA2B,SAAS,oBAAoB;iBAQxD,gBACd,cACA,OAAO,aAAa,SAAS,mCAC5B;;;;UCpEc;;EAEf;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;cAwBW;UAEI;EACf;EACA;EACA;EACA,gBAAgB;;;;;;;;;;;EAWhB,aAAa,SAAS;EACtB,QAAQ;EACR,YAAY;EACZ;EACA,WAAW;EACX,SAAS;EACT,OAAO,iBAAiB,SAAS;;;UAIlB;EACf;EACA,UAAU;;EAEV;;;;;EAKA;;EAEA;EACA,SAAS;;;;;;;;;UAUM;WACN;WACA;WACA;;WAEA;;;;;;;;WAQA,iBAAiB,SAAS;EACnC,QAAQ,SAAS,6BAA6B,QAAQ;;iBAGxC,0BACd,QAAQ,QAAQ,kCACf"}
@@ -1,6 +1,6 @@
1
1
  import { a as CostChannel, c as CostLedgerHandle, g as CostReceiptInput, m as CostReceipt, x as MaximumCharge } from "./cost-ledger-DbQdN3nO.js";
2
2
  import { i as AnalystFinding, n as AnalystContext, t as Analyst } from "./types-6VEehmEg.js";
3
- import { R as Scenario, S as JudgeConfig, w as JudgeScore } from "./types-Duc6xOoW.js";
3
+ import { R as Scenario, S as JudgeConfig, w as JudgeScore } from "./types-ZUy5HGY5.js";
4
4
  //#region src/evaluation.d.ts
5
5
  export interface EvaluationResult<T> {
6
6
  value: T;
@@ -1,6 +1,6 @@
1
1
  import { c as ValidationError, r as CaptureIntegrityError } from "../errors-DEE6u6ot.js";
2
2
  import { n as bonferroni, r as holm, t as benjaminiHochberg } from "../multiplicity-DIWHvysC.js";
3
- import { $ as paretoSignificanceGate, A as PairArmsOptions, At as FinalEvidenceReservation, B as PowerPreflight, C as hashJson, Dt as FinalEvidenceMeasurement, E as verifyManifest, Et as FinalEvidenceLedger, Ft as EProcessStep, Gt as pairedRiskDifference, H as powerPreflight, It as eProcess, K as EvidenceVector, Kt as pairedRiskDifferenceExact, L as comparePairedArms, Mt as EProcess, N as PairedArmRow, Nt as EProcessOptions, O as MatchedPair, Ot as FinalEvidenceOutcome, Pt as EProcessState, Q as paretoPolicy, R as pairArms, S as evaluateHypothesis, T as signManifest, Tt as FinalEvidenceError, Ut as mcnemar, V as PowerPreflightOptions, X as PromotionPolicy, Yt as wilson, Z as buildEvidenceVector, _ as sequentialPairedGate, _t as verifyEvidenceReceipt, at as createCampaignEvidenceReceipt, b as SignedManifest, c as pairHoldout, ct as EVIDENCE_RECEIPT_VERSION, d as SequentialDecision, dt as EvidenceBinding, f as SequentialObservation, ft as EvidenceReceipt, g as sequentialDecide, gt as isIndependentEvidence, ht as createEvidenceReceipt, i as PairedHoldout, it as CampaignEvidenceContext, j as PairArmsResult, jt as openFinalEvidenceLedger, kt as FinalEvidenceRecord, lt as EvidenceAuthority, m as SequentialPairedGateOptions, mt as INDEPENDENT_EVIDENCE_AUTHORITY_KINDS, n as HeldoutSignificance, ot as CreateEvidenceReceiptInput, p as SequentialPairedGate, pt as EvidenceReceiptVerification, qt as pairedRiskDifferenceScore, r as HeldoutSignificanceOptions, s as heldoutSignificance, st as EVIDENCE_AUTHORITY_KINDS, ut as EvidenceAuthorityKind, v as HypothesisManifest, w as manifestContentDigest, wt as FinalEvidenceConflictError, x as SignedManifestAlgo, y as HypothesisResult, z as pairRunRecords, zt as ProportionInterval } from "../statistical-heldout-CJYAO-4a.js";
3
+ import { $ as paretoSignificanceGate, A as PairArmsOptions, At as FinalEvidenceReservation, B as PowerPreflight, C as hashJson, Dt as FinalEvidenceMeasurement, E as verifyManifest, Et as FinalEvidenceLedger, Ft as EProcessStep, Gt as pairedRiskDifference, H as powerPreflight, It as eProcess, K as EvidenceVector, Kt as pairedRiskDifferenceExact, L as comparePairedArms, Mt as EProcess, N as PairedArmRow, Nt as EProcessOptions, O as MatchedPair, Ot as FinalEvidenceOutcome, Pt as EProcessState, Q as paretoPolicy, R as pairArms, S as evaluateHypothesis, T as signManifest, Tt as FinalEvidenceError, Ut as mcnemar, V as PowerPreflightOptions, X as PromotionPolicy, Yt as wilson, Z as buildEvidenceVector, _ as sequentialPairedGate, _t as verifyEvidenceReceipt, at as createCampaignEvidenceReceipt, b as SignedManifest, c as pairHoldout, ct as EVIDENCE_RECEIPT_VERSION, d as SequentialDecision, dt as EvidenceBinding, f as SequentialObservation, ft as EvidenceReceipt, g as sequentialDecide, gt as isIndependentEvidence, ht as createEvidenceReceipt, i as PairedHoldout, it as CampaignEvidenceContext, j as PairArmsResult, jt as openFinalEvidenceLedger, kt as FinalEvidenceRecord, lt as EvidenceAuthority, m as SequentialPairedGateOptions, mt as INDEPENDENT_EVIDENCE_AUTHORITY_KINDS, n as HeldoutSignificance, ot as CreateEvidenceReceiptInput, p as SequentialPairedGate, pt as EvidenceReceiptVerification, qt as pairedRiskDifferenceScore, r as HeldoutSignificanceOptions, s as heldoutSignificance, st as EVIDENCE_AUTHORITY_KINDS, ut as EvidenceAuthorityKind, v as HypothesisManifest, w as manifestContentDigest, wt as FinalEvidenceConflictError, x as SignedManifestAlgo, y as HypothesisResult, z as pairRunRecords, zt as ProportionInterval } from "../statistical-heldout-Dq3pnmxd.js";
4
4
  import { c as BOOTSTRAP_GATE_MIN_N, d as PairedBootstrapResult, h as pairedBootstrap, u as PairedBootstrapOptions } from "../paired-promotion-decision-DPKz8ZnF.js";
5
5
  import { a as requiredPairedSampleSize, i as pairedMde, n as mcnemarPower, o as requiredSampleSize, r as mcnemarRequiredN, t as mulberry32 } from "../random-DGEyr3zG.js";
6
6
  import { at as summarizeEvaluationUnits, it as defineEvaluationClaim, nt as EvaluationClaim, rt as EvaluationUnitSummary } from "../search-ledger-types-p2xKfiDJ.js";
@@ -3,12 +3,12 @@ import { T as RunPaidCallInput, c as CostLedgerHandle, f as CostLedgerSummary, m
3
3
  import { a as RunRecord, c as RunSplitTag } from "./run-record-DF-fuu31.js";
4
4
  import { O as TraceAnalysisStore, _ as ProposalFinding, f as AnalystUsageReceipt, i as AnalystFinding, l as AnalystRunResult } from "./types-6VEehmEg.js";
5
5
  import { M as LlmCallMetadata, ft as ServedModelPolicy, rt as RawProviderSink, x as ChatClient } from "./types-DLxe96rp.js";
6
- import { Et as FinalEvidenceLedger, P as PairedArmsComparison, ft as EvidenceReceipt, it as CampaignEvidenceContext, kt as FinalEvidenceRecord } from "./statistical-heldout-CJYAO-4a.js";
6
+ import { Et as FinalEvidenceLedger, P as PairedArmsComparison, ft as EvidenceReceipt, it as CampaignEvidenceContext, kt as FinalEvidenceRecord } from "./statistical-heldout-Dq3pnmxd.js";
7
7
  import { a as PairedPromotionDecision, d as PairedBootstrapResult } from "./paired-promotion-decision-DPKz8ZnF.js";
8
8
  import { E as SearchExecutionIdentity, G as SearchSplit, V as SearchProposer, a as SearchAttemptAccounting, i as SearchArtifactRef, j as SearchModelIdentity, nt as EvaluationClaim, rt as EvaluationUnitSummary, tt as SearchUnknown, z as SearchOperationRecordedEvent } from "./search-ledger-types-p2xKfiDJ.js";
9
9
  import { r as LedgerHash } from "./canonical-CFpojCN5.js";
10
- import { A as LabeledScenarioWrite, C as JudgeDimension, D as LabeledScenarioSampleArgs, E as LabeledScenarioRecord, H as SurfaceProposer, N as ParetoParent, O as LabeledScenarioSource, R as Scenario, S as JudgeConfig, T as LabelTrust, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, i as CampaignCostMeter, j as MutableSurface, k as LabeledScenarioStore, l as CodeSurface, o as CampaignScenarioIdentity, p as Gate, r as CampaignCellResult, u as ComponentSurface, v as GateResult, y as GenerationCandidate } from "./types-Duc6xOoW.js";
11
- import { Dt as SearchHistoryAdmissionOptions, L as SearchPolicy, Mt as SearchHistoryReceipt, Yt as CampaignStorage, bt as SearchRunIdentity, gt as SearchLedgerBinding, ht as RegisterSearchNodeInput, i as SearchCellResult, kt as SearchHistoryCoverage, vt as SearchRecorder } from "./search-kernel-C5jua_UB.js";
10
+ import { A as LabeledScenarioWrite, C as JudgeDimension, D as LabeledScenarioSampleArgs, E as LabeledScenarioRecord, H as SurfaceProposer, N as ParetoParent, O as LabeledScenarioSource, R as Scenario, S as JudgeConfig, T as LabelTrust, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, i as CampaignCostMeter, j as MutableSurface, k as LabeledScenarioStore, l as CodeSurface, o as CampaignScenarioIdentity, p as Gate, r as CampaignCellResult, u as ComponentSurface, v as GateResult, y as GenerationCandidate } from "./types-ZUy5HGY5.js";
11
+ import { Dt as SearchHistoryAdmissionOptions, L as SearchPolicy, Mt as SearchHistoryReceipt, Yt as CampaignStorage, bt as SearchRunIdentity, gt as SearchLedgerBinding, ht as RegisterSearchNodeInput, i as SearchCellResult, kt as SearchHistoryCoverage, vt as SearchRecorder } from "./search-kernel-DNpsHb8P.js";
12
12
  import { B as ExternalOptimizerModelBudget, E as AnalystIssueExpectation, F as ExternalOptimizerCallbackLimits, J as ExternalOptimizerWireCounts, K as ExternalOptimizerResumeMode, R as ExternalOptimizerEvaluationObservation, V as ExternalOptimizerModelCall, X as ExternalTextEvaluationRequest, Y as ExternalTextCandidate, m as AnalystBenchmarkLabelState, q as ExternalOptimizerRunnerCommand, t as AgentProfile$1, u as AnalystBenchmarkCase } from "./agent-profile-EpO0HURy.js";
13
13
  import { r as DatasetScenario, t as Dataset } from "./dataset-DQqhOCPt.js";
14
14
  import { a as CheckerIdentity, n as VerdictCertification, t as DefaultVerdict, x as VerificationStrategySource } from "./verdict-E4eRNf7-.js";
@@ -236,7 +236,7 @@ interface RunCampaignOptions<TScenario extends Scenario, TArtifact> {
236
236
  expectUsage?: 'assert' | 'warn' | 'off';
237
237
  /** Test seam — override the wall clock for deterministic tests. */
238
238
  now?: () => Date;
239
- /** Test seam — override per-cell trace writer factory. */
239
+ /** Override the trace writer. The supplied directory belongs to this attempt. */
240
240
  buildTraceWriter?: (cellId: string, dir: string) => CampaignTraceWriter;
241
241
  /** Storage backend for run/cell dirs, the resumability cache, artifacts,
242
242
  * and trace spans. Default: the Node filesystem (`fsCampaignStorage`).
@@ -261,7 +261,7 @@ interface RunCampaignOptions<TScenario extends Scenario, TArtifact> {
261
261
  generation?: number;
262
262
  }) => string | undefined;
263
263
  }
264
- /** Durable `<cell>/failure-receipt.json` written before a failed cell can
264
+ /** Durable `<attempt>/failure-receipt.json` written before a failed cell can
265
265
  * trigger campaign-wide cancellation. The cell records dispatch measurements;
266
266
  * `cost` covers every settled agent and judge call attributed to this exact run
267
267
  * attempt. */
@@ -285,11 +285,9 @@ interface CampaignCellFailureReceipt<TArtifact = unknown> {
285
285
  * Bounded in-run retry of failed cells. Every attempt dispatches the same
286
286
  * slot and charges the shared cost ledger, so the final cell's `costUsd`,
287
287
  * `tokenUsage`, and `costCallIds` cover all attempts. Each retried attempt
288
- * keeps its failure receipt at `<cell>/failure-receipt.attempt-<n>.json`; a
289
- * final failed attempt keeps the usual `<cell>/failure-receipt.json`. The
290
- * final cell records the retry count as `retryAttempts`. Artifacts and trace
291
- * spans written by a later attempt replace those of the retried attempt; the
292
- * per-attempt failure receipts are the durable evidence.
288
+ * keeps its artifacts, trace, result, and failure receipt in a separate
289
+ * execution directory, including attempts resumed in a later invocation.
290
+ * The final cell records the retry count as `retryAttempts`.
293
291
  */
294
292
  interface CampaignCellRetryPolicy {
295
293
  /** Total attempts per cell, including the first. A positive safe integer. */
@@ -3392,4 +3390,4 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
3392
3390
  declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
3393
3391
  //#endregion
3394
3392
  export { ScoreboardRow as $, RunImprovementLoopOptions as $i, TraceAnalystScenario as $n, GepaOptimizationRecipe as $r, importExternalEvaluations as $t, ScenarioSignal as A, CampaignCoverage as Aa, GepaCandidatePopulationSummary as Ai, CrossSurfaceComponentEvidence as An, DEFAULT_RED_TEAM_CORPUS as Ar, RequirementCheck as At, FinalizedProfileMatrixResult as B, ReferenceEquivalenceJudgeInput as Bi, CrossSurfaceInteractionTask as Bn, CanaryKind as Br, FsLabeledScenarioStoreOptions as Bt, SingleRunLockOptions as C, CacheRead as Ca, compareOptimizationMethods as Ci, CrossSurfaceBootstrapPolicy as Cn, campaignMeanComposite as Cr, extractProducedState as Ct, searchProposalExecution as D, cellCachePath as Da, costFromLedgerSummary as Di, CrossSurfaceCandidateOutcome as Dn, DefaultProductionGateOptions as Dr, LlmCorrectnessCheckerOpts as Dt, searchModelIdentity as E, buildCellSchedule as Ea, combineComparisonCosts as Ei, CrossSurfaceCandidateEvidence as En, DefaultProductionGateCheck as Er, CorrectnessChecker as Et, RetainedDispatchOptions as F, campaignSplitDigest as Fa, ExternalOptimizerObservationSummary as Fi, CrossSurfaceIneligibilityReason as Fn, redTeamDataset as Fr, verifyCompletion as Ft, RunProfileMatrixSegmentOptions as G, runReferenceEquivalenceJudge as Gi, CrossSurfacePairwiseEntry as Gn, SkillOptOptimizationMethodConfig as Gr, ScoredRollout as Gt, ProfileMatrixPlan as H, ReferenceEquivalenceJudgeResult as Hi, CrossSurfacePairCompatibility as Hn, CanaryReport as Hr, RolloutArgumentDiff as Ht, RetainedDispatchOutcome as I, campaignSplitDigestFromIdentities as Ia, ExternalOptimizerSubmittedCandidate as Ii, CrossSurfaceInteractionAwareSelection as In, redTeamReport as Ir, scopedOptimizationMethod as It, runProfileMatrixSegment as J, llmJudge as Ji, CrossSurfaceSelectionPolicy as Jn, skillOptOptimizationMethod as Jr, rolloutArgumentDiff as Jt, createProfileMatrixPlan as K, LlmJudgeDimension as Ki, CrossSurfaceRankedSingle as Kn, SkillOptRunnerCommand as Kr, UngroundedLiteralReport as Kt, createRetainedDispatch as L, readExternalOptimizerObservationArtifact as Li, CrossSurfaceInteractionEffect as Ln, scoreRedTeamOutput as Lr, sequentialOptimizationMethod as Lt, selectDiscriminative as M, assertCampaignSplitIdentity as Ma, readGepaCandidatePopulationArtifact as Mi, CrossSurfaceDistribution as Mn, RedTeamCategory as Mr, TaskGold as Mt, resolveRunDir as N, campaignCoverage as Na, ExternalOptimizerExecutionSummary as Ni, CrossSurfaceEligibility as Nn, RedTeamFinding as Nr, completionVerdict as Nt, searchReceiptAccounting as O, FinalEvidencePolicy as Oa, GepaCandidatePopulationArtifact as Oi, CrossSurfaceCandidateSummary as On, DefaultProductionRewardHackingOptions as Or, ProducedProposal as Ot, tangleTracesRoot as P, campaignScenarioIdentity as Pa, ExternalOptimizerObservationArtifact as Pi, CrossSurfaceEvidenceBreakdown as Pn, RedTeamReport as Pr, createLlmCorrectnessChecker as Pt, ScoreboardRenderOptions as Q, transientDispatchFailure as Qi, TraceAnalystArtifact as Qn, GepaOptimizationMethodConfig as Qr, externalSurface as Qt, CreateProfileMatrixPlanOptions as R, REFERENCE_EQUIVALENCE_INPUT_LIMITS as Ri, CrossSurfaceInteractionPath as Rn, CanaryAlert as Rr, neutralizeText as Rt, SingleRunLock as S, CacheIssueReason as Sa, OptimizationTokenUsage as Si, CrossSurfaceBestSingleSelection as Sn, campaignBreakdown as Sr, ToolCallEventLike as St, campaignCellSearchResult as T, CellScheduleSlot as Ta, ComparisonCost as Ti, CrossSurfaceCandidateComparison as Tn, heldOutGate as Tr, CompletionVerdict as Tt, ProfileMatrixRow as U, ReferenceEquivalenceScenario as Ui, CrossSurfacePairEvidence as Un, runCanaries as Ur, RolloutArgumentDiffOptions as Ut, ProfileMatrixCoverage as V, ReferenceEquivalenceJudgeOptions as Vi, CrossSurfaceNaiveStackSelection as Vn, CanaryOptions as Vr, LabeledScenarioStoreError as Vt, ProfileMatrixSegmentResult as W, createReferenceEquivalenceJudge as Wi, CrossSurfacePairIncompatibilityReason as Wn, composeGate as Wr, RolloutCall as Wt, PlaybackDriver as X, isTransientTransportFailure as Xi, CrossSurfaceTaskRow as Xn, GepaEngineOptions as Xr, GepaEvaluationImport as Xt, PlaybackContext as Y, TransientFailureOptions as Yi, CrossSurfaceSelections as Yn, GepaAdaptiveEngineRun as Yr, ExternalSearchOptimizer as Yt, PlaybackStep as Z, quotaExhaustedUntil as Zi, BuildTraceAnalystSurfaceDispatchOptions as Zn, GepaEngineRun as Zr, GepaPopulationImport as Zt, componentSurfaceIdentityMaterial as _, runCampaign as _a, OptimizationMethodProvenance as _i, analyzeCrossSurfaceInteractions as _n, provenanceRecordPath as _r, assertRealBackend as _t, WorktreeAdapterError as a, runOptimization as aa, ExternalTextOptimizationMethodConfig as ai, EvalFixture as an, LoopProvenanceArgsFromResult as ar, scoreUserStory as at, surfaceDispatchRef as b, PlanCampaignRunOptions as ba, OptimizationMethodScore as bi, CrossSurfaceAdditionRejectionReason as bn, CampaignBreakdown as br, ProposalEventLike as bt, verifyCodeSurface as c, SearchLedgerIntegrityError as ca, ExternalOptimizationExample as ci, EvalFixtureRunPlan as cn, LoopProvenanceEvidence as cr, ProfileDispatchFn as ct, PhoenixEvaluationResultLike as d, openAutoPr as da, CompareOptimizationMethodsOptions as di, LoadEvalFixtureScenariosOptions as dn, buildLoopProvenanceRecord as dr, RunProfileMatrixOptions as dt, RunImprovementLoopResult as ea, GepaRunnerCommand as ei, importGepaPopulation as en, buildTraceAnalystSurfaceDispatch as er, ScoreboardSummary as et, PhoenixEvaluatorLike as f, RunEvalOptions as fa, OptimizationMethod as fi, PlanEvalFixtureRunOptions as fn, campaignMeasurementDigest as fr, RunProfileMatrixResult as ft, codeSurfaceIdentityMaterial as g, RunCampaignOptions as ga, OptimizationMethodPairwise as gi, planEvalFixtureRun as gn, loopProvenanceSpans as gr, BackendIntegrityReport as gt, assertCodeSurfaceIdentity as h, CampaignCellRetryPolicy as ha, OptimizationMethodInput as hi, loadEvalFixtureScenarios as hn, loopProvenanceArgsFromResult as hr, BackendIntegrityError as ht, WorktreeAdapter as i, RunOptimizationResult as ia, externalTextOptimizationMethod as ii, neutralizationGate as in, EmitLoopProvenanceResult as ir, renderScoreboardMarkdown as it, scoreDiscrimination as j, assertCampaignDesign as ja, GepaCandidateSelectionScore as ji, CrossSurfaceCompositionStep as jn, RedTeamCase as jr, SatisfiedBy as jt, DiscriminationScore as k, FinalEvidenceUse as ka, GepaCandidatePopulationCandidate as ki, CrossSurfaceComponent as kn, defaultProductionGate as kr, ProducedState as kt, AutoevalsScoreLike as l, OpenAutoPrOptions as la, ExternalTextEvaluationResponse as li, EvalFixtureScenario as ln, LoopProvenanceOptimizationMethod as lr, ProfileMatrixError as lt, phoenixEvaluatorJudge as m, CampaignCellFailureReceipt as ma, OptimizationMethodComposition as mi, loadEvalFixture as mn, emitLoopProvenance as mr, runProfileMatrix as mt, GitWorktreeAdapterOptions as n, PremeasuredOptimizationBaseline as na, OpenAICompatibleOptimizerModel as ni, recordSkillOptSearch as nn, BuildLoopProvenanceArgs as nr, UserStoryVerdict as nt, gitWorktreeAdapter as o, SearchLedgerConflictError as oa, ExternalTextOptimizerContext as oi, EvalFixtureFile as on, LoopProvenanceBackend as or, scoreboardSummary as ot, autoevalsScorerJudge as p, runEval as pa, OptimizationMethodComparison as pi, discoverEvalFixtures as pn, canonicalDigest as pr, ScenarioRollup as pt, finalizeProfileMatrix as q, LlmJudgeOptions as qi, CrossSurfaceRelativeCost as qn, SkillOptTrainerConfig as qr, classifyUngroundedLiterals as qt, Worktree as r, RunOptimizationOptions as ra, OptimizerModelBudget as ri, NeutralizationGateOptions as rn, EmitLoopProvenanceArgs as rr, makePlaybackDispatch as rt, resolveWorktreePath as s, SearchLedgerError as sa, ExternalTextOptimizerResult as si, EvalFixtureLoadOptions as sn, LoopProvenanceCandidate as sr, userStoryScoreboard as st, CodeSurfaceVerification as t, runImprovementLoop as ta, gepaOptimizationMethod as ti, recordGepaSearch as tn, traceAnalystQualityJudge as tr, UserStory as tt, AutoevalsScorerLike as u, OpenAutoPrResult as ua, decodeExternalTextCandidate as ui, EvalFixtureValidationMode as un, LoopProvenanceRecord as ur, ProfileSummary as ut, renderSurfaceDiff as v, CampaignRunPlan as va, OptimizationMethodResult as vi, AnalyzeCrossSurfaceInteractionsInput as vn, provenanceSpansPath as vr, summarizeBackendIntegrity as vt, acquireSingleRunLock as w, readCachedCell as wa, optimizationTokenUsageFromSummary as wi, CrossSurfaceCandidate as wn, HeldOutGateOptions as wr, CompletionRequirement as wt, surfaceHash as x, planCampaignRun as xa, OptimizationPackageSource as xi, CrossSurfaceAttemptCompleteness as xn, CampaignComparisonUnits as xr, RuntimeEventLike as xt, surfaceContentHash as y, CampaignRunPlanCell as ya, OptimizationMethodRunOptions as yi, CrossSurfaceAdditionDecision as yn, verifyLoopProvenanceRecord as yr, ArtifactEventLike as yt, FinalizeProfileMatrixOptions as z, REFERENCE_EQUIVALENCE_JUDGE_VERSION as zi, CrossSurfaceInteractionReport as zn, CanaryEvaluation as zr, FsLabeledScenarioStore as zt };
3395
- //# sourceMappingURL=index-Ce2HACcP.d.ts.map
3393
+ //# sourceMappingURL=index-B8n12TR2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-B8n12TR2.d.ts","names":["_$__external_optimizer_process0.ExternalTextEvaluationRequest","AgentProfile","AgentProfile"],"sources":["../src/campaign/coverage.ts","../src/campaign/final-evidence.ts","../src/campaign/cell-schedule.ts","../src/campaign/cell-cache.ts","../src/campaign/plan-campaign-run.ts","../src/campaign/run-campaign.ts","../src/campaign/presets/run-eval.ts","../src/campaign/auto-pr.ts","../src/campaign/search-ledger-errors.ts","../src/campaign/presets/run-optimization.ts","../src/campaign/presets/run-improvement-loop.ts","../src/campaign/transient-failure.ts","../src/llm-judge.ts","../src/reference-equivalence-judge.ts","../src/campaign/external-optimizer-observations.ts","../src/campaign/gepa-candidate-population.ts","../src/campaign/optimization-cost.ts","../src/campaign/presets/compare-optimization-methods.ts","../src/campaign/external-text-evaluation.ts","../src/campaign/external-text-optimization-contract.ts","../src/campaign/external-text-optimization.ts","../src/campaign/optimizer-model.ts","../src/campaign/gepa-optimization-method.ts","../src/campaign/skillopt-optimization-method.ts","../src/campaign/gates/compose.ts","../src/canary.ts","../src/red-team.ts","../src/campaign/gates/default-production-gate.ts","../src/campaign/gates/heldout-gate.ts","../src/campaign/score-utils.ts","../src/campaign/provenance.ts","../src/campaign/analyst-surface.ts","../src/campaign/cross-surface-types.ts","../src/campaign/cross-surface-interaction.ts","../src/campaign/fixtures.ts","../src/campaign/gates/neutralization-gate.ts","../src/campaign/gepa-search-import.ts","../src/campaign/grounded-reflection.ts","../src/campaign/labeled-store/fs-adapter.ts","../src/campaign/neutralize.ts","../src/campaign/optimization-method-composition.ts","../src/artifact-validator.ts","../src/completion-verifier.ts","../src/produced-state.ts","../src/integrity/backend-integrity.ts","../src/campaign/presets/run-profile-matrix.ts","../src/campaign/presets/playback.ts","../src/campaign/presets/segmented-profile-matrix.ts","../src/campaign/retained-dispatch.ts","../src/campaign/run-dir.ts","../src/campaign/scenario-selection.ts","../src/campaign/search-campaign-cell.ts","../src/campaign/single-run-lock.ts","../src/campaign/surface-identity.ts","../src/campaign/upstream-evaluators.ts","../src/campaign/worktree/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;UAQiB;EACf;EACA;EACA;EACA,iBAAiB;IAAQ;IAAgB;;;;iBAI3B,qBAAqB,kBAAkB,UACrD,oBAAoB,aACpB;;iBA2Bc,yBAAyB,kBAAkB,UACzD,UAAU,YACT,2BAA2B,KAAK;;iBAUnB,kCACd,oBAAoB,4BACpB;;iBAgBc,oBAAoB,kBAAkB,UACpD,oBAAoB,aACpB;;iBAOc,4BACd,oBAAoB,4BACpB,cACA;;iBAQc,iBAAiB,WAAW,kBAAkB,UAC5D,gBAAgB,mBAAmB,cACnC,oBAAoB,aACpB,cACA,6BACC;;;;UC/Ec;EACf,QAAQ;EACR;EACA,iBAAiB;;UAGF;EACf,OAAO;EACP,QAAQ;;;;iBCnBM,kBAAkB,kBAAkB,UAClD,WAAW,aACX,cACA,eACC;EAAQ,UAAU;EAAW;EAAa;EAAgB;;KA4BjD,iBAAiB,kBAAkB,YAAY,kBAClD,kBAAkB;iBAoBX,cAAc,gBAAgB;;;KCqDlC;KASA,UAAU;EAChB;EAAe,MAAM,mBAAmB;;EACxC;EAAgB,QAAQ;;iBAEd,eAAe,WAAW;EACxC,SAAS;EACT;EACA;EACA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kB,QAAQ;;EAEvD,QAAQ,UAAU,WAAW;;;cAIlB,6BAA6B;WAG7B;EAFX,YACE,iBACS;;UAOI;;EAEf;;EAEA;;EAEA;;;;EAIA,MAAM;;UAobS;;EAEf;;EAEA;;EAEA;;;EAGA,YAAY;;;;;iBAoJE,mBAAmB,MAAM,4BAA4B;;;;iBAgGrD,kBACd,SAAS,aACT,uBACC;;;iBAOa,oBAAoB,SAAS,aAAa"}
@@ -4,8 +4,8 @@ import { R as LlmThinkingMode, x as ChatClient } from "./types-DLxe96rp.js";
4
4
  import { F as ExternalOptimizerCallbackLimits, V as ExternalOptimizerModelCall, W as ExternalOptimizerModelExecutionObservation, q as ExternalOptimizerRunnerCommand } from "./agent-profile-EpO0HURy.js";
5
5
  import { o as Severity } from "./multi-layer-verifier-BUaQ4C17.js";
6
6
  import { l as ExactCapableAnalyst } from "./exact-types-BBMMYk3g.js";
7
- import { i as TraceAnalystDefinition } from "./default-registry-CxEBVA6W.js";
8
- import { n as TraceAnalysisEngine } from "./engine-CaSqEVlL.js";
7
+ import { i as TraceAnalystDefinition } from "./default-registry-BHEfZHQd.js";
8
+ import { n as TraceAnalysisEngine } from "./engine-F_PvwesR.js";
9
9
  import { C as SupervisorRunSources, w as SupervisorRunTree } from "./types-v6nRcIqg.js";
10
10
  //#region src/semantic-concept-judge.d.ts
11
11
  /**
@@ -476,4 +476,4 @@ declare const KNOWLEDGE_POISONING_KIND_SPEC: TraceAnalystDefinition;
476
476
  declare const DEFAULT_TRACE_ANALYST_KINDS: readonly TraceAnalystDefinition[];
477
477
  //#endregion
478
478
  export { SemanticConceptJudgeInput as A, DspyRlmTraceEngineOptions as C, ConceptFinding as D, createChatTraceEngine as E, SemanticConceptJudgeResult as M, runSemanticConceptJudge as N, ConceptSpec as O, renderFindingSubject as S, ChatTraceEngineOptions as T, FindingSubject as _, FAILURE_MODE_KIND_SPEC as a, findingSubjectGrammarPromptFor as b, emitControlIntegrityFindings as c, FindingsStore as d, PersistedFinding as f, FINDING_SUBJECT_SYNTAX as g, FINDING_SUBJECT_KINDS as h, IMPROVEMENT_KIND_SPEC as i, SemanticConceptJudgeOptions as j, SEMANTIC_CONCEPT_JUDGE_VERSION as k, DiffPolicy as l, diffFindings as m, KNOWLEDGE_POISONING_KIND_SPEC as n, CONTROL_INTEGRITY_ANALYST as o, defaultIsMaterial as p, KNOWLEDGE_GAP_KIND_SPEC as r, ControlIntegrityAnalyst as s, DEFAULT_TRACE_ANALYST_KINDS as t, FindingsDiff as u, FindingSubjectKind as v, createDspyRlmTraceEngine as w, parseFindingSubject as x, KIND_EXPECTED_SUBJECTS as y };
479
- //# sourceMappingURL=index-CIkxRsLS.d.ts.map
479
+ //# sourceMappingURL=index-C9l_-23M.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CIkxRsLS.d.ts","names":[],"sources":["../src/semantic-concept-judge.ts","../src/analyst/chat-trace-engine.ts","../src/analyst/trace-tool-callback.ts","../src/analyst/dspy-rlm-engine.ts","../src/analyst/finding-subject.ts","../src/analyst/findings-store.ts","../src/analyst/kinds/control-integrity.ts","../src/analyst/kinds/failure-mode.ts","../src/analyst/kinds/improvement.ts","../src/analyst/kinds/knowledge-gap.ts","../src/analyst/kinds/knowledge-poisoning.ts","../src/analyst/kinds/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDY;UAEK;EACf;;EAEA;;EAEA;;EAEA,aAAa;;UAGE;EACf;EACA;;EAEA;EACA;EACA,UAAU;;UAGK;;EAEf;;EAEA;;EAEA,aAAa;IAAQ;IAAc;;;EAEnC,kBAAkB;;EAElB;EACA;;UAGe;EACf;EACA;;EAEA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;;EAEA;EACA;;;;;;;;KASU;UAQK;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,MAAM;;EAEN,UAAU;EACV,aAAa;EACb;EACA,WAAW;EACX,SAAS;;;;;;EAMT,iBAAiB;;EAEjB,oBAA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EV,aAAa;;EAEb,WAAW;;;;;EAKX,SAAS;IAAQ,UAAU;IAAkB,SAAS;;;UAGvC;;;;;;;;EAQf,cAAc,UAAU,gBAAgB,SAAS;;;;;;iBAOnC,kBAAkB,GAAG,gBAAgB,GAAG;;;;;iBAWxC,aACd,UAAU,oBACV,SAAS,oBACT,SAAQ,aACP;;;;iBC7Fa,6BACd,OAAO,uBAAuB,mBAC9B,qBACC;;cA4BU,mCACA,oBAAoB,uBAAuB;WAE7C;WACA;WAEA;WACA;IAAS;IAAgC;;WACzC;WACA;aACP;aACA;;EAGI,QACJ,OAAO,uBAAuB,mBAC9B,KAAK,iBACJ,QAAQ;;cAUA,2BAAyB;;;cCHzB,wBAAwB;;;cC3BxB,uBAAuB;;;cCGvB,yBAAyB;;;cCPzB,+BAA+B;;;;;;;;;;;;cCP/B,sCAAsC"}
1
+ {"version":3,"file":"index-C9l_-23M.d.ts","names":[],"sources":["../src/semantic-concept-judge.ts","../src/analyst/chat-trace-engine.ts","../src/analyst/trace-tool-callback.ts","../src/analyst/dspy-rlm-engine.ts","../src/analyst/finding-subject.ts","../src/analyst/findings-store.ts","../src/analyst/kinds/control-integrity.ts","../src/analyst/kinds/failure-mode.ts","../src/analyst/kinds/improvement.ts","../src/analyst/kinds/knowledge-gap.ts","../src/analyst/kinds/knowledge-poisoning.ts","../src/analyst/kinds/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDY;UAEK;EACf;;EAEA;;EAEA;;EAEA,aAAa;;UAGE;EACf;EACA;;EAEA;EACA;EACA,UAAU;;UAGK;;EAEf;;EAEA;;EAEA,aAAa;IAAQ;IAAc;;;EAEnC,kBAAkB;;EAElB;EACA;;UAGe;EACf;EACA;;EAEA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;;EAEA;EACA;;;;;;;;KASU;UAQK;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,MAAM;;EAEN,UAAU;EACV,aAAa;EACb;EAC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AAW;;EAkBX,QAAQ,gBAAgB;;UAOT;;EAEf,UAAU;;EAEV,aAAa;;EAEb,WAAW;;;;;EAKX,SAAS;IAAQ,UAAU;IAAkB,SAAS;;;UAGvC;;;;;;;;EAQf,cAAc,UAAU,gBAAgB,SAAS;;;;;;iBAOnC,kBAAkB,GAAG,gBAAgB,GAAG;;;;;iBAWxC,aACd,UAAU,oBACV,SAAS,oBACT,SAAQ,aACP;;;;iBC7Fa,6BACd,OAAO,uBAAuB,mBAC9B,qBACC;;cA4BU,mCACA,oBAAoB,uBAAuB;WAE7C;WACA;WAEA;WACA;IAAS;IAAgC;;WACzC;WACA;aACP;aACA;;EAGI,QACJ,OAAO,uBAAuB,mBAC9B,KAAK,iBACJ,QAAQ;;cAUA,2BAAyB;;;cCHzB,wBAAwB;;;cC3BxB,uBAAuB;;;cCGvB,yBAAyB;;;cCPzB,+BAA+B;;;;;;;;;;;;cCP/B,sCAAsC"}
@@ -1,13 +1,13 @@
1
1
  import { c as CostLedgerHandle } from "./cost-ledger-DbQdN3nO.js";
2
2
  import { a as RunRecord, c as RunSplitTag, n as RunCostProvenance } from "./run-record-DF-fuu31.js";
3
3
  import "./types-6VEehmEg.js";
4
- import "./statistical-heldout-CJYAO-4a.js";
5
- import "./types-Duc6xOoW.js";
6
- import "./index-Ce2HACcP.js";
4
+ import "./statistical-heldout-Dq3pnmxd.js";
5
+ import "./types-ZUy5HGY5.js";
6
+ import "./index-B8n12TR2.js";
7
7
  import { p as TraceSpanEvent } from "./client-BzL9niqi.js";
8
8
  import { d as InsightReport, t as AnalyzeRunsOptions } from "./analyze-runs-Q74o4Hfj.js";
9
- import "./define-agent-eval-BbEXdM3H.js";
10
- import "./default-registry-CxEBVA6W.js";
9
+ import "./define-agent-eval-D8bPoBM5.js";
10
+ import "./default-registry-BHEfZHQd.js";
11
11
  import { AgentCandidateBenchmarkCellRef, AgentCandidateBenchmarkSuiteInputs, AgentCandidateBenchmarkTask, AgentCandidateBenchmarkTaskMaterial, AgentCandidateBundle, AgentCandidateEvaluationPolicy, AgentCandidateExperiment, AgentCandidateExperimentMaterial, AgentCandidateExperimentMeasurement, AgentImprovementCost, AgentImprovementMeasuredComparison, AgentProfileImprovementExperiment, AgentProfileImprovementExperimentMaterial, AgentProfileImprovementMeasuredComparison, AgentProfileImprovementMeasurement, AgentProfileImprovementRunCell, AgentProfileImprovementRunReceipt, AgentProfileImprovementSuiteInputs, AgentProfileImprovementTask, AgentProfileImprovementTaskMaterial, CandidateExecutionEvidence, Sha256Digest } from "@tangle-network/agent-interface";
12
12
  //#region src/contract/measured-comparison.d.ts
13
13
  interface SealCandidateBenchmarkSuiteOptions {
@@ -687,4 +687,4 @@ interface FromOtelSpansOptions {
687
687
  declare function fromOtelSpans(opts: FromOtelSpansOptions): RunRecord[];
688
688
  //#endregion
689
689
  export { FromRunRecordDirResult as $, CodeAgentSessionActionStatus as A, AgentTraceFile as B, fromOpenCodeSession as C, measuredComparisonFromCandidateExperiment as Ct, streamCodeAgentJsonlFile as D, sealCandidateExperiment as Dt, parseCodeAgentJsonlFile as E, sealCandidateBenchmarkTask as Et, CodeAgentSessionTerminalStatus as F, PartitionByAuthoringModelResult as G, AgentTraceRange as H, observeCodeAgentSession as I, EvalReportingSuiteInput as J, parseAgentTrace as K, AgentTraceContributor as L, CodeAgentSessionExecutionReceipt as M, CodeAgentSessionObservation as N, CodeAgentSessionAction as O, verifyCandidateExperiment as Ot, CodeAgentSessionSource as P, FromRunRecordDirOptions as Q, AgentTraceContributorType as R, fromKimiCodeSession as S, evaluatePairedMeasurements as St, parseCodeAgentJsonl as T, sealCandidateBenchmarkSuite as Tt, AgentTraceRecord as U, AgentTraceIndex as V, AuthoringProvenance as W, EvalReportingSuiteResult as X, EvalReportingSuiteOptions as Y, evalReportingSuite as Z, CodeAgentSessionIntakeResult as _, PairedMeasurement as _t, FromFeedbackTableOptions as a, RunAgentProfileImprovementExperimentOptions as at, fromClaudeCodeSession as b, RunCandidateExperimentOptions as bt, CodeAgentStoreObservation as c, runAgentProfileImprovementExperiment as ct, CodeAgentStoreScope as d, sealAgentProfileImprovementTask as dt, RunRecordRejection as et, CodeAgentStoreSession as f, verifyAgentProfileImprovementExperimentComparison as ft, CodeAgentSessionIntakeOptions as g, EvaluatePairedMeasurementsOptions as gt, CodeAgentSessionDiagnostic as h, CompareCandidateExperimentOptions as ht, FeedbackTableRow as i, CompareAgentProfileImprovementExperimentOptions as it, CodeAgentSessionActionSurface as j, CodeAgentSessionActionKind as k, verifyCandidateExperimentComparison as kt, CodeAgentStoreRejection as l, sealAgentProfileImprovementExperiment as lt, CodeAgentJsonlLine as m, CandidateExperimentRun as mt, fromOtelSpans as n, AgentProfileImprovementExperimentExecutionInput as nt, FromFeedbackTableResult as o, SealAgentProfileImprovementSuiteOptions as ot, observeCodeAgentStore as p, CandidateExperimentExecutionInput as pt, partitionRunsByAuthoringModel as q, FeedbackTableMeta as r, AgentProfileImprovementExperimentRun as rt, fromFeedbackTable as s, measuredComparisonFromAgentProfileImprovementExperiment as st, FromOtelSpansOptions as t, fromRunRecordDir as tt, CodeAgentStoreRejections as u, sealAgentProfileImprovementSuite as ut, CodeAgentSessionMetrics as v, PairedMeasurementAdapter as vt, fromPiSession as w, runCandidateExperiment as wt, fromCodexSession as x, SealCandidateBenchmarkSuiteOptions as xt, ParsedCodeAgentJsonl as y, PairedMeasurementEvaluation as yt, AgentTraceConversation as z };
690
- //# sourceMappingURL=index-CGAwP9l3.d.ts.map
690
+ //# sourceMappingURL=index-CG7mtu_G.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CGAwP9l3.d.ts","names":[],"sources":["../src/contract/measured-comparison.ts","../src/contract/profile-measured-comparison.ts","../src/contract/intake/run-record-dir.ts","../src/contract/eval-reporting-suite.ts","../src/contract/intake/agent-trace.ts","../src/contract/intake/code-agent-observation.ts","../src/contract/intake/code-agent-session.ts","../src/contract/intake/code-agent-store.ts","../src/contract/intake/feedback-table.ts","../src/contract/intake/otel-spans.ts"],"mapp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W;;UAGI;EACf;;;EAGA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA,WAAW;;;EAGX,SAAS;;UAGM;;EAEf,SAAS;;;EAGT,OAAO;;;;EAIP;IAAU;IAAa;;;;;EAIvB;;UAGe;EACf,MAAM;;;EAGN,aAAa;IAAQ;IAAe;IAAe;;;iBAGrC,kBAAkB,MAAM,2BAA2B;;;UC3BlD;EACf,OAAO;;EAEP,eAAe;;EAEf;;;;;;EAMA,eAAe,eAAe,gBAAgB;;iBAGhC,cAAc,MAAM,uBAAuB"}
1
+ {"version":3,"file":"index-CG7mtu_G.d.ts","names":[],"sources":["../src/contract/measured-comparison.ts","../src/contract/profile-measured-comparison.ts","../src/contract/intake/run-record-dir.ts","../src/contract/eval-reporting-suite.ts","../src/contract/intake/agent-trace.ts","../src/contract/intake/code-agent-observation.ts","../src/contract/intake/code-agent-session.ts","../src/contract/intake/code-agent-store.ts","../src/contract/intake/feedback-table.ts","../src/contract/intake/otel-spans.ts"],"mappings":";;;;;;;;;;;;UAiCiB;EACf,QAAQ,gCAAgC;EACxC;EACA;;UAGe;EACf,YAAY;EACZ;EACA,QAAQ;EACR,MAAM;EACN,eAAe;EACf;EACA,SAAS;;UAGM;EACf,YAAY;EACZ,QAAQ,OAAO,oCAAoC,QAAQ;;EAE3D;;EAEA,aAAa;EACb,SAAS;;UAGM;EACf,cAAc;EACd;IACE;IACA,MAAM;;;UAIO;EACf,YAAY;EACZ,cAAc;EACd;IACE;IACA,MAAM;;EAER,aAAa;EACb;EACA,YAAY;EACZ;EACA,WAAW;;;UAII,kBAAkB;EACjC;EACA,UAAU;EACV,WAAW;;;UAII,yBAAyB;EACxC,MAAM,KAAK;EACX,WAAW,KAAK;IAAkB;IAAc;;EAChD,QAAQ,KAAK;EACb,eAAe,KAAK,OAAO;EAC3B,UAAU,KAAK;EACf,UAAU,KAAK;EACf,OAAO,KAAK;;UAGG,kCAAkC;EACjD,uBAAuB,kBA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;;;iBAUoB,mBACpB,OAAO,yBACP,UAAS,4BACR,QAAQ;;;KChEC;UAEK;EACf,MAAM;;EAEN;;UAGe;EACf;EACA;EACA;;;EAGA,cAAc;;UAGC;EACf;EACA,cAAc;EACd,QAAQ;;UAGO;EACf;EACA,eAAe;;UAGA;EACf;EACA;EACA;EACA;IAAQ;IAAc;;EACtB;IAAS;IAAe;;EACxB,OAAO;;;;UAOQ;EACf;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;;KAGU,kBAAkB,YAAY;;;;;;iBAW1B,gBAAgB,SAAS,qBAAqB;UAmE7C;;;;EAIf,SAAS,YAAY;;;EAGrB,cAAc;;;;;;;;iBASA,8BACd,MAAM,aACN,OAAO,kBACN;;;KCjLS;KAEA;KAEA;KAEA;KASA;UAEK;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA,MAAM;EACN,SAAS;EACT;EACA,QAAQ;EACR;EACA;EACA,UAAU;;UAGK;EACf,QAAQ;EACR;EACA;EACA;IACE,QAAQ;IACR;;EAEF,SAAS;;UAGM;EACf,QAAQ;EACR;EACA;EACA,YAAY;;;;;;;iBAeE,wBACd,SAAS,iCACR;;;UCjCc;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;;UAGe;EACf,MAAM;EACN,aAAa;EACb,SAAS;EACT,cAAc;;UAGC;EACf;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;;;EAGA,iBAAiB;;;EAGjB,YAAY;;;;KAKF;EACN;EAAe;EAAoB;;EACnC;EAAmB;;iBAcT,oBAAoB,gBAAg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