niceeval 0.18.0 → 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 (679) hide show
  1. package/INDEX.md +4 -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 -7
  7. package/dist/adapter.cjs.map +1 -1
  8. package/dist/adapter.d.cts +21 -21
  9. package/dist/adapter.d.mts +21 -21
  10. package/dist/adapter.d.ts +21 -21
  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 +22 -6
  121. package/dist/assertions/measurements.cjs.map +1 -1
  122. package/dist/assertions/measurements.d.cts +8 -1
  123. package/dist/assertions/measurements.d.mts +8 -1
  124. package/dist/assertions/measurements.d.ts +8 -1
  125. package/dist/assertions/numeric.cjs +2 -0
  126. package/dist/assertions/numeric.cjs.map +1 -1
  127. package/dist/assertions/numeric.d.cts +1 -1
  128. package/dist/assertions/numeric.d.mts +1 -1
  129. package/dist/assertions/numeric.d.ts +1 -1
  130. package/dist/assertions/quantity.cjs +42 -0
  131. package/dist/assertions/quantity.cjs.map +1 -0
  132. package/dist/assertions/quantity.d.cts +18 -0
  133. package/dist/assertions/quantity.d.mts +18 -0
  134. package/dist/assertions/quantity.d.ts +18 -0
  135. package/dist/assertions/quantity.js +22 -0
  136. package/dist/assertions/quantity.js.map +1 -0
  137. package/dist/assertions/record/attachment.cjs +2 -0
  138. package/dist/assertions/record/attachment.cjs.map +1 -1
  139. package/dist/assertions/record/codec.cjs +5 -1
  140. package/dist/assertions/record/codec.cjs.map +1 -1
  141. package/dist/assertions/record/model.cjs.map +1 -1
  142. package/dist/assertions/record/model.d.cts +3 -1
  143. package/dist/assertions/record/model.d.mts +3 -1
  144. package/dist/assertions/record/model.d.ts +3 -1
  145. package/dist/assertions/runtime.cjs +11 -6
  146. package/dist/assertions/runtime.cjs.map +1 -1
  147. package/dist/cli/program.cjs +3 -0
  148. package/dist/cli/program.cjs.map +1 -1
  149. package/dist/context/assert-first.cjs +6 -4
  150. package/dist/context/assert-first.cjs.map +1 -1
  151. package/dist/context/assert-first.d.cts +9 -3
  152. package/dist/context/assert-first.d.mts +9 -3
  153. package/dist/context/assert-first.d.ts +9 -3
  154. package/dist/context/notes.cjs +47 -0
  155. package/dist/context/notes.cjs.map +1 -0
  156. package/dist/context/notes.d.cts +10 -0
  157. package/dist/context/notes.d.mts +10 -0
  158. package/dist/context/notes.d.ts +10 -0
  159. package/dist/context/notes.js +6 -0
  160. package/dist/context/notes.js.map +1 -0
  161. package/dist/context/send-failures.cjs +1 -7
  162. package/dist/context/send-failures.cjs.map +1 -1
  163. package/dist/context/send-failures.d.cts +2 -3
  164. package/dist/context/send-failures.d.mts +2 -3
  165. package/dist/context/send-failures.d.ts +2 -3
  166. package/dist/context/send-retry.cjs +0 -1
  167. package/dist/context/send-retry.cjs.map +1 -1
  168. package/dist/context/send-retry.d.cts +1 -2
  169. package/dist/context/send-retry.d.mts +1 -2
  170. package/dist/context/send-retry.d.ts +1 -2
  171. package/dist/context/session.cjs +10 -17
  172. package/dist/context/session.cjs.map +1 -1
  173. package/dist/context/session.d.cts +4 -10
  174. package/dist/context/session.d.mts +4 -10
  175. package/dist/context/session.d.ts +4 -10
  176. package/dist/define.cjs +88 -65
  177. package/dist/define.cjs.map +1 -1
  178. package/dist/define.d.cts +3 -3
  179. package/dist/define.d.mts +3 -3
  180. package/dist/define.d.ts +3 -3
  181. package/dist/eval/cli/contribution.cjs +1 -1
  182. package/dist/eval/cli/contribution.cjs.map +1 -1
  183. package/dist/eval/host/index.cjs +1 -1
  184. package/dist/eval/host/index.cjs.map +1 -1
  185. package/dist/eval/record/evaluation.cjs +1 -1
  186. package/dist/eval/record/evaluation.cjs.map +1 -1
  187. package/dist/eval/record/membership-provenance.d.cts +3 -3
  188. package/dist/eval/record/membership-provenance.d.mts +3 -3
  189. package/dist/eval/record/membership-provenance.d.ts +3 -3
  190. package/dist/eval/record/score.cjs +2 -2
  191. package/dist/eval/record/score.cjs.map +1 -1
  192. package/dist/eval/record/sealed-assertion.cjs +1 -1
  193. package/dist/eval/record/sealed-assertion.cjs.map +1 -1
  194. package/dist/eval/record/verdict.cjs +2 -2
  195. package/dist/eval/record/verdict.cjs.map +1 -1
  196. package/dist/expect/index.cjs +10 -1
  197. package/dist/expect/index.cjs.map +1 -1
  198. package/dist/expect/index.d.cts +3 -1
  199. package/dist/expect/index.d.mts +3 -1
  200. package/dist/expect/index.d.ts +3 -1
  201. package/dist/expect/index.js +92 -76
  202. package/dist/expect/index.mjs +92 -76
  203. package/dist/experiment/host/cli/contribution.cjs +52 -39
  204. package/dist/experiment/host/cli/contribution.cjs.map +1 -1
  205. package/dist/experiment/host/cli/contribution.d.cts +18 -4
  206. package/dist/experiment/host/cli/contribution.d.mts +18 -4
  207. package/dist/experiment/host/cli/contribution.d.ts +18 -4
  208. package/dist/experiment/host/cli/contribution.js +2 -2
  209. package/dist/experiment/host/cli/debug-protocol.cjs +2 -2
  210. package/dist/experiment/host/cli/debug-protocol.cjs.map +1 -1
  211. package/dist/experiment/host/cli/debug-protocol.d.cts +2 -2
  212. package/dist/experiment/host/cli/debug-protocol.d.mts +2 -2
  213. package/dist/experiment/host/cli/debug-protocol.d.ts +2 -2
  214. package/dist/experiment/host/cli/output-protocol.cjs +1 -1
  215. package/dist/experiment/host/cli/output-protocol.cjs.map +1 -1
  216. package/dist/experiment/host/cli/output-protocol.d.cts +2 -2
  217. package/dist/experiment/host/cli/output-protocol.d.mts +2 -2
  218. package/dist/experiment/host/cli/output-protocol.d.ts +2 -2
  219. package/dist/experiment/host/current.cjs +2 -2
  220. package/dist/experiment/host/current.cjs.map +1 -1
  221. package/dist/experiment/host/index.cjs +1 -1
  222. package/dist/experiment/host/index.cjs.map +1 -1
  223. package/dist/experiment/host/operations.cjs +21 -22
  224. package/dist/experiment/host/operations.cjs.map +1 -1
  225. package/dist/experiment/host/runtime.cjs +8 -9
  226. package/dist/experiment/host/runtime.cjs.map +1 -1
  227. package/dist/experiment/host/runtime.d.cts +3 -3
  228. package/dist/experiment/host/runtime.d.mts +3 -3
  229. package/dist/experiment/host/runtime.d.ts +3 -3
  230. package/dist/experiment/host/teardown.cjs +3 -3
  231. package/dist/experiment/host/teardown.cjs.map +1 -1
  232. package/dist/experiment/host/teardown.d.cts +3 -3
  233. package/dist/experiment/host/teardown.d.mts +3 -3
  234. package/dist/experiment/host/teardown.d.ts +3 -3
  235. package/dist/experiment/host/types.cjs.map +1 -1
  236. package/dist/experiment/host/types.d.cts +19 -19
  237. package/dist/experiment/host/types.d.mts +19 -19
  238. package/dist/experiment/host/types.d.ts +19 -19
  239. package/dist/index.cjs +3 -3
  240. package/dist/index.cjs.map +1 -1
  241. package/dist/index.d.cts +3 -3
  242. package/dist/index.d.mts +3 -3
  243. package/dist/index.d.ts +3 -3
  244. package/dist/index.js +2 -2
  245. package/dist/index.mjs +2 -2
  246. package/dist/inspection/assertions.cjs +1 -1
  247. package/dist/inspection/assertions.cjs.map +1 -1
  248. package/dist/inspection/cli/contribution.cjs +8 -7
  249. package/dist/inspection/cli/contribution.cjs.map +1 -1
  250. package/dist/inspection/facts.cjs +4 -4
  251. package/dist/inspection/facts.cjs.map +1 -1
  252. package/dist/inspection/index.cjs +1 -5
  253. package/dist/inspection/index.cjs.map +1 -1
  254. package/dist/inspection/index.d.cts +1 -2
  255. package/dist/inspection/index.d.mts +1 -2
  256. package/dist/inspection/index.d.ts +1 -2
  257. package/dist/inspection/index.js +20 -26
  258. package/dist/inspection/lifecycle.cjs +7 -0
  259. package/dist/inspection/lifecycle.cjs.map +1 -0
  260. package/dist/inspection/lifecycle.d.cts +4 -0
  261. package/dist/inspection/lifecycle.d.mts +4 -0
  262. package/dist/inspection/lifecycle.d.ts +4 -0
  263. package/dist/inspection/lifecycle.js +6 -0
  264. package/dist/inspection/lifecycle.js.map +1 -0
  265. package/dist/inspection/notes.cjs +40 -0
  266. package/dist/inspection/notes.cjs.map +1 -0
  267. package/dist/inspection/notes.d.cts +12 -0
  268. package/dist/inspection/notes.d.mts +12 -0
  269. package/dist/inspection/notes.d.ts +12 -0
  270. package/dist/inspection/notes.js +8 -0
  271. package/dist/inspection/notes.js.map +1 -0
  272. package/dist/inspection/overview.cjs +12 -15
  273. package/dist/inspection/overview.cjs.map +1 -1
  274. package/dist/inspection/overview.d.cts +8 -6
  275. package/dist/inspection/overview.d.mts +8 -6
  276. package/dist/inspection/overview.d.ts +8 -6
  277. package/dist/inspection/planned-attempt.cjs +45 -0
  278. package/dist/inspection/planned-attempt.cjs.map +1 -0
  279. package/dist/inspection/planned-attempt.d.cts +109 -0
  280. package/dist/inspection/planned-attempt.d.mts +109 -0
  281. package/dist/inspection/planned-attempt.d.ts +109 -0
  282. package/dist/inspection/planned-attempt.js +24 -0
  283. package/dist/inspection/planned-attempt.js.map +1 -0
  284. package/dist/inspection/project-result.cjs +5 -5
  285. package/dist/inspection/project-result.cjs.map +1 -1
  286. package/dist/inspection/project-result.d.cts +58 -57
  287. package/dist/inspection/project-result.d.mts +58 -57
  288. package/dist/inspection/project-result.d.ts +58 -57
  289. package/dist/inspection/project-result.js +4 -4
  290. package/dist/inspection/project.cjs +3 -3
  291. package/dist/inspection/project.cjs.map +1 -1
  292. package/dist/inspection/protocol-values.cjs +1 -1
  293. package/dist/inspection/protocol-values.cjs.map +1 -1
  294. package/dist/inspection/protocol-values.d.cts +1 -1
  295. package/dist/inspection/protocol-values.d.mts +1 -1
  296. package/dist/inspection/protocol-values.d.ts +1 -1
  297. package/dist/inspection/protocol.cjs +8 -8
  298. package/dist/inspection/protocol.cjs.map +1 -1
  299. package/dist/inspection/protocol.d.cts +237 -219
  300. package/dist/inspection/protocol.d.mts +237 -219
  301. package/dist/inspection/protocol.d.ts +237 -219
  302. package/dist/inspection/public.cjs +1 -5
  303. package/dist/inspection/public.cjs.map +1 -1
  304. package/dist/inspection/public.d.cts +1 -2
  305. package/dist/inspection/public.d.mts +1 -2
  306. package/dist/inspection/public.d.ts +1 -2
  307. package/dist/inspection/public.js +14 -20
  308. package/dist/inspection/public.mjs +166 -129
  309. package/dist/inspection/query.cjs +1 -1
  310. package/dist/inspection/query.cjs.map +1 -1
  311. package/dist/inspection/results.cjs +61 -52
  312. package/dist/inspection/results.cjs.map +1 -1
  313. package/dist/inspection/results.d.cts +157 -140
  314. package/dist/inspection/results.d.mts +157 -140
  315. package/dist/inspection/results.d.ts +157 -140
  316. package/dist/inspection/select.cjs +33 -28
  317. package/dist/inspection/select.cjs.map +1 -1
  318. package/dist/inspection/source.cjs +1 -1
  319. package/dist/inspection/source.cjs.map +1 -1
  320. package/dist/inspection/sources.cjs +2 -2
  321. package/dist/inspection/sources.cjs.map +1 -1
  322. package/dist/inspection/trace.cjs +9 -8
  323. package/dist/inspection/trace.cjs.map +1 -1
  324. package/dist/inspection/trace.d.cts +4 -4
  325. package/dist/inspection/trace.d.mts +4 -4
  326. package/dist/inspection/trace.d.ts +4 -4
  327. package/dist/loaders/index.cjs +7 -279
  328. package/dist/loaders/index.cjs.map +1 -1
  329. package/dist/loaders/index.d.cts +2 -95
  330. package/dist/loaders/index.d.mts +2 -95
  331. package/dist/loaders/index.d.ts +2 -95
  332. package/dist/loaders/index.js +10 -12
  333. package/dist/loaders/index.mjs +10 -12
  334. package/dist/loaders/runtime.cjs +283 -0
  335. package/dist/loaders/runtime.cjs.map +1 -0
  336. package/dist/loaders/runtime.d.cts +95 -0
  337. package/dist/loaders/runtime.d.mts +95 -0
  338. package/dist/loaders/runtime.d.ts +95 -0
  339. package/dist/loaders/runtime.js +16 -0
  340. package/dist/loaders/runtime.js.map +1 -0
  341. package/dist/migrations/judge-provider.md +6 -6
  342. package/dist/{model-slots.cjs → model-roles.cjs} +12 -12
  343. package/dist/{model-slots.cjs.map → model-roles.cjs.map} +1 -1
  344. package/dist/{model-slots.d.cts → model-roles.d.cts} +10 -10
  345. package/dist/{model-slots.d.mts → model-roles.d.mts} +10 -10
  346. package/dist/{model-slots.d.ts → model-roles.d.ts} +10 -10
  347. package/dist/model-roles.js +14 -0
  348. package/dist/model-roles.js.map +1 -0
  349. package/dist/o11y/adapter-usage-projection.cjs +9 -8
  350. package/dist/o11y/adapter-usage-projection.cjs.map +1 -1
  351. package/dist/o11y/adapter-usage-projection.d.cts +23 -15
  352. package/dist/o11y/adapter-usage-projection.d.mts +23 -15
  353. package/dist/o11y/adapter-usage-projection.d.ts +23 -15
  354. package/dist/o11y/cache-read.cjs +14 -14
  355. package/dist/o11y/cache-read.cjs.map +1 -1
  356. package/dist/o11y/cache-read.d.cts +5 -5
  357. package/dist/o11y/cache-read.d.mts +5 -5
  358. package/dist/o11y/cache-read.d.ts +5 -5
  359. package/dist/o11y/derive.cjs.map +1 -1
  360. package/dist/o11y/derive.d.cts +2 -2
  361. package/dist/o11y/derive.d.mts +2 -2
  362. package/dist/o11y/derive.d.ts +2 -2
  363. package/dist/o11y/eval-usage.cjs +9 -9
  364. package/dist/o11y/eval-usage.cjs.map +1 -1
  365. package/dist/o11y/eval-usage.d.cts +7 -7
  366. package/dist/o11y/eval-usage.d.mts +7 -7
  367. package/dist/o11y/eval-usage.d.ts +7 -7
  368. package/dist/o11y/parsers/bub.cjs +57 -81
  369. package/dist/o11y/parsers/bub.cjs.map +1 -1
  370. package/dist/o11y/parsers/index.cjs.map +1 -1
  371. package/dist/o11y/parsers/index.d.cts +2 -0
  372. package/dist/o11y/parsers/index.d.mts +2 -0
  373. package/dist/o11y/parsers/index.d.ts +2 -0
  374. package/dist/o11y/parsers/opencode.cjs +129 -217
  375. package/dist/o11y/parsers/opencode.cjs.map +1 -1
  376. package/dist/o11y/parsers/opencode.d.cts +2 -5
  377. package/dist/o11y/parsers/opencode.d.mts +2 -5
  378. package/dist/o11y/parsers/opencode.d.ts +2 -5
  379. package/dist/o11y/types.cjs.map +1 -1
  380. package/dist/o11y/types.d.cts +1 -1
  381. package/dist/o11y/types.d.mts +1 -1
  382. package/dist/o11y/types.d.ts +1 -1
  383. package/dist/plugin/contracts.cjs +170 -120
  384. package/dist/plugin/contracts.cjs.map +1 -1
  385. package/dist/plugin/contracts.d.cts +102 -90
  386. package/dist/plugin/contracts.d.mts +102 -90
  387. package/dist/plugin/contracts.d.ts +102 -90
  388. package/dist/plugin/contracts.js +16 -12
  389. package/dist/plugin/index.cjs.map +1 -1
  390. package/dist/plugin/index.d.cts +1 -1
  391. package/dist/plugin/index.d.mts +1 -1
  392. package/dist/plugin/index.d.ts +1 -1
  393. package/dist/plugin/link.cjs +69 -64
  394. package/dist/plugin/link.cjs.map +1 -1
  395. package/dist/plugin/link.d.cts +5 -3
  396. package/dist/plugin/link.d.mts +5 -3
  397. package/dist/plugin/link.d.ts +5 -3
  398. package/dist/plugin/link.js +12 -8
  399. package/dist/record/codec/seal-manifest.d.cts +3 -3
  400. package/dist/record/codec/seal-manifest.d.mts +3 -3
  401. package/dist/record/codec/seal-manifest.d.ts +3 -3
  402. package/dist/record/family/attempt-note/definition.cjs +12 -0
  403. package/dist/record/family/attempt-note/definition.cjs.map +1 -0
  404. package/dist/record/family/attempt-note/definition.d.cts +6 -0
  405. package/dist/record/family/attempt-note/definition.d.mts +6 -0
  406. package/dist/record/family/attempt-note/definition.d.ts +6 -0
  407. package/dist/record/family/attempt-note/definition.js +6 -0
  408. package/dist/record/family/attempt-note/definition.js.map +1 -0
  409. package/dist/record/family/attempt-note/persistence.cjs +10 -0
  410. package/dist/record/family/attempt-note/persistence.cjs.map +1 -0
  411. package/dist/record/family/attempt-note/persistence.d.cts +6 -0
  412. package/dist/record/family/attempt-note/persistence.d.mts +6 -0
  413. package/dist/record/family/attempt-note/persistence.d.ts +6 -0
  414. package/dist/record/family/attempt-note/persistence.js +6 -0
  415. package/dist/record/family/attempt-note/persistence.js.map +1 -0
  416. package/dist/record/family/attempt-note/schema.cjs +20 -0
  417. package/dist/record/family/attempt-note/schema.cjs.map +1 -0
  418. package/dist/record/family/attempt-note/schema.d.cts +21 -0
  419. package/dist/record/family/attempt-note/schema.d.mts +21 -0
  420. package/dist/record/family/attempt-note/schema.d.ts +21 -0
  421. package/dist/record/family/attempt-note/schema.js +10 -0
  422. package/dist/record/family/attempt-note/schema.js.map +1 -0
  423. package/dist/record/family/catalog.cjs +32 -29
  424. package/dist/record/family/catalog.cjs.map +1 -1
  425. package/dist/record/family/catalog.d.cts +7 -2
  426. package/dist/record/family/catalog.d.mts +7 -2
  427. package/dist/record/family/catalog.d.ts +7 -2
  428. package/dist/record/family/current.cjs +48 -45
  429. package/dist/record/family/current.cjs.map +1 -1
  430. package/dist/record/family/current.d.cts +15 -0
  431. package/dist/record/family/current.d.mts +15 -0
  432. package/dist/record/family/current.d.ts +15 -0
  433. package/dist/record/model/index.js +66 -64
  434. package/dist/record/model/run-context.cjs +9 -3
  435. package/dist/record/model/run-context.cjs.map +1 -1
  436. package/dist/record/model/run-context.d.cts +9 -2
  437. package/dist/record/model/run-context.d.mts +9 -2
  438. package/dist/record/model/run-context.d.ts +9 -2
  439. package/dist/record/model/run-context.js +8 -6
  440. package/dist/record/model/seal-manifest.d.cts +1 -1
  441. package/dist/record/model/seal-manifest.d.mts +1 -1
  442. package/dist/record/model/seal-manifest.d.ts +1 -1
  443. package/dist/run/cli/contribution.cjs +6 -32
  444. package/dist/run/cli/contribution.cjs.map +1 -1
  445. package/dist/run/host/runtime.cjs +1 -1
  446. package/dist/run/host/runtime.cjs.map +1 -1
  447. package/dist/run/storage/sqlite.cjs +7 -7
  448. package/dist/run/storage/sqlite.cjs.map +1 -1
  449. package/dist/runner/adapter-usage.cjs +5 -3
  450. package/dist/runner/adapter-usage.cjs.map +1 -1
  451. package/dist/runner/adapter-usage.d.cts +2 -2
  452. package/dist/runner/adapter-usage.d.mts +2 -2
  453. package/dist/runner/adapter-usage.d.ts +2 -2
  454. package/dist/runner/adoption.cjs +9 -12
  455. package/dist/runner/adoption.cjs.map +1 -1
  456. package/dist/runner/attempt-notes.cjs +8 -0
  457. package/dist/runner/attempt-notes.cjs.map +1 -0
  458. package/dist/runner/attempt-notes.d.cts +4 -0
  459. package/dist/runner/attempt-notes.d.mts +4 -0
  460. package/dist/runner/attempt-notes.d.ts +4 -0
  461. package/dist/runner/attempt-notes.js +8 -0
  462. package/dist/runner/attempt-notes.js.map +1 -0
  463. package/dist/runner/attempt.cjs +61 -73
  464. package/dist/runner/attempt.cjs.map +1 -1
  465. package/dist/runner/attempt.d.cts +3 -3
  466. package/dist/runner/attempt.d.mts +3 -3
  467. package/dist/runner/attempt.d.ts +3 -3
  468. package/dist/runner/command-plan.cjs +21 -26
  469. package/dist/runner/command-plan.cjs.map +1 -1
  470. package/dist/runner/command-plan.d.cts +4 -4
  471. package/dist/runner/command-plan.d.mts +4 -4
  472. package/dist/runner/command-plan.d.ts +4 -4
  473. package/dist/runner/command-plan.js +4 -4
  474. package/dist/runner/config-identity.cjs.map +1 -1
  475. package/dist/runner/config-identity.d.cts +2 -2
  476. package/dist/runner/config-identity.d.mts +2 -2
  477. package/dist/runner/config-identity.d.ts +2 -2
  478. package/dist/runner/discover.cjs +6 -6
  479. package/dist/runner/discover.cjs.map +1 -1
  480. package/dist/runner/eval-selection.cjs +2 -2
  481. package/dist/runner/eval-selection.cjs.map +1 -1
  482. package/dist/runner/eval-selection.d.cts +2 -2
  483. package/dist/runner/eval-selection.d.mts +2 -2
  484. package/dist/runner/eval-selection.d.ts +2 -2
  485. package/dist/runner/feedback/human.cjs +1 -1
  486. package/dist/runner/feedback/human.cjs.map +1 -1
  487. package/dist/runner/feedback/json.cjs +4 -2
  488. package/dist/runner/feedback/json.cjs.map +1 -1
  489. package/dist/runner/feedback/json.d.cts +1 -1
  490. package/dist/runner/feedback/json.d.mts +1 -1
  491. package/dist/runner/feedback/json.d.ts +1 -1
  492. package/dist/runner/feedback/sink.cjs +1 -1
  493. package/dist/runner/feedback/sink.cjs.map +1 -1
  494. package/dist/runner/feedback/sink.d.cts +1 -1
  495. package/dist/runner/feedback/sink.d.mts +1 -1
  496. package/dist/runner/feedback/sink.d.ts +1 -1
  497. package/dist/runner/fingerprint.cjs +1 -1
  498. package/dist/runner/fingerprint.cjs.map +1 -1
  499. package/dist/runner/project-target.cjs.map +1 -1
  500. package/dist/runner/project-target.d.cts +2 -2
  501. package/dist/runner/project-target.d.mts +2 -2
  502. package/dist/runner/project-target.d.ts +2 -2
  503. package/dist/runner/record/attachments.cjs +2 -2
  504. package/dist/runner/record/attachments.cjs.map +1 -1
  505. package/dist/runner/record/planning.cjs +8 -2
  506. package/dist/runner/record/planning.cjs.map +1 -1
  507. package/dist/runner/record.cjs +2 -0
  508. package/dist/runner/record.cjs.map +1 -1
  509. package/dist/runner/report.cjs +3 -3
  510. package/dist/runner/report.cjs.map +1 -1
  511. package/dist/runner/report.d.cts +1 -1
  512. package/dist/runner/report.d.mts +1 -1
  513. package/dist/runner/report.d.ts +1 -1
  514. package/dist/runner/reuse-plan.cjs +2 -2
  515. package/dist/runner/reuse-plan.cjs.map +1 -1
  516. package/dist/runner/run.cjs +10 -45
  517. package/dist/runner/run.cjs.map +1 -1
  518. package/dist/runner/sandbox-pool.cjs +1 -2
  519. package/dist/runner/sandbox-pool.cjs.map +1 -1
  520. package/dist/runner/setup-prefix-preparation.cjs +1 -1
  521. package/dist/runner/setup-prefix-preparation.cjs.map +1 -1
  522. package/dist/runner/teardown-registry.cjs +2 -2
  523. package/dist/runner/teardown-registry.cjs.map +1 -1
  524. package/dist/runner/teardown-registry.d.cts +1 -1
  525. package/dist/runner/teardown-registry.d.mts +1 -1
  526. package/dist/runner/teardown-registry.d.ts +1 -1
  527. package/dist/runner/types.cjs +4 -4
  528. package/dist/runner/types.cjs.map +1 -1
  529. package/dist/runner/types.d.cts +64 -93
  530. package/dist/runner/types.d.mts +64 -93
  531. package/dist/runner/types.d.ts +64 -93
  532. package/dist/runner/types.js +2 -2
  533. package/dist/sandbox/action.cjs +1 -1
  534. package/dist/sandbox/action.cjs.map +1 -1
  535. package/dist/sandbox/cli/contribution.cjs +17 -14
  536. package/dist/sandbox/cli/contribution.cjs.map +1 -1
  537. package/dist/sandbox/cli/contribution.d.cts +1 -1
  538. package/dist/sandbox/cli/contribution.d.mts +1 -1
  539. package/dist/sandbox/cli/contribution.d.ts +1 -1
  540. package/dist/sandbox/commands.cjs +1 -1
  541. package/dist/sandbox/commands.cjs.map +1 -1
  542. package/dist/sandbox/commands.d.cts +1 -1
  543. package/dist/sandbox/commands.d.mts +1 -1
  544. package/dist/sandbox/commands.d.ts +1 -1
  545. package/dist/sandbox/compose.cjs +2 -2
  546. package/dist/sandbox/compose.cjs.map +1 -1
  547. package/dist/sandbox/docker-profile/registry.cjs +5 -9
  548. package/dist/sandbox/docker-profile/registry.cjs.map +1 -1
  549. package/dist/sandbox/docker-profile/registry.d.cts +0 -3
  550. package/dist/sandbox/docker-profile/registry.d.mts +0 -3
  551. package/dist/sandbox/docker-profile/registry.d.ts +0 -3
  552. package/dist/sandbox/docker-profile/registry.js +6 -12
  553. package/dist/sandbox/docker-profile/runtime.cjs +1 -1
  554. package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
  555. package/dist/sandbox/docker-profile/schema.cjs +12 -16
  556. package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
  557. package/dist/sandbox/docker-profile/schema.d.cts +2 -6
  558. package/dist/sandbox/docker-profile/schema.d.mts +2 -6
  559. package/dist/sandbox/docker-profile/schema.d.ts +2 -6
  560. package/dist/sandbox/docker-profile/schema.js +24 -32
  561. package/dist/sandbox/incus.cjs +2 -2
  562. package/dist/sandbox/incus.cjs.map +1 -1
  563. package/dist/sandbox/index.cjs +4 -35
  564. package/dist/sandbox/index.cjs.map +1 -1
  565. package/dist/sandbox/index.d.cts +4 -8
  566. package/dist/sandbox/index.d.mts +4 -8
  567. package/dist/sandbox/index.d.ts +4 -8
  568. package/dist/sandbox/index.js +116 -172
  569. package/dist/sandbox/index.mjs +116 -172
  570. package/dist/sandbox/layer.cjs +3 -3
  571. package/dist/sandbox/layer.cjs.map +1 -1
  572. package/dist/sandbox/link.cjs +5 -0
  573. package/dist/sandbox/link.cjs.map +1 -1
  574. package/dist/sandbox/link.d.cts +3 -0
  575. package/dist/sandbox/link.d.mts +3 -0
  576. package/dist/sandbox/link.d.ts +3 -0
  577. package/dist/sandbox/runtime.cjs +9 -4
  578. package/dist/sandbox/runtime.cjs.map +1 -1
  579. package/dist/shared/failure-class.cjs +5 -5
  580. package/dist/shared/failure-class.cjs.map +1 -1
  581. package/dist/shared/failure-class.d.cts +4 -10
  582. package/dist/shared/failure-class.d.mts +4 -10
  583. package/dist/shared/failure-class.d.ts +4 -10
  584. package/dist/shared/types.cjs.map +1 -1
  585. package/dist/shared/types.d.cts +1 -1
  586. package/dist/shared/types.d.mts +1 -1
  587. package/dist/shared/types.d.ts +1 -1
  588. package/dist/show/contribution.cjs +17 -2
  589. package/dist/show/contribution.cjs.map +1 -1
  590. package/dist/show/contribution.d.cts +14 -0
  591. package/dist/show/contribution.d.mts +14 -0
  592. package/dist/show/contribution.d.ts +14 -0
  593. package/dist/show/model.cjs +8 -5
  594. package/dist/show/model.cjs.map +1 -1
  595. package/dist/show/model.d.cts +11 -8
  596. package/dist/show/model.d.mts +11 -8
  597. package/dist/show/model.d.ts +11 -8
  598. package/dist/show/render.cjs +34 -22
  599. package/dist/show/render.cjs.map +1 -1
  600. package/dist/sources/projector.cjs +1 -1
  601. package/dist/sources/projector.cjs.map +1 -1
  602. package/dist/types.cjs +1 -1
  603. package/dist/types.cjs.map +1 -1
  604. package/dist/types.d.cts +1 -1
  605. package/dist/types.d.mts +1 -1
  606. package/dist/types.d.ts +1 -1
  607. package/dist/types.js +2 -2
  608. package/dist/view/app-dist/.vite/manifest.json +2 -2
  609. package/dist/view/app-dist/assets/{index-B3ijZRph.js → index-CxrOUvHC.js} +17 -17
  610. package/dist/view/app-dist/assets/{quality-cost-scatter-B--DfJ9s.js → quality-cost-scatter-B6Aiss7x.js} +1 -1
  611. package/dist/view/app-dist/index.html +1 -1
  612. package/dist/view/cli/contribution.cjs +1 -1
  613. package/dist/view/cli/contribution.cjs.map +1 -1
  614. package/dist/view/function-runtime.mjs +318 -121
  615. package/dist/view/http-protocol.d.cts +1 -1
  616. package/dist/view/http-protocol.d.mts +1 -1
  617. package/dist/view/http-protocol.d.ts +1 -1
  618. package/dist/view/inspection-host.cjs +2 -2
  619. package/dist/view/inspection-host.cjs.map +1 -1
  620. package/dist/view/inspection-host.d.cts +349 -331
  621. package/dist/view/inspection-host.d.mts +349 -331
  622. package/dist/view/inspection-host.d.ts +349 -331
  623. package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +6 -6
  624. package/docs-site/zh/examples/integrations/claude-sdk.mdx +5 -5
  625. package/docs-site/zh/examples/integrations/codex-sdk.mdx +4 -4
  626. package/docs-site/zh/examples/integrations/langgraph.mdx +4 -4
  627. package/docs-site/zh/examples/integrations/pi-sdk.mdx +5 -5
  628. package/docs-site/zh/explanation/adapter.mdx +6 -6
  629. package/docs-site/zh/explanation/assert.mdx +7 -7
  630. package/docs-site/zh/explanation/drive.mdx +4 -4
  631. package/docs-site/zh/explanation/hitl.mdx +2 -2
  632. package/docs-site/zh/explanation/judge.mdx +2 -2
  633. package/docs-site/zh/introduction.mdx +2 -2
  634. package/docs-site/zh/reference/builtin-agents.mdx +46 -49
  635. package/docs-site/zh/reference/cli.mdx +16 -14
  636. package/docs-site/zh/reference/define-agent.mdx +19 -19
  637. package/docs-site/zh/reference/define-config.mdx +7 -15
  638. package/docs-site/zh/reference/define-eval.mdx +20 -14
  639. package/docs-site/zh/reference/define-experiment.mdx +18 -39
  640. package/docs-site/zh/reference/events.mdx +1 -1
  641. package/docs-site/zh/reference/expect.mdx +21 -0
  642. package/docs-site/zh/reference/official-adapters.mdx +12 -5
  643. package/docs-site/zh/troubleshooting/debugging.mdx +2 -2
  644. package/docs-site/zh/troubleshooting/recover-after-kill.mdx +1 -1
  645. package/docs-site/zh/tutorials/agent-onboarding.mdx +2 -2
  646. package/docs-site/zh/tutorials/authoring.mdx +2 -2
  647. package/docs-site/zh/tutorials/compare-runs.mdx +1 -1
  648. package/docs-site/zh/tutorials/concurrency.mdx +8 -8
  649. package/docs-site/zh/tutorials/configuration.mdx +5 -5
  650. package/docs-site/zh/tutorials/control-run-cost.mdx +19 -19
  651. package/docs-site/zh/tutorials/eval-groups.mdx +1 -1
  652. package/docs-site/zh/tutorials/evaluation-kinds.mdx +5 -5
  653. package/docs-site/zh/tutorials/experiment-services.mdx +32 -32
  654. package/docs-site/zh/tutorials/handle-execution-failures.mdx +2 -28
  655. package/docs-site/zh/tutorials/plugins.mdx +49 -143
  656. package/docs-site/zh/tutorials/sandbox-agent.mdx +1 -1
  657. package/docs-site/zh/tutorials/sandbox-reuse.mdx +7 -7
  658. package/docs-site/zh/tutorials/upgrade-0-18.mdx +1 -1
  659. package/docs-site/zh/tutorials/upgrade-0-19.mdx +121 -0
  660. package/docs-site/zh/tutorials/upgrade-0-20.mdx +12 -0
  661. package/docs-site/zh/tutorials/verify-judge.mdx +2 -2
  662. package/docs-site/zh/tutorials/viewing-results.mdx +2 -2
  663. package/docs-site/zh/tutorials/write-experiment.mdx +1 -1
  664. package/docs-site/zh/tutorials/write-send.mdx +13 -13
  665. package/package.json +1 -1
  666. package/dist/agents/effect-runtime.cjs.map +0 -1
  667. package/dist/agents/effect-runtime.d.cts +0 -29
  668. package/dist/agents/effect-runtime.d.mts +0 -29
  669. package/dist/agents/effect-runtime.d.ts +0 -29
  670. package/dist/agents/effect-runtime.js +0 -16
  671. package/dist/agents/effect-runtime.js.map +0 -1
  672. package/dist/agents/session-slot.cjs.map +0 -1
  673. package/dist/agents/session-slot.d.cts +0 -12
  674. package/dist/agents/session-slot.d.mts +0 -12
  675. package/dist/agents/session-slot.d.ts +0 -12
  676. package/dist/agents/session-slot.js +0 -6
  677. package/dist/agents/session-slot.js.map +0 -1
  678. package/dist/model-slots.js +0 -14
  679. package/dist/model-slots.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"codec.js","sourceRoot":"","sources":["codec.ts"],"names":[],"mappings":";;;AA8LA,kDAKC;AAED,4DAsDC;AAslBD,sEAiIC;AAOD,sEAOC;AACD,4DAOC;AAqBD,0EAyBC;AA0ED,8DAIC;AApmCD,mCAAwC;AACxC,mEAA2E;AAC3E,4CAAsD;AACtD,0CAAkD;AAClD,yCAAorB;AACprB,2FAA2F;AAC9E,QAAA,4BAA4B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/C,QAAA,gCAAgC,GAAG,EAAE,GAA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IACD,OAAO,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;AACrD,CAAC;AACD;;;GAGG;AACH,SAAgB,yBAAyB,CAAU,QAA0C,EAAE,QAAqC;IAChI,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;KAClG,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { Result, Schema } from \"effect\";\nimport { isRecordContentHandle } from \"../../record/attachment/content.ts\";\nimport { assertionRuntimeLimits } from \"../limits.ts\";\nimport { NUMERIC_COMPARATORS } from \"../match.ts\";\nimport { ASSERTION_ENTRY_ID_BRAND, type AssertionCoverage, type AssertionDisplay, type AssertionFactValue, type AssertionEntryId, type AssertionEntryOuter, type AssertionEntryRead, type AssertionEntry, type AssertionLimitation, type AssertionsDocumentOuter, type AssertionsDocument, type AssertionsProjection, type BoundedJsonObject, type BoundedJsonValue, type BuiltInCriterionEnvelope, type BuiltInCriterion, type CriterionOuterEnvelope, type EarnedScoreContribution, type NoScoreContribution, type MatcherQueryArtifact, type MatcherSourceSnapshot, type SealedAssertionResult, type ThirdPartyCriterion, type UnavailableScoreContribution, type WritableCriterionEnvelope, } from \"./model.ts\";\n/** Durable document-size limit; unlike runtime capture limits it belongs to this codec. */\nexport const MAX_ASSERTION_DOCUMENT_BYTES = 4 * 1024 * 1024;\nexport const MAX_MATCHER_QUERY_ARTIFACT_BYTES = 64 * 1024;\n/** All contract-owned objects use aggregate failures and exact object fields. */\nexport const AssertionsExactParseOptions = Object.freeze({\n errors: \"all\" as const,\n onExcessProperty: \"error\" as const,\n});\nconst UTF8 = new TextEncoder();\nconst CONTROL_CHARACTER = /[\\p{Cc}]/u;\nconst ASSERTION_ENTRY_ID = /^ae_[a-z0-9]{20}$/;\nconst ASCII_IDENTIFIER = /^[\\x21-\\x7e]+$/;\nfunction utf8ByteLength(value: string): number {\n return UTF8.encode(value).byteLength;\n}\nfunction codePointLength(value: string): number {\n return Array.from(value).length;\n}\nfunction isBoundedString(value: string): boolean {\n return utf8ByteLength(value) <= assertionRuntimeLimits.stringBytes;\n}\nfunction isDisplayText(value: string): boolean {\n return (!CONTROL_CHARACTER.test(value) &&\n codePointLength(value) <= assertionRuntimeLimits.displayCodePoints);\n}\nfunction isAsciiIdentifier(value: string): boolean {\n return utf8ByteLength(value) <= 128 && ASCII_IDENTIFIER.test(value);\n}\nfunction isNonNegativeInteger(value: number): boolean {\n return Number.isFinite(value) && Number.isInteger(value) && value >= 0;\n}\nfunction isNonNegativeNumber(value: number): boolean {\n return Number.isFinite(value) && value >= 0;\n}\nfunction isPlainJsonObject(value: object): boolean {\n // Fixed Record value canonicalization deliberately creates null-prototype\n // durable objects. They are equivalent JSON records here and must round-trip\n // through the Assertions property schema after a Reader hydration.\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\nfunction hasAtMostObjectKeys(value: object): boolean {\n return Object.keys(value).length <= assertionRuntimeLimits.jsonObjectKeys;\n}\nfunction hasAtMostArrayItems<Value>(value: readonly Value[]): boolean {\n return value.length <= assertionRuntimeLimits.jsonArrayItems;\n}\nfunction isAssertionEntryId(value: string): boolean {\n return ASSERTION_ENTRY_ID.test(value);\n}\nfunction isDocumentWithinSizeLimit(value: unknown): boolean {\n try {\n const serialized = JSON.stringify(value);\n return (typeof serialized === \"string\" &&\n utf8ByteLength(serialized) <= MAX_ASSERTION_DOCUMENT_BYTES);\n }\n catch {\n return false;\n }\n}\nfunction hasUniqueEntryIds(document: {\n readonly entries: readonly {\n readonly entryId: AssertionEntryId;\n }[];\n}): boolean {\n const entryIds = new Set<string>();\n for (const entry of document.entries) {\n if (entryIds.has(entry.entryId))\n return false;\n entryIds.add(entry.entryId);\n }\n return true;\n}\nfunction hasCoverageConsistentLimitations(entry: {\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n}): boolean {\n const coverage = entry.coverage;\n if (coverage.state === \"complete\") {\n return entry.limitations.length === 0;\n }\n if (coverage.state !== \"partial\")\n return true;\n return entry.limitations.some((limitation) => limitation.kind === coverage.reason);\n}\nconst BoundedJsonStringSchema = Schema.String.check(Schema.makeFilter(isBoundedString, {\n identifier: \"AssertionsBoundedJsonString\",\n description: \"a UTF-8 string no longer than 8 KiB\",\n}));\nconst AssertionDisplayTextSchema = Schema.String.check(Schema.makeFilter(isDisplayText, {\n identifier: \"AssertionDisplayText\",\n description: \"text without control characters and at most 256 code points\",\n}));\nconst MatcherIdentitySchema = BoundedJsonStringSchema.check(Schema.makeFilter((value) => value.length > 0 && !CONTROL_CHARACTER.test(value), {\n identifier: \"MatcherSourceIdentity\",\n description: \"a non-empty bounded source identity without control characters\",\n}));\nconst CriterionIdentifierSchema = Schema.String.check(Schema.makeFilter(isAsciiIdentifier, {\n identifier: \"AssertionCriterionIdentifier\",\n description: \"a non-empty printable ASCII identifier no longer than 128 bytes\",\n}));\nconst NonNegativeIntegerSchema = Schema.Finite.check(Schema.makeFilter(isNonNegativeInteger, {\n identifier: \"AssertionNonNegativeInteger\",\n description: \"a finite non-negative integer\",\n}));\nconst PositiveIntegerSchema = Schema.Finite.check(Schema.makeFilter((value) => Number.isSafeInteger(value) && value > 0, {\n identifier: \"AssertionPositiveInteger\",\n description: \"a positive safe integer\",\n}));\nconst NonNegativeSafeIntegerSchema = Schema.Finite.check(Schema.makeFilter((value) => Number.isSafeInteger(value) && value >= 0, {\n identifier: \"AssertionNonNegativeSafeInteger\",\n description: \"a non-negative safe integer\",\n}));\nconst NonNegativeNumberSchema = Schema.Finite.check(Schema.makeFilter(isNonNegativeNumber, {\n identifier: \"AssertionNonNegativeNumber\",\n description: \"a finite non-negative number\",\n}));\nfunction isJsonArrayIndex(key: string): boolean {\n if (key === \"0\")\n return true;\n if (!/^[1-9][0-9]*$/.test(key))\n return false;\n const index = Number(key);\n return Number.isSafeInteger(index) && index >= 0 && index < 4294967295;\n}\nfunction isBoundedJsonValueAt(value: unknown, depth: number, active: WeakSet<object>): value is BoundedJsonValue {\n if (value === null || typeof value === \"boolean\")\n return true;\n if (typeof value === \"number\")\n return Number.isFinite(value);\n if (typeof value === \"string\")\n return isBoundedString(value);\n if (typeof value !== \"object\" || depth >= assertionRuntimeLimits.jsonDepth)\n return false;\n try {\n if (active.has(value))\n return false;\n active.add(value);\n if (Array.isArray(value)) {\n if (Object.getPrototypeOf(value) !== Array.prototype || !hasAtMostArrayItems(value)) {\n return false;\n }\n for (const key of Reflect.ownKeys(value)) {\n if (key === \"length\")\n continue;\n if (typeof key !== \"string\" || !isJsonArrayIndex(key))\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !descriptor.enumerable || !(\"value\" in descriptor)) {\n return false;\n }\n }\n for (let index = 0; index < value.length; index += 1) {\n if (!Object.prototype.hasOwnProperty.call(value, index))\n return false;\n if (!isBoundedJsonValueAt(value[index], depth + 1, active))\n return false;\n }\n return true;\n }\n const object = value;\n if (!isPlainJsonObject(object) || !hasAtMostObjectKeys(object))\n return false;\n for (const key of Reflect.ownKeys(object)) {\n if (typeof key !== \"string\" || !isBoundedString(key))\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(object, key);\n if (descriptor === undefined || !descriptor.enumerable || !(\"value\" in descriptor)) {\n return false;\n }\n if (!isBoundedJsonValueAt(descriptor.value, depth + 1, active))\n return false;\n }\n return true;\n }\n catch {\n return false;\n }\n finally {\n active.delete(value);\n }\n}\nfunction isBoundedJsonValue(value: unknown): value is BoundedJsonValue {\n return isBoundedJsonValueAt(value, 0, new WeakSet());\n}\nexport function isBoundedJsonObject(value: unknown): value is BoundedJsonObject {\n return (typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value) &&\n isBoundedJsonValueAt(value, 0, new WeakSet()));\n}\n/** @internal Raw descriptor preflight for direct Assertions Schema boundaries. */\nexport function isAssertionsRawDataGraph(value: unknown, active = new WeakSet<object>()): boolean {\n if (value === null ||\n typeof value === \"boolean\" ||\n typeof value === \"string\" ||\n (typeof value === \"number\" && Number.isFinite(value))) {\n return true;\n }\n if (typeof value !== \"object\" || active.has(value))\n return false;\n if (isRecordContentHandle(value))\n return true;\n active.add(value);\n try {\n if (Array.isArray(value)) {\n const expected = new Set<string>([\"length\"]);\n for (let index = 0; index < value.length; index += 1)\n expected.add(String(index));\n const keys = Reflect.ownKeys(value);\n if (keys.length !== expected.size || keys.some((key) => typeof key !== \"string\" || !expected.has(key))) {\n return false;\n }\n for (let index = 0; index < value.length; index += 1) {\n const descriptor = Object.getOwnPropertyDescriptor(value, String(index));\n if (descriptor === undefined ||\n descriptor.enumerable !== true ||\n !(\"value\" in descriptor) ||\n !isAssertionsRawDataGraph(descriptor.value, active)) {\n return false;\n }\n }\n return true;\n }\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null)\n return false;\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key !== \"string\")\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined ||\n descriptor.enumerable !== true ||\n !(\"value\" in descriptor) ||\n !isAssertionsRawDataGraph(descriptor.value, active)) {\n return false;\n }\n }\n return true;\n }\n catch {\n return false;\n }\n finally {\n active.delete(value);\n }\n}\nconst BoundedJsonValueNodeSchema: Schema.Schema<BoundedJsonValue> = Schema.suspend((): Schema.Schema<BoundedJsonValue> => Schema.Union([\n Schema.Null,\n Schema.Boolean,\n Schema.Finite,\n BoundedJsonStringSchema,\n Schema.Array(BoundedJsonValueNodeSchema),\n Schema.Record(BoundedJsonStringSchema, BoundedJsonValueNodeSchema),\n]).check(Schema.makeFilter(isBoundedJsonValue, {\n identifier: \"AssertionsBoundedJsonValue\",\n description: \"a recursive JSON value within the Assertions limits\",\n})));\n/** Recursive JSON shape plus the Assertions-specific depth and collection budgets. */\nexport const BoundedJsonValueSchema: Schema.Schema<BoundedJsonValue> = BoundedJsonValueNodeSchema;\nexport const BoundedJsonObjectSchema: Schema.Schema<BoundedJsonObject> = Schema.Record(BoundedJsonStringSchema, BoundedJsonValueNodeSchema).check(Schema.makeFilter(isBoundedJsonObject, {\n identifier: \"AssertionsBoundedJsonObject\",\n description: \"a recursive JSON object within the Assertions limits\",\n}));\nexport const AssertionEntryIdSchema: Schema.Codec<AssertionEntryId, string> = Schema.String.check(Schema.makeFilter(isAssertionEntryId, {\n identifier: \"AssertionEntryId\",\n description: \"an attachment-local ae_ identifier with 20 lowercase base-36 characters\",\n})).pipe(Schema.brand(ASSERTION_ENTRY_ID_BRAND));\nexport const AssertionDisplaySchema: Schema.Schema<AssertionDisplay> = Schema.Struct({\n key: Schema.optional(AssertionDisplayTextSchema),\n label: Schema.optional(AssertionDisplayTextSchema),\n groupPath: Schema.Array(AssertionDisplayTextSchema).check(Schema.makeFilter((groupPath) => groupPath.length <= assertionRuntimeLimits.groupDepth, {\n identifier: \"AssertionDisplayGroupPath\",\n description: \"a group path no deeper than 16 segments\",\n })),\n});\nexport const BuiltInCriterionEnvelopeSchema: Schema.Schema<BuiltInCriterionEnvelope> = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: CriterionIdentifierSchema,\n data: BoundedJsonValueSchema,\n});\nexport const ThirdPartyCriterionSchema: Schema.Schema<ThirdPartyCriterion> = Schema.Struct({\n name: CriterionIdentifierSchema,\n schemaId: CriterionIdentifierSchema,\n data: BoundedJsonValueSchema,\n});\nexport const CriterionOuterEnvelopeSchema: Schema.Schema<CriterionOuterEnvelope> = Schema.Union([BuiltInCriterionEnvelopeSchema, ThirdPartyCriterionSchema]);\nconst ValueMatchCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"value-match/v1\"),\n data: Schema.Struct({\n subject: Schema.Literal(\"explicit-value\"),\n matcher: Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"declared\"), name: BoundedJsonStringSchema }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\") }),\n ]),\n }),\n});\nconst NumericComparisonCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"numeric-comparison/v1\"),\n data: Schema.Struct({\n comparator: Schema.Literals(NUMERIC_COMPARATORS),\n threshold: Schema.Finite,\n subject: Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"explicit-value\") }),\n Schema.Struct({\n kind: Schema.Literal(\"scope-metric\"),\n metric: Schema.Literal(\"tokens\"),\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n unit: Schema.Literal(\"tokens\"),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"scope-metric\"),\n metric: Schema.Literal(\"cost\"),\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n unit: Schema.Literal(\"usd\"),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"collection-cardinality\"),\n collection: Schema.Literal(\"tool-calls\"),\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n }),\n ]),\n }),\n});\nconst ScopeStatusCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"scope-status/v1\"),\n data: Schema.Struct({\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n assertion: Schema.Literals([\"succeeded\", \"no-failed-actions\"]),\n }),\n});\nconst OccurrenceCriterionV1Schema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"occurrence/v1\"),\n data: Schema.Struct({\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n occurrence: Schema.Literals([\"tool\", \"skill\", \"event\"]),\n assertion: Schema.Literals([\"present\", \"absent\", \"count\", \"order\"]),\n matcher: Schema.optional(BoundedJsonStringSchema),\n quantifier: Schema.optional(Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"absent\") }),\n Schema.Struct({\n kind: Schema.Literals([\"at-least\", \"exact\"]),\n count: PositiveIntegerSchema,\n }),\n ])),\n }),\n});\nconst OccurrenceCriterionV2Schema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"occurrence/v2\"),\n data: Schema.Struct({\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n occurrence: Schema.Literals([\"tool\", \"skill\", \"event\"]),\n assertion: Schema.Literals([\"present\", \"absent\", \"count\", \"order\"]),\n matcher: Schema.optional(BoundedJsonStringSchema),\n quantifier: Schema.optional(Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"absent\") }),\n Schema.Struct({\n kind: Schema.Literal(\"exact\"),\n count: PositiveIntegerSchema,\n }),\n Schema.Struct({\n kind: Schema.Literals([\"at-least\", \"less-than\", \"at-most\", \"greater-than\"]),\n count: NonNegativeSafeIntegerSchema,\n }),\n ])),\n }),\n});\nconst JudgeMeasurementCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"judge-measurement/v1\"),\n data: Schema.Struct({\n recipe: Schema.String,\n scale: Schema.Literal(\"unit-interval\"),\n }),\n});\nconst JudgeMeasurementCriterionV2Schema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"judge-measurement/v2\"),\n data: Schema.Struct({\n name: Schema.String,\n scale: Schema.Literal(\"unit-interval\"),\n }),\n});\nconst LlmMeasurementCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"llm-measurement/v1\"),\n data: Schema.Struct({\n name: Schema.String,\n scale: Schema.Literal(\"unit-interval\"),\n }),\n});\nconst SandboxResultCriterionSchema = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({\n operation: Schema.Literal(\"changed-paths\"),\n paths: Schema.Array(BoundedJsonStringSchema),\n }),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({ operation: Schema.Literal(\"no-changes\") }),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({\n operation: Schema.Literal(\"file-changed\"),\n path: BoundedJsonStringSchema,\n status: Schema.optional(Schema.Literals([\"added\", \"modified\", \"deleted\"])),\n before: Schema.optional(BoundedJsonStringSchema),\n after: Schema.optional(BoundedJsonStringSchema),\n }),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({\n operation: Schema.Literal(\"file-deleted\"),\n path: BoundedJsonStringSchema,\n }),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({\n operation: Schema.Literal(\"not-in-diff\"),\n pattern: BoundedJsonStringSchema,\n flags: BoundedJsonStringSchema,\n content: Schema.Literals([\"added\", \"removed\", \"both\"]),\n }),\n }),\n]);\nconst DirectScoreCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"direct-score/v1\"),\n data: Schema.Struct({ source: Schema.Literal(\"author\") }),\n});\nexport const BuiltInCriterionSchema: Schema.Schema<BuiltInCriterion> = Schema.Union([\n ValueMatchCriterionSchema,\n NumericComparisonCriterionSchema,\n ScopeStatusCriterionSchema,\n OccurrenceCriterionV1Schema,\n OccurrenceCriterionV2Schema,\n JudgeMeasurementCriterionSchema,\n JudgeMeasurementCriterionV2Schema,\n LlmMeasurementCriterionSchema,\n SandboxResultCriterionSchema,\n DirectScoreCriterionSchema,\n]);\nexport const CriterionEnvelopeSchema: Schema.Schema<WritableCriterionEnvelope> = Schema.Union([BuiltInCriterionSchema, ThirdPartyCriterionSchema]);\nexport const AssertionCoverageSchema: Schema.Schema<AssertionCoverage> = Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"complete\") }),\n Schema.Struct({\n state: Schema.Literal(\"partial\"),\n reason: Schema.Literals([\"sampled\", \"truncated\", \"redacted\", \"provider-limited\", \"capacity-limited\"]),\n }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reason: Schema.Literals([\"not-collected\", \"source-unavailable\", \"producer-failed\"]),\n }),\n Schema.Struct({\n state: Schema.Literal(\"not-applicable\"),\n reason: Schema.Literals([\"optional-material\", \"unsupported-subject\"]),\n }),\n]);\nexport const AssertionLimitationSchema: Schema.Schema<AssertionLimitation> = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"redacted\"),\n fieldCount: NonNegativeIntegerSchema,\n }),\n Schema.Struct({\n kind: Schema.Literal(\"sampled\"),\n captured: NonNegativeIntegerSchema,\n knownTotal: Schema.optional(NonNegativeIntegerSchema),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"truncated\"),\n omittedBytes: NonNegativeIntegerSchema,\n }),\n Schema.Struct({ kind: Schema.Literal(\"provider-limited\") }),\n Schema.Struct({ kind: Schema.Literal(\"capacity-limited\"), capturedItems: NonNegativeIntegerSchema, knownTotalItems: NonNegativeIntegerSchema, omittedBytes: Schema.NullOr(NonNegativeIntegerSchema) }),\n]);\nconst NoScoreContributionSchema: Schema.Schema<NoScoreContribution> = Schema.Struct({ state: Schema.Literal(\"not-scored\") });\nconst EarnedScoreContributionSchema: Schema.Schema<EarnedScoreContribution> = Schema.Struct({\n state: Schema.Literal(\"earned\"),\n points: NonNegativeNumberSchema,\n earned: NonNegativeNumberSchema,\n}).check(Schema.makeFilter((score) => score.earned <= score.points, {\n identifier: \"AssertionEarnedScore\",\n description: \"an earned score no greater than its points\",\n}));\nconst UnavailableScoreContributionSchema: Schema.Schema<UnavailableScoreContribution> = Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n points: NonNegativeNumberSchema,\n reason: Schema.Literals([\"source-unavailable\", \"evaluation-errored\", \"not-applicable\"]),\n});\nfunction hasValidCollectionReceipt(receipt: {\n readonly examined: number;\n readonly matched: number;\n readonly mismatched: number;\n readonly unavailable: number;\n readonly knownTotal: number | null;\n readonly complete: boolean;\n readonly exhaustive: boolean;\n}): boolean {\n if (receipt.matched + receipt.mismatched + receipt.unavailable !== receipt.examined) {\n return false;\n }\n if (receipt.knownTotal !== null && receipt.examined > receipt.knownTotal)\n return false;\n if (receipt.complete && receipt.knownTotal === null)\n return false;\n return !receipt.exhaustive || (receipt.knownTotal !== null && receipt.examined === receipt.knownTotal);\n}\nexport const AssertionCollectionReceiptSchema = Schema.Struct({\n examined: NonNegativeIntegerSchema,\n matched: NonNegativeIntegerSchema,\n mismatched: NonNegativeIntegerSchema,\n unavailable: NonNegativeIntegerSchema,\n knownTotal: Schema.NullOr(NonNegativeIntegerSchema),\n complete: Schema.Boolean,\n exhaustive: Schema.Boolean,\n decisive: Schema.Boolean,\n}).check(Schema.makeFilter(hasValidCollectionReceipt, {\n identifier: \"AssertionCollectionReceipt\",\n description: \"a collection receipt whose counts and completion boundary agree\",\n}));\nexport const AssertionFactValueSchema: Schema.Schema<AssertionFactValue> = Schema.suspend((): Schema.Schema<AssertionFactValue> => Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"unavailable\"),\n reason: Schema.Literals([\"not-recorded\", \"not-declared\", \"source-unavailable\"]),\n }),\n Schema.Struct({ kind: Schema.Literal(\"value\"), value: Schema.Union([Schema.Null, Schema.Boolean, Schema.Finite, BoundedJsonStringSchema]) }),\n Schema.Struct({ kind: Schema.Literal(\"text\"), text: BoundedJsonStringSchema }),\n Schema.Struct({ kind: Schema.Literal(\"list\"), items: Schema.Array(AssertionFactValueSchema) }),\n Schema.Struct({\n kind: Schema.Literal(\"fields\"),\n fields: Schema.Array(Schema.Struct({ label: BoundedJsonStringSchema, value: AssertionFactValueSchema })),\n }),\n]));\nexport const MatcherRelationStatusSchema = Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"exact\") }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reason: Schema.Literals([\n \"historical-not-recorded\",\n \"source-unavailable\",\n \"ambiguous\",\n ]),\n }),\n]);\nexport const MatcherSourceLocatorSchema = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"tool-occurrence\"),\n toolOccurrenceId: MatcherIdentitySchema,\n relation: MatcherRelationStatusSchema,\n }),\n Schema.Struct({\n kind: Schema.Literal(\"event\"),\n eventId: MatcherIdentitySchema,\n toolOccurrenceId: Schema.optional(MatcherIdentitySchema),\n relation: MatcherRelationStatusSchema,\n }),\n]);\nexport const MatcherRetainedRowSchema = Schema.Struct({\n locator: MatcherSourceLocatorSchema,\n result: Schema.Literals([\"matched\", \"mismatched\", \"unavailable\", \"not-evaluated\"]),\n difference: Schema.optional(AssertionFactValueSchema),\n});\nconst MatcherRetainedRowsSchema = Schema.Array(MatcherRetainedRowSchema).check(Schema.makeFilter((rows) => rows.length <= 8, {\n identifier: \"MatcherRetainedRows\",\n description: \"at most eight representative matcher rows\",\n}));\nexport const MatcherQueryStepSchema = Schema.Struct({\n step: PositiveIntegerSchema,\n summary: AssertionFactValueSchema,\n});\nexport const MatcherSourceReferenceSchema = Schema.Struct({\n family: Schema.Literal(\"niceeval.agent-turns\"),\n schemaVersion: PositiveIntegerSchema,\n});\nexport const MatcherSourceCollectionStateSchema = Schema.Literals([\n \"complete\",\n \"partial\",\n \"unavailable\",\n]);\nexport const MatcherTurnSourceSnapshotSchema = Schema.Struct({\n scope: Schema.Literal(\"turn\"),\n sessionId: MatcherIdentitySchema,\n turnId: MatcherIdentitySchema,\n scopeId: MatcherIdentitySchema,\n throughSessionSequence: NonNegativeIntegerSchema,\n source: MatcherSourceReferenceSchema,\n collectionAtCut: MatcherSourceCollectionStateSchema,\n});\nexport const MatcherSessionSourceSnapshotSchema = Schema.Struct({\n scope: Schema.Literal(\"session\"),\n sessionId: MatcherIdentitySchema,\n scopeId: MatcherIdentitySchema,\n throughSessionSequence: NonNegativeIntegerSchema,\n source: MatcherSourceReferenceSchema,\n collectionAtCut: MatcherSourceCollectionStateSchema,\n});\nexport const MatcherAttemptSourceSnapshotSchema = Schema.Struct({\n scope: Schema.Literal(\"attempt\"),\n scopeId: MatcherIdentitySchema,\n sessions: Schema.Array(Schema.Struct({\n sessionId: MatcherIdentitySchema,\n throughSessionSequence: NonNegativeIntegerSchema,\n })).check(Schema.makeFilter((sessions) => sessions.every((session, index) => index === 0 || sessions[index - 1]!.sessionId < session.sessionId), {\n identifier: \"MatcherAttemptVectorCut\",\n description: \"a unique vector cut in canonical session identity order\",\n })),\n source: MatcherSourceReferenceSchema,\n collectionAtCut: MatcherSourceCollectionStateSchema,\n});\nexport const MatcherSourceSnapshotSchema: Schema.Schema<MatcherSourceSnapshot> = Schema.Union([\n MatcherTurnSourceSnapshotSchema,\n MatcherSessionSourceSnapshotSchema,\n MatcherAttemptSourceSnapshotSchema,\n]);\nexport const OrderStepReceiptSchema = Schema.Struct({\n step: PositiveIntegerSchema,\n comparisons: NonNegativeIntegerSchema,\n matched: NonNegativeIntegerSchema,\n mismatched: NonNegativeIntegerSchema,\n unavailable: NonNegativeIntegerSchema,\n}).check(Schema.makeFilter((receipt) => receipt.matched + receipt.mismatched + receipt.unavailable === receipt.comparisons, {\n identifier: \"MatcherOrderStepReceipt\",\n description: \"an order step receipt whose result counts equal its comparisons\",\n}));\nexport const OrderEvaluationReceiptSchema = Schema.Struct({\n sourceRows: NonNegativeIntegerSchema,\n comparisons: NonNegativeIntegerSchema,\n unavailableComparisons: NonNegativeIntegerSchema,\n definitePrefixLength: NonNegativeIntegerSchema,\n possiblePrefixLength: NonNegativeIntegerSchema,\n stepReceipts: Schema.Array(OrderStepReceiptSchema),\n complete: Schema.Boolean,\n exhaustive: Schema.Boolean,\n decisive: Schema.Boolean,\n});\nexport const MatcherOrderPathNodeSchema = Schema.Struct({\n step: PositiveIntegerSchema,\n locator: MatcherSourceLocatorSchema,\n sessionId: MatcherIdentitySchema,\n sessionSequence: PositiveIntegerSchema,\n result: Schema.Literals([\"matched\", \"unavailable\"]),\n});\nexport const MatcherFailureFrontierSchema = Schema.Struct({\n longestDefinitePrefix: Schema.Array(MatcherOrderPathNodeSchema),\n longestPossiblePrefix: Schema.Array(MatcherOrderPathNodeSchema),\n firstBlockingStep: PositiveIntegerSchema,\n suffixChecked: AssertionCollectionReceiptSchema,\n representatives: MatcherRetainedRowsSchema,\n});\nfunction isPathWithinSourceCut(path: readonly Schema.Schema.Type<typeof MatcherOrderPathNodeSchema>[], snapshot: Schema.Schema.Type<typeof MatcherTurnSourceSnapshotSchema> | Schema.Schema.Type<typeof MatcherSessionSourceSnapshotSchema>, expectedLength: number, allowed: \"matched\" | \"possible\"): boolean {\n if (path.length !== expectedLength)\n return false;\n let previousSequence = 0;\n for (const [index, node] of path.entries()) {\n if (node.step !== index + 1 ||\n node.sessionId !== snapshot.sessionId ||\n node.sessionSequence <= previousSequence ||\n node.sessionSequence > snapshot.throughSessionSequence ||\n (allowed === \"matched\" && node.result !== \"matched\") ||\n (node.result === \"matched\" && node.locator.relation.state !== \"exact\")) {\n return false;\n }\n previousSequence = node.sessionSequence;\n }\n return true;\n}\nfunction hasValidOrderedArtifact(artifact: Schema.Schema.Type<typeof MatcherOrderedSequenceShapeSchema>): boolean {\n const stepCount = artifact.querySteps.length;\n const receipt = artifact.receipt;\n if (artifact.querySteps.some((step, index) => step.step !== index + 1) ||\n receipt.stepReceipts.length !== stepCount ||\n receipt.stepReceipts.some((step, index) => step.step !== index + 1) ||\n receipt.definitePrefixLength > receipt.possiblePrefixLength ||\n receipt.possiblePrefixLength > stepCount ||\n receipt.comparisons !== receipt.stepReceipts.reduce((sum, step) => sum + step.comparisons, 0) ||\n receipt.unavailableComparisons !== receipt.stepReceipts.reduce((sum, step) => sum + step.unavailable, 0) ||\n receipt.complete !== (artifact.sourceSnapshot.collectionAtCut === \"complete\") ||\n receipt.stepReceipts.some((step) => step.comparisons > receipt.sourceRows) ||\n receipt.stepReceipts.some((step, index) => index > 0 && step.comparisons !== receipt.stepReceipts[0]!.comparisons) ||\n (receipt.exhaustive && receipt.stepReceipts.some((step) => step.comparisons !== receipt.sourceRows))) {\n return false;\n }\n switch (artifact.result.state) {\n case \"matched\":\n return receipt.definitePrefixLength === stepCount &&\n receipt.possiblePrefixLength === stepCount &&\n receipt.decisive &&\n isPathWithinSourceCut(artifact.result.witnessPath, artifact.sourceSnapshot, stepCount, \"matched\");\n case \"mismatched\": {\n const frontier = artifact.result.failureFrontier;\n return receipt.complete && receipt.exhaustive && receipt.decisive &&\n receipt.possiblePrefixLength < stepCount &&\n frontier.firstBlockingStep === receipt.possiblePrefixLength + 1 &&\n frontier.suffixChecked.complete &&\n frontier.suffixChecked.exhaustive &&\n frontier.suffixChecked.decisive &&\n frontier.suffixChecked.knownTotal === frontier.suffixChecked.examined &&\n frontier.suffixChecked.matched === 0 &&\n frontier.suffixChecked.unavailable === 0 &&\n isPathWithinSourceCut(frontier.longestDefinitePrefix, artifact.sourceSnapshot, receipt.definitePrefixLength, \"matched\") &&\n isPathWithinSourceCut(frontier.longestPossiblePrefix, artifact.sourceSnapshot, receipt.possiblePrefixLength, \"possible\");\n }\n case \"unavailable\":\n return artifact.result.reason.length > 0 && !receipt.decisive;\n }\n}\nexport const MatcherCollectionFilterSchema = Schema.Struct({\n kind: Schema.Literal(\"collection-filter\"),\n sourceSnapshot: MatcherSourceSnapshotSchema,\n query: MatcherQueryStepSchema,\n receipt: AssertionCollectionReceiptSchema,\n retainedRows: MatcherRetainedRowsSchema,\n}).check(Schema.makeFilter((artifact) => artifact.query.step === 1 &&\n artifact.receipt.knownTotal !== null &&\n artifact.receipt.complete === (artifact.sourceSnapshot.collectionAtCut === \"complete\"), {\n identifier: \"MatcherCollectionFilterArtifact\",\n description: \"a collection matcher artifact with one query and a matching source cut\",\n}));\nexport const MatcherOrderedSequenceResultSchema = Schema.Union([\n Schema.Struct({\n state: Schema.Literal(\"matched\"),\n witnessPath: Schema.Array(MatcherOrderPathNodeSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"mismatched\"),\n failureFrontier: MatcherFailureFrontierSchema,\n }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reason: MatcherIdentitySchema,\n }),\n]);\nexport const MatcherOrderedSequenceShapeSchema = Schema.Struct({\n kind: Schema.Literal(\"ordered-sequence\"),\n sourceSnapshot: Schema.Union([\n MatcherTurnSourceSnapshotSchema,\n MatcherSessionSourceSnapshotSchema,\n ]),\n querySteps: Schema.Array(MatcherQueryStepSchema).check(Schema.makeFilter((steps) => steps.length >= 2 && steps.length <= 64, {\n identifier: \"MatcherOrderQuerySteps\",\n description: \"between two and 64 ordered matcher query steps\",\n })),\n receipt: OrderEvaluationReceiptSchema,\n result: MatcherOrderedSequenceResultSchema,\n retainedRows: MatcherRetainedRowsSchema,\n});\nconst MatcherOrderedSequenceSchema = MatcherOrderedSequenceShapeSchema.check(Schema.makeFilter(hasValidOrderedArtifact, {\n identifier: \"MatcherOrderedSequenceArtifact\",\n description: \"an ordered matcher artifact with consistent receipts, paths, and cut\",\n}));\nfunction isMatcherArtifactWithinSizeLimit(value: unknown): boolean {\n try {\n return utf8ByteLength(JSON.stringify(value)) <= MAX_MATCHER_QUERY_ARTIFACT_BYTES;\n }\n catch {\n return false;\n }\n}\nexport const MatcherQueryArtifactSchema: Schema.Schema<MatcherQueryArtifact> = Schema.Union([MatcherCollectionFilterSchema, MatcherOrderedSequenceSchema]).check(Schema.makeFilter(isMatcherArtifactWithinSizeLimit, {\n identifier: \"MatcherQueryArtifactSize\",\n description: \"a matcher query artifact no larger than 64 KiB\",\n}));\nexport const AssertionConditionValueSchema = Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"boolean\"), expected: Schema.Literal(true) }),\n Schema.Struct({ kind: Schema.Literal(\"at-least\"), threshold: NonNegativeNumberSchema }),\n Schema.Struct({ kind: Schema.Literal(\"record-only\") }),\n]);\nexport const AssertionDecisionPolicySchema = Schema.Struct({\n requirement: Schema.Union([\n Schema.Struct({\n state: Schema.Literal(\"available\"),\n value: Schema.Literals([\"required\", \"optional\"]),\n }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n condition: Schema.Union([\n Schema.Struct({\n state: Schema.Literal(\"available\"),\n value: AssertionConditionValueSchema,\n }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n});\nexport const SealedAssertionResultSchema: Schema.Schema<SealedAssertionResult> = Schema.Union([\n Schema.Struct({\n state: Schema.Literal(\"matched\"),\n gate: Schema.Literals([\"not-gate\", \"satisfied\"]),\n score: Schema.Union([NoScoreContributionSchema, EarnedScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"mismatched\"),\n reason: Schema.Literal(\"condition-not-met\"),\n gate: Schema.Literals([\"not-gate\", \"failed\"]),\n score: Schema.Union([NoScoreContributionSchema, EarnedScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reason: Schema.Literals([\"evidence-unavailable\", \"source-unavailable\", \"redacted\"]),\n gate: Schema.Literals([\"not-gate\", \"unavailable\"]),\n score: Schema.Union([NoScoreContributionSchema, UnavailableScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"errored\"),\n reason: Schema.Literals([\"evaluator-failed\", \"producer-interrupted\", \"invalid-subject\"]),\n gate: Schema.Literals([\"not-gate\", \"unavailable\"]),\n score: Schema.Union([NoScoreContributionSchema, UnavailableScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"not-applicable\"),\n reason: Schema.Literal(\"coverage-not-applicable\"),\n gate: Schema.Literals([\"not-gate\", \"not-applicable\"]),\n score: Schema.Union([NoScoreContributionSchema, UnavailableScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n]);\n/**\n * Assertions owns the shared current entry framing. The caller supplies the\n * exact material declaration so current content and migration-private\n * historical material never share a physical union.\n */\nexport function createAssertionsRecordSchemas<Material, MaterialEncoded>(material: Schema.Codec<Material, MaterialEncoded>) {\n const evidence = Schema.Array(material);\n const limitations = Schema.Array(Schema.toType(AssertionLimitationSchema));\n const materials = Schema.Struct({\n source: material,\n evidence,\n coverage: Schema.toType(AssertionCoverageSchema),\n limitations,\n }).check(Schema.makeFilter((value) => hasCoverageConsistentLimitations(value), {\n identifier: \"AssertionCoverageLimitations\",\n description: \"coverage and limitations with a consistent sealed relationship\",\n }));\n const historicalV2Evaluation = Schema.Struct({\n observed: Schema.toType(AssertionFactValueSchema),\n receipt: Schema.optional(Schema.toType(AssertionCollectionReceiptSchema)),\n });\n const evaluation = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"ordinary\"),\n observed: Schema.toType(AssertionFactValueSchema),\n receipt: Schema.optional(Schema.toType(AssertionCollectionReceiptSchema)),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"matcher-current\"),\n observed: Schema.toType(AssertionFactValueSchema),\n artifact: Schema.toType(MatcherQueryArtifactSchema),\n receipt: Schema.optional(Schema.Never),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"matcher-legacy\"),\n observed: Schema.toType(AssertionFactValueSchema),\n reason: Schema.Literal(\"historical-not-recorded\"),\n legacyDiagnostic: Schema.optional(Schema.toType(AssertionFactValueSchema)),\n receipt: Schema.optional(Schema.Never),\n }),\n ]);\n const decision = Schema.Struct({\n result: Schema.Literals([\"matched\", \"mismatched\", \"unavailable\", \"errored\", \"not-applicable\"]),\n reason: Schema.NullOr(Schema.Literals([\n \"condition-not-met\", \"evidence-unavailable\", \"source-unavailable\", \"redacted\",\n \"evaluator-failed\", \"producer-interrupted\", \"invalid-subject\", \"coverage-not-applicable\",\n ])),\n gate: Schema.Literals([\"not-gate\", \"satisfied\", \"failed\", \"unavailable\", \"not-applicable\"]),\n });\n const explanationRetention = Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"retained\"), value: Schema.toType(AssertionFactValueSchema) }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]);\n const historicalV2OuterEntry = Schema.Struct({\n entryId: Schema.toType(AssertionEntryIdSchema),\n display: Schema.toType(AssertionDisplaySchema),\n criterion: Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"available\"), value: Schema.toType(BoundedJsonObjectSchema) }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n materials,\n evaluation: historicalV2Evaluation,\n decision,\n policy: Schema.toType(AssertionDecisionPolicySchema),\n contribution: Schema.Union([Schema.toType(NoScoreContributionSchema), Schema.toType(EarnedScoreContributionSchema), Schema.toType(UnavailableScoreContributionSchema)]),\n explanationRetention,\n });\n const outerEntry = Schema.Struct({\n entryId: Schema.toType(AssertionEntryIdSchema),\n display: Schema.toType(AssertionDisplaySchema),\n criterion: Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"available\"), value: Schema.toType(BoundedJsonObjectSchema) }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n materials,\n evaluation,\n decision,\n policy: Schema.toType(AssertionDecisionPolicySchema),\n contribution: Schema.Union([Schema.toType(NoScoreContributionSchema), Schema.toType(EarnedScoreContributionSchema), Schema.toType(UnavailableScoreContributionSchema)]),\n explanationRetention,\n }).check(Schema.makeFilter((entry) => entry.evaluation.kind === \"ordinary\" ||\n entry.explanationRetention.state === \"unavailable\", {\n identifier: \"MatcherExplanationOwnership\",\n description: \"matcher artifacts and legacy diagnostics are not duplicated in explanation retention\",\n }));\n const historicalV2Entries = Schema.Array(historicalV2OuterEntry).check(Schema.makeFilter((values) => values.length <= assertionRuntimeLimits.entries, {\n identifier: \"AssertionsEntryCount\",\n description: \"at most 4,096 assertion entries\",\n }));\n const entries = Schema.Array(outerEntry).check(Schema.makeFilter((values) => values.length <= assertionRuntimeLimits.entries, {\n identifier: \"AssertionsEntryCount\",\n description: \"at most 4,096 assertion entries\",\n }));\n const outerDocument = Schema.Struct({ entries }).check(Schema.makeFilter(hasUniqueEntryIds, {\n identifier: \"AssertionsUniqueEntryIds\",\n description: \"unique attachment-local assertion entry IDs\",\n }), Schema.makeFilter(isDocumentWithinSizeLimit, {\n identifier: \"AssertionsDocumentSize\",\n description: \"a JSON document no larger than 4 MiB\",\n }));\n const entry = Schema.Struct({\n entryId: Schema.toType(AssertionEntryIdSchema),\n display: Schema.toType(AssertionDisplaySchema),\n criterion: Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"available\"), value: Schema.toType(CriterionEnvelopeSchema) }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n materials,\n evaluation,\n decision,\n policy: Schema.toType(AssertionDecisionPolicySchema),\n contribution: Schema.Union([Schema.toType(NoScoreContributionSchema), Schema.toType(EarnedScoreContributionSchema), Schema.toType(UnavailableScoreContributionSchema)]),\n explanationRetention,\n });\n const document = Schema.Struct({\n entries: Schema.Array(entry).check(Schema.makeFilter((entries) => entries.length <= assertionRuntimeLimits.entries, {\n identifier: \"AssertionsEntryCount\",\n description: \"at most 4,096 assertion entries\",\n })),\n }).check(Schema.makeFilter(hasUniqueEntryIds, {\n identifier: \"AssertionsUniqueEntryIds\",\n description: \"unique attachment-local assertion entry IDs\",\n }), Schema.makeFilter(isDocumentWithinSizeLimit, {\n identifier: \"AssertionsDocumentSize\",\n description: \"a JSON document no larger than 4 MiB\",\n }));\n return Object.freeze({\n material,\n entry,\n entries,\n historicalV2Entries,\n outerDocument,\n document,\n });\n}\nexport interface AssertionsRecordCodecError {\n readonly code: \"assertions-document-invalid\";\n}\nconst assertionsDocumentInvalid: AssertionsRecordCodecError = Object.freeze({\n code: \"assertions-document-invalid\",\n});\nexport function decodeAssertionsDocumentOuter<Content, Encoded>(schema: Schema.Codec<AssertionsDocumentOuter<Content>, Encoded>, input: unknown): Result.Result<AssertionsDocumentOuter<Content>, AssertionsRecordCodecError> {\n if (!isAssertionsRawDataGraph(input))\n return Result.fail(assertionsDocumentInvalid);\n const decoded = Schema.decodeUnknownResult(schema, AssertionsExactParseOptions)(input);\n return Result.isFailure(decoded)\n ? Result.fail(assertionsDocumentInvalid)\n : Result.succeed(decoded.success);\n}\nexport function decodeAssertionsDocument<Content, Encoded>(schema: Schema.Codec<AssertionsDocument<Content>, Encoded>, input: unknown): Result.Result<AssertionsDocument<Content>, AssertionsRecordCodecError> {\n if (!isAssertionsRawDataGraph(input))\n return Result.fail(assertionsDocumentInvalid);\n const decoded = Schema.decodeUnknownResult(schema, AssertionsExactParseOptions)(input);\n return Result.isFailure(decoded)\n ? Result.fail(assertionsDocumentInvalid)\n : Result.succeed(decoded.success);\n}\nexport interface ThirdPartyCriterionDefinition {\n readonly name: string;\n readonly schemaId: string;\n readonly dataSchema: Schema.Codec<unknown, unknown>;\n}\nexport interface ThirdPartyCriterionRegistry {\n readonly lookup: (name: string, schemaId: string) => ThirdPartyCriterionDefinition | undefined;\n}\nexport type ThirdPartyCriterionRegistryError = {\n readonly code: \"third-party-criterion-identity-invalid\";\n readonly name: string;\n readonly schemaId: string;\n} | {\n readonly code: \"third-party-criterion-duplicate\";\n readonly name: string;\n readonly schemaId: string;\n};\nfunction thirdPartyCriterionKey(name: string, schemaId: string): string {\n return `${name}\\u0000${schemaId}`;\n}\nexport function makeThirdPartyCriterionRegistry(definitions: readonly ThirdPartyCriterionDefinition[]): Result.Result<ThirdPartyCriterionRegistry, ThirdPartyCriterionRegistryError> {\n const byIdentity = new Map<string, ThirdPartyCriterionDefinition>();\n for (const definition of definitions) {\n if (!isAsciiIdentifier(definition.name) || !isAsciiIdentifier(definition.schemaId)) {\n return Result.fail({\n code: \"third-party-criterion-identity-invalid\",\n name: definition.name,\n schemaId: definition.schemaId,\n });\n }\n const key = thirdPartyCriterionKey(definition.name, definition.schemaId);\n if (byIdentity.has(key)) {\n return Result.fail({\n code: \"third-party-criterion-duplicate\",\n name: definition.name,\n schemaId: definition.schemaId,\n });\n }\n byIdentity.set(key, Object.freeze({ ...definition }));\n }\n return Result.succeed(Object.freeze({\n lookup(name: string, schemaId: string) {\n return byIdentity.get(thirdPartyCriterionKey(name, schemaId));\n },\n }));\n}\nconst KNOWN_BUILTIN_CRITERION_IDS: ReadonlySet<string> = new Set([\n \"value-match/v1\",\n \"numeric-comparison/v1\",\n \"scope-status/v1\",\n \"occurrence/v1\",\n \"occurrence/v2\",\n \"judge-measurement/v1\",\n \"judge-measurement/v2\",\n \"llm-measurement/v1\",\n \"sandbox-result/v1\",\n \"direct-score/v1\",\n]);\nfunction availableEntry<Content>(entry: AssertionEntryOuter<Content>, criterion: WritableCriterionEnvelope): AssertionEntryRead<Content> {\n const available: AssertionEntry<Content> = {\n ...entry,\n criterion: Object.freeze({ state: \"available\" as const, value: criterion }),\n };\n return Object.freeze({ state: \"available\", entry: Object.freeze(available) });\n}\nfunction projectAssertionEntry<Content>(entry: AssertionEntryOuter<Content>, registry: ThirdPartyCriterionRegistry): AssertionEntryRead<Content> {\n if (entry.criterion.state === \"unavailable\") {\n return Object.freeze({ state: \"available\", entry: entry as AssertionEntry<Content> });\n }\n const criterionValue = entry.criterion.value;\n const builtinEnvelope = Schema.decodeUnknownResult(Schema.toType(BuiltInCriterionEnvelopeSchema), AssertionsExactParseOptions)(criterionValue);\n if (Result.isSuccess(builtinEnvelope)) {\n const builtin = Schema.decodeUnknownResult(Schema.toType(BuiltInCriterionSchema), AssertionsExactParseOptions)(criterionValue);\n if (Result.isSuccess(builtin)) {\n return availableEntry(entry, builtin.success);\n }\n if (KNOWN_BUILTIN_CRITERION_IDS.has(builtinEnvelope.success.id)) {\n return Object.freeze({\n state: \"invalid\",\n entry,\n reason: \"criterion-data-invalid\",\n });\n }\n return Object.freeze({\n state: \"unsupported\",\n entry,\n reason: \"builtin-unknown\",\n });\n }\n const thirdParty = Schema.decodeUnknownResult(Schema.toType(ThirdPartyCriterionSchema), AssertionsExactParseOptions)(criterionValue);\n if (Result.isFailure(thirdParty)) {\n return Object.freeze({\n state: \"invalid\",\n entry,\n reason: \"criterion-envelope-invalid\",\n });\n }\n const definition = registry.lookup(thirdParty.success.name, thirdParty.success.schemaId);\n if (definition === undefined) {\n return Object.freeze({\n state: \"unsupported\",\n entry,\n reason: \"third-party-schema-unavailable\",\n });\n }\n const data = Schema.decodeUnknownResult(Schema.toType(definition.dataSchema), AssertionsExactParseOptions)(thirdParty.success.data);\n if (Result.isFailure(data)) {\n return Object.freeze({\n state: \"invalid\",\n entry,\n reason: \"criterion-data-invalid\",\n });\n }\n return availableEntry(entry, thirdParty.success);\n}\n/**\n * Projection is synchronous and never re-evaluates an Assertion. Its only\n * dynamic work is criterion interpretation inside each already-valid entry.\n */\nexport function projectAssertionsDocument<Content>(document: AssertionsDocumentOuter<Content>, registry: ThirdPartyCriterionRegistry): AssertionsProjection<Content> {\n return Object.freeze({\n entries: Object.freeze(document.entries.map((entry) => projectAssertionEntry(entry, registry))),\n });\n}\n"]}
1
+ {"version":3,"file":"codec.js","sourceRoot":"","sources":["codec.ts"],"names":[],"mappings":";;;AA8LA,kDAKC;AAED,4DAsDC;AA0lBD,sEAiIC;AAOD,sEAOC;AACD,4DAOC;AAqBD,0EAyBC;AA0ED,8DAIC;AAxmCD,mCAAwC;AACxC,mEAA2E;AAC3E,4CAAsD;AACtD,0CAAkD;AAClD,yCAAorB;AACprB,2FAA2F;AAC9E,QAAA,4BAA4B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/C,QAAA,gCAAgC,GAAG,EAAE,GAAG,IAAI,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AC,CAAC;IACzF,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,MAAM,CAAC,MAAM,CAAC;YACjB,KAAK,EAAE,aAAa;YACpB,KAAK;YACL,MAAM,EAAE,gCAAgC;SAC3C,CAAC,CAAC;IACP,CAAC;IACD,MAAM,IAAI,GAAG,eAAM,CAAC,mBAAmB,CAAC,eAAM,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,mCAA2B,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpI,IAAI,eAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC,MAAM,CAAC;YACjB,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,MAAM,EAAE,wBAAwB;SACnC,CAAC,CAAC;IACP,CAAC;IACD,OAAO,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;AACrD,CAAC;AACD;;;GAGG;AACH,SAAgB,yBAAyB,CAAU,QAA0C,EAAE,QAAqC;IAChI,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;KAClG,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { Result, Schema } from \"effect\";\nimport { isRecordContentHandle } from \"../../record/attachment/content.ts\";\nimport { assertionRuntimeLimits } from \"../limits.ts\";\nimport { NUMERIC_COMPARATORS } from \"../match.ts\";\nimport { ASSERTION_ENTRY_ID_BRAND, type AssertionCoverage, type AssertionDisplay, type AssertionFactValue, type AssertionEntryId, type AssertionEntryOuter, type AssertionEntryRead, type AssertionEntry, type AssertionLimitation, type AssertionsDocumentOuter, type AssertionsDocument, type AssertionsProjection, type BoundedJsonObject, type BoundedJsonValue, type BuiltInCriterionEnvelope, type BuiltInCriterion, type CriterionOuterEnvelope, type EarnedScoreContribution, type NoScoreContribution, type MatcherQueryArtifact, type MatcherSourceSnapshot, type SealedAssertionResult, type ThirdPartyCriterion, type UnavailableScoreContribution, type WritableCriterionEnvelope, } from \"./model.ts\";\n/** Durable document-size limit; unlike runtime capture limits it belongs to this codec. */\nexport const MAX_ASSERTION_DOCUMENT_BYTES = 4 * 1024 * 1024;\nexport const MAX_MATCHER_QUERY_ARTIFACT_BYTES = 64 * 1024;\n/** All contract-owned objects use aggregate failures and exact object fields. */\nexport const AssertionsExactParseOptions = Object.freeze({\n errors: \"all\" as const,\n onExcessProperty: \"error\" as const,\n});\nconst UTF8 = new TextEncoder();\nconst CONTROL_CHARACTER = /[\\p{Cc}]/u;\nconst ASSERTION_ENTRY_ID = /^ae_[a-z0-9]{20}$/;\nconst ASCII_IDENTIFIER = /^[\\x21-\\x7e]+$/;\nfunction utf8ByteLength(value: string): number {\n return UTF8.encode(value).byteLength;\n}\nfunction codePointLength(value: string): number {\n return Array.from(value).length;\n}\nfunction isBoundedString(value: string): boolean {\n return utf8ByteLength(value) <= assertionRuntimeLimits.stringBytes;\n}\nfunction isDisplayText(value: string): boolean {\n return (!CONTROL_CHARACTER.test(value) &&\n codePointLength(value) <= assertionRuntimeLimits.displayCodePoints);\n}\nfunction isAsciiIdentifier(value: string): boolean {\n return utf8ByteLength(value) <= 128 && ASCII_IDENTIFIER.test(value);\n}\nfunction isNonNegativeInteger(value: number): boolean {\n return Number.isFinite(value) && Number.isInteger(value) && value >= 0;\n}\nfunction isNonNegativeNumber(value: number): boolean {\n return Number.isFinite(value) && value >= 0;\n}\nfunction isPlainJsonObject(value: object): boolean {\n // Fixed Record value canonicalization deliberately creates null-prototype\n // durable objects. They are equivalent JSON records here and must round-trip\n // through the Assertions property schema after a Reader hydration.\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\nfunction hasAtMostObjectKeys(value: object): boolean {\n return Object.keys(value).length <= assertionRuntimeLimits.jsonObjectKeys;\n}\nfunction hasAtMostArrayItems<Value>(value: readonly Value[]): boolean {\n return value.length <= assertionRuntimeLimits.jsonArrayItems;\n}\nfunction isAssertionEntryId(value: string): boolean {\n return ASSERTION_ENTRY_ID.test(value);\n}\nfunction isDocumentWithinSizeLimit(value: unknown): boolean {\n try {\n const serialized = JSON.stringify(value);\n return (typeof serialized === \"string\" &&\n utf8ByteLength(serialized) <= MAX_ASSERTION_DOCUMENT_BYTES);\n }\n catch {\n return false;\n }\n}\nfunction hasUniqueEntryIds(document: {\n readonly entries: readonly {\n readonly entryId: AssertionEntryId;\n }[];\n}): boolean {\n const entryIds = new Set<string>();\n for (const entry of document.entries) {\n if (entryIds.has(entry.entryId))\n return false;\n entryIds.add(entry.entryId);\n }\n return true;\n}\nfunction hasCoverageConsistentLimitations(entry: {\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n}): boolean {\n const coverage = entry.coverage;\n if (coverage.state === \"complete\") {\n return entry.limitations.length === 0;\n }\n if (coverage.state !== \"partial\")\n return true;\n return entry.limitations.some((limitation) => limitation.kind === coverage.reason);\n}\nconst BoundedJsonStringSchema = Schema.String.check(Schema.makeFilter(isBoundedString, {\n identifier: \"AssertionsBoundedJsonString\",\n description: \"a UTF-8 string no longer than 8 KiB\",\n}));\nconst AssertionDisplayTextSchema = Schema.String.check(Schema.makeFilter(isDisplayText, {\n identifier: \"AssertionDisplayText\",\n description: \"text without control characters and at most 256 code points\",\n}));\nconst MatcherIdentitySchema = BoundedJsonStringSchema.check(Schema.makeFilter((value) => value.length > 0 && !CONTROL_CHARACTER.test(value), {\n identifier: \"MatcherSourceIdentity\",\n description: \"a non-empty bounded source identity without control characters\",\n}));\nconst CriterionIdentifierSchema = Schema.String.check(Schema.makeFilter(isAsciiIdentifier, {\n identifier: \"AssertionCriterionIdentifier\",\n description: \"a non-empty printable ASCII identifier no longer than 128 bytes\",\n}));\nconst NonNegativeIntegerSchema = Schema.Finite.check(Schema.makeFilter(isNonNegativeInteger, {\n identifier: \"AssertionNonNegativeInteger\",\n description: \"a finite non-negative integer\",\n}));\nconst PositiveIntegerSchema = Schema.Finite.check(Schema.makeFilter((value) => Number.isSafeInteger(value) && value > 0, {\n identifier: \"AssertionPositiveInteger\",\n description: \"a positive safe integer\",\n}));\nconst NonNegativeSafeIntegerSchema = Schema.Finite.check(Schema.makeFilter((value) => Number.isSafeInteger(value) && value >= 0, {\n identifier: \"AssertionNonNegativeSafeInteger\",\n description: \"a non-negative safe integer\",\n}));\nconst NonNegativeNumberSchema = Schema.Finite.check(Schema.makeFilter(isNonNegativeNumber, {\n identifier: \"AssertionNonNegativeNumber\",\n description: \"a finite non-negative number\",\n}));\nfunction isJsonArrayIndex(key: string): boolean {\n if (key === \"0\")\n return true;\n if (!/^[1-9][0-9]*$/.test(key))\n return false;\n const index = Number(key);\n return Number.isSafeInteger(index) && index >= 0 && index < 4294967295;\n}\nfunction isBoundedJsonValueAt(value: unknown, depth: number, active: WeakSet<object>): value is BoundedJsonValue {\n if (value === null || typeof value === \"boolean\")\n return true;\n if (typeof value === \"number\")\n return Number.isFinite(value);\n if (typeof value === \"string\")\n return isBoundedString(value);\n if (typeof value !== \"object\" || depth >= assertionRuntimeLimits.jsonDepth)\n return false;\n try {\n if (active.has(value))\n return false;\n active.add(value);\n if (Array.isArray(value)) {\n if (Object.getPrototypeOf(value) !== Array.prototype || !hasAtMostArrayItems(value)) {\n return false;\n }\n for (const key of Reflect.ownKeys(value)) {\n if (key === \"length\")\n continue;\n if (typeof key !== \"string\" || !isJsonArrayIndex(key))\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !descriptor.enumerable || !(\"value\" in descriptor)) {\n return false;\n }\n }\n for (let index = 0; index < value.length; index += 1) {\n if (!Object.prototype.hasOwnProperty.call(value, index))\n return false;\n if (!isBoundedJsonValueAt(value[index], depth + 1, active))\n return false;\n }\n return true;\n }\n const object = value;\n if (!isPlainJsonObject(object) || !hasAtMostObjectKeys(object))\n return false;\n for (const key of Reflect.ownKeys(object)) {\n if (typeof key !== \"string\" || !isBoundedString(key))\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(object, key);\n if (descriptor === undefined || !descriptor.enumerable || !(\"value\" in descriptor)) {\n return false;\n }\n if (!isBoundedJsonValueAt(descriptor.value, depth + 1, active))\n return false;\n }\n return true;\n }\n catch {\n return false;\n }\n finally {\n active.delete(value);\n }\n}\nfunction isBoundedJsonValue(value: unknown): value is BoundedJsonValue {\n return isBoundedJsonValueAt(value, 0, new WeakSet());\n}\nexport function isBoundedJsonObject(value: unknown): value is BoundedJsonObject {\n return (typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value) &&\n isBoundedJsonValueAt(value, 0, new WeakSet()));\n}\n/** @internal Raw descriptor preflight for direct Assertions Schema boundaries. */\nexport function isAssertionsRawDataGraph(value: unknown, active = new WeakSet<object>()): boolean {\n if (value === null ||\n typeof value === \"boolean\" ||\n typeof value === \"string\" ||\n (typeof value === \"number\" && Number.isFinite(value))) {\n return true;\n }\n if (typeof value !== \"object\" || active.has(value))\n return false;\n if (isRecordContentHandle(value))\n return true;\n active.add(value);\n try {\n if (Array.isArray(value)) {\n const expected = new Set<string>([\"length\"]);\n for (let index = 0; index < value.length; index += 1)\n expected.add(String(index));\n const keys = Reflect.ownKeys(value);\n if (keys.length !== expected.size || keys.some((key) => typeof key !== \"string\" || !expected.has(key))) {\n return false;\n }\n for (let index = 0; index < value.length; index += 1) {\n const descriptor = Object.getOwnPropertyDescriptor(value, String(index));\n if (descriptor === undefined ||\n descriptor.enumerable !== true ||\n !(\"value\" in descriptor) ||\n !isAssertionsRawDataGraph(descriptor.value, active)) {\n return false;\n }\n }\n return true;\n }\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null)\n return false;\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key !== \"string\")\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined ||\n descriptor.enumerable !== true ||\n !(\"value\" in descriptor) ||\n !isAssertionsRawDataGraph(descriptor.value, active)) {\n return false;\n }\n }\n return true;\n }\n catch {\n return false;\n }\n finally {\n active.delete(value);\n }\n}\nconst BoundedJsonValueNodeSchema: Schema.Schema<BoundedJsonValue> = Schema.suspend((): Schema.Schema<BoundedJsonValue> => Schema.Union([\n Schema.Null,\n Schema.Boolean,\n Schema.Finite,\n BoundedJsonStringSchema,\n Schema.Array(BoundedJsonValueNodeSchema),\n Schema.Record(BoundedJsonStringSchema, BoundedJsonValueNodeSchema),\n]).check(Schema.makeFilter(isBoundedJsonValue, {\n identifier: \"AssertionsBoundedJsonValue\",\n description: \"a recursive JSON value within the Assertions limits\",\n})));\n/** Recursive JSON shape plus the Assertions-specific depth and collection budgets. */\nexport const BoundedJsonValueSchema: Schema.Schema<BoundedJsonValue> = BoundedJsonValueNodeSchema;\nexport const BoundedJsonObjectSchema: Schema.Schema<BoundedJsonObject> = Schema.Record(BoundedJsonStringSchema, BoundedJsonValueNodeSchema).check(Schema.makeFilter(isBoundedJsonObject, {\n identifier: \"AssertionsBoundedJsonObject\",\n description: \"a recursive JSON object within the Assertions limits\",\n}));\nexport const AssertionEntryIdSchema: Schema.Codec<AssertionEntryId, string> = Schema.String.check(Schema.makeFilter(isAssertionEntryId, {\n identifier: \"AssertionEntryId\",\n description: \"an attachment-local ae_ identifier with 20 lowercase base-36 characters\",\n})).pipe(Schema.brand(ASSERTION_ENTRY_ID_BRAND));\nexport const AssertionDisplaySchema: Schema.Schema<AssertionDisplay> = Schema.Struct({\n key: Schema.optional(AssertionDisplayTextSchema),\n label: Schema.optional(AssertionDisplayTextSchema),\n groupPath: Schema.Array(AssertionDisplayTextSchema).check(Schema.makeFilter((groupPath) => groupPath.length <= assertionRuntimeLimits.groupDepth, {\n identifier: \"AssertionDisplayGroupPath\",\n description: \"a group path no deeper than 16 segments\",\n })),\n});\nexport const BuiltInCriterionEnvelopeSchema: Schema.Schema<BuiltInCriterionEnvelope> = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: CriterionIdentifierSchema,\n data: BoundedJsonValueSchema,\n});\nexport const ThirdPartyCriterionSchema: Schema.Schema<ThirdPartyCriterion> = Schema.Struct({\n name: CriterionIdentifierSchema,\n schemaId: CriterionIdentifierSchema,\n data: BoundedJsonValueSchema,\n});\nexport const CriterionOuterEnvelopeSchema: Schema.Schema<CriterionOuterEnvelope> = Schema.Union([BuiltInCriterionEnvelopeSchema, ThirdPartyCriterionSchema]);\nconst ValueMatchCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"value-match/v1\"),\n data: Schema.Struct({\n subject: Schema.Literal(\"explicit-value\"),\n matcher: Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"declared\"), name: BoundedJsonStringSchema }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\") }),\n ]),\n }),\n});\nconst NumericComparisonCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"numeric-comparison/v1\"),\n data: Schema.Struct({\n comparator: Schema.Literals(NUMERIC_COMPARATORS),\n threshold: Schema.Finite,\n upperThreshold: Schema.optional(Schema.Finite),\n unit: Schema.optional(Schema.Literals([\"ms\", \"seconds\", \"tokens\", \"usd\", \"ratio\", \"count\", \"bytes\"])),\n subject: Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"explicit-value\") }),\n Schema.Struct({\n kind: Schema.Literal(\"scope-metric\"),\n metric: Schema.Literal(\"tokens\"),\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n unit: Schema.Literal(\"tokens\"),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"scope-metric\"),\n metric: Schema.Literal(\"cost\"),\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n unit: Schema.Literal(\"usd\"),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"collection-cardinality\"),\n collection: Schema.Literal(\"tool-calls\"),\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n }),\n ]),\n }).check(Schema.makeFilter((data) => data.comparator === \"between\"\n ? data.upperThreshold !== undefined && data.upperThreshold >= data.threshold\n : data.upperThreshold === undefined, { message: \"Only between comparisons have an ordered upper threshold.\" })),\n});\nconst ScopeStatusCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"scope-status/v1\"),\n data: Schema.Struct({\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n assertion: Schema.Literals([\"succeeded\", \"no-failed-actions\"]),\n }),\n});\nconst OccurrenceCriterionV1Schema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"occurrence/v1\"),\n data: Schema.Struct({\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n occurrence: Schema.Literals([\"tool\", \"skill\", \"event\"]),\n assertion: Schema.Literals([\"present\", \"absent\", \"count\", \"order\"]),\n matcher: Schema.optional(BoundedJsonStringSchema),\n quantifier: Schema.optional(Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"absent\") }),\n Schema.Struct({\n kind: Schema.Literals([\"at-least\", \"exact\"]),\n count: PositiveIntegerSchema,\n }),\n ])),\n }),\n});\nconst OccurrenceCriterionV2Schema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"occurrence/v2\"),\n data: Schema.Struct({\n scope: Schema.Literals([\"turn\", \"session\", \"attempt\"]),\n occurrence: Schema.Literals([\"tool\", \"skill\", \"event\"]),\n assertion: Schema.Literals([\"present\", \"absent\", \"count\", \"order\"]),\n matcher: Schema.optional(BoundedJsonStringSchema),\n quantifier: Schema.optional(Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"absent\") }),\n Schema.Struct({\n kind: Schema.Literal(\"exact\"),\n count: PositiveIntegerSchema,\n }),\n Schema.Struct({\n kind: Schema.Literals([\"at-least\", \"less-than\", \"at-most\", \"greater-than\"]),\n count: NonNegativeSafeIntegerSchema,\n }),\n ])),\n }),\n});\nconst JudgeMeasurementCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"judge-measurement/v1\"),\n data: Schema.Struct({\n recipe: Schema.String,\n scale: Schema.Literal(\"unit-interval\"),\n }),\n});\nconst JudgeMeasurementCriterionV2Schema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"judge-measurement/v2\"),\n data: Schema.Struct({\n name: Schema.String,\n scale: Schema.Literal(\"unit-interval\"),\n }),\n});\nconst LlmMeasurementCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"llm-measurement/v1\"),\n data: Schema.Struct({\n name: Schema.String,\n scale: Schema.Literal(\"unit-interval\"),\n }),\n});\nconst SandboxResultCriterionSchema = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({\n operation: Schema.Literal(\"changed-paths\"),\n paths: Schema.Array(BoundedJsonStringSchema),\n }),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({ operation: Schema.Literal(\"no-changes\") }),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({\n operation: Schema.Literal(\"file-changed\"),\n path: BoundedJsonStringSchema,\n status: Schema.optional(Schema.Literals([\"added\", \"modified\", \"deleted\"])),\n before: Schema.optional(BoundedJsonStringSchema),\n after: Schema.optional(BoundedJsonStringSchema),\n }),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({\n operation: Schema.Literal(\"file-deleted\"),\n path: BoundedJsonStringSchema,\n }),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"sandbox-result/v1\"),\n data: Schema.Struct({\n operation: Schema.Literal(\"not-in-diff\"),\n pattern: BoundedJsonStringSchema,\n flags: BoundedJsonStringSchema,\n content: Schema.Literals([\"added\", \"removed\", \"both\"]),\n }),\n }),\n]);\nconst DirectScoreCriterionSchema = Schema.Struct({\n kind: Schema.Literal(\"builtin\"),\n id: Schema.Literal(\"direct-score/v1\"),\n data: Schema.Struct({ source: Schema.Literal(\"author\") }),\n});\nexport const BuiltInCriterionSchema: Schema.Schema<BuiltInCriterion> = Schema.Union([\n ValueMatchCriterionSchema,\n NumericComparisonCriterionSchema,\n ScopeStatusCriterionSchema,\n OccurrenceCriterionV1Schema,\n OccurrenceCriterionV2Schema,\n JudgeMeasurementCriterionSchema,\n JudgeMeasurementCriterionV2Schema,\n LlmMeasurementCriterionSchema,\n SandboxResultCriterionSchema,\n DirectScoreCriterionSchema,\n]);\nexport const CriterionEnvelopeSchema: Schema.Schema<WritableCriterionEnvelope> = Schema.Union([BuiltInCriterionSchema, ThirdPartyCriterionSchema]);\nexport const AssertionCoverageSchema: Schema.Schema<AssertionCoverage> = Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"complete\") }),\n Schema.Struct({\n state: Schema.Literal(\"partial\"),\n reason: Schema.Literals([\"sampled\", \"truncated\", \"redacted\", \"provider-limited\", \"capacity-limited\"]),\n }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reason: Schema.Literals([\"not-collected\", \"source-unavailable\", \"producer-failed\"]),\n }),\n Schema.Struct({\n state: Schema.Literal(\"not-applicable\"),\n reason: Schema.Literals([\"optional-material\", \"unsupported-subject\"]),\n }),\n]);\nexport const AssertionLimitationSchema: Schema.Schema<AssertionLimitation> = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"redacted\"),\n fieldCount: NonNegativeIntegerSchema,\n }),\n Schema.Struct({\n kind: Schema.Literal(\"sampled\"),\n captured: NonNegativeIntegerSchema,\n knownTotal: Schema.optional(NonNegativeIntegerSchema),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"truncated\"),\n omittedBytes: NonNegativeIntegerSchema,\n }),\n Schema.Struct({ kind: Schema.Literal(\"provider-limited\") }),\n Schema.Struct({ kind: Schema.Literal(\"capacity-limited\"), capturedItems: NonNegativeIntegerSchema, knownTotalItems: NonNegativeIntegerSchema, omittedBytes: Schema.NullOr(NonNegativeIntegerSchema) }),\n]);\nconst NoScoreContributionSchema: Schema.Schema<NoScoreContribution> = Schema.Struct({ state: Schema.Literal(\"not-scored\") });\nconst EarnedScoreContributionSchema: Schema.Schema<EarnedScoreContribution> = Schema.Struct({\n state: Schema.Literal(\"earned\"),\n points: NonNegativeNumberSchema,\n earned: NonNegativeNumberSchema,\n}).check(Schema.makeFilter((score) => score.earned <= score.points, {\n identifier: \"AssertionEarnedScore\",\n description: \"an earned score no greater than its points\",\n}));\nconst UnavailableScoreContributionSchema: Schema.Schema<UnavailableScoreContribution> = Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n points: NonNegativeNumberSchema,\n reason: Schema.Literals([\"source-unavailable\", \"evaluation-errored\", \"not-applicable\"]),\n});\nfunction hasValidCollectionReceipt(receipt: {\n readonly examined: number;\n readonly matched: number;\n readonly mismatched: number;\n readonly unavailable: number;\n readonly knownTotal: number | null;\n readonly complete: boolean;\n readonly exhaustive: boolean;\n}): boolean {\n if (receipt.matched + receipt.mismatched + receipt.unavailable !== receipt.examined) {\n return false;\n }\n if (receipt.knownTotal !== null && receipt.examined > receipt.knownTotal)\n return false;\n if (receipt.complete && receipt.knownTotal === null)\n return false;\n return !receipt.exhaustive || (receipt.knownTotal !== null && receipt.examined === receipt.knownTotal);\n}\nexport const AssertionCollectionReceiptSchema = Schema.Struct({\n examined: NonNegativeIntegerSchema,\n matched: NonNegativeIntegerSchema,\n mismatched: NonNegativeIntegerSchema,\n unavailable: NonNegativeIntegerSchema,\n knownTotal: Schema.NullOr(NonNegativeIntegerSchema),\n complete: Schema.Boolean,\n exhaustive: Schema.Boolean,\n decisive: Schema.Boolean,\n}).check(Schema.makeFilter(hasValidCollectionReceipt, {\n identifier: \"AssertionCollectionReceipt\",\n description: \"a collection receipt whose counts and completion boundary agree\",\n}));\nexport const AssertionFactValueSchema: Schema.Schema<AssertionFactValue> = Schema.suspend((): Schema.Schema<AssertionFactValue> => Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"unavailable\"),\n reason: Schema.Literals([\"not-recorded\", \"not-declared\", \"source-unavailable\"]),\n }),\n Schema.Struct({ kind: Schema.Literal(\"value\"), value: Schema.Union([Schema.Null, Schema.Boolean, Schema.Finite, BoundedJsonStringSchema]) }),\n Schema.Struct({ kind: Schema.Literal(\"text\"), text: BoundedJsonStringSchema }),\n Schema.Struct({ kind: Schema.Literal(\"list\"), items: Schema.Array(AssertionFactValueSchema) }),\n Schema.Struct({\n kind: Schema.Literal(\"fields\"),\n fields: Schema.Array(Schema.Struct({ label: BoundedJsonStringSchema, value: AssertionFactValueSchema })),\n }),\n]));\nexport const MatcherRelationStatusSchema = Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"exact\") }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reason: Schema.Literals([\n \"historical-not-recorded\",\n \"source-unavailable\",\n \"ambiguous\",\n ]),\n }),\n]);\nexport const MatcherSourceLocatorSchema = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"tool-occurrence\"),\n toolOccurrenceId: MatcherIdentitySchema,\n relation: MatcherRelationStatusSchema,\n }),\n Schema.Struct({\n kind: Schema.Literal(\"event\"),\n eventId: MatcherIdentitySchema,\n toolOccurrenceId: Schema.optional(MatcherIdentitySchema),\n relation: MatcherRelationStatusSchema,\n }),\n]);\nexport const MatcherRetainedRowSchema = Schema.Struct({\n locator: MatcherSourceLocatorSchema,\n result: Schema.Literals([\"matched\", \"mismatched\", \"unavailable\", \"not-evaluated\"]),\n difference: Schema.optional(AssertionFactValueSchema),\n});\nconst MatcherRetainedRowsSchema = Schema.Array(MatcherRetainedRowSchema).check(Schema.makeFilter((rows) => rows.length <= 8, {\n identifier: \"MatcherRetainedRows\",\n description: \"at most eight representative matcher rows\",\n}));\nexport const MatcherQueryStepSchema = Schema.Struct({\n step: PositiveIntegerSchema,\n summary: AssertionFactValueSchema,\n});\nexport const MatcherSourceReferenceSchema = Schema.Struct({\n family: Schema.Literal(\"niceeval.agent-turns\"),\n schemaVersion: PositiveIntegerSchema,\n});\nexport const MatcherSourceCollectionStateSchema = Schema.Literals([\n \"complete\",\n \"partial\",\n \"unavailable\",\n]);\nexport const MatcherTurnSourceSnapshotSchema = Schema.Struct({\n scope: Schema.Literal(\"turn\"),\n sessionId: MatcherIdentitySchema,\n turnId: MatcherIdentitySchema,\n scopeId: MatcherIdentitySchema,\n throughSessionSequence: NonNegativeIntegerSchema,\n source: MatcherSourceReferenceSchema,\n collectionAtCut: MatcherSourceCollectionStateSchema,\n});\nexport const MatcherSessionSourceSnapshotSchema = Schema.Struct({\n scope: Schema.Literal(\"session\"),\n sessionId: MatcherIdentitySchema,\n scopeId: MatcherIdentitySchema,\n throughSessionSequence: NonNegativeIntegerSchema,\n source: MatcherSourceReferenceSchema,\n collectionAtCut: MatcherSourceCollectionStateSchema,\n});\nexport const MatcherAttemptSourceSnapshotSchema = Schema.Struct({\n scope: Schema.Literal(\"attempt\"),\n scopeId: MatcherIdentitySchema,\n sessions: Schema.Array(Schema.Struct({\n sessionId: MatcherIdentitySchema,\n throughSessionSequence: NonNegativeIntegerSchema,\n })).check(Schema.makeFilter((sessions) => sessions.every((session, index) => index === 0 || sessions[index - 1]!.sessionId < session.sessionId), {\n identifier: \"MatcherAttemptVectorCut\",\n description: \"a unique vector cut in canonical session identity order\",\n })),\n source: MatcherSourceReferenceSchema,\n collectionAtCut: MatcherSourceCollectionStateSchema,\n});\nexport const MatcherSourceSnapshotSchema: Schema.Schema<MatcherSourceSnapshot> = Schema.Union([\n MatcherTurnSourceSnapshotSchema,\n MatcherSessionSourceSnapshotSchema,\n MatcherAttemptSourceSnapshotSchema,\n]);\nexport const OrderStepReceiptSchema = Schema.Struct({\n step: PositiveIntegerSchema,\n comparisons: NonNegativeIntegerSchema,\n matched: NonNegativeIntegerSchema,\n mismatched: NonNegativeIntegerSchema,\n unavailable: NonNegativeIntegerSchema,\n}).check(Schema.makeFilter((receipt) => receipt.matched + receipt.mismatched + receipt.unavailable === receipt.comparisons, {\n identifier: \"MatcherOrderStepReceipt\",\n description: \"an order step receipt whose result counts equal its comparisons\",\n}));\nexport const OrderEvaluationReceiptSchema = Schema.Struct({\n sourceRows: NonNegativeIntegerSchema,\n comparisons: NonNegativeIntegerSchema,\n unavailableComparisons: NonNegativeIntegerSchema,\n definitePrefixLength: NonNegativeIntegerSchema,\n possiblePrefixLength: NonNegativeIntegerSchema,\n stepReceipts: Schema.Array(OrderStepReceiptSchema),\n complete: Schema.Boolean,\n exhaustive: Schema.Boolean,\n decisive: Schema.Boolean,\n});\nexport const MatcherOrderPathNodeSchema = Schema.Struct({\n step: PositiveIntegerSchema,\n locator: MatcherSourceLocatorSchema,\n sessionId: MatcherIdentitySchema,\n sessionSequence: PositiveIntegerSchema,\n result: Schema.Literals([\"matched\", \"unavailable\"]),\n});\nexport const MatcherFailureFrontierSchema = Schema.Struct({\n longestDefinitePrefix: Schema.Array(MatcherOrderPathNodeSchema),\n longestPossiblePrefix: Schema.Array(MatcherOrderPathNodeSchema),\n firstBlockingStep: PositiveIntegerSchema,\n suffixChecked: AssertionCollectionReceiptSchema,\n representatives: MatcherRetainedRowsSchema,\n});\nfunction isPathWithinSourceCut(path: readonly Schema.Schema.Type<typeof MatcherOrderPathNodeSchema>[], snapshot: Schema.Schema.Type<typeof MatcherTurnSourceSnapshotSchema> | Schema.Schema.Type<typeof MatcherSessionSourceSnapshotSchema>, expectedLength: number, allowed: \"matched\" | \"possible\"): boolean {\n if (path.length !== expectedLength)\n return false;\n let previousSequence = 0;\n for (const [index, node] of path.entries()) {\n if (node.step !== index + 1 ||\n node.sessionId !== snapshot.sessionId ||\n node.sessionSequence <= previousSequence ||\n node.sessionSequence > snapshot.throughSessionSequence ||\n (allowed === \"matched\" && node.result !== \"matched\") ||\n (node.result === \"matched\" && node.locator.relation.state !== \"exact\")) {\n return false;\n }\n previousSequence = node.sessionSequence;\n }\n return true;\n}\nfunction hasValidOrderedArtifact(artifact: Schema.Schema.Type<typeof MatcherOrderedSequenceShapeSchema>): boolean {\n const stepCount = artifact.querySteps.length;\n const receipt = artifact.receipt;\n if (artifact.querySteps.some((step, index) => step.step !== index + 1) ||\n receipt.stepReceipts.length !== stepCount ||\n receipt.stepReceipts.some((step, index) => step.step !== index + 1) ||\n receipt.definitePrefixLength > receipt.possiblePrefixLength ||\n receipt.possiblePrefixLength > stepCount ||\n receipt.comparisons !== receipt.stepReceipts.reduce((sum, step) => sum + step.comparisons, 0) ||\n receipt.unavailableComparisons !== receipt.stepReceipts.reduce((sum, step) => sum + step.unavailable, 0) ||\n receipt.complete !== (artifact.sourceSnapshot.collectionAtCut === \"complete\") ||\n receipt.stepReceipts.some((step) => step.comparisons > receipt.sourceRows) ||\n receipt.stepReceipts.some((step, index) => index > 0 && step.comparisons !== receipt.stepReceipts[0]!.comparisons) ||\n (receipt.exhaustive && receipt.stepReceipts.some((step) => step.comparisons !== receipt.sourceRows))) {\n return false;\n }\n switch (artifact.result.state) {\n case \"matched\":\n return receipt.definitePrefixLength === stepCount &&\n receipt.possiblePrefixLength === stepCount &&\n receipt.decisive &&\n isPathWithinSourceCut(artifact.result.witnessPath, artifact.sourceSnapshot, stepCount, \"matched\");\n case \"mismatched\": {\n const frontier = artifact.result.failureFrontier;\n return receipt.complete && receipt.exhaustive && receipt.decisive &&\n receipt.possiblePrefixLength < stepCount &&\n frontier.firstBlockingStep === receipt.possiblePrefixLength + 1 &&\n frontier.suffixChecked.complete &&\n frontier.suffixChecked.exhaustive &&\n frontier.suffixChecked.decisive &&\n frontier.suffixChecked.knownTotal === frontier.suffixChecked.examined &&\n frontier.suffixChecked.matched === 0 &&\n frontier.suffixChecked.unavailable === 0 &&\n isPathWithinSourceCut(frontier.longestDefinitePrefix, artifact.sourceSnapshot, receipt.definitePrefixLength, \"matched\") &&\n isPathWithinSourceCut(frontier.longestPossiblePrefix, artifact.sourceSnapshot, receipt.possiblePrefixLength, \"possible\");\n }\n case \"unavailable\":\n return artifact.result.reason.length > 0 && !receipt.decisive;\n }\n}\nexport const MatcherCollectionFilterSchema = Schema.Struct({\n kind: Schema.Literal(\"collection-filter\"),\n sourceSnapshot: MatcherSourceSnapshotSchema,\n query: MatcherQueryStepSchema,\n receipt: AssertionCollectionReceiptSchema,\n retainedRows: MatcherRetainedRowsSchema,\n}).check(Schema.makeFilter((artifact) => artifact.query.step === 1 &&\n artifact.receipt.knownTotal !== null &&\n artifact.receipt.complete === (artifact.sourceSnapshot.collectionAtCut === \"complete\"), {\n identifier: \"MatcherCollectionFilterArtifact\",\n description: \"a collection matcher artifact with one query and a matching source cut\",\n}));\nexport const MatcherOrderedSequenceResultSchema = Schema.Union([\n Schema.Struct({\n state: Schema.Literal(\"matched\"),\n witnessPath: Schema.Array(MatcherOrderPathNodeSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"mismatched\"),\n failureFrontier: MatcherFailureFrontierSchema,\n }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reason: MatcherIdentitySchema,\n }),\n]);\nexport const MatcherOrderedSequenceShapeSchema = Schema.Struct({\n kind: Schema.Literal(\"ordered-sequence\"),\n sourceSnapshot: Schema.Union([\n MatcherTurnSourceSnapshotSchema,\n MatcherSessionSourceSnapshotSchema,\n ]),\n querySteps: Schema.Array(MatcherQueryStepSchema).check(Schema.makeFilter((steps) => steps.length >= 2 && steps.length <= 64, {\n identifier: \"MatcherOrderQuerySteps\",\n description: \"between two and 64 ordered matcher query steps\",\n })),\n receipt: OrderEvaluationReceiptSchema,\n result: MatcherOrderedSequenceResultSchema,\n retainedRows: MatcherRetainedRowsSchema,\n});\nconst MatcherOrderedSequenceSchema = MatcherOrderedSequenceShapeSchema.check(Schema.makeFilter(hasValidOrderedArtifact, {\n identifier: \"MatcherOrderedSequenceArtifact\",\n description: \"an ordered matcher artifact with consistent receipts, paths, and cut\",\n}));\nfunction isMatcherArtifactWithinSizeLimit(value: unknown): boolean {\n try {\n return utf8ByteLength(JSON.stringify(value)) <= MAX_MATCHER_QUERY_ARTIFACT_BYTES;\n }\n catch {\n return false;\n }\n}\nexport const MatcherQueryArtifactSchema: Schema.Schema<MatcherQueryArtifact> = Schema.Union([MatcherCollectionFilterSchema, MatcherOrderedSequenceSchema]).check(Schema.makeFilter(isMatcherArtifactWithinSizeLimit, {\n identifier: \"MatcherQueryArtifactSize\",\n description: \"a matcher query artifact no larger than 64 KiB\",\n}));\nexport const AssertionConditionValueSchema = Schema.Union([\n Schema.Struct({ kind: Schema.Literal(\"boolean\"), expected: Schema.Literal(true) }),\n Schema.Struct({ kind: Schema.Literal(\"at-least\"), threshold: NonNegativeNumberSchema }),\n Schema.Struct({ kind: Schema.Literal(\"record-only\") }),\n]);\nexport const AssertionDecisionPolicySchema = Schema.Struct({\n requirement: Schema.Union([\n Schema.Struct({\n state: Schema.Literal(\"available\"),\n value: Schema.Literals([\"required\", \"optional\"]),\n }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n condition: Schema.Union([\n Schema.Struct({\n state: Schema.Literal(\"available\"),\n value: AssertionConditionValueSchema,\n }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n});\nexport const SealedAssertionResultSchema: Schema.Schema<SealedAssertionResult> = Schema.Union([\n Schema.Struct({\n state: Schema.Literal(\"matched\"),\n gate: Schema.Literals([\"not-gate\", \"satisfied\"]),\n score: Schema.Union([NoScoreContributionSchema, EarnedScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"mismatched\"),\n reason: Schema.Literal(\"condition-not-met\"),\n gate: Schema.Literals([\"not-gate\", \"failed\"]),\n score: Schema.Union([NoScoreContributionSchema, EarnedScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reason: Schema.Literals([\"evidence-unavailable\", \"source-unavailable\", \"redacted\"]),\n gate: Schema.Literals([\"not-gate\", \"unavailable\"]),\n score: Schema.Union([NoScoreContributionSchema, UnavailableScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"errored\"),\n reason: Schema.Literals([\"evaluator-failed\", \"producer-interrupted\", \"invalid-subject\"]),\n gate: Schema.Literals([\"not-gate\", \"unavailable\"]),\n score: Schema.Union([NoScoreContributionSchema, UnavailableScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n Schema.Struct({\n state: Schema.Literal(\"not-applicable\"),\n reason: Schema.Literal(\"coverage-not-applicable\"),\n gate: Schema.Literals([\"not-gate\", \"not-applicable\"]),\n score: Schema.Union([NoScoreContributionSchema, UnavailableScoreContributionSchema]),\n diagnostic: Schema.optional(BoundedJsonObjectSchema),\n receipt: Schema.optional(AssertionCollectionReceiptSchema),\n }),\n]);\n/**\n * Assertions owns the shared current entry framing. The caller supplies the\n * exact material declaration so current content and migration-private\n * historical material never share a physical union.\n */\nexport function createAssertionsRecordSchemas<Material, MaterialEncoded>(material: Schema.Codec<Material, MaterialEncoded>) {\n const evidence = Schema.Array(material);\n const limitations = Schema.Array(Schema.toType(AssertionLimitationSchema));\n const materials = Schema.Struct({\n source: material,\n evidence,\n coverage: Schema.toType(AssertionCoverageSchema),\n limitations,\n }).check(Schema.makeFilter((value) => hasCoverageConsistentLimitations(value), {\n identifier: \"AssertionCoverageLimitations\",\n description: \"coverage and limitations with a consistent sealed relationship\",\n }));\n const historicalV2Evaluation = Schema.Struct({\n observed: Schema.toType(AssertionFactValueSchema),\n receipt: Schema.optional(Schema.toType(AssertionCollectionReceiptSchema)),\n });\n const evaluation = Schema.Union([\n Schema.Struct({\n kind: Schema.Literal(\"ordinary\"),\n observed: Schema.toType(AssertionFactValueSchema),\n receipt: Schema.optional(Schema.toType(AssertionCollectionReceiptSchema)),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"matcher-current\"),\n observed: Schema.toType(AssertionFactValueSchema),\n artifact: Schema.toType(MatcherQueryArtifactSchema),\n receipt: Schema.optional(Schema.Never),\n }),\n Schema.Struct({\n kind: Schema.Literal(\"matcher-legacy\"),\n observed: Schema.toType(AssertionFactValueSchema),\n reason: Schema.Literal(\"historical-not-recorded\"),\n legacyDiagnostic: Schema.optional(Schema.toType(AssertionFactValueSchema)),\n receipt: Schema.optional(Schema.Never),\n }),\n ]);\n const decision = Schema.Struct({\n result: Schema.Literals([\"matched\", \"mismatched\", \"unavailable\", \"errored\", \"not-applicable\"]),\n reason: Schema.NullOr(Schema.Literals([\n \"condition-not-met\", \"evidence-unavailable\", \"source-unavailable\", \"redacted\",\n \"evaluator-failed\", \"producer-interrupted\", \"invalid-subject\", \"coverage-not-applicable\",\n ])),\n gate: Schema.Literals([\"not-gate\", \"satisfied\", \"failed\", \"unavailable\", \"not-applicable\"]),\n });\n const explanationRetention = Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"retained\"), value: Schema.toType(AssertionFactValueSchema) }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]);\n const historicalV2OuterEntry = Schema.Struct({\n entryId: Schema.toType(AssertionEntryIdSchema),\n display: Schema.toType(AssertionDisplaySchema),\n criterion: Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"available\"), value: Schema.toType(BoundedJsonObjectSchema) }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n materials,\n evaluation: historicalV2Evaluation,\n decision,\n policy: Schema.toType(AssertionDecisionPolicySchema),\n contribution: Schema.Union([Schema.toType(NoScoreContributionSchema), Schema.toType(EarnedScoreContributionSchema), Schema.toType(UnavailableScoreContributionSchema)]),\n explanationRetention,\n });\n const outerEntry = Schema.Struct({\n entryId: Schema.toType(AssertionEntryIdSchema),\n display: Schema.toType(AssertionDisplaySchema),\n criterion: Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"available\"), value: Schema.toType(BoundedJsonObjectSchema) }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n materials,\n evaluation,\n decision,\n policy: Schema.toType(AssertionDecisionPolicySchema),\n contribution: Schema.Union([Schema.toType(NoScoreContributionSchema), Schema.toType(EarnedScoreContributionSchema), Schema.toType(UnavailableScoreContributionSchema)]),\n explanationRetention,\n }).check(Schema.makeFilter((entry) => entry.evaluation.kind === \"ordinary\" ||\n entry.explanationRetention.state === \"unavailable\", {\n identifier: \"MatcherExplanationOwnership\",\n description: \"matcher artifacts and legacy diagnostics are not duplicated in explanation retention\",\n }));\n const historicalV2Entries = Schema.Array(historicalV2OuterEntry).check(Schema.makeFilter((values) => values.length <= assertionRuntimeLimits.entries, {\n identifier: \"AssertionsEntryCount\",\n description: \"at most 4,096 assertion entries\",\n }));\n const entries = Schema.Array(outerEntry).check(Schema.makeFilter((values) => values.length <= assertionRuntimeLimits.entries, {\n identifier: \"AssertionsEntryCount\",\n description: \"at most 4,096 assertion entries\",\n }));\n const outerDocument = Schema.Struct({ entries }).check(Schema.makeFilter(hasUniqueEntryIds, {\n identifier: \"AssertionsUniqueEntryIds\",\n description: \"unique attachment-local assertion entry IDs\",\n }), Schema.makeFilter(isDocumentWithinSizeLimit, {\n identifier: \"AssertionsDocumentSize\",\n description: \"a JSON document no larger than 4 MiB\",\n }));\n const entry = Schema.Struct({\n entryId: Schema.toType(AssertionEntryIdSchema),\n display: Schema.toType(AssertionDisplaySchema),\n criterion: Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"available\"), value: Schema.toType(CriterionEnvelopeSchema) }),\n Schema.Struct({ state: Schema.Literal(\"unavailable\"), reason: Schema.Literal(\"not-recorded\") }),\n ]),\n materials,\n evaluation,\n decision,\n policy: Schema.toType(AssertionDecisionPolicySchema),\n contribution: Schema.Union([Schema.toType(NoScoreContributionSchema), Schema.toType(EarnedScoreContributionSchema), Schema.toType(UnavailableScoreContributionSchema)]),\n explanationRetention,\n });\n const document = Schema.Struct({\n entries: Schema.Array(entry).check(Schema.makeFilter((entries) => entries.length <= assertionRuntimeLimits.entries, {\n identifier: \"AssertionsEntryCount\",\n description: \"at most 4,096 assertion entries\",\n })),\n }).check(Schema.makeFilter(hasUniqueEntryIds, {\n identifier: \"AssertionsUniqueEntryIds\",\n description: \"unique attachment-local assertion entry IDs\",\n }), Schema.makeFilter(isDocumentWithinSizeLimit, {\n identifier: \"AssertionsDocumentSize\",\n description: \"a JSON document no larger than 4 MiB\",\n }));\n return Object.freeze({\n material,\n entry,\n entries,\n historicalV2Entries,\n outerDocument,\n document,\n });\n}\nexport interface AssertionsRecordCodecError {\n readonly code: \"assertions-document-invalid\";\n}\nconst assertionsDocumentInvalid: AssertionsRecordCodecError = Object.freeze({\n code: \"assertions-document-invalid\",\n});\nexport function decodeAssertionsDocumentOuter<Content, Encoded>(schema: Schema.Codec<AssertionsDocumentOuter<Content>, Encoded>, input: unknown): Result.Result<AssertionsDocumentOuter<Content>, AssertionsRecordCodecError> {\n if (!isAssertionsRawDataGraph(input))\n return Result.fail(assertionsDocumentInvalid);\n const decoded = Schema.decodeUnknownResult(schema, AssertionsExactParseOptions)(input);\n return Result.isFailure(decoded)\n ? Result.fail(assertionsDocumentInvalid)\n : Result.succeed(decoded.success);\n}\nexport function decodeAssertionsDocument<Content, Encoded>(schema: Schema.Codec<AssertionsDocument<Content>, Encoded>, input: unknown): Result.Result<AssertionsDocument<Content>, AssertionsRecordCodecError> {\n if (!isAssertionsRawDataGraph(input))\n return Result.fail(assertionsDocumentInvalid);\n const decoded = Schema.decodeUnknownResult(schema, AssertionsExactParseOptions)(input);\n return Result.isFailure(decoded)\n ? Result.fail(assertionsDocumentInvalid)\n : Result.succeed(decoded.success);\n}\nexport interface ThirdPartyCriterionDefinition {\n readonly name: string;\n readonly schemaId: string;\n readonly dataSchema: Schema.Codec<unknown, unknown>;\n}\nexport interface ThirdPartyCriterionRegistry {\n readonly lookup: (name: string, schemaId: string) => ThirdPartyCriterionDefinition | undefined;\n}\nexport type ThirdPartyCriterionRegistryError = {\n readonly code: \"third-party-criterion-identity-invalid\";\n readonly name: string;\n readonly schemaId: string;\n} | {\n readonly code: \"third-party-criterion-duplicate\";\n readonly name: string;\n readonly schemaId: string;\n};\nfunction thirdPartyCriterionKey(name: string, schemaId: string): string {\n return `${name}\\u0000${schemaId}`;\n}\nexport function makeThirdPartyCriterionRegistry(definitions: readonly ThirdPartyCriterionDefinition[]): Result.Result<ThirdPartyCriterionRegistry, ThirdPartyCriterionRegistryError> {\n const byIdentity = new Map<string, ThirdPartyCriterionDefinition>();\n for (const definition of definitions) {\n if (!isAsciiIdentifier(definition.name) || !isAsciiIdentifier(definition.schemaId)) {\n return Result.fail({\n code: \"third-party-criterion-identity-invalid\",\n name: definition.name,\n schemaId: definition.schemaId,\n });\n }\n const key = thirdPartyCriterionKey(definition.name, definition.schemaId);\n if (byIdentity.has(key)) {\n return Result.fail({\n code: \"third-party-criterion-duplicate\",\n name: definition.name,\n schemaId: definition.schemaId,\n });\n }\n byIdentity.set(key, Object.freeze({ ...definition }));\n }\n return Result.succeed(Object.freeze({\n lookup(name: string, schemaId: string) {\n return byIdentity.get(thirdPartyCriterionKey(name, schemaId));\n },\n }));\n}\nconst KNOWN_BUILTIN_CRITERION_IDS: ReadonlySet<string> = new Set([\n \"value-match/v1\",\n \"numeric-comparison/v1\",\n \"scope-status/v1\",\n \"occurrence/v1\",\n \"occurrence/v2\",\n \"judge-measurement/v1\",\n \"judge-measurement/v2\",\n \"llm-measurement/v1\",\n \"sandbox-result/v1\",\n \"direct-score/v1\",\n]);\nfunction availableEntry<Content>(entry: AssertionEntryOuter<Content>, criterion: WritableCriterionEnvelope): AssertionEntryRead<Content> {\n const available: AssertionEntry<Content> = {\n ...entry,\n criterion: Object.freeze({ state: \"available\" as const, value: criterion }),\n };\n return Object.freeze({ state: \"available\", entry: Object.freeze(available) });\n}\nfunction projectAssertionEntry<Content>(entry: AssertionEntryOuter<Content>, registry: ThirdPartyCriterionRegistry): AssertionEntryRead<Content> {\n if (entry.criterion.state === \"unavailable\") {\n return Object.freeze({ state: \"available\", entry: entry as AssertionEntry<Content> });\n }\n const criterionValue = entry.criterion.value;\n const builtinEnvelope = Schema.decodeUnknownResult(Schema.toType(BuiltInCriterionEnvelopeSchema), AssertionsExactParseOptions)(criterionValue);\n if (Result.isSuccess(builtinEnvelope)) {\n const builtin = Schema.decodeUnknownResult(Schema.toType(BuiltInCriterionSchema), AssertionsExactParseOptions)(criterionValue);\n if (Result.isSuccess(builtin)) {\n return availableEntry(entry, builtin.success);\n }\n if (KNOWN_BUILTIN_CRITERION_IDS.has(builtinEnvelope.success.id)) {\n return Object.freeze({\n state: \"invalid\",\n entry,\n reason: \"criterion-data-invalid\",\n });\n }\n return Object.freeze({\n state: \"unsupported\",\n entry,\n reason: \"builtin-unknown\",\n });\n }\n const thirdParty = Schema.decodeUnknownResult(Schema.toType(ThirdPartyCriterionSchema), AssertionsExactParseOptions)(criterionValue);\n if (Result.isFailure(thirdParty)) {\n return Object.freeze({\n state: \"invalid\",\n entry,\n reason: \"criterion-envelope-invalid\",\n });\n }\n const definition = registry.lookup(thirdParty.success.name, thirdParty.success.schemaId);\n if (definition === undefined) {\n return Object.freeze({\n state: \"unsupported\",\n entry,\n reason: \"third-party-schema-unavailable\",\n });\n }\n const data = Schema.decodeUnknownResult(Schema.toType(definition.dataSchema), AssertionsExactParseOptions)(thirdParty.success.data);\n if (Result.isFailure(data)) {\n return Object.freeze({\n state: \"invalid\",\n entry,\n reason: \"criterion-data-invalid\",\n });\n }\n return availableEntry(entry, thirdParty.success);\n}\n/**\n * Projection is synchronous and never re-evaluates an Assertion. Its only\n * dynamic work is criterion interpretation inside each already-valid entry.\n */\nexport function projectAssertionsDocument<Content>(document: AssertionsDocumentOuter<Content>, registry: ThirdPartyCriterionRegistry): AssertionsProjection<Content> {\n return Object.freeze({\n entries: Object.freeze(document.entries.map((entry) => projectAssertionEntry(entry, registry))),\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":";;;AAudA,sDAmBC;AAzeD;;;GAGG;AACH,8CAA2D;AAAlD,uHAAA,wBAAwB,OAAA;AAkdjC,SAAgB,qBAAqB,CAAC,KAAgF;IAClH,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,UAAU;QAC1D,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO;QAC1B,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,iBAAiB,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,KAAK,mBAAmB;YACnG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO;YACnC,CAAC,CAAC,SAAS,CAAC;IACpB,MAAM,OAAO,GAAG,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IACtF,QAAQ,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC5B,KAAK,SAAS;YACV,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAgC,EAAE,KAAK,EAAE,KAAK,CAAC,YAA6D,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAC9L,KAAK,YAAY;YACb,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAA6B,EAAE,KAAK,EAAE,KAAK,CAAC,YAA6D,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAC3N,KAAK,aAAa;YACd,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAoE,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAkC,EAAE,KAAK,EAAE,KAAK,CAAC,YAAkE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QACtS,KAAK,SAAS;YACV,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAyE,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAkC,EAAE,KAAK,EAAE,KAAK,CAAC,YAAkE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QACvS,KAAK,gBAAgB;YACjB,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,yBAAyB,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAqC,EAAE,KAAK,EAAE,KAAK,CAAC,YAAkE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtP,CAAC;AACL,CAAC","sourcesContent":["import type { AssertionEntryId } from \"../identity.ts\";\n/**\n * `entryId` is only stable inside one Assertions Attachment. It is not an\n * authoring key and deliberately has no cross-Attempt meaning.\n */\nexport { ASSERTION_ENTRY_ID_BRAND, } from \"../identity.ts\";\nexport type { AssertionEntryId } from \"../identity.ts\";\nexport type BoundedJsonPrimitive = null | boolean | number | string;\nexport interface BoundedJsonObject {\n readonly [key: string]: BoundedJsonValue;\n}\n/** JSON-only material bounded before it enters a Record content source. */\nexport type BoundedJsonValue = BoundedJsonPrimitive | readonly BoundedJsonValue[] | BoundedJsonObject;\nexport interface AssertionDisplay {\n readonly key?: string;\n readonly label?: string;\n readonly groupPath: readonly string[];\n}\nexport type AssertionFactValue = {\n readonly kind: \"unavailable\";\n readonly reason: \"not-recorded\" | \"not-declared\" | \"source-unavailable\";\n} | {\n readonly kind: \"value\";\n readonly value: BoundedJsonPrimitive;\n} | {\n readonly kind: \"text\";\n readonly text: string;\n} | {\n readonly kind: \"list\";\n readonly items: readonly AssertionFactValue[];\n} | {\n readonly kind: \"fields\";\n readonly fields: readonly AssertionFactField[];\n};\nexport interface AssertionFactField {\n readonly label: string;\n readonly value: AssertionFactValue;\n}\nexport interface AssertionDecisionPolicy {\n readonly requirement: {\n readonly state: \"available\";\n readonly value: \"required\" | \"optional\";\n } | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n };\n readonly condition: {\n readonly state: \"available\";\n readonly value: {\n readonly kind: \"boolean\";\n readonly expected: true;\n } | {\n readonly kind: \"at-least\";\n readonly threshold: number;\n } | {\n readonly kind: \"record-only\";\n };\n } | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n };\n}\n/** The outer builtin shape deliberately preserves an unknown future id. */\nexport interface BuiltInCriterionEnvelope {\n readonly kind: \"builtin\";\n readonly id: string;\n readonly data: BoundedJsonValue;\n}\n/** Third-party data is exact JSON owned by the named third-party schema. */\nexport interface ThirdPartyCriterion {\n readonly name: string;\n readonly schemaId: string;\n readonly data: BoundedJsonValue;\n}\n/** Raw identity envelope used by the reader's second decode phase. */\nexport type CriterionEnvelope = BuiltInCriterionEnvelope | ThirdPartyCriterion;\nexport type CriterionOuterEnvelope = CriterionEnvelope;\nexport type BuiltInCriterion = {\n readonly kind: \"builtin\";\n readonly id: \"value-match/v1\";\n readonly data: {\n readonly subject: \"explicit-value\";\n readonly matcher: {\n readonly state: \"declared\";\n readonly name: string;\n } | {\n readonly state: \"unavailable\";\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"numeric-comparison/v1\";\n readonly data: {\n readonly comparator: \"less-than\" | \"at-most\" | \"greater-than\" | \"at-least\";\n readonly threshold: number;\n readonly subject: {\n readonly kind: \"explicit-value\";\n } | {\n readonly kind: \"scope-metric\";\n readonly metric: \"tokens\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly unit: \"tokens\";\n } | {\n readonly kind: \"scope-metric\";\n readonly metric: \"cost\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly unit: \"usd\";\n } | {\n readonly kind: \"collection-cardinality\";\n readonly collection: \"tool-calls\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"scope-status/v1\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly assertion: \"succeeded\" | \"no-failed-actions\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"occurrence/v1\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly occurrence: \"tool\" | \"skill\" | \"event\";\n readonly assertion: \"present\" | \"absent\" | \"count\" | \"order\";\n /** Tool assertions retain the single managed matcher identity. */\n readonly matcher?: string;\n readonly quantifier?: {\n readonly kind: \"absent\";\n } | {\n readonly kind: \"at-least\" | \"exact\";\n readonly count: number;\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"occurrence/v2\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly occurrence: \"tool\" | \"skill\" | \"event\";\n readonly assertion: \"present\" | \"absent\" | \"count\" | \"order\";\n /** Tool assertions retain the single managed matcher identity. */\n readonly matcher?: string;\n readonly quantifier?: {\n readonly kind: \"absent\";\n } | {\n readonly kind: \"at-least\" | \"less-than\" | \"at-most\" | \"greater-than\" | \"exact\";\n readonly count: number;\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"judge-measurement/v1\";\n readonly data: {\n readonly recipe: string;\n readonly scale: \"unit-interval\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"judge-measurement/v2\";\n readonly data: {\n readonly name: string;\n readonly scale: \"unit-interval\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"llm-measurement/v1\";\n readonly data: {\n readonly name: string;\n readonly scale: \"unit-interval\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"changed-paths\";\n readonly paths: readonly string[];\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"no-changes\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"file-changed\";\n readonly path: string;\n readonly status?: \"added\" | \"modified\" | \"deleted\";\n /** Persisted display identity only; evaluators retain the managed Match. */\n readonly before?: string;\n readonly after?: string;\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"file-deleted\";\n readonly path: string;\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"not-in-diff\";\n readonly pattern: string;\n readonly flags: string;\n readonly content: \"added\" | \"removed\" | \"both\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"direct-score/v1\";\n readonly data: {\n readonly source: \"author\";\n };\n};\n/** A v1 writer may only emit a known builtin or a versioned third-party schema. */\nexport type WritableCriterionEnvelope = BuiltInCriterion | ThirdPartyCriterion;\nexport type AssertionMaterial<Content> = {\n readonly kind: \"unavailable\";\n readonly reason: \"not-recorded\";\n} | {\n readonly kind: \"content\";\n readonly content: Content;\n /** How the producer encoded the logical material into the sealed content. */\n readonly encoding: \"json\" | \"utf-8\" | \"binary\";\n readonly byteLength: number;\n /** Safe retained display metadata from capture; null when none was declared. */\n readonly preview: string | null;\n};\nexport type AssertionCoverage = {\n readonly state: \"complete\";\n} | {\n readonly state: \"partial\";\n readonly reason: \"sampled\" | \"truncated\" | \"redacted\" | \"provider-limited\" | \"capacity-limited\";\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-collected\" | \"source-unavailable\" | \"producer-failed\";\n} | {\n readonly state: \"not-applicable\";\n readonly reason: \"optional-material\" | \"unsupported-subject\";\n};\nexport type AssertionLimitation = {\n readonly kind: \"redacted\";\n readonly fieldCount: number;\n} | {\n readonly kind: \"sampled\";\n readonly captured: number;\n readonly knownTotal?: number;\n} | {\n readonly kind: \"truncated\";\n readonly omittedBytes: number;\n} | {\n readonly kind: \"provider-limited\";\n} | {\n readonly kind: \"capacity-limited\";\n readonly capturedItems: number;\n readonly knownTotalItems: number;\n readonly omittedBytes: number | null;\n};\nexport type GateDisposition = \"not-gate\" | \"satisfied\" | \"failed\" | \"unavailable\" | \"not-applicable\";\nexport interface NoScoreContribution {\n readonly state: \"not-scored\";\n}\nexport interface EarnedScoreContribution {\n readonly state: \"earned\";\n readonly points: number;\n readonly earned: number;\n}\nexport interface UnavailableScoreContribution {\n readonly state: \"unavailable\";\n readonly points: number;\n readonly reason: \"source-unavailable\" | \"evaluation-errored\" | \"not-applicable\";\n}\nexport type ScoreContribution = NoScoreContribution | EarnedScoreContribution | UnavailableScoreContribution;\nexport interface AssertionCollectionReceipt {\n readonly examined: number;\n readonly matched: number;\n readonly mismatched: number;\n readonly unavailable: number;\n readonly knownTotal: number | null;\n readonly complete: boolean;\n readonly exhaustive: boolean;\n readonly decisive: boolean;\n}\nexport type { MatcherRelationStatus, MatcherSourceLocator } from \"../api.ts\";\nimport type { MatcherSourceLocator } from \"../api.ts\";\nexport type MatcherOverlayResult = \"matched\" | \"mismatched\" | \"unavailable\" | \"not-evaluated\";\nexport interface MatcherRetainedRow {\n readonly locator: MatcherSourceLocator;\n readonly result: MatcherOverlayResult;\n readonly difference?: AssertionFactValue;\n}\nexport interface MatcherQueryStep {\n readonly step: number;\n readonly summary: AssertionFactValue;\n}\nexport type MatcherSourceSnapshot = {\n readonly scope: \"turn\";\n readonly sessionId: string;\n readonly turnId: string;\n readonly scopeId: string;\n readonly throughSessionSequence: number;\n readonly source: {\n readonly family: \"niceeval.agent-turns\";\n readonly schemaVersion: number;\n };\n readonly collectionAtCut: \"complete\" | \"partial\" | \"unavailable\";\n} | {\n readonly scope: \"session\";\n readonly sessionId: string;\n readonly scopeId: string;\n readonly throughSessionSequence: number;\n readonly source: {\n readonly family: \"niceeval.agent-turns\";\n readonly schemaVersion: number;\n };\n readonly collectionAtCut: \"complete\" | \"partial\" | \"unavailable\";\n} | {\n readonly scope: \"attempt\";\n readonly scopeId: string;\n readonly sessions: readonly {\n readonly sessionId: string;\n readonly throughSessionSequence: number;\n }[];\n readonly source: {\n readonly family: \"niceeval.agent-turns\";\n readonly schemaVersion: number;\n };\n readonly collectionAtCut: \"complete\" | \"partial\" | \"unavailable\";\n};\nexport interface OrderStepReceipt {\n readonly step: number;\n readonly comparisons: number;\n readonly matched: number;\n readonly mismatched: number;\n readonly unavailable: number;\n}\nexport interface OrderEvaluationReceipt {\n readonly sourceRows: number;\n readonly comparisons: number;\n readonly unavailableComparisons: number;\n readonly definitePrefixLength: number;\n readonly possiblePrefixLength: number;\n readonly stepReceipts: readonly OrderStepReceipt[];\n readonly complete: boolean;\n readonly exhaustive: boolean;\n readonly decisive: boolean;\n}\nexport interface MatcherOrderPathNode {\n readonly step: number;\n readonly locator: MatcherSourceLocator;\n readonly sessionId: string;\n readonly sessionSequence: number;\n readonly result: \"matched\" | \"unavailable\";\n}\nexport interface MatcherFailureFrontier {\n readonly longestDefinitePrefix: readonly MatcherOrderPathNode[];\n readonly longestPossiblePrefix: readonly MatcherOrderPathNode[];\n readonly firstBlockingStep: number;\n readonly suffixChecked: AssertionCollectionReceipt;\n readonly representatives: readonly MatcherRetainedRow[];\n}\nexport type MatcherQueryArtifact = {\n readonly kind: \"collection-filter\";\n readonly sourceSnapshot: MatcherSourceSnapshot;\n readonly query: MatcherQueryStep;\n readonly receipt: AssertionCollectionReceipt;\n readonly retainedRows: readonly MatcherRetainedRow[];\n} | {\n readonly kind: \"ordered-sequence\";\n readonly sourceSnapshot: Extract<MatcherSourceSnapshot, {\n readonly scope: \"turn\" | \"session\";\n }>;\n /** The current decoder proves this has between two and 64 entries. */\n readonly querySteps: readonly MatcherQueryStep[];\n readonly receipt: OrderEvaluationReceipt;\n readonly result: {\n readonly state: \"matched\";\n readonly witnessPath: readonly MatcherOrderPathNode[];\n } | {\n readonly state: \"mismatched\";\n readonly failureFrontier: MatcherFailureFrontier;\n } | {\n readonly state: \"unavailable\";\n readonly reason: string;\n };\n readonly retainedRows: readonly MatcherRetainedRow[];\n};\nexport type SealedAssertionResult = {\n readonly state: \"matched\";\n readonly gate: \"not-gate\" | \"satisfied\";\n readonly score: NoScoreContribution | EarnedScoreContribution;\n /** Bounded evaluator diagnostics, including ToolMatch evidence paths. */\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"mismatched\";\n readonly reason: \"condition-not-met\";\n readonly gate: \"not-gate\" | \"failed\";\n readonly score: NoScoreContribution | EarnedScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\";\n readonly gate: \"not-gate\" | \"unavailable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"errored\";\n readonly reason: \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\";\n readonly gate: \"not-gate\" | \"unavailable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"not-applicable\";\n readonly reason: \"coverage-not-applicable\";\n readonly gate: \"not-gate\" | \"not-applicable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n};\nexport type AssertionCriterionRecord = {\n readonly state: \"available\";\n readonly value: WritableCriterionEnvelope;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\nexport type AssertionCriterionRecordOuter = {\n readonly state: \"available\";\n readonly value: BoundedJsonObject;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\nexport interface AssertionMaterials<Content> {\n readonly source: AssertionMaterial<Content>;\n readonly evidence: readonly AssertionMaterial<Content>[];\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n}\nexport type AssertionEvaluation = {\n readonly kind: \"ordinary\";\n readonly observed: AssertionFactValue;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly kind: \"matcher-current\";\n readonly observed: AssertionFactValue;\n readonly artifact: MatcherQueryArtifact;\n /** Current matcher receipts live only inside `artifact`. */\n readonly receipt?: never;\n} | {\n readonly kind: \"matcher-legacy\";\n readonly observed: AssertionFactValue;\n readonly reason: \"historical-not-recorded\";\n readonly legacyDiagnostic?: AssertionFactValue;\n readonly receipt?: never;\n};\nexport interface AssertionDecision {\n readonly result: \"matched\" | \"mismatched\" | \"unavailable\" | \"errored\" | \"not-applicable\";\n readonly reason: \"condition-not-met\" | \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\" | \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\" | \"coverage-not-applicable\" | null;\n readonly gate: GateDisposition;\n}\nexport function sealedAssertionResult(entry: Pick<AssertionEntry<unknown>, \"decision\" | \"contribution\" | \"evaluation\">): SealedAssertionResult {\n const evaluationReceipt = entry.evaluation.kind === \"ordinary\"\n ? entry.evaluation.receipt\n : entry.evaluation.kind === \"matcher-current\" && entry.evaluation.artifact.kind === \"collection-filter\"\n ? entry.evaluation.artifact.receipt\n : undefined;\n const receipt = evaluationReceipt === undefined ? {} : { receipt: evaluationReceipt };\n switch (entry.decision.result) {\n case \"matched\":\n return Object.freeze({ state: \"matched\", gate: entry.decision.gate as \"not-gate\" | \"satisfied\", score: entry.contribution as NoScoreContribution | EarnedScoreContribution, ...receipt });\n case \"mismatched\":\n return Object.freeze({ state: \"mismatched\", reason: \"condition-not-met\", gate: entry.decision.gate as \"not-gate\" | \"failed\", score: entry.contribution as NoScoreContribution | EarnedScoreContribution, ...receipt });\n case \"unavailable\":\n return Object.freeze({ state: \"unavailable\", reason: entry.decision.reason as \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\", gate: entry.decision.gate as \"not-gate\" | \"unavailable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n case \"errored\":\n return Object.freeze({ state: \"errored\", reason: entry.decision.reason as \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\", gate: entry.decision.gate as \"not-gate\" | \"unavailable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n case \"not-applicable\":\n return Object.freeze({ state: \"not-applicable\", reason: \"coverage-not-applicable\", gate: entry.decision.gate as \"not-gate\" | \"not-applicable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n }\n}\nexport type ExplanationRetention = {\n readonly state: \"retained\";\n readonly value: AssertionFactValue;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\n/** The sole current semantic entry. Each fact has exactly one durable owner. */\nexport interface AssertionEntry<Content> {\n readonly entryId: AssertionEntryId;\n readonly display: AssertionDisplay;\n readonly criterion: AssertionCriterionRecord;\n readonly materials: AssertionMaterials<Content>;\n readonly evaluation: AssertionEvaluation;\n readonly decision: AssertionDecision;\n readonly policy: AssertionDecisionPolicy;\n readonly contribution: ScoreContribution;\n readonly explanationRetention: ExplanationRetention;\n}\n/**\n * Reader framing intentionally leaves `criterion` as bounded JSON. This\n * lets a bad plugin or future criterion affect its entry only after every\n * other entry boundary has already been verified.\n */\nexport interface AssertionEntryOuter<Content> {\n readonly entryId: AssertionEntryId;\n readonly display: AssertionDisplay;\n readonly criterion: AssertionCriterionRecordOuter;\n readonly materials: AssertionMaterials<Content>;\n readonly evaluation: AssertionEvaluation;\n readonly decision: AssertionDecision;\n readonly policy: AssertionDecisionPolicy;\n readonly contribution: ScoreContribution;\n readonly explanationRetention: ExplanationRetention;\n}\nexport interface AssertionsDocument<Content> {\n readonly entries: readonly AssertionEntry<Content>[];\n}\nexport interface AssertionsDocumentOuter<Content> {\n readonly entries: readonly AssertionEntryOuter<Content>[];\n}\nexport type AssertionEntryRead<Content> = {\n readonly state: \"available\";\n readonly entry: AssertionEntry<Content>;\n} | {\n readonly state: \"unsupported\";\n readonly entry: AssertionEntryOuter<Content>;\n readonly reason: \"builtin-unknown\" | \"third-party-schema-unavailable\";\n} | {\n readonly state: \"invalid\";\n readonly entry: AssertionEntryOuter<Content>;\n readonly reason: \"criterion-envelope-invalid\" | \"criterion-data-invalid\";\n};\nexport interface AssertionsProjection<Content> {\n readonly entries: readonly AssertionEntryRead<Content>[];\n}\n"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":";;;AAydA,sDAmBC;AA3eD;;;GAGG;AACH,8CAA2D;AAAlD,uHAAA,wBAAwB,OAAA;AAodjC,SAAgB,qBAAqB,CAAC,KAAgF;IAClH,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,UAAU;QAC1D,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO;QAC1B,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,iBAAiB,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,KAAK,mBAAmB;YACnG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,Q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,EAAE,gBAAgB,EAAE,MAAM,EAAE,yBAAyB,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAqC,EAAE,KAAK,EAAE,KAAK,CAAC,YAAkE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtP,CAAC;AACL,CAAC","sourcesContent":["import type { AssertionEntryId } from \"../identity.ts\";\n/**\n * `entryId` is only stable inside one Assertions Attachment. It is not an\n * authoring key and deliberately has no cross-Attempt meaning.\n */\nexport { ASSERTION_ENTRY_ID_BRAND, } from \"../identity.ts\";\nexport type { AssertionEntryId } from \"../identity.ts\";\nexport type BoundedJsonPrimitive = null | boolean | number | string;\nexport interface BoundedJsonObject {\n readonly [key: string]: BoundedJsonValue;\n}\n/** JSON-only material bounded before it enters a Record content source. */\nexport type BoundedJsonValue = BoundedJsonPrimitive | readonly BoundedJsonValue[] | BoundedJsonObject;\nexport interface AssertionDisplay {\n readonly key?: string;\n readonly label?: string;\n readonly groupPath: readonly string[];\n}\nexport type AssertionFactValue = {\n readonly kind: \"unavailable\";\n readonly reason: \"not-recorded\" | \"not-declared\" | \"source-unavailable\";\n} | {\n readonly kind: \"value\";\n readonly value: BoundedJsonPrimitive;\n} | {\n readonly kind: \"text\";\n readonly text: string;\n} | {\n readonly kind: \"list\";\n readonly items: readonly AssertionFactValue[];\n} | {\n readonly kind: \"fields\";\n readonly fields: readonly AssertionFactField[];\n};\nexport interface AssertionFactField {\n readonly label: string;\n readonly value: AssertionFactValue;\n}\nexport interface AssertionDecisionPolicy {\n readonly requirement: {\n readonly state: \"available\";\n readonly value: \"required\" | \"optional\";\n } | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n };\n readonly condition: {\n readonly state: \"available\";\n readonly value: {\n readonly kind: \"boolean\";\n readonly expected: true;\n } | {\n readonly kind: \"at-least\";\n readonly threshold: number;\n } | {\n readonly kind: \"record-only\";\n };\n } | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n };\n}\n/** The outer builtin shape deliberately preserves an unknown future id. */\nexport interface BuiltInCriterionEnvelope {\n readonly kind: \"builtin\";\n readonly id: string;\n readonly data: BoundedJsonValue;\n}\n/** Third-party data is exact JSON owned by the named third-party schema. */\nexport interface ThirdPartyCriterion {\n readonly name: string;\n readonly schemaId: string;\n readonly data: BoundedJsonValue;\n}\n/** Raw identity envelope used by the reader's second decode phase. */\nexport type CriterionEnvelope = BuiltInCriterionEnvelope | ThirdPartyCriterion;\nexport type CriterionOuterEnvelope = CriterionEnvelope;\nexport type BuiltInCriterion = {\n readonly kind: \"builtin\";\n readonly id: \"value-match/v1\";\n readonly data: {\n readonly subject: \"explicit-value\";\n readonly matcher: {\n readonly state: \"declared\";\n readonly name: string;\n } | {\n readonly state: \"unavailable\";\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"numeric-comparison/v1\";\n readonly data: {\n readonly comparator: \"less-than\" | \"at-most\" | \"greater-than\" | \"at-least\" | \"between\";\n readonly threshold: number;\n readonly upperThreshold?: number;\n readonly unit?: import(\"../quantity.ts\").Unit;\n readonly subject: {\n readonly kind: \"explicit-value\";\n } | {\n readonly kind: \"scope-metric\";\n readonly metric: \"tokens\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly unit: \"tokens\";\n } | {\n readonly kind: \"scope-metric\";\n readonly metric: \"cost\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly unit: \"usd\";\n } | {\n readonly kind: \"collection-cardinality\";\n readonly collection: \"tool-calls\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"scope-status/v1\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly assertion: \"succeeded\" | \"no-failed-actions\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"occurrence/v1\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly occurrence: \"tool\" | \"skill\" | \"event\";\n readonly assertion: \"present\" | \"absent\" | \"count\" | \"order\";\n /** Tool assertions retain the single managed matcher identity. */\n readonly matcher?: string;\n readonly quantifier?: {\n readonly kind: \"absent\";\n } | {\n readonly kind: \"at-least\" | \"exact\";\n readonly count: number;\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"occurrence/v2\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly occurrence: \"tool\" | \"skill\" | \"event\";\n readonly assertion: \"present\" | \"absent\" | \"count\" | \"order\";\n /** Tool assertions retain the single managed matcher identity. */\n readonly matcher?: string;\n readonly quantifier?: {\n readonly kind: \"absent\";\n } | {\n readonly kind: \"at-least\" | \"less-than\" | \"at-most\" | \"greater-than\" | \"exact\";\n readonly count: number;\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"judge-measurement/v1\";\n readonly data: {\n readonly recipe: string;\n readonly scale: \"unit-interval\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"judge-measurement/v2\";\n readonly data: {\n readonly name: string;\n readonly scale: \"unit-interval\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"llm-measurement/v1\";\n readonly data: {\n readonly name: string;\n readonly scale: \"unit-interval\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"changed-paths\";\n readonly paths: readonly string[];\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"no-changes\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"file-changed\";\n readonly path: string;\n readonly status?: \"added\" | \"modified\" | \"deleted\";\n /** Persisted display identity only; evaluators retain the managed Match. */\n readonly before?: string;\n readonly after?: string;\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"file-deleted\";\n readonly path: string;\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"not-in-diff\";\n readonly pattern: string;\n readonly flags: string;\n readonly content: \"added\" | \"removed\" | \"both\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"direct-score/v1\";\n readonly data: {\n readonly source: \"author\";\n };\n};\n/** A v1 writer may only emit a known builtin or a versioned third-party schema. */\nexport type WritableCriterionEnvelope = BuiltInCriterion | ThirdPartyCriterion;\nexport type AssertionMaterial<Content> = {\n readonly kind: \"unavailable\";\n readonly reason: \"not-recorded\";\n} | {\n readonly kind: \"content\";\n readonly content: Content;\n /** How the producer encoded the logical material into the sealed content. */\n readonly encoding: \"json\" | \"utf-8\" | \"binary\";\n readonly byteLength: number;\n /** Safe retained display metadata from capture; null when none was declared. */\n readonly preview: string | null;\n};\nexport type AssertionCoverage = {\n readonly state: \"complete\";\n} | {\n readonly state: \"partial\";\n readonly reason: \"sampled\" | \"truncated\" | \"redacted\" | \"provider-limited\" | \"capacity-limited\";\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-collected\" | \"source-unavailable\" | \"producer-failed\";\n} | {\n readonly state: \"not-applicable\";\n readonly reason: \"optional-material\" | \"unsupported-subject\";\n};\nexport type AssertionLimitation = {\n readonly kind: \"redacted\";\n readonly fieldCount: number;\n} | {\n readonly kind: \"sampled\";\n readonly captured: number;\n readonly knownTotal?: number;\n} | {\n readonly kind: \"truncated\";\n readonly omittedBytes: number;\n} | {\n readonly kind: \"provider-limited\";\n} | {\n readonly kind: \"capacity-limited\";\n readonly capturedItems: number;\n readonly knownTotalItems: number;\n readonly omittedBytes: number | null;\n};\nexport type GateDisposition = \"not-gate\" | \"satisfied\" | \"failed\" | \"unavailable\" | \"not-applicable\";\nexport interface NoScoreContribution {\n readonly state: \"not-scored\";\n}\nexport interface EarnedScoreContribution {\n readonly state: \"earned\";\n readonly points: number;\n readonly earned: number;\n}\nexport interface UnavailableScoreContribution {\n readonly state: \"unavailable\";\n readonly points: number;\n readonly reason: \"source-unavailable\" | \"evaluation-errored\" | \"not-applicable\";\n}\nexport type ScoreContribution = NoScoreContribution | EarnedScoreContribution | UnavailableScoreContribution;\nexport interface AssertionCollectionReceipt {\n readonly examined: number;\n readonly matched: number;\n readonly mismatched: number;\n readonly unavailable: number;\n readonly knownTotal: number | null;\n readonly complete: boolean;\n readonly exhaustive: boolean;\n readonly decisive: boolean;\n}\nexport type { MatcherRelationStatus, MatcherSourceLocator } from \"../api.ts\";\nimport type { MatcherSourceLocator } from \"../api.ts\";\nexport type MatcherOverlayResult = \"matched\" | \"mismatched\" | \"unavailable\" | \"not-evaluated\";\nexport interface MatcherRetainedRow {\n readonly locator: MatcherSourceLocator;\n readonly result: MatcherOverlayResult;\n readonly difference?: AssertionFactValue;\n}\nexport interface MatcherQueryStep {\n readonly step: number;\n readonly summary: AssertionFactValue;\n}\nexport type MatcherSourceSnapshot = {\n readonly scope: \"turn\";\n readonly sessionId: string;\n readonly turnId: string;\n readonly scopeId: string;\n readonly throughSessionSequence: number;\n readonly source: {\n readonly family: \"niceeval.agent-turns\";\n readonly schemaVersion: number;\n };\n readonly collectionAtCut: \"complete\" | \"partial\" | \"unavailable\";\n} | {\n readonly scope: \"session\";\n readonly sessionId: string;\n readonly scopeId: string;\n readonly throughSessionSequence: number;\n readonly source: {\n readonly family: \"niceeval.agent-turns\";\n readonly schemaVersion: number;\n };\n readonly collectionAtCut: \"complete\" | \"partial\" | \"unavailable\";\n} | {\n readonly scope: \"attempt\";\n readonly scopeId: string;\n readonly sessions: readonly {\n readonly sessionId: string;\n readonly throughSessionSequence: number;\n }[];\n readonly source: {\n readonly family: \"niceeval.agent-turns\";\n readonly schemaVersion: number;\n };\n readonly collectionAtCut: \"complete\" | \"partial\" | \"unavailable\";\n};\nexport interface OrderStepReceipt {\n readonly step: number;\n readonly comparisons: number;\n readonly matched: number;\n readonly mismatched: number;\n readonly unavailable: number;\n}\nexport interface OrderEvaluationReceipt {\n readonly sourceRows: number;\n readonly comparisons: number;\n readonly unavailableComparisons: number;\n readonly definitePrefixLength: number;\n readonly possiblePrefixLength: number;\n readonly stepReceipts: readonly OrderStepReceipt[];\n readonly complete: boolean;\n readonly exhaustive: boolean;\n readonly decisive: boolean;\n}\nexport interface MatcherOrderPathNode {\n readonly step: number;\n readonly locator: MatcherSourceLocator;\n readonly sessionId: string;\n readonly sessionSequence: number;\n readonly result: \"matched\" | \"unavailable\";\n}\nexport interface MatcherFailureFrontier {\n readonly longestDefinitePrefix: readonly MatcherOrderPathNode[];\n readonly longestPossiblePrefix: readonly MatcherOrderPathNode[];\n readonly firstBlockingStep: number;\n readonly suffixChecked: AssertionCollectionReceipt;\n readonly representatives: readonly MatcherRetainedRow[];\n}\nexport type MatcherQueryArtifact = {\n readonly kind: \"collection-filter\";\n readonly sourceSnapshot: MatcherSourceSnapshot;\n readonly query: MatcherQueryStep;\n readonly receipt: AssertionCollectionReceipt;\n readonly retainedRows: readonly MatcherRetainedRow[];\n} | {\n readonly kind: \"ordered-sequence\";\n readonly sourceSnapshot: Extract<MatcherSourceSnapshot, {\n readonly scope: \"turn\" | \"session\";\n }>;\n /** The current decoder proves this has between two and 64 entries. */\n readonly querySteps: readonly MatcherQueryStep[];\n readonly receipt: OrderEvaluationReceipt;\n readonly result: {\n readonly state: \"matched\";\n readonly witnessPath: readonly MatcherOrderPathNode[];\n } | {\n readonly state: \"mismatched\";\n readonly failureFrontier: MatcherFailureFrontier;\n } | {\n readonly state: \"unavailable\";\n readonly reason: string;\n };\n readonly retainedRows: readonly MatcherRetainedRow[];\n};\nexport type SealedAssertionResult = {\n readonly state: \"matched\";\n readonly gate: \"not-gate\" | \"satisfied\";\n readonly score: NoScoreContribution | EarnedScoreContribution;\n /** Bounded evaluator diagnostics, including ToolMatch evidence paths. */\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"mismatched\";\n readonly reason: \"condition-not-met\";\n readonly gate: \"not-gate\" | \"failed\";\n readonly score: NoScoreContribution | EarnedScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\";\n readonly gate: \"not-gate\" | \"unavailable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"errored\";\n readonly reason: \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\";\n readonly gate: \"not-gate\" | \"unavailable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"not-applicable\";\n readonly reason: \"coverage-not-applicable\";\n readonly gate: \"not-gate\" | \"not-applicable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n};\nexport type AssertionCriterionRecord = {\n readonly state: \"available\";\n readonly value: WritableCriterionEnvelope;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\nexport type AssertionCriterionRecordOuter = {\n readonly state: \"available\";\n readonly value: BoundedJsonObject;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\nexport interface AssertionMaterials<Content> {\n readonly source: AssertionMaterial<Content>;\n readonly evidence: readonly AssertionMaterial<Content>[];\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n}\nexport type AssertionEvaluation = {\n readonly kind: \"ordinary\";\n readonly observed: AssertionFactValue;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly kind: \"matcher-current\";\n readonly observed: AssertionFactValue;\n readonly artifact: MatcherQueryArtifact;\n /** Current matcher receipts live only inside `artifact`. */\n readonly receipt?: never;\n} | {\n readonly kind: \"matcher-legacy\";\n readonly observed: AssertionFactValue;\n readonly reason: \"historical-not-recorded\";\n readonly legacyDiagnostic?: AssertionFactValue;\n readonly receipt?: never;\n};\nexport interface AssertionDecision {\n readonly result: \"matched\" | \"mismatched\" | \"unavailable\" | \"errored\" | \"not-applicable\";\n readonly reason: \"condition-not-met\" | \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\" | \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\" | \"coverage-not-applicable\" | null;\n readonly gate: GateDisposition;\n}\nexport function sealedAssertionResult(entry: Pick<AssertionEntry<unknown>, \"decision\" | \"contribution\" | \"evaluation\">): SealedAssertionResult {\n const evaluationReceipt = entry.evaluation.kind === \"ordinary\"\n ? entry.evaluation.receipt\n : entry.evaluation.kind === \"matcher-current\" && entry.evaluation.artifact.kind === \"collection-filter\"\n ? entry.evaluation.artifact.receipt\n : undefined;\n const receipt = evaluationReceipt === undefined ? {} : { receipt: evaluationReceipt };\n switch (entry.decision.result) {\n case \"matched\":\n return Object.freeze({ state: \"matched\", gate: entry.decision.gate as \"not-gate\" | \"satisfied\", score: entry.contribution as NoScoreContribution | EarnedScoreContribution, ...receipt });\n case \"mismatched\":\n return Object.freeze({ state: \"mismatched\", reason: \"condition-not-met\", gate: entry.decision.gate as \"not-gate\" | \"failed\", score: entry.contribution as NoScoreContribution | EarnedScoreContribution, ...receipt });\n case \"unavailable\":\n return Object.freeze({ state: \"unavailable\", reason: entry.decision.reason as \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\", gate: entry.decision.gate as \"not-gate\" | \"unavailable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n case \"errored\":\n return Object.freeze({ state: \"errored\", reason: entry.decision.reason as \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\", gate: entry.decision.gate as \"not-gate\" | \"unavailable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n case \"not-applicable\":\n return Object.freeze({ state: \"not-applicable\", reason: \"coverage-not-applicable\", gate: entry.decision.gate as \"not-gate\" | \"not-applicable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n }\n}\nexport type ExplanationRetention = {\n readonly state: \"retained\";\n readonly value: AssertionFactValue;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\n/** The sole current semantic entry. Each fact has exactly one durable owner. */\nexport interface AssertionEntry<Content> {\n readonly entryId: AssertionEntryId;\n readonly display: AssertionDisplay;\n readonly criterion: AssertionCriterionRecord;\n readonly materials: AssertionMaterials<Content>;\n readonly evaluation: AssertionEvaluation;\n readonly decision: AssertionDecision;\n readonly policy: AssertionDecisionPolicy;\n readonly contribution: ScoreContribution;\n readonly explanationRetention: ExplanationRetention;\n}\n/**\n * Reader framing intentionally leaves `criterion` as bounded JSON. This\n * lets a bad plugin or future criterion affect its entry only after every\n * other entry boundary has already been verified.\n */\nexport interface AssertionEntryOuter<Content> {\n readonly entryId: AssertionEntryId;\n readonly display: AssertionDisplay;\n readonly criterion: AssertionCriterionRecordOuter;\n readonly materials: AssertionMaterials<Content>;\n readonly evaluation: AssertionEvaluation;\n readonly decision: AssertionDecision;\n readonly policy: AssertionDecisionPolicy;\n readonly contribution: ScoreContribution;\n readonly explanationRetention: ExplanationRetention;\n}\nexport interface AssertionsDocument<Content> {\n readonly entries: readonly AssertionEntry<Content>[];\n}\nexport interface AssertionsDocumentOuter<Content> {\n readonly entries: readonly AssertionEntryOuter<Content>[];\n}\nexport type AssertionEntryRead<Content> = {\n readonly state: \"available\";\n readonly entry: AssertionEntry<Content>;\n} | {\n readonly state: \"unsupported\";\n readonly entry: AssertionEntryOuter<Content>;\n readonly reason: \"builtin-unknown\" | \"third-party-schema-unavailable\";\n} | {\n readonly state: \"invalid\";\n readonly entry: AssertionEntryOuter<Content>;\n readonly reason: \"criterion-envelope-invalid\" | \"criterion-data-invalid\";\n};\nexport interface AssertionsProjection<Content> {\n readonly entries: readonly AssertionEntryRead<Content>[];\n}\n"]}