niceeval 0.13.2 → 0.13.3

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 (494) hide show
  1. package/dist/agents/bub.cjs +4 -4
  2. package/dist/agents/bub.cjs.map +1 -1
  3. package/dist/agents/bub.d.cts +2 -2
  4. package/dist/agents/bub.d.mts +2 -2
  5. package/dist/agents/bub.d.ts +2 -2
  6. package/dist/agents/claude-code-native.cjs +213 -0
  7. package/dist/agents/claude-code-native.cjs.map +1 -0
  8. package/dist/agents/claude-code-native.d.cts +5 -0
  9. package/dist/agents/claude-code-native.d.mts +5 -0
  10. package/dist/agents/claude-code-native.d.ts +5 -0
  11. package/dist/agents/claude-code-native.js +6 -0
  12. package/dist/agents/claude-code-native.js.map +1 -0
  13. package/dist/agents/claude-code.cjs +26 -80
  14. package/dist/agents/claude-code.cjs.map +1 -1
  15. package/dist/agents/codex-app-server.cjs +314 -0
  16. package/dist/agents/codex-app-server.cjs.map +1 -0
  17. package/dist/agents/codex-app-server.d.cts +9 -0
  18. package/dist/agents/codex-app-server.d.mts +9 -0
  19. package/dist/agents/codex-app-server.d.ts +9 -0
  20. package/dist/agents/codex-app-server.js +6 -0
  21. package/dist/agents/codex-app-server.js.map +1 -0
  22. package/dist/agents/codex.cjs +19 -68
  23. package/dist/agents/codex.cjs.map +1 -1
  24. package/dist/agents/codex.d.cts +3 -3
  25. package/dist/agents/codex.d.mts +3 -3
  26. package/dist/agents/codex.d.ts +3 -3
  27. package/dist/agents/index.cjs +3 -1
  28. package/dist/agents/index.cjs.map +1 -1
  29. package/dist/agents/index.d.cts +1 -0
  30. package/dist/agents/index.d.mts +1 -0
  31. package/dist/agents/index.d.ts +1 -0
  32. package/dist/agents/index.js +84 -82
  33. package/dist/agents/index.mjs +84 -82
  34. package/dist/agents/managed-jsonl.cjs +207 -0
  35. package/dist/agents/managed-jsonl.cjs.map +1 -0
  36. package/dist/agents/managed-jsonl.d.cts +39 -0
  37. package/dist/agents/managed-jsonl.d.mts +39 -0
  38. package/dist/agents/managed-jsonl.d.ts +39 -0
  39. package/dist/agents/managed-jsonl.js +6 -0
  40. package/dist/agents/managed-jsonl.js.map +1 -0
  41. package/dist/agents/managed-process.cjs +31 -0
  42. package/dist/agents/managed-process.cjs.map +1 -0
  43. package/dist/agents/managed-process.d.cts +3 -0
  44. package/dist/agents/managed-process.d.mts +3 -0
  45. package/dist/agents/managed-process.d.ts +3 -0
  46. package/dist/agents/managed-process.js +6 -0
  47. package/dist/agents/managed-process.js.map +1 -0
  48. package/dist/agents/omp.cjs +18 -1
  49. package/dist/agents/omp.cjs.map +1 -1
  50. package/dist/agents/sdk-streams.cjs +11 -4
  51. package/dist/agents/sdk-streams.cjs.map +1 -1
  52. package/dist/agents/types.cjs.map +1 -1
  53. package/dist/agents/types.d.cts +8 -0
  54. package/dist/agents/types.d.mts +8 -0
  55. package/dist/agents/types.d.ts +8 -0
  56. package/dist/analysis/bindings.cjs +74 -19
  57. package/dist/analysis/bindings.cjs.map +1 -1
  58. package/dist/analysis/bindings.d.cts +534 -156
  59. package/dist/analysis/bindings.d.mts +534 -156
  60. package/dist/analysis/bindings.d.ts +534 -156
  61. package/dist/analysis/domain-view.cjs.map +1 -1
  62. package/dist/analysis/domain-view.d.cts +137 -8
  63. package/dist/analysis/domain-view.d.mts +137 -8
  64. package/dist/analysis/domain-view.d.ts +137 -8
  65. package/dist/analysis/index.cjs.map +1 -1
  66. package/dist/analysis/index.d.cts +1 -1
  67. package/dist/analysis/index.d.mts +1 -1
  68. package/dist/analysis/index.d.ts +1 -1
  69. package/dist/assertions/api.cjs.map +1 -1
  70. package/dist/assertions/api.d.cts +62 -0
  71. package/dist/assertions/api.d.mts +62 -0
  72. package/dist/assertions/api.d.ts +62 -0
  73. package/dist/assertions/judge.cjs +56 -5
  74. package/dist/assertions/judge.cjs.map +1 -1
  75. package/dist/assertions/match.cjs +66 -42
  76. package/dist/assertions/match.cjs.map +1 -1
  77. package/dist/assertions/match.d.cts +13 -0
  78. package/dist/assertions/match.d.mts +13 -0
  79. package/dist/assertions/match.d.ts +13 -0
  80. package/dist/assertions/record/attachment.cjs +104 -33
  81. package/dist/assertions/record/attachment.cjs.map +1 -1
  82. package/dist/assertions/record/attachment.d.cts +294 -57
  83. package/dist/assertions/record/attachment.d.mts +294 -57
  84. package/dist/assertions/record/attachment.d.ts +294 -57
  85. package/dist/assertions/record/codec.cjs +91 -17
  86. package/dist/assertions/record/codec.cjs.map +1 -1
  87. package/dist/assertions/record/codec.d.cts +280 -52
  88. package/dist/assertions/record/codec.d.mts +280 -52
  89. package/dist/assertions/record/codec.d.ts +280 -52
  90. package/dist/assertions/record/index.js +2 -0
  91. package/dist/assertions/record/model.cjs +16 -0
  92. package/dist/assertions/record/model.cjs.map +1 -1
  93. package/dist/assertions/record/model.d.cts +120 -13
  94. package/dist/assertions/record/model.d.mts +120 -13
  95. package/dist/assertions/record/model.d.ts +120 -13
  96. package/dist/assertions/record/model.js +2 -0
  97. package/dist/assertions/record/producer.cjs +70 -50
  98. package/dist/assertions/record/producer.cjs.map +1 -1
  99. package/dist/assertions/record/producer.d.cts +8 -7
  100. package/dist/assertions/record/producer.d.mts +8 -7
  101. package/dist/assertions/record/producer.d.ts +8 -7
  102. package/dist/assertions/runtime.cjs +49 -7
  103. package/dist/assertions/runtime.cjs.map +1 -1
  104. package/dist/cli/application.cjs +40 -0
  105. package/dist/cli/application.cjs.map +1 -0
  106. package/dist/cli/application.d.cts +129 -0
  107. package/dist/cli/application.d.mts +129 -0
  108. package/dist/cli/application.d.ts +129 -0
  109. package/dist/cli/application.js +24 -0
  110. package/dist/cli/application.js.map +1 -0
  111. package/dist/cli/bootstrap.cjs +10 -4
  112. package/dist/cli/bootstrap.cjs.map +1 -1
  113. package/dist/cli/node-application.cjs +123 -0
  114. package/dist/cli/node-application.cjs.map +1 -0
  115. package/dist/cli/node-application.d.cts +14 -0
  116. package/dist/cli/node-application.d.mts +14 -0
  117. package/dist/cli/node-application.d.ts +14 -0
  118. package/dist/cli/node-application.js +26 -0
  119. package/dist/cli/node-application.js.map +1 -0
  120. package/dist/cli/program.cjs +2807 -0
  121. package/dist/cli/program.cjs.map +1 -0
  122. package/dist/cli/program.d.cts +352 -0
  123. package/dist/cli/program.d.mts +352 -0
  124. package/dist/cli/program.d.ts +352 -0
  125. package/dist/cli/program.js +36 -0
  126. package/dist/cli/program.js.map +1 -0
  127. package/dist/cli/project-configuration.cjs +134 -0
  128. package/dist/cli/project-configuration.cjs.map +1 -0
  129. package/dist/cli/project-configuration.d.cts +64 -0
  130. package/dist/cli/project-configuration.d.mts +64 -0
  131. package/dist/cli/project-configuration.d.ts +64 -0
  132. package/dist/cli/project-configuration.js +22 -0
  133. package/dist/cli/project-configuration.js.map +1 -0
  134. package/dist/cli/record.cjs +20 -4
  135. package/dist/cli/record.cjs.map +1 -1
  136. package/dist/cli/record.d.cts +3 -3
  137. package/dist/cli/record.d.mts +3 -3
  138. package/dist/cli/record.d.ts +3 -3
  139. package/dist/cli.cjs +19 -3130
  140. package/dist/cli.cjs.map +1 -1
  141. package/dist/cli.d.cts +2 -148
  142. package/dist/cli.d.mts +2 -148
  143. package/dist/cli.d.ts +2 -148
  144. package/dist/cli.js +22 -30
  145. package/dist/context/assert-first.cjs +21 -15
  146. package/dist/context/assert-first.cjs.map +1 -1
  147. package/dist/context/assert-first.d.cts +1 -0
  148. package/dist/context/assert-first.d.mts +1 -0
  149. package/dist/context/assert-first.d.ts +1 -0
  150. package/dist/context/attempt-resources.cjs +13 -0
  151. package/dist/context/attempt-resources.cjs.map +1 -0
  152. package/dist/context/attempt-resources.d.cts +3 -0
  153. package/dist/context/attempt-resources.d.mts +3 -0
  154. package/dist/context/attempt-resources.d.ts +3 -0
  155. package/dist/context/attempt-resources.js +8 -0
  156. package/dist/context/attempt-resources.js.map +1 -0
  157. package/dist/context/session.cjs +4 -3
  158. package/dist/context/session.cjs.map +1 -1
  159. package/dist/context/session.d.cts +1 -0
  160. package/dist/context/session.d.mts +1 -0
  161. package/dist/context/session.d.ts +1 -0
  162. package/dist/eval/record/verdict.cjs +3 -2
  163. package/dist/eval/record/verdict.cjs.map +1 -1
  164. package/dist/experiment/host/index.cjs +1 -6
  165. package/dist/experiment/host/index.cjs.map +1 -1
  166. package/dist/experiment/host/index.d.cts +1 -0
  167. package/dist/experiment/host/index.d.mts +1 -0
  168. package/dist/experiment/host/index.d.ts +1 -0
  169. package/dist/load-config.cjs +13 -4
  170. package/dist/load-config.cjs.map +1 -1
  171. package/dist/load-config.d.cts +4 -3
  172. package/dist/load-config.d.mts +4 -3
  173. package/dist/load-config.d.ts +4 -3
  174. package/dist/load-config.js +4 -2
  175. package/dist/o11y/parsers/codex.cjs +29 -7
  176. package/dist/o11y/parsers/codex.cjs.map +1 -1
  177. package/dist/record/codec/core.d.cts +0 -2
  178. package/dist/record/codec/core.d.mts +0 -2
  179. package/dist/record/codec/core.d.ts +0 -2
  180. package/dist/record/codec/identifiers.cjs +2 -3
  181. package/dist/record/codec/identifiers.cjs.map +1 -1
  182. package/dist/record/codec/identifiers.d.cts +1 -2
  183. package/dist/record/codec/identifiers.d.mts +1 -2
  184. package/dist/record/codec/identifiers.d.ts +1 -2
  185. package/dist/record/codec/identifiers.js +10 -12
  186. package/dist/record/codec/index.js +42 -44
  187. package/dist/record/definition/attachment.cjs +1 -0
  188. package/dist/record/definition/attachment.cjs.map +1 -1
  189. package/dist/record/definition/attachment.d.cts +14 -0
  190. package/dist/record/definition/attachment.d.mts +14 -0
  191. package/dist/record/definition/attachment.d.ts +14 -0
  192. package/dist/record/family/assertions-v1.cjs +104 -0
  193. package/dist/record/family/assertions-v1.cjs.map +1 -0
  194. package/dist/record/family/assertions-v1.d.cts +2 -0
  195. package/dist/record/family/assertions-v1.d.mts +2 -0
  196. package/dist/record/family/assertions-v1.d.ts +2 -0
  197. package/dist/record/family/assertions-v1.js +6 -0
  198. package/dist/record/family/assertions-v1.js.map +1 -0
  199. package/dist/record/family/assertions.cjs +16 -5
  200. package/dist/record/family/assertions.cjs.map +1 -1
  201. package/dist/record/family/assertions.d.cts +510 -56
  202. package/dist/record/family/assertions.d.mts +510 -56
  203. package/dist/record/family/assertions.d.ts +510 -56
  204. package/dist/record/family/assertions.js +14 -10
  205. package/dist/record/family/catalog.cjs +17 -1
  206. package/dist/record/family/catalog.cjs.map +1 -1
  207. package/dist/record/family/catalog.d.cts +1292 -104
  208. package/dist/record/family/catalog.d.mts +1292 -104
  209. package/dist/record/family/catalog.d.ts +1292 -104
  210. package/dist/record/family/catalog.js +22 -20
  211. package/dist/record/family/index.js +144 -138
  212. package/dist/record/family/observability-v1.cjs +5 -0
  213. package/dist/record/family/observability-v1.cjs.map +1 -1
  214. package/dist/record/family/observability.cjs +1 -1
  215. package/dist/record/family/observability.cjs.map +1 -1
  216. package/dist/record/host/runtime.cjs +323 -173
  217. package/dist/record/host/runtime.cjs.map +1 -1
  218. package/dist/record/host/types.cjs.map +1 -1
  219. package/dist/record/host/types.d.cts +9 -7
  220. package/dist/record/host/types.d.mts +9 -7
  221. package/dist/record/host/types.d.ts +9 -7
  222. package/dist/record/model/core.cjs.map +1 -1
  223. package/dist/record/model/core.d.cts +1 -2
  224. package/dist/record/model/core.d.mts +1 -2
  225. package/dist/record/model/core.d.ts +1 -2
  226. package/dist/record/model/definition.cjs +1 -2
  227. package/dist/record/model/definition.cjs.map +1 -1
  228. package/dist/record/model/definition.d.cts +1 -7
  229. package/dist/record/model/definition.d.mts +1 -7
  230. package/dist/record/model/definition.d.ts +1 -7
  231. package/dist/record/model/identifiers.cjs +2 -3
  232. package/dist/record/model/identifiers.cjs.map +1 -1
  233. package/dist/record/model/identifiers.d.cts +1 -3
  234. package/dist/record/model/identifiers.d.mts +1 -3
  235. package/dist/record/model/identifiers.d.ts +1 -3
  236. package/dist/record/model/identifiers.js +36 -38
  237. package/dist/record/model/index.js +60 -62
  238. package/dist/record/platform/node.cjs +17 -7
  239. package/dist/record/platform/node.cjs.map +1 -1
  240. package/dist/record/platform/services.cjs.map +1 -1
  241. package/dist/record/platform/services.d.cts +8 -3
  242. package/dist/record/platform/services.d.mts +8 -3
  243. package/dist/record/platform/services.d.ts +8 -3
  244. package/dist/record/reader/format.cjs +16 -65
  245. package/dist/record/reader/format.cjs.map +1 -1
  246. package/dist/record/reader/format.d.cts +5 -9
  247. package/dist/record/reader/format.d.mts +5 -9
  248. package/dist/record/reader/format.d.ts +5 -9
  249. package/dist/record/reader/index.js +10 -8
  250. package/dist/record/reader/runtime.cjs +63 -32
  251. package/dist/record/reader/runtime.cjs.map +1 -1
  252. package/dist/record/reader/runtime.d.cts +40 -4
  253. package/dist/record/reader/runtime.d.mts +40 -4
  254. package/dist/record/reader/runtime.d.ts +40 -4
  255. package/dist/record/reader/runtime.js +6 -4
  256. package/dist/report/assets/enhance.js +5 -5
  257. package/dist/report/assets/styles.css +190 -24
  258. package/dist/report/built-in/result-components.cjs +8 -5
  259. package/dist/report/built-in/result-components.cjs.map +1 -1
  260. package/dist/report/built-in/standard.cjs +3 -0
  261. package/dist/report/built-in/standard.cjs.map +1 -1
  262. package/dist/report/built-in/standard.d.cts +2 -0
  263. package/dist/report/built-in/standard.d.mts +2 -0
  264. package/dist/report/built-in/standard.d.ts +2 -0
  265. package/dist/report/client-dist/app.js +53 -0
  266. package/dist/report/components/attempt-detail/compute.cjs +108 -231
  267. package/dist/report/components/attempt-detail/compute.cjs.map +1 -1
  268. package/dist/report/components/attempt-detail/compute.d.cts +11 -45
  269. package/dist/report/components/attempt-detail/compute.d.mts +11 -45
  270. package/dist/report/components/attempt-detail/compute.d.ts +11 -45
  271. package/dist/report/components/attempt-detail/compute.js +2 -4
  272. package/dist/report/components/attempt-detail/content.cjs +4 -4
  273. package/dist/report/components/attempt-detail/content.cjs.map +1 -1
  274. package/dist/report/components/attempt-detail/validate.cjs +47 -4
  275. package/dist/report/components/attempt-detail/validate.cjs.map +1 -1
  276. package/dist/report/components/entity-lists/compute.cjs +9 -15
  277. package/dist/report/components/entity-lists/compute.cjs.map +1 -1
  278. package/dist/report/components/entity-lists/content.cjs +53 -40
  279. package/dist/report/components/entity-lists/content.cjs.map +1 -1
  280. package/dist/report/components/entity-lists/index.cjs +1 -3
  281. package/dist/report/components/entity-lists/index.cjs.map +1 -1
  282. package/dist/report/components/experiment-detail/compute.cjs +4 -6
  283. package/dist/report/components/experiment-detail/compute.cjs.map +1 -1
  284. package/dist/report/components/summaries/index.cjs +5 -1
  285. package/dist/report/components/summaries/index.cjs.map +1 -1
  286. package/dist/report/definition/cell.cjs +14 -7
  287. package/dist/report/definition/cell.cjs.map +1 -1
  288. package/dist/report/definition/cell.d.cts +4 -0
  289. package/dist/report/definition/cell.d.mts +4 -0
  290. package/dist/report/definition/cell.d.ts +4 -0
  291. package/dist/report/definition/primitives/assertion-evidence.cjs +96 -0
  292. package/dist/report/definition/primitives/assertion-evidence.cjs.map +1 -0
  293. package/dist/report/definition/primitives/assertion-evidence.d.cts +11 -0
  294. package/dist/report/definition/primitives/assertion-evidence.d.mts +11 -0
  295. package/dist/report/definition/primitives/assertion-evidence.d.ts +11 -0
  296. package/dist/report/definition/primitives/assertion-evidence.js +6 -0
  297. package/dist/report/definition/primitives/assertion-evidence.js.map +1 -0
  298. package/dist/report/definition/primitives/conversation.cjs +7 -0
  299. package/dist/report/definition/primitives/conversation.cjs.map +1 -1
  300. package/dist/report/definition/primitives/conversation.d.cts +2 -0
  301. package/dist/report/definition/primitives/conversation.d.mts +2 -0
  302. package/dist/report/definition/primitives/conversation.d.ts +2 -0
  303. package/dist/report/definition/primitives/turn-trace.cjs +53 -3
  304. package/dist/report/definition/primitives/turn-trace.cjs.map +1 -1
  305. package/dist/report/definition/primitives.cjs +14 -1
  306. package/dist/report/definition/primitives.cjs.map +1 -1
  307. package/dist/report/definition/report.cjs +16 -8
  308. package/dist/report/definition/report.cjs.map +1 -1
  309. package/dist/report/definition/report.d.cts +6 -0
  310. package/dist/report/definition/report.d.mts +6 -0
  311. package/dist/report/definition/report.d.ts +6 -0
  312. package/dist/report/definition/table-text.cjs +12 -3
  313. package/dist/report/definition/table-text.cjs.map +1 -1
  314. package/dist/report/definition/table-text.d.cts +6 -1
  315. package/dist/report/definition/table-text.d.mts +6 -1
  316. package/dist/report/definition/table-text.d.ts +6 -1
  317. package/dist/report/execution/model.cjs +6 -14
  318. package/dist/report/execution/model.cjs.map +1 -1
  319. package/dist/report/execution/model.d.cts +5 -10
  320. package/dist/report/execution/model.d.mts +5 -10
  321. package/dist/report/execution/model.d.ts +5 -10
  322. package/dist/report/execution/model.js +6 -6
  323. package/dist/report/execution/paths.cjs +0 -11
  324. package/dist/report/execution/paths.cjs.map +1 -1
  325. package/dist/report/execution/paths.d.cts +0 -1
  326. package/dist/report/execution/paths.d.mts +0 -1
  327. package/dist/report/execution/paths.d.ts +0 -1
  328. package/dist/report/execution/paths.js +6 -8
  329. package/dist/report/host/execute.cjs +13 -22
  330. package/dist/report/host/execute.cjs.map +1 -1
  331. package/dist/report/host/execute.d.cts +1 -4
  332. package/dist/report/host/execute.d.mts +1 -4
  333. package/dist/report/host/execute.d.ts +1 -4
  334. package/dist/report/host/from-record.cjs +3 -0
  335. package/dist/report/host/from-record.cjs.map +1 -1
  336. package/dist/report/host/from-record.d.cts +4 -1
  337. package/dist/report/host/from-record.d.mts +4 -1
  338. package/dist/report/host/from-record.d.ts +4 -1
  339. package/dist/report/host/site-assets.cjs +1 -2
  340. package/dist/report/host/site-assets.cjs.map +1 -1
  341. package/dist/report/host/site-assets.d.cts +0 -1
  342. package/dist/report/host/site-assets.d.mts +0 -1
  343. package/dist/report/host/site-assets.d.ts +0 -1
  344. package/dist/report/host/site-assets.js +2 -4
  345. package/dist/report/host/static.cjs +71 -346
  346. package/dist/report/host/static.cjs.map +1 -1
  347. package/dist/report/host/static.d.cts +1 -3
  348. package/dist/report/host/static.d.mts +1 -3
  349. package/dist/report/host/static.d.ts +1 -3
  350. package/dist/report/host/static.js +2 -2
  351. package/dist/report/host/view-session.cjs.map +1 -1
  352. package/dist/report/host/view-session.d.cts +1 -1
  353. package/dist/report/host/view-session.d.mts +1 -1
  354. package/dist/report/host/view-session.d.ts +1 -1
  355. package/dist/report/model/locale.cjs +1 -1
  356. package/dist/report/model/locale.cjs.map +1 -1
  357. package/dist/report/model/locale.d.cts +1 -1
  358. package/dist/report/model/locale.d.mts +1 -1
  359. package/dist/report/model/locale.d.ts +1 -1
  360. package/dist/report/model/pricing.cjs +2 -2
  361. package/dist/report/model/pricing.cjs.map +1 -1
  362. package/dist/report/react/enhance.js +5 -5
  363. package/dist/report/react/styles.css +190 -24
  364. package/dist/runner/adoption.cjs +4 -7
  365. package/dist/runner/adoption.cjs.map +1 -1
  366. package/dist/runner/attempt-resources.cjs +60 -0
  367. package/dist/runner/attempt-resources.cjs.map +1 -0
  368. package/dist/runner/attempt-resources.d.cts +13 -0
  369. package/dist/runner/attempt-resources.d.mts +13 -0
  370. package/dist/runner/attempt-resources.d.ts +13 -0
  371. package/dist/runner/attempt-resources.js +6 -0
  372. package/dist/runner/attempt-resources.js.map +1 -0
  373. package/dist/runner/attempt.cjs +37 -3
  374. package/dist/runner/attempt.cjs.map +1 -1
  375. package/dist/runner/feedback/failure.cjs +77 -2
  376. package/dist/runner/feedback/failure.cjs.map +1 -1
  377. package/dist/runner/feedback/failure.d.cts +2 -1
  378. package/dist/runner/feedback/failure.d.mts +2 -1
  379. package/dist/runner/feedback/failure.d.ts +2 -1
  380. package/dist/runner/project-current.cjs +2 -13
  381. package/dist/runner/project-current.cjs.map +1 -1
  382. package/dist/runner/project-current.d.cts +4 -2
  383. package/dist/runner/project-current.d.mts +4 -2
  384. package/dist/runner/project-current.d.ts +4 -2
  385. package/dist/runner/reporters/braintrust.cjs +7 -7
  386. package/dist/runner/reporters/braintrust.cjs.map +1 -1
  387. package/dist/runner/reuse-readback.cjs +3 -4
  388. package/dist/runner/reuse-readback.cjs.map +1 -1
  389. package/dist/runner/run.cjs +5 -2
  390. package/dist/runner/run.cjs.map +1 -1
  391. package/dist/sandbox/backend.cjs +32 -2
  392. package/dist/sandbox/backend.cjs.map +1 -1
  393. package/dist/sandbox/backend.d.cts +12 -1
  394. package/dist/sandbox/backend.d.mts +12 -1
  395. package/dist/sandbox/backend.d.ts +12 -1
  396. package/dist/sandbox/backend.js +28 -22
  397. package/dist/sandbox/docker.cjs +140 -0
  398. package/dist/sandbox/docker.cjs.map +1 -1
  399. package/dist/sandbox/docker.d.cts +3 -1
  400. package/dist/sandbox/docker.d.mts +3 -1
  401. package/dist/sandbox/docker.d.ts +3 -1
  402. package/dist/sandbox/e2b.cjs +42 -0
  403. package/dist/sandbox/e2b.cjs.map +1 -1
  404. package/dist/sandbox/e2b.d.cts +2 -0
  405. package/dist/sandbox/e2b.d.mts +2 -0
  406. package/dist/sandbox/e2b.d.ts +2 -0
  407. package/dist/sandbox/local.cjs +64 -0
  408. package/dist/sandbox/local.cjs.map +1 -1
  409. package/dist/sandbox/local.d.cts +3 -1
  410. package/dist/sandbox/local.d.mts +3 -1
  411. package/dist/sandbox/local.d.ts +3 -1
  412. package/dist/sandbox/managed-process.cjs +49 -0
  413. package/dist/sandbox/managed-process.cjs.map +1 -0
  414. package/dist/sandbox/managed-process.d.cts +11 -0
  415. package/dist/sandbox/managed-process.d.mts +11 -0
  416. package/dist/sandbox/managed-process.d.ts +11 -0
  417. package/dist/sandbox/managed-process.js +6 -0
  418. package/dist/sandbox/managed-process.js.map +1 -0
  419. package/dist/sandbox/types.cjs.map +1 -1
  420. package/dist/sandbox/types.d.cts +24 -0
  421. package/dist/sandbox/types.d.mts +24 -0
  422. package/dist/sandbox/types.d.ts +24 -0
  423. package/dist/sandbox/vercel.cjs +1 -0
  424. package/dist/sandbox/vercel.cjs.map +1 -1
  425. package/dist/sandbox/vercel.d.cts +1 -0
  426. package/dist/sandbox/vercel.d.mts +1 -0
  427. package/dist/sandbox/vercel.d.ts +1 -0
  428. package/dist/view/server.cjs +2 -37
  429. package/dist/view/server.cjs.map +1 -1
  430. package/dist/view/server.d.cts +0 -3
  431. package/dist/view/server.d.mts +0 -3
  432. package/dist/view/server.d.ts +0 -3
  433. package/docs-site/zh/reference/builtin-agents.mdx +7 -7
  434. package/docs-site/zh/reference/official-adapters.mdx +4 -4
  435. package/docs-site/zh/reference/report-components.mdx +2 -2
  436. package/docs-site/zh/tutorials/configuration.mdx +2 -2
  437. package/docs-site/zh/tutorials/deploy-report-site.mdx +24 -2
  438. package/docs-site/zh/tutorials/publish-report.mdx +4 -4
  439. package/docs-site/zh/tutorials/sandbox-agent.mdx +5 -5
  440. package/docs-site/zh/tutorials/theming.mdx +2 -2
  441. package/package.json +4 -6
  442. package/dist/record/migration/index.cjs +0 -5
  443. package/dist/record/migration/index.cjs.map +0 -1
  444. package/dist/record/migration/index.d.cts +0 -11
  445. package/dist/record/migration/index.d.mts +0 -11
  446. package/dist/record/migration/index.d.ts +0 -11
  447. package/dist/record/migration/index.js +0 -6
  448. package/dist/record/migration/index.js.map +0 -1
  449. package/dist/report/host/site-runtime.cjs +0 -92
  450. package/dist/report/host/site-runtime.cjs.map +0 -1
  451. package/dist/report/host/site-runtime.d.cts +0 -9
  452. package/dist/report/host/site-runtime.d.mts +0 -9
  453. package/dist/report/host/site-runtime.d.ts +0 -9
  454. package/dist/report/host/site-runtime.js +0 -10
  455. package/dist/report/host/site-runtime.js.map +0 -1
  456. package/dist/view/client-dist/app.css +0 -2
  457. package/dist/view/client-dist/app.js +0 -49
  458. package/dist/view/data.cjs +0 -3
  459. package/dist/view/data.cjs.map +0 -1
  460. package/dist/view/data.d.cts +0 -9
  461. package/dist/view/data.d.mts +0 -9
  462. package/dist/view/data.d.ts +0 -9
  463. package/dist/view/data.js +0 -4
  464. package/dist/view/data.js.map +0 -1
  465. package/dist/view/index.cjs +0 -24
  466. package/dist/view/index.cjs.map +0 -1
  467. package/dist/view/index.d.cts +0 -9
  468. package/dist/view/index.d.mts +0 -9
  469. package/dist/view/index.d.ts +0 -9
  470. package/dist/view/index.js +0 -28
  471. package/dist/view/index.js.map +0 -1
  472. package/dist/view/report-view-cache.cjs +0 -200
  473. package/dist/view/report-view-cache.cjs.map +0 -1
  474. package/dist/view/report-view-cache.d.cts +0 -67
  475. package/dist/view/report-view-cache.d.mts +0 -67
  476. package/dist/view/report-view-cache.d.ts +0 -67
  477. package/dist/view/report-view-cache.js +0 -8
  478. package/dist/view/report-view-cache.js.map +0 -1
  479. package/dist/view/shared/types.cjs +0 -3
  480. package/dist/view/shared/types.cjs.map +0 -1
  481. package/dist/view/shared/types.d.cts +0 -51
  482. package/dist/view/shared/types.d.mts +0 -51
  483. package/dist/view/shared/types.d.ts +0 -51
  484. package/dist/view/shared/types.js +0 -4
  485. package/dist/view/shared/types.js.map +0 -1
  486. package/dist/view/site.cjs +0 -32
  487. package/dist/view/site.cjs.map +0 -1
  488. package/dist/view/site.d.cts +0 -24
  489. package/dist/view/site.d.mts +0 -24
  490. package/dist/view/site.d.ts +0 -24
  491. package/dist/view/site.js +0 -8
  492. package/dist/view/site.js.map +0 -1
  493. package/dist/view/styles.css +0 -170
  494. package/dist/view/template.html +0 -17
@@ -1 +1 @@
1
- {"version":3,"file":"from-record.js","sourceRoot":"","sources":["from-record.ts"],"names":[],"mappings":";;AAyEA,oDAIC;AAMD,8DAKC;AAED,8DAOC;AAOD,4EAIC;AA5GD,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;AAsC3B;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,KAAgC;IACjE,OAAO,SAAS,IAAI,KAAK;QACrB,CAAC,CAAC,qBA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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 type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | {\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(() => {\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 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
+ {"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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,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,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), Buffer.from(right));\n}\n"]}
@@ -18,7 +18,10 @@ export interface ReportShowPresentationFailed {
18
18
  readonly operation: "text" | "machine";
19
19
  readonly reason: string;
20
20
  }
21
- export type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | {
21
+ export interface ReportSampleEmpty {
22
+ readonly code: "report-sample-empty";
23
+ }
24
+ export type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | ReportSampleEmpty | {
22
25
  readonly code: "sample-attempt-locator-not-found";
23
26
  readonly locator: AttemptLocator;
24
27
  } | {
@@ -18,7 +18,10 @@ export interface ReportShowPresentationFailed {
18
18
  readonly operation: "text" | "machine";
19
19
  readonly reason: string;
20
20
  }
21
- export type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | {
21
+ export interface ReportSampleEmpty {
22
+ readonly code: "report-sample-empty";
23
+ }
24
+ export type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | ReportSampleEmpty | {
22
25
  readonly code: "sample-attempt-locator-not-found";
23
26
  readonly locator: AttemptLocator;
24
27
  } | {
@@ -18,7 +18,10 @@ export interface ReportShowPresentationFailed {
18
18
  readonly operation: "text" | "machine";
19
19
  readonly reason: string;
20
20
  }
21
- export type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | {
21
+ export interface ReportSampleEmpty {
22
+ readonly code: "report-sample-empty";
23
+ }
24
+ export type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | ReportSampleEmpty | {
22
25
  readonly code: "sample-attempt-locator-not-found";
23
26
  readonly locator: AttemptLocator;
24
27
  } | {
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REPORT_REFRESH_RUNTIME_PATH = exports.REPORT_STYLESHEET_PATH = void 0;
3
+ exports.REPORT_STYLESHEET_PATH = void 0;
4
4
  /**
5
5
  * Fixed host-owned assets in every closed report site. Keep these relative to
6
6
  * the site root: HTML derives a relative href from its own generated output
7
7
  * directory so file:// exports and nested parameter pages remain portable.
8
8
  */
9
9
  exports.REPORT_STYLESHEET_PATH = "_niceeval/report.css";
10
- exports.REPORT_REFRESH_RUNTIME_PATH = "_niceeval/runtime.js";
11
10
  //# sourceMappingURL=site-assets.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"site-assets.js","sourceRoot":"","sources":["site-assets.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,sBAAsB,CAAC;AAChD,QAAA,2BAA2B,GAAG,sBAAsB,CAAC","sourcesContent":["/**\n * Fixed host-owned assets in every closed report site. Keep these relative to\n * the site root: HTML derives a relative href from its own generated output\n * directory so file:// exports and nested parameter pages remain portable.\n */\nexport const REPORT_STYLESHEET_PATH = \"_niceeval/report.css\";\nexport const REPORT_REFRESH_RUNTIME_PATH = \"_niceeval/runtime.js\";\n"]}
1
+ {"version":3,"file":"site-assets.js","sourceRoot":"","sources":["site-assets.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,sBAAsB,CAAC","sourcesContent":["/**\n * Fixed host-owned assets in every closed report site. Keep these relative to\n * the site root: HTML derives a relative href from its own generated output\n * directory so file:// exports and nested parameter pages remain portable.\n */\nexport const REPORT_STYLESHEET_PATH = \"_niceeval/report.css\";\n"]}
@@ -4,4 +4,3 @@
4
4
  * directory so file:// exports and nested parameter pages remain portable.
5
5
  */
6
6
  export declare const REPORT_STYLESHEET_PATH = "_niceeval/report.css";
7
- export declare const REPORT_REFRESH_RUNTIME_PATH = "_niceeval/runtime.js";
@@ -4,4 +4,3 @@
4
4
  * directory so file:// exports and nested parameter pages remain portable.
5
5
  */
6
6
  export declare const REPORT_STYLESHEET_PATH = "_niceeval/report.css";
7
- export declare const REPORT_REFRESH_RUNTIME_PATH = "_niceeval/runtime.js";
@@ -4,4 +4,3 @@
4
4
  * directory so file:// exports and nested parameter pages remain portable.
5
5
  */
6
6
  export declare const REPORT_STYLESHEET_PATH = "_niceeval/report.css";
7
- export declare const REPORT_REFRESH_RUNTIME_PATH = "_niceeval/runtime.js";
@@ -1,8 +1,6 @@
1
1
  import { createRequire as __niceevalCreateRequire } from "node:module";
2
2
  const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
3
  const __niceevalCanonical = __niceevalRequire("./site-assets.cjs");
4
- const __niceevalExport0 = __niceevalCanonical["REPORT_REFRESH_RUNTIME_PATH"];
5
- export { __niceevalExport0 as REPORT_REFRESH_RUNTIME_PATH };
6
- const __niceevalExport1 = __niceevalCanonical["REPORT_STYLESHEET_PATH"];
7
- export { __niceevalExport1 as REPORT_STYLESHEET_PATH };
4
+ const __niceevalExport0 = __niceevalCanonical["REPORT_STYLESHEET_PATH"];
5
+ export { __niceevalExport0 as REPORT_STYLESHEET_PATH };
8
6
  //# sourceMappingURL=site-assets.js.map