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":"from-record.js","sourceRoot":"","sources":["from-record.ts"],"names":[],"mappings":";;AA4EA,oDAIC;AAMD,8DAKC;AAED,8DAOC;AAOD,4EAIC;AA/GD,mCAAgC;AAGhC,uFAA4E;AAC5E,oDAAsD;AAEtD,sDAA2D;AAE3D,6DAA0D;AAI1D,8DAA4I;AAC5I,0DAAmI;AAEnI,yEAA+E;AAC/E,uDAAoE;AACpE,uFAA4F;AAC5F,0DAAoD;AACpD,uDAAqF;AAErF,wDAAyW;AACzW,gDAA4D;AAG5D,6CAAqO;AACrO,6CAA4F;AAC5F,qDAA2E;AAC3E,uDAA2F;AAC3F,+CAAoD;AACpD,2CAA4E;AAC5E,MAAM,eAAe,GAAG,EAAE,CAAC;AAyC3B;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,K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AC,CAAC;KACpG,CAAC,CAAC,CAAC;AACR,CAAC;AACD,SAAS,mBAAmB,CAAC,YAA0B,EAAE,MAAoD,EAAE,cAAsB;IACjI,OAAO,GAAG,YAAY,KAAK,MAAM,KAAK,cAAc,EAAE,CAAC;AAC3D,CAAC;AACD,SAAS,mBAAmB,CAAC,SAAoD,EAAE,KAAc;IAC7F,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,iCAA0C;QAChD,SAAS;QACT,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,SAAS;KAC1G,CAAC,CAAC;AACP,CAAC;AACD,SAAS,mBAAmB,CAAC,KAAa;IACtC,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC;AACvD,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport type { AttemptLocator } from \"../../attempt-locator.ts\";\nimport { resolveAttemptLocator } from \"../../attempt-locator-resolution.ts\";\nimport { analysisHost } from \"../../analysis/host.ts\";\nimport type { AnalysisSelectionRequest, ExperimentId, JsonValue, Sample, } from \"../../analysis/index.ts\";\nimport { experimentGroups } from \"../../analysis/index.ts\";\nimport type { RecordCoordination } from \"../../coordination/record-leases.ts\";\nimport { recordHost } from \"../../record/host/runtime.ts\";\nimport type { RecordRoot } from \"../../record/platform/root.ts\";\nimport type { RecordFileSystem } from \"../../record/platform/services.ts\";\nimport type { RecordReaderOpenError, RecordReaderReadError, } from \"../../record/reader/errors.ts\";\nimport { captureAnalysisIssues, narrowSample, narrowSampleByCurrentIdentity, type AnalysisIssueCapture, } from \"../../sample/capability.ts\";\nimport { materializeSampleSnapshot, narrowSampleSnapshot, narrowSampleSnapshotByCurrentIdentity, } from \"../../sample/analysis.ts\";\nimport type { RecordReadSession, RecordSelection, } from \"../../record/host/types.ts\";\nimport { defaultAttemptOverviewReport } from \"../built-in/attempt-overview.ts\";\nimport { builtInMachineProducerIds, } from \"../built-in/machine.ts\";\nimport { defaultRunMembershipOverviewReport } from \"../built-in/run-membership-overview.ts\";\nimport { standard } from \"../built-in/standard.tsx\";\nimport { resolveReportTitle, type ReportDefinition, } from \"../definition/report.ts\";\nimport type { ClosedSiteRevision } from \"../execution/model.ts\";\nimport { builtInMachineDescriptorOf, builtInShowDocument, buildReportProjections, canonicalMachineJson, closePricingProfileJson, customTargetExecutionManifest, produceBuiltInShowData, reportProjectionFailure, type BuiltInMachineDescriptor, type BuiltInMachineProducerMissing, type ReportProjectionCostInput, type ShowSelection, } from \"../execution/machine.ts\";\nimport { renderResolvedPageText } from \"../runtime/text.ts\";\nimport type { PanelMode } from \"../model/panel.ts\";\nimport type { ThemeDefinition } from \"../theme.ts\";\nimport { executeReportSite, startReportBuildBudget, executeReportTarget, reportDefinitionIdentity, type ClosedReportSite, type ClosedTargetExecution, type ReportBuildBudgetAnchor, type ReportExecutionError, } from \"./execute.ts\";\nimport { builtInMachineRegistry, type BuiltInMachineProductionFailed, } from \"./machine.ts\";\nimport { selectShowTarget, type ShowTargetError, } from \"./show-target.ts\";\nimport { isReportTargetRouteInvalid, showTargetRequestForRoute, } from \"./target-route.ts\";\nimport { withReportHostPhase } from \"./progress.ts\";\nimport { buildSiteRevision, type ReportSiteBuildError, } from \"./static.ts\";\nconst SHOW_TEXT_WIDTH = 80;\nexport interface ReportShowPresentationFailed {\n readonly code: \"report-show-presentation-failed\";\n readonly operation: \"text\" | \"machine\";\n readonly reason: string;\n}\nexport interface ReportSampleEmpty {\n readonly code: \"report-sample-empty\";\n}\nexport type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | ReportSampleEmpty | {\n readonly code: \"sample-attempt-locator-not-found\";\n readonly locator: AttemptLocator;\n} | {\n readonly code: \"sample-attempt-locator-ambiguous\";\n readonly locator: AttemptLocator;\n};\nexport type ExecuteReportForAttemptFromRecordError = ExecuteReportFromRecordError;\nexport type ExecuteReportFromRecordRequirements = RecordFileSystem | RecordCoordination;\ninterface SelectionTarget {\n readonly root: RecordRoot;\n readonly selection: AnalysisSelectionRequest;\n readonly report?: ReportDefinition;\n}\ninterface AttemptTarget {\n readonly root: RecordRoot;\n readonly locator: AttemptLocator;\n readonly report?: ReportDefinition;\n}\nexport type ReportRecordTarget = SelectionTarget | AttemptTarget;\nexport type ShowReportFromRecordInput = ReportRecordTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n};\nexport type BuildReportSiteFromRecordInput = ReportRecordTarget & {\n readonly theme?: ThemeDefinition;\n};\nexport type CloseReportSiteFromRecordInput = ReportRecordTarget;\n/**\n * The Record-backed show boundary executes and closes exactly one Page. It\n * never enumerates a parameterized Page and never forms a Site revision.\n */\nexport function showReportFromRecord(input: ShowReportFromRecordInput): Effect.Effect<string, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return \"locator\" in input\n ? showAttemptFromRecord(input)\n : showSelectionFromRecord(input);\n}\n/**\n * The Record-backed site boundary enumerates every Page instance once, closes\n * all projections while the Sample is live, and then forms one opaque byte\n * revision consumed unchanged by view and static export.\n */\nexport function buildReportSiteFromRecord(input: BuildReportSiteFromRecordInput): Effect.Effect<ClosedSiteRevision, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.flatMap(closeReportSiteFromRecord(input), (site) => buildSiteRevision({\n site,\n ...(input.theme === undefined ? {} : { theme: input.theme }),\n }));\n}\n/** @internal Page-level cache input: closed data only, with no live Sample. */\nexport function closeReportSiteFromRecord(input: CloseReportSiteFromRecordInput): Effect.Effect<ClosedReportSite, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.suspend<ClosedReportSite, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements>(() => {\n const budget = startReportBuildBudget();\n return \"locator\" in input\n ? closeAttemptSiteFromRecord(input, budget)\n : closeSelectionSiteFromRecord(input, budget);\n });\n}\n/**\n * @internal Watch-only Record probe. It shares the same selection and\n * project-current/attempt narrowing as Sample opening, but stops after the\n * selected semantic snapshot is materialized. No Sample capability or Report\n * callback is opened on this path.\n */\nexport function reportSnapshotIdentityFromRecord(input: ReportRecordTarget): Effect.Effect<string, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.scoped(\"locator\" in input\n ? snapshotIdentityForAttempt(input.root, input.locator)\n : snapshotIdentityForSelection(input.root, input.selection));\n}\nfunction showSelectionFromRecord(input: SelectionTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openSelectionSample(input.root, input.selection);\n const report = input.report ?? defaultReportForSelection(input.selection);\n const selection = showSelectionForRequest(sample, input.selection);\n const implicitRoute = input.route === undefined && input.selection.policy !== \"explicit-runs\"\n ? singleExperimentGroupRoute(report, sample)\n : undefined;\n return yield* presentShowTarget({\n sample,\n report,\n selection,\n ...(input.route === undefined && implicitRoute === undefined ? {} : { route: input.route ?? implicitRoute }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n format: input.format ?? \"text\",\n });\n }));\n}\nfunction singleExperimentGroupRoute(report: ReportDefinition, sample: Sample): string | undefined {\n const groups = experimentGroups(sample);\n if (groups.length !== 1)\n return undefined;\n const group = groups[0]!.group;\n const declaresGroupPage = report.pages.some((page) => \"role\" in page\n && page.role?.kind === \"experiment-group\"\n && page.role.groupKind === group.kind);\n return declaresGroupPage ? groupRoute(group) : undefined;\n}\nfunction groupRoute(group: import(\"../../analysis/index.ts\").ExperimentGroupIdentity): string {\n return group.kind === \"named\"\n ? `/group/named/${group.groupId}`\n : `/group/singleton/${String(group.experimentId)}`;\n}\nfunction showAttemptFromRecord(input: AttemptTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openAttemptSample(input.root, input.locator);\n const report = input.report ?? defaultAttemptOverviewReport;\n const selection: ShowSelection = Object.freeze({\n kind: \"attempt-locator\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n locator: String(input.locator),\n });\n return yield* presentShowTarget({\n sample,\n report,\n selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n format: input.format ?? \"text\",\n });\n }));\n}\n/**\n * One selected target for one fixed Sample. A built-in machine Report is\n * executed by the Host-owned producer registry from its data-only descriptor;\n * its author callbacks are never invoked, so a duplicate installed copy is\n * recognized and executed safely. Custom Reports keep executing the selected\n * author Page and then present the closed result.\n */\nfunction presentShowTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly selection: ShowSelection;\n readonly route?: string;\n readonly format: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<string, ExecuteReportFromRecordError, Scope.Scope> {\n if (input.format === \"json\") {\n const descriptor = builtInMachineDescriptorOf(input.report);\n if (descriptor !== undefined) {\n return presentBuiltInMachineShow({\n sample: input.sample,\n report: input.report,\n descriptor,\n selection: input.selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n });\n }\n }\n return Effect.gen(function* () {\n const execution = yield* withReportHostPhase(\"report-execution\", executeReportTarget({\n sample: input.sample,\n report: input.report,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n }));\n return yield* presentTarget({\n sample: input.sample,\n report: input.report,\n execution,\n selection: input.selection,\n format: input.format,\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n });\n });\n}\n/**\n * Produces the Host-owned built-in machine document without executing any\n * author callback. Route and Page selection stay pure; the producer registry\n * resolves the data-only descriptor, and the analysis capture records the\n * same problem table an author execution would surface.\n */\nfunction presentBuiltInMachineShow(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly descriptor: BuiltInMachineDescriptor;\n readonly selection: ShowSelection;\n readonly route?: string;\n}): Effect.Effect<string, ReportExecutionError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed, Scope.Scope> {\n return withReportHostPhase(\"report-execution\", Effect.gen(function* () {\n const request = showTargetRequestForRoute(input.report, input.route);\n if (isReportTargetRouteInvalid(request))\n return yield* Effect.fail(request);\n const selected = selectShowTarget(input.report, request);\n if (isShowTargetSelectionError(selected)) {\n return yield* Effect.fail(selected);\n }\n const pageId = selected.page.id;\n const route = selected.kind === \"plain\" ? selected.target.route : selected.route;\n const capture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.gen(function* () {\n const data = yield* Effect.tryPromise({\n // The producer's Analysis facade captures the execution-local issue\n // token synchronously, so it must start inside the capture context.\n try: () => capture.run(() => Effect.runPromise(Effect.scoped(produceBuiltInShowData({\n registry: builtInMachineRegistry,\n descriptor: input.descriptor,\n sample: input.sample,\n selection: input.selection,\n route,\n pageId,\n })))),\n catch: (cause): BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed => {\n if (isMachineShowFailure(cause))\n return cause;\n return presentationFailure(\"machine\", cause);\n },\n });\n const costs = capturedProjectionCosts(capture, route, pageId);\n const pricingProfile = reportPricingProfileJson(input.report);\n const failure = reportProjectionFailure({ pricingProfile, costs });\n if (failure !== undefined)\n return yield* Effect.fail(failure);\n return yield* Effect.try({\n try: () => `${canonicalMachineJson(builtInShowDocument({\n selection: input.selection,\n report: {\n token: builtInToken(input.descriptor.producerId),\n identity: reportDefinitionIdentity(input.report),\n },\n page: {\n route,\n pageId,\n title: selected.page.title,\n },\n data,\n // The built-in data keeps no second enumerable projection; the\n // capture's cost entries are the only source, bound to this Page.\n projections: buildReportProjections({\n pricingProfile,\n costs,\n }),\n problems: machineProblems(capture.issues(), pageId),\n }))}\\n`,\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"machine\", cause),\n });\n }), Effect.sync(() => capture.close()));\n }));\n}\nfunction closeSelectionSiteFromRecord(input: SelectionTarget, budget: ReportBuildBudgetAnchor) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openSelectionSample(input.root, input.selection);\n if (sample.snapshot.coverage.selected === 0) {\n return yield* Effect.fail(Object.freeze({ code: \"report-sample-empty\" as const }));\n }\n return yield* withReportHostPhase(\"report-execution\", executeReportSite({\n sample,\n report: input.report ?? defaultReportForSelection(input.selection),\n budget,\n }));\n }));\n}\nfunction closeAttemptSiteFromRecord(input: AttemptTarget, budget: ReportBuildBudgetAnchor) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openAttemptSample(input.root, input.locator);\n return yield* withReportHostPhase(\"report-execution\", executeReportSite({\n sample,\n report: input.report ?? defaultAttemptOverviewReport,\n budget,\n }));\n }));\n}\ninterface SelectedRecordTarget {\n readonly reader: RecordReadSession;\n readonly selection: RecordSelection;\n}\ninterface SelectedAttemptTarget extends SelectedRecordTarget {\n readonly selectionRequest: AnalysisSelectionRequest;\n readonly runId: import(\"../../analysis/contracts.ts\").RunId;\n readonly slotId: import(\"../../analysis/contracts.ts\").SlotId;\n}\n/** The shared true selection boundary for both Sample opening and watch probes. */\nfunction selectRecordForSelection(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const reader = yield* withReportHostPhase(\"record-open\", recordHost.current.openRead({ root }));\n const selected = yield* withReportHostPhase(\"selection\", reader.selectRuns(selection.policy === \"explicit-runs\" ? { runIds: selection.runIds } : undefined));\n const filtered = selection.policy === \"project-current\" && selection.experimentIds !== undefined\n ? yield* filterSelectionByExperiment(selected, selection.experimentIds)\n : selected;\n return Object.freeze({ reader, selection: filtered }) satisfies SelectedRecordTarget;\n });\n}\n/** The shared exact-attempt selection boundary for both Sample opening and watch probes. */\nfunction selectRecordForAttempt(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const reader = yield* withReportHostPhase(\"record-open\", recordHost.current.openRead({ root }));\n const resolved = yield* withReportHostPhase(\"selection\", Effect.gen(function* () {\n const selected = yield* reader.selectRuns();\n return yield* resolveAttemptLocator({ reader, selection: selected, locator });\n }));\n if (resolved.kind === \"not-found\") {\n return yield* Effect.fail({ code: \"sample-attempt-locator-not-found\" as const, locator });\n }\n if (resolved.kind === \"ambiguous\") {\n return yield* Effect.fail({ code: \"sample-attempt-locator-ambiguous\" as const, locator });\n }\n const selectionRequest: AnalysisSelectionRequest = Object.freeze({\n policy: \"explicit-runs\" as const,\n runIds: Object.freeze([resolved.run.runId]),\n });\n const selection = yield* reader.selectRuns({ runIds: selectionRequest.runIds });\n return Object.freeze({\n reader,\n selection,\n selectionRequest,\n runId: resolved.run.runId,\n slotId: resolved.slotId,\n }) satisfies SelectedAttemptTarget;\n });\n}\nfunction snapshotIdentityForSelection(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForSelection(root, selection);\n const materialized = yield* materializeSampleSnapshot({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selection,\n });\n const snapshot = selection.policy === \"project-current\"\n ? narrowSampleSnapshotByCurrentIdentity(materialized.snapshot, matchingOccurrencesForCurrentIdentity(selected.selection, selection.currentSlots))\n : materialized.snapshot;\n return snapshot.identity.id;\n });\n}\nfunction snapshotIdentityForAttempt(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForAttempt(root, locator);\n const materialized = yield* materializeSampleSnapshot({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selected.selectionRequest,\n });\n const snapshot = narrowSampleSnapshot(materialized.snapshot, {\n runIds: [selected.runId],\n slotIds: [selected.slotId],\n });\n // This selector is assembled from one successfully resolved Attempt, so\n // the only invalid-selector branch is an internal invariant violation.\n if (\"code\" in snapshot)\n throw snapshot;\n return snapshot.identity.id;\n });\n}\nfunction openSelectionSample(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForSelection(root, selection);\n const opened = yield* withReportHostPhase(\"sample-open\", analysisHost.openSample({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selection,\n }));\n return selection.policy === \"project-current\"\n ? narrowSampleByCurrentIdentity(opened, matchingOccurrencesForCurrentIdentity(selected.selection, selection.currentSlots))\n : opened;\n });\n}\nfunction openAttemptSample(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForAttempt(root, locator);\n const sample = yield* withReportHostPhase(\"sample-open\", analysisHost.openSample({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selected.selectionRequest,\n }));\n return narrowSample(sample, {\n runIds: [selected.runId],\n slotIds: [selected.slotId],\n });\n });\n}\nfunction presentTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly execution: ClosedTargetExecution;\n readonly selection: ShowSelection;\n readonly format: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<string, ReportShowPresentationFailed, Scope.Scope> {\n if (input.format === \"text\") {\n return Effect.try({\n try: () => withTrailingNewline(renderResolvedPageText(input.execution.page, {\n locale: \"en\",\n width: input.textProjection?.width ?? SHOW_TEXT_WIDTH,\n panelMode: input.textProjection?.panelMode ?? \"plain\",\n })),\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"text\", cause),\n });\n }\n return Effect.try({\n try: () => `${canonicalMachineJson(customTargetExecutionManifest({\n selection: input.selection,\n report: {\n identity: reportDefinitionIdentity(input.report),\n title: resolveReportTitle(input.report),\n },\n page: input.execution.page,\n textWidth: SHOW_TEXT_WIDTH,\n projections: input.execution.projections,\n problems: input.execution.problems,\n }))}\\n`,\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"machine\", cause),\n });\n}\nfunction isMachineShowFailure(value: unknown): value is BuiltInMachineProductionFailed | BuiltInMachineProducerMissing {\n return typeof value === \"object\" && value !== null &&\n (Reflect.get(value, \"code\") === \"report-built-in-machine-producer-missing\" ||\n Reflect.get(value, \"code\") === \"report-built-in-machine-production-failed\");\n}\n/** Distinguishes the pure selection error from a selected target without importing the private union. */\nfunction isShowTargetSelectionError(value: unknown): value is ShowTargetError {\n return typeof value === \"object\" && value !== null && \"code\" in value;\n}\n/** The closed JSON form of the Report's PricingProfile, or null without one. */\nfunction reportPricingProfileJson(report: ReportDefinition): JsonValue | null {\n return report.pricing === null ? null : closePricingProfileJson(report.pricing);\n}\n/** Binds exact Analysis row-level cost captures to the built-in target Page. */\nfunction capturedProjectionCosts(capture: AnalysisIssueCapture, route: string, pageId: string): readonly ReportProjectionCostInput[] {\n return capture.costEntries().map((entry) => Object.freeze({\n page: Object.freeze({ pageId, route }),\n measureId: entry.measureId,\n row: Object.freeze({ key: entry.row.key, dimensions: entry.row.dimensions }),\n profileIdentity: entry.profileIdentity,\n projection: entry.projection,\n }));\n}\n/** The host problem table for issues the machine producer recorded while the Sample was live. */\nfunction machineProblems(issues: readonly import(\"../../analysis/index.ts\").AnalysisIssue[], pageId: string): readonly import(\"../execution/machine.ts\").ReportProblem[] {\n return Object.freeze(issues.map((issue) => Object.freeze({\n code: `analysis-${issue.code}`,\n path: Object.freeze([\"page\", pageId]),\n refs: Object.freeze(issue.refs.map((reference) => String(reference.identity.locator)).sort(compareUtf8)),\n summary: issue.message,\n })));\n}\nfunction builtInToken(producerId: string): string {\n switch (producerId) {\n case builtInMachineProducerIds.runMembershipOverview:\n return \"run-membership-overview\";\n case builtInMachineProducerIds.attemptOverview:\n return \"attempt-overview\";\n case builtInMachineProducerIds.standard:\n return \"standard\";\n default:\n return producerId;\n }\n}\nfunction showSelectionForRequest(sample: Sample, selection: AnalysisSelectionRequest): ShowSelection {\n if (selection.policy === \"explicit-runs\") {\n return Object.freeze({\n kind: \"explicit-runs\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n runIds: Object.freeze(selection.runIds.map(String)),\n });\n }\n const experimentIds = selection.experimentIds ?? selection.currentSlots.map((slot) => slot.experimentId);\n return Object.freeze({\n kind: \"project-current\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n experimentIds: Object.freeze(experimentIds.map(String)),\n });\n}\nfunction defaultReportForSelection(selection: AnalysisSelectionRequest): ReportDefinition {\n return selection.policy === \"explicit-runs\"\n ? defaultRunMembershipOverviewReport\n : standard;\n}\nfunction matchingOccurrencesForCurrentIdentity(selection: import(\"../../record/host/types.ts\").RecordSelection, currentSlots: readonly import(\"../../analysis/contracts.ts\").AnalysisCurrentSlotIdentity[]): readonly import(\"../../analysis/contracts.ts\").AnalysisSlotOccurrenceIdentity[] {\n const digestsByLogicalAlignment = new Map<string, Set<string>>();\n for (const current of currentSlots) {\n const key = logicalAlignmentKey(current.experimentId, current.evalId, current.attemptOrdinal);\n const existing = digestsByLogicalAlignment.get(key) ?? new Set<string>();\n digestsByLogicalAlignment.set(key, existing.add(current.executionIdentityDigest));\n }\n const matching: import(\"../../analysis/contracts.ts\").AnalysisSlotOccurrenceIdentity[] = [];\n for (const entry of selection.expectedSlots) {\n const digests = digestsByLogicalAlignment.get(logicalAlignmentKey(entry.experimentId, entry.slot.evalId, entry.slot.attemptOrdinal));\n if (digests === undefined || !digests.has(entry.slot.executionIdentityDigest))\n continue;\n matching.push(Object.freeze({ runId: entry.run.runId, slotId: entry.slot.slotId }));\n }\n return Object.freeze(matching);\n}\nfunction filterSelectionByExperiment(selection: import(\"../../record/host/types.ts\").RecordSelection, experimentIds: readonly ExperimentId[]): Effect.Effect<import(\"../../record/host/types.ts\").RecordSelection> {\n const wanted = new Set(experimentIds);\n const runFacts = selection.runFacts.filter((facts) => wanted.has(facts.experimentId));\n const allowed = new Set(runFacts.map((facts) => facts.run));\n const allowedRunIds = new Set(runFacts.map((facts) => facts.run.runId));\n return Effect.succeed(Object.freeze({\n runRefs: Object.freeze(runFacts.map((facts) => facts.run)),\n runFacts: Object.freeze(runFacts),\n expectedSlots: Object.freeze(selection.expectedSlots.filter((entry) => allowed.has(entry.run))),\n // `selectRuns()` initially scans the Record-wide physical directory. A\n // concurrently written, unselected Run may therefore be incomplete for a\n // moment. Its warning/problem must not alter the selected semantic Sample\n // (or make an unrelated watch signal reopen Analysis).\n problems: Object.freeze(selection.problems.filter((problem) => allowedRunIds.has(problem.runId))),\n warnings: Object.freeze(selection.warnings.filter((warning) => allowedRunIds.has(warning.runId))),\n }));\n}\nfunction logicalAlignmentKey(experimentId: ExperimentId, evalId: import(\"../../analysis/contracts.ts\").EvalId, attemptOrdinal: number): string {\n return `${experimentId}\\0${evalId}\\0${attemptOrdinal}`;\n}\nfunction presentationFailure(operation: ReportShowPresentationFailed[\"operation\"], cause: unknown): ReportShowPresentationFailed {\n const raw = cause instanceof Error ? cause.message : String(cause);\n return Object.freeze({\n code: \"report-show-presentation-failed\" as const,\n operation,\n reason: raw.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || `${operation} failed`,\n });\n}\nfunction withTrailingNewline(value: string): string {\n return value.endsWith(\"\\n\") ? value : `${value}\\n`;\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left),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OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC;AACvD,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport type { AttemptLocator } from \"../../attempt-locator.ts\";\nimport { resolveAttemptLocator } from \"../../attempt-locator-resolution.ts\";\nimport { analysisHost } from \"../../analysis/host.ts\";\nimport type { AnalysisSelectionRequest, ExperimentId, JsonValue, Sample, } from \"../../analysis/index.ts\";\nimport { experimentGroups } from \"../../analysis/index.ts\";\nimport type { RecordCoordination } from \"../../coordination/record-leases.ts\";\nimport { recordHost } from \"../../record/host/runtime.ts\";\nimport type { RecordRoot } from \"../../record/platform/root.ts\";\nimport type { RecordFileSystem } from \"../../record/platform/services.ts\";\nimport type { RecordReaderOpenError, RecordReaderReadError, } from \"../../record/reader/errors.ts\";\nimport { captureAnalysisIssues, narrowSample, narrowSampleByCurrentIdentity, type AnalysisIssueCapture, } from \"../../sample/capability.ts\";\nimport { materializeSampleSnapshot, narrowSampleSnapshot, narrowSampleSnapshotByCurrentIdentity, } from \"../../sample/analysis.ts\";\nimport type { RecordReadSession, RecordSelection, } from \"../../record/host/types.ts\";\nimport { defaultAttemptOverviewReport } from \"../built-in/attempt-overview.ts\";\nimport { builtInMachineProducerIds, } from \"../built-in/machine.ts\";\nimport { defaultRunMembershipOverviewReport } from \"../built-in/run-membership-overview.ts\";\nimport { standard } from \"../built-in/standard.tsx\";\nimport { resolveReportTitle, type ReportDefinition, } from \"../definition/report.ts\";\nimport type { ClosedSiteRevision } from \"../execution/model.ts\";\nimport { builtInMachineDescriptorOf, builtInShowDocument, buildReportProjections, canonicalMachineJson, closePricingProfileJson, customTargetExecutionManifest, produceBuiltInShowData, reportProjectionFailure, type BuiltInMachineDescriptor, type BuiltInMachineProducerMissing, type ReportProjectionCostInput, type ShowSelection, } from \"../execution/machine.ts\";\nimport { renderResolvedPageText } from \"../runtime/text.ts\";\nimport type { PanelMode } from \"../model/panel.ts\";\nimport type { ThemeDefinition } from \"../theme.ts\";\nimport { executeReportSite, startReportBuildBudget, executeReportTarget, reportDefinitionIdentity, type ClosedReportSite, type ClosedTargetExecution, type ReportBuildBudgetAnchor, type ReportExecutionError, } from \"./execute.ts\";\nimport { builtInMachineRegistry, type BuiltInMachineProductionFailed, } from \"./machine.ts\";\nimport { selectShowTarget, type ShowTargetError, } from \"./show-target.ts\";\nimport { isReportTargetRouteInvalid, showTargetRequestForRoute, } from \"./target-route.ts\";\nimport { withReportHostPhase } from \"./progress.ts\";\nimport { buildSiteRevision, type ReportSiteBuildError, } from \"./static.ts\";\nconst SHOW_TEXT_WIDTH = 80;\nexport interface ReportShowPresentationFailed {\n readonly code: \"report-show-presentation-failed\";\n readonly operation: \"text\" | \"machine\";\n readonly reason: string;\n}\nexport interface ReportSampleEmpty {\n readonly code: \"report-sample-empty\";\n}\nexport type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | ReportSampleEmpty | {\n readonly code: \"sample-attempt-locator-not-found\";\n readonly locator: AttemptLocator;\n} | {\n readonly code: \"sample-attempt-locator-ambiguous\";\n readonly locator: AttemptLocator;\n};\nexport type ExecuteReportForAttemptFromRecordError = ExecuteReportFromRecordError;\nexport type ExecuteReportFromRecordRequirements = RecordFileSystem | RecordCoordination;\ninterface SelectionTarget {\n readonly root: RecordRoot;\n readonly selection: AnalysisSelectionRequest;\n readonly report?: ReportDefinition;\n}\ninterface AttemptTarget {\n readonly root: RecordRoot;\n readonly locator: AttemptLocator;\n readonly report?: ReportDefinition;\n}\nexport type ReportRecordTarget = SelectionTarget | AttemptTarget;\nexport type ShowReportFromRecordInput = ReportRecordTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n};\nexport type BuildReportSiteFromRecordInput = ReportRecordTarget & {\n readonly theme?: ThemeDefinition;\n};\nexport type CloseReportSiteFromRecordInput = ReportRecordTarget;\n/**\n * The Record-backed show boundary executes and closes exactly one Page. It\n * never enumerates a parameterized Page and never forms a Site revision.\n */\nexport function showReportFromRecord(input: ShowReportFromRecordInput): Effect.Effect<string, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return \"locator\" in input\n ? showAttemptFromRecord(input)\n : showSelectionFromRecord(input);\n}\n/**\n * The Record-backed site boundary enumerates every Page instance once, closes\n * all projections while the Sample is live, and then forms one opaque byte\n * revision consumed unchanged by view and static export.\n */\nexport function buildReportSiteFromRecord(input: BuildReportSiteFromRecordInput): Effect.Effect<ClosedSiteRevision, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.flatMap(closeReportSiteFromRecord(input), (site) => buildSiteRevision({\n site,\n ...(input.theme === undefined ? {} : { theme: input.theme }),\n }));\n}\n/** @internal Page-level cache input: closed data only, with no live Sample. */\nexport function closeReportSiteFromRecord(input: CloseReportSiteFromRecordInput): Effect.Effect<ClosedReportSite, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.suspend<ClosedReportSite, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements>(() => {\n const budget = startReportBuildBudget();\n return \"locator\" in input\n ? closeAttemptSiteFromRecord(input, budget)\n : closeSelectionSiteFromRecord(input, budget);\n });\n}\n/**\n * @internal Watch-only Record probe. It shares the same selection and\n * project-current/attempt narrowing as Sample opening, but stops after the\n * selected semantic snapshot is materialized. No Sample capability or Report\n * callback is opened on this path.\n */\nexport function reportSnapshotIdentityFromRecord(input: ReportRecordTarget): Effect.Effect<string, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.scoped(\"locator\" in input\n ? snapshotIdentityForAttempt(input.root, input.locator)\n : snapshotIdentityForSelection(input.root, input.selection));\n}\nfunction showSelectionFromRecord(input: SelectionTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openSelectionSample(input.root, input.selection);\n const report = input.report ?? defaultReportForSelection(input.selection);\n const selection = showSelectionForRequest(sample, input.selection);\n const implicitRoute = input.route === undefined && input.selection.policy !== \"explicit-runs\"\n ? singleExperimentGroupRoute(report, sample)\n : undefined;\n return yield* presentShowTarget({\n sample,\n report,\n selection,\n ...(input.route === undefined && implicitRoute === undefined ? {} : { route: input.route ?? implicitRoute }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n format: input.format ?? \"text\",\n });\n }));\n}\nfunction singleExperimentGroupRoute(report: ReportDefinition, sample: Sample): string | undefined {\n const groups = experimentGroups(sample);\n if (groups.length !== 1)\n return undefined;\n const group = groups[0]!.group;\n const declaresGroupPage = report.pages.some((page) => \"role\" in page\n && page.role?.kind === \"experiment-group\"\n && page.role.groupKind === group.kind);\n return declaresGroupPage ? groupRoute(group) : undefined;\n}\nfunction groupRoute(group: import(\"../../analysis/index.ts\").ExperimentGroupIdentity): string {\n return group.kind === \"named\"\n ? `/group/named/${group.groupId}`\n : `/group/singleton/${String(group.experimentId)}`;\n}\nfunction showAttemptFromRecord(input: AttemptTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openAttemptSample(input.root, input.locator);\n const report = input.report ?? defaultAttemptOverviewReport;\n const selection: ShowSelection = Object.freeze({\n kind: \"attempt-locator\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n locator: String(input.locator),\n });\n return yield* presentShowTarget({\n sample,\n report,\n selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n format: input.format ?? \"text\",\n });\n }));\n}\n/**\n * One selected target for one fixed Sample. A built-in machine Report is\n * executed by the Host-owned producer registry from its data-only descriptor;\n * its author callbacks are never invoked, so a duplicate installed copy is\n * recognized and executed safely. Custom Reports keep executing the selected\n * author Page and then present the closed result.\n */\nfunction presentShowTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly selection: ShowSelection;\n readonly route?: string;\n readonly format: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<string, ExecuteReportFromRecordError, Scope.Scope> {\n if (input.format === \"json\") {\n const descriptor = builtInMachineDescriptorOf(input.report);\n if (descriptor !== undefined) {\n return presentBuiltInMachineShow({\n sample: input.sample,\n report: input.report,\n descriptor,\n selection: input.selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n });\n }\n }\n return Effect.gen(function* () {\n const execution = yield* withReportHostPhase(\"report-execution\", executeReportTarget({\n sample: input.sample,\n report: input.report,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n }));\n return yield* presentTarget({\n sample: input.sample,\n report: input.report,\n execution,\n selection: input.selection,\n format: input.format,\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n });\n });\n}\n/**\n * Produces the Host-owned built-in machine document without executing any\n * author callback. Route and Page selection stay pure; the producer registry\n * resolves the data-only descriptor, and the analysis capture records the\n * same problem table an author execution would surface.\n */\nfunction presentBuiltInMachineShow(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly descriptor: BuiltInMachineDescriptor;\n readonly selection: ShowSelection;\n readonly route?: string;\n}): Effect.Effect<string, ReportExecutionError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed, Scope.Scope> {\n return withReportHostPhase(\"report-execution\", Effect.gen(function* () {\n const request = showTargetRequestForRoute(input.report, input.route);\n if (isReportTargetRouteInvalid(request))\n return yield* Effect.fail(request);\n const selected = selectShowTarget(input.report, request);\n if (isShowTargetSelectionError(selected)) {\n return yield* Effect.fail(selected);\n }\n const pageId = selected.page.id;\n const route = selected.kind === \"plain\" ? selected.target.route : selected.route;\n const capture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.gen(function* () {\n const data = yield* Effect.tryPromise({\n // The producer's Analysis facade captures the execution-local issue\n // token synchronously, so it must start inside the capture context.\n try: () => capture.run(() => {\n const produced = produceBuiltInShowData({\n registry: builtInMachineRegistry,\n descriptor: input.descriptor,\n sample: input.sample,\n selection: input.selection,\n route,\n pageId,\n });\n if (\"code\" in produced)\n throw produced;\n return produced;\n }),\n catch: (cause): BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed => {\n if (isMachineShowFailure(cause))\n return cause;\n return presentationFailure(\"machine\", cause);\n },\n });\n const costs = capturedProjectionCosts(capture, route, pageId);\n const pricingProfile = reportPricingProfileJson(input.report);\n const failure = reportProjectionFailure({ pricingProfile, costs });\n if (failure !== undefined)\n return yield* Effect.fail(failure);\n return yield* Effect.try({\n try: () => `${canonicalMachineJson(builtInShowDocument({\n selection: input.selection,\n report: {\n token: builtInToken(input.descriptor.producerId),\n identity: reportDefinitionIdentity(input.report),\n },\n page: {\n route,\n pageId,\n title: selected.page.title,\n },\n data,\n // The built-in data keeps no second enumerable projection; the\n // capture's cost entries are the only source, bound to this Page.\n projections: buildReportProjections({\n pricingProfile,\n costs,\n }),\n problems: machineProblems(capture.issues(), pageId),\n }))}\\n`,\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"machine\", cause),\n });\n }), Effect.sync(() => capture.close()));\n }));\n}\nfunction closeSelectionSiteFromRecord(input: SelectionTarget, budget: ReportBuildBudgetAnchor) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openSelectionSample(input.root, input.selection);\n if (sample.snapshot.coverage.selected === 0) {\n return yield* Effect.fail(Object.freeze({ code: \"report-sample-empty\" as const }));\n }\n return yield* withReportHostPhase(\"report-execution\", executeReportSite({\n sample,\n report: input.report ?? defaultReportForSelection(input.selection),\n budget,\n }));\n }));\n}\nfunction closeAttemptSiteFromRecord(input: AttemptTarget, budget: ReportBuildBudgetAnchor) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openAttemptSample(input.root, input.locator);\n return yield* withReportHostPhase(\"report-execution\", executeReportSite({\n sample,\n report: input.report ?? defaultAttemptOverviewReport,\n budget,\n }));\n }));\n}\ninterface SelectedRecordTarget {\n readonly reader: RecordReadSession;\n readonly selection: RecordSelection;\n}\ninterface SelectedAttemptTarget extends SelectedRecordTarget {\n readonly selectionRequest: AnalysisSelectionRequest;\n readonly runId: import(\"../../analysis/contracts.ts\").RunId;\n readonly slotId: import(\"../../analysis/contracts.ts\").SlotId;\n}\n/** The shared true selection boundary for both Sample opening and watch probes. */\nfunction selectRecordForSelection(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const reader = yield* withReportHostPhase(\"record-open\", recordHost.current.openRead({ root }));\n const selected = yield* withReportHostPhase(\"selection\", reader.selectRuns(selection.policy === \"explicit-runs\" ? { runIds: selection.runIds } : undefined));\n const filtered = selection.policy === \"project-current\" && selection.experimentIds !== undefined\n ? yield* filterSelectionByExperiment(selected, selection.experimentIds)\n : selected;\n return Object.freeze({ reader, selection: filtered }) satisfies SelectedRecordTarget;\n });\n}\n/** The shared exact-attempt selection boundary for both Sample opening and watch probes. */\nfunction selectRecordForAttempt(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const reader = yield* withReportHostPhase(\"record-open\", recordHost.current.openRead({ root }));\n const resolved = yield* withReportHostPhase(\"selection\", Effect.gen(function* () {\n const selected = yield* reader.selectRuns();\n return yield* resolveAttemptLocator({ reader, selection: selected, locator });\n }));\n if (resolved.kind === \"not-found\") {\n return yield* Effect.fail({ code: \"sample-attempt-locator-not-found\" as const, locator });\n }\n if (resolved.kind === \"ambiguous\") {\n return yield* Effect.fail({ code: \"sample-attempt-locator-ambiguous\" as const, locator });\n }\n const selectionRequest: AnalysisSelectionRequest = Object.freeze({\n policy: \"explicit-runs\" as const,\n runIds: Object.freeze([resolved.run.runId]),\n });\n const selection = yield* reader.selectRuns({ runIds: selectionRequest.runIds });\n return Object.freeze({\n reader,\n selection,\n selectionRequest,\n runId: resolved.run.runId,\n slotId: resolved.slotId,\n }) satisfies SelectedAttemptTarget;\n });\n}\nfunction snapshotIdentityForSelection(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForSelection(root, selection);\n const materialized = yield* materializeSampleSnapshot({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selection,\n });\n const snapshot = selection.policy === \"project-current\"\n ? narrowSampleSnapshotByCurrentIdentity(materialized.snapshot, matchingOccurrencesForCurrentIdentity(selected.selection, selection.currentSlots))\n : materialized.snapshot;\n return snapshot.identity.id;\n });\n}\nfunction snapshotIdentityForAttempt(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForAttempt(root, locator);\n const materialized = yield* materializeSampleSnapshot({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selected.selectionRequest,\n });\n const snapshot = narrowSampleSnapshot(materialized.snapshot, {\n runIds: [selected.runId],\n slotIds: [selected.slotId],\n });\n // This selector is assembled from one successfully resolved Attempt, so\n // the only invalid-selector branch is an internal invariant violation.\n if (\"code\" in snapshot)\n throw snapshot;\n return snapshot.identity.id;\n });\n}\nfunction openSelectionSample(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForSelection(root, selection);\n const opened = yield* withReportHostPhase(\"sample-open\", analysisHost.openSample({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selection,\n }));\n return selection.policy === \"project-current\"\n ? narrowSampleByCurrentIdentity(opened, matchingOccurrencesForCurrentIdentity(selected.selection, selection.currentSlots))\n : opened;\n });\n}\nfunction openAttemptSample(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForAttempt(root, locator);\n const sample = yield* withReportHostPhase(\"sample-open\", analysisHost.openSample({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selected.selectionRequest,\n }));\n return narrowSample(sample, {\n runIds: [selected.runId],\n slotIds: [selected.slotId],\n });\n });\n}\nfunction presentTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly execution: ClosedTargetExecution;\n readonly selection: ShowSelection;\n readonly format: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<string, ReportShowPresentationFailed, Scope.Scope> {\n if (input.format === \"text\") {\n return Effect.try({\n try: () => withTrailingNewline(renderResolvedPageText(input.execution.page, {\n locale: \"en\",\n width: input.textProjection?.width ?? SHOW_TEXT_WIDTH,\n panelMode: input.textProjection?.panelMode ?? \"plain\",\n })),\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"text\", cause),\n });\n }\n return Effect.try({\n try: () => `${canonicalMachineJson(customTargetExecutionManifest({\n selection: input.selection,\n report: {\n identity: reportDefinitionIdentity(input.report),\n title: resolveReportTitle(input.report),\n },\n page: input.execution.page,\n textWidth: SHOW_TEXT_WIDTH,\n projections: input.execution.projections,\n problems: input.execution.problems,\n }))}\\n`,\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"machine\", cause),\n });\n}\nfunction isMachineShowFailure(value: unknown): value is BuiltInMachineProductionFailed | BuiltInMachineProducerMissing {\n return typeof value === \"object\" && value !== null &&\n (Reflect.get(value, \"code\") === \"report-built-in-machine-producer-missing\" ||\n Reflect.get(value, \"code\") === \"report-built-in-machine-production-failed\");\n}\n/** Distinguishes the pure selection error from a selected target without importing the private union. */\nfunction isShowTargetSelectionError(value: unknown): value is ShowTargetError {\n return typeof value === \"object\" && value !== null && \"code\" in value;\n}\n/** The closed JSON form of the Report's PricingProfile, or null without one. */\nfunction reportPricingProfileJson(report: ReportDefinition): JsonValue | null {\n return report.pricing === null ? null : closePricingProfileJson(report.pricing);\n}\n/** Binds exact Analysis row-level cost captures to the built-in target Page. */\nfunction capturedProjectionCosts(capture: AnalysisIssueCapture, route: string, pageId: string): readonly ReportProjectionCostInput[] {\n return capture.costEntries().map((entry) => Object.freeze({\n page: Object.freeze({ pageId, route }),\n measureId: entry.measureId,\n row: Object.freeze({ key: entry.row.key, dimensions: entry.row.dimensions }),\n profileIdentity: entry.profileIdentity,\n projection: entry.projection,\n }));\n}\n/** The host problem table for issues the machine producer recorded while the Sample was live. */\nfunction machineProblems(issues: readonly import(\"../../analysis/index.ts\").AnalysisIssue[], pageId: string): readonly import(\"../execution/machine.ts\").ReportProblem[] {\n return Object.freeze(issues.map((issue) => Object.freeze({\n code: `analysis-${issue.code}`,\n path: Object.freeze([\"page\", pageId]),\n refs: Object.freeze(issue.refs.map((reference) => String(reference.identity.locator)).sort(compareUtf8)),\n summary: issue.message,\n })));\n}\nfunction builtInToken(producerId: string): string {\n switch (producerId) {\n case builtInMachineProducerIds.runMembershipOverview:\n return \"run-membership-overview\";\n case builtInMachineProducerIds.attemptOverview:\n return \"attempt-overview\";\n case builtInMachineProducerIds.standard:\n return \"standard\";\n default:\n return producerId;\n }\n}\nfunction showSelectionForRequest(sample: Sample, selection: AnalysisSelectionRequest): ShowSelection {\n if (selection.policy === \"explicit-runs\") {\n return Object.freeze({\n kind: \"explicit-runs\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n runIds: Object.freeze(selection.runIds.map(String)),\n });\n }\n const experimentIds = selection.experimentIds ?? selection.currentSlots.map((slot) => slot.experimentId);\n return Object.freeze({\n kind: \"project-current\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n experimentIds: Object.freeze(experimentIds.map(String)),\n });\n}\nfunction defaultReportForSelection(selection: AnalysisSelectionRequest): ReportDefinition {\n return selection.policy === \"explicit-runs\"\n ? defaultRunMembershipOverviewReport\n : standard;\n}\nfunction matchingOccurrencesForCurrentIdentity(selection: import(\"../../record/host/types.ts\").RecordSelection, currentSlots: readonly import(\"../../analysis/contracts.ts\").AnalysisCurrentSlotIdentity[]): readonly import(\"../../analysis/contracts.ts\").AnalysisSlotOccurrenceIdentity[] {\n const digestsByLogicalAlignment = new Map<string, Set<string>>();\n for (const current of currentSlots) {\n const key = logicalAlignmentKey(current.experimentId, current.evalId, current.attemptOrdinal);\n const existing = digestsByLogicalAlignment.get(key) ?? new Set<string>();\n digestsByLogicalAlignment.set(key, existing.add(current.executionIdentityDigest));\n }\n const matching: import(\"../../analysis/contracts.ts\").AnalysisSlotOccurrenceIdentity[] = [];\n for (const entry of selection.expectedSlots) {\n const digests = digestsByLogicalAlignment.get(logicalAlignmentKey(entry.experimentId, entry.slot.evalId, entry.slot.attemptOrdinal));\n if (digests === undefined || !digests.has(entry.slot.executionIdentityDigest))\n continue;\n matching.push(Object.freeze({ runId: entry.run.runId, slotId: entry.slot.slotId }));\n }\n return Object.freeze(matching);\n}\nfunction filterSelectionByExperiment(selection: import(\"../../record/host/types.ts\").RecordSelection, experimentIds: readonly ExperimentId[]): Effect.Effect<import(\"../../record/host/types.ts\").RecordSelection> {\n const wanted = new Set(experimentIds);\n const runFacts = selection.runFacts.filter((facts) => wanted.has(facts.experimentId));\n const allowed = new Set(runFacts.map((facts) => facts.run));\n const allowedRunIds = new Set(runFacts.map((facts) => facts.run.runId));\n return Effect.succeed(Object.freeze({\n runRefs: Object.freeze(runFacts.map((facts) => facts.run)),\n runFacts: Object.freeze(runFacts),\n expectedSlots: Object.freeze(selection.expectedSlots.filter((entry) => allowed.has(entry.run))),\n // `selectRuns()` initially scans the Record-wide physical directory. A\n // concurrently written, unselected Run may therefore be incomplete for a\n // moment. Its warning/problem must not alter the selected semantic Sample\n // (or make an unrelated watch signal reopen Analysis).\n problems: Object.freeze(selection.problems.filter((problem) => allowedRunIds.has(problem.runId))),\n warnings: Object.freeze(selection.warnings.filter((warning) => allowedRunIds.has(warning.runId))),\n }));\n}\nfunction logicalAlignmentKey(experimentId: ExperimentId, evalId: import(\"../../analysis/contracts.ts\").EvalId, attemptOrdinal: number): string {\n return `${experimentId}\\0${evalId}\\0${attemptOrdinal}`;\n}\nfunction presentationFailure(operation: ReportShowPresentationFailed[\"operation\"], cause: unknown): ReportShowPresentationFailed {\n const raw = cause instanceof Error ? cause.message : String(cause);\n return Object.freeze({\n code: \"report-show-presentation-failed\" as const,\n operation,\n reason: raw.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || `${operation} failed`,\n });\n}\nfunction withTrailingNewline(value: string): string {\n return value.endsWith(\"\\n\") ? value : `${value}\\n`;\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reportHost = void 0;
3
+ exports.ReportPlatformError = exports.ReportModulePlatform = exports.ReportBrowser = exports.reportHost = void 0;
4
4
  const effect_1 = require("effect");
5
5
  const server_ts_1 = require("../../view/server.cjs");
6
6
  const from_record_ts_1 = require("./from-record.cjs");
@@ -31,4 +31,8 @@ exports.reportHost = Object.freeze({
31
31
  serve,
32
32
  export: static_ts_1.exportStaticReport,
33
33
  });
34
+ var operations_ts_1 = require("./operations.cjs");
35
+ Object.defineProperty(exports, "ReportBrowser", { enumerable: true, get: function () { return operations_ts_1.ReportBrowser; } });
36
+ Object.defineProperty(exports, "ReportModulePlatform", { enumerable: true, get: function () { return operations_ts_1.ReportModulePlatform; } });
37
+ Object.defineProperty(exports, "ReportPlatformError", { enumerable: true, get: function () { return operations_ts_1.ReportPlatformError; } });
34
38
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,oDAAsD;AAEtD,qDAAwD;AACxD,2CAAiD;AACjD,uDAA0D;AAE1D,SAAS,KAAK,CAAe,KAG5B;IACG,OAAO,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACvB,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,IAAA,uCAAqB,EAAC;YACzC,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,OAAO,KAAK,CAAC,CAAC,IAAA,0BAAc,EAAC;YACzB,OAAO;YACP,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,KAAK,CAAC,IAAI;SACnB,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACD;;;;GAIG;AACU,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,qCAAoB;IAC1B,KAAK;IACL,MAAM,EAAE,8BAAkB;CAC7B,CAAC,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport { openViewServer } from \"../../view/server.ts\";\nimport type { ClosedSiteRevision } from \"../execution/model.ts\";\nimport { showReportFromRecord } from \"./from-record.ts\";\nimport { exportStaticReport } from \"./static.ts\";\nimport { openReportViewSession } from \"./view-session.ts\";\nimport type { OpenReportViewSessionInput } from \"./view-session.ts\";\nfunction serve<Requirements>(input: OpenReportViewSessionInput<Requirements> & {\n readonly host: string;\n readonly port: number;\n}) {\n return Effect.gen(function* () {\n const session = yield* openReportViewSession({\n url: input.url,\n watchInputs: input.watchInputs,\n initial: input.initial,\n rebuild: input.rebuild,\n });\n return yield* openViewServer({\n session,\n host: input.host,\n port: input.port,\n });\n });\n}\n/**\n * The complete public Report Host facade. `show` opens one fixed Sample and\n * executes one target. `serve` and `export` consume complete opaque revisions;\n * loaders, watchers, Record readers, and private Page values stay unexported.\n */\nexport const reportHost = Object.freeze({\n show: showReportFromRecord,\n serve,\n export: exportStaticReport,\n});\nexport type { ClosedSiteRevision };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,oDAAsD;AAEtD,qDAAwD;AACxD,2CAAiD;AACjD,uDAA0D;AAE1D,SAAS,KAAK,CAAe,KAG5B;IACG,OAAO,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACvB,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,IAAA,uCAAqB,EAAC;YACzC,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,OAAO,KAAK,CAAC,CAAC,IAAA,0BAAc,EAAC;YACzB,OAAO;YACP,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,KAAK,CAAC,IAAI;SACnB,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACD;;;;GAIG;AACU,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,qCAAoB;IAC1B,KAAK;IACL,MAAM,EAAE,8BAAkB;CAC7B,CAAC,CAAC;AAEH,iDAA2F;AAAlF,8GAAA,aAAa,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAAE,oHAAA,mBAAmB,OAAA","sourcesContent":["import { Effect } from \"effect\";\nimport { openViewServer } from \"../../view/server.ts\";\nimport type { ClosedSiteRevision } from \"../execution/model.ts\";\nimport { showReportFromRecord } from \"./from-record.ts\";\nimport { exportStaticReport } from \"./static.ts\";\nimport { openReportViewSession } from \"./view-session.ts\";\nimport type { OpenReportViewSessionInput } from \"./view-session.ts\";\nfunction serve<Requirements>(input: OpenReportViewSessionInput<Requirements> & {\n readonly host: string;\n readonly port: number;\n}) {\n return Effect.gen(function* () {\n const session = yield* openReportViewSession({\n url: input.url,\n watchInputs: input.watchInputs,\n initial: input.initial,\n rebuild: input.rebuild,\n });\n return yield* openViewServer({\n session,\n host: input.host,\n port: input.port,\n });\n });\n}\n/**\n * The complete public Report Host facade. `show` opens one fixed Sample and\n * executes one target. `serve` and `export` consume complete opaque revisions;\n * loaders, watchers, Record readers, and private Page values stay unexported.\n */\nexport const reportHost = Object.freeze({\n show: showReportFromRecord,\n serve,\n export: exportStaticReport,\n});\nexport type { ClosedSiteRevision };\nexport { ReportBrowser, ReportModulePlatform, ReportPlatformError } from \"./operations.ts\";\n"]}
@@ -18,3 +18,4 @@ export declare const reportHost: Readonly<{
18
18
  export: typeof exportStaticReport;
19
19
  }>;
20
20
  export type { ClosedSiteRevision };
21
+ export { ReportBrowser, ReportModulePlatform, ReportPlatformError } from "./operations.cjs";
@@ -18,3 +18,4 @@ export declare const reportHost: Readonly<{
18
18
  export: typeof exportStaticReport;
19
19
  }>;
20
20
  export type { ClosedSiteRevision };
21
+ export { ReportBrowser, ReportModulePlatform, ReportPlatformError } from "./operations.mjs";
@@ -18,3 +18,4 @@ export declare const reportHost: Readonly<{
18
18
  export: typeof exportStaticReport;
19
19
  }>;
20
20
  export type { ClosedSiteRevision };
21
+ export { ReportBrowser, ReportModulePlatform, ReportPlatformError } from "./operations.js";
@@ -1,6 +1,12 @@
1
1
  import { createRequire as __niceevalCreateRequire } from "node:module";
2
2
  const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
3
  const __niceevalCanonical = __niceevalRequire("./index.cjs");
4
- const __niceevalExport0 = __niceevalCanonical["reportHost"];
5
- export { __niceevalExport0 as reportHost };
4
+ const __niceevalExport0 = __niceevalCanonical["ReportBrowser"];
5
+ export { __niceevalExport0 as ReportBrowser };
6
+ const __niceevalExport1 = __niceevalCanonical["ReportModulePlatform"];
7
+ export { __niceevalExport1 as ReportModulePlatform };
8
+ const __niceevalExport2 = __niceevalCanonical["ReportPlatformError"];
9
+ export { __niceevalExport2 as ReportPlatformError };
10
+ const __niceevalExport3 = __niceevalCanonical["reportHost"];
11
+ export { __niceevalExport3 as reportHost };
6
12
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,12 @@
1
1
  import { createRequire as __niceevalCreateRequire } from "node:module";
2
2
  const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
3
  const __niceevalCanonical = __niceevalRequire("./index.cjs");
4
- const __niceevalExport0 = __niceevalCanonical["reportHost"];
5
- export { __niceevalExport0 as reportHost };
4
+ const __niceevalExport0 = __niceevalCanonical["ReportBrowser"];
5
+ export { __niceevalExport0 as ReportBrowser };
6
+ const __niceevalExport1 = __niceevalCanonical["ReportModulePlatform"];
7
+ export { __niceevalExport1 as ReportModulePlatform };
8
+ const __niceevalExport2 = __niceevalCanonical["ReportPlatformError"];
9
+ export { __niceevalExport2 as ReportPlatformError };
10
+ const __niceevalExport3 = __niceevalCanonical["reportHost"];
11
+ export { __niceevalExport3 as reportHost };
6
12
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.builtInMachineRegistry = void 0;
4
- const effect_1 = require("effect");
5
4
  const index_ts_1 = require("../../analysis/index.cjs");
6
5
  const experiment_groups_ts_1 = require("../../analysis/experiment-groups.cjs");
7
6
  const machine_ts_1 = require("../built-in/machine.cjs");
@@ -29,13 +28,11 @@ const experimentGroup = producer(async (sample, _locator, route) => {
29
28
  throw Object.freeze({ code: "report-group-not-in-sample", group: `${kind}/${key}` });
30
29
  }
31
30
  const scope = (0, index_ts_1.experimentComparisonScope)(sample, summary.group);
32
- const comparison = scope.comparison.state === "comparable"
33
- ? Object.freeze({
34
- state: "comparable",
35
- members: scope.comparison.members,
36
- rows: await (0, analysis_values_ts_1.loadBuiltInExperimentRows)((0, experiment_groups_ts_1.sampleForExperimentComparisonScope)(scope)),
37
- })
38
- : scope.comparison;
31
+ const comparison = Object.freeze({
32
+ members: scope.comparison.members,
33
+ coverage: scope.comparison.coverage,
34
+ rows: await (0, analysis_values_ts_1.loadBuiltInExperimentRows)((0, experiment_groups_ts_1.sampleForExperimentComparisonScope)(scope)),
35
+ });
39
36
  return Object.freeze({
40
37
  kind: "experiment-group",
41
38
  group: (0, machine_ts_2.closeMachineJson)(summary.group),
@@ -94,16 +91,16 @@ const timing = producer(async (sample, locator) => {
94
91
  : entry)),
95
92
  });
96
93
  });
97
- const standard = (input) => {
94
+ const standard = async (input) => {
98
95
  switch (input.pageId) {
99
96
  case "attempt":
100
97
  case "attempt-overview":
101
- return attempt(input);
98
+ return await attempt(input);
102
99
  case "group-named":
103
100
  case "group-singleton":
104
- return experimentGroup(input);
101
+ return await experimentGroup(input);
105
102
  default:
106
- return groups(input);
103
+ return await groups(input);
107
104
  }
108
105
  };
109
106
  const producers = new Map([
@@ -119,16 +116,20 @@ exports.builtInMachineRegistry = Object.freeze({
119
116
  producers,
120
117
  });
121
118
  function producer(build) {
122
- return (input) => effect_1.Effect.tryPromise({
123
- try: () => build(input.sample, input.selection.kind === "attempt-locator"
124
- ? input.selection.locator
125
- : undefined, input.route),
126
- catch: (cause) => Object.freeze({
127
- code: "report-built-in-machine-production-failed",
128
- producerId: producerIdForInput(input.pageId),
129
- reason: boundedReason(cause),
130
- }),
131
- });
119
+ return async (input) => {
120
+ try {
121
+ return await build(input.sample, input.selection.kind === "attempt-locator"
122
+ ? input.selection.locator
123
+ : undefined, input.route);
124
+ }
125
+ catch (cause) {
126
+ throw Object.freeze({
127
+ code: "report-built-in-machine-production-failed",
128
+ producerId: producerIdForInput(input.pageId),
129
+ reason: boundedReason(cause),
130
+ });
131
+ }
132
+ };
132
133
  }
133
134
  function producerIdForInput(pageId) {
134
135
  return `page:${pageId}`;
@@ -1 +1 @@
1
- {"version":3,"file":"machine.js","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CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,yBAAyB,CAAC;AACjH,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport { attemptEvidenceView, attemptObservabilityView, experimentComparisonScope, experimentGroups, fileChangesView, query, sourcesView, type Sample, } from \"../../analysis/index.ts\";\nimport { sampleForExperimentComparisonScope } from \"../../analysis/experiment-groups.ts\";\nimport { builtInMachineProducerIds } from \"../built-in/machine.ts\";\nimport { loadBuiltInExperimentRows } from \"../built-in/analysis-values.ts\";\nimport { loadRunMembershipPageInput } from \"../built-in/run-membership-overview.ts\";\nimport { closeMachineJson, type BuiltInMachineProducer, type BuiltInMachineRegistry, type BuiltInShowData, } from \"../execution/machine.ts\";\nexport interface BuiltInMachineProductionFailed {\n readonly code: \"report-built-in-machine-production-failed\";\n readonly producerId: string;\n readonly reason: string;\n}\nconst groups = producer(async (sample) => {\n const entries = experimentGroups(sample).map((entry) => Object.freeze({\n group: entry.group,\n members: entry.members,\n href: `/group/${entry.group.kind}/${entry.group.kind === \"named\" ? entry.group.groupId : String(entry.group.experimentId)}`,\n }));\n return Object.freeze({ kind: \"groups\" as const, groups: closeMachineJson(entries) });\n});\nconst experimentGroup = producer(async (sample, _locator, route) => {\n const match = /^\\/group\\/(named|singleton)\\/([^/]+)$/u.exec(route);\n if (match === null)\n throw new TypeError(\"Experiment Group route is invalid\");\n const kind = match[1]!;\n const key = decodeURIComponent(match[2]!);\n const summary = experimentGroups(sample).find((entry) => entry.group.kind === kind && (kind === \"named\"\n ? entry.group.kind === \"named\" && entry.group.groupId === key\n : entry.group.kind === \"singleton\" && String(entry.group.experimentId) === key));\n if (summary === undefined) {\n throw Object.freeze({ code: \"report-group-not-in-sample\" as const, group: `${kind}/${key}` });\n }\n const scope = experimentComparisonScope(sample, summary.group);\n const comparison = scope.comparison.state === \"comparable\"\n ? Object.freeze({\n state: \"comparable\" as const,\n members: scope.comparison.members,\n rows: await loadBuiltInExperimentRows(sampleForExperimentComparisonScope(scope)),\n })\n : scope.comparison;\n return Object.freeze({\n kind: \"experiment-group\" as const,\n group: closeMachineJson(summary.group),\n comparison: closeMachineJson(comparison),\n });\n});\nconst runMembership = producer(async (sample) => {\n const result = await loadRunMembershipPageInput(sample);\n return Object.freeze({\n kind: \"run-membership\" as const,\n summary: closeMachineJson(result.summary),\n members: closeMachineJson(result.members),\n errors: closeMachineJson(result.errors),\n evidence: closeMachineJson(result.evidence),\n });\n});\nconst attempt = producer(async (sample, locator) => {\n const [evidence, observability, fileChanges] = await Promise.all([\n query(sample, { kind: \"domain-view\", view: attemptEvidenceView, ...(locator === undefined ? {} : { locator }) }),\n query(sample, { kind: \"domain-view\", view: attemptObservabilityView, ...(locator === undefined ? {} : { locator }) }),\n query(sample, { kind: \"domain-view\", view: fileChangesView, ...(locator === undefined ? {} : { locator }) }),\n ]);\n return Object.freeze({\n kind: \"attempt\" as const,\n evidence: closeMachineJson(evidence),\n observability: closeMachineJson(observability),\n fileChanges: closeMachineJson(fileChanges),\n });\n});\nconst source = producer(async (sample, locator) => Object.freeze({\n kind: \"source\" as const,\n sources: closeMachineJson(await query(sample, {\n kind: \"domain-view\",\n view: sourcesView,\n ...(locator === undefined ? {} : { locator }),\n })),\n}));\nconst execution = producer(async (sample, locator) => Object.freeze({\n kind: \"execution\" as const,\n execution: closeMachineJson(await query(sample, {\n kind: \"domain-view\",\n view: attemptObservabilityView,\n ...(locator === undefined ? {} : { locator }),\n })),\n}));\nconst timing = producer(async (sample, locator) => {\n const view = await query(sample, {\n kind: \"domain-view\",\n view: attemptObservabilityView,\n ...(locator === undefined ? {} : { locator }),\n });\n return Object.freeze({\n kind: \"timing\" as const,\n timing: closeMachineJson(view.entries.map((entry) => entry.state === \"available\"\n ? Object.freeze({ attempt: entry.attempt, state: entry.state, timing: entry.detail.timing })\n : entry)),\n });\n});\nconst standard: BuiltInMachineProducer<BuiltInMachineProductionFailed, never> = (input) => {\n switch (input.pageId) {\n case \"attempt\":\n case \"attempt-overview\":\n return attempt(input);\n case \"group-named\":\n case \"group-singleton\":\n return experimentGroup(input);\n default:\n return groups(input);\n }\n};\nconst producers = new Map<string, BuiltInMachineProducer<BuiltInMachineProductionFailed, never>>([\n [builtInMachineProducerIds.runMembershipOverview, runMembership],\n [builtInMachineProducerIds.attemptOverview, attempt],\n [builtInMachineProducerIds.executionEvidence, execution],\n [builtInMachineProducerIds.timingEvidence, timing],\n [builtInMachineProducerIds.sourceEvidence, source],\n [builtInMachineProducerIds.sandboxHistory, execution],\n [builtInMachineProducerIds.standard, standard],\n]);\nexport const builtInMachineRegistry: BuiltInMachineRegistry<BuiltInMachineProductionFailed, never> = Object.freeze({\n producers,\n});\nfunction producer(build: (sample: Sample, locator: import(\"../../attempt-locator.ts\").AttemptLocator | undefined, route: string) => Promise<BuiltInShowData>): BuiltInMachineProducer<BuiltInMachineProductionFailed, never> {\n return (input) => Effect.tryPromise({\n try: () => build(input.sample, input.selection.kind === \"attempt-locator\"\n ? input.selection.locator as import(\"../../attempt-locator.ts\").AttemptLocator\n : undefined, input.route),\n catch: (cause): BuiltInMachineProductionFailed => Object.freeze({\n code: \"report-built-in-machine-production-failed\" as const,\n producerId: producerIdForInput(input.pageId),\n reason: boundedReason(cause),\n }),\n });\n}\nfunction producerIdForInput(pageId: string): string {\n return `page:${pageId}`;\n}\nfunction boundedReason(cause: unknown): string {\n const value = cause instanceof Error ? cause.message\n : typeof cause === \"object\" && cause !== null ? JSON.stringify(cause) : String(cause);\n return value.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || \"machine producer failed\";\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n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,CAAC,IAAI,EAAE,IAAI,yBAAyB,CAAC;AACjH,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { attemptEvidenceView, attemptObservabilityView, experimentComparisonScope, experimentGroups, fileChangesView, query, sourcesView, type Sample, } from \"../../analysis/index.ts\";\nimport { sampleForExperimentComparisonScope } from \"../../analysis/experiment-groups.ts\";\nimport { builtInMachineProducerIds } from \"../built-in/machine.ts\";\nimport { loadBuiltInExperimentRows } from \"../built-in/analysis-values.ts\";\nimport { loadRunMembershipPageInput } from \"../built-in/run-membership-overview.ts\";\nimport { closeMachineJson, type BuiltInMachineProducer, type BuiltInMachineRegistry, type BuiltInShowData, } from \"../execution/machine.ts\";\nexport interface BuiltInMachineProductionFailed {\n readonly code: \"report-built-in-machine-production-failed\";\n readonly producerId: string;\n readonly reason: string;\n}\nconst groups = producer(async (sample) => {\n const entries = experimentGroups(sample).map((entry) => Object.freeze({\n group: entry.group,\n members: entry.members,\n href: `/group/${entry.group.kind}/${entry.group.kind === \"named\" ? entry.group.groupId : String(entry.group.experimentId)}`,\n }));\n return Object.freeze({ kind: \"groups\" as const, groups: closeMachineJson(entries) });\n});\nconst experimentGroup = producer(async (sample, _locator, route) => {\n const match = /^\\/group\\/(named|singleton)\\/([^/]+)$/u.exec(route);\n if (match === null)\n throw new TypeError(\"Experiment Group route is invalid\");\n const kind = match[1]!;\n const key = decodeURIComponent(match[2]!);\n const summary = experimentGroups(sample).find((entry) => entry.group.kind === kind && (kind === \"named\"\n ? entry.group.kind === \"named\" && entry.group.groupId === key\n : entry.group.kind === \"singleton\" && String(entry.group.experimentId) === key));\n if (summary === undefined) {\n throw Object.freeze({ code: \"report-group-not-in-sample\" as const, group: `${kind}/${key}` });\n }\n const scope = experimentComparisonScope(sample, summary.group);\n const comparison = Object.freeze({\n members: scope.comparison.members,\n coverage: scope.comparison.coverage,\n rows: await loadBuiltInExperimentRows(sampleForExperimentComparisonScope(scope)),\n });\n return Object.freeze({\n kind: \"experiment-group\" as const,\n group: closeMachineJson(summary.group),\n comparison: closeMachineJson(comparison),\n });\n});\nconst runMembership = producer(async (sample) => {\n const result = await loadRunMembershipPageInput(sample);\n return Object.freeze({\n kind: \"run-membership\" as const,\n summary: closeMachineJson(result.summary),\n members: closeMachineJson(result.members),\n errors: closeMachineJson(result.errors),\n evidence: closeMachineJson(result.evidence),\n });\n});\nconst attempt = producer(async (sample, locator) => {\n const [evidence, observability, fileChanges] = await Promise.all([\n query(sample, { kind: \"domain-view\", view: attemptEvidenceView, ...(locator === undefined ? {} : { locator }) }),\n query(sample, { kind: \"domain-view\", view: attemptObservabilityView, ...(locator === undefined ? {} : { locator }) }),\n query(sample, { kind: \"domain-view\", view: fileChangesView, ...(locator === undefined ? {} : { locator }) }),\n ]);\n return Object.freeze({\n kind: \"attempt\" as const,\n evidence: closeMachineJson(evidence),\n observability: closeMachineJson(observability),\n fileChanges: closeMachineJson(fileChanges),\n });\n});\nconst source = producer(async (sample, locator) => Object.freeze({\n kind: \"source\" as const,\n sources: closeMachineJson(await query(sample, {\n kind: \"domain-view\",\n view: sourcesView,\n ...(locator === undefined ? {} : { locator }),\n })),\n}));\nconst execution = producer(async (sample, locator) => Object.freeze({\n kind: \"execution\" as const,\n execution: closeMachineJson(await query(sample, {\n kind: \"domain-view\",\n view: attemptObservabilityView,\n ...(locator === undefined ? {} : { locator }),\n })),\n}));\nconst timing = producer(async (sample, locator) => {\n const view = await query(sample, {\n kind: \"domain-view\",\n view: attemptObservabilityView,\n ...(locator === undefined ? {} : { locator }),\n });\n return Object.freeze({\n kind: \"timing\" as const,\n timing: closeMachineJson(view.entries.map((entry) => entry.state === \"available\"\n ? Object.freeze({ attempt: entry.attempt, state: entry.state, timing: entry.detail.timing })\n : entry)),\n });\n});\nconst standard: BuiltInMachineProducer = async (input) => {\n switch (input.pageId) {\n case \"attempt\":\n case \"attempt-overview\":\n return await attempt(input);\n case \"group-named\":\n case \"group-singleton\":\n return await experimentGroup(input);\n default:\n return await groups(input);\n }\n};\nconst producers = new Map<string, BuiltInMachineProducer>([\n [builtInMachineProducerIds.runMembershipOverview, runMembership],\n [builtInMachineProducerIds.attemptOverview, attempt],\n [builtInMachineProducerIds.executionEvidence, execution],\n [builtInMachineProducerIds.timingEvidence, timing],\n [builtInMachineProducerIds.sourceEvidence, source],\n [builtInMachineProducerIds.sandboxHistory, execution],\n [builtInMachineProducerIds.standard, standard],\n]);\nexport const builtInMachineRegistry: BuiltInMachineRegistry = Object.freeze({\n producers,\n});\nfunction producer(build: (sample: Sample, locator: import(\"../../attempt-locator.ts\").AttemptLocator | undefined, route: string) => Promise<BuiltInShowData>): BuiltInMachineProducer {\n return async (input) => {\n try {\n return await build(input.sample, input.selection.kind === \"attempt-locator\"\n ? input.selection.locator as import(\"../../attempt-locator.ts\").AttemptLocator\n : undefined, input.route);\n }\n catch (cause) {\n throw Object.freeze({\n code: \"report-built-in-machine-production-failed\" as const,\n producerId: producerIdForInput(input.pageId),\n reason: boundedReason(cause),\n }) satisfies BuiltInMachineProductionFailed;\n }\n };\n}\nfunction producerIdForInput(pageId: string): string {\n return `page:${pageId}`;\n}\nfunction boundedReason(cause: unknown): string {\n const value = cause instanceof Error ? cause.message\n : typeof cause === \"object\" && cause !== null ? JSON.stringify(cause) : String(cause);\n return value.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || \"machine producer failed\";\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n"]}
@@ -4,4 +4,4 @@ export interface BuiltInMachineProductionFailed {
4
4
  readonly producerId: string;
5
5
  readonly reason: string;
6
6
  }
7
- export declare const builtInMachineRegistry: BuiltInMachineRegistry<BuiltInMachineProductionFailed, never>;
7
+ export declare const builtInMachineRegistry: BuiltInMachineRegistry;
@@ -4,4 +4,4 @@ export interface BuiltInMachineProductionFailed {
4
4
  readonly producerId: string;
5
5
  readonly reason: string;
6
6
  }
7
- export declare const builtInMachineRegistry: BuiltInMachineRegistry<BuiltInMachineProductionFailed, never>;
7
+ export declare const builtInMachineRegistry: BuiltInMachineRegistry;
@@ -4,4 +4,4 @@ export interface BuiltInMachineProductionFailed {
4
4
  readonly producerId: string;
5
5
  readonly reason: string;
6
6
  }
7
- export declare const builtInMachineRegistry: BuiltInMachineRegistry<BuiltInMachineProductionFailed, never>;
7
+ export declare const builtInMachineRegistry: BuiltInMachineRegistry;
@@ -27,7 +27,7 @@ class ReportModuleLoadError extends effect_1.Data.TaggedError("ReportModuleLoadE
27
27
  exports.ReportModuleLoadError = ReportModuleLoadError;
28
28
  const SOURCE_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts", ".js", ".mjs", ".cjs", ".jsx"];
29
29
  /** Fresh-loads optional `<cwd>/niceeval.config.ts` and validates its Report-facing fields. */
30
- function loadTrustedReportConfig(cwd) {
30
+ function loadTrustedReportConfig(cwd, options = {}) {
31
31
  const path = (0, node_path_1.join)(cwd, "niceeval.config.ts");
32
32
  return effect_1.Effect.gen(function* () {
33
33
  const exists = yield* regularFile(path, "config", true);
@@ -39,7 +39,9 @@ function loadTrustedReportConfig(cwd) {
39
39
  return yield* effect_1.Effect.fail(moduleError("report-module-invalid-default-export", "config", "config default export must be an object"));
40
40
  }
41
41
  const report = value.report === undefined ? undefined : yield* validateReport(value.report, "config");
42
- const theme = value.theme === undefined ? undefined : yield* validateTheme(value.theme, "config");
42
+ const theme = options.includeTheme === false || value.theme === undefined
43
+ ? undefined
44
+ : yield* validateTheme(value.theme, "config");
43
45
  if (report?.theme !== undefined)
44
46
  (0, theme_ts_1.registerThemeSourceBase)(report.theme, (0, node_path_1.dirname)(path));
45
47
  if (theme !== undefined)