niceeval 0.13.3 → 0.13.4-canary.39

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 (487) hide show
  1. package/INDEX.md +5 -5
  2. package/dist/agents/index.cjs +2 -2
  3. package/dist/agents/index.cjs.map +1 -1
  4. package/dist/agents/project.json +6 -0
  5. package/dist/agents/streaming.cjs.map +1 -1
  6. package/dist/agents/types.cjs.map +1 -1
  7. package/dist/agents/types.d.cts +1 -1
  8. package/dist/agents/types.d.mts +1 -1
  9. package/dist/agents/types.d.ts +1 -1
  10. package/dist/analysis/bindings.d.cts +8 -8
  11. package/dist/analysis/bindings.d.mts +8 -8
  12. package/dist/analysis/bindings.d.ts +8 -8
  13. package/dist/analysis/contracts.cjs.map +1 -1
  14. package/dist/analysis/contracts.d.cts +8 -19
  15. package/dist/analysis/contracts.d.mts +8 -19
  16. package/dist/analysis/contracts.d.ts +8 -19
  17. package/dist/analysis/experiment-groups.cjs +7 -14
  18. package/dist/analysis/experiment-groups.cjs.map +1 -1
  19. package/dist/analysis/index.cjs.map +1 -1
  20. package/dist/analysis/index.d.cts +1 -1
  21. package/dist/analysis/index.d.mts +1 -1
  22. package/dist/analysis/index.d.ts +1 -1
  23. package/dist/cli/application.cjs +4 -13
  24. package/dist/cli/application.cjs.map +1 -1
  25. package/dist/cli/application.d.cts +62 -59
  26. package/dist/cli/application.d.mts +62 -59
  27. package/dist/cli/application.d.ts +62 -59
  28. package/dist/cli/application.js +6 -12
  29. package/dist/cli/bootstrap.cjs +28 -2
  30. package/dist/cli/bootstrap.cjs.map +1 -1
  31. package/dist/cli/contribution.cjs +185 -0
  32. package/dist/cli/contribution.cjs.map +1 -0
  33. package/dist/cli/contribution.d.cts +55 -0
  34. package/dist/cli/contribution.d.mts +55 -0
  35. package/dist/cli/contribution.d.ts +55 -0
  36. package/dist/cli/contribution.js +20 -0
  37. package/dist/cli/contribution.js.map +1 -0
  38. package/dist/cli/node-application.cjs +119 -87
  39. package/dist/cli/node-application.cjs.map +1 -1
  40. package/dist/cli/node-application.d.cts +2 -8
  41. package/dist/cli/node-application.d.mts +2 -8
  42. package/dist/cli/node-application.d.ts +2 -8
  43. package/dist/cli/node-application.js +12 -22
  44. package/dist/cli/program.cjs +87 -2756
  45. package/dist/cli/program.cjs.map +1 -1
  46. package/dist/cli/program.d.cts +11 -332
  47. package/dist/cli/program.d.mts +11 -332
  48. package/dist/cli/program.d.ts +11 -332
  49. package/dist/cli/program.js +4 -28
  50. package/dist/cli.cjs +0 -3
  51. package/dist/cli.cjs.map +1 -1
  52. package/dist/cli.d.cts +0 -1
  53. package/dist/cli.d.mts +0 -1
  54. package/dist/cli.d.ts +0 -1
  55. package/dist/cli.js +6 -14
  56. package/dist/define.cjs +1 -1
  57. package/dist/define.cjs.map +1 -1
  58. package/dist/docker/cache-administration.cjs +8 -0
  59. package/dist/docker/cache-administration.cjs.map +1 -0
  60. package/dist/docker/cache-administration.d.cts +33 -0
  61. package/dist/docker/cache-administration.d.mts +33 -0
  62. package/dist/docker/cache-administration.d.ts +33 -0
  63. package/dist/docker/cache-administration.js +6 -0
  64. package/dist/docker/cache-administration.js.map +1 -0
  65. package/dist/docker/cache-live.cjs +27 -0
  66. package/dist/docker/cache-live.cjs.map +1 -0
  67. package/dist/docker/cache-live.d.cts +3 -0
  68. package/dist/docker/cache-live.d.mts +3 -0
  69. package/dist/docker/cache-live.d.ts +3 -0
  70. package/dist/docker/cache-live.js +6 -0
  71. package/dist/docker/cache-live.js.map +1 -0
  72. package/dist/docker/cli/contribution.cjs +223 -0
  73. package/dist/docker/cli/contribution.cjs.map +1 -0
  74. package/dist/docker/cli/contribution.d.cts +48 -0
  75. package/dist/docker/cli/contribution.d.mts +48 -0
  76. package/dist/docker/cli/contribution.d.ts +48 -0
  77. package/dist/docker/cli/contribution.js +8 -0
  78. package/dist/docker/cli/contribution.js.map +1 -0
  79. package/dist/eval/cli/contribution.cjs +62 -0
  80. package/dist/eval/cli/contribution.cjs.map +1 -0
  81. package/dist/eval/cli/contribution.d.cts +21 -0
  82. package/dist/eval/cli/contribution.d.mts +21 -0
  83. package/dist/eval/cli/contribution.d.ts +21 -0
  84. package/dist/eval/cli/contribution.js +8 -0
  85. package/dist/eval/cli/contribution.js.map +1 -0
  86. package/dist/eval/host/index.cjs +23 -0
  87. package/dist/eval/host/index.cjs.map +1 -0
  88. package/dist/eval/host/index.d.cts +27 -0
  89. package/dist/eval/host/index.d.mts +27 -0
  90. package/dist/eval/host/index.d.ts +27 -0
  91. package/dist/eval/host/index.js +8 -0
  92. package/dist/eval/host/index.js.map +1 -0
  93. package/dist/eval/host/index.mjs +8 -0
  94. package/dist/eval/host/index.mjs.map +1 -0
  95. package/dist/experiment/host/cli/contribution.cjs +835 -0
  96. package/dist/experiment/host/cli/contribution.cjs.map +1 -0
  97. package/dist/experiment/host/cli/contribution.d.cts +329 -0
  98. package/dist/experiment/host/cli/contribution.d.mts +329 -0
  99. package/dist/experiment/host/cli/contribution.d.ts +329 -0
  100. package/dist/experiment/host/cli/contribution.js +22 -0
  101. package/dist/experiment/host/cli/contribution.js.map +1 -0
  102. package/dist/experiment/host/cli/index.cjs +9 -0
  103. package/dist/experiment/host/cli/index.cjs.map +1 -0
  104. package/dist/experiment/host/cli/index.d.cts +2 -0
  105. package/dist/experiment/host/cli/index.d.mts +2 -0
  106. package/dist/experiment/host/cli/index.d.ts +2 -0
  107. package/dist/experiment/host/cli/index.js +10 -0
  108. package/dist/experiment/host/cli/index.js.map +1 -0
  109. package/dist/experiment/host/cli/terminal.cjs +15 -0
  110. package/dist/experiment/host/cli/terminal.cjs.map +1 -0
  111. package/dist/experiment/host/cli/terminal.d.cts +14 -0
  112. package/dist/experiment/host/cli/terminal.d.mts +14 -0
  113. package/dist/experiment/host/cli/terminal.d.ts +14 -0
  114. package/dist/experiment/host/cli/terminal.js +8 -0
  115. package/dist/experiment/host/cli/terminal.js.map +1 -0
  116. package/dist/experiment/host/index.cjs +35 -58
  117. package/dist/experiment/host/index.cjs.map +1 -1
  118. package/dist/experiment/host/index.d.cts +5 -79
  119. package/dist/experiment/host/index.d.mts +5 -79
  120. package/dist/experiment/host/index.d.ts +5 -79
  121. package/dist/experiment/host/index.js +4 -2
  122. package/dist/experiment/host/index.mjs +4 -2
  123. package/dist/experiment/host/operations.cjs +678 -0
  124. package/dist/experiment/host/operations.cjs.map +1 -0
  125. package/dist/experiment/host/operations.d.cts +19 -0
  126. package/dist/experiment/host/operations.d.mts +19 -0
  127. package/dist/experiment/host/operations.d.ts +19 -0
  128. package/dist/experiment/host/operations.js +24 -0
  129. package/dist/experiment/host/operations.js.map +1 -0
  130. package/dist/experiment/host/presentation.cjs +81 -0
  131. package/dist/experiment/host/presentation.cjs.map +1 -0
  132. package/dist/experiment/host/presentation.d.cts +9 -0
  133. package/dist/experiment/host/presentation.d.mts +9 -0
  134. package/dist/experiment/host/presentation.d.ts +9 -0
  135. package/dist/experiment/host/presentation.js +8 -0
  136. package/dist/experiment/host/presentation.js.map +1 -0
  137. package/dist/experiment/host/teardown.cjs +394 -0
  138. package/dist/experiment/host/teardown.cjs.map +1 -0
  139. package/dist/experiment/host/teardown.d.cts +5 -0
  140. package/dist/experiment/host/teardown.d.mts +5 -0
  141. package/dist/experiment/host/teardown.d.ts +5 -0
  142. package/dist/experiment/host/teardown.js +8 -0
  143. package/dist/experiment/host/teardown.js.map +1 -0
  144. package/dist/experiment/host/types.cjs +9 -0
  145. package/dist/experiment/host/types.cjs.map +1 -0
  146. package/dist/experiment/host/types.d.cts +423 -0
  147. package/dist/experiment/host/types.d.mts +423 -0
  148. package/dist/experiment/host/types.d.ts +423 -0
  149. package/dist/experiment/host/types.js +6 -0
  150. package/dist/experiment/host/types.js.map +1 -0
  151. package/dist/i18n/en.cjs +8 -50
  152. package/dist/i18n/en.cjs.map +1 -1
  153. package/dist/i18n/en.d.cts +2 -6
  154. package/dist/i18n/en.d.mts +2 -6
  155. package/dist/i18n/en.d.ts +2 -6
  156. package/dist/o11y/project.json +6 -0
  157. package/dist/project/cli/contribution.cjs +66 -0
  158. package/dist/project/cli/contribution.cjs.map +1 -0
  159. package/dist/project/cli/contribution.d.cts +17 -0
  160. package/dist/project/cli/contribution.d.mts +17 -0
  161. package/dist/project/cli/contribution.d.ts +17 -0
  162. package/dist/project/cli/contribution.js +8 -0
  163. package/dist/project/cli/contribution.js.map +1 -0
  164. package/dist/project/cli/index.cjs +7 -0
  165. package/dist/project/cli/index.cjs.map +1 -0
  166. package/dist/project/cli/index.d.cts +1 -0
  167. package/dist/project/cli/index.d.mts +1 -0
  168. package/dist/project/cli/index.d.ts +1 -0
  169. package/dist/project/cli/index.js +8 -0
  170. package/dist/project/cli/index.js.map +1 -0
  171. package/dist/project/host/index.cjs +11 -0
  172. package/dist/project/host/index.cjs.map +1 -0
  173. package/dist/project/host/index.d.cts +4 -0
  174. package/dist/project/host/index.d.mts +4 -0
  175. package/dist/project/host/index.d.ts +4 -0
  176. package/dist/project/host/index.js +14 -0
  177. package/dist/project/host/index.js.map +1 -0
  178. package/dist/project/host/index.mjs +14 -0
  179. package/dist/project/host/index.mjs.map +1 -0
  180. package/dist/project/host.cjs +59 -0
  181. package/dist/project/host.cjs.map +1 -0
  182. package/dist/project/host.d.cts +17 -0
  183. package/dist/project/host.d.mts +17 -0
  184. package/dist/project/host.d.ts +17 -0
  185. package/dist/project/host.js +6 -0
  186. package/dist/project/host.js.map +1 -0
  187. package/dist/project/index.cjs +11 -0
  188. package/dist/project/index.cjs.map +1 -0
  189. package/dist/project/index.d.cts +4 -0
  190. package/dist/project/index.d.mts +4 -0
  191. package/dist/project/index.d.ts +4 -0
  192. package/dist/project/index.js +14 -0
  193. package/dist/project/index.js.map +1 -0
  194. package/dist/project/node.cjs +91 -0
  195. package/dist/project/node.cjs.map +1 -0
  196. package/dist/project/node.d.cts +6 -0
  197. package/dist/project/node.d.mts +6 -0
  198. package/dist/project/node.d.ts +6 -0
  199. package/dist/project/node.js +12 -0
  200. package/dist/project/node.js.map +1 -0
  201. package/dist/project/services.cjs +17 -0
  202. package/dist/project/services.cjs.map +1 -0
  203. package/dist/project/services.d.cts +47 -0
  204. package/dist/project/services.d.mts +47 -0
  205. package/dist/project/services.d.ts +47 -0
  206. package/dist/project/services.js +12 -0
  207. package/dist/project/services.js.map +1 -0
  208. package/dist/project/templates.cjs +28 -0
  209. package/dist/project/templates.cjs.map +1 -0
  210. package/dist/project/templates.d.cts +4 -0
  211. package/dist/project/templates.d.mts +4 -0
  212. package/dist/project/templates.d.ts +4 -0
  213. package/dist/project/templates.js +12 -0
  214. package/dist/project/templates.js.map +1 -0
  215. package/dist/project.json +6 -0
  216. package/dist/record/family/catalog.d.cts +10 -10
  217. package/dist/record/family/catalog.d.mts +10 -10
  218. package/dist/record/family/catalog.d.ts +10 -10
  219. package/dist/record/family/file-changes.d.cts +8 -8
  220. package/dist/record/family/file-changes.d.mts +8 -8
  221. package/dist/record/family/file-changes.d.ts +8 -8
  222. package/dist/record/host/cli/contribution.cjs +206 -0
  223. package/dist/record/host/cli/contribution.cjs.map +1 -0
  224. package/dist/record/host/cli/contribution.d.cts +32 -0
  225. package/dist/record/host/cli/contribution.d.mts +32 -0
  226. package/dist/record/host/cli/contribution.d.ts +32 -0
  227. package/dist/record/host/cli/contribution.js +10 -0
  228. package/dist/record/host/cli/contribution.js.map +1 -0
  229. package/dist/record/host/cli/index.cjs +8 -0
  230. package/dist/record/host/cli/index.cjs.map +1 -0
  231. package/dist/record/host/cli/index.d.cts +1 -0
  232. package/dist/record/host/cli/index.d.mts +1 -0
  233. package/dist/record/host/cli/index.d.ts +1 -0
  234. package/dist/record/host/cli/index.js +10 -0
  235. package/dist/record/host/cli/index.js.map +1 -0
  236. package/dist/record/host/cli/presentation.cjs +122 -0
  237. package/dist/record/host/cli/presentation.cjs.map +1 -0
  238. package/dist/record/host/cli/presentation.d.cts +7 -0
  239. package/dist/record/host/cli/presentation.d.mts +7 -0
  240. package/dist/record/host/cli/presentation.d.ts +7 -0
  241. package/dist/record/host/cli/presentation.js +12 -0
  242. package/dist/record/host/cli/presentation.js.map +1 -0
  243. package/dist/record/host/index.cjs.map +1 -1
  244. package/dist/record/host/index.d.cts +1 -1
  245. package/dist/record/host/index.d.mts +1 -1
  246. package/dist/record/host/index.d.ts +1 -1
  247. package/dist/record/host/runtime.cjs +184 -1
  248. package/dist/record/host/runtime.cjs.map +1 -1
  249. package/dist/record/host/types.cjs.map +1 -1
  250. package/dist/record/host/types.d.cts +120 -0
  251. package/dist/record/host/types.d.mts +120 -0
  252. package/dist/record/host/types.d.ts +120 -0
  253. package/dist/record/project.json +6 -0
  254. package/dist/report/assets/styles.css +80 -0
  255. package/dist/report/cli/contribution.cjs +325 -0
  256. package/dist/report/cli/contribution.cjs.map +1 -0
  257. package/dist/report/cli/contribution.d.cts +143 -0
  258. package/dist/report/cli/contribution.d.mts +143 -0
  259. package/dist/report/cli/contribution.d.ts +143 -0
  260. package/dist/report/cli/contribution.js +12 -0
  261. package/dist/report/cli/contribution.js.map +1 -0
  262. package/dist/report/client-dist/app.js +9 -9
  263. package/dist/report/components/attempt-detail/content.cjs +1 -1
  264. package/dist/report/components/attempt-detail/content.cjs.map +1 -1
  265. package/dist/report/components/entity-lists/compute.cjs +5 -0
  266. package/dist/report/components/entity-lists/compute.cjs.map +1 -1
  267. package/dist/report/components/entity-lists/compute.d.cts +2 -0
  268. package/dist/report/components/entity-lists/compute.d.mts +2 -0
  269. package/dist/report/components/entity-lists/compute.d.ts +2 -0
  270. package/dist/report/components/entity-lists/content.cjs +35 -12
  271. package/dist/report/components/entity-lists/content.cjs.map +1 -1
  272. package/dist/report/components/entity-lists/index.cjs +0 -3
  273. package/dist/report/components/entity-lists/index.cjs.map +1 -1
  274. package/dist/report/components/summaries/index.cjs +2 -4
  275. package/dist/report/components/summaries/index.cjs.map +1 -1
  276. package/dist/report/definition/cell.cjs +7 -2
  277. package/dist/report/definition/cell.cjs.map +1 -1
  278. package/dist/report/definition/cell.d.cts +2 -0
  279. package/dist/report/definition/cell.d.mts +2 -0
  280. package/dist/report/definition/cell.d.ts +2 -0
  281. package/dist/report/definition/primitives/assertion-evidence.cjs +190 -4
  282. package/dist/report/definition/primitives/assertion-evidence.cjs.map +1 -1
  283. package/dist/report/definition/primitives/assertion-evidence.d.cts +4 -0
  284. package/dist/report/definition/primitives/assertion-evidence.d.mts +4 -0
  285. package/dist/report/definition/primitives/assertion-evidence.d.ts +4 -0
  286. package/dist/report/execution/machine.cjs +2 -3
  287. package/dist/report/execution/machine.cjs.map +1 -1
  288. package/dist/report/execution/machine.d.cts +11 -8
  289. package/dist/report/execution/machine.d.mts +11 -8
  290. package/dist/report/execution/machine.d.ts +11 -8
  291. package/dist/report/host/from-record.cjs +13 -8
  292. package/dist/report/host/from-record.cjs.map +1 -1
  293. package/dist/report/host/index.cjs +5 -1
  294. package/dist/report/host/index.cjs.map +1 -1
  295. package/dist/report/host/index.d.cts +1 -0
  296. package/dist/report/host/index.d.mts +1 -0
  297. package/dist/report/host/index.d.ts +1 -0
  298. package/dist/report/host/index.js +8 -2
  299. package/dist/report/host/index.mjs +8 -2
  300. package/dist/report/host/machine.cjs +23 -22
  301. package/dist/report/host/machine.cjs.map +1 -1
  302. package/dist/report/host/machine.d.cts +1 -1
  303. package/dist/report/host/machine.d.mts +1 -1
  304. package/dist/report/host/machine.d.ts +1 -1
  305. package/dist/report/host/node/loader.cjs +4 -2
  306. package/dist/report/host/node/loader.cjs.map +1 -1
  307. package/dist/report/host/node/loader.d.cts +3 -1
  308. package/dist/report/host/node/loader.d.mts +3 -1
  309. package/dist/report/host/node/loader.d.ts +3 -1
  310. package/dist/report/host/node.cjs +44 -9
  311. package/dist/report/host/node.cjs.map +1 -1
  312. package/dist/report/host/node.d.cts +13 -3
  313. package/dist/report/host/node.d.mts +13 -3
  314. package/dist/report/host/node.d.ts +13 -3
  315. package/dist/report/host/node.js +44 -32
  316. package/dist/report/host/operations.cjs +14 -0
  317. package/dist/report/host/operations.cjs.map +1 -0
  318. package/dist/report/host/operations.d.cts +39 -0
  319. package/dist/report/host/operations.d.mts +39 -0
  320. package/dist/report/host/operations.d.ts +39 -0
  321. package/dist/report/host/operations.js +10 -0
  322. package/dist/report/host/operations.js.map +1 -0
  323. package/dist/report/model/chart/plot.cjs +1 -1
  324. package/dist/report/model/chart/plot.cjs.map +1 -1
  325. package/dist/report/model/locale.cjs +4 -0
  326. package/dist/report/model/locale.cjs.map +1 -1
  327. package/dist/report/model/locale.d.cts +3 -1
  328. package/dist/report/model/locale.d.mts +3 -1
  329. package/dist/report/model/locale.d.ts +3 -1
  330. package/dist/report/react/styles.css +80 -0
  331. package/dist/runner/build-preparation.cjs +5 -5
  332. package/dist/runner/build-preparation.cjs.map +1 -1
  333. package/dist/runner/build-preparation.d.cts +2 -3
  334. package/dist/runner/build-preparation.d.mts +2 -3
  335. package/dist/runner/build-preparation.d.ts +2 -3
  336. package/dist/runner/feedback/coordinator.cjs +18 -15
  337. package/dist/runner/feedback/coordinator.cjs.map +1 -1
  338. package/dist/runner/feedback/coordinator.d.cts +6 -0
  339. package/dist/runner/feedback/coordinator.d.mts +6 -0
  340. package/dist/runner/feedback/coordinator.d.ts +6 -0
  341. package/dist/runner/ledger.cjs +3 -13
  342. package/dist/runner/ledger.cjs.map +1 -1
  343. package/dist/runner/ledger.d.cts +1 -3
  344. package/dist/runner/ledger.d.mts +1 -3
  345. package/dist/runner/ledger.d.ts +1 -3
  346. package/dist/runner/run.cjs +63 -18
  347. package/dist/runner/run.cjs.map +1 -1
  348. package/dist/runner/session.cjs +10 -0
  349. package/dist/runner/session.cjs.map +1 -1
  350. package/dist/runner/session.d.cts +25 -0
  351. package/dist/runner/session.d.mts +25 -0
  352. package/dist/runner/session.d.ts +25 -0
  353. package/dist/runner/types.cjs.map +1 -1
  354. package/dist/runner/types.d.cts +1 -2
  355. package/dist/runner/types.d.mts +1 -2
  356. package/dist/runner/types.d.ts +1 -2
  357. package/dist/sandbox/build-coordinator.cjs +38 -19
  358. package/dist/sandbox/build-coordinator.cjs.map +1 -1
  359. package/dist/sandbox/build-coordinator.d.cts +47 -7
  360. package/dist/sandbox/build-coordinator.d.mts +47 -7
  361. package/dist/sandbox/build-coordinator.d.ts +47 -7
  362. package/dist/sandbox/build-coordinator.js +8 -4
  363. package/dist/sandbox/cli/contribution.cjs +128 -0
  364. package/dist/sandbox/cli/contribution.cjs.map +1 -0
  365. package/dist/sandbox/cli/contribution.d.cts +71 -0
  366. package/dist/sandbox/cli/contribution.d.mts +71 -0
  367. package/dist/sandbox/cli/contribution.d.ts +71 -0
  368. package/dist/sandbox/cli/contribution.js +8 -0
  369. package/dist/sandbox/cli/contribution.js.map +1 -0
  370. package/dist/sandbox/cli-commands.cjs +14 -21
  371. package/dist/sandbox/cli-commands.cjs.map +1 -1
  372. package/dist/sandbox/cli-commands.d.cts +12 -8
  373. package/dist/sandbox/cli-commands.d.mts +12 -8
  374. package/dist/sandbox/cli-commands.d.ts +12 -8
  375. package/dist/sandbox/compose.cjs +22 -2
  376. package/dist/sandbox/compose.cjs.map +1 -1
  377. package/dist/sandbox/compose.d.cts +1 -1
  378. package/dist/sandbox/compose.d.mts +1 -1
  379. package/dist/sandbox/compose.d.ts +1 -1
  380. package/dist/sandbox/docker-profile/cli.cjs +13 -9
  381. package/dist/sandbox/docker-profile/cli.cjs.map +1 -1
  382. package/dist/sandbox/docker-profile/cli.d.cts +2 -0
  383. package/dist/sandbox/docker-profile/cli.d.mts +2 -0
  384. package/dist/sandbox/docker-profile/cli.d.ts +2 -0
  385. package/dist/sandbox/docker-profile/runtime.cjs +68 -7
  386. package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
  387. package/dist/sandbox/docker-profile/runtime.d.cts +19 -1
  388. package/dist/sandbox/docker-profile/runtime.d.mts +19 -1
  389. package/dist/sandbox/docker-profile/runtime.d.ts +19 -1
  390. package/dist/sandbox/docker-profile/runtime.js +10 -8
  391. package/dist/sandbox/docker-profile/schema.cjs +68 -19
  392. package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
  393. package/dist/sandbox/docker-profile/schema.d.cts +23 -9
  394. package/dist/sandbox/docker-profile/schema.d.mts +23 -9
  395. package/dist/sandbox/docker-profile/schema.d.ts +23 -9
  396. package/dist/sandbox/docker-task-build-cache.cjs +532 -0
  397. package/dist/sandbox/docker-task-build-cache.cjs.map +1 -0
  398. package/dist/sandbox/docker-task-build-cache.d.cts +68 -0
  399. package/dist/sandbox/docker-task-build-cache.d.mts +68 -0
  400. package/dist/sandbox/docker-task-build-cache.d.ts +68 -0
  401. package/dist/sandbox/docker-task-build-cache.js +20 -0
  402. package/dist/sandbox/docker-task-build-cache.js.map +1 -0
  403. package/dist/sandbox/docker.cjs +50 -0
  404. package/dist/sandbox/docker.cjs.map +1 -1
  405. package/dist/sandbox/docker.d.cts +15 -0
  406. package/dist/sandbox/docker.d.mts +15 -0
  407. package/dist/sandbox/docker.d.ts +15 -0
  408. package/dist/sandbox/dockerfile-build.cjs +55 -5
  409. package/dist/sandbox/dockerfile-build.cjs.map +1 -1
  410. package/dist/sandbox/dockerfile-build.d.cts +2 -2
  411. package/dist/sandbox/dockerfile-build.d.mts +2 -2
  412. package/dist/sandbox/dockerfile-build.d.ts +2 -2
  413. package/dist/sandbox/index.cjs +5 -3
  414. package/dist/sandbox/index.cjs.map +1 -1
  415. package/dist/sandbox/index.d.cts +4 -3
  416. package/dist/sandbox/index.d.mts +4 -3
  417. package/dist/sandbox/index.d.ts +4 -3
  418. package/dist/sandbox/index.js +16 -14
  419. package/dist/sandbox/index.mjs +16 -14
  420. package/dist/sandbox/keep.cjs +1 -3
  421. package/dist/sandbox/keep.cjs.map +1 -1
  422. package/dist/sandbox/layer.cjs +70 -79
  423. package/dist/sandbox/layer.cjs.map +1 -1
  424. package/dist/sandbox/layer.d.cts +6 -12
  425. package/dist/sandbox/layer.d.mts +6 -12
  426. package/dist/sandbox/layer.d.ts +6 -12
  427. package/dist/sandbox/layer.js +16 -18
  428. package/dist/sandbox/ledger-paths.cjs +4 -18
  429. package/dist/sandbox/ledger-paths.cjs.map +1 -1
  430. package/dist/sandbox/ledger-paths.d.cts +3 -13
  431. package/dist/sandbox/ledger-paths.d.mts +3 -13
  432. package/dist/sandbox/ledger-paths.d.ts +3 -13
  433. package/dist/sandbox/ledger-paths.js +4 -8
  434. package/dist/sandbox/registry.cjs +1 -1
  435. package/dist/sandbox/registry.cjs.map +1 -1
  436. package/dist/sandbox/runtime.cjs +27 -37
  437. package/dist/sandbox/runtime.cjs.map +1 -1
  438. package/dist/sandbox/runtime.d.cts +1 -2
  439. package/dist/sandbox/runtime.d.mts +1 -2
  440. package/dist/sandbox/runtime.d.ts +1 -2
  441. package/dist/sandbox/runtime.js +6 -8
  442. package/dist/sandbox/types.cjs.map +1 -1
  443. package/dist/sandbox/types.d.cts +3 -3
  444. package/dist/sandbox/types.d.mts +3 -3
  445. package/dist/sandbox/types.d.ts +3 -3
  446. package/dist/sources/project.json +6 -0
  447. package/dist/vendor/remark/remark-gfm.cjs +72 -72
  448. package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
  449. package/dist/vendor/remark/remark-parse.cjs +54 -54
  450. package/dist/vendor/remark/remark-parse.cjs.map +1 -1
  451. package/dist/vendor/remark/remark.cjs +125 -125
  452. package/dist/vendor/remark/remark.cjs.map +2 -2
  453. package/docs-site/zh/README.md +1 -1
  454. package/docs-site/zh/explanation/assert.mdx +4 -0
  455. package/docs-site/zh/explanation/judge.mdx +40 -9
  456. package/docs-site/zh/reference/cli.mdx +67 -43
  457. package/docs-site/zh/reference/define-agent.mdx +2 -2
  458. package/docs-site/zh/reference/report-components.mdx +4 -3
  459. package/docs-site/zh/troubleshooting/debug-sandbox.mdx +6 -0
  460. package/docs-site/zh/troubleshooting/debugging.mdx +28 -1
  461. package/docs-site/zh/tutorials/agent-feedback-loop.mdx +4 -2
  462. package/docs-site/zh/tutorials/concurrency.mdx +2 -2
  463. package/docs-site/zh/tutorials/custom-reports.mdx +175 -9
  464. package/docs-site/zh/tutorials/docker-in-docker.mdx +52 -7
  465. package/docs-site/zh/tutorials/eval-groups.mdx +1 -2
  466. package/docs-site/zh/tutorials/evaluation-kinds.mdx +39 -6
  467. package/docs-site/zh/tutorials/nixos-managed-dind.mdx +14 -5
  468. package/docs-site/zh/tutorials/sandbox-providers.mdx +1 -28
  469. package/docs-site/zh/tutorials/sandbox-reuse.mdx +1 -1
  470. package/docs-site/zh/tutorials/viewing-results.mdx +2 -0
  471. package/package.json +24 -19
  472. package/README.md +0 -176
  473. package/README.zh.md +0 -176
  474. package/dist/cli/record.cjs +0 -246
  475. package/dist/cli/record.cjs.map +0 -1
  476. package/dist/cli/record.d.cts +0 -40
  477. package/dist/cli/record.d.mts +0 -40
  478. package/dist/cli/record.d.ts +0 -40
  479. package/dist/cli/record.js +0 -10
  480. package/dist/cli/record.js.map +0 -1
  481. package/dist/sandbox/local.cjs +0 -361
  482. package/dist/sandbox/local.cjs.map +0 -1
  483. package/dist/sandbox/local.d.cts +0 -80
  484. package/dist/sandbox/local.d.mts +0 -80
  485. package/dist/sandbox/local.d.ts +0 -80
  486. package/dist/sandbox/local.js +0 -6
  487. package/dist/sandbox/local.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"machine.js","sourceRoot":"","sources":["machine.ts"],"names":[],"mappings":";;;AAgNA,wDAqCC;AAED,wDAEC;AAED,0DA2BC;AAuID,wEAYC;AAED,gEAMC;AAED,wEAWC;AAED,gEAOC;AAKD,wDAwBC;AAED,kDA4BC;AAMD,sEA4CC;AAED,oDAEC;AAED,4CAEC;AAKD,0DAEC;AAnkBD,mCAAgC;AAGhC,oDAAqF;AAErF,kEAA8E;AAC9E,gDAAsD;AAGtD,4EAA4E;AAC/D,QAAA,oBAAoB,GAAG,eAAe,CAAC;AACvC,QAAA,8BAA8B,GAAG,qCAAqC,CAAC;AACvE,QAAA,yBAAyB,GAAG,gCAAgC,CAAC;AA8L1E;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,KAGtC;IACG,MAAM,cAAc,GA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C,KAAwC,EAAE,IAAuB,EAAE,KAAa;IACvG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC;QAC3B,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,2BAA2B,CAAC,CAAC;AACjE,CAAC;AACD,SAAS,qBAAqB,CAAC,KAAc;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,8BAA8B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACnF,CAAC;AACD,SAAS,qBAAqB,CAAC,KAAc,EAAE,KAAa;IACxD,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,6BAA6B,CAAC,CAAC;IAC/D,OAAO,KAAK,CAAC;AACjB,CAAC;AACD,SAAS,aAAa,CAAC,KAAc,EAAE,KAAa;IAChD,IAAI,OAAO,KAAK,KAAK,QAAQ;QACzB,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,mBAAmB,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC;AACjB,CAAC;AACD,SAAS,gBAAgB,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACzD,CAAC;AACD,SAAS,qBAAqB,CAAC,KAAc;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AACjF,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport type { JsonValue, Sample, } from \"../../analysis/contracts.ts\";\nimport { isCostProjectionValue, type PricingProfile, } from \"../../analysis/cost.ts\";\nimport type { LocalizedText } from \"../../shared/types.ts\";\nimport { compareUtf8, type ResolvedPage, } from \"../runtime/resolved-page.ts\";\nimport { resolvedPageText } from \"../runtime/text.ts\";\n/** Content-addressed identities are opaque, printable strings at this boundary. */\nexport type ContentAddress = string;\n/** The exact regenerable machine formats in docs/feature/reports/cli.md. */\nexport const BUILT_IN_SHOW_FORMAT = \"niceeval.show\";\nexport const CUSTOM_TARGET_EXECUTION_FORMAT = \"niceeval.report-target-execution/v1\";\nexport const REPORT_PROJECTIONS_FORMAT = \"niceeval.report-projections/v1\";\nexport type BuiltInReportToken = string;\nexport type ShowSelection = {\n readonly kind: \"project-current\";\n readonly sampleIdentity: ContentAddress;\n readonly experimentIds: readonly string[];\n} | {\n readonly kind: \"explicit-runs\";\n readonly sampleIdentity: ContentAddress;\n readonly runIds: readonly string[];\n} | {\n readonly kind: \"attempt-locator\";\n readonly sampleIdentity: ContentAddress;\n readonly locator: string;\n};\n/**\n * Host-owned problems expose canonical ordering inputs. Their exact detailed\n * shape remains Host-owned; no callback, Error, Cause, or reader is allowed.\n */\nexport interface ReportProblem {\n readonly code: string;\n readonly path: readonly string[];\n readonly refs: readonly string[];\n readonly summary?: string;\n}\n/**\n * Built-ins may emit only their declared domain families. This is intentionally\n * not a generic component/HTML/text reverse-engineering format.\n */\nexport type BuiltInShowData = {\n readonly kind: \"groups\";\n readonly groups: JsonValue;\n} | {\n readonly kind: \"experiment-group\";\n readonly group: JsonValue;\n readonly comparison: JsonValue;\n} | {\n readonly kind: \"run-membership\";\n readonly summary: JsonValue;\n readonly members: JsonValue;\n readonly errors: JsonValue;\n readonly evidence: JsonValue;\n} | {\n readonly kind: \"attempt\";\n readonly evidence: JsonValue;\n readonly observability: JsonValue;\n readonly fileChanges: JsonValue;\n} | {\n readonly kind: \"source\";\n readonly sources: JsonValue;\n} | {\n readonly kind: \"execution\";\n readonly execution: JsonValue;\n} | {\n readonly kind: \"timing\";\n readonly timing: JsonValue;\n};\nexport interface BuiltInShowDocument {\n readonly format: typeof BUILT_IN_SHOW_FORMAT;\n readonly locale: \"en\";\n readonly selection: ShowSelection;\n readonly report: {\n readonly token: BuiltInReportToken;\n readonly identity: ContentAddress;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n };\n readonly data: BuiltInShowData;\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/**\n * The custom format is a single target execution manifest, never a revision.\n * It contains only the selected Page's closed English text—not a React tree,\n * HTML body, site identity, Sample capability, Record payload, or raw bytes.\n */\nexport interface CustomTargetExecutionManifest {\n readonly format: typeof CUSTOM_TARGET_EXECUTION_FORMAT;\n readonly locale: \"en\";\n readonly selection: ShowSelection;\n readonly report: {\n readonly identity: ContentAddress;\n readonly title: LocalizedText;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n readonly renderedText: string;\n };\n readonly downloads: readonly {\n readonly path: string;\n readonly mediaType: string;\n readonly bytes: number;\n }[];\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/** One captured cost projection bound to the Page execution that requested it. */\nexport interface ReportProjectionCost {\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly row: {\n readonly key: string;\n readonly dimensions: Readonly<Record<string, JsonValue>>;\n };\n readonly profileIdentity: string;\n /** Analysis-owned closed projection; Report never rebuilds it from `value`. */\n readonly projection: JsonValue;\n}\n/**\n * The top-level projections object shared verbatim by the built-in show\n * document and the custom target-execution manifest, and written as the site\n * revision's `_niceeval/data/projections.json`. `pricingProfile` is the\n * closed JSON form of the Report's PricingProfile, or null when the Report\n * declares none. `costs` is canonical: route → pageId → measureId → row.key\n * → profileIdentity. A projection may appear on distinct Pages; distinct\n * dimensions or projections at one canonical capture key are a build failure.\n */\nexport interface ReportProjections {\n readonly format: typeof REPORT_PROJECTIONS_FORMAT;\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCost[];\n}\nexport interface ReportProjectionCostInput {\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly row: {\n readonly key: string;\n readonly dimensions: Readonly<Record<string, unknown>>;\n };\n readonly profileIdentity: string;\n readonly projection: unknown;\n}\n/** A same-key, different row-content failure that a Host can surface directly. */\nexport interface ReportProjectionConflict {\n readonly code: \"report-cost-projection-conflict\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n}\n/** Capture and projection must name the same Analysis-owned PricingProfile. */\nexport interface ReportProjectionProfileIdentityMismatch {\n readonly code: \"report-cost-projection-profile-identity-mismatch\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n readonly projectionProfileIdentity: string | null;\n}\n/** A cost capture cannot exist when the Report declares no PricingProfile. */\nexport interface ReportProjectionReportPricingMissing {\n readonly code: \"report-cost-projection-report-pricing-missing\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n}\n/** Every captured cost must use the exact Profile declared by the Report. */\nexport interface ReportProjectionReportPricingMismatch {\n readonly code: \"report-cost-projection-report-pricing-mismatch\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n readonly reportPricingProfileIdentity: string;\n}\nexport type ReportProjectionBuildFailure = ReportProjectionConflict | ReportProjectionProfileIdentityMismatch | ReportProjectionReportPricingMissing | ReportProjectionReportPricingMismatch;\n/**\n * Closes, deduplicates, and canonically sorts captured projection entries.\n * Two identical entries at one canonical capture key collapse. Different\n * Page bindings deliberately do not collide; distinct dimensions at one key\n * do, because they represent distinct captured rows.\n */\nexport function buildReportProjections(input: {\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCostInput[];\n}): ReportProjections {\n const pricingProfile = input.pricingProfile === null\n ? null\n : closeJson(input.pricingProfile, new Set<object>());\n const failure = reportProjectionFailure({ pricingProfile, costs: input.costs });\n if (failure !== undefined)\n throw failure;\n const byKey = new Map<string, {\n readonly cost: ReportProjectionCost;\n readonly content: string;\n }>();\n for (const entry of input.costs) {\n const cost = closeProjectionCost(entry);\n const key = projectionCostKey(cost);\n const content = projectionCostContent(cost);\n const existing = byKey.get(key);\n if (existing === undefined) {\n byKey.set(key, Object.freeze({ cost, content }));\n continue;\n }\n if (existing.content !== content) {\n throw projectionConflict(cost);\n }\n }\n const costs = Object.freeze([...byKey.values()].map((entry) => entry.cost).sort((left, right) => compareUtf8(left.page.route, right.page.route) ||\n compareUtf8(left.page.pageId, right.page.pageId) ||\n compareUtf8(left.measureId, right.measureId) ||\n compareUtf8(left.row.key, right.row.key) ||\n compareUtf8(left.profileIdentity, right.profileIdentity)));\n return Object.freeze({\n format: REPORT_PROJECTIONS_FORMAT,\n pricingProfile,\n costs,\n });\n}\n/** The empty projections for a Page or site that captured no cost values. */\nexport function emptyReportProjections(pricingProfile: JsonValue | null): ReportProjections {\n return buildReportProjections({ pricingProfile, costs: [] });\n}\n/** Validates Report Profile binding and same-key row-content identity. */\nexport function reportProjectionFailure(input: {\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCostInput[];\n}): ReportProjectionBuildFailure | undefined {\n const reportPricingProfileIdentity = pricingProfileIdentity(input.pricingProfile);\n const byKey = new Map<string, {\n readonly content: string;\n }>();\n for (const inputEntry of input.costs) {\n const cost = closeProjectionCost(inputEntry);\n if (reportPricingProfileIdentity === null)\n return reportPricingMissing(cost);\n const profileIdentity = projectionProfileIdentity(cost.projection);\n if (profileIdentity !== cost.profileIdentity)\n return projectionProfileIdentityMismatch(cost, profileIdentity);\n if (cost.profileIdentity !== reportPricingProfileIdentity) {\n return reportPricingMismatch(cost, reportPricingProfileIdentity);\n }\n const key = projectionCostKey(cost);\n const content = projectionCostContent(cost);\n const prior = byKey.get(key);\n if (prior !== undefined && prior.content !== content) {\n return projectionConflict(cost);\n }\n byKey.set(key, Object.freeze({ content }));\n }\n return undefined;\n}\nfunction closeProjectionCost(input: ReportProjectionCostInput): ReportProjectionCost {\n const page = input.page;\n const row = input.row;\n if (!isPlainRecord(page) || !isPlainRecord(row)) {\n throw new TypeError(\"projection cost page and row must be plain data objects\");\n }\n // CostProjectionValue has one closed-domain validator in Analysis. This\n // machine boundary deliberately calls it before JSON closing rather than\n // accepting any projection-shaped payload from a capture.\n if (!isCostProjectionValue(input.projection)) {\n throw new TypeError(\"projection cost projection must be an Analysis CostProjectionValue\");\n }\n const dimensions = closeJson(row.dimensions, new Set<object>());\n if (dimensions === null || Array.isArray(dimensions) || typeof dimensions !== \"object\") {\n throw new TypeError(\"projection cost row.dimensions must be a plain data object\");\n }\n return Object.freeze({\n page: Object.freeze({\n pageId: requireNonEmptyString(page.pageId, \"projection cost page.pageId\"),\n route: requireNonEmptyString(page.route, \"projection cost page.route\"),\n }),\n measureId: requireNonEmptyString(input.measureId, \"projection cost measureId\"),\n row: Object.freeze({\n key: requireString(row.key, \"projection cost row.key\"),\n dimensions: dimensions as Readonly<Record<string, JsonValue>>,\n }),\n profileIdentity: requireNonEmptyString(input.profileIdentity, \"projection cost profileIdentity\"),\n projection: closeJson(input.projection, new Set<object>()),\n });\n}\nfunction projectionCostKey(cost: ReportProjectionCost): string {\n return writeCanonicalJson(Object.freeze([\n cost.page.route,\n cost.page.pageId,\n cost.measureId,\n cost.row.key,\n cost.profileIdentity,\n ]));\n}\n/**\n * Dimensions are retained outside the canonical capture key so they do not\n * affect sort order, but they remain part of the captured row's meaning. Two\n * entries at one key can collapse only when both dimensions and projection\n * are byte-identical canonical JSON.\n */\nfunction projectionCostContent(cost: ReportProjectionCost): string {\n return writeCanonicalJson(Object.freeze({\n dimensions: cost.row.dimensions,\n projection: cost.projection,\n }));\n}\nfunction projectionConflict(cost: ReportProjectionCost): ReportProjectionConflict {\n return Object.freeze({\n code: \"report-cost-projection-conflict\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n });\n}\nfunction projectionProfileIdentity(value: JsonValue): string | null {\n if (value === null || Array.isArray(value) || typeof value !== \"object\")\n return null;\n const profile = (value as Readonly<Record<string, JsonValue>>).profile;\n if (profile === null || Array.isArray(profile) || typeof profile !== \"object\")\n return null;\n const record = profile as Readonly<Record<string, JsonValue>>;\n return typeof record.contentIdentity === \"string\" && record.contentIdentity.length > 0\n ? record.contentIdentity\n : null;\n}\nfunction pricingProfileIdentity(value: JsonValue | null): string | null {\n if (value === null)\n return null;\n if (!isPlainRecord(value) || typeof value.contentIdentity !== \"string\" || value.contentIdentity.length === 0) {\n throw new TypeError(\"projection pricingProfile must be a closed PricingProfile JSON object\");\n }\n return value.contentIdentity;\n}\nfunction projectionProfileIdentityMismatch(cost: ReportProjectionCost, projectionProfileIdentity: string | null): ReportProjectionProfileIdentityMismatch {\n return Object.freeze({\n code: \"report-cost-projection-profile-identity-mismatch\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n projectionProfileIdentity,\n });\n}\nfunction reportPricingMissing(cost: ReportProjectionCost): ReportProjectionReportPricingMissing {\n return Object.freeze({\n code: \"report-cost-projection-report-pricing-missing\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n });\n}\nfunction reportPricingMismatch(cost: ReportProjectionCost, reportPricingProfileIdentity: string): ReportProjectionReportPricingMismatch {\n return Object.freeze({\n code: \"report-cost-projection-report-pricing-mismatch\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n reportPricingProfileIdentity,\n });\n}\nconst BUILT_IN_MACHINE_DESCRIPTOR = Symbol.for(\"niceeval.report.built-in-machine-descriptor/v2\");\nconst BUILT_IN_MACHINE_REPORT_DESCRIPTOR = Symbol.for(\"niceeval.report.built-in-machine-report-descriptor/v2\");\nconst BUILT_IN_MACHINE_DESCRIPTOR_BRAND = \"niceeval.report.built-in-machine-descriptor/v2\";\n/**\n * A descriptor intentionally contains only one versioned producer id. The\n * Symbol.for brand makes that data identity work across duplicate packages.\n */\nexport interface BuiltInMachineDescriptor {\n readonly producerId: string;\n}\nexport interface BuiltInMachineProducerInput {\n readonly sample: Sample;\n readonly selection: ShowSelection;\n readonly route: string;\n readonly pageId: string;\n}\n/** This callback is held only in a Host registry—not on a descriptor. */\nexport type BuiltInMachineProducer<Error, Requirements> = (input: BuiltInMachineProducerInput) => Effect.Effect<BuiltInShowData, Error, Requirements>;\nexport interface BuiltInMachineRegistry<Error, Requirements> {\n readonly producers: ReadonlyMap<string, BuiltInMachineProducer<Error, Requirements>>;\n}\nexport interface BuiltInMachineProducerMissing {\n readonly code: \"report-built-in-machine-producer-missing\";\n readonly producerId: string;\n}\n/** Defines a data-only descriptor. It has no executable producer field. */\nexport function defineBuiltInMachineDescriptor(producerId: string): BuiltInMachineDescriptor {\n if (!isVersionedProducerId(producerId)) {\n throw new TypeError(\"a built-in machine producer id must end in @v<positive integer>\");\n }\n const descriptor: BuiltInMachineDescriptor = { producerId };\n Object.defineProperty(descriptor, BUILT_IN_MACHINE_DESCRIPTOR, {\n value: BUILT_IN_MACHINE_DESCRIPTOR_BRAND,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return Object.freeze(descriptor);\n}\n/** A duplicate installed package recognizes the same descriptor through Symbol.for. */\nexport function isBuiltInMachineDescriptor(value: unknown): value is BuiltInMachineDescriptor {\n if (!isBuiltInDescriptorRecord(value) || !hasOnlyFields(value, [\"producerId\"]) || !isVersionedProducerId(value.producerId)) {\n return false;\n }\n const brand = Object.getOwnPropertyDescriptor(value, BUILT_IN_MACHINE_DESCRIPTOR);\n return brand !== undefined && \"value\" in brand && brand.value === BUILT_IN_MACHINE_DESCRIPTOR_BRAND;\n}\n/** Installs data identity before a built-in definition is frozen; it installs no callback. */\nexport function attachBuiltInMachineDescriptor<Definition extends object>(definition: Definition, descriptor: BuiltInMachineDescriptor): Definition {\n if (!isBuiltInMachineDescriptor(descriptor)) {\n throw new TypeError(\"a built-in Report must use a valid machine descriptor\");\n }\n Object.defineProperty(definition, BUILT_IN_MACHINE_REPORT_DESCRIPTOR, {\n value: descriptor,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return definition;\n}\n/** Reads only the stable data descriptor, never a process-local WeakMap. */\nexport function builtInMachineDescriptorOf(value: unknown): BuiltInMachineDescriptor | undefined {\n if ((typeof value !== \"object\" && typeof value !== \"function\") || value === null)\n return undefined;\n const property = Object.getOwnPropertyDescriptor(value, BUILT_IN_MACHINE_REPORT_DESCRIPTOR);\n return property !== undefined && \"value\" in property && isBuiltInMachineDescriptor(property.value)\n ? property.value\n : undefined;\n}\n/**\n * The Host selects the producer from its own registry by producerId. The\n * descriptor is never called and cannot contain a callback to call.\n */\nexport function produceBuiltInShowData<Error, Requirements>(input: {\n readonly registry: BuiltInMachineRegistry<Error, Requirements>;\n readonly descriptor: BuiltInMachineDescriptor;\n readonly sample: Sample;\n readonly selection: ShowSelection;\n readonly route: string;\n readonly pageId: string;\n}): Effect.Effect<BuiltInShowData, Error | BuiltInMachineProducerMissing, Requirements | Scope.Scope> {\n if (!isBuiltInMachineDescriptor(input.descriptor)) {\n throw new TypeError(\"a built-in machine descriptor must be created by defineBuiltInMachineDescriptor\");\n }\n const producer = input.registry.producers.get(input.descriptor.producerId);\n if (producer === undefined) {\n return Effect.fail(Object.freeze({\n code: \"report-built-in-machine-producer-missing\" as const,\n producerId: input.descriptor.producerId,\n }));\n }\n return producer({\n sample: input.sample,\n selection: input.selection,\n route: input.route,\n pageId: input.pageId,\n });\n}\n/** Builds the docs-defined built-in show document from already closed domain data. */\nexport function builtInShowDocument(input: {\n readonly selection: ShowSelection;\n readonly report: {\n readonly token: BuiltInReportToken;\n readonly identity: ContentAddress;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n };\n readonly data: BuiltInShowData;\n readonly projections: ReportProjections;\n readonly problems?: readonly ReportProblem[];\n}): BuiltInShowDocument {\n return Object.freeze({\n format: BUILT_IN_SHOW_FORMAT,\n locale: \"en\" as const,\n selection: freezeSelection(input.selection),\n report: Object.freeze({\n token: requireNonEmptyString(input.report.token, \"report.token\"),\n identity: requireNonEmptyString(input.report.identity, \"report.identity\"),\n }),\n page: freezePage(input.page),\n data: freezeBuiltInData(input.data),\n projections: freezeProjections(input.projections),\n problems: freezeProblems(input.problems ?? []),\n });\n}\n/**\n * Builds the docs-defined custom single-target manifest. `ResolvedPage` has\n * already closed every author callback, so reading its English text performs\n * neither component resolution nor a second Analysis request.\n */\nexport function customTargetExecutionManifest(input: {\n readonly selection: ShowSelection;\n readonly report: {\n readonly identity: ContentAddress;\n readonly title: LocalizedText;\n };\n readonly page: ResolvedPage;\n readonly textWidth: number;\n readonly projections: ReportProjections;\n readonly problems?: readonly ReportProblem[];\n}): CustomTargetExecutionManifest {\n if (!isPositiveSafeInteger(input.textWidth)) {\n throw new TypeError(\"custom target execution textWidth must be a positive safe integer\");\n }\n const text = resolvedPageText(input.page, { locale: \"en\", width: input.textWidth, panelMode: \"plain\" });\n if (!(\"state\" in text) || text.state !== \"rendered\") {\n throw new TypeError(\"the selected Page lacks a closed English text projection at the requested width\");\n }\n return Object.freeze({\n format: CUSTOM_TARGET_EXECUTION_FORMAT,\n locale: \"en\" as const,\n selection: freezeSelection(input.selection),\n report: Object.freeze({\n identity: requireNonEmptyString(input.report.identity, \"report.identity\"),\n title: freezeLocalizedText(input.report.title, \"report.title\"),\n }),\n page: Object.freeze({\n route: input.page.target.route,\n pageId: input.page.target.pageId,\n title: freezeLocalizedText(input.page.title, \"page.title\"),\n renderedText: text.text,\n }),\n // Assets remain revision payloads. The target-page manifest intentionally\n // exposes only the docs-defined download summaries, never either payload.\n downloads: Object.freeze([...input.page.downloads]\n .map((download) => Object.freeze({\n path: download.path,\n mediaType: download.mediaType,\n bytes: download.byteLength,\n }))\n .sort((left, right) => compareUtf8(left.path, right.path) || compareUtf8(left.mediaType, right.mediaType) || left.bytes - right.bytes)),\n projections: freezeProjections(input.projections),\n problems: freezeProblems(input.problems ?? []),\n });\n}\n/** Canonical UTF-8 JSON for the two show schemas. */\nexport function canonicalMachineJson(value: BuiltInShowDocument | CustomTargetExecutionManifest): string {\n return writeCanonicalJson(closeMachineJson(value));\n}\n/** Strict JSON clone for a Host-owned closed domain value. */\nexport function closeMachineJson(value: unknown): JsonValue {\n return closeJson(value, new Set<object>());\n}\n/**\n * A PricingProfile carries an internal Symbol descriptor for cross-package\n * validation. Machine documents expose only its closed enumerable data form.\n */\nexport function closePricingProfileJson(profile: PricingProfile): JsonValue {\n return closeMachineJson(Object.fromEntries(Object.entries(profile)));\n}\nfunction freezeSelection(value: ShowSelection): ShowSelection {\n const sampleIdentity = requireNonEmptyString(value.sampleIdentity, \"selection.sampleIdentity\");\n switch (value.kind) {\n case \"project-current\":\n return Object.freeze({\n kind: \"project-current\" as const,\n sampleIdentity,\n experimentIds: freezeSortedUniqueStrings(value.experimentIds, \"selection.experimentIds\"),\n });\n case \"explicit-runs\":\n return Object.freeze({\n kind: \"explicit-runs\" as const,\n sampleIdentity,\n runIds: freezeSortedUniqueStrings(value.runIds, \"selection.runIds\"),\n });\n case \"attempt-locator\":\n return Object.freeze({\n kind: \"attempt-locator\" as const,\n sampleIdentity,\n locator: requireNonEmptyString(value.locator, \"selection.locator\"),\n });\n }\n}\nfunction freezePage(value: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n}): {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n} {\n return Object.freeze({\n route: requireNonEmptyString(value.route, \"page.route\"),\n pageId: requireNonEmptyString(value.pageId, \"page.pageId\"),\n title: freezeLocalizedText(value.title, \"page.title\"),\n });\n}\nfunction freezeBuiltInData(value: BuiltInShowData): BuiltInShowData {\n if (!isPlainRecord(value) || typeof value.kind !== \"string\") {\n throw new TypeError(\"built-in show data must be a named domain result\");\n }\n // Domain arrays are deliberately not given a generic renderer sort here.\n // The selected registry producer owns their stable identities and must close\n // them in the canonical order defined for that domain before returning.\n switch (value.kind) {\n case \"groups\":\n assertExactFields(value, [\"kind\", \"groups\"], \"groups show data\");\n return Object.freeze({ kind: \"groups\" as const, groups: closeMachineJson(value.groups) });\n case \"experiment-group\":\n assertExactFields(value, [\"kind\", \"group\", \"comparison\"], \"experiment-group show data\");\n return Object.freeze({\n kind: \"experiment-group\" as const,\n group: closeMachineJson(value.group),\n comparison: closeMachineJson(value.comparison),\n });\n case \"run-membership\":\n assertExactFields(value, [\"kind\", \"summary\", \"members\", \"errors\", \"evidence\"], \"run-membership show data\");\n return Object.freeze({\n kind: \"run-membership\" as const,\n summary: closeMachineJson(value.summary),\n members: closeMachineJson(value.members),\n errors: closeMachineJson(value.errors),\n evidence: closeMachineJson(value.evidence),\n });\n case \"attempt\":\n assertExactFields(value, [\"kind\", \"evidence\", \"observability\", \"fileChanges\"], \"attempt show data\");\n return Object.freeze({\n kind: \"attempt\" as const,\n evidence: closeMachineJson(value.evidence),\n observability: closeMachineJson(value.observability),\n fileChanges: closeMachineJson(value.fileChanges),\n });\n case \"source\":\n assertExactFields(value, [\"kind\", \"sources\"], \"source show data\");\n return Object.freeze({ kind: \"source\" as const, sources: closeMachineJson(value.sources) });\n case \"execution\":\n assertExactFields(value, [\"kind\", \"execution\"], \"execution show data\");\n return Object.freeze({ kind: \"execution\" as const, execution: closeMachineJson(value.execution) });\n case \"timing\":\n assertExactFields(value, [\"kind\", \"timing\"], \"timing show data\");\n return Object.freeze({ kind: \"timing\" as const, timing: closeMachineJson(value.timing) });\n default:\n throw new TypeError(\"built-in show data kind is not declared by the show format\");\n }\n}\n/** Re-closes a ReportProjections value: validates format, dedupes, and canonically sorts. */\nfunction freezeProjections(value: ReportProjections): ReportProjections {\n if (!isPlainRecord(value) || value.format !== REPORT_PROJECTIONS_FORMAT) {\n throw new TypeError(\"projections must be a niceeval.report-projections/v1 value\");\n }\n return buildReportProjections({\n pricingProfile: value.pricingProfile,\n costs: value.costs.map((entry) => ({\n page: entry.page,\n measureId: entry.measureId,\n row: entry.row,\n profileIdentity: entry.profileIdentity,\n projection: entry.projection,\n })),\n });\n}\nfunction freezeProblems(value: readonly ReportProblem[]): readonly ReportProblem[] {\n if (!Array.isArray(value))\n throw new TypeError(\"problems must be an array\");\n const entries = value.map((problem, index) => {\n if (!isNonEmptyString(problem.code))\n throw new TypeError(`problems[${index}].code must be a non-empty string`);\n const path = freezeStrings(problem.path, `problems[${index}].path`);\n const refs = freezeSortedUniqueStrings(problem.refs, `problems[${index}].refs`);\n if (problem.summary !== undefined && !isNonEmptyString(problem.summary)) {\n throw new TypeError(`problems[${index}].summary must be a non-empty string when supplied`);\n }\n return Object.freeze({\n code: problem.code,\n path,\n refs,\n ...(problem.summary === undefined ? {} : { summary: problem.summary }),\n });\n });\n return Object.freeze(entries.sort((left, right) => compareUtf8(left.code, right.code) ||\n comparePath(left.path, right.path) ||\n compareStringArrays(left.refs, right.refs) ||\n compareUtf8(left.summary ?? \"\", right.summary ?? \"\")));\n}\nfunction freezeLocalizedText(value: LocalizedText, label: string): LocalizedText {\n if (typeof value === \"string\")\n return value;\n const closed = closeMachineJson(value);\n if (closed === null || Array.isArray(closed) || typeof closed !== \"object\") {\n throw new TypeError(`${label} must be a string or locale map`);\n }\n const entries = Object.entries(closed);\n if (entries.length === 0 || entries.some(([locale, text]) => !isNonEmptyString(locale) || typeof text !== \"string\")) {\n throw new TypeError(`${label} must be a non-empty locale map of strings`);\n }\n const result: Record<string, string> = Object.create(null) as Record<string, string>;\n for (const [locale, text] of entries) {\n // The validation above proves this is a locale-string pair.\n result[locale] = text as string;\n }\n return Object.freeze(result);\n}\nfunction freezeStrings(value: readonly string[], label: string): readonly string[] {\n if (!Array.isArray(value) || value.some((entry) => !isNonEmptyString(entry))) {\n throw new TypeError(`${label} must be an array of non-empty strings`);\n }\n return Object.freeze([...value]);\n}\nfunction freezeSortedUniqueStrings(value: readonly string[], label: string): readonly string[] {\n const entries = freezeStrings(value, label);\n return Object.freeze([...new Set(entries)].sort(compareUtf8));\n}\nfunction comparePath(left: readonly string[], right: readonly string[]): number {\n const length = Math.min(left.length, right.length);\n for (let index = 0; index < length; index += 1) {\n const difference = compareUtf8(left[index]!, right[index]!);\n if (difference !== 0)\n return difference;\n }\n return left.length - right.length;\n}\nfunction compareStringArrays(left: readonly string[], right: readonly string[]): number {\n return comparePath(left, right);\n}\nfunction closeJson(value: unknown, active: Set<object>): JsonValue {\n if (value === null || typeof value === \"boolean\" || typeof value === \"string\")\n return value;\n if (typeof value === \"number\") {\n if (!Number.isFinite(value))\n throw new TypeError(\"machine JSON cannot contain a non-finite number\");\n return Object.is(value, -0) ? 0 : value;\n }\n if (typeof value === \"undefined\" || typeof value === \"bigint\" || typeof value === \"symbol\" || typeof value === \"function\") {\n throw new TypeError(\"machine JSON must be data only\");\n }\n if (active.has(value))\n throw new TypeError(\"machine JSON cannot contain a cycle\");\n active.add(value);\n try {\n if (Array.isArray(value))\n return Object.freeze(value.map((entry) => closeJson(entry, active)));\n if (!isPlainRecord(value))\n throw new TypeError(\"machine JSON must use plain data objects\");\n const copy: Record<string, JsonValue> = Object.create(null) as Record<string, JsonValue>;\n for (const key of Object.keys(value).sort(compareUtf8))\n copy[key] = closeJson(value[key], active);\n return Object.freeze(copy);\n }\n finally {\n active.delete(value);\n }\n}\nfunction writeCanonicalJson(value: JsonValue): string {\n if (value === null)\n return \"null\";\n switch (typeof value) {\n case \"boolean\":\n return value ? \"true\" : \"false\";\n case \"number\":\n return JSON.stringify(value);\n case \"string\":\n return JSON.stringify(value);\n case \"object\":\n break;\n }\n if (Array.isArray(value))\n return `[${value.map(writeCanonicalJson).join(\",\")}]`;\n const record = value as Readonly<Record<string, JsonValue>>;\n const keys = Object.keys(record).sort(compareUtf8);\n return `{${keys.map((key) => `${JSON.stringify(key)}:${writeCanonicalJson(record[key]!)}`).join(\",\")}}`;\n}\nfunction isPlainRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value) || value instanceof Uint8Array)\n return false;\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 || !descriptor.enumerable || !(\"value\" in descriptor))\n return false;\n }\n return true;\n}\n/** The descriptor alone is allowed its one non-enumerable Symbol.for brand. */\nfunction isBuiltInDescriptorRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value) || value instanceof Uint8Array)\n return false;\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 === \"symbol\" && key !== BUILT_IN_MACHINE_DESCRIPTOR)\n return false;\n if (typeof key !== \"string\" && typeof key !== \"symbol\")\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !(\"value\" in descriptor))\n return false;\n }\n return true;\n}\nfunction hasOnlyFields(value: Readonly<Record<string, unknown>>, keys: readonly string[]): boolean {\n const actual = Object.getOwnPropertyNames(value);\n return actual.length === keys.length && keys.every((key) => Object.hasOwn(value, key));\n}\nfunction assertExactFields(value: Readonly<Record<string, unknown>>, keys: readonly string[], label: string): void {\n if (!hasOnlyFields(value, keys))\n throw new TypeError(`${label} has an invalid field set`);\n}\nfunction isVersionedProducerId(value: unknown): value is string {\n return typeof value === \"string\" && /^[^\\s@][^\\s]*@v[1-9][0-9]*$/u.test(value);\n}\nfunction requireNonEmptyString(value: unknown, label: string): string {\n if (!isNonEmptyString(value))\n throw new TypeError(`${label} must be a non-empty string`);\n return value;\n}\nfunction requireString(value: unknown, label: string): string {\n if (typeof value !== \"string\")\n throw new TypeError(`${label} must be a string`);\n return value;\n}\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0;\n}\nfunction isPositiveSafeInteger(value: unknown): value is number {\n return typeof value === \"number\" && Number.isSafeInteger(value) && value > 0;\n}\n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AACzD,CAAC;AACD,SAAS,qBAAqB,CAAC,KAAc;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AACjF,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type { JsonValue, Sample, } from \"../../analysis/contracts.ts\";\nimport { isCostProjectionValue, type PricingProfile, } from \"../../analysis/cost.ts\";\nimport type { LocalizedText } from \"../../shared/types.ts\";\nimport { compareUtf8, type ResolvedPage, } from \"../runtime/resolved-page.ts\";\nimport { resolvedPageText } from \"../runtime/text.ts\";\n/** Content-addressed identities are opaque, printable strings at this boundary. */\nexport type ContentAddress = string;\n/** The exact regenerable machine formats in docs/feature/reports/cli.md. */\nexport const BUILT_IN_SHOW_FORMAT = \"niceeval.show\";\nexport const CUSTOM_TARGET_EXECUTION_FORMAT = \"niceeval.report-target-execution/v1\";\nexport const REPORT_PROJECTIONS_FORMAT = \"niceeval.report-projections/v1\";\nexport type BuiltInReportToken = string;\nexport type ShowSelection = {\n readonly kind: \"project-current\";\n readonly sampleIdentity: ContentAddress;\n readonly experimentIds: readonly string[];\n} | {\n readonly kind: \"explicit-runs\";\n readonly sampleIdentity: ContentAddress;\n readonly runIds: readonly string[];\n} | {\n readonly kind: \"attempt-locator\";\n readonly sampleIdentity: ContentAddress;\n readonly locator: string;\n};\n/**\n * Host-owned problems expose canonical ordering inputs. Their exact detailed\n * shape remains Host-owned; no callback, Error, Cause, or reader is allowed.\n */\nexport interface ReportProblem {\n readonly code: string;\n readonly path: readonly string[];\n readonly refs: readonly string[];\n readonly summary?: string;\n}\n/**\n * Built-ins may emit only their declared domain families. This is intentionally\n * not a generic component/HTML/text reverse-engineering format.\n */\nexport type BuiltInShowData = {\n readonly kind: \"groups\";\n readonly groups: JsonValue;\n} | {\n readonly kind: \"experiment-group\";\n readonly group: JsonValue;\n readonly comparison: JsonValue;\n} | {\n readonly kind: \"run-membership\";\n readonly summary: JsonValue;\n readonly members: JsonValue;\n readonly errors: JsonValue;\n readonly evidence: JsonValue;\n} | {\n readonly kind: \"attempt\";\n readonly evidence: JsonValue;\n readonly observability: JsonValue;\n readonly fileChanges: JsonValue;\n} | {\n readonly kind: \"source\";\n readonly sources: JsonValue;\n} | {\n readonly kind: \"execution\";\n readonly execution: JsonValue;\n} | {\n readonly kind: \"timing\";\n readonly timing: JsonValue;\n};\nexport interface BuiltInShowDocument {\n readonly format: typeof BUILT_IN_SHOW_FORMAT;\n readonly locale: \"en\";\n readonly selection: ShowSelection;\n readonly report: {\n readonly token: BuiltInReportToken;\n readonly identity: ContentAddress;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n };\n readonly data: BuiltInShowData;\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/**\n * The custom format is a single target execution manifest, never a revision.\n * It contains only the selected Page's closed English text—not a React tree,\n * HTML body, site identity, Sample capability, Record payload, or raw bytes.\n */\nexport interface CustomTargetExecutionManifest {\n readonly format: typeof CUSTOM_TARGET_EXECUTION_FORMAT;\n readonly locale: \"en\";\n readonly selection: ShowSelection;\n readonly report: {\n readonly identity: ContentAddress;\n readonly title: LocalizedText;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n readonly renderedText: string;\n };\n readonly downloads: readonly {\n readonly path: string;\n readonly mediaType: string;\n readonly bytes: number;\n }[];\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/** One captured cost projection bound to the Page execution that requested it. */\nexport interface ReportProjectionCost {\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly row: {\n readonly key: string;\n readonly dimensions: Readonly<Record<string, JsonValue>>;\n };\n readonly profileIdentity: string;\n /** Analysis-owned closed projection; Report never rebuilds it from `value`. */\n readonly projection: JsonValue;\n}\n/**\n * The top-level projections object shared verbatim by the built-in show\n * document and the custom target-execution manifest, and written as the site\n * revision's `_niceeval/data/projections.json`. `pricingProfile` is the\n * closed JSON form of the Report's PricingProfile, or null when the Report\n * declares none. `costs` is canonical: route → pageId → measureId → row.key\n * → profileIdentity. A projection may appear on distinct Pages; distinct\n * dimensions or projections at one canonical capture key are a build failure.\n */\nexport interface ReportProjections {\n readonly format: typeof REPORT_PROJECTIONS_FORMAT;\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCost[];\n}\nexport interface ReportProjectionCostInput {\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly row: {\n readonly key: string;\n readonly dimensions: Readonly<Record<string, unknown>>;\n };\n readonly profileIdentity: string;\n readonly projection: unknown;\n}\n/** A same-key, different row-content failure that a Host can surface directly. */\nexport interface ReportProjectionConflict {\n readonly code: \"report-cost-projection-conflict\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n}\n/** Capture and projection must name the same Analysis-owned PricingProfile. */\nexport interface ReportProjectionProfileIdentityMismatch {\n readonly code: \"report-cost-projection-profile-identity-mismatch\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n readonly projectionProfileIdentity: string | null;\n}\n/** A cost capture cannot exist when the Report declares no PricingProfile. */\nexport interface ReportProjectionReportPricingMissing {\n readonly code: \"report-cost-projection-report-pricing-missing\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n}\n/** Every captured cost must use the exact Profile declared by the Report. */\nexport interface ReportProjectionReportPricingMismatch {\n readonly code: \"report-cost-projection-report-pricing-mismatch\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n readonly reportPricingProfileIdentity: string;\n}\nexport type ReportProjectionBuildFailure = ReportProjectionConflict | ReportProjectionProfileIdentityMismatch | ReportProjectionReportPricingMissing | ReportProjectionReportPricingMismatch;\n/**\n * Closes, deduplicates, and canonically sorts captured projection entries.\n * Two identical entries at one canonical capture key collapse. Different\n * Page bindings deliberately do not collide; distinct dimensions at one key\n * do, because they represent distinct captured rows.\n */\nexport function buildReportProjections(input: {\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCostInput[];\n}): ReportProjections {\n const pricingProfile = input.pricingProfile === null\n ? null\n : closeJson(input.pricingProfile, new Set<object>());\n const failure = reportProjectionFailure({ pricingProfile, costs: input.costs });\n if (failure !== undefined)\n throw failure;\n const byKey = new Map<string, {\n readonly cost: ReportProjectionCost;\n readonly content: string;\n }>();\n for (const entry of input.costs) {\n const cost = closeProjectionCost(entry);\n const key = projectionCostKey(cost);\n const content = projectionCostContent(cost);\n const existing = byKey.get(key);\n if (existing === undefined) {\n byKey.set(key, Object.freeze({ cost, content }));\n continue;\n }\n if (existing.content !== content) {\n throw projectionConflict(cost);\n }\n }\n const costs = Object.freeze([...byKey.values()].map((entry) => entry.cost).sort((left, right) => compareUtf8(left.page.route, right.page.route) ||\n compareUtf8(left.page.pageId, right.page.pageId) ||\n compareUtf8(left.measureId, right.measureId) ||\n compareUtf8(left.row.key, right.row.key) ||\n compareUtf8(left.profileIdentity, right.profileIdentity)));\n return Object.freeze({\n format: REPORT_PROJECTIONS_FORMAT,\n pricingProfile,\n costs,\n });\n}\n/** The empty projections for a Page or site that captured no cost values. */\nexport function emptyReportProjections(pricingProfile: JsonValue | null): ReportProjections {\n return buildReportProjections({ pricingProfile, costs: [] });\n}\n/** Validates Report Profile binding and same-key row-content identity. */\nexport function reportProjectionFailure(input: {\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCostInput[];\n}): ReportProjectionBuildFailure | undefined {\n const reportPricingProfileIdentity = pricingProfileIdentity(input.pricingProfile);\n const byKey = new Map<string, {\n readonly content: string;\n }>();\n for (const inputEntry of input.costs) {\n const cost = closeProjectionCost(inputEntry);\n if (reportPricingProfileIdentity === null)\n return reportPricingMissing(cost);\n const profileIdentity = projectionProfileIdentity(cost.projection);\n if (profileIdentity !== cost.profileIdentity)\n return projectionProfileIdentityMismatch(cost, profileIdentity);\n if (cost.profileIdentity !== reportPricingProfileIdentity) {\n return reportPricingMismatch(cost, reportPricingProfileIdentity);\n }\n const key = projectionCostKey(cost);\n const content = projectionCostContent(cost);\n const prior = byKey.get(key);\n if (prior !== undefined && prior.content !== content) {\n return projectionConflict(cost);\n }\n byKey.set(key, Object.freeze({ content }));\n }\n return undefined;\n}\nfunction closeProjectionCost(input: ReportProjectionCostInput): ReportProjectionCost {\n const page = input.page;\n const row = input.row;\n if (!isPlainRecord(page) || !isPlainRecord(row)) {\n throw new TypeError(\"projection cost page and row must be plain data objects\");\n }\n // CostProjectionValue has one closed-domain validator in Analysis. This\n // machine boundary deliberately calls it before JSON closing rather than\n // accepting any projection-shaped payload from a capture.\n if (!isCostProjectionValue(input.projection)) {\n throw new TypeError(\"projection cost projection must be an Analysis CostProjectionValue\");\n }\n const dimensions = closeJson(row.dimensions, new Set<object>());\n if (dimensions === null || Array.isArray(dimensions) || typeof dimensions !== \"object\") {\n throw new TypeError(\"projection cost row.dimensions must be a plain data object\");\n }\n return Object.freeze({\n page: Object.freeze({\n pageId: requireNonEmptyString(page.pageId, \"projection cost page.pageId\"),\n route: requireNonEmptyString(page.route, \"projection cost page.route\"),\n }),\n measureId: requireNonEmptyString(input.measureId, \"projection cost measureId\"),\n row: Object.freeze({\n key: requireString(row.key, \"projection cost row.key\"),\n dimensions: dimensions as Readonly<Record<string, JsonValue>>,\n }),\n profileIdentity: requireNonEmptyString(input.profileIdentity, \"projection cost profileIdentity\"),\n projection: closeJson(input.projection, new Set<object>()),\n });\n}\nfunction projectionCostKey(cost: ReportProjectionCost): string {\n return writeCanonicalJson(Object.freeze([\n cost.page.route,\n cost.page.pageId,\n cost.measureId,\n cost.row.key,\n cost.profileIdentity,\n ]));\n}\n/**\n * Dimensions are retained outside the canonical capture key so they do not\n * affect sort order, but they remain part of the captured row's meaning. Two\n * entries at one key can collapse only when both dimensions and projection\n * are byte-identical canonical JSON.\n */\nfunction projectionCostContent(cost: ReportProjectionCost): string {\n return writeCanonicalJson(Object.freeze({\n dimensions: cost.row.dimensions,\n projection: cost.projection,\n }));\n}\nfunction projectionConflict(cost: ReportProjectionCost): ReportProjectionConflict {\n return Object.freeze({\n code: \"report-cost-projection-conflict\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n });\n}\nfunction projectionProfileIdentity(value: JsonValue): string | null {\n if (value === null || Array.isArray(value) || typeof value !== \"object\")\n return null;\n const profile = (value as Readonly<Record<string, JsonValue>>).profile;\n if (profile === null || Array.isArray(profile) || typeof profile !== \"object\")\n return null;\n const record = profile as Readonly<Record<string, JsonValue>>;\n return typeof record.contentIdentity === \"string\" && record.contentIdentity.length > 0\n ? record.contentIdentity\n : null;\n}\nfunction pricingProfileIdentity(value: JsonValue | null): string | null {\n if (value === null)\n return null;\n if (!isPlainRecord(value) || typeof value.contentIdentity !== \"string\" || value.contentIdentity.length === 0) {\n throw new TypeError(\"projection pricingProfile must be a closed PricingProfile JSON object\");\n }\n return value.contentIdentity;\n}\nfunction projectionProfileIdentityMismatch(cost: ReportProjectionCost, projectionProfileIdentity: string | null): ReportProjectionProfileIdentityMismatch {\n return Object.freeze({\n code: \"report-cost-projection-profile-identity-mismatch\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n projectionProfileIdentity,\n });\n}\nfunction reportPricingMissing(cost: ReportProjectionCost): ReportProjectionReportPricingMissing {\n return Object.freeze({\n code: \"report-cost-projection-report-pricing-missing\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n });\n}\nfunction reportPricingMismatch(cost: ReportProjectionCost, reportPricingProfileIdentity: string): ReportProjectionReportPricingMismatch {\n return Object.freeze({\n code: \"report-cost-projection-report-pricing-mismatch\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n reportPricingProfileIdentity,\n });\n}\nconst BUILT_IN_MACHINE_DESCRIPTOR = Symbol.for(\"niceeval.report.built-in-machine-descriptor/v2\");\nconst BUILT_IN_MACHINE_REPORT_DESCRIPTOR = Symbol.for(\"niceeval.report.built-in-machine-report-descriptor/v2\");\nconst BUILT_IN_MACHINE_DESCRIPTOR_BRAND = \"niceeval.report.built-in-machine-descriptor/v2\";\n/**\n * A descriptor intentionally contains only one versioned producer id. The\n * Symbol.for brand makes that data identity work across duplicate packages.\n */\nexport interface BuiltInMachineDescriptor {\n readonly producerId: string;\n}\nexport interface BuiltInMachineProducerInput {\n readonly sample: Sample;\n readonly selection: ShowSelection;\n readonly route: string;\n readonly pageId: string;\n}\n/** This callback is held only in a Host registry—not on a descriptor. */\n/**\n * Host producers are Promise callbacks because Analysis exposes Promise APIs.\n * The Report Host adapts this one external callback with `Effect.tryPromise`;\n * producers never start or own an Effect runtime.\n */\nexport type BuiltInMachineProducer = (input: BuiltInMachineProducerInput) => Promise<BuiltInShowData>;\nexport interface BuiltInMachineRegistry {\n readonly producers: ReadonlyMap<string, BuiltInMachineProducer>;\n}\nexport interface BuiltInMachineProducerMissing {\n readonly code: \"report-built-in-machine-producer-missing\";\n readonly producerId: string;\n}\n/** Defines a data-only descriptor. It has no executable producer field. */\nexport function defineBuiltInMachineDescriptor(producerId: string): BuiltInMachineDescriptor {\n if (!isVersionedProducerId(producerId)) {\n throw new TypeError(\"a built-in machine producer id must end in @v<positive integer>\");\n }\n const descriptor: BuiltInMachineDescriptor = { producerId };\n Object.defineProperty(descriptor, BUILT_IN_MACHINE_DESCRIPTOR, {\n value: BUILT_IN_MACHINE_DESCRIPTOR_BRAND,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return Object.freeze(descriptor);\n}\n/** A duplicate installed package recognizes the same descriptor through Symbol.for. */\nexport function isBuiltInMachineDescriptor(value: unknown): value is BuiltInMachineDescriptor {\n if (!isBuiltInDescriptorRecord(value) || !hasOnlyFields(value, [\"producerId\"]) || !isVersionedProducerId(value.producerId)) {\n return false;\n }\n const brand = Object.getOwnPropertyDescriptor(value, BUILT_IN_MACHINE_DESCRIPTOR);\n return brand !== undefined && \"value\" in brand && brand.value === BUILT_IN_MACHINE_DESCRIPTOR_BRAND;\n}\n/** Installs data identity before a built-in definition is frozen; it installs no callback. */\nexport function attachBuiltInMachineDescriptor<Definition extends object>(definition: Definition, descriptor: BuiltInMachineDescriptor): Definition {\n if (!isBuiltInMachineDescriptor(descriptor)) {\n throw new TypeError(\"a built-in Report must use a valid machine descriptor\");\n }\n Object.defineProperty(definition, BUILT_IN_MACHINE_REPORT_DESCRIPTOR, {\n value: descriptor,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return definition;\n}\n/** Reads only the stable data descriptor, never a process-local WeakMap. */\nexport function builtInMachineDescriptorOf(value: unknown): BuiltInMachineDescriptor | undefined {\n if ((typeof value !== \"object\" && typeof value !== \"function\") || value === null)\n return undefined;\n const property = Object.getOwnPropertyDescriptor(value, BUILT_IN_MACHINE_REPORT_DESCRIPTOR);\n return property !== undefined && \"value\" in property && isBuiltInMachineDescriptor(property.value)\n ? property.value\n : undefined;\n}\n/**\n * The Host selects the producer from its own registry by producerId. The\n * descriptor is never called and cannot contain a callback to call.\n */\nexport function produceBuiltInShowData(input: {\n readonly registry: BuiltInMachineRegistry;\n readonly descriptor: BuiltInMachineDescriptor;\n readonly sample: Sample;\n readonly selection: ShowSelection;\n readonly route: string;\n readonly pageId: string;\n}): Promise<BuiltInShowData> | BuiltInMachineProducerMissing {\n if (!isBuiltInMachineDescriptor(input.descriptor)) {\n throw new TypeError(\"a built-in machine descriptor must be created by defineBuiltInMachineDescriptor\");\n }\n const producer = input.registry.producers.get(input.descriptor.producerId);\n if (producer === undefined) {\n return Object.freeze({\n code: \"report-built-in-machine-producer-missing\" as const,\n producerId: input.descriptor.producerId,\n });\n }\n return producer({\n sample: input.sample,\n selection: input.selection,\n route: input.route,\n pageId: input.pageId,\n });\n}\n/** Builds the docs-defined built-in show document from already closed domain data. */\nexport function builtInShowDocument(input: {\n readonly selection: ShowSelection;\n readonly report: {\n readonly token: BuiltInReportToken;\n readonly identity: ContentAddress;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n };\n readonly data: BuiltInShowData;\n readonly projections: ReportProjections;\n readonly problems?: readonly ReportProblem[];\n}): BuiltInShowDocument {\n return Object.freeze({\n format: BUILT_IN_SHOW_FORMAT,\n locale: \"en\" as const,\n selection: freezeSelection(input.selection),\n report: Object.freeze({\n token: requireNonEmptyString(input.report.token, \"report.token\"),\n identity: requireNonEmptyString(input.report.identity, \"report.identity\"),\n }),\n page: freezePage(input.page),\n data: freezeBuiltInData(input.data),\n projections: freezeProjections(input.projections),\n problems: freezeProblems(input.problems ?? []),\n });\n}\n/**\n * Builds the docs-defined custom single-target manifest. `ResolvedPage` has\n * already closed every author callback, so reading its English text performs\n * neither component resolution nor a second Analysis request.\n */\nexport function customTargetExecutionManifest(input: {\n readonly selection: ShowSelection;\n readonly report: {\n readonly identity: ContentAddress;\n readonly title: LocalizedText;\n };\n readonly page: ResolvedPage;\n readonly textWidth: number;\n readonly projections: ReportProjections;\n readonly problems?: readonly ReportProblem[];\n}): CustomTargetExecutionManifest {\n if (!isPositiveSafeInteger(input.textWidth)) {\n throw new TypeError(\"custom target execution textWidth must be a positive safe integer\");\n }\n const text = resolvedPageText(input.page, { locale: \"en\", width: input.textWidth, panelMode: \"plain\" });\n if (!(\"state\" in text) || text.state !== \"rendered\") {\n throw new TypeError(\"the selected Page lacks a closed English text projection at the requested width\");\n }\n return Object.freeze({\n format: CUSTOM_TARGET_EXECUTION_FORMAT,\n locale: \"en\" as const,\n selection: freezeSelection(input.selection),\n report: Object.freeze({\n identity: requireNonEmptyString(input.report.identity, \"report.identity\"),\n title: freezeLocalizedText(input.report.title, \"report.title\"),\n }),\n page: Object.freeze({\n route: input.page.target.route,\n pageId: input.page.target.pageId,\n title: freezeLocalizedText(input.page.title, \"page.title\"),\n renderedText: text.text,\n }),\n // Assets remain revision payloads. The target-page manifest intentionally\n // exposes only the docs-defined download summaries, never either payload.\n downloads: Object.freeze([...input.page.downloads]\n .map((download) => Object.freeze({\n path: download.path,\n mediaType: download.mediaType,\n bytes: download.byteLength,\n }))\n .sort((left, right) => compareUtf8(left.path, right.path) || compareUtf8(left.mediaType, right.mediaType) || left.bytes - right.bytes)),\n projections: freezeProjections(input.projections),\n problems: freezeProblems(input.problems ?? []),\n });\n}\n/** Canonical UTF-8 JSON for the two show schemas. */\nexport function canonicalMachineJson(value: BuiltInShowDocument | CustomTargetExecutionManifest): string {\n return writeCanonicalJson(closeMachineJson(value));\n}\n/** Strict JSON clone for a Host-owned closed domain value. */\nexport function closeMachineJson(value: unknown): JsonValue {\n return closeJson(value, new Set<object>());\n}\n/**\n * A PricingProfile carries an internal Symbol descriptor for cross-package\n * validation. Machine documents expose only its closed enumerable data form.\n */\nexport function closePricingProfileJson(profile: PricingProfile): JsonValue {\n return closeMachineJson(Object.fromEntries(Object.entries(profile)));\n}\nfunction freezeSelection(value: ShowSelection): ShowSelection {\n const sampleIdentity = requireNonEmptyString(value.sampleIdentity, \"selection.sampleIdentity\");\n switch (value.kind) {\n case \"project-current\":\n return Object.freeze({\n kind: \"project-current\" as const,\n sampleIdentity,\n experimentIds: freezeSortedUniqueStrings(value.experimentIds, \"selection.experimentIds\"),\n });\n case \"explicit-runs\":\n return Object.freeze({\n kind: \"explicit-runs\" as const,\n sampleIdentity,\n runIds: freezeSortedUniqueStrings(value.runIds, \"selection.runIds\"),\n });\n case \"attempt-locator\":\n return Object.freeze({\n kind: \"attempt-locator\" as const,\n sampleIdentity,\n locator: requireNonEmptyString(value.locator, \"selection.locator\"),\n });\n }\n}\nfunction freezePage(value: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n}): {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n} {\n return Object.freeze({\n route: requireNonEmptyString(value.route, \"page.route\"),\n pageId: requireNonEmptyString(value.pageId, \"page.pageId\"),\n title: freezeLocalizedText(value.title, \"page.title\"),\n });\n}\nfunction freezeBuiltInData(value: BuiltInShowData): BuiltInShowData {\n if (!isPlainRecord(value) || typeof value.kind !== \"string\") {\n throw new TypeError(\"built-in show data must be a named domain result\");\n }\n // Domain arrays are deliberately not given a generic renderer sort here.\n // The selected registry producer owns their stable identities and must close\n // them in the canonical order defined for that domain before returning.\n switch (value.kind) {\n case \"groups\":\n assertExactFields(value, [\"kind\", \"groups\"], \"groups show data\");\n return Object.freeze({ kind: \"groups\" as const, groups: closeMachineJson(value.groups) });\n case \"experiment-group\":\n assertExactFields(value, [\"kind\", \"group\", \"comparison\"], \"experiment-group show data\");\n return Object.freeze({\n kind: \"experiment-group\" as const,\n group: closeMachineJson(value.group),\n comparison: closeMachineJson(value.comparison),\n });\n case \"run-membership\":\n assertExactFields(value, [\"kind\", \"summary\", \"members\", \"errors\", \"evidence\"], \"run-membership show data\");\n return Object.freeze({\n kind: \"run-membership\" as const,\n summary: closeMachineJson(value.summary),\n members: closeMachineJson(value.members),\n errors: closeMachineJson(value.errors),\n evidence: closeMachineJson(value.evidence),\n });\n case \"attempt\":\n assertExactFields(value, [\"kind\", \"evidence\", \"observability\", \"fileChanges\"], \"attempt show data\");\n return Object.freeze({\n kind: \"attempt\" as const,\n evidence: closeMachineJson(value.evidence),\n observability: closeMachineJson(value.observability),\n fileChanges: closeMachineJson(value.fileChanges),\n });\n case \"source\":\n assertExactFields(value, [\"kind\", \"sources\"], \"source show data\");\n return Object.freeze({ kind: \"source\" as const, sources: closeMachineJson(value.sources) });\n case \"execution\":\n assertExactFields(value, [\"kind\", \"execution\"], \"execution show data\");\n return Object.freeze({ kind: \"execution\" as const, execution: closeMachineJson(value.execution) });\n case \"timing\":\n assertExactFields(value, [\"kind\", \"timing\"], \"timing show data\");\n return Object.freeze({ kind: \"timing\" as const, timing: closeMachineJson(value.timing) });\n default:\n throw new TypeError(\"built-in show data kind is not declared by the show format\");\n }\n}\n/** Re-closes a ReportProjections value: validates format, dedupes, and canonically sorts. */\nfunction freezeProjections(value: ReportProjections): ReportProjections {\n if (!isPlainRecord(value) || value.format !== REPORT_PROJECTIONS_FORMAT) {\n throw new TypeError(\"projections must be a niceeval.report-projections/v1 value\");\n }\n return buildReportProjections({\n pricingProfile: value.pricingProfile,\n costs: value.costs.map((entry) => ({\n page: entry.page,\n measureId: entry.measureId,\n row: entry.row,\n profileIdentity: entry.profileIdentity,\n projection: entry.projection,\n })),\n });\n}\nfunction freezeProblems(value: readonly ReportProblem[]): readonly ReportProblem[] {\n if (!Array.isArray(value))\n throw new TypeError(\"problems must be an array\");\n const entries = value.map((problem, index) => {\n if (!isNonEmptyString(problem.code))\n throw new TypeError(`problems[${index}].code must be a non-empty string`);\n const path = freezeStrings(problem.path, `problems[${index}].path`);\n const refs = freezeSortedUniqueStrings(problem.refs, `problems[${index}].refs`);\n if (problem.summary !== undefined && !isNonEmptyString(problem.summary)) {\n throw new TypeError(`problems[${index}].summary must be a non-empty string when supplied`);\n }\n return Object.freeze({\n code: problem.code,\n path,\n refs,\n ...(problem.summary === undefined ? {} : { summary: problem.summary }),\n });\n });\n return Object.freeze(entries.sort((left, right) => compareUtf8(left.code, right.code) ||\n comparePath(left.path, right.path) ||\n compareStringArrays(left.refs, right.refs) ||\n compareUtf8(left.summary ?? \"\", right.summary ?? \"\")));\n}\nfunction freezeLocalizedText(value: LocalizedText, label: string): LocalizedText {\n if (typeof value === \"string\")\n return value;\n const closed = closeMachineJson(value);\n if (closed === null || Array.isArray(closed) || typeof closed !== \"object\") {\n throw new TypeError(`${label} must be a string or locale map`);\n }\n const entries = Object.entries(closed);\n if (entries.length === 0 || entries.some(([locale, text]) => !isNonEmptyString(locale) || typeof text !== \"string\")) {\n throw new TypeError(`${label} must be a non-empty locale map of strings`);\n }\n const result: Record<string, string> = Object.create(null) as Record<string, string>;\n for (const [locale, text] of entries) {\n // The validation above proves this is a locale-string pair.\n result[locale] = text as string;\n }\n return Object.freeze(result);\n}\nfunction freezeStrings(value: readonly string[], label: string): readonly string[] {\n if (!Array.isArray(value) || value.some((entry) => !isNonEmptyString(entry))) {\n throw new TypeError(`${label} must be an array of non-empty strings`);\n }\n return Object.freeze([...value]);\n}\nfunction freezeSortedUniqueStrings(value: readonly string[], label: string): readonly string[] {\n const entries = freezeStrings(value, label);\n return Object.freeze([...new Set(entries)].sort(compareUtf8));\n}\nfunction comparePath(left: readonly string[], right: readonly string[]): number {\n const length = Math.min(left.length, right.length);\n for (let index = 0; index < length; index += 1) {\n const difference = compareUtf8(left[index]!, right[index]!);\n if (difference !== 0)\n return difference;\n }\n return left.length - right.length;\n}\nfunction compareStringArrays(left: readonly string[], right: readonly string[]): number {\n return comparePath(left, right);\n}\nfunction closeJson(value: unknown, active: Set<object>): JsonValue {\n if (value === null || typeof value === \"boolean\" || typeof value === \"string\")\n return value;\n if (typeof value === \"number\") {\n if (!Number.isFinite(value))\n throw new TypeError(\"machine JSON cannot contain a non-finite number\");\n return Object.is(value, -0) ? 0 : value;\n }\n if (typeof value === \"undefined\" || typeof value === \"bigint\" || typeof value === \"symbol\" || typeof value === \"function\") {\n throw new TypeError(\"machine JSON must be data only\");\n }\n if (active.has(value))\n throw new TypeError(\"machine JSON cannot contain a cycle\");\n active.add(value);\n try {\n if (Array.isArray(value))\n return Object.freeze(value.map((entry) => closeJson(entry, active)));\n if (!isPlainRecord(value))\n throw new TypeError(\"machine JSON must use plain data objects\");\n const copy: Record<string, JsonValue> = Object.create(null) as Record<string, JsonValue>;\n for (const key of Object.keys(value).sort(compareUtf8))\n copy[key] = closeJson(value[key], active);\n return Object.freeze(copy);\n }\n finally {\n active.delete(value);\n }\n}\nfunction writeCanonicalJson(value: JsonValue): string {\n if (value === null)\n return \"null\";\n switch (typeof value) {\n case \"boolean\":\n return value ? \"true\" : \"false\";\n case \"number\":\n return JSON.stringify(value);\n case \"string\":\n return JSON.stringify(value);\n case \"object\":\n break;\n }\n if (Array.isArray(value))\n return `[${value.map(writeCanonicalJson).join(\",\")}]`;\n const record = value as Readonly<Record<string, JsonValue>>;\n const keys = Object.keys(record).sort(compareUtf8);\n return `{${keys.map((key) => `${JSON.stringify(key)}:${writeCanonicalJson(record[key]!)}`).join(\",\")}}`;\n}\nfunction isPlainRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value) || value instanceof Uint8Array)\n return false;\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 || !descriptor.enumerable || !(\"value\" in descriptor))\n return false;\n }\n return true;\n}\n/** The descriptor alone is allowed its one non-enumerable Symbol.for brand. */\nfunction isBuiltInDescriptorRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value) || value instanceof Uint8Array)\n return false;\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 === \"symbol\" && key !== BUILT_IN_MACHINE_DESCRIPTOR)\n return false;\n if (typeof key !== \"string\" && typeof key !== \"symbol\")\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !(\"value\" in descriptor))\n return false;\n }\n return true;\n}\nfunction hasOnlyFields(value: Readonly<Record<string, unknown>>, keys: readonly string[]): boolean {\n const actual = Object.getOwnPropertyNames(value);\n return actual.length === keys.length && keys.every((key) => Object.hasOwn(value, key));\n}\nfunction assertExactFields(value: Readonly<Record<string, unknown>>, keys: readonly string[], label: string): void {\n if (!hasOnlyFields(value, keys))\n throw new TypeError(`${label} has an invalid field set`);\n}\nfunction isVersionedProducerId(value: unknown): value is string {\n return typeof value === \"string\" && /^[^\\s@][^\\s]*@v[1-9][0-9]*$/u.test(value);\n}\nfunction requireNonEmptyString(value: unknown, label: string): string {\n if (!isNonEmptyString(value))\n throw new TypeError(`${label} must be a non-empty string`);\n return value;\n}\nfunction requireString(value: unknown, label: string): string {\n if (typeof value !== \"string\")\n throw new TypeError(`${label} must be a string`);\n return value;\n}\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0;\n}\nfunction isPositiveSafeInteger(value: unknown): value is number {\n return typeof value === \"number\" && Number.isSafeInteger(value) && value > 0;\n}\n"]}
@@ -1,5 +1,3 @@
1
- import { Effect } from "effect";
2
- import type * as Scope from "effect/Scope";
3
1
  import type { JsonValue, Sample } from "../../analysis/contracts.cjs";
4
2
  import { type PricingProfile } from "../../analysis/cost.cjs";
5
3
  import type { LocalizedText } from "../../shared/types.cjs";
@@ -230,9 +228,14 @@ export interface BuiltInMachineProducerInput {
230
228
  readonly pageId: string;
231
229
  }
232
230
  /** This callback is held only in a Host registry—not on a descriptor. */
233
- export type BuiltInMachineProducer<Error, Requirements> = (input: BuiltInMachineProducerInput) => Effect.Effect<BuiltInShowData, Error, Requirements>;
234
- export interface BuiltInMachineRegistry<Error, Requirements> {
235
- readonly producers: ReadonlyMap<string, BuiltInMachineProducer<Error, Requirements>>;
231
+ /**
232
+ * Host producers are Promise callbacks because Analysis exposes Promise APIs.
233
+ * The Report Host adapts this one external callback with `Effect.tryPromise`;
234
+ * producers never start or own an Effect runtime.
235
+ */
236
+ export type BuiltInMachineProducer = (input: BuiltInMachineProducerInput) => Promise<BuiltInShowData>;
237
+ export interface BuiltInMachineRegistry {
238
+ readonly producers: ReadonlyMap<string, BuiltInMachineProducer>;
236
239
  }
237
240
  export interface BuiltInMachineProducerMissing {
238
241
  readonly code: "report-built-in-machine-producer-missing";
@@ -250,14 +253,14 @@ export declare function builtInMachineDescriptorOf(value: unknown): BuiltInMachi
250
253
  * The Host selects the producer from its own registry by producerId. The
251
254
  * descriptor is never called and cannot contain a callback to call.
252
255
  */
253
- export declare function produceBuiltInShowData<Error, Requirements>(input: {
254
- readonly registry: BuiltInMachineRegistry<Error, Requirements>;
256
+ export declare function produceBuiltInShowData(input: {
257
+ readonly registry: BuiltInMachineRegistry;
255
258
  readonly descriptor: BuiltInMachineDescriptor;
256
259
  readonly sample: Sample;
257
260
  readonly selection: ShowSelection;
258
261
  readonly route: string;
259
262
  readonly pageId: string;
260
- }): Effect.Effect<BuiltInShowData, Error | BuiltInMachineProducerMissing, Requirements | Scope.Scope>;
263
+ }): Promise<BuiltInShowData> | BuiltInMachineProducerMissing;
261
264
  /** Builds the docs-defined built-in show document from already closed domain data. */
262
265
  export declare function builtInShowDocument(input: {
263
266
  readonly selection: ShowSelection;
@@ -1,5 +1,3 @@
1
- import { Effect } from "effect";
2
- import type * as Scope from "effect/Scope";
3
1
  import type { JsonValue, Sample } from "../../analysis/contracts.mjs";
4
2
  import { type PricingProfile } from "../../analysis/cost.mjs";
5
3
  import type { LocalizedText } from "../../shared/types.mjs";
@@ -230,9 +228,14 @@ export interface BuiltInMachineProducerInput {
230
228
  readonly pageId: string;
231
229
  }
232
230
  /** This callback is held only in a Host registry—not on a descriptor. */
233
- export type BuiltInMachineProducer<Error, Requirements> = (input: BuiltInMachineProducerInput) => Effect.Effect<BuiltInShowData, Error, Requirements>;
234
- export interface BuiltInMachineRegistry<Error, Requirements> {
235
- readonly producers: ReadonlyMap<string, BuiltInMachineProducer<Error, Requirements>>;
231
+ /**
232
+ * Host producers are Promise callbacks because Analysis exposes Promise APIs.
233
+ * The Report Host adapts this one external callback with `Effect.tryPromise`;
234
+ * producers never start or own an Effect runtime.
235
+ */
236
+ export type BuiltInMachineProducer = (input: BuiltInMachineProducerInput) => Promise<BuiltInShowData>;
237
+ export interface BuiltInMachineRegistry {
238
+ readonly producers: ReadonlyMap<string, BuiltInMachineProducer>;
236
239
  }
237
240
  export interface BuiltInMachineProducerMissing {
238
241
  readonly code: "report-built-in-machine-producer-missing";
@@ -250,14 +253,14 @@ export declare function builtInMachineDescriptorOf(value: unknown): BuiltInMachi
250
253
  * The Host selects the producer from its own registry by producerId. The
251
254
  * descriptor is never called and cannot contain a callback to call.
252
255
  */
253
- export declare function produceBuiltInShowData<Error, Requirements>(input: {
254
- readonly registry: BuiltInMachineRegistry<Error, Requirements>;
256
+ export declare function produceBuiltInShowData(input: {
257
+ readonly registry: BuiltInMachineRegistry;
255
258
  readonly descriptor: BuiltInMachineDescriptor;
256
259
  readonly sample: Sample;
257
260
  readonly selection: ShowSelection;
258
261
  readonly route: string;
259
262
  readonly pageId: string;
260
- }): Effect.Effect<BuiltInShowData, Error | BuiltInMachineProducerMissing, Requirements | Scope.Scope>;
263
+ }): Promise<BuiltInShowData> | BuiltInMachineProducerMissing;
261
264
  /** Builds the docs-defined built-in show document from already closed domain data. */
262
265
  export declare function builtInShowDocument(input: {
263
266
  readonly selection: ShowSelection;
@@ -1,5 +1,3 @@
1
- import { Effect } from "effect";
2
- import type * as Scope from "effect/Scope";
3
1
  import type { JsonValue, Sample } from "../../analysis/contracts.js";
4
2
  import { type PricingProfile } from "../../analysis/cost.js";
5
3
  import type { LocalizedText } from "../../shared/types.js";
@@ -230,9 +228,14 @@ export interface BuiltInMachineProducerInput {
230
228
  readonly pageId: string;
231
229
  }
232
230
  /** This callback is held only in a Host registry—not on a descriptor. */
233
- export type BuiltInMachineProducer<Error, Requirements> = (input: BuiltInMachineProducerInput) => Effect.Effect<BuiltInShowData, Error, Requirements>;
234
- export interface BuiltInMachineRegistry<Error, Requirements> {
235
- readonly producers: ReadonlyMap<string, BuiltInMachineProducer<Error, Requirements>>;
231
+ /**
232
+ * Host producers are Promise callbacks because Analysis exposes Promise APIs.
233
+ * The Report Host adapts this one external callback with `Effect.tryPromise`;
234
+ * producers never start or own an Effect runtime.
235
+ */
236
+ export type BuiltInMachineProducer = (input: BuiltInMachineProducerInput) => Promise<BuiltInShowData>;
237
+ export interface BuiltInMachineRegistry {
238
+ readonly producers: ReadonlyMap<string, BuiltInMachineProducer>;
236
239
  }
237
240
  export interface BuiltInMachineProducerMissing {
238
241
  readonly code: "report-built-in-machine-producer-missing";
@@ -250,14 +253,14 @@ export declare function builtInMachineDescriptorOf(value: unknown): BuiltInMachi
250
253
  * The Host selects the producer from its own registry by producerId. The
251
254
  * descriptor is never called and cannot contain a callback to call.
252
255
  */
253
- export declare function produceBuiltInShowData<Error, Requirements>(input: {
254
- readonly registry: BuiltInMachineRegistry<Error, Requirements>;
256
+ export declare function produceBuiltInShowData(input: {
257
+ readonly registry: BuiltInMachineRegistry;
255
258
  readonly descriptor: BuiltInMachineDescriptor;
256
259
  readonly sample: Sample;
257
260
  readonly selection: ShowSelection;
258
261
  readonly route: string;
259
262
  readonly pageId: string;
260
- }): Effect.Effect<BuiltInShowData, Error | BuiltInMachineProducerMissing, Requirements | Scope.Scope>;
263
+ }): Promise<BuiltInShowData> | BuiltInMachineProducerMissing;
261
264
  /** Builds the docs-defined built-in show document from already closed domain data. */
262
265
  export declare function builtInShowDocument(input: {
263
266
  readonly selection: ShowSelection;
@@ -176,14 +176,19 @@ function presentBuiltInMachineShow(input) {
176
176
  const data = yield* effect_1.Effect.tryPromise({
177
177
  // The producer's Analysis facade captures the execution-local issue
178
178
  // token synchronously, so it must start inside the capture context.
179
- try: () => capture.run(() => effect_1.Effect.runPromise(effect_1.Effect.scoped((0, machine_ts_2.produceBuiltInShowData)({
180
- registry: machine_ts_3.builtInMachineRegistry,
181
- descriptor: input.descriptor,
182
- sample: input.sample,
183
- selection: input.selection,
184
- route,
185
- pageId,
186
- })))),
179
+ try: () => capture.run(() => {
180
+ const produced = (0, machine_ts_2.produceBuiltInShowData)({
181
+ registry: machine_ts_3.builtInMachineRegistry,
182
+ descriptor: input.descriptor,
183
+ sample: input.sample,
184
+ selection: input.selection,
185
+ route,
186
+ pageId,
187
+ });
188
+ if ("code" in produced)
189
+ throw produced;
190
+ return produced;
191
+ }),
187
192
  catch: (cause) => {
188
193
  if (isMachineShowFailure(cause))
189
194
  return cause;