niceeval 0.13.1 → 0.13.2

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 (548) hide show
  1. package/INDEX.md +25 -2
  2. package/README.md +9 -10
  3. package/README.zh.md +9 -10
  4. package/dist/agents/ai-sdk.cjs.map +1 -1
  5. package/dist/agents/ai-sdk.d.cts +1 -1
  6. package/dist/agents/ai-sdk.d.mts +1 -1
  7. package/dist/agents/ai-sdk.d.ts +1 -1
  8. package/dist/agents/bub-install-spec.cjs +19 -5
  9. package/dist/agents/bub-install-spec.cjs.map +1 -1
  10. package/dist/agents/bub-install-spec.d.cts +9 -2
  11. package/dist/agents/bub-install-spec.d.mts +9 -2
  12. package/dist/agents/bub-install-spec.d.ts +9 -2
  13. package/dist/agents/bub-install-spec.js +14 -12
  14. package/dist/agents/bub.cjs +10 -6
  15. package/dist/agents/bub.cjs.map +1 -1
  16. package/dist/agents/bub.d.cts +2 -2
  17. package/dist/agents/bub.d.mts +2 -2
  18. package/dist/agents/bub.d.ts +2 -2
  19. package/dist/agents/claude-code.cjs.map +1 -1
  20. package/dist/agents/claude-code.d.cts +2 -2
  21. package/dist/agents/claude-code.d.mts +2 -2
  22. package/dist/agents/claude-code.d.ts +2 -2
  23. package/dist/agents/codex.cjs +4 -4
  24. package/dist/agents/codex.cjs.map +1 -1
  25. package/dist/agents/codex.d.cts +3 -3
  26. package/dist/agents/codex.d.mts +3 -3
  27. package/dist/agents/codex.d.ts +3 -3
  28. package/dist/agents/coding-cli-versions.cjs +10 -1
  29. package/dist/agents/coding-cli-versions.cjs.map +1 -1
  30. package/dist/agents/coding-cli-versions.d.cts +8 -3
  31. package/dist/agents/coding-cli-versions.d.mts +8 -3
  32. package/dist/agents/coding-cli-versions.d.ts +8 -3
  33. package/dist/agents/coding-cli-versions.js +18 -12
  34. package/dist/agents/deepseek-harness.cjs +151 -0
  35. package/dist/agents/deepseek-harness.cjs.map +1 -0
  36. package/dist/agents/deepseek-harness.d.cts +14 -0
  37. package/dist/agents/deepseek-harness.d.mts +14 -0
  38. package/dist/agents/deepseek-harness.d.ts +14 -0
  39. package/dist/agents/deepseek-harness.js +7 -0
  40. package/dist/agents/deepseek-harness.js.map +1 -0
  41. package/dist/agents/exact-npm-plugins.cjs +28 -0
  42. package/dist/agents/exact-npm-plugins.cjs.map +1 -0
  43. package/dist/agents/exact-npm-plugins.d.cts +10 -0
  44. package/dist/agents/exact-npm-plugins.d.mts +10 -0
  45. package/dist/agents/exact-npm-plugins.d.ts +10 -0
  46. package/dist/agents/exact-npm-plugins.js +8 -0
  47. package/dist/agents/exact-npm-plugins.js.map +1 -0
  48. package/dist/agents/index.cjs +5 -1
  49. package/dist/agents/index.cjs.map +1 -1
  50. package/dist/agents/index.d.cts +4 -0
  51. package/dist/agents/index.d.mts +4 -0
  52. package/dist/agents/index.d.ts +4 -0
  53. package/dist/agents/index.js +54 -50
  54. package/dist/agents/index.mjs +54 -50
  55. package/dist/agents/omp.cjs +170 -0
  56. package/dist/agents/omp.cjs.map +1 -0
  57. package/dist/agents/omp.d.cts +14 -0
  58. package/dist/agents/omp.d.mts +14 -0
  59. package/dist/agents/omp.d.ts +14 -0
  60. package/dist/agents/omp.js +7 -0
  61. package/dist/agents/omp.js.map +1 -0
  62. package/dist/agents/openclaw.cjs +51 -2
  63. package/dist/agents/openclaw.cjs.map +1 -1
  64. package/dist/agents/openclaw.d.cts +2 -0
  65. package/dist/agents/openclaw.d.mts +2 -0
  66. package/dist/agents/openclaw.d.ts +2 -0
  67. package/dist/agents/types.cjs.map +1 -1
  68. package/dist/agents/types.d.cts +4 -4
  69. package/dist/agents/types.d.mts +4 -4
  70. package/dist/agents/types.d.ts +4 -4
  71. package/dist/agents/ui-message-stream.cjs +24 -7
  72. package/dist/agents/ui-message-stream.cjs.map +1 -1
  73. package/dist/analysis/api.cjs +28 -2
  74. package/dist/analysis/api.cjs.map +1 -1
  75. package/dist/analysis/api.d.cts +22 -1
  76. package/dist/analysis/api.d.mts +22 -1
  77. package/dist/analysis/api.d.ts +22 -1
  78. package/dist/analysis/api.js +8 -6
  79. package/dist/analysis/bindings.cjs +11 -18
  80. package/dist/analysis/bindings.cjs.map +1 -1
  81. package/dist/analysis/bindings.d.cts +177 -49
  82. package/dist/analysis/bindings.d.mts +177 -49
  83. package/dist/analysis/bindings.d.ts +177 -49
  84. package/dist/analysis/contracts.cjs +1 -0
  85. package/dist/analysis/contracts.cjs.map +1 -1
  86. package/dist/analysis/contracts.d.cts +43 -3
  87. package/dist/analysis/contracts.d.mts +43 -3
  88. package/dist/analysis/contracts.d.ts +43 -3
  89. package/dist/analysis/cost-projection.cjs +2 -1
  90. package/dist/analysis/cost-projection.cjs.map +1 -1
  91. package/dist/analysis/cost-projection.d.cts +1 -1
  92. package/dist/analysis/cost-projection.d.mts +1 -1
  93. package/dist/analysis/cost-projection.d.ts +1 -1
  94. package/dist/analysis/cost.cjs +13 -3
  95. package/dist/analysis/cost.cjs.map +1 -1
  96. package/dist/analysis/cost.d.cts +10 -3
  97. package/dist/analysis/cost.d.mts +10 -3
  98. package/dist/analysis/cost.d.ts +10 -3
  99. package/dist/analysis/experiment-groups.cjs +96 -0
  100. package/dist/analysis/experiment-groups.cjs.map +1 -0
  101. package/dist/analysis/experiment-groups.d.cts +9 -0
  102. package/dist/analysis/experiment-groups.d.mts +9 -0
  103. package/dist/analysis/experiment-groups.d.ts +9 -0
  104. package/dist/analysis/experiment-groups.js +10 -0
  105. package/dist/analysis/experiment-groups.js.map +1 -0
  106. package/dist/analysis/index.cjs +4 -1
  107. package/dist/analysis/index.cjs.map +1 -1
  108. package/dist/analysis/index.d.cts +4 -2
  109. package/dist/analysis/index.d.mts +4 -2
  110. package/dist/analysis/index.d.ts +4 -2
  111. package/dist/analysis/index.js +40 -36
  112. package/dist/analysis/index.mjs +40 -36
  113. package/dist/assertions/limits.cjs +4 -0
  114. package/dist/assertions/limits.cjs.map +1 -1
  115. package/dist/assertions/limits.d.cts +4 -0
  116. package/dist/assertions/limits.d.mts +4 -0
  117. package/dist/assertions/limits.d.ts +4 -0
  118. package/dist/assertions/match.cjs +63 -25
  119. package/dist/assertions/match.cjs.map +1 -1
  120. package/dist/assertions/match.d.cts +7 -0
  121. package/dist/assertions/match.d.mts +7 -0
  122. package/dist/assertions/match.d.ts +7 -0
  123. package/dist/assertions/record/attachment.cjs +32 -4
  124. package/dist/assertions/record/attachment.cjs.map +1 -1
  125. package/dist/assertions/record/diff.cjs +10 -4
  126. package/dist/assertions/record/diff.cjs.map +1 -1
  127. package/dist/assertions/record/producer.cjs +101 -4
  128. package/dist/assertions/record/producer.cjs.map +1 -1
  129. package/dist/assertions/record/producer.d.cts +4 -1
  130. package/dist/assertions/record/producer.d.mts +4 -1
  131. package/dist/assertions/record/producer.d.ts +4 -1
  132. package/dist/assertions/runtime.cjs +45 -5
  133. package/dist/assertions/runtime.cjs.map +1 -1
  134. package/dist/cli/record.cjs +113 -8
  135. package/dist/cli/record.cjs.map +1 -1
  136. package/dist/cli/record.d.cts +20 -1
  137. package/dist/cli/record.d.mts +20 -1
  138. package/dist/cli/record.d.ts +20 -1
  139. package/dist/cli/record.js +4 -2
  140. package/dist/cli.cjs +386 -31
  141. package/dist/cli.cjs.map +1 -1
  142. package/dist/cli.d.cts +10 -2
  143. package/dist/cli.d.mts +10 -2
  144. package/dist/cli.d.ts +10 -2
  145. package/dist/context/send-retry.cjs +4 -4
  146. package/dist/context/send-retry.cjs.map +1 -1
  147. package/dist/coordination/host/runtime.cjs +8 -30
  148. package/dist/coordination/host/runtime.cjs.map +1 -1
  149. package/dist/coordination/host/runtime.d.cts +3 -3
  150. package/dist/coordination/host/runtime.d.mts +3 -3
  151. package/dist/coordination/host/runtime.d.ts +3 -3
  152. package/dist/coordination/host/types.cjs.map +1 -1
  153. package/dist/coordination/host/types.d.cts +0 -5
  154. package/dist/coordination/host/types.d.mts +0 -5
  155. package/dist/coordination/host/types.d.ts +0 -5
  156. package/dist/coordination/platform/node.cjs +90 -9
  157. package/dist/coordination/platform/node.cjs.map +1 -1
  158. package/dist/define.cjs +25 -1
  159. package/dist/define.cjs.map +1 -1
  160. package/dist/experiment/host/index.cjs +1 -0
  161. package/dist/experiment/host/index.cjs.map +1 -1
  162. package/dist/i18n/en.cjs +26 -8
  163. package/dist/i18n/en.cjs.map +1 -1
  164. package/dist/i18n/en.d.cts +19 -6
  165. package/dist/i18n/en.d.mts +19 -6
  166. package/dist/i18n/en.d.ts +19 -6
  167. package/dist/index.cjs.map +1 -1
  168. package/dist/index.d.cts +1 -1
  169. package/dist/index.d.mts +1 -1
  170. package/dist/index.d.ts +1 -1
  171. package/dist/o11y/parsers/hermes.cjs +1 -1
  172. package/dist/o11y/parsers/hermes.cjs.map +1 -1
  173. package/dist/o11y/prices.json +1 -1
  174. package/dist/o11y/record/families.cjs +12 -3
  175. package/dist/o11y/record/families.cjs.map +1 -1
  176. package/dist/o11y/record/families.d.cts +8 -8
  177. package/dist/o11y/record/families.d.mts +8 -8
  178. package/dist/o11y/record/families.d.ts +8 -8
  179. package/dist/o11y/record/family-projectors.d.cts +66 -18
  180. package/dist/o11y/record/family-projectors.d.mts +66 -18
  181. package/dist/o11y/record/family-projectors.d.ts +66 -18
  182. package/dist/o11y/record/family-writers.d.cts +11 -3
  183. package/dist/o11y/record/family-writers.d.mts +11 -3
  184. package/dist/o11y/record/family-writers.d.ts +11 -3
  185. package/dist/o11y/record/runner-producer.cjs +14 -4
  186. package/dist/o11y/record/runner-producer.cjs.map +1 -1
  187. package/dist/record/codec/core.d.cts +2 -2
  188. package/dist/record/codec/core.d.mts +2 -2
  189. package/dist/record/codec/core.d.ts +2 -2
  190. package/dist/record/family/catalog.d.cts +44 -12
  191. package/dist/record/family/catalog.d.mts +44 -12
  192. package/dist/record/family/catalog.d.ts +44 -12
  193. package/dist/record/family/index.js +128 -124
  194. package/dist/record/family/observability-v1.cjs +35 -0
  195. package/dist/record/family/observability-v1.cjs.map +1 -0
  196. package/dist/record/family/observability-v1.d.cts +3 -0
  197. package/dist/record/family/observability-v1.d.mts +3 -0
  198. package/dist/record/family/observability-v1.d.ts +3 -0
  199. package/dist/record/family/observability-v1.js +6 -0
  200. package/dist/record/family/observability-v1.js.map +1 -0
  201. package/dist/record/family/observability.cjs +58 -9
  202. package/dist/record/family/observability.cjs.map +1 -1
  203. package/dist/record/family/observability.d.cts +1014 -15
  204. package/dist/record/family/observability.d.mts +1014 -15
  205. package/dist/record/family/observability.d.ts +1014 -15
  206. package/dist/record/family/observability.js +22 -18
  207. package/dist/record/host/runtime.cjs +600 -31
  208. package/dist/record/host/runtime.cjs.map +1 -1
  209. package/dist/record/host/types.cjs.map +1 -1
  210. package/dist/record/host/types.d.cts +33 -9
  211. package/dist/record/host/types.d.mts +33 -9
  212. package/dist/record/host/types.d.ts +33 -9
  213. package/dist/record/maintenance/runtime.cjs +1 -2
  214. package/dist/record/maintenance/runtime.cjs.map +1 -1
  215. package/dist/record/model/core.cjs.map +1 -1
  216. package/dist/record/model/core.d.cts +1 -1
  217. package/dist/record/model/core.d.mts +1 -1
  218. package/dist/record/model/core.d.ts +1 -1
  219. package/dist/record/model/definition.d.cts +6 -6
  220. package/dist/record/model/definition.d.mts +6 -6
  221. package/dist/record/model/definition.d.ts +6 -6
  222. package/dist/record/model/identifiers.cjs +1 -1
  223. package/dist/record/model/identifiers.cjs.map +1 -1
  224. package/dist/record/model/identifiers.d.cts +1 -1
  225. package/dist/record/model/identifiers.d.mts +1 -1
  226. package/dist/record/model/identifiers.d.ts +1 -1
  227. package/dist/record/platform/node.cjs +159 -23
  228. package/dist/record/platform/node.cjs.map +1 -1
  229. package/dist/record/platform/services.cjs.map +1 -1
  230. package/dist/record/platform/services.d.cts +15 -2
  231. package/dist/record/platform/services.d.mts +15 -2
  232. package/dist/record/platform/services.d.ts +15 -2
  233. package/dist/record/reader/errors.cjs +37 -1
  234. package/dist/record/reader/errors.cjs.map +1 -1
  235. package/dist/record/reader/errors.d.cts +49 -1
  236. package/dist/record/reader/errors.d.mts +49 -1
  237. package/dist/record/reader/errors.d.ts +49 -1
  238. package/dist/record/reader/errors.js +22 -12
  239. package/dist/record/reader/format.cjs +76 -17
  240. package/dist/record/reader/format.cjs.map +1 -1
  241. package/dist/record/reader/format.d.cts +11 -4
  242. package/dist/record/reader/format.d.mts +11 -4
  243. package/dist/record/reader/format.d.ts +11 -4
  244. package/dist/record/reader/format.js +2 -0
  245. package/dist/record/reader/index.js +32 -18
  246. package/dist/record/reader/runtime.cjs +64 -0
  247. package/dist/record/reader/runtime.cjs.map +1 -1
  248. package/dist/record/reader/runtime.d.cts +15 -0
  249. package/dist/record/reader/runtime.d.mts +15 -0
  250. package/dist/record/reader/runtime.d.ts +15 -0
  251. package/dist/record/reader/runtime.js +2 -0
  252. package/dist/report/assets/styles.css +53 -29
  253. package/dist/report/built-in/analysis-values.cjs +21 -13
  254. package/dist/report/built-in/analysis-values.cjs.map +1 -1
  255. package/dist/report/built-in/analysis-values.d.cts +11 -22
  256. package/dist/report/built-in/analysis-values.d.mts +11 -22
  257. package/dist/report/built-in/analysis-values.d.ts +11 -22
  258. package/dist/report/built-in/analysis-values.js +4 -6
  259. package/dist/report/built-in/index.cjs +1 -3
  260. package/dist/report/built-in/index.cjs.map +1 -1
  261. package/dist/report/built-in/index.d.cts +1 -1
  262. package/dist/report/built-in/index.d.mts +1 -1
  263. package/dist/report/built-in/index.d.ts +1 -1
  264. package/dist/report/built-in/index.js +4 -8
  265. package/dist/report/built-in/index.mjs +4 -8
  266. package/dist/report/built-in/machine.cjs +0 -2
  267. package/dist/report/built-in/machine.cjs.map +1 -1
  268. package/dist/report/built-in/machine.d.cts +0 -2
  269. package/dist/report/built-in/machine.d.mts +0 -2
  270. package/dist/report/built-in/machine.d.ts +0 -2
  271. package/dist/report/built-in/result-components.cjs +49 -51
  272. package/dist/report/built-in/result-components.cjs.map +1 -1
  273. package/dist/report/built-in/result-components.d.cts +16 -17
  274. package/dist/report/built-in/result-components.d.mts +16 -17
  275. package/dist/report/built-in/result-components.d.ts +16 -17
  276. package/dist/report/built-in/result-components.js +0 -4
  277. package/dist/report/built-in/run-membership-overview.cjs +126 -17
  278. package/dist/report/built-in/run-membership-overview.cjs.map +1 -1
  279. package/dist/report/built-in/run-membership-overview.d.cts +14 -0
  280. package/dist/report/built-in/run-membership-overview.d.mts +14 -0
  281. package/dist/report/built-in/run-membership-overview.d.ts +14 -0
  282. package/dist/report/built-in/run-membership-overview.js +4 -2
  283. package/dist/report/built-in/standard.cjs +80 -45
  284. package/dist/report/built-in/standard.cjs.map +1 -1
  285. package/dist/report/built-in/standard.d.cts +19 -41
  286. package/dist/report/built-in/standard.d.mts +19 -41
  287. package/dist/report/built-in/standard.d.ts +19 -41
  288. package/dist/report/built-in/standard.js +6 -6
  289. package/dist/report/components/attempt-detail/compute.cjs +78 -2
  290. package/dist/report/components/attempt-detail/compute.cjs.map +1 -1
  291. package/dist/report/components/attempt-detail/compute.d.cts +1 -1
  292. package/dist/report/components/attempt-detail/compute.d.mts +1 -1
  293. package/dist/report/components/attempt-detail/compute.d.ts +1 -1
  294. package/dist/report/components/attempt-detail/content.cjs +1 -1
  295. package/dist/report/components/attempt-detail/content.cjs.map +1 -1
  296. package/dist/report/components/entity-lists/compute.cjs +42 -5
  297. package/dist/report/components/entity-lists/compute.cjs.map +1 -1
  298. package/dist/report/components/entity-lists/compute.d.cts +10 -8
  299. package/dist/report/components/entity-lists/compute.d.mts +10 -8
  300. package/dist/report/components/entity-lists/compute.d.ts +10 -8
  301. package/dist/report/components/entity-lists/content.cjs +31 -6
  302. package/dist/report/components/entity-lists/content.cjs.map +1 -1
  303. package/dist/report/components/entity-lists/index.cjs +9 -4
  304. package/dist/report/components/entity-lists/index.cjs.map +1 -1
  305. package/dist/report/components/entity-lists/index.d.cts +4 -7
  306. package/dist/report/components/entity-lists/index.d.mts +4 -7
  307. package/dist/report/components/entity-lists/index.d.ts +4 -7
  308. package/dist/report/components/summaries/compute.cjs +8 -1
  309. package/dist/report/components/summaries/compute.cjs.map +1 -1
  310. package/dist/report/components/summaries/compute.d.cts +9 -1
  311. package/dist/report/components/summaries/compute.d.mts +9 -1
  312. package/dist/report/components/summaries/compute.d.ts +9 -1
  313. package/dist/report/components/summaries/index.cjs +48 -4
  314. package/dist/report/components/summaries/index.cjs.map +1 -1
  315. package/dist/report/components/summaries/index.d.cts +7 -4
  316. package/dist/report/components/summaries/index.d.mts +7 -4
  317. package/dist/report/components/summaries/index.d.ts +7 -4
  318. package/dist/report/definition/cell.cjs +3 -0
  319. package/dist/report/definition/cell.cjs.map +1 -1
  320. package/dist/report/definition/cell.d.cts +2 -0
  321. package/dist/report/definition/cell.d.mts +2 -0
  322. package/dist/report/definition/cell.d.ts +2 -0
  323. package/dist/report/definition/primitives/chart.cjs +8 -5
  324. package/dist/report/definition/primitives/chart.cjs.map +1 -1
  325. package/dist/report/definition/primitives/points-dataset.cjs +1 -0
  326. package/dist/report/definition/primitives/points-dataset.cjs.map +1 -1
  327. package/dist/report/definition/primitives.cjs +15 -2
  328. package/dist/report/definition/primitives.cjs.map +1 -1
  329. package/dist/report/definition/report.cjs +27 -3
  330. package/dist/report/definition/report.cjs.map +1 -1
  331. package/dist/report/definition/report.d.cts +8 -0
  332. package/dist/report/definition/report.d.mts +8 -0
  333. package/dist/report/definition/report.d.ts +8 -0
  334. package/dist/report/execution/machine.cjs +30 -14
  335. package/dist/report/execution/machine.cjs.map +1 -1
  336. package/dist/report/execution/machine.d.cts +20 -10
  337. package/dist/report/execution/machine.d.mts +20 -10
  338. package/dist/report/execution/machine.d.ts +20 -10
  339. package/dist/report/execution/machine.js +6 -6
  340. package/dist/report/host/execute.cjs +25 -16
  341. package/dist/report/host/execute.cjs.map +1 -1
  342. package/dist/report/host/execute.d.cts +4 -0
  343. package/dist/report/host/execute.d.mts +4 -0
  344. package/dist/report/host/execute.d.ts +4 -0
  345. package/dist/report/host/from-record.cjs +22 -5
  346. package/dist/report/host/from-record.cjs.map +1 -1
  347. package/dist/report/host/machine.cjs +53 -11
  348. package/dist/report/host/machine.cjs.map +1 -1
  349. package/dist/report/host/site-runtime.cjs +9 -8
  350. package/dist/report/host/site-runtime.cjs.map +1 -1
  351. package/dist/report/host/site-runtime.d.cts +1 -1
  352. package/dist/report/host/site-runtime.d.mts +1 -1
  353. package/dist/report/host/site-runtime.d.ts +1 -1
  354. package/dist/report/host/static.cjs +56 -9
  355. package/dist/report/host/static.cjs.map +1 -1
  356. package/dist/report/index.cjs.map +1 -1
  357. package/dist/report/index.d.cts +1 -1
  358. package/dist/report/index.d.mts +1 -1
  359. package/dist/report/index.d.ts +1 -1
  360. package/dist/report/model/dataset.cjs +7 -2
  361. package/dist/report/model/dataset.cjs.map +1 -1
  362. package/dist/report/model/locale.cjs +2 -0
  363. package/dist/report/model/locale.cjs.map +1 -1
  364. package/dist/report/model/locale.d.cts +1 -0
  365. package/dist/report/model/locale.d.mts +1 -0
  366. package/dist/report/model/locale.d.ts +1 -0
  367. package/dist/report/model/metrics.cjs +3 -1
  368. package/dist/report/model/metrics.cjs.map +1 -1
  369. package/dist/report/model/pricing.cjs +16 -11
  370. package/dist/report/model/pricing.cjs.map +1 -1
  371. package/dist/report/react/styles.css +53 -29
  372. package/dist/runner/adoption.cjs +1 -0
  373. package/dist/runner/adoption.cjs.map +1 -1
  374. package/dist/runner/attempt.cjs +44 -5
  375. package/dist/runner/attempt.cjs.map +1 -1
  376. package/dist/runner/attempt.d.cts +13 -1
  377. package/dist/runner/attempt.d.mts +13 -1
  378. package/dist/runner/attempt.d.ts +13 -1
  379. package/dist/runner/config-identity.cjs +10 -2
  380. package/dist/runner/config-identity.cjs.map +1 -1
  381. package/dist/runner/config-identity.d.cts +4 -2
  382. package/dist/runner/config-identity.d.mts +4 -2
  383. package/dist/runner/config-identity.d.ts +4 -2
  384. package/dist/runner/feedback/human.cjs +298 -59
  385. package/dist/runner/feedback/human.cjs.map +1 -1
  386. package/dist/runner/feedback/json.cjs +14 -6
  387. package/dist/runner/feedback/json.cjs.map +1 -1
  388. package/dist/runner/feedback/json.d.cts +3 -2
  389. package/dist/runner/feedback/json.d.mts +3 -2
  390. package/dist/runner/feedback/json.d.ts +3 -2
  391. package/dist/runner/feedback/reducer.cjs +2 -0
  392. package/dist/runner/feedback/reducer.cjs.map +1 -1
  393. package/dist/runner/judge-config.cjs +1 -1
  394. package/dist/runner/judge-config.cjs.map +1 -1
  395. package/dist/runner/ledger.cjs +124 -12
  396. package/dist/runner/ledger.cjs.map +1 -1
  397. package/dist/runner/project-current.cjs +13 -5
  398. package/dist/runner/project-current.cjs.map +1 -1
  399. package/dist/runner/run.cjs +564 -256
  400. package/dist/runner/run.cjs.map +1 -1
  401. package/dist/runner/sandbox-pool.cjs +161 -30
  402. package/dist/runner/sandbox-pool.cjs.map +1 -1
  403. package/dist/runner/sandbox-pool.d.cts +34 -2
  404. package/dist/runner/sandbox-pool.d.mts +34 -2
  405. package/dist/runner/sandbox-pool.d.ts +34 -2
  406. package/dist/runner/shared-state-lease.cjs +803 -0
  407. package/dist/runner/shared-state-lease.cjs.map +1 -0
  408. package/dist/runner/shared-state-lease.d.cts +121 -0
  409. package/dist/runner/shared-state-lease.d.mts +121 -0
  410. package/dist/runner/shared-state-lease.d.ts +121 -0
  411. package/dist/runner/shared-state-lease.js +24 -0
  412. package/dist/runner/shared-state-lease.js.map +1 -0
  413. package/dist/runner/teardown-registry.cjs +97 -34
  414. package/dist/runner/teardown-registry.cjs.map +1 -1
  415. package/dist/runner/teardown-registry.d.cts +27 -1
  416. package/dist/runner/teardown-registry.d.mts +27 -1
  417. package/dist/runner/teardown-registry.d.ts +27 -1
  418. package/dist/runner/teardown-registry.js +20 -16
  419. package/dist/runner/types.cjs.map +1 -1
  420. package/dist/runner/types.d.cts +31 -5
  421. package/dist/runner/types.d.mts +31 -5
  422. package/dist/runner/types.d.ts +31 -5
  423. package/dist/sample/analysis.cjs +249 -459
  424. package/dist/sample/analysis.cjs.map +1 -1
  425. package/dist/sample/capability.cjs +138 -7
  426. package/dist/sample/capability.cjs.map +1 -1
  427. package/dist/sample/capability.d.cts +3 -1
  428. package/dist/sample/capability.d.mts +3 -1
  429. package/dist/sample/capability.d.ts +3 -1
  430. package/dist/sample/capability.js +8 -6
  431. package/dist/sandbox/docker-agent-image.cjs +5 -1
  432. package/dist/sandbox/docker-agent-image.cjs.map +1 -1
  433. package/dist/sandbox/docker-agent-image.d.cts +2 -0
  434. package/dist/sandbox/docker-agent-image.d.mts +2 -0
  435. package/dist/sandbox/docker-agent-image.d.ts +2 -0
  436. package/dist/sandbox/docker-agent-image.js +14 -10
  437. package/dist/sandbox/docker-profile/schema.cjs +283 -534
  438. package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
  439. package/dist/sandbox/docker-profile/schema.d.cts +10 -27
  440. package/dist/sandbox/docker-profile/schema.d.mts +10 -27
  441. package/dist/sandbox/docker-profile/schema.d.ts +10 -27
  442. package/dist/sandbox/e2b-agent-template.cjs +5 -2
  443. package/dist/sandbox/e2b-agent-template.cjs.map +1 -1
  444. package/dist/sandbox/index.cjs +4 -2
  445. package/dist/sandbox/index.cjs.map +1 -1
  446. package/dist/sandbox/index.d.cts +1 -1
  447. package/dist/sandbox/index.d.mts +1 -1
  448. package/dist/sandbox/index.d.ts +1 -1
  449. package/dist/sandbox/index.js +120 -116
  450. package/dist/sandbox/index.mjs +120 -116
  451. package/dist/sandbox/keep-registry.cjs +28 -66
  452. package/dist/sandbox/keep-registry.cjs.map +1 -1
  453. package/dist/sandbox/types.cjs.map +1 -1
  454. package/dist/sandbox/types.d.cts +1 -1
  455. package/dist/sandbox/types.d.mts +1 -1
  456. package/dist/sandbox/types.d.ts +1 -1
  457. package/dist/shared/aggregate.cjs +16 -6
  458. package/dist/shared/aggregate.cjs.map +1 -1
  459. package/dist/shared/aggregate.d.cts +12 -4
  460. package/dist/shared/aggregate.d.mts +12 -4
  461. package/dist/shared/aggregate.d.ts +12 -4
  462. package/dist/shared/turn-label.cjs +20 -2
  463. package/dist/shared/turn-label.cjs.map +1 -1
  464. package/dist/shared/turn-label.d.cts +2 -0
  465. package/dist/shared/turn-label.d.mts +2 -0
  466. package/dist/shared/turn-label.d.ts +2 -0
  467. package/dist/shared/turn-label.js +4 -2
  468. package/dist/vendor/remark/remark-gfm.cjs +7 -7
  469. package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
  470. package/dist/vendor/remark/remark-parse.cjs +12 -12
  471. package/dist/vendor/remark/remark-parse.cjs.map +1 -1
  472. package/dist/vendor/remark/remark.cjs +13 -13
  473. package/dist/vendor/remark/remark.cjs.map +1 -1
  474. package/dist/view/server.cjs +6 -0
  475. package/dist/view/server.cjs.map +1 -1
  476. package/docs-site/images/hitl-handshake-zh.svg +3 -3
  477. package/docs-site/zh/examples/ai-agent-application.mdx +1 -1
  478. package/docs-site/zh/examples/coding-agent-extensions.mdx +1 -1
  479. package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +4 -3
  480. package/docs-site/zh/examples/integrations/claude-sdk.mdx +3 -3
  481. package/docs-site/zh/examples/integrations/codex-sdk.mdx +5 -5
  482. package/docs-site/zh/examples/integrations/langgraph.mdx +4 -4
  483. package/docs-site/zh/examples/integrations/pi-sdk.mdx +5 -5
  484. package/docs-site/zh/explanation/adapter.mdx +5 -5
  485. package/docs-site/zh/explanation/assert.mdx +7 -7
  486. package/docs-site/zh/explanation/drive.mdx +4 -2
  487. package/docs-site/zh/explanation/evals.mdx +10 -8
  488. package/docs-site/zh/explanation/experiment.mdx +2 -2
  489. package/docs-site/zh/explanation/hitl.mdx +9 -9
  490. package/docs-site/zh/explanation/judge.mdx +5 -5
  491. package/docs-site/zh/explanation/overview.mdx +3 -3
  492. package/docs-site/zh/explanation/runner.mdx +1 -1
  493. package/docs-site/zh/index.mdx +3 -3
  494. package/docs-site/zh/reference/builtin-agents.mdx +13 -13
  495. package/docs-site/zh/reference/capabilities.mdx +1 -1
  496. package/docs-site/zh/reference/cli.mdx +18 -12
  497. package/docs-site/zh/reference/define-agent.mdx +130 -5
  498. package/docs-site/zh/reference/define-config.mdx +2 -2
  499. package/docs-site/zh/reference/define-eval.mdx +4 -4
  500. package/docs-site/zh/reference/events.mdx +11 -11
  501. package/docs-site/zh/reference/official-adapters.mdx +6 -6
  502. package/docs-site/zh/reference/results-data.mdx +6 -0
  503. package/docs-site/zh/troubleshooting/debugging.mdx +1 -1
  504. package/docs-site/zh/troubleshooting/recover-after-kill.mdx +37 -5
  505. package/docs-site/zh/tutorials/accept-results.mdx +72 -0
  506. package/docs-site/zh/tutorials/agent-onboarding.mdx +6 -6
  507. package/docs-site/zh/tutorials/authoring.mdx +9 -13
  508. package/docs-site/zh/tutorials/ci-integration.mdx +6 -6
  509. package/docs-site/zh/tutorials/compare-runs.mdx +61 -0
  510. package/docs-site/zh/tutorials/concurrency.mdx +13 -12
  511. package/docs-site/zh/tutorials/configuration.mdx +4 -6
  512. package/docs-site/zh/tutorials/connect-your-agent.mdx +1 -1
  513. package/docs-site/zh/tutorials/control-run-cost.mdx +58 -0
  514. package/docs-site/zh/tutorials/criteria-files.mdx +2 -2
  515. package/docs-site/zh/tutorials/custom-reports.mdx +2 -2
  516. package/docs-site/zh/tutorials/debug-lifecycle-plan.mdx +46 -0
  517. package/docs-site/zh/tutorials/docker-in-docker.mdx +52 -43
  518. package/docs-site/zh/tutorials/eval-groups.mdx +6 -6
  519. package/docs-site/zh/tutorials/evaluation-kinds.mdx +3 -3
  520. package/docs-site/zh/tutorials/experiments.mdx +2 -3
  521. package/docs-site/zh/tutorials/handle-execution-failures.mdx +18 -10
  522. package/docs-site/zh/tutorials/install-custom-sandbox-agent.mdx +16 -8
  523. package/docs-site/zh/tutorials/nixos-managed-dind.mdx +160 -0
  524. package/docs-site/zh/tutorials/plugins.mdx +14 -0
  525. package/docs-site/zh/tutorials/rerun-and-cache.mdx +4 -2
  526. package/docs-site/zh/tutorials/sandbox-agent.mdx +17 -11
  527. package/docs-site/zh/tutorials/sandbox-providers.mdx +17 -13
  528. package/docs-site/zh/tutorials/sandbox-reuse.mdx +12 -19
  529. package/docs-site/zh/tutorials/select-and-preview.mdx +65 -0
  530. package/docs-site/zh/tutorials/verify-judge.mdx +78 -0
  531. package/docs-site/zh/tutorials/viewing-results.mdx +38 -1
  532. package/docs-site/zh/tutorials/write-experiment.mdx +7 -5
  533. package/docs-site/zh/tutorials/write-send.mdx +9 -8
  534. package/package.json +9 -5
  535. package/dist/report/built-in/overview.cjs +0 -44
  536. package/dist/report/built-in/overview.cjs.map +0 -1
  537. package/dist/report/built-in/overview.d.cts +0 -6
  538. package/dist/report/built-in/overview.d.mts +0 -6
  539. package/dist/report/built-in/overview.d.ts +0 -6
  540. package/dist/report/built-in/overview.js +0 -9
  541. package/dist/report/built-in/overview.js.map +0 -1
  542. package/dist/runner/gate-lease.cjs +0 -283
  543. package/dist/runner/gate-lease.cjs.map +0 -1
  544. package/dist/runner/gate-lease.d.cts +0 -62
  545. package/dist/runner/gate-lease.d.mts +0 -62
  546. package/dist/runner/gate-lease.d.ts +0 -62
  547. package/dist/runner/gate-lease.js +0 -22
  548. package/dist/runner/gate-lease.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["execute.ts"],"names":[],"mappings":";;AAmEA,kDAwCC;AAID,8CA6FC;AA8ND,wDAKC;AA8GD,4DA0BC;AAwCD,0CAEC;AAjmBD,6CAAyC;AACzC,+CAA4C;AAC5C,mCAAgC;AAEhC,iCAAiF;AACjF,6CAAwD;AACxD,sDAA0K;AAC1K,8DAA+F;AAC/F,uDAA2I;AAC3I,mDAA0Q;AAC1Q,wEAAyE;AACzE,gEAAoE;AACpE,oDAAiO;AAEjO,oDAA2K;AAC3K,sDAAsG;AACtG,kDAA0D;AAI1D,qDAAoG;AACpG,uDAA0H;AAC1H,wDAA+M;AAC/M,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,OAAO,CAAU,CAAC;AAuC7C;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,KAQ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,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC;AACD,qEAAqE;AACrE,SAAgB,eAAe,CAAC,IAAkB,EAAE,MAAc;IAC9D,OAAO,IAAA,gCAAoB,EAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import { createHash } from \"node:crypto\";\nimport { readFile } from \"node:fs/promises\";\nimport { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport { createElement, Fragment as ReactFragment, type ReactNode } from \"react\";\nimport { renderToStaticMarkup } from \"react-dom/server\";\nimport { attemptEvidenceView, query, type AnalysisIssue, type AnalysisRequestError, type JsonValue, type Sample, type SampleClosedError, } from \"../../analysis/index.ts\";\nimport { captureAnalysisIssues, type AnalysisIssueCapture, } from \"../../sample/capability.ts\";\nimport { buildReportMeta, resolveReportTitle, type PageContext, type ReportDefinition, type ReportTarget, } from \"../definition/report.ts\";\nimport { COMPONENT_RAW_CHILDREN, Fragment, collectPageDimensions, createTextContext, renderNodeToText, resolveReportTree, runWithWebContext, validateReportTree, withPageDimensions, type ReportElement, type ReportNode, type WebContext, } from \"../definition/tree.ts\";\nimport { collectDownloads } from \"../definition/primitives/downloads.ts\";\nimport { DOWNLOAD_TARGET_PAGE } from \"../definition/primitives.tsx\";\nimport { REPORT_BUILD_RSS_BYTES_MAX, REPORT_BUILD_TIME_MS_MAX, REPORT_DOCUMENT_DEPTH_MAX, REPORT_DOCUMENT_NODES_MAX, REPORT_PAGES_MAX, reportBuildBudgetExceeded, type ReportBuildBudgetExceeded, } from \"../execution/model.ts\";\nimport type { ReportProblem } from \"../execution/machine.ts\";\nimport { routeWithParameterKey, staticPathForDownload, staticPathForRoute, validateDownloadPath, validateParameterKey, validateReportRoute, } from \"../execution/paths.ts\";\nimport { collectRendererAssetDeclarations, materializeRendererAssets, } from \"../extension/assets.ts\";\nimport { resolveLocalizedText } from \"../model/locale.ts\";\nimport type { PanelMode } from \"../model/panel.ts\";\nimport { type ResolvedPage, type ResolvedPageAssetOutput, type ResolvedPageClosureError, type ResolvedPageOutput, } from \"../runtime/resolved-page.ts\";\nimport type { ThemeDefinition } from \"../theme.ts\";\nimport { executeShowTarget, type ShowTargetError, type ShowTargetRequest, } from \"./show-target.ts\";\nimport { isReportTargetRouteInvalid, showTargetRequestForRoute, type ReportTargetRouteInvalid, } from \"./target-route.ts\";\nimport { buildReportProjections, closePricingProfileJson, reportProjectionFailure, type ReportProjectionBuildFailure, type ReportProjectionCostInput, type ReportProjections, } from \"../execution/machine.ts\";\nconst TEXT_WIDTH = 80;\nconst WEB_LOCALES = [\"en\", \"zh-CN\"] as const;\nexport interface ReportPageExecutionFailed {\n readonly code: \"report-page-execution-failed\";\n readonly pageId: string;\n readonly phase: \"enumerate\" | \"params-encode\" | \"resolve\" | \"text\" | \"web\" | \"assets\";\n readonly reason: string;\n}\nexport interface ReportSiteRouteConflict {\n readonly code: \"report-site-route-conflict\";\n readonly route: string;\n readonly pageIds: readonly [\n string,\n string\n ];\n}\nexport type ReportExecutionError = SampleClosedError | AnalysisRequestError | ShowTargetError | ResolvedPageClosureError | ReportTargetRouteInvalid | ReportPageExecutionFailed | ReportSiteRouteConflict | ReportProjectionBuildFailure | ReportBuildBudgetExceeded;\nexport interface ClosedTargetExecution {\n readonly page: ResolvedPage;\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\nexport interface ClosedSitePage {\n readonly page: ResolvedPage;\n readonly navigation: boolean;\n}\n/** Host-private complete page closure used only while forming a revision. */\nexport interface ClosedReportSite {\n /** Monotonic-enough wall clock anchor for the full Sample-open + byte build budget. */\n readonly startedAtMs: number;\n /** Process RSS immediately before the Record-backed Sample is opened. */\n readonly baselineRssBytes: number;\n readonly sampleIdentity: string;\n readonly reportIdentity: string;\n readonly title: import(\"../model/locale.ts\").LocalizedText;\n readonly theme?: ThemeDefinition;\n readonly pages: readonly ClosedSitePage[];\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/**\n * Executes exactly one selected route. It intentionally delegates selection to\n * show-target.ts, whose parameterized branch never calls enumerate().\n */\nexport function executeReportTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly route?: string;\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<ClosedTargetExecution, ReportExecutionError, Scope.Scope> {\n const request = showTargetRequestForRoute(input.report, input.route);\n if (isReportTargetRouteInvalid(request))\n return Effect.fail(request);\n return Effect.gen(function* () {\n const capture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.flatMap(\n // show keeps the exact author declaration and never enumerates an\n // unselected parameterized Page.\n executeTarget({\n ...input,\n pages: input.report.pages,\n request,\n capture,\n }), (page) => {\n const costs = capturedProjectionCosts(capture, page.target.route, page.target.pageId);\n const pricingProfile = reportPricingProfileJson(input.report);\n const failure = reportProjectionFailure({ pricingProfile, costs });\n if (failure !== undefined)\n return Effect.fail(failure);\n return Effect.succeed(Object.freeze({\n page,\n // Every cost entry captured during this one Page execution binds\n // to that route/page and retains Analysis's measure/row/profile.\n projections: buildReportProjections({\n pricingProfile,\n costs,\n }),\n problems: analysisProblems(capture.issues(), page.target.pageId),\n }));\n }), Effect.sync(() => capture.close()));\n });\n}\n/** One normalized Page declaration owned by the selected Report. */\ntype ReportPageDefinition = ReportDefinition[\"pages\"][number];\n/** Enumerates and closes every page instance exactly once for view/static. */\nexport function executeReportSite(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly budget: ReportBuildBudgetAnchor;\n}): Effect.Effect<ClosedReportSite, ReportExecutionError, Scope.Scope> {\n return Effect.gen(function* () {\n const { startedAtMs, baselineRssBytes } = input.budget;\n // The outer capture covers enumerate()/params encode phases for generic\n // Analysis issues only. Cost projections belong only to actual Page\n // executions, where the Host can bind a real route/pageId.\n const outerCapture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.gen(function* () {\n const pages: ClosedSitePage[] = [];\n const routeOwners = new Map<string, string>();\n const siteIssues: AnalysisIssue[] = [];\n const projectionCosts: ReportProjectionCostInput[] = [];\n const pricingProfile = reportPricingProfileJson(input.report);\n // The Report declaration is the only page owner. A custom Report that\n // wants official drill-down Pages composes those exported Pages\n // explicitly; the Host never merges another Report by id.\n const definitions = input.report.pages;\n const plainCount = definitions.filter((page) => page.params === undefined).length;\n if (plainCount > REPORT_PAGES_MAX) {\n return yield* Effect.fail(reportBuildBudgetExceeded(\"pages\", REPORT_PAGES_MAX, plainCount));\n }\n for (const definition of definitions) {\n yield* checkBuildBudgets(input.budget);\n if (definition.params === undefined) {\n const { page, projectionCosts: pageCosts, issues } = yield* executePageWithCapture({\n ...input,\n pages: definitions,\n request: { kind: \"page\", pageId: definition.id },\n capturePage: (capture) => capturedProjectionCosts(capture, definition.path, definition.id),\n });\n yield* addSitePage(pages, routeOwners, page, definition.navigation);\n yield* registerProjectionCosts(pricingProfile, projectionCosts, pageCosts);\n siteIssues.push(...issues);\n continue;\n }\n const values = yield* invokeAuthor(definition.id, \"enumerate\", outerCapture, () => definition.params.enumerate(input.sample));\n if (values === null || values === undefined || typeof (values as Iterable<JsonValue>)[Symbol.iterator] !== \"function\") {\n return yield* Effect.fail(pageFailure(definition.id, \"enumerate\", \"params.enumerate() must return a finite Iterable\"));\n }\n for (const params of values as Iterable<JsonValue>) {\n if (pages.length >= REPORT_PAGES_MAX) {\n return yield* Effect.fail(reportBuildBudgetExceeded(\"pages\", REPORT_PAGES_MAX, pages.length + 1));\n }\n const key = yield* invokeAuthor(definition.id, \"params-encode\", outerCapture, () => definition.params.encode(params));\n const invalidKey = typeof key === \"string\" ? validateParameterKey(key) : undefined;\n if (typeof key !== \"string\" || invalidKey !== undefined) {\n return yield* Effect.fail(pageFailure(definition.id, \"params-encode\", invalidKey?.reason ?? \"params.encode() must return a canonical parameter key\"));\n }\n const route = routeWithParameterKey(definition.path, key);\n const routeIssue = validateReportRoute(route);\n if (routeIssue !== undefined) {\n return yield* Effect.fail(pageFailure(definition.id, \"params-encode\", routeIssue.reason));\n }\n // executeShowTarget supplies the required decode -> encode\n // canonical round trip, but does not enumerate this page again.\n const { page, projectionCosts: pageCosts, issues } = yield* executePageWithCapture({\n ...input,\n pages: definitions,\n request: {\n kind: \"parameterized-page\",\n pageId: definition.id,\n key,\n route,\n },\n capturePage: (capture) => capturedProjectionCosts(capture, route, definition.id),\n });\n yield* addSitePage(pages, routeOwners, page, false);\n yield* registerProjectionCosts(pricingProfile, projectionCosts, pageCosts);\n siteIssues.push(...issues);\n yield* checkBuildBudgets(input.budget);\n }\n }\n siteIssues.push(...outerCapture.issues());\n return Object.freeze({\n startedAtMs,\n baselineRssBytes,\n sampleIdentity: input.sample.snapshot.identity.id,\n reportIdentity: reportDefinitionIdentity(input.report),\n title: resolveReportTitle(input.report),\n ...(input.report.theme === undefined ? {} : { theme: input.report.theme }),\n pages: Object.freeze(pages),\n projections: buildReportProjections({\n pricingProfile,\n costs: projectionCosts,\n }),\n problems: analysisProblems(mergeAnalysisIssues(siteIssues)),\n });\n }), Effect.sync(() => outerCapture.close()));\n });\n}\n/** One Page execution with its own capture: page, bound projection costs, and issues. */\nfunction executePageWithCapture(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly pages: readonly ReportPageDefinition[];\n readonly request: ShowTargetRequest;\n readonly capturePage: (capture: AnalysisIssueCapture) => ReportProjectionCostInput[];\n}): Effect.Effect<{\n readonly page: ResolvedPage;\n readonly projectionCosts: readonly ReportProjectionCostInput[];\n readonly issues: readonly AnalysisIssue[];\n}, ReportExecutionError, Scope.Scope> {\n return Effect.gen(function* () {\n const capture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.map(executeTarget({ ...input, capture }), (page) => Object.freeze({\n page,\n projectionCosts: Object.freeze(input.capturePage(capture)),\n issues: capture.issues(),\n })), Effect.sync(() => capture.close()));\n });\n}\n/**\n * Validates one Page's capture before retaining it. Route ownership makes\n * capture keys page-local, so re-closing every prior Page here would only\n * repeat canonical JSON work quadratically; the final site closure performs\n * the one whole-site canonicalization.\n */\nfunction registerProjectionCosts(pricingProfile: JsonValue | null, output: ReportProjectionCostInput[], costs: readonly ReportProjectionCostInput[]): Effect.Effect<void, ReportProjectionBuildFailure> {\n const failure = reportProjectionFailure({ pricingProfile, costs });\n if (failure !== undefined)\n return Effect.fail(failure);\n output.push(...costs);\n return Effect.void;\n}\n/**\n * Reads the cost entries an Analysis execution capture recorded and binds them\n * to one Page execution. The Host never rebuilds a projection from a\n * MetricValue.value or from the built-in show data.\n */\nfunction capturedProjectionCosts(capture: AnalysisIssueCapture, route: string, pageId: string): 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 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/** Merges per-Page issue captures into the site-wide problem table input. */\nfunction mergeAnalysisIssues(issues: readonly AnalysisIssue[]): readonly AnalysisIssue[] {\n const unique = new Map<string, AnalysisIssue>();\n for (const issue of issues) {\n const key = `${issue.code}\\u0000${issue.message}\\u0000${issue.refs\n .map((ref) => ref.identity.locator).sort(compareUtf8).join(\"\\u0001\")}`;\n if (!unique.has(key))\n unique.set(key, issue);\n }\n return Object.freeze([...unique.values()].sort((left, right) => compareUtf8(left.code, right.code) || compareUtf8(left.message, right.message)));\n}\nfunction executeTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n /** The target-visible Page set from the selected Report declaration. */\n readonly pages: readonly ReportPageDefinition[];\n readonly request: ShowTargetRequest;\n readonly capture: AnalysisIssueCapture;\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<ResolvedPage, ReportExecutionError, Scope.Scope> {\n return executeShowTarget<ReportPageExecutionFailed, never>({\n definition: { pages: input.pages },\n sample: input.sample,\n request: input.request,\n evidence: (locator) => query(input.sample, {\n kind: \"domain-view\",\n view: attemptEvidenceView,\n locator,\n }),\n runAuthor: input.capture.run,\n close: (rendered, context) => closeRenderedPage({\n rendered: rendered as ReportNode,\n sample: input.sample,\n report: input.report,\n capture: input.capture,\n hrefPages: input.pages,\n page: context.page,\n route: context.target.route,\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n }),\n });\n}\nfunction closeRenderedPage(input: {\n readonly rendered: ReportNode;\n readonly sample: Sample;\n readonly report: ReportDefinition;\n /** Keeps Analysis calls made while resolving component trees page-bound. */\n readonly capture: AnalysisIssueCapture;\n /** Link targets are resolved only against the selected Report declaration. */\n readonly hrefPages: readonly ReportPageDefinition[];\n readonly page: PageContext;\n readonly route: string;\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<ResolvedPageOutput, ReportPageExecutionFailed> {\n return Effect.tryPromise({\n try: () => input.capture.run(async (): Promise<ResolvedPageOutput> => {\n const resolved = await resolveReportTree(input.rendered, {\n scope: input.sample,\n page: input.page,\n report: buildReportMeta(input.report),\n });\n validateReportTree(resolved);\n assertDocumentBudget(resolved, input.page.id, input.page.path);\n const requestedTextProjections = [\n { width: TEXT_WIDTH, panelMode: \"plain\" as const },\n ...(input.textProjection === undefined ||\n (input.textProjection.width === TEXT_WIDTH && input.textProjection.panelMode === \"plain\")\n ? []\n : [input.textProjection]),\n ];\n const text = WEB_LOCALES.flatMap((locale) => requestedTextProjections.map((projection) => {\n const pageDimensions = collectPageDimensions(resolved, input.report.dimensionPins, \"text\");\n const context = createTextContext({\n width: projection.width,\n locale,\n panelMode: projection.panelMode,\n pageDimensions,\n command: (target) => commandForTarget(input.hrefPages, target),\n });\n return Object.freeze({\n locale,\n width: projection.width,\n panelMode: projection.panelMode,\n text: renderNodeToText(resolved, context),\n });\n }));\n const web = WEB_LOCALES.map((locale) => {\n const pageDimensions = collectPageDimensions(resolved, input.report.dimensionPins, \"web\");\n const context = withPageDimensions<WebContext>({\n locale,\n href: (target) => hrefForTarget(input.hrefPages, input.route, target),\n dimension: () => {\n throw new Error(\"a Report web face queried an undeclared dimension\");\n },\n }, pageDimensions);\n const html = runWithWebContext(Object.freeze(context), () => renderToStaticMarkup(createElement(ReactFragment, null, resolved as ReactNode)));\n return Object.freeze({ locale, html });\n });\n const downloads = collectDownloads(resolved).map((download) => Object.freeze({\n id: download.path,\n path: download.path,\n mediaType: download.mediaType,\n bytes: download.bytes,\n }));\n const rendererAssets = await materializeRendererAssets(collectRendererAssetDeclarations(resolved), async (path) => new Uint8Array(await readFile(path)));\n const assets: ResolvedPageAssetOutput[] = [\n ...rendererAssets.styles.map((asset) => Object.freeze({\n kind: \"style\" as const,\n path: asset.path,\n mediaType: \"text/css; charset=utf-8\",\n bytes: asset.content,\n sha256: asset.hash,\n })),\n ...rendererAssets.scripts.map((asset) => Object.freeze({\n kind: \"script\" as const,\n path: asset.path,\n mediaType: \"text/javascript; charset=utf-8\",\n bytes: asset.content,\n sha256: asset.hash,\n })),\n ];\n return Object.freeze({\n title: input.page.title,\n head: input.report.head as unknown as JsonValue,\n text: Object.freeze(text),\n web: Object.freeze(web),\n downloads: Object.freeze(downloads),\n assets: Object.freeze(assets),\n });\n }),\n catch: (cause): ReportPageExecutionFailed => pageFailure(input.page.id, classifyCloseFailure(cause), boundedReason(cause)),\n });\n}\nfunction invokeAuthor<Value>(pageId: string, phase: ReportPageExecutionFailed[\"phase\"], capture: AnalysisIssueCapture, callback: () => Value | PromiseLike<Value>): Effect.Effect<Value, ReportPageExecutionFailed> {\n return Effect.tryPromise({\n try: () => new Promise<Value>((resolve) => resolve(capture.run(callback))),\n catch: (cause) => pageFailure(pageId, phase, boundedReason(cause)),\n });\n}\nfunction addSitePage(pages: ClosedSitePage[], routeOwners: Map<string, string>, page: ResolvedPage, navigation: boolean): Effect.Effect<void, ReportSiteRouteConflict | ReportBuildBudgetExceeded> {\n const owner = routeOwners.get(page.target.route);\n if (owner !== undefined) {\n return Effect.fail(Object.freeze({\n code: \"report-site-route-conflict\" as const,\n route: page.target.route,\n pageIds: Object.freeze([owner, page.target.pageId]) as readonly [\n string,\n string\n ],\n }));\n }\n if (pages.length >= REPORT_PAGES_MAX) {\n return Effect.fail(reportBuildBudgetExceeded(\"pages\", REPORT_PAGES_MAX, pages.length + 1));\n }\n routeOwners.set(page.target.route, page.target.pageId);\n pages.push(Object.freeze({ page, navigation }));\n return Effect.void;\n}\nexport interface ReportBuildBudgetAnchor {\n readonly startedAtMs: number;\n readonly baselineRssBytes: number;\n}\n/** Starts the budget before Record selection opens the fixed Sample. */\nexport function startReportBuildBudget(): ReportBuildBudgetAnchor {\n return Object.freeze({\n startedAtMs: Date.now(),\n baselineRssBytes: process.memoryUsage().rss,\n });\n}\nfunction checkBuildBudgets(anchor: ReportBuildBudgetAnchor): Effect.Effect<void, ReportBuildBudgetExceeded> {\n const elapsed = Date.now() - anchor.startedAtMs;\n if (elapsed > REPORT_BUILD_TIME_MS_MAX) {\n return Effect.fail(reportBuildBudgetExceeded(\"build-time\", REPORT_BUILD_TIME_MS_MAX, elapsed));\n }\n const rssGrowth = Math.max(0, process.memoryUsage().rss - anchor.baselineRssBytes);\n if (rssGrowth > REPORT_BUILD_RSS_BYTES_MAX) {\n return Effect.fail(reportBuildBudgetExceeded(\"build-rss\", REPORT_BUILD_RSS_BYTES_MAX, rssGrowth));\n }\n return Effect.void;\n}\nfunction assertDocumentBudget(node: ReportNode, pageId: string, route: string): void {\n const observed = countDocument(node, 0);\n if (observed.nodes > REPORT_DOCUMENT_NODES_MAX) {\n throw reportBuildBudgetExceeded(\"document-nodes\", REPORT_DOCUMENT_NODES_MAX, observed.nodes, { pageId, route });\n }\n if (observed.depth > REPORT_DOCUMENT_DEPTH_MAX) {\n throw reportBuildBudgetExceeded(\"document-depth\", REPORT_DOCUMENT_DEPTH_MAX, observed.depth, { pageId, route });\n }\n}\nfunction countDocument(node: ReportNode, depth: number): {\n readonly nodes: number;\n readonly depth: number;\n} {\n if (node === null || node === undefined || typeof node === \"boolean\")\n return { nodes: 0, depth };\n if (Array.isArray(node)) {\n return node.reduce((total, child) => {\n const counted = countDocument(child, depth);\n return { nodes: total.nodes + counted.nodes, depth: Math.max(total.depth, counted.depth) };\n }, { nodes: 0, depth });\n }\n if (!isElement(node))\n return { nodes: 1, depth: depth + 1 };\n const currentDepth = depth + 1;\n if (node.type !== Fragment && typeof node.type === \"function\" &&\n (node.type as unknown as Record<symbol, unknown>)[COMPONENT_RAW_CHILDREN] === true) {\n return { nodes: 1, depth: currentDepth };\n }\n const child = countDocument(node.props.children as ReportNode, currentDepth);\n return { nodes: child.nodes + 1, depth: Math.max(currentDepth, child.depth) };\n}\nfunction isElement(value: unknown): value is ReportElement {\n if (typeof value !== \"object\" || value === null || Array.isArray(value))\n return false;\n const candidate = value as Partial<ReportElement>;\n return typeof candidate.$$typeof === \"symbol\" &&\n (candidate.$$typeof === Symbol.for(\"react.element\") || candidate.$$typeof === Symbol.for(\"react.transitional.element\")) &&\n typeof candidate.props === \"object\" && candidate.props !== null;\n}\nfunction routeForTarget(pages: readonly ReportPageDefinition[], target: ReportTarget): string | undefined {\n const page = pages.find((candidate) => candidate.id === target.page);\n if (page === undefined)\n return undefined;\n if (page.params === undefined)\n return target.params === undefined ? page.path : undefined;\n if (target.params === undefined)\n return undefined;\n try {\n const key = page.params.encode(target.params);\n return validateParameterKey(key) === undefined ? routeWithParameterKey(page.path, key) : undefined;\n }\n catch {\n return undefined;\n }\n}\nfunction hrefForTarget(pages: readonly ReportPageDefinition[], sourceRoute: string, target: ReportTarget): string | undefined {\n const source = staticPathForRoute(sourceRoute).posix;\n if (target.page === DOWNLOAD_TARGET_PAGE) {\n const path = isJsonRecord(target.params) ? target.params.path : undefined;\n if (typeof path !== \"string\" || validateDownloadPath(path) !== undefined)\n return undefined;\n return relativeHref(source, staticPathForDownload(path).posix);\n }\n const route = routeForTarget(pages, target);\n return route === undefined ? undefined : relativeHref(source, staticPathForRoute(route).posix);\n}\nfunction isJsonRecord(value: JsonValue | undefined): value is Readonly<Record<string, JsonValue>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction relativeHref(sourceFile: string, targetFile: string): string {\n const sourceSegments = sourceFile.split(\"/\");\n sourceSegments.pop();\n const targetSegments = targetFile.split(\"/\");\n let common = 0;\n while (common < sourceSegments.length && common < targetSegments.length &&\n sourceSegments[common] === targetSegments[common])\n common += 1;\n const relative = [\n ...sourceSegments.slice(common).map(() => \"..\"),\n ...targetSegments.slice(common),\n ].join(\"/\");\n return relative || \"./\";\n}\nfunction commandForTarget(pages: readonly ReportPageDefinition[], target: ReportTarget): string | undefined {\n const route = routeForTarget(pages, target);\n return route === undefined ? undefined : `niceeval show --page ${shellQuote(route)}`;\n}\nfunction shellQuote(value: string): string {\n return `'${value.replaceAll(\"'\", `'\\\\''`)}'`;\n}\nfunction analysisProblems(issues: readonly AnalysisIssue[], pageId?: string): readonly ReportProblem[] {\n return Object.freeze(issues.map((issue) => Object.freeze({\n code: `analysis-${issue.code}`,\n path: Object.freeze(pageId === undefined ? [] : [\"page\", pageId]),\n refs: Object.freeze(issue.refs.map((reference) => String(reference.identity.locator)).sort(compareUtf8)),\n summary: issue.message,\n })));\n}\nexport function reportDefinitionIdentity(report: ReportDefinition): string {\n const closed = {\n title: resolveReportTitle(report),\n head: report.head,\n theme: report.theme ?? null,\n // The Analysis-computed pricing content identity joins the definition\n // identity, so a Profile change is a new Report execution.\n pricing: report.pricing === null ? null : report.pricing.contentIdentity,\n pages: report.pages.map((page) => ({\n id: page.id,\n path: page.path,\n title: page.title,\n navigation: page.navigation,\n parameterized: page.params !== undefined,\n load: page.load?.toString() ?? null,\n render: page.render.toString(),\n params: page.params === undefined\n ? null\n : {\n encode: page.params.encode.toString(),\n decode: page.params.decode.toString(),\n enumerate: page.params.enumerate.toString(),\n },\n })),\n };\n return createHash(\"sha256\").update(canonicalJson(closed)).digest(\"hex\");\n}\nfunction canonicalJson(value: unknown): string {\n if (value === null)\n return \"null\";\n if (typeof value === \"string\" || typeof value === \"boolean\")\n return JSON.stringify(value);\n if (typeof value === \"number\")\n return Number.isFinite(value) ? JSON.stringify(Object.is(value, -0) ? 0 : value) : \"null\";\n if (Array.isArray(value))\n return `[${value.map(canonicalJson).join(\",\")}]`;\n if (typeof value === \"object\") {\n return `{${Object.entries(value).filter(([, entry]) => entry !== undefined).sort(([left], [right]) => compareUtf8(left, right))\n .map(([key, entry]) => `${JSON.stringify(key)}:${canonicalJson(entry)}`).join(\",\")}}`;\n }\n return JSON.stringify(String(value));\n}\nfunction classifyCloseFailure(cause: unknown): ReportPageExecutionFailed[\"phase\"] {\n const message = boundedReason(cause).toLowerCase();\n if (message.includes(\"asset\") || message.includes(\"enoent\"))\n return \"assets\";\n if (message.includes(\"text\"))\n return \"text\";\n if (message.includes(\"web\") || message.includes(\"react\"))\n return \"web\";\n return \"resolve\";\n}\nfunction pageFailure(pageId: string, phase: ReportPageExecutionFailed[\"phase\"], reason: string): ReportPageExecutionFailed {\n return Object.freeze({ code: \"report-page-execution-failed\" as const, pageId, phase, reason });\n}\nfunction boundedReason(cause: unknown): string {\n const raw = cause instanceof Error ? cause.message : typeof cause === \"object\" && cause !== null &&\n typeof Reflect.get(cause, \"code\") === \"string\"\n ? String(Reflect.get(cause, \"code\"))\n : String(cause);\n return raw.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || \"Report callback failed\";\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n/** Used by the site shell without re-running any author callback. */\nexport function closedPageTitle(page: ResolvedPage, locale: string): string {\n return resolveLocalizedText(page.title, locale);\n}\n"]}
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["execute.ts"],"names":[],"mappings":";;AAuEA,kDAwCC;AAID,8CA6FC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W,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;AACD,qEAAqE;AACrE,SAAgB,eAAe,CAAC,IAAkB,EAAE,MAAc;IAC9D,OAAO,IAAA,gCAAoB,EAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import { createHash } from \"node:crypto\";\nimport { readFile } from \"node:fs/promises\";\nimport { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport { createElement, Fragment as ReactFragment, type ReactNode } from \"react\";\nimport { renderToStaticMarkup } from \"react-dom/server\";\nimport { attemptEvidenceView, query, type AnalysisIssue, type AnalysisRequestError, type JsonValue, type Sample, type SampleClosedError, } from \"../../analysis/index.ts\";\nimport { captureAnalysisIssues, type AnalysisIssueCapture, } from \"../../sample/capability.ts\";\nimport { buildReportMeta, resolveReportTitle, type PageContext, type ReportDefinition, type ReportTarget, } from \"../definition/report.ts\";\nimport { COMPONENT_RAW_CHILDREN, Fragment, collectPageDimensions, createTextContext, renderNodeToText, resolveReportTree, runWithWebContext, validateReportTree, withPageDimensions, type ReportElement, type ReportNode, type WebContext, } from \"../definition/tree.ts\";\nimport { collectDownloads } from \"../definition/primitives/downloads.ts\";\nimport { DOWNLOAD_TARGET_PAGE } from \"../definition/primitives.tsx\";\nimport { REPORT_BUILD_RSS_BYTES_MAX, REPORT_BUILD_TIME_MS_MAX, REPORT_DOCUMENT_DEPTH_MAX, REPORT_DOCUMENT_NODES_MAX, REPORT_PAGES_MAX, reportBuildBudgetExceeded, type ReportBuildBudgetExceeded, } from \"../execution/model.ts\";\nimport type { ReportProblem } from \"../execution/machine.ts\";\nimport { routeWithParameterKey, staticPathForDownload, staticPathForRoute, validateDownloadPath, validateParameterKey, validateReportRoute, } from \"../execution/paths.ts\";\nimport { collectRendererAssetDeclarations, materializeRendererAssets, } from \"../extension/assets.ts\";\nimport { resolveLocalizedText } from \"../model/locale.ts\";\nimport type { PanelMode } from \"../model/panel.ts\";\nimport { type ResolvedPage, type ResolvedPageAssetOutput, type ResolvedPageClosureError, type ResolvedPageOutput, } from \"../runtime/resolved-page.ts\";\nimport type { ThemeDefinition } from \"../theme.ts\";\nimport { executeShowTarget, type ShowTargetError, type ShowTargetRequest, } from \"./show-target.ts\";\nimport { isReportTargetRouteInvalid, showTargetRequestForRoute, type ReportTargetRouteInvalid, } from \"./target-route.ts\";\nimport { buildReportProjections, closePricingProfileJson, reportProjectionFailure, type ReportProjectionBuildFailure, type ReportProjectionCostInput, type ReportProjections, } from \"../execution/machine.ts\";\nconst TEXT_WIDTH = 80;\nconst WEB_LOCALES = [\"en\", \"zh-CN\"] as const;\nexport interface ReportPageExecutionFailed {\n readonly code: \"report-page-execution-failed\";\n readonly pageId: string;\n readonly phase: \"enumerate\" | \"params-encode\" | \"resolve\" | \"text\" | \"web\" | \"assets\";\n readonly reason: string;\n}\nexport interface ReportSiteRouteConflict {\n readonly code: \"report-site-route-conflict\";\n readonly route: string;\n readonly pageIds: readonly [\n string,\n string\n ];\n}\nexport type ReportExecutionError = SampleClosedError | AnalysisRequestError | ShowTargetError | ResolvedPageClosureError | ReportTargetRouteInvalid | ReportPageExecutionFailed | ReportSiteRouteConflict | ReportProjectionBuildFailure | ReportBuildBudgetExceeded;\nexport interface ClosedTargetExecution {\n readonly page: ResolvedPage;\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\nexport interface ClosedSitePage {\n readonly page: ResolvedPage;\n readonly navigation: boolean;\n readonly role?: {\n readonly kind: \"experiment-group\";\n readonly groupKind: \"named\" | \"singleton\";\n };\n}\n/** Host-private complete page closure used only while forming a revision. */\nexport interface ClosedReportSite {\n /** Monotonic-enough wall clock anchor for the full Sample-open + byte build budget. */\n readonly startedAtMs: number;\n /** Process RSS immediately before the Record-backed Sample is opened. */\n readonly baselineRssBytes: number;\n readonly sampleIdentity: string;\n readonly reportIdentity: string;\n readonly title: import(\"../model/locale.ts\").LocalizedText;\n readonly theme?: ThemeDefinition;\n readonly pages: readonly ClosedSitePage[];\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/**\n * Executes exactly one selected route. It intentionally delegates selection to\n * show-target.ts, whose parameterized branch never calls enumerate().\n */\nexport function executeReportTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly route?: string;\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<ClosedTargetExecution, ReportExecutionError, Scope.Scope> {\n const request = showTargetRequestForRoute(input.report, input.route);\n if (isReportTargetRouteInvalid(request))\n return Effect.fail(request);\n return Effect.gen(function* () {\n const capture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.flatMap(\n // show keeps the exact author declaration and never enumerates an\n // unselected parameterized Page.\n executeTarget({\n ...input,\n pages: input.report.pages,\n request,\n capture,\n }), (page) => {\n const costs = capturedProjectionCosts(capture, page.target.route, page.target.pageId);\n const pricingProfile = reportPricingProfileJson(input.report);\n const failure = reportProjectionFailure({ pricingProfile, costs });\n if (failure !== undefined)\n return Effect.fail(failure);\n return Effect.succeed(Object.freeze({\n page,\n // Every cost entry captured during this one Page execution binds\n // to that route/page and retains Analysis's measure/row/profile.\n projections: buildReportProjections({\n pricingProfile,\n costs,\n }),\n problems: analysisProblems(capture.issues(), page.target.pageId),\n }));\n }), Effect.sync(() => capture.close()));\n });\n}\n/** One normalized Page declaration owned by the selected Report. */\ntype ReportPageDefinition = ReportDefinition[\"pages\"][number];\n/** Enumerates and closes every page instance exactly once for view/static. */\nexport function executeReportSite(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly budget: ReportBuildBudgetAnchor;\n}): Effect.Effect<ClosedReportSite, ReportExecutionError, Scope.Scope> {\n return Effect.gen(function* () {\n const { startedAtMs, baselineRssBytes } = input.budget;\n // The outer capture covers enumerate()/params encode phases for generic\n // Analysis issues only. Cost projections belong only to actual Page\n // executions, where the Host can bind a real route/pageId.\n const outerCapture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.gen(function* () {\n const pages: ClosedSitePage[] = [];\n const routeOwners = new Map<string, string>();\n const siteProblems: ReportProblem[] = [];\n const projectionCosts: ReportProjectionCostInput[] = [];\n const pricingProfile = reportPricingProfileJson(input.report);\n // The Report declaration is the only page owner. A custom Report that\n // wants official drill-down Pages composes those exported Pages\n // explicitly; the Host never merges another Report by id.\n const definitions = input.report.pages;\n const plainCount = definitions.filter((page) => page.params === undefined).length;\n if (plainCount > REPORT_PAGES_MAX) {\n return yield* Effect.fail(reportBuildBudgetExceeded(\"pages\", REPORT_PAGES_MAX, plainCount));\n }\n for (const definition of definitions) {\n yield* checkBuildBudgets(input.budget);\n if (definition.params === undefined) {\n const { page, projectionCosts: pageCosts, issues } = yield* executePageWithCapture({\n ...input,\n pages: definitions,\n request: { kind: \"page\", pageId: definition.id },\n capturePage: (capture) => capturedProjectionCosts(capture, definition.path, definition.id),\n });\n yield* addSitePage(pages, routeOwners, page, definition.navigation);\n yield* registerProjectionCosts(pricingProfile, projectionCosts, pageCosts);\n siteProblems.push(...analysisProblems(issues, page.target.pageId));\n continue;\n }\n const values = yield* invokeAuthor(definition.id, \"enumerate\", outerCapture, () => definition.params.enumerate(input.sample));\n if (values === null || values === undefined || typeof (values as Iterable<JsonValue>)[Symbol.iterator] !== \"function\") {\n return yield* Effect.fail(pageFailure(definition.id, \"enumerate\", \"params.enumerate() must return a finite Iterable\"));\n }\n for (const params of values as Iterable<JsonValue>) {\n if (pages.length >= REPORT_PAGES_MAX) {\n return yield* Effect.fail(reportBuildBudgetExceeded(\"pages\", REPORT_PAGES_MAX, pages.length + 1));\n }\n const key = yield* invokeAuthor(definition.id, \"params-encode\", outerCapture, () => definition.params.encode(params));\n const invalidKey = typeof key === \"string\" ? validateParameterKey(key) : undefined;\n if (typeof key !== \"string\" || invalidKey !== undefined) {\n return yield* Effect.fail(pageFailure(definition.id, \"params-encode\", invalidKey?.reason ?? \"params.encode() must return a canonical parameter key\"));\n }\n const route = routeWithParameterKey(definition.path, key);\n const routeIssue = validateReportRoute(route);\n if (routeIssue !== undefined) {\n return yield* Effect.fail(pageFailure(definition.id, \"params-encode\", routeIssue.reason));\n }\n // executeShowTarget supplies the required decode -> encode\n // canonical round trip, but does not enumerate this page again.\n const { page, projectionCosts: pageCosts, issues } = yield* executePageWithCapture({\n ...input,\n pages: definitions,\n request: {\n kind: \"parameterized-page\",\n pageId: definition.id,\n key,\n route,\n },\n capturePage: (capture) => capturedProjectionCosts(capture, route, definition.id),\n });\n yield* addSitePage(pages, routeOwners, page, false, definition.role);\n yield* registerProjectionCosts(pricingProfile, projectionCosts, pageCosts);\n siteProblems.push(...analysisProblems(issues, page.target.pageId));\n yield* checkBuildBudgets(input.budget);\n }\n }\n siteProblems.push(...analysisProblems(outerCapture.issues()));\n return Object.freeze({\n startedAtMs,\n baselineRssBytes,\n sampleIdentity: input.sample.snapshot.identity.id,\n reportIdentity: reportDefinitionIdentity(input.report),\n title: resolveReportTitle(input.report),\n ...(input.report.theme === undefined ? {} : { theme: input.report.theme }),\n pages: Object.freeze(pages),\n projections: buildReportProjections({\n pricingProfile,\n costs: projectionCosts,\n }),\n problems: mergeReportProblems(siteProblems),\n });\n }), Effect.sync(() => outerCapture.close()));\n });\n}\n/** One Page execution with its own capture: page, bound projection costs, and issues. */\nfunction executePageWithCapture(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly pages: readonly ReportPageDefinition[];\n readonly request: ShowTargetRequest;\n readonly capturePage: (capture: AnalysisIssueCapture) => ReportProjectionCostInput[];\n}): Effect.Effect<{\n readonly page: ResolvedPage;\n readonly projectionCosts: readonly ReportProjectionCostInput[];\n readonly issues: readonly AnalysisIssue[];\n}, ReportExecutionError, Scope.Scope> {\n return Effect.gen(function* () {\n const capture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.map(executeTarget({ ...input, capture }), (page) => Object.freeze({\n page,\n projectionCosts: Object.freeze(input.capturePage(capture)),\n issues: capture.issues(),\n })), Effect.sync(() => capture.close()));\n });\n}\n/**\n * Validates one Page's capture before retaining it. Route ownership makes\n * capture keys page-local, so re-closing every prior Page here would only\n * repeat canonical JSON work quadratically; the final site closure performs\n * the one whole-site canonicalization.\n */\nfunction registerProjectionCosts(pricingProfile: JsonValue | null, output: ReportProjectionCostInput[], costs: readonly ReportProjectionCostInput[]): Effect.Effect<void, ReportProjectionBuildFailure> {\n const failure = reportProjectionFailure({ pricingProfile, costs });\n if (failure !== undefined)\n return Effect.fail(failure);\n output.push(...costs);\n return Effect.void;\n}\n/**\n * Reads the cost entries an Analysis execution capture recorded and binds them\n * to one Page execution. The Host never rebuilds a projection from a\n * MetricValue.value or from the built-in show data.\n */\nfunction capturedProjectionCosts(capture: AnalysisIssueCapture, route: string, pageId: string): 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 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/** Merges captures without discarding the Page scope that produced each issue. */\nfunction mergeReportProblems(problems: readonly ReportProblem[]): readonly ReportProblem[] {\n const unique = new Map<string, ReportProblem>();\n for (const problem of problems) {\n const key = `${problem.code}\\u0000${problem.path.join(\"\\u0001\")}\\u0000${problem.refs.join(\"\\u0001\")}\\u0000${problem.summary ?? \"\"}`;\n if (!unique.has(key))\n unique.set(key, problem);\n }\n return Object.freeze([...unique.values()].sort((left, right) => compareUtf8(left.code, right.code) ||\n compareUtf8(left.path.join(\"\\u0001\"), right.path.join(\"\\u0001\")) ||\n compareUtf8(left.refs.join(\"\\u0001\"), right.refs.join(\"\\u0001\")) ||\n compareUtf8(left.summary ?? \"\", right.summary ?? \"\")));\n}\nfunction executeTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n /** The target-visible Page set from the selected Report declaration. */\n readonly pages: readonly ReportPageDefinition[];\n readonly request: ShowTargetRequest;\n readonly capture: AnalysisIssueCapture;\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<ResolvedPage, ReportExecutionError, Scope.Scope> {\n return executeShowTarget<ReportPageExecutionFailed, never>({\n definition: { pages: input.pages },\n sample: input.sample,\n request: input.request,\n evidence: (locator) => query(input.sample, {\n kind: \"domain-view\",\n view: attemptEvidenceView,\n locator,\n }),\n runAuthor: input.capture.run,\n close: (rendered, context) => closeRenderedPage({\n rendered: rendered as ReportNode,\n sample: input.sample,\n report: input.report,\n capture: input.capture,\n hrefPages: input.pages,\n page: context.page,\n route: context.target.route,\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n }),\n });\n}\nfunction closeRenderedPage(input: {\n readonly rendered: ReportNode;\n readonly sample: Sample;\n readonly report: ReportDefinition;\n /** Keeps Analysis calls made while resolving component trees page-bound. */\n readonly capture: AnalysisIssueCapture;\n /** Link targets are resolved only against the selected Report declaration. */\n readonly hrefPages: readonly ReportPageDefinition[];\n readonly page: PageContext;\n readonly route: string;\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<ResolvedPageOutput, ReportPageExecutionFailed> {\n return Effect.tryPromise({\n try: () => input.capture.run(async (): Promise<ResolvedPageOutput> => {\n const resolved = await resolveReportTree(input.rendered, {\n scope: input.sample,\n page: input.page,\n report: buildReportMeta(input.report),\n });\n validateReportTree(resolved);\n assertDocumentBudget(resolved, input.page.id, input.page.path);\n const requestedTextProjections = [\n { width: TEXT_WIDTH, panelMode: \"plain\" as const },\n ...(input.textProjection === undefined ||\n (input.textProjection.width === TEXT_WIDTH && input.textProjection.panelMode === \"plain\")\n ? []\n : [input.textProjection]),\n ];\n const text = WEB_LOCALES.flatMap((locale) => requestedTextProjections.map((projection) => {\n const pageDimensions = collectPageDimensions(resolved, input.report.dimensionPins, \"text\");\n const context = createTextContext({\n width: projection.width,\n locale,\n panelMode: projection.panelMode,\n pageDimensions,\n command: (target) => commandForTarget(input.hrefPages, target),\n });\n return Object.freeze({\n locale,\n width: projection.width,\n panelMode: projection.panelMode,\n text: renderNodeToText(resolved, context),\n });\n }));\n const web = WEB_LOCALES.map((locale) => {\n const pageDimensions = collectPageDimensions(resolved, input.report.dimensionPins, \"web\");\n const context = withPageDimensions<WebContext>({\n locale,\n href: (target) => hrefForTarget(input.hrefPages, input.route, target),\n dimension: () => {\n throw new Error(\"a Report web face queried an undeclared dimension\");\n },\n }, pageDimensions);\n const html = runWithWebContext(Object.freeze(context), () => renderToStaticMarkup(createElement(ReactFragment, null, resolved as ReactNode)));\n return Object.freeze({ locale, html });\n });\n const downloads = collectDownloads(resolved).map((download) => Object.freeze({\n id: download.path,\n path: download.path,\n mediaType: download.mediaType,\n bytes: download.bytes,\n }));\n const rendererAssets = await materializeRendererAssets(collectRendererAssetDeclarations(resolved), async (path) => new Uint8Array(await readFile(path)));\n const assets: ResolvedPageAssetOutput[] = [\n ...rendererAssets.styles.map((asset) => Object.freeze({\n kind: \"style\" as const,\n path: asset.path,\n mediaType: \"text/css; charset=utf-8\",\n bytes: asset.content,\n sha256: asset.hash,\n })),\n ...rendererAssets.scripts.map((asset) => Object.freeze({\n kind: \"script\" as const,\n path: asset.path,\n mediaType: \"text/javascript; charset=utf-8\",\n bytes: asset.content,\n sha256: asset.hash,\n })),\n ];\n return Object.freeze({\n title: input.page.title,\n head: input.report.head as unknown as JsonValue,\n text: Object.freeze(text),\n web: Object.freeze(web),\n downloads: Object.freeze(downloads),\n assets: Object.freeze(assets),\n });\n }),\n catch: (cause): ReportPageExecutionFailed => pageFailure(input.page.id, classifyCloseFailure(cause), boundedReason(cause)),\n });\n}\nfunction invokeAuthor<Value>(pageId: string, phase: ReportPageExecutionFailed[\"phase\"], capture: AnalysisIssueCapture, callback: () => Value | PromiseLike<Value>): Effect.Effect<Value, ReportPageExecutionFailed> {\n return Effect.tryPromise({\n try: () => new Promise<Value>((resolve) => resolve(capture.run(callback))),\n catch: (cause) => pageFailure(pageId, phase, boundedReason(cause)),\n });\n}\nfunction addSitePage(pages: ClosedSitePage[], routeOwners: Map<string, string>, page: ResolvedPage, navigation: boolean, role?: ClosedSitePage[\"role\"]): Effect.Effect<void, ReportSiteRouteConflict | ReportBuildBudgetExceeded> {\n const owner = routeOwners.get(page.target.route);\n if (owner !== undefined) {\n return Effect.fail(Object.freeze({\n code: \"report-site-route-conflict\" as const,\n route: page.target.route,\n pageIds: Object.freeze([owner, page.target.pageId]) as readonly [\n string,\n string\n ],\n }));\n }\n if (pages.length >= REPORT_PAGES_MAX) {\n return Effect.fail(reportBuildBudgetExceeded(\"pages\", REPORT_PAGES_MAX, pages.length + 1));\n }\n routeOwners.set(page.target.route, page.target.pageId);\n pages.push(Object.freeze({ page, navigation, ...(role === undefined ? {} : { role }) }));\n return Effect.void;\n}\nexport interface ReportBuildBudgetAnchor {\n readonly startedAtMs: number;\n readonly baselineRssBytes: number;\n}\n/** Starts the budget before Record selection opens the fixed Sample. */\nexport function startReportBuildBudget(): ReportBuildBudgetAnchor {\n return Object.freeze({\n startedAtMs: Date.now(),\n baselineRssBytes: process.memoryUsage().rss,\n });\n}\nfunction checkBuildBudgets(anchor: ReportBuildBudgetAnchor): Effect.Effect<void, ReportBuildBudgetExceeded> {\n const elapsed = Date.now() - anchor.startedAtMs;\n if (elapsed > REPORT_BUILD_TIME_MS_MAX) {\n return Effect.fail(reportBuildBudgetExceeded(\"build-time\", REPORT_BUILD_TIME_MS_MAX, elapsed));\n }\n const rssGrowth = Math.max(0, process.memoryUsage().rss - anchor.baselineRssBytes);\n if (rssGrowth > REPORT_BUILD_RSS_BYTES_MAX) {\n return Effect.fail(reportBuildBudgetExceeded(\"build-rss\", REPORT_BUILD_RSS_BYTES_MAX, rssGrowth));\n }\n return Effect.void;\n}\nfunction assertDocumentBudget(node: ReportNode, pageId: string, route: string): void {\n const observed = countDocument(node, 0);\n if (observed.nodes > REPORT_DOCUMENT_NODES_MAX) {\n throw reportBuildBudgetExceeded(\"document-nodes\", REPORT_DOCUMENT_NODES_MAX, observed.nodes, { pageId, route });\n }\n if (observed.depth > REPORT_DOCUMENT_DEPTH_MAX) {\n throw reportBuildBudgetExceeded(\"document-depth\", REPORT_DOCUMENT_DEPTH_MAX, observed.depth, { pageId, route });\n }\n}\nfunction countDocument(node: ReportNode, depth: number): {\n readonly nodes: number;\n readonly depth: number;\n} {\n if (node === null || node === undefined || typeof node === \"boolean\")\n return { nodes: 0, depth };\n if (Array.isArray(node)) {\n return node.reduce((total, child) => {\n const counted = countDocument(child, depth);\n return { nodes: total.nodes + counted.nodes, depth: Math.max(total.depth, counted.depth) };\n }, { nodes: 0, depth });\n }\n if (!isElement(node))\n return { nodes: 1, depth: depth + 1 };\n const currentDepth = depth + 1;\n if (node.type !== Fragment && typeof node.type === \"function\" &&\n (node.type as unknown as Record<symbol, unknown>)[COMPONENT_RAW_CHILDREN] === true) {\n return { nodes: 1, depth: currentDepth };\n }\n const child = countDocument(node.props.children as ReportNode, currentDepth);\n return { nodes: child.nodes + 1, depth: Math.max(currentDepth, child.depth) };\n}\nfunction isElement(value: unknown): value is ReportElement {\n if (typeof value !== \"object\" || value === null || Array.isArray(value))\n return false;\n const candidate = value as Partial<ReportElement>;\n return typeof candidate.$$typeof === \"symbol\" &&\n (candidate.$$typeof === Symbol.for(\"react.element\") || candidate.$$typeof === Symbol.for(\"react.transitional.element\")) &&\n typeof candidate.props === \"object\" && candidate.props !== null;\n}\nfunction routeForTarget(pages: readonly ReportPageDefinition[], target: ReportTarget): string | undefined {\n const page = pages.find((candidate) => candidate.id === target.page);\n if (page === undefined)\n return undefined;\n if (page.params === undefined)\n return target.params === undefined ? page.path : undefined;\n if (target.params === undefined)\n return undefined;\n try {\n const key = page.params.encode(target.params);\n return validateParameterKey(key) === undefined ? routeWithParameterKey(page.path, key) : undefined;\n }\n catch {\n return undefined;\n }\n}\nfunction hrefForTarget(pages: readonly ReportPageDefinition[], sourceRoute: string, target: ReportTarget): string | undefined {\n const source = staticPathForRoute(sourceRoute).posix;\n if (target.page === DOWNLOAD_TARGET_PAGE) {\n const path = isJsonRecord(target.params) ? target.params.path : undefined;\n if (typeof path !== \"string\" || validateDownloadPath(path) !== undefined)\n return undefined;\n return relativeHref(source, staticPathForDownload(path).posix);\n }\n const route = routeForTarget(pages, target);\n return route === undefined ? undefined : relativeHref(source, staticPathForRoute(route).posix);\n}\nfunction isJsonRecord(value: JsonValue | undefined): value is Readonly<Record<string, JsonValue>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction relativeHref(sourceFile: string, targetFile: string): string {\n const sourceSegments = sourceFile.split(\"/\");\n sourceSegments.pop();\n const targetSegments = targetFile.split(\"/\");\n let common = 0;\n while (common < sourceSegments.length && common < targetSegments.length &&\n sourceSegments[common] === targetSegments[common])\n common += 1;\n const relative = [\n ...sourceSegments.slice(common).map(() => \"..\"),\n ...targetSegments.slice(common),\n ].join(\"/\");\n return relative || \"./\";\n}\nfunction commandForTarget(pages: readonly ReportPageDefinition[], target: ReportTarget): string | undefined {\n const route = routeForTarget(pages, target);\n if (route === undefined)\n return undefined;\n const page = pages.find((candidate) => candidate.id === target.page);\n if (page?.params !== undefined && page.role?.kind === \"experiment-group\") {\n const key = route.slice(page.path.length + 1);\n return `niceeval show --experiment ${shellQuote(key)}`;\n }\n return `niceeval show --page ${shellQuote(route)}`;\n}\nfunction shellQuote(value: string): string {\n return `'${value.replaceAll(\"'\", `'\\\\''`)}'`;\n}\nfunction analysisProblems(issues: readonly AnalysisIssue[], pageId?: string): readonly ReportProblem[] {\n return Object.freeze(issues.map((issue) => Object.freeze({\n code: `analysis-${issue.code}`,\n path: Object.freeze(pageId === undefined ? [] : [\"page\", pageId]),\n refs: Object.freeze(issue.refs.map((reference) => String(reference.identity.locator)).sort(compareUtf8)),\n summary: issue.message,\n })));\n}\nexport function reportDefinitionIdentity(report: ReportDefinition): string {\n const closed = {\n title: resolveReportTitle(report),\n head: report.head,\n theme: report.theme ?? null,\n // The Analysis-computed pricing content identity joins the definition\n // identity, so a Profile change is a new Report execution.\n pricing: report.pricing === null ? null : report.pricing.contentIdentity,\n pages: report.pages.map((page) => ({\n id: page.id,\n path: page.path,\n title: page.title,\n navigation: page.navigation,\n parameterized: page.params !== undefined,\n load: page.load?.toString() ?? null,\n render: page.render.toString(),\n params: page.params === undefined\n ? null\n : {\n encode: page.params.encode.toString(),\n decode: page.params.decode.toString(),\n enumerate: page.params.enumerate.toString(),\n },\n })),\n };\n return createHash(\"sha256\").update(canonicalJson(closed)).digest(\"hex\");\n}\nfunction canonicalJson(value: unknown): string {\n if (value === null)\n return \"null\";\n if (typeof value === \"string\" || typeof value === \"boolean\")\n return JSON.stringify(value);\n if (typeof value === \"number\")\n return Number.isFinite(value) ? JSON.stringify(Object.is(value, -0) ? 0 : value) : \"null\";\n if (Array.isArray(value))\n return `[${value.map(canonicalJson).join(\",\")}]`;\n if (typeof value === \"object\") {\n return `{${Object.entries(value).filter(([, entry]) => entry !== undefined).sort(([left], [right]) => compareUtf8(left, right))\n .map(([key, entry]) => `${JSON.stringify(key)}:${canonicalJson(entry)}`).join(\",\")}}`;\n }\n return JSON.stringify(String(value));\n}\nfunction classifyCloseFailure(cause: unknown): ReportPageExecutionFailed[\"phase\"] {\n const message = boundedReason(cause).toLowerCase();\n if (message.includes(\"asset\") || message.includes(\"enoent\"))\n return \"assets\";\n if (message.includes(\"text\"))\n return \"text\";\n if (message.includes(\"web\") || message.includes(\"react\"))\n return \"web\";\n return \"resolve\";\n}\nfunction pageFailure(pageId: string, phase: ReportPageExecutionFailed[\"phase\"], reason: string): ReportPageExecutionFailed {\n return Object.freeze({ code: \"report-page-execution-failed\" as const, pageId, phase, reason });\n}\nfunction boundedReason(cause: unknown): string {\n const raw = cause instanceof Error ? cause.message : typeof cause === \"object\" && cause !== null &&\n typeof Reflect.get(cause, \"code\") === \"string\"\n ? String(Reflect.get(cause, \"code\"))\n : String(cause);\n return raw.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || \"Report callback failed\";\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n/** Used by the site shell without re-running any author callback. */\nexport function closedPageTitle(page: ResolvedPage, locale: string): string {\n return resolveLocalizedText(page.title, locale);\n}\n"]}
@@ -30,6 +30,10 @@ export interface ClosedTargetExecution {
30
30
  export interface ClosedSitePage {
31
31
  readonly page: ResolvedPage;
32
32
  readonly navigation: boolean;
33
+ readonly role?: {
34
+ readonly kind: "experiment-group";
35
+ readonly groupKind: "named" | "singleton";
36
+ };
33
37
  }
34
38
  /** Host-private complete page closure used only while forming a revision. */
35
39
  export interface ClosedReportSite {
@@ -30,6 +30,10 @@ export interface ClosedTargetExecution {
30
30
  export interface ClosedSitePage {
31
31
  readonly page: ResolvedPage;
32
32
  readonly navigation: boolean;
33
+ readonly role?: {
34
+ readonly kind: "experiment-group";
35
+ readonly groupKind: "named" | "singleton";
36
+ };
33
37
  }
34
38
  /** Host-private complete page closure used only while forming a revision. */
35
39
  export interface ClosedReportSite {
@@ -30,6 +30,10 @@ export interface ClosedTargetExecution {
30
30
  export interface ClosedSitePage {
31
31
  readonly page: ResolvedPage;
32
32
  readonly navigation: boolean;
33
+ readonly role?: {
34
+ readonly kind: "experiment-group";
35
+ readonly groupKind: "named" | "singleton";
36
+ };
33
37
  }
34
38
  /** Host-private complete page closure used only while forming a revision. */
35
39
  export interface ClosedReportSite {
@@ -7,13 +7,14 @@ exports.reportSnapshotIdentityFromRecord = reportSnapshotIdentityFromRecord;
7
7
  const effect_1 = require("effect");
8
8
  const attempt_locator_resolution_ts_1 = require("../../attempt-locator-resolution.cjs");
9
9
  const host_ts_1 = require("../../analysis/host.cjs");
10
+ const index_ts_1 = require("../../analysis/index.cjs");
10
11
  const runtime_ts_1 = require("../../record/host/runtime.cjs");
11
12
  const capability_ts_1 = require("../../sample/capability.cjs");
12
13
  const analysis_ts_1 = require("../../sample/analysis.cjs");
13
14
  const attempt_overview_ts_1 = require("../built-in/attempt-overview.cjs");
14
15
  const machine_ts_1 = require("../built-in/machine.cjs");
15
- const overview_ts_1 = require("../built-in/overview.cjs");
16
16
  const run_membership_overview_ts_1 = require("../built-in/run-membership-overview.cjs");
17
+ const standard_tsx_1 = require("../built-in/standard.cjs");
17
18
  const report_ts_1 = require("../definition/report.cjs");
18
19
  const machine_ts_2 = require("../execution/machine.cjs");
19
20
  const text_ts_1 = require("../runtime/text.cjs");
@@ -69,16 +70,34 @@ function showSelectionFromRecord(input) {
69
70
  const sample = yield* openSelectionSample(input.root, input.selection);
70
71
  const report = input.report ?? defaultReportForSelection(input.selection);
71
72
  const selection = showSelectionForRequest(sample, input.selection);
73
+ const implicitRoute = input.route === undefined && input.selection.policy !== "explicit-runs"
74
+ ? singleExperimentGroupRoute(report, sample)
75
+ : undefined;
72
76
  return yield* presentShowTarget({
73
77
  sample,
74
78
  report,
75
79
  selection,
76
- ...(input.route === undefined ? {} : { route: input.route }),
80
+ ...(input.route === undefined && implicitRoute === undefined ? {} : { route: input.route ?? implicitRoute }),
77
81
  ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),
78
82
  format: input.format ?? "text",
79
83
  });
80
84
  }));
81
85
  }
86
+ function singleExperimentGroupRoute(report, sample) {
87
+ const groups = (0, index_ts_1.experimentGroups)(sample);
88
+ if (groups.length !== 1)
89
+ return undefined;
90
+ const group = groups[0].group;
91
+ const declaresGroupPage = report.pages.some((page) => "role" in page
92
+ && page.role?.kind === "experiment-group"
93
+ && page.role.groupKind === group.kind);
94
+ return declaresGroupPage ? groupRoute(group) : undefined;
95
+ }
96
+ function groupRoute(group) {
97
+ return group.kind === "named"
98
+ ? `/group/named/${group.groupId}`
99
+ : `/group/singleton/${String(group.experimentId)}`;
100
+ }
82
101
  function showAttemptFromRecord(input) {
83
102
  return effect_1.Effect.scoped(effect_1.Effect.gen(function* () {
84
103
  const sample = yield* openAttemptSample(input.root, input.locator);
@@ -381,8 +400,6 @@ function machineProblems(issues, pageId) {
381
400
  }
382
401
  function builtInToken(producerId) {
383
402
  switch (producerId) {
384
- case machine_ts_1.builtInMachineProducerIds.defaultOverview:
385
- return "default-overview";
386
403
  case machine_ts_1.builtInMachineProducerIds.runMembershipOverview:
387
404
  return "run-membership-overview";
388
405
  case machine_ts_1.builtInMachineProducerIds.attemptOverview:
@@ -411,7 +428,7 @@ function showSelectionForRequest(sample, selection) {
411
428
  function defaultReportForSelection(selection) {
412
429
  return selection.policy === "explicit-runs"
413
430
  ? run_membership_overview_ts_1.defaultRunMembershipOverviewReport
414
- : overview_ts_1.defaultOverviewReport;
431
+ : standard_tsx_1.standard;
415
432
  }
416
433
  function matchingOccurrencesForCurrentIdentity(selection, currentSlots) {
417
434
  const digestsByLogicalAlignment = new Map();