niceeval 0.17.1 → 0.19.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 (692) hide show
  1. package/INDEX.md +5 -2
  2. package/dist/adapter-usage.cjs.map +1 -1
  3. package/dist/adapter-usage.d.cts +1 -1
  4. package/dist/adapter-usage.d.mts +1 -1
  5. package/dist/adapter-usage.d.ts +1 -1
  6. package/dist/adapter.cjs +8 -3
  7. package/dist/adapter.cjs.map +1 -1
  8. package/dist/adapter.d.cts +26 -15
  9. package/dist/adapter.d.mts +26 -15
  10. package/dist/adapter.d.ts +26 -15
  11. package/dist/agents/{effect-runtime.cjs → agent-effects.cjs} +12 -18
  12. package/dist/agents/agent-effects.cjs.map +1 -0
  13. package/dist/agents/agent-effects.d.cts +23 -0
  14. package/dist/agents/agent-effects.d.mts +23 -0
  15. package/dist/agents/agent-effects.d.ts +23 -0
  16. package/dist/agents/agent-effects.js +16 -0
  17. package/dist/agents/agent-effects.js.map +1 -0
  18. package/dist/agents/ai-sdk.cjs +1 -1
  19. package/dist/agents/ai-sdk.cjs.map +1 -1
  20. package/dist/agents/bub.cjs +31 -18
  21. package/dist/agents/bub.cjs.map +1 -1
  22. package/dist/agents/bub.d.cts +9 -12
  23. package/dist/agents/bub.d.mts +9 -12
  24. package/dist/agents/bub.d.ts +9 -12
  25. package/dist/agents/claude-code-native.cjs +2 -2
  26. package/dist/agents/claude-code-native.cjs.map +1 -1
  27. package/dist/agents/claude-code.cjs +17 -11
  28. package/dist/agents/claude-code.cjs.map +1 -1
  29. package/dist/agents/claude-code.d.cts +11 -11
  30. package/dist/agents/claude-code.d.mts +11 -11
  31. package/dist/agents/claude-code.d.ts +11 -11
  32. package/dist/agents/codex-app-server.cjs +2 -2
  33. package/dist/agents/codex-app-server.cjs.map +1 -1
  34. package/dist/agents/codex.cjs +18 -12
  35. package/dist/agents/codex.cjs.map +1 -1
  36. package/dist/agents/codex.d.cts +12 -12
  37. package/dist/agents/codex.d.mts +12 -12
  38. package/dist/agents/codex.d.ts +12 -12
  39. package/dist/agents/deepseek-harness.cjs +2 -2
  40. package/dist/agents/deepseek-harness.cjs.map +1 -1
  41. package/dist/agents/hermes.cjs +3 -3
  42. package/dist/agents/hermes.cjs.map +1 -1
  43. package/dist/agents/index.cjs +3 -3
  44. package/dist/agents/index.cjs.map +1 -1
  45. package/dist/agents/index.d.cts +3 -3
  46. package/dist/agents/index.d.mts +3 -3
  47. package/dist/agents/index.d.ts +3 -3
  48. package/dist/agents/index.js +2 -2
  49. package/dist/agents/index.mjs +2 -2
  50. package/dist/agents/mcp.cjs.map +1 -1
  51. package/dist/agents/mcp.d.cts +2 -2
  52. package/dist/agents/mcp.d.mts +2 -2
  53. package/dist/agents/mcp.d.ts +2 -2
  54. package/dist/agents/omp.cjs +2 -2
  55. package/dist/agents/omp.cjs.map +1 -1
  56. package/dist/agents/openai-compat.cjs +2 -2
  57. package/dist/agents/openai-compat.cjs.map +1 -1
  58. package/dist/agents/openclaw.cjs +3 -3
  59. package/dist/agents/openclaw.cjs.map +1 -1
  60. package/dist/agents/opencode.cjs +16 -4
  61. package/dist/agents/opencode.cjs.map +1 -1
  62. package/dist/agents/plugin-extensions.cjs +71 -0
  63. package/dist/agents/plugin-extensions.cjs.map +1 -0
  64. package/dist/agents/plugin-extensions.d.cts +26 -0
  65. package/dist/agents/plugin-extensions.d.mts +26 -0
  66. package/dist/agents/plugin-extensions.d.ts +26 -0
  67. package/dist/agents/plugin-extensions.js +8 -0
  68. package/dist/agents/plugin-extensions.js.map +1 -0
  69. package/dist/agents/post-setup.cjs +14 -3
  70. package/dist/agents/post-setup.cjs.map +1 -1
  71. package/dist/agents/post-setup.d.cts +4 -2
  72. package/dist/agents/post-setup.d.mts +4 -2
  73. package/dist/agents/post-setup.d.ts +4 -2
  74. package/dist/agents/post-setup.js +8 -6
  75. package/dist/agents/sdk-streams.cjs +3 -3
  76. package/dist/agents/sdk-streams.cjs.map +1 -1
  77. package/dist/agents/{session-slot.cjs → session-key.cjs} +4 -4
  78. package/dist/agents/session-key.cjs.map +1 -0
  79. package/dist/agents/session-key.d.cts +12 -0
  80. package/dist/agents/session-key.d.mts +12 -0
  81. package/dist/agents/session-key.d.ts +12 -0
  82. package/dist/agents/session-key.js +6 -0
  83. package/dist/agents/session-key.js.map +1 -0
  84. package/dist/agents/shared.cjs +2 -2
  85. package/dist/agents/shared.cjs.map +1 -1
  86. package/dist/agents/shared.d.cts +4 -4
  87. package/dist/agents/shared.d.mts +4 -4
  88. package/dist/agents/shared.d.ts +4 -4
  89. package/dist/agents/skills.cjs.map +1 -1
  90. package/dist/agents/skills.d.cts +3 -3
  91. package/dist/agents/skills.d.mts +3 -3
  92. package/dist/agents/skills.d.ts +3 -3
  93. package/dist/agents/types.cjs.map +1 -1
  94. package/dist/agents/types.d.cts +55 -54
  95. package/dist/agents/types.d.mts +55 -54
  96. package/dist/agents/types.d.ts +55 -54
  97. package/dist/agents/ui-message-stream.cjs +4 -4
  98. package/dist/agents/ui-message-stream.cjs.map +1 -1
  99. package/dist/agents/unrecognized-events.cjs +32 -0
  100. package/dist/agents/unrecognized-events.cjs.map +1 -0
  101. package/dist/agents/unrecognized-events.d.cts +8 -0
  102. package/dist/agents/unrecognized-events.d.mts +8 -0
  103. package/dist/agents/unrecognized-events.d.ts +8 -0
  104. package/dist/agents/unrecognized-events.js +6 -0
  105. package/dist/agents/unrecognized-events.js.map +1 -0
  106. package/dist/assertions/api.cjs.map +1 -1
  107. package/dist/assertions/api.d.cts +3 -0
  108. package/dist/assertions/api.d.mts +3 -0
  109. package/dist/assertions/api.d.ts +3 -0
  110. package/dist/assertions/collection.cjs +1 -1
  111. package/dist/assertions/collection.cjs.map +1 -1
  112. package/dist/assertions/judge.cjs +1 -1
  113. package/dist/assertions/judge.cjs.map +1 -1
  114. package/dist/assertions/match.cjs +52 -21
  115. package/dist/assertions/match.cjs.map +1 -1
  116. package/dist/assertions/match.d.cts +16 -5
  117. package/dist/assertions/match.d.mts +16 -5
  118. package/dist/assertions/match.d.ts +16 -5
  119. package/dist/assertions/match.js +96 -94
  120. package/dist/assertions/measurements.cjs +61 -0
  121. package/dist/assertions/measurements.cjs.map +1 -0
  122. package/dist/assertions/measurements.d.cts +24 -0
  123. package/dist/assertions/measurements.d.mts +24 -0
  124. package/dist/assertions/measurements.d.ts +24 -0
  125. package/dist/assertions/measurements.js +8 -0
  126. package/dist/assertions/measurements.js.map +1 -0
  127. package/dist/assertions/numeric.cjs +2 -0
  128. package/dist/assertions/numeric.cjs.map +1 -1
  129. package/dist/assertions/numeric.d.cts +1 -1
  130. package/dist/assertions/numeric.d.mts +1 -1
  131. package/dist/assertions/numeric.d.ts +1 -1
  132. package/dist/assertions/quantity.cjs +42 -0
  133. package/dist/assertions/quantity.cjs.map +1 -0
  134. package/dist/assertions/quantity.d.cts +18 -0
  135. package/dist/assertions/quantity.d.mts +18 -0
  136. package/dist/assertions/quantity.d.ts +18 -0
  137. package/dist/assertions/quantity.js +22 -0
  138. package/dist/assertions/quantity.js.map +1 -0
  139. package/dist/assertions/record/attachment.cjs +2 -0
  140. package/dist/assertions/record/attachment.cjs.map +1 -1
  141. package/dist/assertions/record/codec.cjs +5 -1
  142. package/dist/assertions/record/codec.cjs.map +1 -1
  143. package/dist/assertions/record/model.cjs.map +1 -1
  144. package/dist/assertions/record/model.d.cts +3 -1
  145. package/dist/assertions/record/model.d.mts +3 -1
  146. package/dist/assertions/record/model.d.ts +3 -1
  147. package/dist/assertions/runtime.cjs +11 -6
  148. package/dist/assertions/runtime.cjs.map +1 -1
  149. package/dist/cli/program.cjs +3 -0
  150. package/dist/cli/program.cjs.map +1 -1
  151. package/dist/context/assert-first.cjs +6 -4
  152. package/dist/context/assert-first.cjs.map +1 -1
  153. package/dist/context/assert-first.d.cts +9 -3
  154. package/dist/context/assert-first.d.mts +9 -3
  155. package/dist/context/assert-first.d.ts +9 -3
  156. package/dist/context/notes.cjs +47 -0
  157. package/dist/context/notes.cjs.map +1 -0
  158. package/dist/context/notes.d.cts +10 -0
  159. package/dist/context/notes.d.mts +10 -0
  160. package/dist/context/notes.d.ts +10 -0
  161. package/dist/context/notes.js +6 -0
  162. package/dist/context/notes.js.map +1 -0
  163. package/dist/context/send-failures.cjs +1 -7
  164. package/dist/context/send-failures.cjs.map +1 -1
  165. package/dist/context/send-failures.d.cts +2 -3
  166. package/dist/context/send-failures.d.mts +2 -3
  167. package/dist/context/send-failures.d.ts +2 -3
  168. package/dist/context/send-retry.cjs +0 -1
  169. package/dist/context/send-retry.cjs.map +1 -1
  170. package/dist/context/send-retry.d.cts +1 -2
  171. package/dist/context/send-retry.d.mts +1 -2
  172. package/dist/context/send-retry.d.ts +1 -2
  173. package/dist/context/session.cjs +10 -17
  174. package/dist/context/session.cjs.map +1 -1
  175. package/dist/context/session.d.cts +4 -10
  176. package/dist/context/session.d.mts +4 -10
  177. package/dist/context/session.d.ts +4 -10
  178. package/dist/define.cjs +89 -64
  179. package/dist/define.cjs.map +1 -1
  180. package/dist/define.d.cts +3 -3
  181. package/dist/define.d.mts +3 -3
  182. package/dist/define.d.ts +3 -3
  183. package/dist/eval/cli/contribution.cjs +1 -1
  184. package/dist/eval/cli/contribution.cjs.map +1 -1
  185. package/dist/eval/host/index.cjs +1 -1
  186. package/dist/eval/host/index.cjs.map +1 -1
  187. package/dist/eval/record/evaluation.cjs +1 -1
  188. package/dist/eval/record/evaluation.cjs.map +1 -1
  189. package/dist/eval/record/membership-provenance.d.cts +3 -3
  190. package/dist/eval/record/membership-provenance.d.mts +3 -3
  191. package/dist/eval/record/membership-provenance.d.ts +3 -3
  192. package/dist/eval/record/score.cjs +2 -2
  193. package/dist/eval/record/score.cjs.map +1 -1
  194. package/dist/eval/record/sealed-assertion.cjs +1 -1
  195. package/dist/eval/record/sealed-assertion.cjs.map +1 -1
  196. package/dist/eval/record/verdict.cjs +2 -2
  197. package/dist/eval/record/verdict.cjs.map +1 -1
  198. package/dist/expect/index.cjs +13 -1
  199. package/dist/expect/index.cjs.map +1 -1
  200. package/dist/expect/index.d.cts +5 -1
  201. package/dist/expect/index.d.mts +5 -1
  202. package/dist/expect/index.d.ts +5 -1
  203. package/dist/expect/index.js +92 -72
  204. package/dist/expect/index.mjs +92 -72
  205. package/dist/experiment/host/cli/contribution.cjs +52 -39
  206. package/dist/experiment/host/cli/contribution.cjs.map +1 -1
  207. package/dist/experiment/host/cli/contribution.d.cts +18 -4
  208. package/dist/experiment/host/cli/contribution.d.mts +18 -4
  209. package/dist/experiment/host/cli/contribution.d.ts +18 -4
  210. package/dist/experiment/host/cli/contribution.js +2 -2
  211. package/dist/experiment/host/cli/debug-protocol.cjs +2 -2
  212. package/dist/experiment/host/cli/debug-protocol.cjs.map +1 -1
  213. package/dist/experiment/host/cli/debug-protocol.d.cts +2 -2
  214. package/dist/experiment/host/cli/debug-protocol.d.mts +2 -2
  215. package/dist/experiment/host/cli/debug-protocol.d.ts +2 -2
  216. package/dist/experiment/host/cli/output-protocol.cjs +1 -1
  217. package/dist/experiment/host/cli/output-protocol.cjs.map +1 -1
  218. package/dist/experiment/host/cli/output-protocol.d.cts +2 -2
  219. package/dist/experiment/host/cli/output-protocol.d.mts +2 -2
  220. package/dist/experiment/host/cli/output-protocol.d.ts +2 -2
  221. package/dist/experiment/host/current.cjs +2 -2
  222. package/dist/experiment/host/current.cjs.map +1 -1
  223. package/dist/experiment/host/index.cjs +1 -1
  224. package/dist/experiment/host/index.cjs.map +1 -1
  225. package/dist/experiment/host/operations.cjs +24 -23
  226. package/dist/experiment/host/operations.cjs.map +1 -1
  227. package/dist/experiment/host/runtime.cjs +11 -10
  228. package/dist/experiment/host/runtime.cjs.map +1 -1
  229. package/dist/experiment/host/runtime.d.cts +3 -3
  230. package/dist/experiment/host/runtime.d.mts +3 -3
  231. package/dist/experiment/host/runtime.d.ts +3 -3
  232. package/dist/experiment/host/teardown.cjs +4 -3
  233. package/dist/experiment/host/teardown.cjs.map +1 -1
  234. package/dist/experiment/host/teardown.d.cts +3 -3
  235. package/dist/experiment/host/teardown.d.mts +3 -3
  236. package/dist/experiment/host/teardown.d.ts +3 -3
  237. package/dist/experiment/host/types.cjs.map +1 -1
  238. package/dist/experiment/host/types.d.cts +19 -19
  239. package/dist/experiment/host/types.d.mts +19 -19
  240. package/dist/experiment/host/types.d.ts +19 -19
  241. package/dist/index.cjs +3 -19
  242. package/dist/index.cjs.map +1 -1
  243. package/dist/index.d.cts +4 -8
  244. package/dist/index.d.mts +4 -8
  245. package/dist/index.d.ts +4 -8
  246. package/dist/index.js +12 -34
  247. package/dist/index.mjs +12 -34
  248. package/dist/inspection/assertions.cjs +1 -1
  249. package/dist/inspection/assertions.cjs.map +1 -1
  250. package/dist/inspection/cli/contribution.cjs +8 -7
  251. package/dist/inspection/cli/contribution.cjs.map +1 -1
  252. package/dist/inspection/facts.cjs +4 -4
  253. package/dist/inspection/facts.cjs.map +1 -1
  254. package/dist/inspection/index.cjs +1 -5
  255. package/dist/inspection/index.cjs.map +1 -1
  256. package/dist/inspection/index.d.cts +1 -2
  257. package/dist/inspection/index.d.mts +1 -2
  258. package/dist/inspection/index.d.ts +1 -2
  259. package/dist/inspection/index.js +20 -26
  260. package/dist/inspection/lifecycle.cjs +7 -0
  261. package/dist/inspection/lifecycle.cjs.map +1 -0
  262. package/dist/inspection/lifecycle.d.cts +4 -0
  263. package/dist/inspection/lifecycle.d.mts +4 -0
  264. package/dist/inspection/lifecycle.d.ts +4 -0
  265. package/dist/inspection/lifecycle.js +6 -0
  266. package/dist/inspection/lifecycle.js.map +1 -0
  267. package/dist/inspection/notes.cjs +40 -0
  268. package/dist/inspection/notes.cjs.map +1 -0
  269. package/dist/inspection/notes.d.cts +12 -0
  270. package/dist/inspection/notes.d.mts +12 -0
  271. package/dist/inspection/notes.d.ts +12 -0
  272. package/dist/inspection/notes.js +8 -0
  273. package/dist/inspection/notes.js.map +1 -0
  274. package/dist/inspection/overview.cjs +12 -15
  275. package/dist/inspection/overview.cjs.map +1 -1
  276. package/dist/inspection/overview.d.cts +8 -6
  277. package/dist/inspection/overview.d.mts +8 -6
  278. package/dist/inspection/overview.d.ts +8 -6
  279. package/dist/inspection/planned-attempt.cjs +45 -0
  280. package/dist/inspection/planned-attempt.cjs.map +1 -0
  281. package/dist/inspection/planned-attempt.d.cts +109 -0
  282. package/dist/inspection/planned-attempt.d.mts +109 -0
  283. package/dist/inspection/planned-attempt.d.ts +109 -0
  284. package/dist/inspection/planned-attempt.js +24 -0
  285. package/dist/inspection/planned-attempt.js.map +1 -0
  286. package/dist/inspection/project-result.cjs +5 -5
  287. package/dist/inspection/project-result.cjs.map +1 -1
  288. package/dist/inspection/project-result.d.cts +58 -57
  289. package/dist/inspection/project-result.d.mts +58 -57
  290. package/dist/inspection/project-result.d.ts +58 -57
  291. package/dist/inspection/project-result.js +4 -4
  292. package/dist/inspection/project.cjs +3 -3
  293. package/dist/inspection/project.cjs.map +1 -1
  294. package/dist/inspection/protocol-values.cjs +1 -1
  295. package/dist/inspection/protocol-values.cjs.map +1 -1
  296. package/dist/inspection/protocol-values.d.cts +1 -1
  297. package/dist/inspection/protocol-values.d.mts +1 -1
  298. package/dist/inspection/protocol-values.d.ts +1 -1
  299. package/dist/inspection/protocol.cjs +8 -8
  300. package/dist/inspection/protocol.cjs.map +1 -1
  301. package/dist/inspection/protocol.d.cts +237 -219
  302. package/dist/inspection/protocol.d.mts +237 -219
  303. package/dist/inspection/protocol.d.ts +237 -219
  304. package/dist/inspection/public.cjs +1 -5
  305. package/dist/inspection/public.cjs.map +1 -1
  306. package/dist/inspection/public.d.cts +1 -2
  307. package/dist/inspection/public.d.mts +1 -2
  308. package/dist/inspection/public.d.ts +1 -2
  309. package/dist/inspection/public.js +14 -20
  310. package/dist/inspection/public.mjs +166 -129
  311. package/dist/inspection/query.cjs +1 -1
  312. package/dist/inspection/query.cjs.map +1 -1
  313. package/dist/inspection/results.cjs +61 -52
  314. package/dist/inspection/results.cjs.map +1 -1
  315. package/dist/inspection/results.d.cts +157 -140
  316. package/dist/inspection/results.d.mts +157 -140
  317. package/dist/inspection/results.d.ts +157 -140
  318. package/dist/inspection/select.cjs +33 -28
  319. package/dist/inspection/select.cjs.map +1 -1
  320. package/dist/inspection/source.cjs +1 -1
  321. package/dist/inspection/source.cjs.map +1 -1
  322. package/dist/inspection/sources.cjs +2 -2
  323. package/dist/inspection/sources.cjs.map +1 -1
  324. package/dist/inspection/trace.cjs +9 -8
  325. package/dist/inspection/trace.cjs.map +1 -1
  326. package/dist/inspection/trace.d.cts +4 -4
  327. package/dist/inspection/trace.d.mts +4 -4
  328. package/dist/inspection/trace.d.ts +4 -4
  329. package/dist/loaders/index.cjs +7 -279
  330. package/dist/loaders/index.cjs.map +1 -1
  331. package/dist/loaders/index.d.cts +2 -95
  332. package/dist/loaders/index.d.mts +2 -95
  333. package/dist/loaders/index.d.ts +2 -95
  334. package/dist/loaders/index.js +10 -12
  335. package/dist/loaders/index.mjs +10 -12
  336. package/dist/loaders/runtime.cjs +283 -0
  337. package/dist/loaders/runtime.cjs.map +1 -0
  338. package/dist/loaders/runtime.d.cts +95 -0
  339. package/dist/loaders/runtime.d.mts +95 -0
  340. package/dist/loaders/runtime.d.ts +95 -0
  341. package/dist/loaders/runtime.js +16 -0
  342. package/dist/loaders/runtime.js.map +1 -0
  343. package/dist/migrations/judge-provider.md +6 -6
  344. package/dist/{model-slots.cjs → model-roles.cjs} +26 -7
  345. package/dist/model-roles.cjs.map +1 -0
  346. package/dist/model-roles.d.cts +26 -0
  347. package/dist/model-roles.d.mts +26 -0
  348. package/dist/model-roles.d.ts +26 -0
  349. package/dist/model-roles.js +14 -0
  350. package/dist/model-roles.js.map +1 -0
  351. package/dist/o11y/adapter-usage-projection.cjs +9 -8
  352. package/dist/o11y/adapter-usage-projection.cjs.map +1 -1
  353. package/dist/o11y/adapter-usage-projection.d.cts +23 -15
  354. package/dist/o11y/adapter-usage-projection.d.mts +23 -15
  355. package/dist/o11y/adapter-usage-projection.d.ts +23 -15
  356. package/dist/o11y/cache-read.cjs +14 -14
  357. package/dist/o11y/cache-read.cjs.map +1 -1
  358. package/dist/o11y/cache-read.d.cts +5 -5
  359. package/dist/o11y/cache-read.d.mts +5 -5
  360. package/dist/o11y/cache-read.d.ts +5 -5
  361. package/dist/o11y/derive.cjs.map +1 -1
  362. package/dist/o11y/derive.d.cts +2 -2
  363. package/dist/o11y/derive.d.mts +2 -2
  364. package/dist/o11y/derive.d.ts +2 -2
  365. package/dist/o11y/eval-usage.cjs +9 -9
  366. package/dist/o11y/eval-usage.cjs.map +1 -1
  367. package/dist/o11y/eval-usage.d.cts +7 -7
  368. package/dist/o11y/eval-usage.d.mts +7 -7
  369. package/dist/o11y/eval-usage.d.ts +7 -7
  370. package/dist/o11y/parsers/bub.cjs +57 -81
  371. package/dist/o11y/parsers/bub.cjs.map +1 -1
  372. package/dist/o11y/parsers/index.cjs.map +1 -1
  373. package/dist/o11y/parsers/index.d.cts +2 -0
  374. package/dist/o11y/parsers/index.d.mts +2 -0
  375. package/dist/o11y/parsers/index.d.ts +2 -0
  376. package/dist/o11y/parsers/opencode.cjs +129 -217
  377. package/dist/o11y/parsers/opencode.cjs.map +1 -1
  378. package/dist/o11y/parsers/opencode.d.cts +2 -5
  379. package/dist/o11y/parsers/opencode.d.mts +2 -5
  380. package/dist/o11y/parsers/opencode.d.ts +2 -5
  381. package/dist/o11y/types.cjs.map +1 -1
  382. package/dist/o11y/types.d.cts +1 -1
  383. package/dist/o11y/types.d.mts +1 -1
  384. package/dist/o11y/types.d.ts +1 -1
  385. package/dist/plugin/contracts.cjs +170 -120
  386. package/dist/plugin/contracts.cjs.map +1 -1
  387. package/dist/plugin/contracts.d.cts +102 -90
  388. package/dist/plugin/contracts.d.mts +102 -90
  389. package/dist/plugin/contracts.d.ts +102 -90
  390. package/dist/plugin/contracts.js +16 -12
  391. package/dist/plugin/index.cjs.map +1 -1
  392. package/dist/plugin/index.d.cts +1 -1
  393. package/dist/plugin/index.d.mts +1 -1
  394. package/dist/plugin/index.d.ts +1 -1
  395. package/dist/plugin/link.cjs +69 -64
  396. package/dist/plugin/link.cjs.map +1 -1
  397. package/dist/plugin/link.d.cts +5 -3
  398. package/dist/plugin/link.d.mts +5 -3
  399. package/dist/plugin/link.d.ts +5 -3
  400. package/dist/plugin/link.js +12 -8
  401. package/dist/record/codec/seal-manifest.d.cts +3 -3
  402. package/dist/record/codec/seal-manifest.d.mts +3 -3
  403. package/dist/record/codec/seal-manifest.d.ts +3 -3
  404. package/dist/record/family/attempt-note/definition.cjs +12 -0
  405. package/dist/record/family/attempt-note/definition.cjs.map +1 -0
  406. package/dist/record/family/attempt-note/definition.d.cts +6 -0
  407. package/dist/record/family/attempt-note/definition.d.mts +6 -0
  408. package/dist/record/family/attempt-note/definition.d.ts +6 -0
  409. package/dist/record/family/attempt-note/definition.js +6 -0
  410. package/dist/record/family/attempt-note/definition.js.map +1 -0
  411. package/dist/record/family/attempt-note/persistence.cjs +10 -0
  412. package/dist/record/family/attempt-note/persistence.cjs.map +1 -0
  413. package/dist/record/family/attempt-note/persistence.d.cts +6 -0
  414. package/dist/record/family/attempt-note/persistence.d.mts +6 -0
  415. package/dist/record/family/attempt-note/persistence.d.ts +6 -0
  416. package/dist/record/family/attempt-note/persistence.js +6 -0
  417. package/dist/record/family/attempt-note/persistence.js.map +1 -0
  418. package/dist/record/family/attempt-note/schema.cjs +20 -0
  419. package/dist/record/family/attempt-note/schema.cjs.map +1 -0
  420. package/dist/record/family/attempt-note/schema.d.cts +21 -0
  421. package/dist/record/family/attempt-note/schema.d.mts +21 -0
  422. package/dist/record/family/attempt-note/schema.d.ts +21 -0
  423. package/dist/record/family/attempt-note/schema.js +10 -0
  424. package/dist/record/family/attempt-note/schema.js.map +1 -0
  425. package/dist/record/family/catalog.cjs +32 -29
  426. package/dist/record/family/catalog.cjs.map +1 -1
  427. package/dist/record/family/catalog.d.cts +7 -2
  428. package/dist/record/family/catalog.d.mts +7 -2
  429. package/dist/record/family/catalog.d.ts +7 -2
  430. package/dist/record/family/current.cjs +48 -45
  431. package/dist/record/family/current.cjs.map +1 -1
  432. package/dist/record/family/current.d.cts +15 -0
  433. package/dist/record/family/current.d.mts +15 -0
  434. package/dist/record/family/current.d.ts +15 -0
  435. package/dist/record/model/index.js +66 -64
  436. package/dist/record/model/run-context.cjs +9 -3
  437. package/dist/record/model/run-context.cjs.map +1 -1
  438. package/dist/record/model/run-context.d.cts +9 -2
  439. package/dist/record/model/run-context.d.mts +9 -2
  440. package/dist/record/model/run-context.d.ts +9 -2
  441. package/dist/record/model/run-context.js +8 -6
  442. package/dist/record/model/seal-manifest.d.cts +1 -1
  443. package/dist/record/model/seal-manifest.d.mts +1 -1
  444. package/dist/record/model/seal-manifest.d.ts +1 -1
  445. package/dist/run/cli/contribution.cjs +6 -32
  446. package/dist/run/cli/contribution.cjs.map +1 -1
  447. package/dist/run/host/runtime.cjs +1 -1
  448. package/dist/run/host/runtime.cjs.map +1 -1
  449. package/dist/run/storage/sqlite.cjs +7 -7
  450. package/dist/run/storage/sqlite.cjs.map +1 -1
  451. package/dist/runner/adapter-usage.cjs +5 -3
  452. package/dist/runner/adapter-usage.cjs.map +1 -1
  453. package/dist/runner/adapter-usage.d.cts +2 -2
  454. package/dist/runner/adapter-usage.d.mts +2 -2
  455. package/dist/runner/adapter-usage.d.ts +2 -2
  456. package/dist/runner/adoption.cjs +10 -12
  457. package/dist/runner/adoption.cjs.map +1 -1
  458. package/dist/runner/attempt-notes.cjs +8 -0
  459. package/dist/runner/attempt-notes.cjs.map +1 -0
  460. package/dist/runner/attempt-notes.d.cts +4 -0
  461. package/dist/runner/attempt-notes.d.mts +4 -0
  462. package/dist/runner/attempt-notes.d.ts +4 -0
  463. package/dist/runner/attempt-notes.js +8 -0
  464. package/dist/runner/attempt-notes.js.map +1 -0
  465. package/dist/runner/attempt.cjs +61 -73
  466. package/dist/runner/attempt.cjs.map +1 -1
  467. package/dist/runner/attempt.d.cts +3 -3
  468. package/dist/runner/attempt.d.mts +3 -3
  469. package/dist/runner/attempt.d.ts +3 -3
  470. package/dist/runner/command-plan.cjs +21 -26
  471. package/dist/runner/command-plan.cjs.map +1 -1
  472. package/dist/runner/command-plan.d.cts +4 -4
  473. package/dist/runner/command-plan.d.mts +4 -4
  474. package/dist/runner/command-plan.d.ts +4 -4
  475. package/dist/runner/command-plan.js +4 -4
  476. package/dist/runner/config-identity.cjs.map +1 -1
  477. package/dist/runner/config-identity.d.cts +2 -2
  478. package/dist/runner/config-identity.d.mts +2 -2
  479. package/dist/runner/config-identity.d.ts +2 -2
  480. package/dist/runner/discover.cjs +6 -6
  481. package/dist/runner/discover.cjs.map +1 -1
  482. package/dist/runner/eval-selection.cjs +15 -1
  483. package/dist/runner/eval-selection.cjs.map +1 -1
  484. package/dist/runner/eval-selection.d.cts +4 -0
  485. package/dist/runner/eval-selection.d.mts +4 -0
  486. package/dist/runner/eval-selection.d.ts +4 -0
  487. package/dist/runner/feedback/human.cjs +1 -1
  488. package/dist/runner/feedback/human.cjs.map +1 -1
  489. package/dist/runner/feedback/json.cjs +4 -2
  490. package/dist/runner/feedback/json.cjs.map +1 -1
  491. package/dist/runner/feedback/json.d.cts +1 -1
  492. package/dist/runner/feedback/json.d.mts +1 -1
  493. package/dist/runner/feedback/json.d.ts +1 -1
  494. package/dist/runner/feedback/sink.cjs +1 -1
  495. package/dist/runner/feedback/sink.cjs.map +1 -1
  496. package/dist/runner/feedback/sink.d.cts +1 -1
  497. package/dist/runner/feedback/sink.d.mts +1 -1
  498. package/dist/runner/feedback/sink.d.ts +1 -1
  499. package/dist/runner/fingerprint.cjs +1 -1
  500. package/dist/runner/fingerprint.cjs.map +1 -1
  501. package/dist/runner/lock.cjs +1 -3
  502. package/dist/runner/lock.cjs.map +1 -1
  503. package/dist/runner/lock.d.cts +0 -2
  504. package/dist/runner/lock.d.mts +0 -2
  505. package/dist/runner/lock.d.ts +0 -2
  506. package/dist/runner/lock.js +14 -16
  507. package/dist/runner/project-target.cjs.map +1 -1
  508. package/dist/runner/project-target.d.cts +2 -2
  509. package/dist/runner/project-target.d.mts +2 -2
  510. package/dist/runner/project-target.d.ts +2 -2
  511. package/dist/runner/record/attachments.cjs +2 -2
  512. package/dist/runner/record/attachments.cjs.map +1 -1
  513. package/dist/runner/record/planning.cjs +8 -2
  514. package/dist/runner/record/planning.cjs.map +1 -1
  515. package/dist/runner/record.cjs +2 -0
  516. package/dist/runner/record.cjs.map +1 -1
  517. package/dist/runner/report.cjs +3 -3
  518. package/dist/runner/report.cjs.map +1 -1
  519. package/dist/runner/report.d.cts +1 -1
  520. package/dist/runner/report.d.mts +1 -1
  521. package/dist/runner/report.d.ts +1 -1
  522. package/dist/runner/reuse-plan.cjs +2 -2
  523. package/dist/runner/reuse-plan.cjs.map +1 -1
  524. package/dist/runner/run.cjs +10 -45
  525. package/dist/runner/run.cjs.map +1 -1
  526. package/dist/runner/sandbox-pool.cjs +1 -2
  527. package/dist/runner/sandbox-pool.cjs.map +1 -1
  528. package/dist/runner/setup-prefix-preparation.cjs +1 -1
  529. package/dist/runner/setup-prefix-preparation.cjs.map +1 -1
  530. package/dist/runner/teardown-registry.cjs +2 -2
  531. package/dist/runner/teardown-registry.cjs.map +1 -1
  532. package/dist/runner/teardown-registry.d.cts +1 -1
  533. package/dist/runner/teardown-registry.d.mts +1 -1
  534. package/dist/runner/teardown-registry.d.ts +1 -1
  535. package/dist/runner/types.cjs +4 -4
  536. package/dist/runner/types.cjs.map +1 -1
  537. package/dist/runner/types.d.cts +64 -92
  538. package/dist/runner/types.d.mts +64 -92
  539. package/dist/runner/types.d.ts +64 -92
  540. package/dist/runner/types.js +2 -2
  541. package/dist/sandbox/action.cjs +1 -1
  542. package/dist/sandbox/action.cjs.map +1 -1
  543. package/dist/sandbox/cli/contribution.cjs +17 -14
  544. package/dist/sandbox/cli/contribution.cjs.map +1 -1
  545. package/dist/sandbox/cli/contribution.d.cts +1 -1
  546. package/dist/sandbox/cli/contribution.d.mts +1 -1
  547. package/dist/sandbox/cli/contribution.d.ts +1 -1
  548. package/dist/sandbox/commands.cjs +1 -1
  549. package/dist/sandbox/commands.cjs.map +1 -1
  550. package/dist/sandbox/commands.d.cts +1 -1
  551. package/dist/sandbox/commands.d.mts +1 -1
  552. package/dist/sandbox/commands.d.ts +1 -1
  553. package/dist/sandbox/compose.cjs +2 -2
  554. package/dist/sandbox/compose.cjs.map +1 -1
  555. package/dist/sandbox/docker-profile/registry.cjs +5 -10
  556. package/dist/sandbox/docker-profile/registry.cjs.map +1 -1
  557. package/dist/sandbox/docker-profile/registry.d.cts +0 -4
  558. package/dist/sandbox/docker-profile/registry.d.mts +0 -4
  559. package/dist/sandbox/docker-profile/registry.d.ts +0 -4
  560. package/dist/sandbox/docker-profile/registry.js +6 -14
  561. package/dist/sandbox/docker-profile/runtime.cjs +1 -1
  562. package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
  563. package/dist/sandbox/docker-profile/schema.cjs +12 -16
  564. package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
  565. package/dist/sandbox/docker-profile/schema.d.cts +2 -6
  566. package/dist/sandbox/docker-profile/schema.d.mts +2 -6
  567. package/dist/sandbox/docker-profile/schema.d.ts +2 -6
  568. package/dist/sandbox/docker-profile/schema.js +24 -32
  569. package/dist/sandbox/incus.cjs +2 -2
  570. package/dist/sandbox/incus.cjs.map +1 -1
  571. package/dist/sandbox/index.cjs +4 -36
  572. package/dist/sandbox/index.cjs.map +1 -1
  573. package/dist/sandbox/index.d.cts +4 -8
  574. package/dist/sandbox/index.d.mts +4 -8
  575. package/dist/sandbox/index.d.ts +4 -8
  576. package/dist/sandbox/index.js +116 -174
  577. package/dist/sandbox/index.mjs +116 -174
  578. package/dist/sandbox/layer.cjs +3 -3
  579. package/dist/sandbox/layer.cjs.map +1 -1
  580. package/dist/sandbox/link.cjs +5 -0
  581. package/dist/sandbox/link.cjs.map +1 -1
  582. package/dist/sandbox/link.d.cts +3 -0
  583. package/dist/sandbox/link.d.mts +3 -0
  584. package/dist/sandbox/link.d.ts +3 -0
  585. package/dist/sandbox/runtime.cjs +9 -4
  586. package/dist/sandbox/runtime.cjs.map +1 -1
  587. package/dist/shared/failure-class.cjs +5 -5
  588. package/dist/shared/failure-class.cjs.map +1 -1
  589. package/dist/shared/failure-class.d.cts +4 -10
  590. package/dist/shared/failure-class.d.mts +4 -10
  591. package/dist/shared/failure-class.d.ts +4 -10
  592. package/dist/shared/types.cjs.map +1 -1
  593. package/dist/shared/types.d.cts +1 -1
  594. package/dist/shared/types.d.mts +1 -1
  595. package/dist/shared/types.d.ts +1 -1
  596. package/dist/show/contribution.cjs +17 -2
  597. package/dist/show/contribution.cjs.map +1 -1
  598. package/dist/show/contribution.d.cts +14 -0
  599. package/dist/show/contribution.d.mts +14 -0
  600. package/dist/show/contribution.d.ts +14 -0
  601. package/dist/show/model.cjs +8 -5
  602. package/dist/show/model.cjs.map +1 -1
  603. package/dist/show/model.d.cts +11 -8
  604. package/dist/show/model.d.mts +11 -8
  605. package/dist/show/model.d.ts +11 -8
  606. package/dist/show/render.cjs +34 -22
  607. package/dist/show/render.cjs.map +1 -1
  608. package/dist/sources/projector.cjs +1 -1
  609. package/dist/sources/projector.cjs.map +1 -1
  610. package/dist/types.cjs +1 -1
  611. package/dist/types.cjs.map +1 -1
  612. package/dist/types.d.cts +1 -1
  613. package/dist/types.d.mts +1 -1
  614. package/dist/types.d.ts +1 -1
  615. package/dist/types.js +2 -2
  616. package/dist/view/app-dist/.vite/manifest.json +2 -2
  617. package/dist/view/app-dist/assets/{index-B3ijZRph.js → index-CxrOUvHC.js} +17 -17
  618. package/dist/view/app-dist/assets/{quality-cost-scatter-B--DfJ9s.js → quality-cost-scatter-B6Aiss7x.js} +1 -1
  619. package/dist/view/app-dist/index.html +1 -1
  620. package/dist/view/cli/contribution.cjs +1 -1
  621. package/dist/view/cli/contribution.cjs.map +1 -1
  622. package/dist/view/function-runtime.mjs +318 -121
  623. package/dist/view/http-protocol.d.cts +1 -1
  624. package/dist/view/http-protocol.d.mts +1 -1
  625. package/dist/view/http-protocol.d.ts +1 -1
  626. package/dist/view/inspection-host.cjs +2 -2
  627. package/dist/view/inspection-host.cjs.map +1 -1
  628. package/dist/view/inspection-host.d.cts +349 -331
  629. package/dist/view/inspection-host.d.mts +349 -331
  630. package/dist/view/inspection-host.d.ts +349 -331
  631. package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +9 -9
  632. package/docs-site/zh/examples/integrations/claude-sdk.mdx +8 -8
  633. package/docs-site/zh/examples/integrations/codex-sdk.mdx +4 -4
  634. package/docs-site/zh/examples/integrations/langgraph.mdx +6 -6
  635. package/docs-site/zh/examples/integrations/pi-sdk.mdx +8 -8
  636. package/docs-site/zh/explanation/adapter.mdx +6 -6
  637. package/docs-site/zh/explanation/assert.mdx +7 -7
  638. package/docs-site/zh/explanation/drive.mdx +4 -4
  639. package/docs-site/zh/explanation/hitl.mdx +2 -2
  640. package/docs-site/zh/explanation/judge.mdx +3 -3
  641. package/docs-site/zh/index.mdx +18 -0
  642. package/docs-site/zh/introduction.mdx +4 -3
  643. package/docs-site/zh/reference/builtin-agents.mdx +46 -49
  644. package/docs-site/zh/reference/cli.mdx +16 -14
  645. package/docs-site/zh/reference/define-agent.mdx +19 -19
  646. package/docs-site/zh/reference/define-config.mdx +7 -15
  647. package/docs-site/zh/reference/define-eval.mdx +20 -14
  648. package/docs-site/zh/reference/define-experiment.mdx +18 -39
  649. package/docs-site/zh/reference/events.mdx +1 -1
  650. package/docs-site/zh/reference/expect.mdx +21 -0
  651. package/docs-site/zh/reference/official-adapters.mdx +12 -5
  652. package/docs-site/zh/troubleshooting/debugging.mdx +2 -2
  653. package/docs-site/zh/troubleshooting/recover-after-kill.mdx +1 -1
  654. package/docs-site/zh/tutorials/agent-onboarding.mdx +2 -2
  655. package/docs-site/zh/tutorials/authoring.mdx +4 -3
  656. package/docs-site/zh/tutorials/compare-runs.mdx +1 -1
  657. package/docs-site/zh/tutorials/concurrency.mdx +8 -8
  658. package/docs-site/zh/tutorials/configuration.mdx +5 -5
  659. package/docs-site/zh/tutorials/control-run-cost.mdx +49 -9
  660. package/docs-site/zh/tutorials/eval-groups.mdx +1 -1
  661. package/docs-site/zh/tutorials/evaluation-kinds.mdx +5 -5
  662. package/docs-site/zh/tutorials/experiment-services.mdx +32 -32
  663. package/docs-site/zh/tutorials/handle-execution-failures.mdx +2 -28
  664. package/docs-site/zh/tutorials/plugins.mdx +49 -143
  665. package/docs-site/zh/tutorials/sandbox-agent.mdx +1 -1
  666. package/docs-site/zh/tutorials/sandbox-reuse.mdx +7 -7
  667. package/docs-site/zh/tutorials/upgrade-0-18.mdx +64 -0
  668. package/docs-site/zh/tutorials/upgrade-0-19.mdx +121 -0
  669. package/docs-site/zh/tutorials/upgrade-0-20.mdx +12 -0
  670. package/docs-site/zh/tutorials/verify-judge.mdx +4 -3
  671. package/docs-site/zh/tutorials/viewing-results.mdx +2 -2
  672. package/docs-site/zh/tutorials/write-experiment.mdx +1 -1
  673. package/docs-site/zh/tutorials/write-send.mdx +13 -13
  674. package/package.json +1 -1
  675. package/dist/agents/effect-runtime.cjs.map +0 -1
  676. package/dist/agents/effect-runtime.d.cts +0 -29
  677. package/dist/agents/effect-runtime.d.mts +0 -29
  678. package/dist/agents/effect-runtime.d.ts +0 -29
  679. package/dist/agents/effect-runtime.js +0 -16
  680. package/dist/agents/effect-runtime.js.map +0 -1
  681. package/dist/agents/session-slot.cjs.map +0 -1
  682. package/dist/agents/session-slot.d.cts +0 -12
  683. package/dist/agents/session-slot.d.mts +0 -12
  684. package/dist/agents/session-slot.d.ts +0 -12
  685. package/dist/agents/session-slot.js +0 -6
  686. package/dist/agents/session-slot.js.map +0 -1
  687. package/dist/model-slots.cjs.map +0 -1
  688. package/dist/model-slots.d.cts +0 -19
  689. package/dist/model-slots.d.mts +0 -19
  690. package/dist/model-slots.d.ts +0 -19
  691. package/dist/model-slots.js +0 -8
  692. package/dist/model-slots.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["runt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Q,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,UAAU;QAC5D,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;IAC5D,IAAA,sCAAwB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnC,kBAAkB,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACvH,OAAO,OAAO,CAAC,KAAK,CAAC,KAAiD,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnG,CAAC","sourcesContent":["// @concord-file ne-eval-assertions-runtime\n// @concord-implements docs/feature/assertions/README.md\n// @concord-implements docs/feature/assertions/library.md\n// @concord-implements docs/feature/assertions/library/scoped-assertions.md\n// @concord-implements docs/feature/assertions/library/score-points.md\n// @concord-implements docs/feature/verdict/README.md\nimport { validateMaterialQAInputs, captureContextualMatch, captureUnavailableContextualMatch, materialExistenceRegistration, materialQARegistration, contextBooleanRegistration, contextScoreRegistration } from \"./material.ts\";\nimport { isContextualMatch, contextMatchDefinitionOf, type ContextualMatch, type MaterialMatch } from \"./context-match.ts\";\nimport { optionsFor, type JudgePresetOptions } from \"./judge-presets.ts\";\nimport { Cause, Deferred, Effect, Schema } from \"effect\";\nimport type { SourceLoc } from \"../shared/types.ts\";\nimport type { ResolvedJudgeConfig } from \"./types.ts\";\nimport { isJudgeImage } from \"../judge/image.ts\";\nimport { assertionHandleBrand, AssertionAuthoringClosedError, type AssertionCoverage, type AssertionCollectionReceipt, type AssertionCriterion, type AssertionDisplay, type AssertionEvaluationKind, type AssertionLimitation, type AssertionMaterial, type AssertionResult, type AssertionScoreContribution, type AssertionSealError, type AssertionSealOptions, type AssertionSnapshotObject, type AssertionSnapshotValue, type AssertionStopError, type AssertionStopExecutor, type AssertionsContext, type AssertionsRuntime, type BooleanAssertionHandle, type BooleanAssertionEvaluation, type BooleanAssertionRegistration, type CapturedAssertionSnapshot, type MeasurementAssertionEvaluation, type MeasurementAssertionRegistration, type MatcherQueryArtifact, type PassBooleanAssertionHandle, type PostRunBooleanAssertionHandle, type ScoreBooleanAssertionHandle, type SealedAssertionEntry, type SealedAssertionEvaluation, type SealedAssertionsRuntime, } from \"./api.ts\";\nimport { collectionMatchRegistration } from \"./collection.ts\";\nimport { assertManagedValueMatch, evaluateBooleanMatch, evaluateScoreMatch, isManagedCollectionMatch, isManagedEventMatch, isManagedToolMatch, isNumericComparisonMatch, looksLikeCollectionMatch, managedScoreMatchOf, exactLlmOptions, type BooleanMatch, type CollectionMatch, type MatchDiagnostic, type ManagedToolCalls, type ManagedEventOccurrences, type NumericComparisonMatch, type NumericMaterial, type ScoreMatch, type ToolMatch, } from \"./match.ts\";\nimport { prepareManagedScoreMatch } from \"./score-match-gateway.ts\";\nimport { assertionRuntimeLimits } from \"./limits.ts\";\nimport { numericBooleanRegistration } from \"./numeric.ts\";\nimport { transferFullAssertionContent } from \"./full-content.ts\";\nconst unitRatio = Schema.Finite.check(Schema.isBetween({ minimum: 0, maximum: 1 }));\nconst weightedScoreInput = Schema.Struct({\n ratio: Schema.Union([\n unitRatio,\n Schema.Struct({ state: Schema.Literal(\"exact\"), value: unitRatio }),\n Schema.Struct({ state: Schema.Literal(\"lower-bound\"), value: Schema.Finite }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.String }),\n ]),\n weight: Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)),\n});\nconst UTF8 = new TextEncoder();\nconst runtimeByCheck = new WeakMap<object, AssertionsRuntimeImplementation>();\ninterface AssertionContextReceiver {\n readonly owner: object;\n read?: () => unknown;\n cut?: () => import(\"./api.ts\").MatcherSourceSnapshot;\n release?: () => void;\n}\nconst contextByCheck = new WeakMap<object, AssertionContextReceiver>();\n/** @internal Binding is Attempt-local and happens only after app assembly. */\nexport function bindAssertionContext(check: object, read: () => unknown, cut?: () => import(\"./api.ts\").MatcherSourceSnapshot, release?: () => void): void {\n runtimeByCheck.get(check)?.assertAuthoringOpen();\n const receiver = contextByCheck.get(check);\n if (receiver === undefined || receiver.read !== undefined)\n throw new TypeError(\"Assertion context must bind exactly once to its owning receiver\");\n receiver.read = read;\n receiver.cut = cut;\n receiver.release = release;\n}\n/** @internal A scope owns its ctx and observation cut while sharing the Attempt runtime. */\nexport function createScopedAssertionCheck<Kind extends import(\"./api.ts\").AssertionCheckKind, C>(root: object, read: () => unknown, cut: () => import(\"./api.ts\").MatcherSourceSnapshot, release?: () => void): import(\"./api.ts\").AssertionCheck<Kind, C> {\n const runtime = runtimeByCheck.get(root);\n const receiver = contextByCheck.get(root);\n if (runtime === undefined || receiver === undefined)\n throw new TypeError(\"Scoped checks require an Assertion runtime\");\n runtime.assertAuthoringOpen();\n const scoped = (...args: readonly unknown[]) => runtime.checkFor(scoped, args);\n const scopedReceiver: AssertionContextReceiver = { owner: receiver.owner, read, cut, release };\n runtimeByCheck.set(scoped, runtime);\n contextByCheck.set(scoped, scopedReceiver);\n runtime.trackContextReceiver(scopedReceiver);\n return scoped as unknown as import(\"./api.ts\").AssertionCheck<Kind, C>;\n}\nconst assertionHandleRegistry = new WeakSet<object>();\n/** @internal Shared author-boundary guard for check() and Judge dispatch. */\nexport function assertAssertionSubject(value: unknown, operation: \"check\" | \"judge\"): void {\n if (typeof value === \"object\" && value !== null && assertionHandleRegistry.has(value)) {\n throw new TypeError(`${operation}() cannot use an AssertionHandle as a subject`);\n }\n}\ntype EntryKind = \"boolean\" | \"measurement\" | \"direct-score\";\ninterface SettlementDiagnostic {\n readonly diagnostic?: MatchDiagnostic;\n readonly explanation?: AssertionSnapshotObject;\n readonly receipt?: AssertionCollectionReceipt;\n readonly matcherArtifact?: MatcherQueryArtifact;\n}\ntype AvailableResult = ({\n readonly state: \"matched\";\n readonly value: unknown;\n} & SettlementDiagnostic) | ({\n readonly state: \"mismatched\";\n} & SettlementDiagnostic) | ({\n readonly state: \"measured\";\n readonly value: number;\n} & SettlementDiagnostic);\ntype EntrySettlement = AvailableResult | ({\n readonly state: \"unavailable\";\n readonly reason: \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\";\n} & SettlementDiagnostic) | ({\n readonly state: \"not-applicable\";\n} & SettlementDiagnostic) | ({\n readonly state: \"errored\";\n} & SettlementDiagnostic) | ({\n readonly state: \"interrupted\";\n} & SettlementDiagnostic);\ninterface AssertionEntry {\n readonly index: number;\n readonly kind: EntryKind;\n readonly criterion: AssertionCriterion;\n readonly subject: AssertionMaterial;\n readonly evidence: readonly AssertionMaterial[];\n readonly initialCoverage: AssertionCoverage;\n readonly initialLimitations: readonly AssertionLimitation[];\n readonly evaluate: () => Effect.Effect<EntrySettlement, unknown, never>;\n readonly display: {\n key: string | undefined;\n label: string | undefined;\n groupPath: string[];\n };\n readonly directScorePoints: number | undefined;\n readonly interruptedMatcherArtifact: MatcherQueryArtifact | undefined;\n readonly terminalReceipt: (() => import(\"./api.ts\").AssertionCollectionReceipt) | undefined;\n readonly terminalDetail: (() => AssertionSnapshotObject) | undefined;\n readonly terminalEvidence: (() => readonly AssertionMaterial[]) | undefined;\n readonly terminalCriterion: (() => AssertionCriterion) | undefined;\n optionalConfigured: boolean;\n gateConfigured: boolean;\n conditionMinimum: number | undefined;\n scorePoints: number | undefined;\n configurationClosed: boolean;\n stopConfigured: boolean;\n stopPromise: Promise<unknown> | undefined;\n settled: EntrySettlement | undefined;\n pending: Deferred.Deferred<EntrySettlement> | undefined;\n sealedEvidence: readonly AssertionMaterial[] | undefined;\n}\n/**\n * Source navigation remains a Runner-owned observation. These types are\n * intentionally package-internal: neither the author-facing handle nor the\n * sealed Assertion value acquires a source field or durable identity.\n */\nexport type AssertionRuntimeSourceRole = \"declaration\" | \"threshold\" | \"score\" | \"gate\" | \"optional\" | \"stop\";\nexport interface AssertionRuntimeSourceSite {\n readonly location: SourceLoc;\n readonly sourceOrder: number;\n}\nexport interface AssertionRuntimeSourceOccurrence {\n readonly role: AssertionRuntimeSourceRole;\n readonly site?: AssertionRuntimeSourceSite;\n readonly outcome?: \"continued\" | \"stopped\" | \"interrupted\";\n}\nexport interface AssertionsRuntimeSourceCaptureSnapshot {\n readonly entries: readonly {\n readonly occurrences: readonly AssertionRuntimeSourceOccurrence[];\n }[];\n}\ninterface MutableAssertionRuntimeSourceOccurrence {\n readonly role: AssertionRuntimeSourceRole;\n readonly site?: AssertionRuntimeSourceSite;\n outcome?: \"continued\" | \"stopped\" | \"interrupted\";\n}\ninterface AssertionRuntimeSourceEntry {\n readonly occurrences: MutableAssertionRuntimeSourceOccurrence[];\n}\ninterface AssertionsRuntimeSourceCapture {\n readonly capture: () => AssertionRuntimeSourceSite | undefined;\n readonly entries: AssertionRuntimeSourceEntry[];\n readonly byEntry: WeakMap<AssertionEntry, AssertionRuntimeSourceEntry>;\n}\nconst sourceCaptureByRuntime = new WeakMap<AssertionsRuntimeImplementation, AssertionsRuntimeSourceCapture>();\ninterface SnapshotState {\n truncated: boolean;\n omittedBytes: number;\n readonly seen: WeakSet<object>;\n}\ntype AvailableScoreContribution = Extract<AssertionScoreContribution, {\n readonly state: \"not-scored\" | \"earned\";\n}>;\ntype IncompleteScoreContribution = Extract<AssertionScoreContribution, {\n readonly state: \"not-scored\" | \"unavailable\";\n}>;\nfunction isRecord(value: unknown): value is globalThis.Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction isAssertionStop(value: unknown): value is AssertionStopError {\n return isRecord(value) && value._tag === \"AssertionStopError\";\n}\nfunction isInterruptedAuthoringClosure(value: unknown): boolean {\n return value instanceof AssertionAuthoringClosedError && value.reason === \"attempt-interrupted\";\n}\nfunction assertFiniteNonNegative(value: unknown, owner: string): asserts value is number {\n if (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) {\n throw new TypeError(`${owner} must be a finite non-negative number`);\n }\n}\nfunction assertUnitInterval(value: unknown, owner: string): asserts value is number {\n if (typeof value !== \"number\" || !Number.isFinite(value) || value < 0 || value > 1) {\n throw new TypeError(`${owner} must be a finite number in [0, 1]`);\n }\n}\nfunction assertDisplayText(value: unknown, owner: string): asserts value is string {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`${owner} must be a non-empty string`);\n }\n if (/\\p{Cc}/u.test(value)) {\n throw new TypeError(`${owner} must not contain control characters`);\n }\n if (Array.from(value).length > assertionRuntimeLimits.displayCodePoints) {\n throw new TypeError(`${owner} must be at most ${assertionRuntimeLimits.displayCodePoints} code points`);\n }\n}\nfunction marker(value: string): AssertionSnapshotObject {\n return Object.freeze({ $niceeval: value });\n}\nfunction omittedBytes(value: string): number {\n return UTF8.encode(value).byteLength;\n}\nfunction markTruncated(state: SnapshotState, bytes = 1): void {\n state.truncated = true;\n state.omittedBytes += Math.max(1, bytes);\n}\nfunction boundedSnapshotString(value: string, state: SnapshotState): string {\n const bytes = omittedBytes(value);\n if (bytes <= assertionRuntimeLimits.stringBytes)\n return value;\n let retainedBytes = 0;\n let retainedEnd = 0;\n for (const point of value) {\n const pointBytes = omittedBytes(point);\n if (retainedBytes + pointBytes > assertionRuntimeLimits.stringBytes)\n break;\n retainedBytes += pointBytes;\n retainedEnd += point.length;\n }\n markTruncated(state, bytes - retainedBytes);\n return value.slice(0, retainedEnd);\n}\nfunction boundedSnapshotKey(key: string, index: number, existing: ReadonlySet<string>, state: SnapshotState): string {\n if (omittedBytes(key) <= assertionRuntimeLimits.stringBytes)\n return key;\n markTruncated(state, omittedBytes(key));\n let replacement = `$niceeval:truncated-key:${index}`;\n let suffix = 0;\n while (existing.has(replacement)) {\n suffix += 1;\n replacement = `$niceeval:truncated-key:${index}:${suffix}`;\n }\n return replacement;\n}\n/**\n * Produces a bounded, safe-to-persist view without changing the actual value\n * consumed by a Match. Non-JSON runtime objects remain visible only as a\n * tagged placeholder and make the entry's material explicitly partial.\n */\nfunction boundedSnapshotValue(value: unknown, depth: number, state: SnapshotState): AssertionSnapshotValue {\n if (value === null || typeof value === \"boolean\")\n return value;\n if (typeof value === \"number\") {\n if (Number.isFinite(value))\n return value;\n markTruncated(state, String(value).length);\n return marker(\"non-finite-number\");\n }\n if (typeof value === \"string\") {\n return boundedSnapshotString(value, state);\n }\n if (typeof value === \"undefined\") {\n // undefined has no JSON primitive representation, but the tagged\n // placeholder below preserves the fact exactly. It is therefore complete\n // snapshot material; only values that cannot be represented safely or\n // boundedly should make coverage partial.\n return marker(\"undefined\");\n }\n if (typeof value === \"bigint\" || typeof value === \"symbol\" || typeof value === \"function\") {\n markTruncated(state, String(value).length);\n return marker(typeof value);\n }\n if (depth >= assertionRuntimeLimits.jsonDepth) {\n markTruncated(state);\n return marker(\"depth-truncated\");\n }\n if (state.seen.has(value)) {\n markTruncated(state);\n return marker(\"cyclic-or-shared-reference\");\n }\n state.seen.add(value);\n if (Array.isArray(value)) {\n const length = Math.min(value.length, assertionRuntimeLimits.jsonArrayItems);\n if (length < value.length)\n markTruncated(state, value.length - length);\n const entries: AssertionSnapshotValue[] = [];\n for (let index = 0; index < length; index += 1) {\n try {\n const descriptor = Object.getOwnPropertyDescriptor(value, String(index));\n if (descriptor === undefined) {\n markTruncated(state);\n entries.push(marker(\"array-hole\"));\n }\n else if (!(\"value\" in descriptor)) {\n markTruncated(state);\n entries.push(marker(\"accessor-element\"));\n }\n else {\n entries.push(boundedSnapshotValue(descriptor.value, depth + 1, state));\n }\n }\n catch {\n markTruncated(state);\n entries.push(marker(\"unreadable-element\"));\n }\n }\n return Object.freeze(entries);\n }\n if (value instanceof Date) {\n const time = value.getTime();\n if (!Number.isFinite(time)) {\n markTruncated(state);\n return marker(\"invalid-date\");\n }\n markTruncated(state);\n return Object.freeze({ $niceeval: \"date\", value: value.toISOString() });\n }\n let keys: readonly string[];\n try {\n keys = Object.keys(value);\n }\n catch {\n markTruncated(state);\n return marker(\"uninspectable-object\");\n }\n const length = Math.min(keys.length, assertionRuntimeLimits.jsonObjectKeys);\n if (length < keys.length)\n markTruncated(state, keys.length - length);\n const entries: Array<readonly [\n string,\n AssertionSnapshotValue\n ]> = [];\n const reservedKeys = new Set(keys);\n for (let index = 0; index < length; index += 1) {\n const key = keys[index];\n if (key === undefined)\n continue;\n const capturedKey = boundedSnapshotKey(key, index, reservedKeys, state);\n reservedKeys.add(capturedKey);\n try {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !(\"value\" in descriptor)) {\n markTruncated(state);\n entries.push([capturedKey, marker(\"accessor-property\")]);\n }\n else {\n entries.push([\n capturedKey,\n boundedSnapshotValue(descriptor.value, depth + 1, state),\n ]);\n }\n }\n catch {\n markTruncated(state);\n entries.push([capturedKey, marker(\"unreadable-property\")]);\n }\n }\n return Object.freeze(Object.fromEntries(entries));\n}\nexport function captureAssertionSnapshot(value: unknown): CapturedAssertionSnapshot {\n const state: SnapshotState = {\n truncated: false,\n omittedBytes: 0,\n seen: new WeakSet<object>(),\n };\n const snapshot = boundedSnapshotValue(value, 0, state);\n const material: Extract<AssertionMaterial, {\n readonly kind: \"snapshot\";\n }> = Object.freeze({\n kind: \"snapshot\",\n value: snapshot,\n });\n if (!state.truncated) {\n return Object.freeze({\n material,\n coverage: Object.freeze({ state: \"complete\" as const }),\n limitations: Object.freeze([]),\n });\n }\n return Object.freeze({\n material,\n coverage: Object.freeze({ state: \"partial\" as const, reason: \"truncated\" as const }),\n limitations: Object.freeze([\n Object.freeze({\n kind: \"truncated\" as const,\n omittedBytes: Math.max(1, state.omittedBytes),\n }),\n ]),\n });\n}\n/**\n * Matcher diagnostics are runtime objects, but sealed Assertions need a\n * bounded JSON copy that keeps their tree (field children and locators) for\n * fixed query/View readers without granting those readers evaluator authority.\n */\nfunction captureMatchDiagnostic(value: MatchDiagnostic | undefined, depth = 0, seen = new WeakSet<object>(), budget = { remainingNodes: assertionRuntimeLimits.diagnosticNodes }): AssertionSnapshotObject | undefined {\n if (value === undefined)\n return undefined;\n if (budget.remainingNodes <= 0) {\n return Object.freeze({\n code: \"diagnostic-truncated\",\n message: \"matcher diagnostic exceeded the persisted node limit\",\n path: Object.freeze([]),\n });\n }\n budget.remainingNodes -= 1;\n if (depth >= assertionRuntimeLimits.diagnosticDepth || seen.has(value)) {\n return Object.freeze({\n code: \"diagnostic-truncated\",\n message: depth >= assertionRuntimeLimits.diagnosticDepth\n ? \"matcher diagnostic exceeded the persisted depth limit\"\n : \"matcher diagnostic contained a cycle\",\n path: Object.freeze([]),\n });\n }\n seen.add(value);\n try {\n const text = (input: string): string => {\n const state: SnapshotState = { truncated: false, omittedBytes: 0, seen: new WeakSet<object>() };\n return boundedSnapshotString(input, state);\n };\n const output: globalThis.Record<string, AssertionSnapshotValue> = {\n code: text(value.code),\n message: text(value.message),\n path: Object.freeze(value.path.map((segment) => typeof segment === \"string\" ? text(segment) : segment)),\n };\n if (value.expected !== undefined)\n output.expected = text(value.expected);\n if (value.received !== undefined)\n output.received = text(value.received);\n if (value.reason !== undefined)\n output.reason = text(value.reason);\n if (value.locator !== undefined) {\n output.locator = value.locator.kind === \"json-pointer\"\n ? Object.freeze({ kind: \"json-pointer\", pointer: text(value.locator.pointer) })\n : Object.freeze({ kind: \"tool-occurrence\", id: text(value.locator.id) });\n }\n if (value.truncation !== undefined) {\n output.truncation = Object.freeze({ ...value.truncation });\n }\n if (value.children !== undefined) {\n const children: AssertionSnapshotValue[] = [];\n for (const child of value.children.slice(0, assertionRuntimeLimits.jsonArrayItems)) {\n if (budget.remainingNodes <= 0)\n break;\n const entry: globalThis.Record<string, AssertionSnapshotValue> = {\n index: child.index,\n state: child.state,\n };\n if (child.label !== undefined)\n entry.label = text(child.label);\n const diagnostic = captureMatchDiagnostic(child.diagnostic, depth + 1, seen, budget);\n if (diagnostic !== undefined)\n entry.diagnostic = diagnostic;\n children.push(Object.freeze(entry));\n }\n output.children = Object.freeze(children);\n if (children.length < value.children.length && output.truncation === undefined) {\n output.truncation = Object.freeze({\n code: \"diagnostic-truncated\",\n reason: \"sampled\",\n captured: children.length,\n knownTotal: value.children.length,\n });\n }\n }\n const captured = Object.freeze(output);\n const serialized = JSON.stringify(captured);\n const originalBytes = UTF8.encode(serialized).byteLength;\n if (originalBytes <= assertionRuntimeLimits.diagnosticBytes)\n return captured;\n return Object.freeze({\n code: output.code,\n message: output.message,\n path: output.path,\n ...(output.expected === undefined ? {} : { expected: output.expected }),\n ...(output.received === undefined ? {} : { received: output.received }),\n ...(output.reason === undefined ? {} : { reason: output.reason }),\n ...(output.locator === undefined ? {} : { locator: output.locator }),\n truncation: Object.freeze({\n code: \"diagnostic-truncated\",\n reason: \"byte-limit\",\n limitBytes: assertionRuntimeLimits.diagnosticBytes,\n originalBytes,\n }),\n });\n }\n finally {\n seen.delete(value);\n }\n}\nfunction freezeAssertionMaterial(material: AssertionMaterial): AssertionMaterial {\n if (material.kind === \"snapshot\") {\n const frozen = Object.freeze({ kind: \"snapshot\" as const, value: material.value });\n transferFullAssertionContent(material, frozen);\n return frozen;\n }\n if (material.kind === \"judge-image\") {\n if (!isJudgeImage(material.image))\n throw new TypeError(\"judge-image material requires a judgeImage() value\");\n return Object.freeze({ kind: \"judge-image\", image: material.image });\n }\n if (typeof material.preview !== \"string\" || material.preview.trim() === \"\") {\n throw new TypeError(\"record-attachment material requires a non-empty preview\");\n }\n return Object.freeze({\n kind: \"record-attachment\",\n preview: material.preview,\n });\n}\nfunction cloneCoverage(coverage: AssertionCoverage): AssertionCoverage {\n return Object.freeze({ ...coverage });\n}\nfunction cloneLimitations(limitations: readonly AssertionLimitation[]): readonly AssertionLimitation[] {\n return Object.freeze(limitations.map((limitation) => Object.freeze({ ...limitation })));\n}\nfunction noScore(): Extract<AssertionScoreContribution, {\n readonly state: \"not-scored\";\n}> {\n return Object.freeze({ state: \"not-scored\" as const });\n}\nfunction earnedScore(points: number, earned: number): Extract<AssertionScoreContribution, {\n readonly state: \"earned\";\n}> {\n return Object.freeze({ state: \"earned\" as const, points, earned });\n}\nfunction unavailableScore(points: number, reason: Extract<AssertionScoreContribution, {\n readonly state: \"unavailable\";\n}>[\"reason\"]): Extract<AssertionScoreContribution, {\n readonly state: \"unavailable\";\n}> {\n return Object.freeze({ state: \"unavailable\" as const, points, reason });\n}\nclass HandleBase {\n readonly [assertionHandleBrand] = true as const;\n constructor(protected readonly runtime: AssertionsRuntimeImplementation, protected readonly entry: AssertionEntry) {\n assertionHandleRegistry.add(this);\n }\n key(value: string): this {\n this.runtime.configureKey(this.entry, value);\n return this;\n }\n label(value: string): this {\n this.runtime.configureLabel(this.entry, value);\n return this;\n }\n group(title: string): this {\n this.runtime.configureGroup(this.entry, title);\n return this;\n }\n}\nclass BooleanHandle extends HandleBase {\n readonly kind = \"boolean\" as const;\n optional(): this {\n this.runtime.configureOptional(this.entry);\n return this;\n }\n gate(...extra: readonly unknown[]): this {\n if (extra.length > 0)\n throw new TypeError(\"gate() accepts no arguments\");\n this.runtime.configureGate(this.entry);\n return this;\n }\n score(points: number): this {\n this.runtime.configureScore(this.entry, points);\n return this;\n }\n orStop(...extra: readonly unknown[]): Promise<unknown> {\n if (extra.length > 0)\n throw new TypeError(\"Boolean orStop() accepts no arguments\");\n return this.runtime.requestStopBoolean(this.entry);\n }\n}\nfunction isScoreBooleanAssertionHandle<Refined>(handle: PassBooleanAssertionHandle<Refined> | ScoreBooleanAssertionHandle<Refined>): handle is ScoreBooleanAssertionHandle<Refined> {\n return \"score\" in handle && typeof handle.score === \"function\";\n}\n/**\n * Gives a post-run producer a configuration-only view of an ordinary Boolean\n * entry. Keeping this as a distinct, null-prototype object matters at the\n * JavaScript boundary too: a cast must not recover `orStop()` and force a\n * deferred producer to evaluate before its Attempt has frozen its evidence.\n */\nexport function postRunBooleanAssertionHandle<Kind extends AssertionEvaluationKind, Refined>(handle: BooleanAssertionHandle<Kind, Refined>, evaluationKind: Kind): PostRunBooleanAssertionHandle<Kind, Refined> {\n const view = Object.create(null) as object;\n const descriptor = (value: unknown): PropertyDescriptor => ({\n value,\n enumerable: true,\n writable: false,\n configurable: false,\n });\n Object.defineProperties(view, {\n [assertionHandleBrand]: {\n value: true,\n enumerable: false,\n writable: false,\n configurable: false,\n },\n kind: descriptor(\"boolean\"),\n key: descriptor((value: string) => {\n handle.key(value);\n return view;\n }),\n label: descriptor((value: string) => {\n handle.label(value);\n return view;\n }),\n group: descriptor((title: string) => {\n handle.group(title);\n return view;\n }),\n ...(evaluationKind === \"pass\"\n ? (() => {\n const passHandle = handle as PassBooleanAssertionHandle<Refined>;\n return {\n optional: descriptor(() => {\n passHandle.optional();\n return view;\n }),\n gate: descriptor((...args: readonly unknown[]) => {\n if (args.length > 0)\n throw new TypeError(\"Boolean gate() accepts no arguments\");\n passHandle.gate();\n return view;\n }),\n };\n })()\n : {}),\n ...(evaluationKind === \"score\"\n ? (() => {\n if (!isScoreBooleanAssertionHandle(handle)) {\n throw new Error(\"Score post-run Boolean Assertion received a non-score handle\");\n }\n return {\n gate: descriptor((...args: readonly unknown[]) => {\n if (args.length > 0)\n throw new TypeError(\"Boolean gate() accepts no arguments\");\n handle.gate();\n return view;\n }),\n score: descriptor((points: number) => {\n handle.score(points);\n return view;\n }),\n };\n })()\n : {}),\n });\n assertionHandleRegistry.add(view);\n return Object.freeze(view) as PostRunBooleanAssertionHandle<Kind, Refined>;\n}\nclass MeasurementHandle extends HandleBase {\n readonly kind = \"measurement\" as const;\n gate(minimum: number, ...extra: readonly unknown[]): this {\n if (extra.length > 0)\n throw new TypeError(\"gate() accepts exactly one minimum\");\n this.runtime.configureMeasurementGate(this.entry, minimum);\n return this;\n }\n score(points: number): this {\n this.runtime.configureScore(this.entry, points);\n return this;\n }\n orStop(...args: readonly unknown[]): Promise<number> {\n return this.runtime.requestStopMeasurement(this.entry, args);\n }\n}\nclass DirectScoreHandle extends HandleBase {\n readonly kind = \"direct-score\" as const;\n}\nclass AssertionsRuntimeImplementation {\n private readonly contextReceivers = new Set<AssertionContextReceiver>();\n private readingContext = false;\n readonly t: AssertionsContext<AssertionEvaluationKind>;\n private readonly entries: AssertionEntry[] = [];\n private readonly groupStack: string[] = [];\n private stopped: AssertionStopError | undefined;\n private closing = false;\n private closingReason: \"attempt-sealing\" | \"attempt-interrupted\" = \"attempt-sealing\";\n private sealStarted = false;\n private sealed: SealedAssertionsRuntime | undefined;\n private retainedProducerBytes = 0;\n private readonly retentionByEntry = new WeakMap<AssertionEntry, {\n reserved: number;\n actual: () => number;\n settled: boolean;\n }>();\n private retainedImageBytes = 0;\n constructor(readonly evaluationKind: AssertionEvaluationKind, private readonly executeStop: AssertionStopExecutor, private readonly judge: ResolvedJudgeConfig | undefined, private readonly signal: AbortSignal | undefined, private readonly judgeUsage?: import(\"../o11y/judge-usage.ts\").JudgeUsageCollector) {\n const check = (...args: readonly unknown[]) => this.checkFor(check, args);\n const base = {\n evaluationKind,\n check,\n group: this.withGroup.bind(this),\n };\n runtimeByCheck.set(base.check, this);\n const receiver: AssertionContextReceiver = { owner: base.check };\n contextByCheck.set(base.check, receiver);\n this.trackContextReceiver(receiver);\n this.t = Object.freeze(evaluationKind === \"score\"\n ? { ...base, score: this.directScore.bind(this) }\n : base) as unknown as AssertionsContext<AssertionEvaluationKind>;\n }\n private recordSourceOccurrence(entry: AssertionEntry, role: AssertionRuntimeSourceRole): MutableAssertionRuntimeSourceOccurrence | undefined {\n const capture = sourceCaptureByRuntime.get(this);\n const capturedEntry = capture?.byEntry.get(entry);\n if (capturedEntry === undefined || capture === undefined)\n return undefined;\n let site: AssertionRuntimeSourceSite | undefined;\n try {\n site = capture.capture();\n }\n catch {\n // Source navigation must never change authoring or assertion behavior.\n }\n const occurrence: MutableAssertionRuntimeSourceOccurrence = {\n role,\n ...(site === undefined ? {} : { site }),\n };\n capturedEntry.occurrences.push(occurrence);\n return occurrence;\n }\n private contextualRegistration(check: object, match: ContextualMatch, qa?: {\n question: string;\n options?: JudgePresetOptions;\n }): BooleanHandle | MeasurementHandle {\n this.assertCanRegister();\n const receiver = contextByCheck.get(check);\n if (receiver?.read === undefined)\n throw new TypeError(\"Contextual Match requires an application-bound Assertion receiver\");\n const definition = contextMatchDefinitionOf(match);\n const managed = definition.kind === \"context-score\" ? managedScoreMatchOf(definition.match as ScoreMatch<unknown>) : undefined;\n const auditBytes = qa === undefined ? managed?.llm.maxAuditBytes ?? 0 : exactLlmOptions(optionsFor(\"close-qa\", qa.options ?? {}).llm).maxAuditBytes;\n const reservation = definition.capture.maxBytes + auditBytes + 64 * 1024;\n const admitted = this.retainedProducerBytes + reservation <= 64 * 1024 * 1024;\n if (admitted)\n this.retainedProducerBytes += reservation;\n let reserved = admitted ? reservation : 0;\n try {\n this.readingContext = true;\n let prepared: ReturnType<typeof captureContextualMatch>;\n try {\n const cut = admitted ? receiver.cut?.() : undefined;\n prepared = admitted ? captureContextualMatch(definition, receiver.read(), { owner: receiver.owner, ...(cut === undefined ? {} : { cut }) }) : captureUnavailableContextualMatch(definition, \"assertion-retention-budget\");\n }\n finally {\n this.readingContext = false;\n }\n const registration = qa !== undefined && prepared.kind === \"material\" ? materialQARegistration(prepared, qa.question, qa.options, this.judge, this.signal, this.judgeUsage?.forEntry(this.entries.length))\n : prepared.kind === \"material\" ? materialExistenceRegistration(prepared)\n : prepared.kind === \"context-boolean\" ? contextBooleanRegistration(prepared)\n : contextScoreRegistration(prepared, this.judge, this.signal, this.judgeUsage?.forEntry(this.entries.length));\n const actual = \"actualRetainedBytes\" in registration && typeof registration.actualRetainedBytes === \"function\" ? registration.actualRetainedBytes : () => prepared.sourceBytes;\n const retainedBytes = (registration.retainedBytes ?? prepared.sourceBytes) + 64 * 1024;\n this.retainedProducerBytes -= reserved;\n reserved = 0;\n const entryIndex = this.entries.length;\n const handle = qa !== undefined || prepared.kind === \"context-score\" ? this.registerMeasurement({ ...registration, retainedBytes } as MeasurementAssertionRegistration) : this.registerBoolean({ ...registration, retainedBytes } as BooleanAssertionRegistration<void>);\n const entry = this.entries[entryIndex]!;\n this.retentionByEntry.set(entry, { reserved: retainedBytes, actual, settled: false });\n return handle;\n }\n catch (error) {\n this.retainedProducerBytes -= reserved;\n throw error;\n }\n }\n checkFor(receiver: object, args: readonly unknown[]): BooleanHandle | MeasurementHandle {\n this.assertCanRegister();\n const value = args[0];\n const qa = typeof value === \"object\" && value !== null ? compiledMaterialQA.get(value) : undefined;\n if (qa !== undefined) {\n if (args.length !== 1)\n throw new TypeError(\"compiled closeQA Match accepts one argument\");\n return this.contextualRegistration(receiver, qa.selector, qa);\n }\n if (isContextualMatch(value)) {\n if (args.length !== 1)\n throw new TypeError(\"check(contextualMatch) accepts one argument\");\n return this.contextualRegistration(receiver, value);\n }\n return Reflect.apply(this.check, this, args) as BooleanHandle | MeasurementHandle;\n }\n check(value: import(\"./match.ts\").NumericMaterial, match: NumericComparisonMatch): BooleanHandle;\n check<Value, Refined extends Value>(value: Value, match: BooleanMatch<NoInfer<Value>, Refined, \"value\">): BooleanHandle;\n check<Value extends readonly unknown[]>(value: Value, match: NumericComparisonMatch): BooleanHandle;\n check(value: ManagedToolCalls, match: ToolMatch): BooleanHandle;\n check(value: ManagedEventOccurrences, match: import(\"./match.ts\").EventMatch): BooleanHandle;\n check<Value>(value: Value, match: CollectionMatch<NoInfer<Value>>): BooleanHandle;\n check<Value>(value: Value, match: ScoreMatch<NoInfer<Value>>): MeasurementHandle;\n check(value: unknown, match?: unknown, ...extra: readonly unknown[]): BooleanHandle | MeasurementHandle {\n if (extra.length > 0) {\n throw new TypeError(\"t.check() accepts exactly (value, match)\");\n }\n this.assertCanRegister();\n assertAssertionSubject(value, \"check\");\n if (isManagedCollectionMatch(match) ||\n looksLikeCollectionMatch(match) ||\n isManagedToolMatch(match) ||\n isManagedEventMatch(match) ||\n (Array.isArray(value) && isNumericComparisonMatch(match))) {\n return this.registerBoolean(collectionMatchRegistration(value, match));\n }\n const managed = assertManagedValueMatch(match, \"t.check() match\");\n if (managed.kind === \"boolean\") {\n if (isNumericComparisonMatch(managed)) {\n const material: import(\"./match.ts\").NumericMaterial = typeof value === \"object\" && value !== null && [\"exact\", \"lower-bound\", \"unavailable\"].includes(String((value as {\n state?: unknown;\n }).state))\n ? value as import(\"./match.ts\").NumericMaterial\n : typeof value === \"number\" && Number.isFinite(value)\n ? Object.freeze({ state: \"exact\" as const, value })\n : Object.freeze({ state: \"unavailable\" as const, reason: \"non-finite-number\" });\n const captured = captureAssertionSnapshot(Object.freeze({\n ...material,\n cut: Object.freeze({ kind: \"call-time\" as const }),\n coverage: Object.freeze({ state: \"complete\" as const }),\n derivation: Object.freeze({ kind: \"explicit-value\" as const }),\n }));\n return this.registerBoolean(numericBooleanRegistration({\n match: managed,\n criterionSubject: Object.freeze({ kind: \"explicit-value\" as const }),\n material,\n captured,\n matchedValue: (numericValue) => numericValue,\n }));\n }\n const captured = captureAssertionSnapshot(value);\n const entry = this.createEntry({\n kind: \"boolean\",\n criterion: Object.freeze({ kind: \"value-match\" as const, subject: \"explicit-value\" as const, matcher: Object.freeze({ state: \"declared\" as const, name: managed.name }) }),\n subject: captured.material,\n evidence: Object.freeze([]),\n coverage: captured.coverage,\n limitations: captured.limitations,\n evaluate: () => this.evaluateBooleanMatch(managed, value),\n });\n return new BooleanHandle(this, entry);\n }\n const managedScore = managedScoreMatchOf(managed);\n if (managedScore !== undefined) {\n return this.registerMeasurement(prepareManagedScoreMatch({\n match: managed,\n options: managedScore,\n material: value,\n judge: this.judge,\n ...(this.judgeUsage === undefined ? {} : { usage: this.judgeUsage.forEntry(this.entries.length) }),\n ...(this.signal === undefined ? {} : { signal: this.signal }),\n }));\n }\n const captured = captureAssertionSnapshot(value);\n const entry = this.createEntry({\n kind: \"measurement\",\n criterion: Object.freeze({ kind: \"value-match\" as const, subject: \"explicit-value\" as const, matcher: Object.freeze({ state: \"declared\" as const, name: managed.name }) }),\n subject: captured.material,\n evidence: Object.freeze([]),\n coverage: captured.coverage,\n limitations: captured.limitations,\n evaluate: () => this.evaluateScoreMatch(managed, value),\n });\n return new MeasurementHandle(this, entry);\n }\n registerBoolean<Refined>(definition: BooleanAssertionRegistration<Refined>): BooleanHandle {\n this.assertCanRegister();\n this.assertRegistration(definition, \"registerBoolean()\");\n const entry = this.createEntry({\n kind: \"boolean\",\n criterion: definition.criterion,\n subject: freezeAssertionMaterial(definition.subject),\n evidence: Object.freeze((definition.evidence ?? []).map(freezeAssertionMaterial)),\n coverage: cloneCoverage(definition.coverage ?? { state: \"complete\" }),\n limitations: cloneLimitations(definition.limitations ?? []),\n retainedBytes: definition.retainedBytes,\n terminalReceipt: definition.terminalReceipt,\n terminalCriterion: definition.terminalCriterion,\n interruptedMatcherArtifact: definition.interruptedMatcherArtifact,\n evaluate: () => Effect.suspend(definition.evaluate).pipe(Effect.map((evaluation): EntrySettlement => this.booleanSettlement(evaluation)), this.captureEvaluationFailure(definition.interruptedMatcherArtifact)),\n });\n return new BooleanHandle(this, entry);\n }\n registerMeasurement(definition: MeasurementAssertionRegistration): MeasurementHandle {\n this.assertCanRegister();\n this.assertRegistration(definition, \"registerMeasurement()\");\n const entry = this.createEntry({\n kind: \"measurement\",\n criterion: definition.criterion,\n subject: freezeAssertionMaterial(definition.subject),\n evidence: Object.freeze((definition.evidence ?? []).map(freezeAssertionMaterial)),\n coverage: cloneCoverage(definition.coverage ?? { state: \"complete\" }),\n limitations: cloneLimitations(definition.limitations ?? []),\n retainedBytes: definition.retainedBytes,\n retainedImageBytes: definition.retainedImageBytes,\n terminalReceipt: definition.terminalReceipt,\n terminalCriterion: definition.terminalCriterion,\n terminalDetail: definition.terminalDetail,\n terminalEvidence: definition.terminalEvidence,\n evaluate: () => Effect.suspend(definition.evaluate).pipe(Effect.map((evaluation): EntrySettlement => this.measurementSettlement(evaluation))),\n });\n return new MeasurementHandle(this, entry);\n }\n directScore(points: number): DirectScoreHandle;\n directScore(ratio: number | NumericMaterial, options: {\n readonly weight: number;\n }): MeasurementHandle;\n directScore(points: number | NumericMaterial, options?: {\n readonly weight: number;\n }, ...extra: readonly unknown[]): DirectScoreHandle | MeasurementHandle {\n this.assertCanRegister();\n if (this.evaluationKind !== \"score\") {\n throw new TypeError(\"t.score() is available only in a Score Eval\");\n }\n if (extra.length > 0)\n throw new TypeError(\"t.score() accepts points, or ratio and { weight }\");\n if (options !== undefined) {\n let decoded: typeof weightedScoreInput.Type;\n try {\n const weight = Schema.decodeUnknownSync(Schema.Struct({ weight: Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)) }), { onExcessProperty: \"error\" })(options).weight;\n decoded = Schema.decodeUnknownSync(weightedScoreInput)({ ratio: points, weight });\n }\n catch (cause) {\n throw new TypeError(\"t.score() requires a finite ratio in [0, 1] and a finite non-negative weight\", { cause });\n }\n const ratio = typeof decoded.ratio === \"number\" ? decoded.ratio\n : decoded.ratio.state === \"exact\" ? decoded.ratio.value : undefined;\n const captured = captureAssertionSnapshot({ ratio: points, weight: decoded.weight });\n const handle = this.registerMeasurement({\n criterion: Object.freeze({ kind: \"value-match\", subject: \"explicit-value\", matcher: Object.freeze({ state: \"declared\", name: \"author-weighted-score\" }) }),\n subject: captured.material,\n coverage: captured.coverage,\n limitations: captured.limitations,\n evaluate: () => Effect.succeed(ratio === undefined\n ? { state: \"unavailable\", reason: \"source-unavailable\", detail: { reason: typeof decoded.ratio !== \"number\" && decoded.ratio.state === \"unavailable\" ? decoded.ratio.reason : \"ratio-is-only-a-lower-bound\" } }\n : { state: \"measured\", value: ratio }),\n });\n handle.score(decoded.weight);\n return handle;\n }\n assertFiniteNonNegative(points, \"t.score() points\");\n const captured = captureAssertionSnapshot(points);\n const entry = this.createEntry({\n kind: \"direct-score\",\n criterion: Object.freeze({ kind: \"direct-score\" as const, source: \"author\" as const }),\n subject: captured.material,\n evidence: Object.freeze([]),\n coverage: captured.coverage,\n limitations: captured.limitations,\n directScorePoints: points,\n evaluate: () => Effect.succeed({ state: \"matched\", value: points }),\n });\n return new DirectScoreHandle(this, entry);\n }\n async withGroup<Value>(title: string, body: () => Value | PromiseLike<Value>): Promise<Awaited<Value>> {\n this.assertCanRegister();\n assertDisplayText(title, \"t.group() title\");\n if (this.groupStack.length >= assertionRuntimeLimits.groupDepth) {\n throw new Error(`Assertion group depth cannot exceed ${assertionRuntimeLimits.groupDepth}`);\n }\n this.groupStack.push(title);\n try {\n return await body() as Awaited<Value>;\n }\n finally {\n const popped = this.groupStack.pop();\n if (popped !== title) {\n throw new Error(\"Assertion group stack lost nesting order\");\n }\n }\n }\n configureKey(entry: AssertionEntry, value: string): void {\n this.assertMutable(entry, \"key()\");\n assertDisplayText(value, \"key() value\");\n if (entry.display.key !== undefined)\n throw new Error(\"An Assertion key is already configured\");\n entry.display.key = value;\n }\n configureLabel(entry: AssertionEntry, value: string): void {\n this.assertMutable(entry, \"label()\");\n assertDisplayText(value, \"label() value\");\n if (entry.display.label !== undefined)\n throw new Error(\"An Assertion label is already configured\");\n entry.display.label = value;\n }\n configureGroup(entry: AssertionEntry, title: string): void {\n this.assertMutable(entry, \"group()\");\n assertDisplayText(title, \"group() title\");\n if (entry.display.groupPath.length !== this.groupStack.length) {\n throw new Error(\"An Assertion group is already configured\");\n }\n if (entry.display.groupPath.length >= assertionRuntimeLimits.groupDepth) {\n throw new Error(`Assertion group depth cannot exceed ${assertionRuntimeLimits.groupDepth}`);\n }\n entry.display.groupPath.push(title);\n }\n configureOptional(entry: AssertionEntry): void {\n this.assertMutable(entry, \"optional()\");\n if (this.evaluationKind === \"score\") {\n throw new TypeError(\"optional() is not available in a Score Eval; every score contribution must be comparable\");\n }\n if (entry.optionalConfigured)\n throw new Error(\"An Assertion optional policy is already configured\");\n entry.optionalConfigured = true;\n this.recordSourceOccurrence(entry, \"optional\");\n }\n configureGate(entry: AssertionEntry): void {\n this.assertMutable(entry, \"gate()\");\n if (entry.kind === \"direct-score\")\n throw new TypeError(\"A direct-score Assertion cannot be a gate\");\n if (entry.kind === \"measurement\")\n throw new TypeError(\"A measurement gate requires gate(minimum)\");\n if (entry.gateConfigured)\n throw new Error(\"An Assertion gate policy is already configured\");\n entry.gateConfigured = true;\n this.recordSourceOccurrence(entry, \"gate\");\n }\n configureMeasurementGate(entry: AssertionEntry, minimum: number): void {\n this.assertMutable(entry, \"gate()\");\n if (entry.kind !== \"measurement\")\n throw new TypeError(\"gate(minimum) is available only on a measurement Assertion\");\n assertUnitInterval(minimum, \"gate() minimum\");\n if (entry.gateConfigured)\n throw new Error(\"An Assertion gate policy is already configured\");\n if (entry.conditionMinimum !== undefined)\n throw new Error(\"An Assertion measurement condition is already configured\");\n entry.conditionMinimum = minimum;\n entry.gateConfigured = true;\n this.recordSourceOccurrence(entry, \"gate\");\n }\n configureScore(entry: AssertionEntry, points: number): void {\n this.assertMutable(entry, \"score()\");\n if (this.evaluationKind !== \"score\") {\n throw new TypeError(\"handle.score() is available only in a Score Eval\");\n }\n if (entry.kind === \"direct-score\")\n throw new TypeError(\"A direct-score Assertion already has its score contribution\");\n assertFiniteNonNegative(points, \"score() points\");\n if (entry.scorePoints !== undefined)\n throw new Error(\"An Assertion score contribution is already configured\");\n entry.scorePoints = points;\n this.recordSourceOccurrence(entry, \"score\");\n }\n requestStopBoolean(entry: AssertionEntry): Promise<unknown> {\n if (entry.stopPromise !== undefined)\n return entry.stopPromise;\n this.prepareStop(entry, undefined);\n const result = this.observeStop(entry, this.requestStop(this.stopBoolean(entry)));\n entry.stopPromise = result;\n return result;\n }\n requestStopMeasurement(entry: AssertionEntry, args: readonly unknown[]): Promise<number> {\n if (args.length > 1)\n throw new TypeError(\"orStop() accepts zero arguments after gate(minimum), or exactly one minimum\");\n const suppliedMinimum = args.length === 1;\n if (suppliedMinimum)\n assertUnitInterval(args[0], \"orStop() minimum\");\n if (entry.stopPromise !== undefined) {\n if (suppliedMinimum)\n throw new Error(\"An Assertion measurement condition is already configured\");\n return entry.stopPromise as Promise<number>;\n }\n if (!suppliedMinimum && entry.conditionMinimum === undefined) {\n throw new TypeError(\"orStop() requires a minimum unless gate(minimum) already configured the condition\");\n }\n this.prepareStop(entry, suppliedMinimum ? args[0] as number : undefined);\n const result = this.observeStop(entry, this.requestStop(this.stopMeasurement(entry)));\n entry.stopPromise = result;\n return result;\n }\n private prepareStop(entry: AssertionEntry, minimum: number | undefined): void {\n this.assertMutable(entry, \"orStop()\");\n if (entry.kind === \"direct-score\")\n throw new TypeError(\"A direct-score Assertion cannot stop author control flow\");\n if (minimum !== undefined) {\n if (entry.kind !== \"measurement\")\n throw new TypeError(\"Only a measurement Assertion accepts orStop(minimum)\");\n if (entry.conditionMinimum !== undefined)\n throw new Error(\"An Assertion measurement condition is already configured\");\n entry.conditionMinimum = minimum;\n }\n entry.stopConfigured = true;\n entry.configurationClosed = true;\n }\n private observeStop<Value>(entry: AssertionEntry, result: Promise<Value>): Promise<Value> {\n const occurrence = this.recordSourceOccurrence(entry, \"stop\");\n return result.then((value) => {\n if (occurrence !== undefined && occurrence.outcome === undefined) {\n occurrence.outcome = \"continued\";\n }\n return value;\n }, (error: unknown) => {\n if (occurrence !== undefined && occurrence.outcome === undefined) {\n if (isAssertionStop(error))\n occurrence.outcome = \"stopped\";\n else if (isInterruptedAuthoringClosure(error))\n occurrence.outcome = \"interrupted\";\n }\n throw error;\n });\n }\n private requestStop<Value>(effect: Effect.Effect<Value, AssertionStopError, never>): Promise<Value> {\n if (this.stopped !== undefined)\n return Promise.reject(this.stopped);\n if (this.sealed !== undefined) {\n return Promise.reject(new AssertionAuthoringClosedError(\"attempt-sealed\"));\n }\n if (this.closing) {\n return Promise.reject(new AssertionAuthoringClosedError(this.closingReason));\n }\n try {\n return this.executeStop(effect);\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n private stopBoolean(entry: AssertionEntry): Effect.Effect<unknown, AssertionStopError> {\n return this.settleThrough(entry).pipe(Effect.flatMap((settlement) => {\n if (settlement.state === \"matched\")\n return Effect.succeed(settlement.value);\n return Effect.fail(this.latchStop(entry, settlement));\n }));\n }\n private stopMeasurement(entry: AssertionEntry): Effect.Effect<number, AssertionStopError> {\n return this.settleThrough(entry).pipe(Effect.flatMap((settlement) => {\n if (settlement.state === \"measured\"\n && entry.conditionMinimum !== undefined\n && settlement.value >= entry.conditionMinimum) {\n return Effect.succeed(settlement.value);\n }\n return Effect.fail(this.latchStop(entry, settlement));\n }));\n }\n seal(options: AssertionSealOptions = {}): Effect.Effect<SealedAssertionsRuntime, AssertionSealError, never> {\n return Effect.suspend(() => {\n if (this.sealed !== undefined)\n return Effect.succeed(this.sealed);\n if (options.interrupted) {\n this.closeAuthoring(\"attempt-interrupted\");\n for (const entry of this.entries) {\n if (entry.settled === undefined) {\n entry.settled = Object.freeze({\n state: \"interrupted\" as const,\n ...(entry.interruptedMatcherArtifact === undefined\n ? {}\n : { matcherArtifact: entry.interruptedMatcherArtifact }),\n });\n }\n }\n return Effect.sync(() => this.finishSeal({\n ...options,\n execution: \"errored\",\n }));\n }\n if (this.sealStarted)\n throw new Error(\"Assertions are already sealing\");\n this.closeAuthoring(\"attempt-sealing\");\n this.sealStarted = true;\n return Effect.forEach(this.entries, (entry) => this.settle(entry)).pipe(Effect.andThen(Effect.sync(() => this.finishSeal(options))), Effect.onInterrupt(() => Effect.sync(() => {\n this.sealStarted = false;\n })));\n });\n }\n trackContextReceiver(receiver: AssertionContextReceiver): void {\n this.contextReceivers.add(receiver);\n }\n closeAuthoring(reason: \"attempt-sealing\" | \"attempt-interrupted\"): void {\n if (this.sealed !== undefined)\n return;\n if (this.closingReason !== \"attempt-interrupted\")\n this.closingReason = reason;\n this.closing = true;\n for (const receiver of this.contextReceivers) {\n const release = receiver.release;\n receiver.read = undefined;\n receiver.cut = undefined;\n receiver.release = undefined;\n release?.();\n }\n this.contextReceivers.clear();\n }\n assertAuthoringOpen(): void {\n this.assertCanRegister(false);\n }\n private createEntry(input: {\n readonly kind: EntryKind;\n readonly criterion: AssertionCriterion;\n readonly subject: AssertionMaterial;\n readonly evidence: readonly AssertionMaterial[];\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n readonly evaluate: () => Effect.Effect<EntrySettlement, unknown, never>;\n readonly directScorePoints?: number;\n readonly interruptedMatcherArtifact?: MatcherQueryArtifact;\n readonly retainedBytes?: number;\n readonly retainedImageBytes?: number;\n readonly terminalReceipt?: () => import(\"./api.ts\").AssertionCollectionReceipt;\n readonly terminalDetail?: () => AssertionSnapshotObject;\n readonly terminalEvidence?: () => readonly AssertionMaterial[];\n readonly terminalCriterion?: () => AssertionCriterion;\n }): AssertionEntry {\n if (this.entries.length >= assertionRuntimeLimits.entries) {\n throw new Error(`An Assertions Attachment cannot contain more than ${assertionRuntimeLimits.entries} entries`);\n }\n const retainedBytes = input.retainedBytes ?? 0;\n const retainedImageBytes = input.retainedImageBytes ?? 0;\n if (!Number.isSafeInteger(retainedBytes) || retainedBytes < 0) {\n throw new TypeError(\"Assertion retainedBytes must be a non-negative safe integer\");\n }\n if (this.retainedProducerBytes + retainedBytes > 64 * 1024 * 1024) {\n throw new Error(\"Attempt Assertion retention cannot exceed 64 MiB\");\n }\n if (!Number.isSafeInteger(retainedImageBytes) || retainedImageBytes < 0 || this.retainedImageBytes + retainedImageBytes > 32 * 1024 * 1024) {\n throw new Error(\"Attempt managed image retention cannot exceed 32 MiB\");\n }\n const entry: AssertionEntry = {\n index: this.entries.length,\n kind: input.kind,\n criterion: input.criterion,\n subject: input.subject,\n evidence: input.evidence,\n initialCoverage: input.coverage,\n initialLimitations: input.limitations,\n evaluate: input.evaluate,\n display: { key: undefined, label: undefined, groupPath: [...this.groupStack] },\n directScorePoints: input.directScorePoints,\n interruptedMatcherArtifact: input.interruptedMatcherArtifact,\n terminalReceipt: input.terminalReceipt,\n terminalDetail: input.terminalDetail,\n terminalEvidence: input.terminalEvidence,\n terminalCriterion: input.terminalCriterion,\n optionalConfigured: false,\n gateConfigured: false,\n conditionMinimum: undefined,\n scorePoints: input.directScorePoints,\n configurationClosed: false,\n stopConfigured: false,\n stopPromise: undefined,\n settled: undefined,\n pending: undefined,\n sealedEvidence: undefined,\n };\n this.entries.push(entry);\n this.retainedProducerBytes += retainedBytes;\n this.retainedImageBytes += retainedImageBytes;\n const capture = sourceCaptureByRuntime.get(this);\n if (capture !== undefined) {\n const capturedEntry: AssertionRuntimeSourceEntry = { occurrences: [] };\n capture.entries.push(capturedEntry);\n capture.byEntry.set(entry, capturedEntry);\n this.recordSourceOccurrence(entry, \"declaration\");\n }\n return entry;\n }\n private assertRegistration(definition: unknown, owner: string): asserts definition is BooleanAssertionRegistration<unknown> | MeasurementAssertionRegistration {\n if (!isRecord(definition) || typeof definition.evaluate !== \"function\") {\n throw new TypeError(`${owner} requires an Effect evaluation function`);\n }\n if (!isRecord(definition.subject)\n || (definition.subject.kind !== \"snapshot\" && definition.subject.kind !== \"record-attachment\")) {\n throw new TypeError(`${owner} requires snapshot or same-owner record-attachment subject material`);\n }\n if (definition.subject.kind === \"record-attachment\"\n && typeof definition.subject.preview !== \"string\") {\n throw new TypeError(`${owner} requires a record-attachment preview`);\n }\n if (definition.evidence !== undefined\n && (!Array.isArray(definition.evidence)\n || definition.evidence.some((material) => !isRecord(material)\n || (material.kind !== \"snapshot\" && material.kind !== \"record-attachment\" && material.kind !== \"judge-image\")\n || (material.kind === \"record-attachment\"\n && typeof material.preview !== \"string\")\n || (material.kind === \"judge-image\" && !isJudgeImage(material.image))))) {\n throw new TypeError(`${owner} evidence must use snapshot, record-attachment, or judge-image material`);\n }\n }\n private evaluateBooleanMatch(match: BooleanMatch<unknown, unknown, \"value\">, value: unknown): Effect.Effect<EntrySettlement> {\n return Effect.tryPromise({\n try: () => evaluateBooleanMatch(match, value),\n catch: () => undefined,\n }).pipe(Effect.map((evaluation): EntrySettlement => evaluation.state === \"unavailable\"\n ? Object.freeze({\n state: \"unavailable\" as const,\n reason: \"source-unavailable\" as const,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n })\n : this.booleanSettlement(evaluation)), this.captureEvaluationFailure());\n }\n private evaluateScoreMatch(match: ScoreMatch<unknown>, value: unknown): Effect.Effect<EntrySettlement> {\n return evaluateScoreMatch(match, value).pipe(Effect.map((value): EntrySettlement => {\n assertUnitInterval(value, \"measurement Match result\");\n return Object.freeze({ state: \"measured\" as const, value });\n }), this.captureEvaluationFailure());\n }\n private captureEvaluationFailure(matcherArtifact?: MatcherQueryArtifact): <Value>(effect: Effect.Effect<Value, unknown, never>) => Effect.Effect<Value | EntrySettlement, never, never> {\n return (effect) => effect.pipe(Effect.catchCause((cause) => Cause.hasInterruptsOnly(cause)\n ? Effect.interrupt\n : Effect.succeed(Object.freeze({\n state: \"errored\" as const,\n ...(matcherArtifact === undefined ? {} : { matcherArtifact }),\n }))));\n }\n private booleanSettlement(evaluation: BooleanAssertionEvaluation<unknown>): EntrySettlement {\n switch (evaluation.state) {\n case \"matched\":\n return Object.freeze({\n state: \"matched\" as const,\n value: evaluation.value,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n ...(evaluation.matcherArtifact === undefined ? {} : { matcherArtifact: evaluation.matcherArtifact }),\n });\n case \"mismatched\":\n return Object.freeze({\n state: \"mismatched\" as const,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n ...(evaluation.matcherArtifact === undefined ? {} : { matcherArtifact: evaluation.matcherArtifact }),\n });\n case \"unavailable\":\n return Object.freeze({\n state: \"unavailable\" as const,\n reason: evaluation.reason,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n ...(evaluation.matcherArtifact === undefined ? {} : { matcherArtifact: evaluation.matcherArtifact }),\n });\n case \"not-applicable\":\n return Object.freeze({\n state: \"not-applicable\" as const,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n ...(evaluation.matcherArtifact === undefined ? {} : { matcherArtifact: evaluation.matcherArtifact }),\n });\n }\n }\n private measurementSettlement(evaluation: MeasurementAssertionEvaluation): EntrySettlement {\n switch (evaluation.state) {\n case \"measured\":\n assertUnitInterval(evaluation.value, \"measurement Assertion result\");\n return Object.freeze({\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n state: \"measured\" as const,\n value: evaluation.value,\n ...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }),\n });\n case \"unavailable\":\n return Object.freeze({\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n state: \"unavailable\" as const,\n reason: evaluation.reason,\n ...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }),\n });\n case \"not-applicable\":\n return Object.freeze({ state: \"not-applicable\" as const, ...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }) });\n case \"errored\":\n return Object.freeze({ state: \"errored\" as const, ...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }) });\n }\n }\n /** Evaluates an entry at most once even when multiple Effect fibers await it. */\n private settle(entry: AssertionEntry): Effect.Effect<EntrySettlement> {\n return Effect.suspend(() => {\n if (entry.settled !== undefined)\n return Effect.succeed(entry.settled);\n if (entry.pending !== undefined)\n return Deferred.await(entry.pending);\n return Effect.uninterruptibleMask((restore) => Effect.gen(function* () {\n if (entry.settled !== undefined)\n return entry.settled;\n if (entry.pending !== undefined)\n return yield* Deferred.await(entry.pending);\n const deferred = yield* Deferred.make<EntrySettlement>();\n entry.pending = deferred;\n const settled = yield* restore(Effect.suspend(entry.evaluate).pipe(Effect.catchCause((cause) => Cause.hasInterruptsOnly(cause)\n ? Effect.interrupt\n : Effect.succeed(Object.freeze({ state: \"errored\" as const }))))).pipe(Effect.onInterrupt(() => Deferred.interrupt(deferred).pipe(Effect.andThen(Effect.sync(() => {\n if (entry.pending === deferred)\n entry.pending = undefined;\n })))));\n // An enclosing Attempt interruption may have synchronously sealed\n // this entry while its evaluator was unwinding. Preserve that\n // producer-interrupted terminal fact rather than resurrecting a\n // late evaluator result.\n const terminal = entry.settled ?? settled;\n entry.settled = terminal;\n yield* Deferred.succeed(deferred, terminal);\n return terminal;\n }));\n });\n }\n /**\n * A control barrier may force evaluation early, but it must not let a later\n * Judge entry leapfrog an earlier declaration. `settle()` still memoizes the\n * individual work, so the normal seal only observes these same results.\n */\n private settleThrough(entry: AssertionEntry): Effect.Effect<EntrySettlement> {\n return Effect.forEach(this.entries.slice(0, entry.index + 1), (candidate) => this.settle(candidate)).pipe(Effect.map((settlements) => {\n const settlement = settlements.at(-1);\n if (settlement === undefined)\n throw new Error(\"Assertion stop entry was not registered\");\n return settlement;\n }));\n }\n private latchStop(entry: AssertionEntry, settlement: EntrySettlement): AssertionStopError {\n if (this.stopped !== undefined)\n return this.stopped;\n const reason = settlement.state === \"mismatched\" || settlement.state === \"measured\"\n ? \"condition-not-met\" as const\n : settlement.state === \"unavailable\"\n ? \"source-unavailable\" as const\n : settlement.state === \"not-applicable\"\n ? \"not-applicable\" as const\n : \"evaluator-failed\" as const;\n this.stopped = Object.freeze({\n _tag: \"AssertionStopError\" as const,\n entryIndex: entry.index,\n reason,\n });\n return this.stopped;\n }\n private finishSeal(options: AssertionSealOptions): SealedAssertionsRuntime {\n if (this.sealed !== undefined)\n return this.sealed;\n const entries: SealedAssertionEntry[] = [];\n const assertions: SealedAssertionEvaluation[\"assertions\"][number][] = [];\n for (const entry of this.entries) {\n const sealedEntry = this.toSealedEntry(entry);\n entries.push(sealedEntry);\n assertions.push(Object.freeze({\n required: this.isRequired(entry),\n result: sealedEntry.result,\n }));\n }\n const evaluation: SealedAssertionEvaluation = Object.freeze({\n execution: options.execution ?? \"completed\",\n explicitlySkipped: options.explicitlySkipped ?? false,\n assertions: Object.freeze(assertions),\n });\n this.sealed = Object.freeze({\n entries: Object.freeze(entries),\n evaluation,\n });\n return this.sealed;\n }\n private toSealedEntry(entry: AssertionEntry): SealedAssertionEntry {\n const settlement = entry.settled;\n if (settlement === undefined)\n throw new Error(\"Attempted to seal an unsettled Assertion entry\");\n const display: AssertionDisplay = Object.freeze({\n ...(entry.display.key === undefined ? {} : { key: entry.display.key }),\n ...(entry.display.label === undefined ? {} : { label: entry.display.label }),\n groupPath: Object.freeze([...entry.display.groupPath]),\n });\n const material = this.materialFor(entry, settlement);\n return Object.freeze({\n display,\n criterion: entry.terminalCriterion?.() ?? entry.criterion,\n subject: entry.subject,\n evidence: this.evidenceFor(entry),\n coverage: material.coverage,\n limitations: material.limitations,\n result: this.resultFor(entry, settlement),\n policy: Object.freeze({\n requirement: this.isRequired(entry) ? \"required\" as const : \"optional\" as const,\n condition: this.conditionFor(entry),\n }),\n observed: entry.kind === \"boolean\"\n ? Object.freeze({\n kind: \"boolean\" as const,\n outcome: settlement.state === \"measured\" || settlement.state === \"interrupted\"\n ? \"errored\" as const\n : settlement.state,\n })\n : entry.kind === \"measurement\"\n ? settlement.state === \"measured\"\n ? Object.freeze({ kind: \"measurement\" as const, state: \"available\" as const, value: settlement.value })\n : Object.freeze({ kind: \"measurement\" as const, state: \"unavailable\" as const })\n : settlement.state === \"measured\"\n ? Object.freeze({ kind: \"direct-score\" as const, state: \"available\" as const, value: settlement.value })\n : Object.freeze({ kind: \"direct-score\" as const, state: \"unavailable\" as const }),\n ...(settlement.matcherArtifact === undefined\n ? {}\n : { matcherArtifact: settlement.matcherArtifact }),\n });\n }\n private materialFor(entry: AssertionEntry, settlement: EntrySettlement): {\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n } {\n if (settlement.state === \"unavailable\" && this.retentionByEntry.has(entry) && entry.initialCoverage.state === \"partial\")\n return Object.freeze({ coverage: entry.initialCoverage, limitations: entry.initialLimitations });\n if (settlement.state === \"unavailable\") {\n return Object.freeze({\n coverage: Object.freeze({ state: \"unavailable\" as const, reason: \"source-unavailable\" as const }),\n limitations: Object.freeze([]),\n });\n }\n if (settlement.state === \"not-applicable\") {\n return Object.freeze({\n coverage: Object.freeze({ state: \"not-applicable\" as const, reason: \"optional-material\" as const }),\n limitations: Object.freeze([]),\n });\n }\n return Object.freeze({\n coverage: entry.initialCoverage,\n limitations: entry.initialLimitations,\n });\n }\n private evidenceFor(entry: AssertionEntry): readonly AssertionMaterial[] {\n if (entry.sealedEvidence !== undefined)\n return entry.sealedEvidence;\n const terminal = entry.terminalEvidence?.() ?? [];\n entry.sealedEvidence = Object.freeze([\n ...entry.evidence,\n ...terminal.map(freezeAssertionMaterial),\n ]);\n const retention = this.retentionByEntry.get(entry);\n if (retention !== undefined && !retention.settled) {\n const diagnosticBytes = UTF8.encode(JSON.stringify(entry.settled === undefined ? {} : this.resultFor(entry, entry.settled))).byteLength;\n const actual = retention.actual() + diagnosticBytes;\n this.retainedProducerBytes += actual - retention.reserved;\n retention.settled = true;\n }\n return entry.sealedEvidence;\n }\n private resultFor(entry: AssertionEntry, settlement: EntrySettlement): AssertionResult {\n const terminalDetail = entry.terminalDetail?.();\n const baseDiagnostic = settlement.explanation ?? captureMatchDiagnostic(settlement.diagnostic);\n const capturedDiagnostic = terminalDetail === undefined\n ? baseDiagnostic\n : Object.freeze({ ...(baseDiagnostic ?? {}), ...terminalDetail });\n const diagnostic = capturedDiagnostic === undefined ? {} : { diagnostic: capturedDiagnostic };\n const terminalReceipt = entry.terminalReceipt?.() ?? settlement.receipt;\n const receipt = terminalReceipt === undefined ? {} : { receipt: terminalReceipt };\n switch (settlement.state) {\n case \"matched\":\n return Object.freeze({\n state: \"matched\" as const,\n gate: this.gateForMatched(entry),\n score: this.availableScoreFor(entry, 1),\n ...diagnostic,\n ...receipt,\n });\n case \"mismatched\":\n return Object.freeze({\n state: \"mismatched\" as const,\n reason: \"condition-not-met\" as const,\n gate: this.gateForMismatched(entry),\n score: this.availableScoreFor(entry, 0),\n ...diagnostic,\n ...receipt,\n });\n case \"measured\": {\n const matched = entry.conditionMinimum === undefined || settlement.value >= entry.conditionMinimum;\n return matched\n ? Object.freeze({\n state: \"matched\" as const,\n gate: this.gateForMatched(entry),\n score: this.availableScoreFor(entry, settlement.value),\n ...diagnostic,\n ...receipt,\n })\n : Object.freeze({\n state: \"mismatched\" as const,\n reason: \"condition-not-met\" as const,\n gate: this.gateForMismatched(entry),\n score: this.availableScoreFor(entry, settlement.value),\n ...diagnostic,\n ...receipt,\n });\n }\n case \"unavailable\":\n return Object.freeze({\n state: \"unavailable\" as const,\n reason: settlement.reason,\n gate: this.gateForUnavailable(entry),\n score: this.incompleteScoreFor(entry, \"source-unavailable\"),\n ...diagnostic,\n ...receipt,\n });\n case \"not-applicable\":\n return Object.freeze({\n state: \"not-applicable\" as const,\n reason: \"coverage-not-applicable\" as const,\n gate: this.gateForNotApplicable(entry),\n score: this.incompleteScoreFor(entry, \"not-applicable\"),\n ...diagnostic,\n ...receipt,\n });\n case \"errored\":\n return Object.freeze({\n state: \"errored\" as const,\n reason: \"evaluator-failed\" as const,\n gate: this.gateForUnavailable(entry),\n score: this.incompleteScoreFor(entry, \"evaluation-errored\"),\n ...diagnostic,\n ...receipt,\n });\n case \"interrupted\":\n return Object.freeze({\n state: \"errored\" as const,\n reason: \"producer-interrupted\" as const,\n gate: this.gateForUnavailable(entry),\n score: this.incompleteScoreFor(entry, \"evaluation-errored\"),\n ...diagnostic,\n ...receipt,\n });\n }\n }\n private isGate(entry: AssertionEntry): boolean {\n if (entry.gateConfigured)\n return true;\n return this.evaluationKind === \"pass\" && entry.kind === \"boolean\";\n }\n private isRequired(entry: AssertionEntry): boolean {\n if (entry.kind === \"direct-score\")\n return true;\n if (entry.gateConfigured || entry.scorePoints !== undefined || entry.stopConfigured)\n return true;\n return this.evaluationKind === \"pass\" && entry.kind === \"boolean\" && !entry.optionalConfigured;\n }\n private conditionFor(entry: AssertionEntry): SealedAssertionEntry[\"policy\"][\"condition\"] {\n if (entry.kind === \"measurement\" && entry.conditionMinimum !== undefined) {\n return Object.freeze({ kind: \"at-least\" as const, threshold: entry.conditionMinimum });\n }\n if (entry.kind === \"boolean\"\n && (this.evaluationKind === \"pass\" || entry.gateConfigured || entry.scorePoints !== undefined || entry.stopConfigured)) {\n return Object.freeze({ kind: \"boolean\" as const, expected: true as const });\n }\n return Object.freeze({ kind: \"record-only\" as const });\n }\n private gateForMatched(entry: AssertionEntry): \"not-gate\" | \"satisfied\" {\n return this.isGate(entry) ? \"satisfied\" : \"not-gate\";\n }\n private gateForMismatched(entry: AssertionEntry): \"not-gate\" | \"failed\" {\n return this.isGate(entry) ? \"failed\" : \"not-gate\";\n }\n private gateForUnavailable(entry: AssertionEntry): \"not-gate\" | \"unavailable\" {\n return this.isGate(entry) ? \"unavailable\" : \"not-gate\";\n }\n private gateForNotApplicable(entry: AssertionEntry): \"not-gate\" | \"not-applicable\" {\n return this.isGate(entry) ? \"not-applicable\" : \"not-gate\";\n }\n private availableScoreFor(entry: AssertionEntry, normalized: number): AvailableScoreContribution {\n const points = entry.scorePoints;\n if (points === undefined)\n return noScore();\n return earnedScore(points, points * normalized);\n }\n private incompleteScoreFor(entry: AssertionEntry, reason: Extract<AssertionScoreContribution, {\n readonly state: \"unavailable\";\n }>[\"reason\"]): IncompleteScoreContribution {\n const points = entry.scorePoints;\n return points === undefined ? noScore() : unavailableScore(points, reason);\n }\n private assertCanRegister(reentry = true): void {\n if (reentry && this.readingContext)\n throw new TypeError(\"Context Match readers cannot reenter Assertion authoring\");\n if (this.stopped !== undefined) {\n throw new AssertionAuthoringClosedError(\"stop-latched\");\n }\n if (this.sealed !== undefined) {\n throw new AssertionAuthoringClosedError(\"attempt-sealed\");\n }\n if (this.closing) {\n throw new AssertionAuthoringClosedError(this.closingReason);\n }\n }\n private assertMutable(entry: AssertionEntry, method: string): void {\n this.assertCanRegister();\n if (entry.configurationClosed) {\n throw new Error(`Cannot configure an Assertion after orStop() closed its configuration`);\n }\n if (entry.settled !== undefined || entry.pending !== undefined) {\n throw new Error(`Cannot configure an Assertion after ${method} has begun evaluation`);\n }\n }\n}\nfunction sourceCaptureRuntime(runtime: AssertionsRuntime<\"pass\" | \"score\">): AssertionsRuntimeImplementation | undefined {\n return runtime instanceof AssertionsRuntimeImplementation ? runtime : undefined;\n}\n/** @internal Runner-only source observation hook; it never changes the public runtime value. */\nexport function attachAssertionsRuntimeSourceCapture(runtime: AssertionsRuntime<\"pass\" | \"score\">, capture: () => AssertionRuntimeSourceSite | undefined): void {\n const implementation = sourceCaptureRuntime(runtime);\n if (implementation === undefined) {\n throw new TypeError(\"Assertions source capture requires a NiceEval AssertionsRuntime\");\n }\n if (sourceCaptureByRuntime.has(implementation)) {\n throw new Error(\"Assertions source capture is already attached to this runtime\");\n }\n sourceCaptureByRuntime.set(implementation, {\n capture,\n entries: [],\n byEntry: new WeakMap<AssertionEntry, AssertionRuntimeSourceEntry>(),\n });\n}\n/** @internal Detached immutable journal for the Runner source producer. */\nexport function assertionsRuntimeSourceCaptureSnapshot(runtime: AssertionsRuntime<\"pass\" | \"score\">): AssertionsRuntimeSourceCaptureSnapshot | undefined {\n const implementation = sourceCaptureRuntime(runtime);\n const capture = implementation === undefined ? undefined : sourceCaptureByRuntime.get(implementation);\n if (capture === undefined)\n return undefined;\n return Object.freeze({\n entries: Object.freeze(capture.entries.map((entry) => Object.freeze({\n occurrences: Object.freeze(entry.occurrences.map((occurrence) => Object.freeze({\n role: occurrence.role,\n ...(occurrence.site === undefined ? {} : { site: occurrence.site }),\n ...(occurrence.outcome === undefined ? {} : { outcome: occurrence.outcome }),\n }))),\n }))),\n });\n}\n/** @internal Attempt interruption gives pending real stop calls their terminal disposition. */\nexport function markAssertionsRuntimeSourceCaptureInterrupted(runtime: AssertionsRuntime<\"pass\" | \"score\">): void {\n const implementation = sourceCaptureRuntime(runtime);\n const capture = implementation === undefined ? undefined : sourceCaptureByRuntime.get(implementation);\n if (capture === undefined)\n return;\n for (const entry of capture.entries) {\n for (const occurrence of entry.occurrences) {\n if (occurrence.role === \"stop\" && occurrence.outcome === undefined) {\n occurrence.outcome = \"interrupted\";\n }\n }\n }\n}\n/** Creates one Attempt-local assert-first authoring runtime. */\nexport function createAssertionsRuntime(input: {\n readonly evaluationKind: \"pass\";\n readonly executeStop?: AssertionStopExecutor;\n readonly judge?: ResolvedJudgeConfig;\n readonly signal?: AbortSignal;\n readonly judgeUsage?: import(\"../o11y/judge-usage.ts\").JudgeUsageCollector;\n}): AssertionsRuntime<\"pass\">;\nexport function createAssertionsRuntime(input: {\n readonly evaluationKind: \"score\";\n readonly executeStop?: AssertionStopExecutor;\n readonly judge?: ResolvedJudgeConfig;\n readonly signal?: AbortSignal;\n readonly judgeUsage?: import(\"../o11y/judge-usage.ts\").JudgeUsageCollector;\n}): AssertionsRuntime<\"score\">;\nexport function createAssertionsRuntime(input: {\n readonly evaluationKind: AssertionEvaluationKind;\n readonly executeStop?: AssertionStopExecutor;\n readonly judge?: ResolvedJudgeConfig;\n readonly signal?: AbortSignal;\n readonly judgeUsage?: import(\"../o11y/judge-usage.ts\").JudgeUsageCollector;\n}): AssertionsRuntime<AssertionEvaluationKind> {\n if (input.evaluationKind !== \"pass\" && input.evaluationKind !== \"score\") {\n throw new TypeError(\"Assertions runtime evaluationKind must be \\\"pass\\\" or \\\"score\\\"\");\n }\n const executeStop = input.executeStop ?? (() => Promise.reject(new AssertionAuthoringClosedError(\"runtime-unattached\")));\n const runtime = new AssertionsRuntimeImplementation(input.evaluationKind, executeStop, input.judge, input.signal, input.judgeUsage);\n return runtime as unknown as AssertionsRuntime<AssertionEvaluationKind>;\n}\n/** @internal Core preset dispatch shares the exact owning runtime. */\nconst compiledMaterialQA = new WeakMap<object, {\n readonly selector: ContextualMatch;\n readonly question: string;\n readonly options?: JudgePresetOptions;\n}>();\nexport function registerMaterialQA(check: object, selector: ContextualMatch, question: string, options?: JudgePresetOptions): unknown {\n const runtime = runtimeByCheck.get(check);\n if (runtime === undefined)\n throw new TypeError(\"closeQA requires an Assertion runtime\");\n if (!isContextualMatch(selector) || selector.kind !== \"material\")\n throw new TypeError(\"closeQA requires a MaterialMatch\");\n validateMaterialQAInputs(question, options);\n const compiled = Object.freeze({});\n compiledMaterialQA.set(compiled, Object.freeze({ selector, question, ...(options === undefined ? {} : { options }) }));\n return Reflect.apply(check as (...args: readonly unknown[]) => unknown, undefined, [compiled]);\n}\n"]}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["runtime.ts"],"names":[],"mappings":";;AAyCA,oDAQC;AAED,gEAYC;AAGD,wDAIC;AA8RD,4DA8BC;AAiMD,sEAmEC;AAygCD,oFAaC;AAED,wFAcC;AAED,sGAYC;AAgBD,0DAaC;AAOD,gDAUC;AAxuDD,gBAAgB;AAChB,wDAAwD;AACxD,yDAAyD;AACzD,2EAA2E;AAC3E,sEAAsE;AACtE,qDAAqD;AACrD,+CAAiO;AACjO,yDAA2H;AAC3H,yDAAyE;AACzE,mCAAyD;AAGzD,gDAAiD;AACjD,qCAA47B;AAC57B,mDAA8D;AAC9D,yCAAqc;AACrc,qEAAoE;AACpE,2CAAqD;AACrD,6CAA0D;AAC1D,+CAAsD;AACtD,uDAAiE;AACjE,MAAM,SAAS,GAAG,eAAM,CAAC,MAAM,CAAC,KAAK,CAAC,eAAM,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACpF,MAAM,kBAAkB,GAAG,eAAM,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,eAAM,CAAC,KAAK,CAAC;QAChB,SAAS;QACT,eAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QACnE,eAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,eAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,eAAM,CAAC,MAAM,EAAE,CAAC;QAC7E,eAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,eAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,eAAM,CAAC,MAAM,EAAE,CAAC;KACjF,CAAC;IACF,M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AAC,cAAc,EAAE,WAAW,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACpI,OAAO,OAAgE,CAAC;AAC5E,CAAC;AACD,sEAAsE;AACtE,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAIlC,CAAC;AACL,SAAgB,kBAAkB,CAAC,KAAa,EAAE,QAAyB,EAAE,QAAgB,EAAE,OAA4B;IACvH,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,OAAO,KAAK,SAAS;QACrB,MAAM,IAAI,SAAS,CAAC,uCAAuC,CAAC,CAAC;IACjE,IAAI,CAAC,IAAA,oCAAiB,EAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,UAAU;QAC5D,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;IAC5D,IAAA,sCAAwB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnC,kBAAkB,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACvH,OAAO,OAAO,CAAC,KAAK,CAAC,KAAiD,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnG,CAAC","sourcesContent":["// @concord-file\n// @concord-implements docs/feature/assertions/README.md\n// @concord-implements docs/feature/assertions/library.md\n// @concord-implements docs/feature/assertions/library/scoped-assertions.md\n// @concord-implements docs/feature/assertions/library/score-points.md\n// @concord-implements docs/feature/verdict/README.md\nimport { validateMaterialQAInputs, captureContextualMatch, captureUnavailableContextualMatch, materialExistenceRegistration, materialQARegistration, contextBooleanRegistration, contextScoreRegistration } from \"./material.ts\";\nimport { isContextualMatch, contextMatchDefinitionOf, type ContextualMatch, type MaterialMatch } from \"./context-match.ts\";\nimport { optionsFor, type JudgePresetOptions } from \"./judge-presets.ts\";\nimport { Cause, Deferred, Effect, Schema } from \"effect\";\nimport type { SourceLoc } from \"../shared/types.ts\";\nimport type { ResolvedJudgeConfig } from \"./types.ts\";\nimport { isJudgeImage } from \"../judge/image.ts\";\nimport { assertionHandleBrand, AssertionAuthoringClosedError, type AssertionCoverage, type AssertionCollectionReceipt, type AssertionCriterion, type AssertionDisplay, type AssertionEvaluationKind, type AssertionLimitation, type AssertionMaterial, type AssertionResult, type AssertionScoreContribution, type AssertionSealError, type AssertionSealOptions, type AssertionSnapshotObject, type AssertionSnapshotValue, type AssertionStopError, type AssertionStopExecutor, type AssertionsContext, type AssertionsRuntime, type BooleanAssertionHandle, type BooleanAssertionEvaluation, type BooleanAssertionRegistration, type CapturedAssertionSnapshot, type MeasurementAssertionEvaluation, type MeasurementAssertionRegistration, type MatcherQueryArtifact, type PassBooleanAssertionHandle, type PostRunBooleanAssertionHandle, type ScoreBooleanAssertionHandle, type SealedAssertionEntry, type SealedAssertionEvaluation, type SealedAssertionsRuntime, } from \"./api.ts\";\nimport { collectionMatchRegistration } from \"./collection.ts\";\nimport { assertManagedValueMatch, evaluateBooleanMatch, evaluateScoreMatch, isManagedCollectionMatch, isManagedEventMatch, isManagedToolMatch, isNumericComparisonMatch, looksLikeCollectionMatch, managedScoreMatchOf, exactLlmOptions, type BooleanMatch, type CollectionMatch, type MatchDiagnostic, type ManagedToolCalls, type ManagedEventOccurrences, type NumericComparisonMatch, type NumericMaterial, type ScoreMatch, type ToolMatch, } from \"./match.ts\";\nimport { prepareManagedScoreMatch } from \"./score-match-gateway.ts\";\nimport { assertionRuntimeLimits } from \"./limits.ts\";\nimport { numericBooleanRegistration } from \"./numeric.ts\";\nimport { isQuantity, type Unit } from \"./quantity.ts\";\nimport { transferFullAssertionContent } from \"./full-content.ts\";\nconst unitRatio = Schema.Finite.check(Schema.isBetween({ minimum: 0, maximum: 1 }));\nconst weightedScoreInput = Schema.Struct({\n ratio: Schema.Union([\n unitRatio,\n Schema.Struct({ state: Schema.Literal(\"exact\"), value: unitRatio }),\n Schema.Struct({ state: Schema.Literal(\"lower-bound\"), value: Schema.Finite }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.String }),\n ]),\n weight: Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)),\n});\nconst UTF8 = new TextEncoder();\nconst runtimeByCheck = new WeakMap<object, AssertionsRuntimeImplementation>();\ninterface AssertionContextReceiver {\n readonly owner: object;\n read?: () => unknown;\n cut?: () => import(\"./api.ts\").MatcherSourceSnapshot;\n release?: () => void;\n}\nconst contextByCheck = new WeakMap<object, AssertionContextReceiver>();\n/** @internal Binding is Attempt-local and happens only after app assembly. */\nexport function bindAssertionContext(check: object, read: () => unknown, cut?: () => import(\"./api.ts\").MatcherSourceSnapshot, release?: () => void): void {\n runtimeByCheck.get(check)?.assertAuthoringOpen();\n const receiver = contextByCheck.get(check);\n if (receiver === undefined || receiver.read !== undefined)\n throw new TypeError(\"Assertion context must bind exactly once to its owning receiver\");\n receiver.read = read;\n receiver.cut = cut;\n receiver.release = release;\n}\n/** @internal A scope owns its ctx and observation cut while sharing the Attempt runtime. */\nexport function createScopedAssertionCheck<Kind extends import(\"./api.ts\").AssertionCheckKind, C>(root: object, read: () => unknown, cut: () => import(\"./api.ts\").MatcherSourceSnapshot, release?: () => void): import(\"./api.ts\").AssertionCheck<Kind, C> {\n const runtime = runtimeByCheck.get(root);\n const receiver = contextByCheck.get(root);\n if (runtime === undefined || receiver === undefined)\n throw new TypeError(\"Scoped checks require an Assertion runtime\");\n runtime.assertAuthoringOpen();\n const scoped = (...args: readonly unknown[]) => runtime.checkFor(scoped, args);\n const scopedReceiver: AssertionContextReceiver = { owner: receiver.owner, read, cut, release };\n runtimeByCheck.set(scoped, runtime);\n contextByCheck.set(scoped, scopedReceiver);\n runtime.trackContextReceiver(scopedReceiver);\n return scoped as unknown as import(\"./api.ts\").AssertionCheck<Kind, C>;\n}\nconst assertionHandleRegistry = new WeakSet<object>();\n/** @internal Shared author-boundary guard for check() and Judge dispatch. */\nexport function assertAssertionSubject(value: unknown, operation: \"check\" | \"judge\"): void {\n if (typeof value === \"object\" && value !== null && assertionHandleRegistry.has(value)) {\n throw new TypeError(`${operation}() cannot use an AssertionHandle as a subject`);\n }\n}\ntype EntryKind = \"boolean\" | \"measurement\" | \"direct-score\";\ninterface SettlementDiagnostic {\n readonly diagnostic?: MatchDiagnostic;\n readonly explanation?: AssertionSnapshotObject;\n readonly receipt?: AssertionCollectionReceipt;\n readonly matcherArtifact?: MatcherQueryArtifact;\n}\ntype AvailableResult = ({\n readonly state: \"matched\";\n readonly value: unknown;\n} & SettlementDiagnostic) | ({\n readonly state: \"mismatched\";\n} & SettlementDiagnostic) | ({\n readonly state: \"measured\";\n readonly value: number;\n} & SettlementDiagnostic);\ntype EntrySettlement = AvailableResult | ({\n readonly state: \"unavailable\";\n readonly reason: \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\";\n} & SettlementDiagnostic) | ({\n readonly state: \"not-applicable\";\n} & SettlementDiagnostic) | ({\n readonly state: \"errored\";\n} & SettlementDiagnostic) | ({\n readonly state: \"interrupted\";\n} & SettlementDiagnostic);\ninterface AssertionEntry {\n readonly index: number;\n readonly kind: EntryKind;\n readonly criterion: AssertionCriterion;\n readonly subject: AssertionMaterial;\n readonly evidence: readonly AssertionMaterial[];\n readonly initialCoverage: AssertionCoverage;\n readonly initialLimitations: readonly AssertionLimitation[];\n readonly evaluate: () => Effect.Effect<EntrySettlement, unknown, never>;\n readonly display: {\n key: string | undefined;\n label: string | undefined;\n groupPath: string[];\n };\n readonly directScorePoints: number | undefined;\n readonly interruptedMatcherArtifact: MatcherQueryArtifact | undefined;\n readonly terminalReceipt: (() => import(\"./api.ts\").AssertionCollectionReceipt) | undefined;\n readonly terminalDetail: (() => AssertionSnapshotObject) | undefined;\n readonly terminalEvidence: (() => readonly AssertionMaterial[]) | undefined;\n readonly terminalCriterion: (() => AssertionCriterion) | undefined;\n optionalConfigured: boolean;\n gateConfigured: boolean;\n conditionMinimum: number | undefined;\n scorePoints: number | undefined;\n configurationClosed: boolean;\n stopConfigured: boolean;\n stopPromise: Promise<unknown> | undefined;\n settled: EntrySettlement | undefined;\n pending: Deferred.Deferred<EntrySettlement> | undefined;\n sealedEvidence: readonly AssertionMaterial[] | undefined;\n}\n/**\n * Source navigation remains a Runner-owned observation. These types are\n * intentionally package-internal: neither the author-facing handle nor the\n * sealed Assertion value acquires a source field or durable identity.\n */\nexport type AssertionRuntimeSourceRole = \"declaration\" | \"threshold\" | \"score\" | \"gate\" | \"optional\" | \"stop\";\nexport interface AssertionRuntimeSourceSite {\n readonly location: SourceLoc;\n readonly sourceOrder: number;\n}\nexport interface AssertionRuntimeSourceOccurrence {\n readonly role: AssertionRuntimeSourceRole;\n readonly site?: AssertionRuntimeSourceSite;\n readonly outcome?: \"continued\" | \"stopped\" | \"interrupted\";\n}\nexport interface AssertionsRuntimeSourceCaptureSnapshot {\n readonly entries: readonly {\n readonly occurrences: readonly AssertionRuntimeSourceOccurrence[];\n }[];\n}\ninterface MutableAssertionRuntimeSourceOccurrence {\n readonly role: AssertionRuntimeSourceRole;\n readonly site?: AssertionRuntimeSourceSite;\n outcome?: \"continued\" | \"stopped\" | \"interrupted\";\n}\ninterface AssertionRuntimeSourceEntry {\n readonly occurrences: MutableAssertionRuntimeSourceOccurrence[];\n}\ninterface AssertionsRuntimeSourceCapture {\n readonly capture: () => AssertionRuntimeSourceSite | undefined;\n readonly entries: AssertionRuntimeSourceEntry[];\n readonly byEntry: WeakMap<AssertionEntry, AssertionRuntimeSourceEntry>;\n}\nconst sourceCaptureByRuntime = new WeakMap<AssertionsRuntimeImplementation, AssertionsRuntimeSourceCapture>();\ninterface SnapshotState {\n truncated: boolean;\n omittedBytes: number;\n readonly seen: WeakSet<object>;\n}\ntype AvailableScoreContribution = Extract<AssertionScoreContribution, {\n readonly state: \"not-scored\" | \"earned\";\n}>;\ntype IncompleteScoreContribution = Extract<AssertionScoreContribution, {\n readonly state: \"not-scored\" | \"unavailable\";\n}>;\nfunction isRecord(value: unknown): value is globalThis.Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction isAssertionStop(value: unknown): value is AssertionStopError {\n return isRecord(value) && value._tag === \"AssertionStopError\";\n}\nfunction isInterruptedAuthoringClosure(value: unknown): boolean {\n return value instanceof AssertionAuthoringClosedError && value.reason === \"attempt-interrupted\";\n}\nfunction assertFiniteNonNegative(value: unknown, owner: string): asserts value is number {\n if (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) {\n throw new TypeError(`${owner} must be a finite non-negative number`);\n }\n}\nfunction assertUnitInterval(value: unknown, owner: string): asserts value is number {\n if (typeof value !== \"number\" || !Number.isFinite(value) || value < 0 || value > 1) {\n throw new TypeError(`${owner} must be a finite number in [0, 1]`);\n }\n}\nfunction assertDisplayText(value: unknown, owner: string): asserts value is string {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`${owner} must be a non-empty string`);\n }\n if (/\\p{Cc}/u.test(value)) {\n throw new TypeError(`${owner} must not contain control characters`);\n }\n if (Array.from(value).length > assertionRuntimeLimits.displayCodePoints) {\n throw new TypeError(`${owner} must be at most ${assertionRuntimeLimits.displayCodePoints} code points`);\n }\n}\nfunction marker(value: string): AssertionSnapshotObject {\n return Object.freeze({ $niceeval: value });\n}\nfunction omittedBytes(value: string): number {\n return UTF8.encode(value).byteLength;\n}\nfunction markTruncated(state: SnapshotState, bytes = 1): void {\n state.truncated = true;\n state.omittedBytes += Math.max(1, bytes);\n}\nfunction boundedSnapshotString(value: string, state: SnapshotState): string {\n const bytes = omittedBytes(value);\n if (bytes <= assertionRuntimeLimits.stringBytes)\n return value;\n let retainedBytes = 0;\n let retainedEnd = 0;\n for (const point of value) {\n const pointBytes = omittedBytes(point);\n if (retainedBytes + pointBytes > assertionRuntimeLimits.stringBytes)\n break;\n retainedBytes += pointBytes;\n retainedEnd += point.length;\n }\n markTruncated(state, bytes - retainedBytes);\n return value.slice(0, retainedEnd);\n}\nfunction boundedSnapshotKey(key: string, index: number, existing: ReadonlySet<string>, state: SnapshotState): string {\n if (omittedBytes(key) <= assertionRuntimeLimits.stringBytes)\n return key;\n markTruncated(state, omittedBytes(key));\n let replacement = `$niceeval:truncated-key:${index}`;\n let suffix = 0;\n while (existing.has(replacement)) {\n suffix += 1;\n replacement = `$niceeval:truncated-key:${index}:${suffix}`;\n }\n return replacement;\n}\n/**\n * Produces a bounded, safe-to-persist view without changing the actual value\n * consumed by a Match. Non-JSON runtime objects remain visible only as a\n * tagged placeholder and make the entry's material explicitly partial.\n */\nfunction boundedSnapshotValue(value: unknown, depth: number, state: SnapshotState): AssertionSnapshotValue {\n if (value === null || typeof value === \"boolean\")\n return value;\n if (typeof value === \"number\") {\n if (Number.isFinite(value))\n return value;\n markTruncated(state, String(value).length);\n return marker(\"non-finite-number\");\n }\n if (typeof value === \"string\") {\n return boundedSnapshotString(value, state);\n }\n if (typeof value === \"undefined\") {\n // undefined has no JSON primitive representation, but the tagged\n // placeholder below preserves the fact exactly. It is therefore complete\n // snapshot material; only values that cannot be represented safely or\n // boundedly should make coverage partial.\n return marker(\"undefined\");\n }\n if (typeof value === \"bigint\" || typeof value === \"symbol\" || typeof value === \"function\") {\n markTruncated(state, String(value).length);\n return marker(typeof value);\n }\n if (depth >= assertionRuntimeLimits.jsonDepth) {\n markTruncated(state);\n return marker(\"depth-truncated\");\n }\n if (state.seen.has(value)) {\n markTruncated(state);\n return marker(\"cyclic-or-shared-reference\");\n }\n state.seen.add(value);\n if (Array.isArray(value)) {\n const length = Math.min(value.length, assertionRuntimeLimits.jsonArrayItems);\n if (length < value.length)\n markTruncated(state, value.length - length);\n const entries: AssertionSnapshotValue[] = [];\n for (let index = 0; index < length; index += 1) {\n try {\n const descriptor = Object.getOwnPropertyDescriptor(value, String(index));\n if (descriptor === undefined) {\n markTruncated(state);\n entries.push(marker(\"array-hole\"));\n }\n else if (!(\"value\" in descriptor)) {\n markTruncated(state);\n entries.push(marker(\"accessor-element\"));\n }\n else {\n entries.push(boundedSnapshotValue(descriptor.value, depth + 1, state));\n }\n }\n catch {\n markTruncated(state);\n entries.push(marker(\"unreadable-element\"));\n }\n }\n return Object.freeze(entries);\n }\n if (value instanceof Date) {\n const time = value.getTime();\n if (!Number.isFinite(time)) {\n markTruncated(state);\n return marker(\"invalid-date\");\n }\n markTruncated(state);\n return Object.freeze({ $niceeval: \"date\", value: value.toISOString() });\n }\n let keys: readonly string[];\n try {\n keys = Object.keys(value);\n }\n catch {\n markTruncated(state);\n return marker(\"uninspectable-object\");\n }\n const length = Math.min(keys.length, assertionRuntimeLimits.jsonObjectKeys);\n if (length < keys.length)\n markTruncated(state, keys.length - length);\n const entries: Array<readonly [\n string,\n AssertionSnapshotValue\n ]> = [];\n const reservedKeys = new Set(keys);\n for (let index = 0; index < length; index += 1) {\n const key = keys[index];\n if (key === undefined)\n continue;\n const capturedKey = boundedSnapshotKey(key, index, reservedKeys, state);\n reservedKeys.add(capturedKey);\n try {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !(\"value\" in descriptor)) {\n markTruncated(state);\n entries.push([capturedKey, marker(\"accessor-property\")]);\n }\n else {\n entries.push([\n capturedKey,\n boundedSnapshotValue(descriptor.value, depth + 1, state),\n ]);\n }\n }\n catch {\n markTruncated(state);\n entries.push([capturedKey, marker(\"unreadable-property\")]);\n }\n }\n return Object.freeze(Object.fromEntries(entries));\n}\nexport function captureAssertionSnapshot(value: unknown): CapturedAssertionSnapshot {\n const state: SnapshotState = {\n truncated: false,\n omittedBytes: 0,\n seen: new WeakSet<object>(),\n };\n const snapshot = boundedSnapshotValue(value, 0, state);\n const material: Extract<AssertionMaterial, {\n readonly kind: \"snapshot\";\n }> = Object.freeze({\n kind: \"snapshot\",\n value: snapshot,\n });\n if (!state.truncated) {\n return Object.freeze({\n material,\n coverage: Object.freeze({ state: \"complete\" as const }),\n limitations: Object.freeze([]),\n });\n }\n return Object.freeze({\n material,\n coverage: Object.freeze({ state: \"partial\" as const, reason: \"truncated\" as const }),\n limitations: Object.freeze([\n Object.freeze({\n kind: \"truncated\" as const,\n omittedBytes: Math.max(1, state.omittedBytes),\n }),\n ]),\n });\n}\n/**\n * Matcher diagnostics are runtime objects, but sealed Assertions need a\n * bounded JSON copy that keeps their tree (field children and locators) for\n * fixed query/View readers without granting those readers evaluator authority.\n */\nfunction captureMatchDiagnostic(value: MatchDiagnostic | undefined, depth = 0, seen = new WeakSet<object>(), budget = { remainingNodes: assertionRuntimeLimits.diagnosticNodes }): AssertionSnapshotObject | undefined {\n if (value === undefined)\n return undefined;\n if (budget.remainingNodes <= 0) {\n return Object.freeze({\n code: \"diagnostic-truncated\",\n message: \"matcher diagnostic exceeded the persisted node limit\",\n path: Object.freeze([]),\n });\n }\n budget.remainingNodes -= 1;\n if (depth >= assertionRuntimeLimits.diagnosticDepth || seen.has(value)) {\n return Object.freeze({\n code: \"diagnostic-truncated\",\n message: depth >= assertionRuntimeLimits.diagnosticDepth\n ? \"matcher diagnostic exceeded the persisted depth limit\"\n : \"matcher diagnostic contained a cycle\",\n path: Object.freeze([]),\n });\n }\n seen.add(value);\n try {\n const text = (input: string): string => {\n const state: SnapshotState = { truncated: false, omittedBytes: 0, seen: new WeakSet<object>() };\n return boundedSnapshotString(input, state);\n };\n const output: globalThis.Record<string, AssertionSnapshotValue> = {\n code: text(value.code),\n message: text(value.message),\n path: Object.freeze(value.path.map((segment) => typeof segment === \"string\" ? text(segment) : segment)),\n };\n if (value.expected !== undefined)\n output.expected = text(value.expected);\n if (value.received !== undefined)\n output.received = text(value.received);\n if (value.reason !== undefined)\n output.reason = text(value.reason);\n if (value.locator !== undefined) {\n output.locator = value.locator.kind === \"json-pointer\"\n ? Object.freeze({ kind: \"json-pointer\", pointer: text(value.locator.pointer) })\n : Object.freeze({ kind: \"tool-occurrence\", id: text(value.locator.id) });\n }\n if (value.truncation !== undefined) {\n output.truncation = Object.freeze({ ...value.truncation });\n }\n if (value.children !== undefined) {\n const children: AssertionSnapshotValue[] = [];\n for (const child of value.children.slice(0, assertionRuntimeLimits.jsonArrayItems)) {\n if (budget.remainingNodes <= 0)\n break;\n const entry: globalThis.Record<string, AssertionSnapshotValue> = {\n index: child.index,\n state: child.state,\n };\n if (child.label !== undefined)\n entry.label = text(child.label);\n const diagnostic = captureMatchDiagnostic(child.diagnostic, depth + 1, seen, budget);\n if (diagnostic !== undefined)\n entry.diagnostic = diagnostic;\n children.push(Object.freeze(entry));\n }\n output.children = Object.freeze(children);\n if (children.length < value.children.length && output.truncation === undefined) {\n output.truncation = Object.freeze({\n code: \"diagnostic-truncated\",\n reason: \"sampled\",\n captured: children.length,\n knownTotal: value.children.length,\n });\n }\n }\n const captured = Object.freeze(output);\n const serialized = JSON.stringify(captured);\n const originalBytes = UTF8.encode(serialized).byteLength;\n if (originalBytes <= assertionRuntimeLimits.diagnosticBytes)\n return captured;\n return Object.freeze({\n code: output.code,\n message: output.message,\n path: output.path,\n ...(output.expected === undefined ? {} : { expected: output.expected }),\n ...(output.received === undefined ? {} : { received: output.received }),\n ...(output.reason === undefined ? {} : { reason: output.reason }),\n ...(output.locator === undefined ? {} : { locator: output.locator }),\n truncation: Object.freeze({\n code: \"diagnostic-truncated\",\n reason: \"byte-limit\",\n limitBytes: assertionRuntimeLimits.diagnosticBytes,\n originalBytes,\n }),\n });\n }\n finally {\n seen.delete(value);\n }\n}\nfunction freezeAssertionMaterial(material: AssertionMaterial): AssertionMaterial {\n if (material.kind === \"snapshot\") {\n const frozen = Object.freeze({ kind: \"snapshot\" as const, value: material.value });\n transferFullAssertionContent(material, frozen);\n return frozen;\n }\n if (material.kind === \"judge-image\") {\n if (!isJudgeImage(material.image))\n throw new TypeError(\"judge-image material requires a judgeImage() value\");\n return Object.freeze({ kind: \"judge-image\", image: material.image });\n }\n if (typeof material.preview !== \"string\" || material.preview.trim() === \"\") {\n throw new TypeError(\"record-attachment material requires a non-empty preview\");\n }\n return Object.freeze({\n kind: \"record-attachment\",\n preview: material.preview,\n });\n}\nfunction cloneCoverage(coverage: AssertionCoverage): AssertionCoverage {\n return Object.freeze({ ...coverage });\n}\nfunction cloneLimitations(limitations: readonly AssertionLimitation[]): readonly AssertionLimitation[] {\n return Object.freeze(limitations.map((limitation) => Object.freeze({ ...limitation })));\n}\nfunction noScore(): Extract<AssertionScoreContribution, {\n readonly state: \"not-scored\";\n}> {\n return Object.freeze({ state: \"not-scored\" as const });\n}\nfunction earnedScore(points: number, earned: number): Extract<AssertionScoreContribution, {\n readonly state: \"earned\";\n}> {\n return Object.freeze({ state: \"earned\" as const, points, earned });\n}\nfunction unavailableScore(points: number, reason: Extract<AssertionScoreContribution, {\n readonly state: \"unavailable\";\n}>[\"reason\"]): Extract<AssertionScoreContribution, {\n readonly state: \"unavailable\";\n}> {\n return Object.freeze({ state: \"unavailable\" as const, points, reason });\n}\nclass HandleBase {\n readonly [assertionHandleBrand] = true as const;\n constructor(protected readonly runtime: AssertionsRuntimeImplementation, protected readonly entry: AssertionEntry) {\n assertionHandleRegistry.add(this);\n }\n key(value: string): this {\n this.runtime.configureKey(this.entry, value);\n return this;\n }\n label(value: string): this {\n this.runtime.configureLabel(this.entry, value);\n return this;\n }\n group(title: string): this {\n this.runtime.configureGroup(this.entry, title);\n return this;\n }\n}\nclass BooleanHandle extends HandleBase {\n readonly kind = \"boolean\" as const;\n optional(): this {\n this.runtime.configureOptional(this.entry);\n return this;\n }\n gate(...extra: readonly unknown[]): this {\n if (extra.length > 0)\n throw new TypeError(\"gate() accepts no arguments\");\n this.runtime.configureGate(this.entry);\n return this;\n }\n score(points: number): this {\n this.runtime.configureScore(this.entry, points);\n return this;\n }\n orStop(...extra: readonly unknown[]): Promise<unknown> {\n if (extra.length > 0)\n throw new TypeError(\"Boolean orStop() accepts no arguments\");\n return this.runtime.requestStopBoolean(this.entry);\n }\n}\nfunction isScoreBooleanAssertionHandle<Refined>(handle: PassBooleanAssertionHandle<Refined> | ScoreBooleanAssertionHandle<Refined>): handle is ScoreBooleanAssertionHandle<Refined> {\n return \"score\" in handle && typeof handle.score === \"function\";\n}\n/**\n * Gives a post-run producer a configuration-only view of an ordinary Boolean\n * entry. Keeping this as a distinct, null-prototype object matters at the\n * JavaScript boundary too: a cast must not recover `orStop()` and force a\n * deferred producer to evaluate before its Attempt has frozen its evidence.\n */\nexport function postRunBooleanAssertionHandle<Kind extends AssertionEvaluationKind, Refined>(handle: BooleanAssertionHandle<Kind, Refined>, evaluationKind: Kind): PostRunBooleanAssertionHandle<Kind, Refined> {\n const view = Object.create(null) as object;\n const descriptor = (value: unknown): PropertyDescriptor => ({\n value,\n enumerable: true,\n writable: false,\n configurable: false,\n });\n Object.defineProperties(view, {\n [assertionHandleBrand]: {\n value: true,\n enumerable: false,\n writable: false,\n configurable: false,\n },\n kind: descriptor(\"boolean\"),\n key: descriptor((value: string) => {\n handle.key(value);\n return view;\n }),\n label: descriptor((value: string) => {\n handle.label(value);\n return view;\n }),\n group: descriptor((title: string) => {\n handle.group(title);\n return view;\n }),\n ...(evaluationKind === \"pass\"\n ? (() => {\n const passHandle = handle as PassBooleanAssertionHandle<Refined>;\n return {\n optional: descriptor(() => {\n passHandle.optional();\n return view;\n }),\n gate: descriptor((...args: readonly unknown[]) => {\n if (args.length > 0)\n throw new TypeError(\"Boolean gate() accepts no arguments\");\n passHandle.gate();\n return view;\n }),\n };\n })()\n : {}),\n ...(evaluationKind === \"score\"\n ? (() => {\n if (!isScoreBooleanAssertionHandle(handle)) {\n throw new Error(\"Score post-run Boolean Assertion received a non-score handle\");\n }\n return {\n gate: descriptor((...args: readonly unknown[]) => {\n if (args.length > 0)\n throw new TypeError(\"Boolean gate() accepts no arguments\");\n handle.gate();\n return view;\n }),\n score: descriptor((points: number) => {\n handle.score(points);\n return view;\n }),\n };\n })()\n : {}),\n });\n assertionHandleRegistry.add(view);\n return Object.freeze(view) as PostRunBooleanAssertionHandle<Kind, Refined>;\n}\nclass MeasurementHandle extends HandleBase {\n readonly kind = \"measurement\" as const;\n gate(minimum: number, ...extra: readonly unknown[]): this {\n if (extra.length > 0)\n throw new TypeError(\"gate() accepts exactly one minimum\");\n this.runtime.configureMeasurementGate(this.entry, minimum);\n return this;\n }\n score(points: number): this {\n this.runtime.configureScore(this.entry, points);\n return this;\n }\n orStop(...args: readonly unknown[]): Promise<number> {\n return this.runtime.requestStopMeasurement(this.entry, args);\n }\n}\nclass DirectScoreHandle extends HandleBase {\n readonly kind = \"direct-score\" as const;\n}\nclass AssertionsRuntimeImplementation {\n private readonly contextReceivers = new Set<AssertionContextReceiver>();\n private readingContext = false;\n readonly t: AssertionsContext<AssertionEvaluationKind>;\n private readonly entries: AssertionEntry[] = [];\n private readonly groupStack: string[] = [];\n private stopped: AssertionStopError | undefined;\n private closing = false;\n private closingReason: \"attempt-sealing\" | \"attempt-interrupted\" = \"attempt-sealing\";\n private sealStarted = false;\n private sealed: SealedAssertionsRuntime | undefined;\n private retainedProducerBytes = 0;\n private readonly retentionByEntry = new WeakMap<AssertionEntry, {\n reserved: number;\n actual: () => number;\n settled: boolean;\n }>();\n private retainedImageBytes = 0;\n constructor(readonly evaluationKind: AssertionEvaluationKind, private readonly executeStop: AssertionStopExecutor, private readonly judge: ResolvedJudgeConfig | undefined, private readonly signal: AbortSignal | undefined, private readonly judgeUsage?: import(\"../o11y/judge-usage.ts\").JudgeUsageCollector) {\n const check = (...args: readonly unknown[]) => this.checkFor(check, args);\n const base = {\n evaluationKind,\n check,\n group: this.withGroup.bind(this),\n };\n runtimeByCheck.set(base.check, this);\n const receiver: AssertionContextReceiver = { owner: base.check };\n contextByCheck.set(base.check, receiver);\n this.trackContextReceiver(receiver);\n this.t = Object.freeze(evaluationKind === \"score\"\n ? { ...base, score: this.directScore.bind(this) }\n : base) as unknown as AssertionsContext<AssertionEvaluationKind>;\n }\n private recordSourceOccurrence(entry: AssertionEntry, role: AssertionRuntimeSourceRole): MutableAssertionRuntimeSourceOccurrence | undefined {\n const capture = sourceCaptureByRuntime.get(this);\n const capturedEntry = capture?.byEntry.get(entry);\n if (capturedEntry === undefined || capture === undefined)\n return undefined;\n let site: AssertionRuntimeSourceSite | undefined;\n try {\n site = capture.capture();\n }\n catch {\n // Source navigation must never change authoring or assertion behavior.\n }\n const occurrence: MutableAssertionRuntimeSourceOccurrence = {\n role,\n ...(site === undefined ? {} : { site }),\n };\n capturedEntry.occurrences.push(occurrence);\n return occurrence;\n }\n private contextualRegistration(check: object, match: ContextualMatch, qa?: {\n question: string;\n options?: JudgePresetOptions;\n }): BooleanHandle | MeasurementHandle {\n this.assertCanRegister();\n const receiver = contextByCheck.get(check);\n if (receiver?.read === undefined)\n throw new TypeError(\"Contextual Match requires an application-bound Assertion receiver\");\n const definition = contextMatchDefinitionOf(match);\n const managed = definition.kind === \"context-score\" ? managedScoreMatchOf(definition.match as ScoreMatch<unknown>) : undefined;\n const auditBytes = qa === undefined ? managed?.llm.maxAuditBytes ?? 0 : exactLlmOptions(optionsFor(\"close-qa\", qa.options ?? {}).llm).maxAuditBytes;\n const reservation = definition.capture.maxBytes + auditBytes + 64 * 1024;\n const admitted = this.retainedProducerBytes + reservation <= 64 * 1024 * 1024;\n if (admitted)\n this.retainedProducerBytes += reservation;\n let reserved = admitted ? reservation : 0;\n try {\n this.readingContext = true;\n let prepared: ReturnType<typeof captureContextualMatch>;\n try {\n const cut = admitted ? receiver.cut?.() : undefined;\n prepared = admitted ? captureContextualMatch(definition, receiver.read(), { owner: receiver.owner, ...(cut === undefined ? {} : { cut }) }) : captureUnavailableContextualMatch(definition, \"assertion-retention-budget\");\n }\n finally {\n this.readingContext = false;\n }\n const registration = qa !== undefined && prepared.kind === \"material\" ? materialQARegistration(prepared, qa.question, qa.options, this.judge, this.signal, this.judgeUsage?.forEntry(this.entries.length))\n : prepared.kind === \"material\" ? materialExistenceRegistration(prepared)\n : prepared.kind === \"context-boolean\" ? contextBooleanRegistration(prepared)\n : contextScoreRegistration(prepared, this.judge, this.signal, this.judgeUsage?.forEntry(this.entries.length));\n const actual = \"actualRetainedBytes\" in registration && typeof registration.actualRetainedBytes === \"function\" ? registration.actualRetainedBytes : () => prepared.sourceBytes;\n const retainedBytes = (registration.retainedBytes ?? prepared.sourceBytes) + 64 * 1024;\n this.retainedProducerBytes -= reserved;\n reserved = 0;\n const entryIndex = this.entries.length;\n const handle = qa !== undefined || prepared.kind === \"context-score\" ? this.registerMeasurement({ ...registration, retainedBytes } as MeasurementAssertionRegistration) : this.registerBoolean({ ...registration, retainedBytes } as BooleanAssertionRegistration<void>);\n const entry = this.entries[entryIndex]!;\n this.retentionByEntry.set(entry, { reserved: retainedBytes, actual, settled: false });\n return handle;\n }\n catch (error) {\n this.retainedProducerBytes -= reserved;\n throw error;\n }\n }\n checkFor(receiver: object, args: readonly unknown[]): BooleanHandle | MeasurementHandle {\n this.assertCanRegister();\n const value = args[0];\n const qa = typeof value === \"object\" && value !== null ? compiledMaterialQA.get(value) : undefined;\n if (qa !== undefined) {\n if (args.length !== 1)\n throw new TypeError(\"compiled closeQA Match accepts one argument\");\n return this.contextualRegistration(receiver, qa.selector, qa);\n }\n if (isContextualMatch(value)) {\n if (args.length !== 1)\n throw new TypeError(\"check(contextualMatch) accepts one argument\");\n return this.contextualRegistration(receiver, value);\n }\n return Reflect.apply(this.check, this, args) as BooleanHandle | MeasurementHandle;\n }\n check(value: import(\"./match.ts\").NumericMaterial, match: NumericComparisonMatch): BooleanHandle;\n check<Value, Refined extends Value>(value: Value, match: BooleanMatch<NoInfer<Value>, Refined, \"value\">): BooleanHandle;\n check<Value extends readonly unknown[]>(value: Value, match: NumericComparisonMatch): BooleanHandle;\n check(value: ManagedToolCalls, match: ToolMatch): BooleanHandle;\n check(value: ManagedEventOccurrences, match: import(\"./match.ts\").EventMatch): BooleanHandle;\n check<Value>(value: Value, match: CollectionMatch<NoInfer<Value>>): BooleanHandle;\n check<Value>(value: Value, match: ScoreMatch<NoInfer<Value>>): MeasurementHandle;\n check(value: unknown, match?: unknown, ...extra: readonly unknown[]): BooleanHandle | MeasurementHandle {\n if (extra.length > 0) {\n throw new TypeError(\"t.check() accepts exactly (value, match)\");\n }\n this.assertCanRegister();\n assertAssertionSubject(value, \"check\");\n if (isManagedCollectionMatch(match) ||\n looksLikeCollectionMatch(match) ||\n isManagedToolMatch(match) ||\n isManagedEventMatch(match) ||\n (Array.isArray(value) && isNumericComparisonMatch(match))) {\n return this.registerBoolean(collectionMatchRegistration(value, match));\n }\n const managed = assertManagedValueMatch(match, \"t.check() match\");\n if (managed.kind === \"boolean\") {\n if (isNumericComparisonMatch(managed)) {\n const isMaterial = typeof value === \"object\" && value !== null &&\n [\"exact\", \"lower-bound\", \"unavailable\"].includes(String((value as {\n state?: unknown;\n }).state));\n const material: NumericMaterial<Unit | undefined> = isMaterial\n ? value as NumericMaterial<Unit | undefined>\n : isQuantity(value)\n ? Object.freeze({ state: \"exact\" as const, value: value.value, unit: value.unit })\n : typeof value === \"number\" && Number.isFinite(value)\n ? Object.freeze({ state: \"exact\" as const, value })\n : Object.freeze({ state: \"unavailable\" as const, reason: \"non-finite-number\" });\n const captured = captureAssertionSnapshot(Object.freeze({\n ...material,\n cut: Object.freeze({ kind: \"call-time\" as const }),\n coverage: Object.freeze({ state: \"complete\" as const }),\n derivation: Object.freeze({ kind: \"explicit-value\" as const }),\n }));\n return this.registerBoolean(numericBooleanRegistration({\n match: managed,\n criterionSubject: Object.freeze({ kind: \"explicit-value\" as const }),\n material,\n captured,\n matchedValue: (numericValue) => !isMaterial && isQuantity(value) ? value : numericValue,\n }));\n }\n const captured = captureAssertionSnapshot(value);\n const entry = this.createEntry({\n kind: \"boolean\",\n criterion: Object.freeze({ kind: \"value-match\" as const, subject: \"explicit-value\" as const, matcher: Object.freeze({ state: \"declared\" as const, name: managed.name }) }),\n subject: captured.material,\n evidence: Object.freeze([]),\n coverage: captured.coverage,\n limitations: captured.limitations,\n evaluate: () => this.evaluateBooleanMatch(managed, value),\n });\n return new BooleanHandle(this, entry);\n }\n const managedScore = managedScoreMatchOf(managed);\n if (managedScore !== undefined) {\n return this.registerMeasurement(prepareManagedScoreMatch({\n match: managed,\n options: managedScore,\n material: value,\n judge: this.judge,\n ...(this.judgeUsage === undefined ? {} : { usage: this.judgeUsage.forEntry(this.entries.length) }),\n ...(this.signal === undefined ? {} : { signal: this.signal }),\n }));\n }\n const captured = captureAssertionSnapshot(value);\n const entry = this.createEntry({\n kind: \"measurement\",\n criterion: Object.freeze({ kind: \"value-match\" as const, subject: \"explicit-value\" as const, matcher: Object.freeze({ state: \"declared\" as const, name: managed.name }) }),\n subject: captured.material,\n evidence: Object.freeze([]),\n coverage: captured.coverage,\n limitations: captured.limitations,\n evaluate: () => this.evaluateScoreMatch(managed, value),\n });\n return new MeasurementHandle(this, entry);\n }\n registerBoolean<Refined>(definition: BooleanAssertionRegistration<Refined>): BooleanHandle {\n this.assertCanRegister();\n this.assertRegistration(definition, \"registerBoolean()\");\n const entry = this.createEntry({\n kind: \"boolean\",\n criterion: definition.criterion,\n subject: freezeAssertionMaterial(definition.subject),\n evidence: Object.freeze((definition.evidence ?? []).map(freezeAssertionMaterial)),\n coverage: cloneCoverage(definition.coverage ?? { state: \"complete\" }),\n limitations: cloneLimitations(definition.limitations ?? []),\n retainedBytes: definition.retainedBytes,\n terminalReceipt: definition.terminalReceipt,\n terminalCriterion: definition.terminalCriterion,\n interruptedMatcherArtifact: definition.interruptedMatcherArtifact,\n evaluate: () => Effect.suspend(definition.evaluate).pipe(Effect.map((evaluation): EntrySettlement => this.booleanSettlement(evaluation)), this.captureEvaluationFailure(definition.interruptedMatcherArtifact)),\n });\n return new BooleanHandle(this, entry);\n }\n registerMeasurement(definition: MeasurementAssertionRegistration): MeasurementHandle {\n this.assertCanRegister();\n this.assertRegistration(definition, \"registerMeasurement()\");\n const entry = this.createEntry({\n kind: \"measurement\",\n criterion: definition.criterion,\n subject: freezeAssertionMaterial(definition.subject),\n evidence: Object.freeze((definition.evidence ?? []).map(freezeAssertionMaterial)),\n coverage: cloneCoverage(definition.coverage ?? { state: \"complete\" }),\n limitations: cloneLimitations(definition.limitations ?? []),\n retainedBytes: definition.retainedBytes,\n retainedImageBytes: definition.retainedImageBytes,\n terminalReceipt: definition.terminalReceipt,\n terminalCriterion: definition.terminalCriterion,\n terminalDetail: definition.terminalDetail,\n terminalEvidence: definition.terminalEvidence,\n evaluate: () => Effect.suspend(definition.evaluate).pipe(Effect.map((evaluation): EntrySettlement => this.measurementSettlement(evaluation))),\n });\n return new MeasurementHandle(this, entry);\n }\n directScore(points: number): DirectScoreHandle;\n directScore(ratio: number | NumericMaterial, options: {\n readonly weight: number;\n }): MeasurementHandle;\n directScore(points: number | NumericMaterial, options?: {\n readonly weight: number;\n }, ...extra: readonly unknown[]): DirectScoreHandle | MeasurementHandle {\n this.assertCanRegister();\n if (this.evaluationKind !== \"score\") {\n throw new TypeError(\"t.score() is available only in a Score Eval\");\n }\n if (extra.length > 0)\n throw new TypeError(\"t.score() accepts points, or ratio and { weight }\");\n if (options !== undefined) {\n let decoded: typeof weightedScoreInput.Type;\n try {\n const weight = Schema.decodeUnknownSync(Schema.Struct({ weight: Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)) }), { onExcessProperty: \"error\" })(options).weight;\n decoded = Schema.decodeUnknownSync(weightedScoreInput)({ ratio: points, weight });\n }\n catch (cause) {\n throw new TypeError(\"t.score() requires a finite ratio in [0, 1] and a finite non-negative weight\", { cause });\n }\n const ratio = typeof decoded.ratio === \"number\" ? decoded.ratio\n : decoded.ratio.state === \"exact\" ? decoded.ratio.value : undefined;\n const captured = captureAssertionSnapshot({ ratio: points, weight: decoded.weight });\n const handle = this.registerMeasurement({\n criterion: Object.freeze({ kind: \"value-match\", subject: \"explicit-value\", matcher: Object.freeze({ state: \"declared\", name: \"author-weighted-score\" }) }),\n subject: captured.material,\n coverage: captured.coverage,\n limitations: captured.limitations,\n evaluate: () => Effect.succeed(ratio === undefined\n ? { state: \"unavailable\", reason: \"source-unavailable\", detail: { reason: typeof decoded.ratio !== \"number\" && decoded.ratio.state === \"unavailable\" ? decoded.ratio.reason : \"ratio-is-only-a-lower-bound\" } }\n : { state: \"measured\", value: ratio }),\n });\n handle.score(decoded.weight);\n return handle;\n }\n assertFiniteNonNegative(points, \"t.score() points\");\n const captured = captureAssertionSnapshot(points);\n const entry = this.createEntry({\n kind: \"direct-score\",\n criterion: Object.freeze({ kind: \"direct-score\" as const, source: \"author\" as const }),\n subject: captured.material,\n evidence: Object.freeze([]),\n coverage: captured.coverage,\n limitations: captured.limitations,\n directScorePoints: points,\n evaluate: () => Effect.succeed({ state: \"matched\", value: points }),\n });\n return new DirectScoreHandle(this, entry);\n }\n async withGroup<Value>(title: string, body: () => Value | PromiseLike<Value>): Promise<Awaited<Value>> {\n this.assertCanRegister();\n assertDisplayText(title, \"t.group() title\");\n if (this.groupStack.length >= assertionRuntimeLimits.groupDepth) {\n throw new Error(`Assertion group depth cannot exceed ${assertionRuntimeLimits.groupDepth}`);\n }\n this.groupStack.push(title);\n try {\n return await body() as Awaited<Value>;\n }\n finally {\n const popped = this.groupStack.pop();\n if (popped !== title) {\n throw new Error(\"Assertion group stack lost nesting order\");\n }\n }\n }\n configureKey(entry: AssertionEntry, value: string): void {\n this.assertMutable(entry, \"key()\");\n assertDisplayText(value, \"key() value\");\n if (entry.display.key !== undefined)\n throw new Error(\"An Assertion key is already configured\");\n entry.display.key = value;\n }\n configureLabel(entry: AssertionEntry, value: string): void {\n this.assertMutable(entry, \"label()\");\n assertDisplayText(value, \"label() value\");\n if (entry.display.label !== undefined)\n throw new Error(\"An Assertion label is already configured\");\n entry.display.label = value;\n }\n configureGroup(entry: AssertionEntry, title: string): void {\n this.assertMutable(entry, \"group()\");\n assertDisplayText(title, \"group() title\");\n if (entry.display.groupPath.length !== this.groupStack.length) {\n throw new Error(\"An Assertion group is already configured\");\n }\n if (entry.display.groupPath.length >= assertionRuntimeLimits.groupDepth) {\n throw new Error(`Assertion group depth cannot exceed ${assertionRuntimeLimits.groupDepth}`);\n }\n entry.display.groupPath.push(title);\n }\n configureOptional(entry: AssertionEntry): void {\n this.assertMutable(entry, \"optional()\");\n if (this.evaluationKind === \"score\") {\n throw new TypeError(\"optional() is not available in a Score Eval; every score contribution must be comparable\");\n }\n if (entry.optionalConfigured)\n throw new Error(\"An Assertion optional policy is already configured\");\n entry.optionalConfigured = true;\n this.recordSourceOccurrence(entry, \"optional\");\n }\n configureGate(entry: AssertionEntry): void {\n this.assertMutable(entry, \"gate()\");\n if (entry.kind === \"direct-score\")\n throw new TypeError(\"A direct-score Assertion cannot be a gate\");\n if (entry.kind === \"measurement\")\n throw new TypeError(\"A measurement gate requires gate(minimum)\");\n if (entry.gateConfigured)\n throw new Error(\"An Assertion gate policy is already configured\");\n entry.gateConfigured = true;\n this.recordSourceOccurrence(entry, \"gate\");\n }\n configureMeasurementGate(entry: AssertionEntry, minimum: number): void {\n this.assertMutable(entry, \"gate()\");\n if (entry.kind !== \"measurement\")\n throw new TypeError(\"gate(minimum) is available only on a measurement Assertion\");\n assertUnitInterval(minimum, \"gate() minimum\");\n if (entry.gateConfigured)\n throw new Error(\"An Assertion gate policy is already configured\");\n if (entry.conditionMinimum !== undefined)\n throw new Error(\"An Assertion measurement condition is already configured\");\n entry.conditionMinimum = minimum;\n entry.gateConfigured = true;\n this.recordSourceOccurrence(entry, \"gate\");\n }\n configureScore(entry: AssertionEntry, points: number): void {\n this.assertMutable(entry, \"score()\");\n if (this.evaluationKind !== \"score\") {\n throw new TypeError(\"handle.score() is available only in a Score Eval\");\n }\n if (entry.kind === \"direct-score\")\n throw new TypeError(\"A direct-score Assertion already has its score contribution\");\n assertFiniteNonNegative(points, \"score() points\");\n if (entry.scorePoints !== undefined)\n throw new Error(\"An Assertion score contribution is already configured\");\n entry.scorePoints = points;\n this.recordSourceOccurrence(entry, \"score\");\n }\n requestStopBoolean(entry: AssertionEntry): Promise<unknown> {\n if (entry.stopPromise !== undefined)\n return entry.stopPromise;\n this.prepareStop(entry, undefined);\n const result = this.observeStop(entry, this.requestStop(this.stopBoolean(entry)));\n entry.stopPromise = result;\n return result;\n }\n requestStopMeasurement(entry: AssertionEntry, args: readonly unknown[]): Promise<number> {\n if (args.length > 1)\n throw new TypeError(\"orStop() accepts zero arguments after gate(minimum), or exactly one minimum\");\n const suppliedMinimum = args.length === 1;\n if (suppliedMinimum)\n assertUnitInterval(args[0], \"orStop() minimum\");\n if (entry.stopPromise !== undefined) {\n if (suppliedMinimum)\n throw new Error(\"An Assertion measurement condition is already configured\");\n return entry.stopPromise as Promise<number>;\n }\n if (!suppliedMinimum && entry.conditionMinimum === undefined) {\n throw new TypeError(\"orStop() requires a minimum unless gate(minimum) already configured the condition\");\n }\n this.prepareStop(entry, suppliedMinimum ? args[0] as number : undefined);\n const result = this.observeStop(entry, this.requestStop(this.stopMeasurement(entry)));\n entry.stopPromise = result;\n return result;\n }\n private prepareStop(entry: AssertionEntry, minimum: number | undefined): void {\n this.assertMutable(entry, \"orStop()\");\n if (entry.kind === \"direct-score\")\n throw new TypeError(\"A direct-score Assertion cannot stop author control flow\");\n if (minimum !== undefined) {\n if (entry.kind !== \"measurement\")\n throw new TypeError(\"Only a measurement Assertion accepts orStop(minimum)\");\n if (entry.conditionMinimum !== undefined)\n throw new Error(\"An Assertion measurement condition is already configured\");\n entry.conditionMinimum = minimum;\n }\n entry.stopConfigured = true;\n entry.configurationClosed = true;\n }\n private observeStop<Value>(entry: AssertionEntry, result: Promise<Value>): Promise<Value> {\n const occurrence = this.recordSourceOccurrence(entry, \"stop\");\n return result.then((value) => {\n if (occurrence !== undefined && occurrence.outcome === undefined) {\n occurrence.outcome = \"continued\";\n }\n return value;\n }, (error: unknown) => {\n if (occurrence !== undefined && occurrence.outcome === undefined) {\n if (isAssertionStop(error))\n occurrence.outcome = \"stopped\";\n else if (isInterruptedAuthoringClosure(error))\n occurrence.outcome = \"interrupted\";\n }\n throw error;\n });\n }\n private requestStop<Value>(effect: Effect.Effect<Value, AssertionStopError, never>): Promise<Value> {\n if (this.stopped !== undefined)\n return Promise.reject(this.stopped);\n if (this.sealed !== undefined) {\n return Promise.reject(new AssertionAuthoringClosedError(\"attempt-sealed\"));\n }\n if (this.closing) {\n return Promise.reject(new AssertionAuthoringClosedError(this.closingReason));\n }\n try {\n return this.executeStop(effect);\n }\n catch (error) {\n return Promise.reject(error);\n }\n }\n private stopBoolean(entry: AssertionEntry): Effect.Effect<unknown, AssertionStopError> {\n return this.settleThrough(entry).pipe(Effect.flatMap((settlement) => {\n if (settlement.state === \"matched\")\n return Effect.succeed(settlement.value);\n return Effect.fail(this.latchStop(entry, settlement));\n }));\n }\n private stopMeasurement(entry: AssertionEntry): Effect.Effect<number, AssertionStopError> {\n return this.settleThrough(entry).pipe(Effect.flatMap((settlement) => {\n if (settlement.state === \"measured\"\n && entry.conditionMinimum !== undefined\n && settlement.value >= entry.conditionMinimum) {\n return Effect.succeed(settlement.value);\n }\n return Effect.fail(this.latchStop(entry, settlement));\n }));\n }\n seal(options: AssertionSealOptions = {}): Effect.Effect<SealedAssertionsRuntime, AssertionSealError, never> {\n return Effect.suspend(() => {\n if (this.sealed !== undefined)\n return Effect.succeed(this.sealed);\n if (options.interrupted) {\n this.closeAuthoring(\"attempt-interrupted\");\n for (const entry of this.entries) {\n if (entry.settled === undefined) {\n entry.settled = Object.freeze({\n state: \"interrupted\" as const,\n ...(entry.interruptedMatcherArtifact === undefined\n ? {}\n : { matcherArtifact: entry.interruptedMatcherArtifact }),\n });\n }\n }\n return Effect.sync(() => this.finishSeal({\n ...options,\n execution: \"errored\",\n }));\n }\n if (this.sealStarted)\n throw new Error(\"Assertions are already sealing\");\n this.closeAuthoring(\"attempt-sealing\");\n this.sealStarted = true;\n return Effect.forEach(this.entries, (entry) => this.settle(entry)).pipe(Effect.andThen(Effect.sync(() => this.finishSeal(options))), Effect.onInterrupt(() => Effect.sync(() => {\n this.sealStarted = false;\n })));\n });\n }\n trackContextReceiver(receiver: AssertionContextReceiver): void {\n this.contextReceivers.add(receiver);\n }\n closeAuthoring(reason: \"attempt-sealing\" | \"attempt-interrupted\"): void {\n if (this.sealed !== undefined)\n return;\n if (this.closingReason !== \"attempt-interrupted\")\n this.closingReason = reason;\n this.closing = true;\n for (const receiver of this.contextReceivers) {\n const release = receiver.release;\n receiver.read = undefined;\n receiver.cut = undefined;\n receiver.release = undefined;\n release?.();\n }\n this.contextReceivers.clear();\n }\n assertAuthoringOpen(): void {\n this.assertCanRegister(false);\n }\n private createEntry(input: {\n readonly kind: EntryKind;\n readonly criterion: AssertionCriterion;\n readonly subject: AssertionMaterial;\n readonly evidence: readonly AssertionMaterial[];\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n readonly evaluate: () => Effect.Effect<EntrySettlement, unknown, never>;\n readonly directScorePoints?: number;\n readonly interruptedMatcherArtifact?: MatcherQueryArtifact;\n readonly retainedBytes?: number;\n readonly retainedImageBytes?: number;\n readonly terminalReceipt?: () => import(\"./api.ts\").AssertionCollectionReceipt;\n readonly terminalDetail?: () => AssertionSnapshotObject;\n readonly terminalEvidence?: () => readonly AssertionMaterial[];\n readonly terminalCriterion?: () => AssertionCriterion;\n }): AssertionEntry {\n if (this.entries.length >= assertionRuntimeLimits.entries) {\n throw new Error(`An Assertions Attachment cannot contain more than ${assertionRuntimeLimits.entries} entries`);\n }\n const retainedBytes = input.retainedBytes ?? 0;\n const retainedImageBytes = input.retainedImageBytes ?? 0;\n if (!Number.isSafeInteger(retainedBytes) || retainedBytes < 0) {\n throw new TypeError(\"Assertion retainedBytes must be a non-negative safe integer\");\n }\n if (this.retainedProducerBytes + retainedBytes > 64 * 1024 * 1024) {\n throw new Error(\"Attempt Assertion retention cannot exceed 64 MiB\");\n }\n if (!Number.isSafeInteger(retainedImageBytes) || retainedImageBytes < 0 || this.retainedImageBytes + retainedImageBytes > 32 * 1024 * 1024) {\n throw new Error(\"Attempt managed image retention cannot exceed 32 MiB\");\n }\n const entry: AssertionEntry = {\n index: this.entries.length,\n kind: input.kind,\n criterion: input.criterion,\n subject: input.subject,\n evidence: input.evidence,\n initialCoverage: input.coverage,\n initialLimitations: input.limitations,\n evaluate: input.evaluate,\n display: { key: undefined, label: undefined, groupPath: [...this.groupStack] },\n directScorePoints: input.directScorePoints,\n interruptedMatcherArtifact: input.interruptedMatcherArtifact,\n terminalReceipt: input.terminalReceipt,\n terminalDetail: input.terminalDetail,\n terminalEvidence: input.terminalEvidence,\n terminalCriterion: input.terminalCriterion,\n optionalConfigured: false,\n gateConfigured: false,\n conditionMinimum: undefined,\n scorePoints: input.directScorePoints,\n configurationClosed: false,\n stopConfigured: false,\n stopPromise: undefined,\n settled: undefined,\n pending: undefined,\n sealedEvidence: undefined,\n };\n this.entries.push(entry);\n this.retainedProducerBytes += retainedBytes;\n this.retainedImageBytes += retainedImageBytes;\n const capture = sourceCaptureByRuntime.get(this);\n if (capture !== undefined) {\n const capturedEntry: AssertionRuntimeSourceEntry = { occurrences: [] };\n capture.entries.push(capturedEntry);\n capture.byEntry.set(entry, capturedEntry);\n this.recordSourceOccurrence(entry, \"declaration\");\n }\n return entry;\n }\n private assertRegistration(definition: unknown, owner: string): asserts definition is BooleanAssertionRegistration<unknown> | MeasurementAssertionRegistration {\n if (!isRecord(definition) || typeof definition.evaluate !== \"function\") {\n throw new TypeError(`${owner} requires an Effect evaluation function`);\n }\n if (!isRecord(definition.subject)\n || (definition.subject.kind !== \"snapshot\" && definition.subject.kind !== \"record-attachment\")) {\n throw new TypeError(`${owner} requires snapshot or same-owner record-attachment subject material`);\n }\n if (definition.subject.kind === \"record-attachment\"\n && typeof definition.subject.preview !== \"string\") {\n throw new TypeError(`${owner} requires a record-attachment preview`);\n }\n if (definition.evidence !== undefined\n && (!Array.isArray(definition.evidence)\n || definition.evidence.some((material) => !isRecord(material)\n || (material.kind !== \"snapshot\" && material.kind !== \"record-attachment\" && material.kind !== \"judge-image\")\n || (material.kind === \"record-attachment\"\n && typeof material.preview !== \"string\")\n || (material.kind === \"judge-image\" && !isJudgeImage(material.image))))) {\n throw new TypeError(`${owner} evidence must use snapshot, record-attachment, or judge-image material`);\n }\n }\n private evaluateBooleanMatch(match: BooleanMatch<unknown, unknown, \"value\">, value: unknown): Effect.Effect<EntrySettlement> {\n return Effect.tryPromise({\n try: () => evaluateBooleanMatch(match, value),\n catch: () => undefined,\n }).pipe(Effect.map((evaluation): EntrySettlement => evaluation.state === \"unavailable\"\n ? Object.freeze({\n state: \"unavailable\" as const,\n reason: \"source-unavailable\" as const,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n })\n : this.booleanSettlement(evaluation)), this.captureEvaluationFailure());\n }\n private evaluateScoreMatch(match: ScoreMatch<unknown>, value: unknown): Effect.Effect<EntrySettlement> {\n return evaluateScoreMatch(match, value).pipe(Effect.map((value): EntrySettlement => {\n assertUnitInterval(value, \"measurement Match result\");\n return Object.freeze({ state: \"measured\" as const, value });\n }), this.captureEvaluationFailure());\n }\n private captureEvaluationFailure(matcherArtifact?: MatcherQueryArtifact): <Value>(effect: Effect.Effect<Value, unknown, never>) => Effect.Effect<Value | EntrySettlement, never, never> {\n return (effect) => effect.pipe(Effect.catchCause((cause) => Cause.hasInterruptsOnly(cause)\n ? Effect.interrupt\n : Effect.succeed(Object.freeze({\n state: \"errored\" as const,\n ...(matcherArtifact === undefined ? {} : { matcherArtifact }),\n }))));\n }\n private booleanSettlement(evaluation: BooleanAssertionEvaluation<unknown>): EntrySettlement {\n switch (evaluation.state) {\n case \"matched\":\n return Object.freeze({\n state: \"matched\" as const,\n value: evaluation.value,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n ...(evaluation.matcherArtifact === undefined ? {} : { matcherArtifact: evaluation.matcherArtifact }),\n });\n case \"mismatched\":\n return Object.freeze({\n state: \"mismatched\" as const,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n ...(evaluation.matcherArtifact === undefined ? {} : { matcherArtifact: evaluation.matcherArtifact }),\n });\n case \"unavailable\":\n return Object.freeze({\n state: \"unavailable\" as const,\n reason: evaluation.reason,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n ...(evaluation.matcherArtifact === undefined ? {} : { matcherArtifact: evaluation.matcherArtifact }),\n });\n case \"not-applicable\":\n return Object.freeze({\n state: \"not-applicable\" as const,\n ...(evaluation.diagnostic === undefined ? {} : { diagnostic: evaluation.diagnostic }),\n ...(evaluation.matcherArtifact === undefined ? {} : { matcherArtifact: evaluation.matcherArtifact }),\n });\n }\n }\n private measurementSettlement(evaluation: MeasurementAssertionEvaluation): EntrySettlement {\n switch (evaluation.state) {\n case \"measured\":\n assertUnitInterval(evaluation.value, \"measurement Assertion result\");\n return Object.freeze({\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n state: \"measured\" as const,\n value: evaluation.value,\n ...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }),\n });\n case \"unavailable\":\n return Object.freeze({\n ...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),\n state: \"unavailable\" as const,\n reason: evaluation.reason,\n ...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }),\n });\n case \"not-applicable\":\n return Object.freeze({ state: \"not-applicable\" as const, ...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }) });\n case \"errored\":\n return Object.freeze({ state: \"errored\" as const, ...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }) });\n }\n }\n /** Evaluates an entry at most once even when multiple Effect fibers await it. */\n private settle(entry: AssertionEntry): Effect.Effect<EntrySettlement> {\n return Effect.suspend(() => {\n if (entry.settled !== undefined)\n return Effect.succeed(entry.settled);\n if (entry.pending !== undefined)\n return Deferred.await(entry.pending);\n return Effect.uninterruptibleMask((restore) => Effect.gen(function* () {\n if (entry.settled !== undefined)\n return entry.settled;\n if (entry.pending !== undefined)\n return yield* Deferred.await(entry.pending);\n const deferred = yield* Deferred.make<EntrySettlement>();\n entry.pending = deferred;\n const settled = yield* restore(Effect.suspend(entry.evaluate).pipe(Effect.catchCause((cause) => Cause.hasInterruptsOnly(cause)\n ? Effect.interrupt\n : Effect.succeed(Object.freeze({ state: \"errored\" as const }))))).pipe(Effect.onInterrupt(() => Deferred.interrupt(deferred).pipe(Effect.andThen(Effect.sync(() => {\n if (entry.pending === deferred)\n entry.pending = undefined;\n })))));\n // An enclosing Attempt interruption may have synchronously sealed\n // this entry while its evaluator was unwinding. Preserve that\n // producer-interrupted terminal fact rather than resurrecting a\n // late evaluator result.\n const terminal = entry.settled ?? settled;\n entry.settled = terminal;\n yield* Deferred.succeed(deferred, terminal);\n return terminal;\n }));\n });\n }\n /**\n * A control barrier may force evaluation early, but it must not let a later\n * Judge entry leapfrog an earlier declaration. `settle()` still memoizes the\n * individual work, so the normal seal only observes these same results.\n */\n private settleThrough(entry: AssertionEntry): Effect.Effect<EntrySettlement> {\n return Effect.forEach(this.entries.slice(0, entry.index + 1), (candidate) => this.settle(candidate)).pipe(Effect.map((settlements) => {\n const settlement = settlements.at(-1);\n if (settlement === undefined)\n throw new Error(\"Assertion stop entry was not registered\");\n return settlement;\n }));\n }\n private latchStop(entry: AssertionEntry, settlement: EntrySettlement): AssertionStopError {\n if (this.stopped !== undefined)\n return this.stopped;\n const reason = settlement.state === \"mismatched\" || settlement.state === \"measured\"\n ? \"condition-not-met\" as const\n : settlement.state === \"unavailable\"\n ? \"source-unavailable\" as const\n : settlement.state === \"not-applicable\"\n ? \"not-applicable\" as const\n : \"evaluator-failed\" as const;\n this.stopped = Object.freeze({\n _tag: \"AssertionStopError\" as const,\n entryIndex: entry.index,\n reason,\n });\n return this.stopped;\n }\n private finishSeal(options: AssertionSealOptions): SealedAssertionsRuntime {\n if (this.sealed !== undefined)\n return this.sealed;\n const entries: SealedAssertionEntry[] = [];\n const assertions: SealedAssertionEvaluation[\"assertions\"][number][] = [];\n for (const entry of this.entries) {\n const sealedEntry = this.toSealedEntry(entry);\n entries.push(sealedEntry);\n assertions.push(Object.freeze({\n required: this.isRequired(entry),\n result: sealedEntry.result,\n }));\n }\n const evaluation: SealedAssertionEvaluation = Object.freeze({\n execution: options.execution ?? \"completed\",\n explicitlySkipped: options.explicitlySkipped ?? false,\n assertions: Object.freeze(assertions),\n });\n this.sealed = Object.freeze({\n entries: Object.freeze(entries),\n evaluation,\n });\n return this.sealed;\n }\n private toSealedEntry(entry: AssertionEntry): SealedAssertionEntry {\n const settlement = entry.settled;\n if (settlement === undefined)\n throw new Error(\"Attempted to seal an unsettled Assertion entry\");\n const display: AssertionDisplay = Object.freeze({\n ...(entry.display.key === undefined ? {} : { key: entry.display.key }),\n ...(entry.display.label === undefined ? {} : { label: entry.display.label }),\n groupPath: Object.freeze([...entry.display.groupPath]),\n });\n const material = this.materialFor(entry, settlement);\n return Object.freeze({\n display,\n criterion: entry.terminalCriterion?.() ?? entry.criterion,\n subject: entry.subject,\n evidence: this.evidenceFor(entry),\n coverage: material.coverage,\n limitations: material.limitations,\n result: this.resultFor(entry, settlement),\n policy: Object.freeze({\n requirement: this.isRequired(entry) ? \"required\" as const : \"optional\" as const,\n condition: this.conditionFor(entry),\n }),\n observed: entry.kind === \"boolean\"\n ? Object.freeze({\n kind: \"boolean\" as const,\n outcome: settlement.state === \"measured\" || settlement.state === \"interrupted\"\n ? \"errored\" as const\n : settlement.state,\n })\n : entry.kind === \"measurement\"\n ? settlement.state === \"measured\"\n ? Object.freeze({ kind: \"measurement\" as const, state: \"available\" as const, value: settlement.value })\n : Object.freeze({ kind: \"measurement\" as const, state: \"unavailable\" as const })\n : settlement.state === \"measured\"\n ? Object.freeze({ kind: \"direct-score\" as const, state: \"available\" as const, value: settlement.value })\n : Object.freeze({ kind: \"direct-score\" as const, state: \"unavailable\" as const }),\n ...(settlement.matcherArtifact === undefined\n ? {}\n : { matcherArtifact: settlement.matcherArtifact }),\n });\n }\n private materialFor(entry: AssertionEntry, settlement: EntrySettlement): {\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n } {\n if (settlement.state === \"unavailable\" && this.retentionByEntry.has(entry) && entry.initialCoverage.state === \"partial\")\n return Object.freeze({ coverage: entry.initialCoverage, limitations: entry.initialLimitations });\n if (settlement.state === \"unavailable\") {\n return Object.freeze({\n coverage: Object.freeze({ state: \"unavailable\" as const, reason: \"source-unavailable\" as const }),\n limitations: Object.freeze([]),\n });\n }\n if (settlement.state === \"not-applicable\") {\n return Object.freeze({\n coverage: Object.freeze({ state: \"not-applicable\" as const, reason: \"optional-material\" as const }),\n limitations: Object.freeze([]),\n });\n }\n return Object.freeze({\n coverage: entry.initialCoverage,\n limitations: entry.initialLimitations,\n });\n }\n private evidenceFor(entry: AssertionEntry): readonly AssertionMaterial[] {\n if (entry.sealedEvidence !== undefined)\n return entry.sealedEvidence;\n const terminal = entry.terminalEvidence?.() ?? [];\n entry.sealedEvidence = Object.freeze([\n ...entry.evidence,\n ...terminal.map(freezeAssertionMaterial),\n ]);\n const retention = this.retentionByEntry.get(entry);\n if (retention !== undefined && !retention.settled) {\n const diagnosticBytes = UTF8.encode(JSON.stringify(entry.settled === undefined ? {} : this.resultFor(entry, entry.settled))).byteLength;\n const actual = retention.actual() + diagnosticBytes;\n this.retainedProducerBytes += actual - retention.reserved;\n retention.settled = true;\n }\n return entry.sealedEvidence;\n }\n private resultFor(entry: AssertionEntry, settlement: EntrySettlement): AssertionResult {\n const terminalDetail = entry.terminalDetail?.();\n const baseDiagnostic = settlement.explanation ?? captureMatchDiagnostic(settlement.diagnostic);\n const capturedDiagnostic = terminalDetail === undefined\n ? baseDiagnostic\n : Object.freeze({ ...(baseDiagnostic ?? {}), ...terminalDetail });\n const diagnostic = capturedDiagnostic === undefined ? {} : { diagnostic: capturedDiagnostic };\n const terminalReceipt = entry.terminalReceipt?.() ?? settlement.receipt;\n const receipt = terminalReceipt === undefined ? {} : { receipt: terminalReceipt };\n switch (settlement.state) {\n case \"matched\":\n return Object.freeze({\n state: \"matched\" as const,\n gate: this.gateForMatched(entry),\n score: this.availableScoreFor(entry, 1),\n ...diagnostic,\n ...receipt,\n });\n case \"mismatched\":\n return Object.freeze({\n state: \"mismatched\" as const,\n reason: \"condition-not-met\" as const,\n gate: this.gateForMismatched(entry),\n score: this.availableScoreFor(entry, 0),\n ...diagnostic,\n ...receipt,\n });\n case \"measured\": {\n const matched = entry.conditionMinimum === undefined || settlement.value >= entry.conditionMinimum;\n return matched\n ? Object.freeze({\n state: \"matched\" as const,\n gate: this.gateForMatched(entry),\n score: this.availableScoreFor(entry, settlement.value),\n ...diagnostic,\n ...receipt,\n })\n : Object.freeze({\n state: \"mismatched\" as const,\n reason: \"condition-not-met\" as const,\n gate: this.gateForMismatched(entry),\n score: this.availableScoreFor(entry, settlement.value),\n ...diagnostic,\n ...receipt,\n });\n }\n case \"unavailable\":\n return Object.freeze({\n state: \"unavailable\" as const,\n reason: settlement.reason,\n gate: this.gateForUnavailable(entry),\n score: this.incompleteScoreFor(entry, \"source-unavailable\"),\n ...diagnostic,\n ...receipt,\n });\n case \"not-applicable\":\n return Object.freeze({\n state: \"not-applicable\" as const,\n reason: \"coverage-not-applicable\" as const,\n gate: this.gateForNotApplicable(entry),\n score: this.incompleteScoreFor(entry, \"not-applicable\"),\n ...diagnostic,\n ...receipt,\n });\n case \"errored\":\n return Object.freeze({\n state: \"errored\" as const,\n reason: \"evaluator-failed\" as const,\n gate: this.gateForUnavailable(entry),\n score: this.incompleteScoreFor(entry, \"evaluation-errored\"),\n ...diagnostic,\n ...receipt,\n });\n case \"interrupted\":\n return Object.freeze({\n state: \"errored\" as const,\n reason: \"producer-interrupted\" as const,\n gate: this.gateForUnavailable(entry),\n score: this.incompleteScoreFor(entry, \"evaluation-errored\"),\n ...diagnostic,\n ...receipt,\n });\n }\n }\n private isGate(entry: AssertionEntry): boolean {\n if (entry.gateConfigured)\n return true;\n return this.evaluationKind === \"pass\" && entry.kind === \"boolean\";\n }\n private isRequired(entry: AssertionEntry): boolean {\n if (entry.kind === \"direct-score\")\n return true;\n if (entry.gateConfigured || entry.scorePoints !== undefined || entry.stopConfigured)\n return true;\n return this.evaluationKind === \"pass\" && entry.kind === \"boolean\" && !entry.optionalConfigured;\n }\n private conditionFor(entry: AssertionEntry): SealedAssertionEntry[\"policy\"][\"condition\"] {\n if (entry.kind === \"measurement\" && entry.conditionMinimum !== undefined) {\n return Object.freeze({ kind: \"at-least\" as const, threshold: entry.conditionMinimum });\n }\n if (entry.kind === \"boolean\"\n && (this.evaluationKind === \"pass\" || entry.gateConfigured || entry.scorePoints !== undefined || entry.stopConfigured)) {\n return Object.freeze({ kind: \"boolean\" as const, expected: true as const });\n }\n return Object.freeze({ kind: \"record-only\" as const });\n }\n private gateForMatched(entry: AssertionEntry): \"not-gate\" | \"satisfied\" {\n return this.isGate(entry) ? \"satisfied\" : \"not-gate\";\n }\n private gateForMismatched(entry: AssertionEntry): \"not-gate\" | \"failed\" {\n return this.isGate(entry) ? \"failed\" : \"not-gate\";\n }\n private gateForUnavailable(entry: AssertionEntry): \"not-gate\" | \"unavailable\" {\n return this.isGate(entry) ? \"unavailable\" : \"not-gate\";\n }\n private gateForNotApplicable(entry: AssertionEntry): \"not-gate\" | \"not-applicable\" {\n return this.isGate(entry) ? \"not-applicable\" : \"not-gate\";\n }\n private availableScoreFor(entry: AssertionEntry, normalized: number): AvailableScoreContribution {\n const points = entry.scorePoints;\n if (points === undefined)\n return noScore();\n return earnedScore(points, points * normalized);\n }\n private incompleteScoreFor(entry: AssertionEntry, reason: Extract<AssertionScoreContribution, {\n readonly state: \"unavailable\";\n }>[\"reason\"]): IncompleteScoreContribution {\n const points = entry.scorePoints;\n return points === undefined ? noScore() : unavailableScore(points, reason);\n }\n private assertCanRegister(reentry = true): void {\n if (reentry && this.readingContext)\n throw new TypeError(\"Context Match readers cannot reenter Assertion authoring\");\n if (this.stopped !== undefined) {\n throw new AssertionAuthoringClosedError(\"stop-latched\");\n }\n if (this.sealed !== undefined) {\n throw new AssertionAuthoringClosedError(\"attempt-sealed\");\n }\n if (this.closing) {\n throw new AssertionAuthoringClosedError(this.closingReason);\n }\n }\n private assertMutable(entry: AssertionEntry, method: string): void {\n this.assertCanRegister();\n if (entry.configurationClosed) {\n throw new Error(`Cannot configure an Assertion after orStop() closed its configuration`);\n }\n if (entry.settled !== undefined || entry.pending !== undefined) {\n throw new Error(`Cannot configure an Assertion after ${method} has begun evaluation`);\n }\n }\n}\nfunction sourceCaptureRuntime(runtime: AssertionsRuntime<\"pass\" | \"score\">): AssertionsRuntimeImplementation | undefined {\n return runtime instanceof AssertionsRuntimeImplementation ? runtime : undefined;\n}\n/** @internal Runner-only source observation hook; it never changes the public runtime value. */\nexport function attachAssertionsRuntimeSourceCapture(runtime: AssertionsRuntime<\"pass\" | \"score\">, capture: () => AssertionRuntimeSourceSite | undefined): void {\n const implementation = sourceCaptureRuntime(runtime);\n if (implementation === undefined) {\n throw new TypeError(\"Assertions source capture requires a NiceEval AssertionsRuntime\");\n }\n if (sourceCaptureByRuntime.has(implementation)) {\n throw new Error(\"Assertions source capture is already attached to this runtime\");\n }\n sourceCaptureByRuntime.set(implementation, {\n capture,\n entries: [],\n byEntry: new WeakMap<AssertionEntry, AssertionRuntimeSourceEntry>(),\n });\n}\n/** @internal Detached immutable journal for the Runner source producer. */\nexport function assertionsRuntimeSourceCaptureSnapshot(runtime: AssertionsRuntime<\"pass\" | \"score\">): AssertionsRuntimeSourceCaptureSnapshot | undefined {\n const implementation = sourceCaptureRuntime(runtime);\n const capture = implementation === undefined ? undefined : sourceCaptureByRuntime.get(implementation);\n if (capture === undefined)\n return undefined;\n return Object.freeze({\n entries: Object.freeze(capture.entries.map((entry) => Object.freeze({\n occurrences: Object.freeze(entry.occurrences.map((occurrence) => Object.freeze({\n role: occurrence.role,\n ...(occurrence.site === undefined ? {} : { site: occurrence.site }),\n ...(occurrence.outcome === undefined ? {} : { outcome: occurrence.outcome }),\n }))),\n }))),\n });\n}\n/** @internal Attempt interruption gives pending real stop calls their terminal disposition. */\nexport function markAssertionsRuntimeSourceCaptureInterrupted(runtime: AssertionsRuntime<\"pass\" | \"score\">): void {\n const implementation = sourceCaptureRuntime(runtime);\n const capture = implementation === undefined ? undefined : sourceCaptureByRuntime.get(implementation);\n if (capture === undefined)\n return;\n for (const entry of capture.entries) {\n for (const occurrence of entry.occurrences) {\n if (occurrence.role === \"stop\" && occurrence.outcome === undefined) {\n occurrence.outcome = \"interrupted\";\n }\n }\n }\n}\n/** Creates one Attempt-local assert-first authoring runtime. */\nexport function createAssertionsRuntime(input: {\n readonly evaluationKind: \"pass\";\n readonly executeStop?: AssertionStopExecutor;\n readonly judge?: ResolvedJudgeConfig;\n readonly signal?: AbortSignal;\n readonly judgeUsage?: import(\"../o11y/judge-usage.ts\").JudgeUsageCollector;\n}): AssertionsRuntime<\"pass\">;\nexport function createAssertionsRuntime(input: {\n readonly evaluationKind: \"score\";\n readonly executeStop?: AssertionStopExecutor;\n readonly judge?: ResolvedJudgeConfig;\n readonly signal?: AbortSignal;\n readonly judgeUsage?: import(\"../o11y/judge-usage.ts\").JudgeUsageCollector;\n}): AssertionsRuntime<\"score\">;\nexport function createAssertionsRuntime(input: {\n readonly evaluationKind: AssertionEvaluationKind;\n readonly executeStop?: AssertionStopExecutor;\n readonly judge?: ResolvedJudgeConfig;\n readonly signal?: AbortSignal;\n readonly judgeUsage?: import(\"../o11y/judge-usage.ts\").JudgeUsageCollector;\n}): AssertionsRuntime<AssertionEvaluationKind> {\n if (input.evaluationKind !== \"pass\" && input.evaluationKind !== \"score\") {\n throw new TypeError(\"Assertions runtime evaluationKind must be \\\"pass\\\" or \\\"score\\\"\");\n }\n const executeStop = input.executeStop ?? (() => Promise.reject(new AssertionAuthoringClosedError(\"runtime-unattached\")));\n const runtime = new AssertionsRuntimeImplementation(input.evaluationKind, executeStop, input.judge, input.signal, input.judgeUsage);\n return runtime as unknown as AssertionsRuntime<AssertionEvaluationKind>;\n}\n/** @internal Core preset dispatch shares the exact owning runtime. */\nconst compiledMaterialQA = new WeakMap<object, {\n readonly selector: ContextualMatch;\n readonly question: string;\n readonly options?: JudgePresetOptions;\n}>();\nexport function registerMaterialQA(check: object, selector: ContextualMatch, question: string, options?: JudgePresetOptions): unknown {\n const runtime = runtimeByCheck.get(check);\n if (runtime === undefined)\n throw new TypeError(\"closeQA requires an Assertion runtime\");\n if (!isContextualMatch(selector) || selector.kind !== \"material\")\n throw new TypeError(\"closeQA requires a MaterialMatch\");\n validateMaterialQAInputs(question, options);\n const compiled = Object.freeze({});\n compiledMaterialQA.set(compiled, Object.freeze({ selector, question, ...(options === undefined ? {} : { options }) }));\n return Reflect.apply(check as (...args: readonly unknown[]) => unknown, undefined, [compiled]);\n}\n"]}