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":"from-record.js","sourceRoot":"","sources":["from-record.ts"],"names":[],"mappings":";;AAwEA,oDAIC;AAMD,8DAKC;AAED,8DAOC;AAOD,4EAIC;AA3GD,mCAAgC;AAGhC,uFAA4E;AAC5E,oDAAsD;AAGtD,6DAA0D;AAI1D,8DAA4I;AAC5I,0DAAmI;AAEnI,yEAA+E;AAC/E,uDAAoE;AACpE,yDAAgE;AAChE,uFAA4F;AAC5F,uDAAqF;AAErF,wDAAyW;AACzW,gDAA4D;AAG5D,6CAAqO;AACrO,6CAA4F;AAC5F,qDAA2E;AAC3E,uDAA2F;AAC3F,+CAAoD;AACpD,2CAA4E;AAC5E,MAAM,eAAe,GAAG,EAAE,CAAC;AAsC3B;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,KAAgC;IACjE,OAAO,SAAS,IAAI,KAAK;QACrB,CAAC,CAAC,qBAAqB,CAAC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AC,CAAC,CAAC;AACR,CAAC;AACD,SAAS,mBAAmB,CAAC,YAA0B,EAAE,MAAoD,EAAE,cAAsB;IACjI,OAAO,GAAG,YAAY,KAAK,MAAM,KAAK,cAAc,EAAE,CAAC;AAC3D,CAAC;AACD,SAAS,mBAAmB,CAAC,SAAoD,EAAE,KAAc;IAC7F,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,iCAA0C;QAChD,SAAS;QACT,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,SAAS;KAC1G,CAAC,CAAC;AACP,CAAC;AACD,SAAS,mBAAmB,CAAC,KAAa;IACtC,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC;AACvD,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport type { AttemptLocator } from \"../../attempt-locator.ts\";\nimport { resolveAttemptLocator } from \"../../attempt-locator-resolution.ts\";\nimport { analysisHost } from \"../../analysis/host.ts\";\nimport type { AnalysisSelectionRequest, ExperimentId, JsonValue, Sample, } from \"../../analysis/index.ts\";\nimport type { RecordCoordination } from \"../../coordination/record-leases.ts\";\nimport { recordHost } from \"../../record/host/runtime.ts\";\nimport type { RecordRoot } from \"../../record/platform/root.ts\";\nimport type { RecordFileSystem } from \"../../record/platform/services.ts\";\nimport type { RecordReaderOpenError, RecordReaderReadError, } from \"../../record/reader/errors.ts\";\nimport { captureAnalysisIssues, narrowSample, narrowSampleByCurrentIdentity, type AnalysisIssueCapture, } from \"../../sample/capability.ts\";\nimport { materializeSampleSnapshot, narrowSampleSnapshot, narrowSampleSnapshotByCurrentIdentity, } from \"../../sample/analysis.ts\";\nimport type { RecordReadSession, RecordSelection, } from \"../../record/host/types.ts\";\nimport { defaultAttemptOverviewReport } from \"../built-in/attempt-overview.ts\";\nimport { builtInMachineProducerIds, } from \"../built-in/machine.ts\";\nimport { defaultOverviewReport } from \"../built-in/overview.ts\";\nimport { defaultRunMembershipOverviewReport } from \"../built-in/run-membership-overview.ts\";\nimport { resolveReportTitle, type ReportDefinition, } from \"../definition/report.ts\";\nimport type { ClosedSiteRevision } from \"../execution/model.ts\";\nimport { builtInMachineDescriptorOf, builtInShowDocument, buildReportProjections, canonicalMachineJson, closePricingProfileJson, customTargetExecutionManifest, produceBuiltInShowData, reportProjectionFailure, type BuiltInMachineDescriptor, type BuiltInMachineProducerMissing, type ReportProjectionCostInput, type ShowSelection, } from \"../execution/machine.ts\";\nimport { renderResolvedPageText } from \"../runtime/text.ts\";\nimport type { PanelMode } from \"../model/panel.ts\";\nimport type { ThemeDefinition } from \"../theme.ts\";\nimport { executeReportSite, startReportBuildBudget, executeReportTarget, reportDefinitionIdentity, type ClosedReportSite, type ClosedTargetExecution, type ReportBuildBudgetAnchor, type ReportExecutionError, } from \"./execute.ts\";\nimport { builtInMachineRegistry, type BuiltInMachineProductionFailed, } from \"./machine.ts\";\nimport { selectShowTarget, type ShowTargetError, } from \"./show-target.ts\";\nimport { isReportTargetRouteInvalid, showTargetRequestForRoute, } from \"./target-route.ts\";\nimport { withReportHostPhase } from \"./progress.ts\";\nimport { buildSiteRevision, type ReportSiteBuildError, } from \"./static.ts\";\nconst SHOW_TEXT_WIDTH = 80;\nexport interface ReportShowPresentationFailed {\n readonly code: \"report-show-presentation-failed\";\n readonly operation: \"text\" | \"machine\";\n readonly reason: string;\n}\nexport type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | {\n readonly code: \"sample-attempt-locator-not-found\";\n readonly locator: AttemptLocator;\n} | {\n readonly code: \"sample-attempt-locator-ambiguous\";\n readonly locator: AttemptLocator;\n};\nexport type ExecuteReportForAttemptFromRecordError = ExecuteReportFromRecordError;\nexport type ExecuteReportFromRecordRequirements = RecordFileSystem | RecordCoordination;\ninterface SelectionTarget {\n readonly root: RecordRoot;\n readonly selection: AnalysisSelectionRequest;\n readonly report?: ReportDefinition;\n}\ninterface AttemptTarget {\n readonly root: RecordRoot;\n readonly locator: AttemptLocator;\n readonly report?: ReportDefinition;\n}\nexport type ReportRecordTarget = SelectionTarget | AttemptTarget;\nexport type ShowReportFromRecordInput = ReportRecordTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n};\nexport type BuildReportSiteFromRecordInput = ReportRecordTarget & {\n readonly theme?: ThemeDefinition;\n};\nexport type CloseReportSiteFromRecordInput = ReportRecordTarget;\n/**\n * The Record-backed show boundary executes and closes exactly one Page. It\n * never enumerates a parameterized Page and never forms a Site revision.\n */\nexport function showReportFromRecord(input: ShowReportFromRecordInput): Effect.Effect<string, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return \"locator\" in input\n ? showAttemptFromRecord(input)\n : showSelectionFromRecord(input);\n}\n/**\n * The Record-backed site boundary enumerates every Page instance once, closes\n * all projections while the Sample is live, and then forms one opaque byte\n * revision consumed unchanged by view and static export.\n */\nexport function buildReportSiteFromRecord(input: BuildReportSiteFromRecordInput): Effect.Effect<ClosedSiteRevision, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.flatMap(closeReportSiteFromRecord(input), (site) => buildSiteRevision({\n site,\n ...(input.theme === undefined ? {} : { theme: input.theme }),\n }));\n}\n/** @internal Page-level cache input: closed data only, with no live Sample. */\nexport function closeReportSiteFromRecord(input: CloseReportSiteFromRecordInput): Effect.Effect<ClosedReportSite, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.suspend(() => {\n const budget = startReportBuildBudget();\n return \"locator\" in input\n ? closeAttemptSiteFromRecord(input, budget)\n : closeSelectionSiteFromRecord(input, budget);\n });\n}\n/**\n * @internal Watch-only Record probe. It shares the same selection and\n * project-current/attempt narrowing as Sample opening, but stops after the\n * selected semantic snapshot is materialized. No Sample capability or Report\n * callback is opened on this path.\n */\nexport function reportSnapshotIdentityFromRecord(input: ReportRecordTarget): Effect.Effect<string, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.scoped(\"locator\" in input\n ? snapshotIdentityForAttempt(input.root, input.locator)\n : snapshotIdentityForSelection(input.root, input.selection));\n}\nfunction showSelectionFromRecord(input: SelectionTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openSelectionSample(input.root, input.selection);\n const report = input.report ?? defaultReportForSelection(input.selection);\n const selection = showSelectionForRequest(sample, input.selection);\n return yield* presentShowTarget({\n sample,\n report,\n selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n format: input.format ?? \"text\",\n });\n }));\n}\nfunction showAttemptFromRecord(input: AttemptTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openAttemptSample(input.root, input.locator);\n const report = input.report ?? defaultAttemptOverviewReport;\n const selection: ShowSelection = Object.freeze({\n kind: \"attempt-locator\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n locator: String(input.locator),\n });\n return yield* presentShowTarget({\n sample,\n report,\n selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n format: input.format ?? \"text\",\n });\n }));\n}\n/**\n * One selected target for one fixed Sample. A built-in machine Report is\n * executed by the Host-owned producer registry from its data-only descriptor;\n * its author callbacks are never invoked, so a duplicate installed copy is\n * recognized and executed safely. Custom Reports keep executing the selected\n * author Page and then present the closed result.\n */\nfunction presentShowTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly selection: ShowSelection;\n readonly route?: string;\n readonly format: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<string, ExecuteReportFromRecordError, Scope.Scope> {\n if (input.format === \"json\") {\n const descriptor = builtInMachineDescriptorOf(input.report);\n if (descriptor !== undefined) {\n return presentBuiltInMachineShow({\n sample: input.sample,\n report: input.report,\n descriptor,\n selection: input.selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n });\n }\n }\n return Effect.gen(function* () {\n const execution = yield* withReportHostPhase(\"report-execution\", executeReportTarget({\n sample: input.sample,\n report: input.report,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n }));\n return yield* presentTarget({\n sample: input.sample,\n report: input.report,\n execution,\n selection: input.selection,\n format: input.format,\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n });\n });\n}\n/**\n * Produces the Host-owned built-in machine document without executing any\n * author callback. Route and Page selection stay pure; the producer registry\n * resolves the data-only descriptor, and the analysis capture records the\n * same problem table an author execution would surface.\n */\nfunction presentBuiltInMachineShow(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly descriptor: BuiltInMachineDescriptor;\n readonly selection: ShowSelection;\n readonly route?: string;\n}): Effect.Effect<string, ReportExecutionError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed, Scope.Scope> {\n return withReportHostPhase(\"report-execution\", Effect.gen(function* () {\n const request = showTargetRequestForRoute(input.report, input.route);\n if (isReportTargetRouteInvalid(request))\n return yield* Effect.fail(request);\n const selected = selectShowTarget(input.report, request);\n if (isShowTargetSelectionError(selected)) {\n return yield* Effect.fail(selected);\n }\n const pageId = selected.page.id;\n const route = selected.kind === \"plain\" ? selected.target.route : selected.route;\n const capture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.gen(function* () {\n const data = yield* Effect.tryPromise({\n // The producer's Analysis facade captures the execution-local issue\n // token synchronously, so it must start inside the capture context.\n try: () => capture.run(() => Effect.runPromise(Effect.scoped(produceBuiltInShowData({\n registry: builtInMachineRegistry,\n descriptor: input.descriptor,\n sample: input.sample,\n selection: input.selection,\n route,\n pageId,\n })))),\n catch: (cause): BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed => {\n if (isMachineShowFailure(cause))\n return cause;\n return presentationFailure(\"machine\", cause);\n },\n });\n const costs = capturedProjectionCosts(capture, route, pageId);\n const pricingProfile = reportPricingProfileJson(input.report);\n const failure = reportProjectionFailure({ pricingProfile, costs });\n if (failure !== undefined)\n return yield* Effect.fail(failure);\n return yield* Effect.try({\n try: () => `${canonicalMachineJson(builtInShowDocument({\n selection: input.selection,\n report: {\n token: builtInToken(input.descriptor.producerId),\n identity: reportDefinitionIdentity(input.report),\n },\n page: {\n route,\n pageId,\n title: selected.page.title,\n },\n data,\n // The built-in data keeps no second enumerable projection; the\n // capture's cost entries are the only source, bound to this Page.\n projections: buildReportProjections({\n pricingProfile,\n costs,\n }),\n problems: machineProblems(capture.issues(), pageId),\n }))}\\n`,\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"machine\", cause),\n });\n }), Effect.sync(() => capture.close()));\n }));\n}\nfunction closeSelectionSiteFromRecord(input: SelectionTarget, budget: ReportBuildBudgetAnchor) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openSelectionSample(input.root, input.selection);\n return yield* withReportHostPhase(\"report-execution\", executeReportSite({\n sample,\n report: input.report ?? defaultReportForSelection(input.selection),\n budget,\n }));\n }));\n}\nfunction closeAttemptSiteFromRecord(input: AttemptTarget, budget: ReportBuildBudgetAnchor) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openAttemptSample(input.root, input.locator);\n return yield* withReportHostPhase(\"report-execution\", executeReportSite({\n sample,\n report: input.report ?? defaultAttemptOverviewReport,\n budget,\n }));\n }));\n}\ninterface SelectedRecordTarget {\n readonly reader: RecordReadSession;\n readonly selection: RecordSelection;\n}\ninterface SelectedAttemptTarget extends SelectedRecordTarget {\n readonly selectionRequest: AnalysisSelectionRequest;\n readonly runId: import(\"../../analysis/contracts.ts\").RunId;\n readonly slotId: import(\"../../analysis/contracts.ts\").SlotId;\n}\n/** The shared true selection boundary for both Sample opening and watch probes. */\nfunction selectRecordForSelection(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const reader = yield* withReportHostPhase(\"record-open\", recordHost.current.openRead({ root }));\n const selected = yield* withReportHostPhase(\"selection\", reader.selectRuns(selection.policy === \"explicit-runs\" ? { runIds: selection.runIds } : undefined));\n const filtered = selection.policy === \"project-current\" && selection.experimentIds !== undefined\n ? yield* filterSelectionByExperiment(selected, selection.experimentIds)\n : selected;\n return Object.freeze({ reader, selection: filtered }) satisfies SelectedRecordTarget;\n });\n}\n/** The shared exact-attempt selection boundary for both Sample opening and watch probes. */\nfunction selectRecordForAttempt(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const reader = yield* withReportHostPhase(\"record-open\", recordHost.current.openRead({ root }));\n const resolved = yield* withReportHostPhase(\"selection\", Effect.gen(function* () {\n const selected = yield* reader.selectRuns();\n return yield* resolveAttemptLocator({ reader, selection: selected, locator });\n }));\n if (resolved.kind === \"not-found\") {\n return yield* Effect.fail({ code: \"sample-attempt-locator-not-found\" as const, locator });\n }\n if (resolved.kind === \"ambiguous\") {\n return yield* Effect.fail({ code: \"sample-attempt-locator-ambiguous\" as const, locator });\n }\n const selectionRequest: AnalysisSelectionRequest = Object.freeze({\n policy: \"explicit-runs\" as const,\n runIds: Object.freeze([resolved.run.runId]),\n });\n const selection = yield* reader.selectRuns({ runIds: selectionRequest.runIds });\n return Object.freeze({\n reader,\n selection,\n selectionRequest,\n runId: resolved.run.runId,\n slotId: resolved.slotId,\n }) satisfies SelectedAttemptTarget;\n });\n}\nfunction snapshotIdentityForSelection(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForSelection(root, selection);\n const materialized = yield* materializeSampleSnapshot({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selection,\n });\n const snapshot = selection.policy === \"project-current\"\n ? narrowSampleSnapshotByCurrentIdentity(materialized.snapshot, matchingOccurrencesForCurrentIdentity(selected.selection, selection.currentSlots))\n : materialized.snapshot;\n return snapshot.identity.id;\n });\n}\nfunction snapshotIdentityForAttempt(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForAttempt(root, locator);\n const materialized = yield* materializeSampleSnapshot({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selected.selectionRequest,\n });\n const snapshot = narrowSampleSnapshot(materialized.snapshot, {\n runIds: [selected.runId],\n slotIds: [selected.slotId],\n });\n // This selector is assembled from one successfully resolved Attempt, so\n // the only invalid-selector branch is an internal invariant violation.\n if (\"code\" in snapshot)\n throw snapshot;\n return snapshot.identity.id;\n });\n}\nfunction openSelectionSample(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForSelection(root, selection);\n const opened = yield* withReportHostPhase(\"sample-open\", analysisHost.openSample({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selection,\n }));\n return selection.policy === \"project-current\"\n ? narrowSampleByCurrentIdentity(opened, matchingOccurrencesForCurrentIdentity(selected.selection, selection.currentSlots))\n : opened;\n });\n}\nfunction openAttemptSample(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForAttempt(root, locator);\n const sample = yield* withReportHostPhase(\"sample-open\", analysisHost.openSample({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selected.selectionRequest,\n }));\n return narrowSample(sample, {\n runIds: [selected.runId],\n slotIds: [selected.slotId],\n });\n });\n}\nfunction presentTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly execution: ClosedTargetExecution;\n readonly selection: ShowSelection;\n readonly format: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<string, ReportShowPresentationFailed, Scope.Scope> {\n if (input.format === \"text\") {\n return Effect.try({\n try: () => withTrailingNewline(renderResolvedPageText(input.execution.page, {\n locale: \"en\",\n width: input.textProjection?.width ?? SHOW_TEXT_WIDTH,\n panelMode: input.textProjection?.panelMode ?? \"plain\",\n })),\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"text\", cause),\n });\n }\n return Effect.try({\n try: () => `${canonicalMachineJson(customTargetExecutionManifest({\n selection: input.selection,\n report: {\n identity: reportDefinitionIdentity(input.report),\n title: resolveReportTitle(input.report),\n },\n page: input.execution.page,\n textWidth: SHOW_TEXT_WIDTH,\n projections: input.execution.projections,\n problems: input.execution.problems,\n }))}\\n`,\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"machine\", cause),\n });\n}\nfunction isMachineShowFailure(value: unknown): value is BuiltInMachineProductionFailed | BuiltInMachineProducerMissing {\n return typeof value === \"object\" && value !== null &&\n (Reflect.get(value, \"code\") === \"report-built-in-machine-producer-missing\" ||\n Reflect.get(value, \"code\") === \"report-built-in-machine-production-failed\");\n}\n/** Distinguishes the pure selection error from a selected target without importing the private union. */\nfunction isShowTargetSelectionError(value: unknown): value is ShowTargetError {\n return typeof value === \"object\" && value !== null && \"code\" in value;\n}\n/** The closed JSON form of the Report's PricingProfile, or null without one. */\nfunction reportPricingProfileJson(report: ReportDefinition): JsonValue | null {\n return report.pricing === null ? null : closePricingProfileJson(report.pricing);\n}\n/** Binds exact Analysis row-level cost captures to the built-in target Page. */\nfunction capturedProjectionCosts(capture: AnalysisIssueCapture, route: string, pageId: string): readonly ReportProjectionCostInput[] {\n return capture.costEntries().map((entry) => Object.freeze({\n page: Object.freeze({ pageId, route }),\n measureId: entry.measureId,\n row: Object.freeze({ key: entry.row.key, dimensions: entry.row.dimensions }),\n profileIdentity: entry.profileIdentity,\n projection: entry.projection,\n }));\n}\n/** The host problem table for issues the machine producer recorded while the Sample was live. */\nfunction machineProblems(issues: readonly import(\"../../analysis/index.ts\").AnalysisIssue[], pageId: string): readonly import(\"../execution/machine.ts\").ReportProblem[] {\n return Object.freeze(issues.map((issue) => Object.freeze({\n code: `analysis-${issue.code}`,\n path: Object.freeze([\"page\", pageId]),\n refs: Object.freeze(issue.refs.map((reference) => String(reference.identity.locator)).sort(compareUtf8)),\n summary: issue.message,\n })));\n}\nfunction builtInToken(producerId: string): string {\n switch (producerId) {\n case builtInMachineProducerIds.defaultOverview:\n return \"default-overview\";\n case builtInMachineProducerIds.runMembershipOverview:\n return \"run-membership-overview\";\n case builtInMachineProducerIds.attemptOverview:\n return \"attempt-overview\";\n case builtInMachineProducerIds.standard:\n return \"standard\";\n default:\n return producerId;\n }\n}\nfunction showSelectionForRequest(sample: Sample, selection: AnalysisSelectionRequest): ShowSelection {\n if (selection.policy === \"explicit-runs\") {\n return Object.freeze({\n kind: \"explicit-runs\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n runIds: Object.freeze(selection.runIds.map(String)),\n });\n }\n const experimentIds = selection.experimentIds ?? selection.currentSlots.map((slot) => slot.experimentId);\n return Object.freeze({\n kind: \"project-current\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n experimentIds: Object.freeze(experimentIds.map(String)),\n });\n}\nfunction defaultReportForSelection(selection: AnalysisSelectionRequest): ReportDefinition {\n return selection.policy === \"explicit-runs\"\n ? defaultRunMembershipOverviewReport\n : defaultOverviewReport;\n}\nfunction matchingOccurrencesForCurrentIdentity(selection: import(\"../../record/host/types.ts\").RecordSelection, currentSlots: readonly import(\"../../analysis/contracts.ts\").AnalysisCurrentSlotIdentity[]): readonly import(\"../../analysis/contracts.ts\").AnalysisSlotOccurrenceIdentity[] {\n const digestsByLogicalAlignment = new Map<string, Set<string>>();\n for (const current of currentSlots) {\n const key = logicalAlignmentKey(current.experimentId, current.evalId, current.attemptOrdinal);\n const existing = digestsByLogicalAlignment.get(key) ?? new Set<string>();\n digestsByLogicalAlignment.set(key, existing.add(current.executionIdentityDigest));\n }\n const matching: import(\"../../analysis/contracts.ts\").AnalysisSlotOccurrenceIdentity[] = [];\n for (const entry of selection.expectedSlots) {\n const digests = digestsByLogicalAlignment.get(logicalAlignmentKey(entry.experimentId, entry.slot.evalId, entry.slot.attemptOrdinal));\n if (digests === undefined || !digests.has(entry.slot.executionIdentityDigest))\n continue;\n matching.push(Object.freeze({ runId: entry.run.runId, slotId: entry.slot.slotId }));\n }\n return Object.freeze(matching);\n}\nfunction filterSelectionByExperiment(selection: import(\"../../record/host/types.ts\").RecordSelection, experimentIds: readonly ExperimentId[]): Effect.Effect<import(\"../../record/host/types.ts\").RecordSelection> {\n const wanted = new Set(experimentIds);\n const runFacts = selection.runFacts.filter((facts) => wanted.has(facts.experimentId));\n const allowed = new Set(runFacts.map((facts) => facts.run));\n const allowedRunIds = new Set(runFacts.map((facts) => facts.run.runId));\n return Effect.succeed(Object.freeze({\n runRefs: Object.freeze(runFacts.map((facts) => facts.run)),\n runFacts: Object.freeze(runFacts),\n expectedSlots: Object.freeze(selection.expectedSlots.filter((entry) => allowed.has(entry.run))),\n // `selectRuns()` initially scans the Record-wide physical directory. A\n // concurrently written, unselected Run may therefore be incomplete for a\n // moment. Its warning/problem must not alter the selected semantic Sample\n // (or make an unrelated watch signal reopen Analysis).\n problems: Object.freeze(selection.problems.filter((problem) => allowedRunIds.has(problem.runId))),\n warnings: Object.freeze(selection.warnings.filter((warning) => allowedRunIds.has(warning.runId))),\n }));\n}\nfunction logicalAlignmentKey(experimentId: ExperimentId, evalId: import(\"../../analysis/contracts.ts\").EvalId, attemptOrdinal: number): string {\n return `${experimentId}\\0${evalId}\\0${attemptOrdinal}`;\n}\nfunction presentationFailure(operation: ReportShowPresentationFailed[\"operation\"], cause: unknown): ReportShowPresentationFailed {\n const raw = cause instanceof Error ? cause.message : String(cause);\n return Object.freeze({\n code: \"report-show-presentation-failed\" as const,\n operation,\n reason: raw.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || `${operation} failed`,\n });\n}\nfunction withTrailingNewline(value: string): string {\n return value.endsWith(\"\\n\") ? value : `${value}\\n`;\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n"]}
1
+ {"version":3,"file":"from-record.js","sourceRoot":"","sources":["from-record.ts"],"names":[],"mappings":";;AAyEA,oDAIC;AAMD,8DAKC;AAED,8DAOC;AAOD,4EAIC;AA5GD,mCAAgC;AAGhC,uFAA4E;AAC5E,oDAAsD;AAEtD,sDAA2D;AAE3D,6DAA0D;AAI1D,8DAA4I;AAC5I,0DAAmI;AAEnI,yEAA+E;AAC/E,uDAAoE;AACpE,uFAA4F;AAC5F,0DAAoD;AACpD,uDAAqF;AAErF,wDAAyW;AACzW,gDAA4D;AAG5D,6CAAqO;AACrO,6CAA4F;AAC5F,qDAA2E;AAC3E,uDAA2F;AAC3F,+CAAoD;AACpD,2CAA4E;AAC5E,MAAM,eAAe,GAAG,EAAE,CAAC;AAsC3B;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,KAAgC;IACjE,OAAO,SAAS,IAAI,KAAK;QACrB,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC;QAC9B,CAAC,CAAC,uBAA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,KAAK,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,iCAA0C;QAChD,SAAS;QACT,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,SAAS;KAC1G,CAAC,CAAC;AACP,CAAC;AACD,SAAS,mBAAmB,CAAC,KAAa;IACtC,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC;AACvD,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport type { AttemptLocator } from \"../../attempt-locator.ts\";\nimport { resolveAttemptLocator } from \"../../attempt-locator-resolution.ts\";\nimport { analysisHost } from \"../../analysis/host.ts\";\nimport type { AnalysisSelectionRequest, ExperimentId, JsonValue, Sample, } from \"../../analysis/index.ts\";\nimport { experimentGroups } from \"../../analysis/index.ts\";\nimport type { RecordCoordination } from \"../../coordination/record-leases.ts\";\nimport { recordHost } from \"../../record/host/runtime.ts\";\nimport type { RecordRoot } from \"../../record/platform/root.ts\";\nimport type { RecordFileSystem } from \"../../record/platform/services.ts\";\nimport type { RecordReaderOpenError, RecordReaderReadError, } from \"../../record/reader/errors.ts\";\nimport { captureAnalysisIssues, narrowSample, narrowSampleByCurrentIdentity, type AnalysisIssueCapture, } from \"../../sample/capability.ts\";\nimport { materializeSampleSnapshot, narrowSampleSnapshot, narrowSampleSnapshotByCurrentIdentity, } from \"../../sample/analysis.ts\";\nimport type { RecordReadSession, RecordSelection, } from \"../../record/host/types.ts\";\nimport { defaultAttemptOverviewReport } from \"../built-in/attempt-overview.ts\";\nimport { builtInMachineProducerIds, } from \"../built-in/machine.ts\";\nimport { defaultRunMembershipOverviewReport } from \"../built-in/run-membership-overview.ts\";\nimport { standard } from \"../built-in/standard.tsx\";\nimport { resolveReportTitle, type ReportDefinition, } from \"../definition/report.ts\";\nimport type { ClosedSiteRevision } from \"../execution/model.ts\";\nimport { builtInMachineDescriptorOf, builtInShowDocument, buildReportProjections, canonicalMachineJson, closePricingProfileJson, customTargetExecutionManifest, produceBuiltInShowData, reportProjectionFailure, type BuiltInMachineDescriptor, type BuiltInMachineProducerMissing, type ReportProjectionCostInput, type ShowSelection, } from \"../execution/machine.ts\";\nimport { renderResolvedPageText } from \"../runtime/text.ts\";\nimport type { PanelMode } from \"../model/panel.ts\";\nimport type { ThemeDefinition } from \"../theme.ts\";\nimport { executeReportSite, startReportBuildBudget, executeReportTarget, reportDefinitionIdentity, type ClosedReportSite, type ClosedTargetExecution, type ReportBuildBudgetAnchor, type ReportExecutionError, } from \"./execute.ts\";\nimport { builtInMachineRegistry, type BuiltInMachineProductionFailed, } from \"./machine.ts\";\nimport { selectShowTarget, type ShowTargetError, } from \"./show-target.ts\";\nimport { isReportTargetRouteInvalid, showTargetRequestForRoute, } from \"./target-route.ts\";\nimport { withReportHostPhase } from \"./progress.ts\";\nimport { buildSiteRevision, type ReportSiteBuildError, } from \"./static.ts\";\nconst SHOW_TEXT_WIDTH = 80;\nexport interface ReportShowPresentationFailed {\n readonly code: \"report-show-presentation-failed\";\n readonly operation: \"text\" | \"machine\";\n readonly reason: string;\n}\nexport type ExecuteReportFromRecordError = RecordReaderOpenError | RecordReaderReadError | ReportExecutionError | ReportSiteBuildError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed | {\n readonly code: \"sample-attempt-locator-not-found\";\n readonly locator: AttemptLocator;\n} | {\n readonly code: \"sample-attempt-locator-ambiguous\";\n readonly locator: AttemptLocator;\n};\nexport type ExecuteReportForAttemptFromRecordError = ExecuteReportFromRecordError;\nexport type ExecuteReportFromRecordRequirements = RecordFileSystem | RecordCoordination;\ninterface SelectionTarget {\n readonly root: RecordRoot;\n readonly selection: AnalysisSelectionRequest;\n readonly report?: ReportDefinition;\n}\ninterface AttemptTarget {\n readonly root: RecordRoot;\n readonly locator: AttemptLocator;\n readonly report?: ReportDefinition;\n}\nexport type ReportRecordTarget = SelectionTarget | AttemptTarget;\nexport type ShowReportFromRecordInput = ReportRecordTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n};\nexport type BuildReportSiteFromRecordInput = ReportRecordTarget & {\n readonly theme?: ThemeDefinition;\n};\nexport type CloseReportSiteFromRecordInput = ReportRecordTarget;\n/**\n * The Record-backed show boundary executes and closes exactly one Page. It\n * never enumerates a parameterized Page and never forms a Site revision.\n */\nexport function showReportFromRecord(input: ShowReportFromRecordInput): Effect.Effect<string, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return \"locator\" in input\n ? showAttemptFromRecord(input)\n : showSelectionFromRecord(input);\n}\n/**\n * The Record-backed site boundary enumerates every Page instance once, closes\n * all projections while the Sample is live, and then forms one opaque byte\n * revision consumed unchanged by view and static export.\n */\nexport function buildReportSiteFromRecord(input: BuildReportSiteFromRecordInput): Effect.Effect<ClosedSiteRevision, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.flatMap(closeReportSiteFromRecord(input), (site) => buildSiteRevision({\n site,\n ...(input.theme === undefined ? {} : { theme: input.theme }),\n }));\n}\n/** @internal Page-level cache input: closed data only, with no live Sample. */\nexport function closeReportSiteFromRecord(input: CloseReportSiteFromRecordInput): Effect.Effect<ClosedReportSite, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.suspend(() => {\n const budget = startReportBuildBudget();\n return \"locator\" in input\n ? closeAttemptSiteFromRecord(input, budget)\n : closeSelectionSiteFromRecord(input, budget);\n });\n}\n/**\n * @internal Watch-only Record probe. It shares the same selection and\n * project-current/attempt narrowing as Sample opening, but stops after the\n * selected semantic snapshot is materialized. No Sample capability or Report\n * callback is opened on this path.\n */\nexport function reportSnapshotIdentityFromRecord(input: ReportRecordTarget): Effect.Effect<string, ExecuteReportFromRecordError, ExecuteReportFromRecordRequirements> {\n return Effect.scoped(\"locator\" in input\n ? snapshotIdentityForAttempt(input.root, input.locator)\n : snapshotIdentityForSelection(input.root, input.selection));\n}\nfunction showSelectionFromRecord(input: SelectionTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openSelectionSample(input.root, input.selection);\n const report = input.report ?? defaultReportForSelection(input.selection);\n const selection = showSelectionForRequest(sample, input.selection);\n const implicitRoute = input.route === undefined && input.selection.policy !== \"explicit-runs\"\n ? singleExperimentGroupRoute(report, sample)\n : undefined;\n return yield* presentShowTarget({\n sample,\n report,\n selection,\n ...(input.route === undefined && implicitRoute === undefined ? {} : { route: input.route ?? implicitRoute }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n format: input.format ?? \"text\",\n });\n }));\n}\nfunction singleExperimentGroupRoute(report: ReportDefinition, sample: Sample): string | undefined {\n const groups = experimentGroups(sample);\n if (groups.length !== 1)\n return undefined;\n const group = groups[0]!.group;\n const declaresGroupPage = report.pages.some((page) => \"role\" in page\n && page.role?.kind === \"experiment-group\"\n && page.role.groupKind === group.kind);\n return declaresGroupPage ? groupRoute(group) : undefined;\n}\nfunction groupRoute(group: import(\"../../analysis/index.ts\").ExperimentGroupIdentity): string {\n return group.kind === \"named\"\n ? `/group/named/${group.groupId}`\n : `/group/singleton/${String(group.experimentId)}`;\n}\nfunction showAttemptFromRecord(input: AttemptTarget & {\n readonly route?: string;\n readonly format?: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openAttemptSample(input.root, input.locator);\n const report = input.report ?? defaultAttemptOverviewReport;\n const selection: ShowSelection = Object.freeze({\n kind: \"attempt-locator\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n locator: String(input.locator),\n });\n return yield* presentShowTarget({\n sample,\n report,\n selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n format: input.format ?? \"text\",\n });\n }));\n}\n/**\n * One selected target for one fixed Sample. A built-in machine Report is\n * executed by the Host-owned producer registry from its data-only descriptor;\n * its author callbacks are never invoked, so a duplicate installed copy is\n * recognized and executed safely. Custom Reports keep executing the selected\n * author Page and then present the closed result.\n */\nfunction presentShowTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly selection: ShowSelection;\n readonly route?: string;\n readonly format: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<string, ExecuteReportFromRecordError, Scope.Scope> {\n if (input.format === \"json\") {\n const descriptor = builtInMachineDescriptorOf(input.report);\n if (descriptor !== undefined) {\n return presentBuiltInMachineShow({\n sample: input.sample,\n report: input.report,\n descriptor,\n selection: input.selection,\n ...(input.route === undefined ? {} : { route: input.route }),\n });\n }\n }\n return Effect.gen(function* () {\n const execution = yield* withReportHostPhase(\"report-execution\", executeReportTarget({\n sample: input.sample,\n report: input.report,\n ...(input.route === undefined ? {} : { route: input.route }),\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n }));\n return yield* presentTarget({\n sample: input.sample,\n report: input.report,\n execution,\n selection: input.selection,\n format: input.format,\n ...(input.textProjection === undefined ? {} : { textProjection: input.textProjection }),\n });\n });\n}\n/**\n * Produces the Host-owned built-in machine document without executing any\n * author callback. Route and Page selection stay pure; the producer registry\n * resolves the data-only descriptor, and the analysis capture records the\n * same problem table an author execution would surface.\n */\nfunction presentBuiltInMachineShow(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly descriptor: BuiltInMachineDescriptor;\n readonly selection: ShowSelection;\n readonly route?: string;\n}): Effect.Effect<string, ReportExecutionError | BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed, Scope.Scope> {\n return withReportHostPhase(\"report-execution\", Effect.gen(function* () {\n const request = showTargetRequestForRoute(input.report, input.route);\n if (isReportTargetRouteInvalid(request))\n return yield* Effect.fail(request);\n const selected = selectShowTarget(input.report, request);\n if (isShowTargetSelectionError(selected)) {\n return yield* Effect.fail(selected);\n }\n const pageId = selected.page.id;\n const route = selected.kind === \"plain\" ? selected.target.route : selected.route;\n const capture = yield* captureAnalysisIssues(input.sample);\n return yield* Effect.ensuring(Effect.gen(function* () {\n const data = yield* Effect.tryPromise({\n // The producer's Analysis facade captures the execution-local issue\n // token synchronously, so it must start inside the capture context.\n try: () => capture.run(() => Effect.runPromise(Effect.scoped(produceBuiltInShowData({\n registry: builtInMachineRegistry,\n descriptor: input.descriptor,\n sample: input.sample,\n selection: input.selection,\n route,\n pageId,\n })))),\n catch: (cause): BuiltInMachineProductionFailed | BuiltInMachineProducerMissing | ReportShowPresentationFailed => {\n if (isMachineShowFailure(cause))\n return cause;\n return presentationFailure(\"machine\", cause);\n },\n });\n const costs = capturedProjectionCosts(capture, route, pageId);\n const pricingProfile = reportPricingProfileJson(input.report);\n const failure = reportProjectionFailure({ pricingProfile, costs });\n if (failure !== undefined)\n return yield* Effect.fail(failure);\n return yield* Effect.try({\n try: () => `${canonicalMachineJson(builtInShowDocument({\n selection: input.selection,\n report: {\n token: builtInToken(input.descriptor.producerId),\n identity: reportDefinitionIdentity(input.report),\n },\n page: {\n route,\n pageId,\n title: selected.page.title,\n },\n data,\n // The built-in data keeps no second enumerable projection; the\n // capture's cost entries are the only source, bound to this Page.\n projections: buildReportProjections({\n pricingProfile,\n costs,\n }),\n problems: machineProblems(capture.issues(), pageId),\n }))}\\n`,\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"machine\", cause),\n });\n }), Effect.sync(() => capture.close()));\n }));\n}\nfunction closeSelectionSiteFromRecord(input: SelectionTarget, budget: ReportBuildBudgetAnchor) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openSelectionSample(input.root, input.selection);\n return yield* withReportHostPhase(\"report-execution\", executeReportSite({\n sample,\n report: input.report ?? defaultReportForSelection(input.selection),\n budget,\n }));\n }));\n}\nfunction closeAttemptSiteFromRecord(input: AttemptTarget, budget: ReportBuildBudgetAnchor) {\n return Effect.scoped(Effect.gen(function* () {\n const sample = yield* openAttemptSample(input.root, input.locator);\n return yield* withReportHostPhase(\"report-execution\", executeReportSite({\n sample,\n report: input.report ?? defaultAttemptOverviewReport,\n budget,\n }));\n }));\n}\ninterface SelectedRecordTarget {\n readonly reader: RecordReadSession;\n readonly selection: RecordSelection;\n}\ninterface SelectedAttemptTarget extends SelectedRecordTarget {\n readonly selectionRequest: AnalysisSelectionRequest;\n readonly runId: import(\"../../analysis/contracts.ts\").RunId;\n readonly slotId: import(\"../../analysis/contracts.ts\").SlotId;\n}\n/** The shared true selection boundary for both Sample opening and watch probes. */\nfunction selectRecordForSelection(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const reader = yield* withReportHostPhase(\"record-open\", recordHost.current.openRead({ root }));\n const selected = yield* withReportHostPhase(\"selection\", reader.selectRuns(selection.policy === \"explicit-runs\" ? { runIds: selection.runIds } : undefined));\n const filtered = selection.policy === \"project-current\" && selection.experimentIds !== undefined\n ? yield* filterSelectionByExperiment(selected, selection.experimentIds)\n : selected;\n return Object.freeze({ reader, selection: filtered }) satisfies SelectedRecordTarget;\n });\n}\n/** The shared exact-attempt selection boundary for both Sample opening and watch probes. */\nfunction selectRecordForAttempt(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const reader = yield* withReportHostPhase(\"record-open\", recordHost.current.openRead({ root }));\n const resolved = yield* withReportHostPhase(\"selection\", Effect.gen(function* () {\n const selected = yield* reader.selectRuns();\n return yield* resolveAttemptLocator({ reader, selection: selected, locator });\n }));\n if (resolved.kind === \"not-found\") {\n return yield* Effect.fail({ code: \"sample-attempt-locator-not-found\" as const, locator });\n }\n if (resolved.kind === \"ambiguous\") {\n return yield* Effect.fail({ code: \"sample-attempt-locator-ambiguous\" as const, locator });\n }\n const selectionRequest: AnalysisSelectionRequest = Object.freeze({\n policy: \"explicit-runs\" as const,\n runIds: Object.freeze([resolved.run.runId]),\n });\n const selection = yield* reader.selectRuns({ runIds: selectionRequest.runIds });\n return Object.freeze({\n reader,\n selection,\n selectionRequest,\n runId: resolved.run.runId,\n slotId: resolved.slotId,\n }) satisfies SelectedAttemptTarget;\n });\n}\nfunction snapshotIdentityForSelection(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForSelection(root, selection);\n const materialized = yield* materializeSampleSnapshot({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selection,\n });\n const snapshot = selection.policy === \"project-current\"\n ? narrowSampleSnapshotByCurrentIdentity(materialized.snapshot, matchingOccurrencesForCurrentIdentity(selected.selection, selection.currentSlots))\n : materialized.snapshot;\n return snapshot.identity.id;\n });\n}\nfunction snapshotIdentityForAttempt(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForAttempt(root, locator);\n const materialized = yield* materializeSampleSnapshot({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selected.selectionRequest,\n });\n const snapshot = narrowSampleSnapshot(materialized.snapshot, {\n runIds: [selected.runId],\n slotIds: [selected.slotId],\n });\n // This selector is assembled from one successfully resolved Attempt, so\n // the only invalid-selector branch is an internal invariant violation.\n if (\"code\" in snapshot)\n throw snapshot;\n return snapshot.identity.id;\n });\n}\nfunction openSelectionSample(root: RecordRoot, selection: AnalysisSelectionRequest) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForSelection(root, selection);\n const opened = yield* withReportHostPhase(\"sample-open\", analysisHost.openSample({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selection,\n }));\n return selection.policy === \"project-current\"\n ? narrowSampleByCurrentIdentity(opened, matchingOccurrencesForCurrentIdentity(selected.selection, selection.currentSlots))\n : opened;\n });\n}\nfunction openAttemptSample(root: RecordRoot, locator: AttemptLocator) {\n return Effect.gen(function* () {\n const selected = yield* selectRecordForAttempt(root, locator);\n const sample = yield* withReportHostPhase(\"sample-open\", analysisHost.openSample({\n reader: selected.reader,\n selection: selected.selection,\n selectionRequest: selected.selectionRequest,\n }));\n return narrowSample(sample, {\n runIds: [selected.runId],\n slotIds: [selected.slotId],\n });\n });\n}\nfunction presentTarget(input: {\n readonly sample: Sample;\n readonly report: ReportDefinition;\n readonly execution: ClosedTargetExecution;\n readonly selection: ShowSelection;\n readonly format: \"text\" | \"json\";\n readonly textProjection?: {\n readonly width: number;\n readonly panelMode: PanelMode;\n };\n}): Effect.Effect<string, ReportShowPresentationFailed, Scope.Scope> {\n if (input.format === \"text\") {\n return Effect.try({\n try: () => withTrailingNewline(renderResolvedPageText(input.execution.page, {\n locale: \"en\",\n width: input.textProjection?.width ?? SHOW_TEXT_WIDTH,\n panelMode: input.textProjection?.panelMode ?? \"plain\",\n })),\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"text\", cause),\n });\n }\n return Effect.try({\n try: () => `${canonicalMachineJson(customTargetExecutionManifest({\n selection: input.selection,\n report: {\n identity: reportDefinitionIdentity(input.report),\n title: resolveReportTitle(input.report),\n },\n page: input.execution.page,\n textWidth: SHOW_TEXT_WIDTH,\n projections: input.execution.projections,\n problems: input.execution.problems,\n }))}\\n`,\n catch: (cause): ReportShowPresentationFailed => presentationFailure(\"machine\", cause),\n });\n}\nfunction isMachineShowFailure(value: unknown): value is BuiltInMachineProductionFailed | BuiltInMachineProducerMissing {\n return typeof value === \"object\" && value !== null &&\n (Reflect.get(value, \"code\") === \"report-built-in-machine-producer-missing\" ||\n Reflect.get(value, \"code\") === \"report-built-in-machine-production-failed\");\n}\n/** Distinguishes the pure selection error from a selected target without importing the private union. */\nfunction isShowTargetSelectionError(value: unknown): value is ShowTargetError {\n return typeof value === \"object\" && value !== null && \"code\" in value;\n}\n/** The closed JSON form of the Report's PricingProfile, or null without one. */\nfunction reportPricingProfileJson(report: ReportDefinition): JsonValue | null {\n return report.pricing === null ? null : closePricingProfileJson(report.pricing);\n}\n/** Binds exact Analysis row-level cost captures to the built-in target Page. */\nfunction capturedProjectionCosts(capture: AnalysisIssueCapture, route: string, pageId: string): readonly ReportProjectionCostInput[] {\n return capture.costEntries().map((entry) => Object.freeze({\n page: Object.freeze({ pageId, route }),\n measureId: entry.measureId,\n row: Object.freeze({ key: entry.row.key, dimensions: entry.row.dimensions }),\n profileIdentity: entry.profileIdentity,\n projection: entry.projection,\n }));\n}\n/** The host problem table for issues the machine producer recorded while the Sample was live. */\nfunction machineProblems(issues: readonly import(\"../../analysis/index.ts\").AnalysisIssue[], pageId: string): readonly import(\"../execution/machine.ts\").ReportProblem[] {\n return Object.freeze(issues.map((issue) => Object.freeze({\n code: `analysis-${issue.code}`,\n path: Object.freeze([\"page\", pageId]),\n refs: Object.freeze(issue.refs.map((reference) => String(reference.identity.locator)).sort(compareUtf8)),\n summary: issue.message,\n })));\n}\nfunction builtInToken(producerId: string): string {\n switch (producerId) {\n case builtInMachineProducerIds.runMembershipOverview:\n return \"run-membership-overview\";\n case builtInMachineProducerIds.attemptOverview:\n return \"attempt-overview\";\n case builtInMachineProducerIds.standard:\n return \"standard\";\n default:\n return producerId;\n }\n}\nfunction showSelectionForRequest(sample: Sample, selection: AnalysisSelectionRequest): ShowSelection {\n if (selection.policy === \"explicit-runs\") {\n return Object.freeze({\n kind: \"explicit-runs\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n runIds: Object.freeze(selection.runIds.map(String)),\n });\n }\n const experimentIds = selection.experimentIds ?? selection.currentSlots.map((slot) => slot.experimentId);\n return Object.freeze({\n kind: \"project-current\" as const,\n sampleIdentity: sample.snapshot.identity.id,\n experimentIds: Object.freeze(experimentIds.map(String)),\n });\n}\nfunction defaultReportForSelection(selection: AnalysisSelectionRequest): ReportDefinition {\n return selection.policy === \"explicit-runs\"\n ? defaultRunMembershipOverviewReport\n : standard;\n}\nfunction matchingOccurrencesForCurrentIdentity(selection: import(\"../../record/host/types.ts\").RecordSelection, currentSlots: readonly import(\"../../analysis/contracts.ts\").AnalysisCurrentSlotIdentity[]): readonly import(\"../../analysis/contracts.ts\").AnalysisSlotOccurrenceIdentity[] {\n const digestsByLogicalAlignment = new Map<string, Set<string>>();\n for (const current of currentSlots) {\n const key = logicalAlignmentKey(current.experimentId, current.evalId, current.attemptOrdinal);\n const existing = digestsByLogicalAlignment.get(key) ?? new Set<string>();\n digestsByLogicalAlignment.set(key, existing.add(current.executionIdentityDigest));\n }\n const matching: import(\"../../analysis/contracts.ts\").AnalysisSlotOccurrenceIdentity[] = [];\n for (const entry of selection.expectedSlots) {\n const digests = digestsByLogicalAlignment.get(logicalAlignmentKey(entry.experimentId, entry.slot.evalId, entry.slot.attemptOrdinal));\n if (digests === undefined || !digests.has(entry.slot.executionIdentityDigest))\n continue;\n matching.push(Object.freeze({ runId: entry.run.runId, slotId: entry.slot.slotId }));\n }\n return Object.freeze(matching);\n}\nfunction filterSelectionByExperiment(selection: import(\"../../record/host/types.ts\").RecordSelection, experimentIds: readonly ExperimentId[]): Effect.Effect<import(\"../../record/host/types.ts\").RecordSelection> {\n const wanted = new Set(experimentIds);\n const runFacts = selection.runFacts.filter((facts) => wanted.has(facts.experimentId));\n const allowed = new Set(runFacts.map((facts) => facts.run));\n const allowedRunIds = new Set(runFacts.map((facts) => facts.run.runId));\n return Effect.succeed(Object.freeze({\n runRefs: Object.freeze(runFacts.map((facts) => facts.run)),\n runFacts: Object.freeze(runFacts),\n expectedSlots: Object.freeze(selection.expectedSlots.filter((entry) => allowed.has(entry.run))),\n // `selectRuns()` initially scans the Record-wide physical directory. A\n // concurrently written, unselected Run may therefore be incomplete for a\n // moment. Its warning/problem must not alter the selected semantic Sample\n // (or make an unrelated watch signal reopen Analysis).\n problems: Object.freeze(selection.problems.filter((problem) => allowedRunIds.has(problem.runId))),\n warnings: Object.freeze(selection.warnings.filter((warning) => allowedRunIds.has(warning.runId))),\n }));\n}\nfunction logicalAlignmentKey(experimentId: ExperimentId, evalId: import(\"../../analysis/contracts.ts\").EvalId, attemptOrdinal: number): string {\n return `${experimentId}\\0${evalId}\\0${attemptOrdinal}`;\n}\nfunction presentationFailure(operation: ReportShowPresentationFailed[\"operation\"], cause: unknown): ReportShowPresentationFailed {\n const raw = cause instanceof Error ? cause.message : String(cause);\n return Object.freeze({\n code: \"report-show-presentation-failed\" as const,\n operation,\n reason: raw.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || `${operation} failed`,\n });\n}\nfunction withTrailingNewline(value: string): string {\n return value.endsWith(\"\\n\") ? value : `${value}\\n`;\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n"]}
@@ -3,12 +3,54 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.builtInMachineRegistry = void 0;
4
4
  const effect_1 = require("effect");
5
5
  const index_ts_1 = require("../../analysis/index.cjs");
6
+ const experiment_groups_ts_1 = require("../../analysis/experiment-groups.cjs");
6
7
  const machine_ts_1 = require("../built-in/machine.cjs");
7
8
  const analysis_values_ts_1 = require("../built-in/analysis-values.cjs");
9
+ const run_membership_overview_ts_1 = require("../built-in/run-membership-overview.cjs");
8
10
  const machine_ts_2 = require("../execution/machine.cjs");
9
- const leaderboard = producer(async (sample) => {
10
- const rows = [...await (0, analysis_values_ts_1.loadBuiltInExperimentRows)(sample)].sort((left, right) => compareUtf8(left.key, right.key));
11
- return Object.freeze({ kind: "leaderboard", rows: (0, machine_ts_2.closeMachineJson)(rows) });
11
+ const groups = producer(async (sample) => {
12
+ const entries = (0, index_ts_1.experimentGroups)(sample).map((entry) => Object.freeze({
13
+ group: entry.group,
14
+ members: entry.members,
15
+ href: `/group/${entry.group.kind}/${entry.group.kind === "named" ? entry.group.groupId : String(entry.group.experimentId)}`,
16
+ }));
17
+ return Object.freeze({ kind: "groups", groups: (0, machine_ts_2.closeMachineJson)(entries) });
18
+ });
19
+ const experimentGroup = producer(async (sample, _locator, route) => {
20
+ const match = /^\/group\/(named|singleton)\/([^/]+)$/u.exec(route);
21
+ if (match === null)
22
+ throw new TypeError("Experiment Group route is invalid");
23
+ const kind = match[1];
24
+ const key = decodeURIComponent(match[2]);
25
+ const summary = (0, index_ts_1.experimentGroups)(sample).find((entry) => entry.group.kind === kind && (kind === "named"
26
+ ? entry.group.kind === "named" && entry.group.groupId === key
27
+ : entry.group.kind === "singleton" && String(entry.group.experimentId) === key));
28
+ if (summary === undefined) {
29
+ throw Object.freeze({ code: "report-group-not-in-sample", group: `${kind}/${key}` });
30
+ }
31
+ const scope = (0, index_ts_1.experimentComparisonScope)(sample, summary.group);
32
+ const comparison = scope.comparison.state === "comparable"
33
+ ? Object.freeze({
34
+ state: "comparable",
35
+ members: scope.comparison.members,
36
+ rows: await (0, analysis_values_ts_1.loadBuiltInExperimentRows)((0, experiment_groups_ts_1.sampleForExperimentComparisonScope)(scope)),
37
+ })
38
+ : scope.comparison;
39
+ return Object.freeze({
40
+ kind: "experiment-group",
41
+ group: (0, machine_ts_2.closeMachineJson)(summary.group),
42
+ comparison: (0, machine_ts_2.closeMachineJson)(comparison),
43
+ });
44
+ });
45
+ const runMembership = producer(async (sample) => {
46
+ const result = await (0, run_membership_overview_ts_1.loadRunMembershipPageInput)(sample);
47
+ return Object.freeze({
48
+ kind: "run-membership",
49
+ summary: (0, machine_ts_2.closeMachineJson)(result.summary),
50
+ members: (0, machine_ts_2.closeMachineJson)(result.members),
51
+ errors: (0, machine_ts_2.closeMachineJson)(result.errors),
52
+ evidence: (0, machine_ts_2.closeMachineJson)(result.evidence),
53
+ });
12
54
  });
13
55
  const attempt = producer(async (sample, locator) => {
14
56
  const [evidence, observability, fileChanges] = await Promise.all([
@@ -57,22 +99,21 @@ const standard = (input) => {
57
99
  case "attempt":
58
100
  case "attempt-overview":
59
101
  return attempt(input);
60
- case "traces":
61
- return execution(input);
102
+ case "group-named":
103
+ case "group-singleton":
104
+ return experimentGroup(input);
62
105
  default:
63
- return leaderboard(input);
106
+ return groups(input);
64
107
  }
65
108
  };
66
109
  const producers = new Map([
67
- [machine_ts_1.builtInMachineProducerIds.defaultOverview, leaderboard],
68
- [machine_ts_1.builtInMachineProducerIds.runMembershipOverview, leaderboard],
110
+ [machine_ts_1.builtInMachineProducerIds.runMembershipOverview, runMembership],
69
111
  [machine_ts_1.builtInMachineProducerIds.attemptOverview, attempt],
70
112
  [machine_ts_1.builtInMachineProducerIds.executionEvidence, execution],
71
113
  [machine_ts_1.builtInMachineProducerIds.timingEvidence, timing],
72
114
  [machine_ts_1.builtInMachineProducerIds.sourceEvidence, source],
73
115
  [machine_ts_1.builtInMachineProducerIds.sandboxHistory, execution],
74
116
  [machine_ts_1.builtInMachineProducerIds.standard, standard],
75
- [machine_ts_1.builtInMachineProducerIds.classicOverview, leaderboard],
76
117
  ]);
77
118
  exports.builtInMachineRegistry = Object.freeze({
78
119
  producers,
@@ -81,7 +122,7 @@ function producer(build) {
81
122
  return (input) => effect_1.Effect.tryPromise({
82
123
  try: () => build(input.sample, input.selection.kind === "attempt-locator"
83
124
  ? input.selection.locator
84
- : undefined),
125
+ : undefined, input.route),
85
126
  catch: (cause) => Object.freeze({
86
127
  code: "report-built-in-machine-production-failed",
87
128
  producerId: producerIdForInput(input.pageId),
@@ -93,7 +134,8 @@ function producerIdForInput(pageId) {
93
134
  return `page:${pageId}`;
94
135
  }
95
136
  function boundedReason(cause) {
96
- const value = cause instanceof Error ? cause.message : String(cause);
137
+ const value = cause instanceof Error ? cause.message
138
+ : typeof cause === "object" && cause !== null ? JSON.stringify(cause) : String(cause);
97
139
  return value.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ").slice(0, 512).trim() || "machine producer failed";
98
140
  }
99
141
  function compareUtf8(left, right) {
@@ -1 +1 @@
1
- {"version":3,"file":"machine.js","sourceRoot":"","sources":["machine.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,sDAA2I;AAC3I,uDAAmE;AACnE,uEAA2E;AAC3E,wDAA4I;AAM5I,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;IAC1C,MAAM,IAAI,GAAG,CAAC,GAAG,MAAM,IAAA,8CAAyB,EAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAClH,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,aAAsB,EAAE,IAAI,EAAE,IAAA,6BAAgB,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzF,CAAC,CAAC,CAAC;AACH,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAC/C,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC7D,IAAA,gBAAK,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,8BAAmB,EAAE,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;QAChH,IAAA,gBAAK,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,mCAAwB,EAAE,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,C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c;IACjC,MAAM,KAAK,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrE,OAAO,KAAK,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,yBAAyB,CAAC;AACjH,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport { attemptEvidenceView, attemptObservabilityView, fileChangesView, query, sourcesView, type Sample, } from \"../../analysis/index.ts\";\nimport { builtInMachineProducerIds } from \"../built-in/machine.ts\";\nimport { loadBuiltInExperimentRows } from \"../built-in/analysis-values.ts\";\nimport { closeMachineJson, type BuiltInMachineProducer, type BuiltInMachineRegistry, type BuiltInShowData, } from \"../execution/machine.ts\";\nexport interface BuiltInMachineProductionFailed {\n readonly code: \"report-built-in-machine-production-failed\";\n readonly producerId: string;\n readonly reason: string;\n}\nconst leaderboard = producer(async (sample) => {\n const rows = [...await loadBuiltInExperimentRows(sample)].sort((left, right) => compareUtf8(left.key, right.key));\n return Object.freeze({ kind: \"leaderboard\" as const, rows: closeMachineJson(rows) });\n});\nconst attempt = producer(async (sample, locator) => {\n const [evidence, observability, fileChanges] = await Promise.all([\n query(sample, { kind: \"domain-view\", view: attemptEvidenceView, ...(locator === undefined ? {} : { locator }) }),\n query(sample, { kind: \"domain-view\", view: attemptObservabilityView, ...(locator === undefined ? {} : { locator }) }),\n query(sample, { kind: \"domain-view\", view: fileChangesView, ...(locator === undefined ? {} : { locator }) }),\n ]);\n return Object.freeze({\n kind: \"attempt\" as const,\n evidence: closeMachineJson(evidence),\n observability: closeMachineJson(observability),\n fileChanges: closeMachineJson(fileChanges),\n });\n});\nconst source = producer(async (sample, locator) => Object.freeze({\n kind: \"source\" as const,\n sources: closeMachineJson(await query(sample, {\n kind: \"domain-view\",\n view: sourcesView,\n ...(locator === undefined ? {} : { locator }),\n })),\n}));\nconst execution = producer(async (sample, locator) => Object.freeze({\n kind: \"execution\" as const,\n execution: closeMachineJson(await query(sample, {\n kind: \"domain-view\",\n view: attemptObservabilityView,\n ...(locator === undefined ? {} : { locator }),\n })),\n}));\nconst timing = producer(async (sample, locator) => {\n const view = await query(sample, {\n kind: \"domain-view\",\n view: attemptObservabilityView,\n ...(locator === undefined ? {} : { locator }),\n });\n return Object.freeze({\n kind: \"timing\" as const,\n timing: closeMachineJson(view.entries.map((entry) => entry.state === \"available\"\n ? Object.freeze({ attempt: entry.attempt, state: entry.state, timing: entry.detail.timing })\n : entry)),\n });\n});\nconst standard: BuiltInMachineProducer<BuiltInMachineProductionFailed, never> = (input) => {\n switch (input.pageId) {\n case \"attempt\":\n case \"attempt-overview\":\n return attempt(input);\n case \"traces\":\n return execution(input);\n default:\n return leaderboard(input);\n }\n};\nconst producers = new Map<string, BuiltInMachineProducer<BuiltInMachineProductionFailed, never>>([\n [builtInMachineProducerIds.defaultOverview, leaderboard],\n [builtInMachineProducerIds.runMembershipOverview, leaderboard],\n [builtInMachineProducerIds.attemptOverview, attempt],\n [builtInMachineProducerIds.executionEvidence, execution],\n [builtInMachineProducerIds.timingEvidence, timing],\n [builtInMachineProducerIds.sourceEvidence, source],\n [builtInMachineProducerIds.sandboxHistory, execution],\n [builtInMachineProducerIds.standard, standard],\n [builtInMachineProducerIds.classicOverview, leaderboard],\n]);\nexport const builtInMachineRegistry: BuiltInMachineRegistry<BuiltInMachineProductionFailed, never> = Object.freeze({\n producers,\n});\nfunction producer(build: (sample: Sample, locator: import(\"../../attempt-locator.ts\").AttemptLocator | undefined) => Promise<BuiltInShowData>): BuiltInMachineProducer<BuiltInMachineProductionFailed, never> {\n return (input) => Effect.tryPromise({\n try: () => build(input.sample, input.selection.kind === \"attempt-locator\"\n ? input.selection.locator as import(\"../../attempt-locator.ts\").AttemptLocator\n : undefined),\n catch: (cause): BuiltInMachineProductionFailed => Object.freeze({\n code: \"report-built-in-machine-production-failed\" as const,\n producerId: producerIdForInput(input.pageId),\n reason: boundedReason(cause),\n }),\n });\n}\nfunction producerIdForInput(pageId: string): string {\n return `page:${pageId}`;\n}\nfunction boundedReason(cause: unknown): string {\n const value = cause instanceof Error ? cause.message : String(cause);\n return value.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || \"machine producer failed\";\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n"]}
1
+ {"version":3,"file":"machine.js","sourceRoot":"","sources":["machine.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,sDAAwL;AACxL,8EAAyF;AACzF,uDAAmE;AACnE,uEAA2E;AAC3E,uFAAoF;AACpF,wDAA4I;AAM5I,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;IACrC,MAAM,OAAO,GAAG,IAAA,2BAAgB,EAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;QAClE,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,IAAI,EAAE,UAAU,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE;KAC9H,CAAC,CAAC,CAAC;IACJ,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAA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5C,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC;SAC/B,CAAC;KACL,CAAC,CAAC;AACP,CAAC;AACD,SAAS,kBAAkB,CAAC,MAAc;IACtC,OAAO,QAAQ,MAAM,EAAE,CAAC;AAC5B,CAAC;AACD,SAAS,aAAa,CAAC,KAAc;IACjC,MAAM,KAAK,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO;QAChD,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1F,OAAO,KAAK,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,yBAAyB,CAAC;AACjH,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,KAAa;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport { attemptEvidenceView, attemptObservabilityView, experimentComparisonScope, experimentGroups, fileChangesView, query, sourcesView, type Sample, } from \"../../analysis/index.ts\";\nimport { sampleForExperimentComparisonScope } from \"../../analysis/experiment-groups.ts\";\nimport { builtInMachineProducerIds } from \"../built-in/machine.ts\";\nimport { loadBuiltInExperimentRows } from \"../built-in/analysis-values.ts\";\nimport { loadRunMembershipPageInput } from \"../built-in/run-membership-overview.ts\";\nimport { closeMachineJson, type BuiltInMachineProducer, type BuiltInMachineRegistry, type BuiltInShowData, } from \"../execution/machine.ts\";\nexport interface BuiltInMachineProductionFailed {\n readonly code: \"report-built-in-machine-production-failed\";\n readonly producerId: string;\n readonly reason: string;\n}\nconst groups = producer(async (sample) => {\n const entries = experimentGroups(sample).map((entry) => Object.freeze({\n group: entry.group,\n members: entry.members,\n href: `/group/${entry.group.kind}/${entry.group.kind === \"named\" ? entry.group.groupId : String(entry.group.experimentId)}`,\n }));\n return Object.freeze({ kind: \"groups\" as const, groups: closeMachineJson(entries) });\n});\nconst experimentGroup = producer(async (sample, _locator, route) => {\n const match = /^\\/group\\/(named|singleton)\\/([^/]+)$/u.exec(route);\n if (match === null)\n throw new TypeError(\"Experiment Group route is invalid\");\n const kind = match[1]!;\n const key = decodeURIComponent(match[2]!);\n const summary = experimentGroups(sample).find((entry) => entry.group.kind === kind && (kind === \"named\"\n ? entry.group.kind === \"named\" && entry.group.groupId === key\n : entry.group.kind === \"singleton\" && String(entry.group.experimentId) === key));\n if (summary === undefined) {\n throw Object.freeze({ code: \"report-group-not-in-sample\" as const, group: `${kind}/${key}` });\n }\n const scope = experimentComparisonScope(sample, summary.group);\n const comparison = scope.comparison.state === \"comparable\"\n ? Object.freeze({\n state: \"comparable\" as const,\n members: scope.comparison.members,\n rows: await loadBuiltInExperimentRows(sampleForExperimentComparisonScope(scope)),\n })\n : scope.comparison;\n return Object.freeze({\n kind: \"experiment-group\" as const,\n group: closeMachineJson(summary.group),\n comparison: closeMachineJson(comparison),\n });\n});\nconst runMembership = producer(async (sample) => {\n const result = await loadRunMembershipPageInput(sample);\n return Object.freeze({\n kind: \"run-membership\" as const,\n summary: closeMachineJson(result.summary),\n members: closeMachineJson(result.members),\n errors: closeMachineJson(result.errors),\n evidence: closeMachineJson(result.evidence),\n });\n});\nconst attempt = producer(async (sample, locator) => {\n const [evidence, observability, fileChanges] = await Promise.all([\n query(sample, { kind: \"domain-view\", view: attemptEvidenceView, ...(locator === undefined ? {} : { locator }) }),\n query(sample, { kind: \"domain-view\", view: attemptObservabilityView, ...(locator === undefined ? {} : { locator }) }),\n query(sample, { kind: \"domain-view\", view: fileChangesView, ...(locator === undefined ? {} : { locator }) }),\n ]);\n return Object.freeze({\n kind: \"attempt\" as const,\n evidence: closeMachineJson(evidence),\n observability: closeMachineJson(observability),\n fileChanges: closeMachineJson(fileChanges),\n });\n});\nconst source = producer(async (sample, locator) => Object.freeze({\n kind: \"source\" as const,\n sources: closeMachineJson(await query(sample, {\n kind: \"domain-view\",\n view: sourcesView,\n ...(locator === undefined ? {} : { locator }),\n })),\n}));\nconst execution = producer(async (sample, locator) => Object.freeze({\n kind: \"execution\" as const,\n execution: closeMachineJson(await query(sample, {\n kind: \"domain-view\",\n view: attemptObservabilityView,\n ...(locator === undefined ? {} : { locator }),\n })),\n}));\nconst timing = producer(async (sample, locator) => {\n const view = await query(sample, {\n kind: \"domain-view\",\n view: attemptObservabilityView,\n ...(locator === undefined ? {} : { locator }),\n });\n return Object.freeze({\n kind: \"timing\" as const,\n timing: closeMachineJson(view.entries.map((entry) => entry.state === \"available\"\n ? Object.freeze({ attempt: entry.attempt, state: entry.state, timing: entry.detail.timing })\n : entry)),\n });\n});\nconst standard: BuiltInMachineProducer<BuiltInMachineProductionFailed, never> = (input) => {\n switch (input.pageId) {\n case \"attempt\":\n case \"attempt-overview\":\n return attempt(input);\n case \"group-named\":\n case \"group-singleton\":\n return experimentGroup(input);\n default:\n return groups(input);\n }\n};\nconst producers = new Map<string, BuiltInMachineProducer<BuiltInMachineProductionFailed, never>>([\n [builtInMachineProducerIds.runMembershipOverview, runMembership],\n [builtInMachineProducerIds.attemptOverview, attempt],\n [builtInMachineProducerIds.executionEvidence, execution],\n [builtInMachineProducerIds.timingEvidence, timing],\n [builtInMachineProducerIds.sourceEvidence, source],\n [builtInMachineProducerIds.sandboxHistory, execution],\n [builtInMachineProducerIds.standard, standard],\n]);\nexport const builtInMachineRegistry: BuiltInMachineRegistry<BuiltInMachineProductionFailed, never> = Object.freeze({\n producers,\n});\nfunction producer(build: (sample: Sample, locator: import(\"../../attempt-locator.ts\").AttemptLocator | undefined, route: string) => Promise<BuiltInShowData>): BuiltInMachineProducer<BuiltInMachineProductionFailed, never> {\n return (input) => Effect.tryPromise({\n try: () => build(input.sample, input.selection.kind === \"attempt-locator\"\n ? input.selection.locator as import(\"../../attempt-locator.ts\").AttemptLocator\n : undefined, input.route),\n catch: (cause): BuiltInMachineProductionFailed => Object.freeze({\n code: \"report-built-in-machine-production-failed\" as const,\n producerId: producerIdForInput(input.pageId),\n reason: boundedReason(cause),\n }),\n });\n}\nfunction producerIdForInput(pageId: string): string {\n return `page:${pageId}`;\n}\nfunction boundedReason(cause: unknown): string {\n const value = cause instanceof Error ? cause.message\n : typeof cause === \"object\" && cause !== null ? JSON.stringify(cause) : String(cause);\n return value.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || \"machine producer failed\";\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n"]}
@@ -11,7 +11,7 @@ exports.REPORT_LOCALE_RUNTIME = `(() => {
11
11
  "use strict";
12
12
  const locales = ["en", "zh-CN"];
13
13
  const views = Array.from(document.querySelectorAll("[data-niceeval-locale]"));
14
- const buttons = Array.from(document.querySelectorAll("[data-niceeval-locale-button]"));
14
+ const selectors = Array.from(document.querySelectorAll("[data-niceeval-locale-select]"));
15
15
  if (views.length === 0) return;
16
16
  const stored = () => {
17
17
  try {
@@ -26,19 +26,20 @@ exports.REPORT_LOCALE_RUNTIME = `(() => {
26
26
  const select = (locale, persist) => {
27
27
  if (!locales.includes(locale)) return;
28
28
  for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;
29
- for (const button of buttons) {
30
- const active = button.dataset.niceevalLocaleButton === locale;
31
- button.setAttribute("aria-pressed", String(active));
32
- button.classList.toggle("is-active", active);
33
- }
29
+ for (const selector of selectors) selector.value = locale;
34
30
  document.documentElement.lang = locale;
35
31
  const title = document.documentElement.getAttribute("data-niceeval-title-" + locale.toLowerCase());
36
32
  if (title !== null) document.title = title;
37
33
  if (!persist) return;
38
34
  try { localStorage.setItem("niceeval:view:locale", locale); } catch {}
39
35
  };
40
- for (const button of buttons) {
41
- button.addEventListener("click", () => select(button.dataset.niceevalLocaleButton, true));
36
+ for (const selector of selectors) {
37
+ selector.addEventListener("change", () => select(selector.value, true));
38
+ }
39
+ for (const experiment of document.querySelectorAll("[data-niceeval-experiment-select]")) {
40
+ experiment.addEventListener("change", () => {
41
+ if (experiment.value) location.href = experiment.value;
42
+ });
42
43
  }
43
44
  select(stored() || preferred(), false);
44
45
  })();`;
@@ -1 +1 @@
1
- {"version":3,"file":"site-runtime.js","sourceRoot":"","sources":["site-runtime.ts"],"names":[],"mappings":";;;AAmFA,8CAEC;AArFD;;;;GAIG;AACU,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkC/B,CAAC;AACM,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyC/B,CAAC;AACP,8EAA8E;AAC9E,SAAgB,iBAAiB,CAAC,QAAgB;IAC9C,OAAO,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,6BAAqB,KAAK,6BAAqB,IAAI,CAAC;AACzF,CAAC","sourcesContent":["/**\n * Host-owned behavior shared byte-for-byte by live view and static export.\n * Missing refresh endpoints and locked-down storage are normal static-site\n * conditions, so every boundary fails quietly without altering report data.\n */\nexport const REPORT_LOCALE_RUNTIME = `(() => {\n \"use strict\";\n const locales = [\"en\", \"zh-CN\"];\n const views = Array.from(document.querySelectorAll(\"[data-niceeval-locale]\"));\n const buttons = Array.from(document.querySelectorAll(\"[data-niceeval-locale-button]\"));\n if (views.length === 0) return;\n const stored = () => {\n try {\n const value = localStorage.getItem(\"niceeval:view:locale\");\n return locales.includes(value) ? value : undefined;\n } catch { return undefined; }\n };\n const preferred = () => {\n const values = typeof navigator === \"undefined\" ? [] : [navigator.language, ...(navigator.languages || [])];\n return values.some(value => String(value).toLowerCase().startsWith(\"zh\")) ? \"zh-CN\" : \"en\";\n };\n const select = (locale, persist) => {\n if (!locales.includes(locale)) return;\n for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;\n for (const button of buttons) {\n const active = button.dataset.niceevalLocaleButton === locale;\n button.setAttribute(\"aria-pressed\", String(active));\n button.classList.toggle(\"is-active\", active);\n }\n document.documentElement.lang = locale;\n const title = document.documentElement.getAttribute(\"data-niceeval-title-\" + locale.toLowerCase());\n if (title !== null) document.title = title;\n if (!persist) return;\n try { localStorage.setItem(\"niceeval:view:locale\", locale); } catch {}\n };\n for (const button of buttons) {\n button.addEventListener(\"click\", () => select(button.dataset.niceevalLocaleButton, true));\n }\n select(stored() || preferred(), false);\n})();`;\nexport const REPORT_RELOAD_RUNTIME = `(() => {\n \"use strict\";\n if (location.protocol !== \"http:\" && location.protocol !== \"https:\") return;\n const source = document.currentScript && document.currentScript.src;\n if (!source) return;\n const endpoint = new URL(\"refresh\", source).toString();\n let observed;\n let live;\n const probe = async () => {\n try {\n // The runtime file exists in both view and static output with identical\n // bytes. Only the live Host adds its revision header, so a generic\n // static server stops here without ever requesting a missing endpoint\n // (and therefore without producing a browser 404 console error).\n if (live === undefined) {\n const runtime = await fetch(source, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n });\n live = runtime.ok && runtime.headers.has(\"x-niceeval-report-revision\");\n }\n if (!live) return;\n const response = await fetch(endpoint, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n headers: { \"x-niceeval-refresh-probe\": \"1\" },\n });\n if (response.status !== 204) return;\n const identity = response.headers.get(\"x-niceeval-report-content-hash\");\n if (response.headers.get(\"x-niceeval-view-stale\") === \"1\" ||\n (observed !== undefined && identity !== null && identity !== observed)) {\n location.reload();\n return;\n }\n if (identity !== null) observed = identity;\n setTimeout(probe, 1000);\n } catch {\n // Static, offline, and stopped view endpoints quietly disable reload.\n }\n };\n setTimeout(probe, 1000);\n})();`;\n/** Package enhancer first, then shell locale and optional reload behavior. */\nexport function reportSiteRuntime(enhancer: string): string {\n return `${enhancer.trimEnd()}\\n${REPORT_LOCALE_RUNTIME}\\n${REPORT_RELOAD_RUNTIME}\\n`;\n}\n"]}
1
+ {"version":3,"file":"site-runtime.js","sourceRoot":"","sources":["site-runtime.ts"],"names":[],"mappings":";;;AAoFA,8CAEC;AAtFD;;;;GAIG;AACU,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmC/B,CAAC;AACM,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyC/B,CAAC;AACP,8EAA8E;AAC9E,SAAgB,iBAAiB,CAAC,QAAgB;IAC9C,OAAO,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,6BAAqB,KAAK,6BAAqB,IAAI,CAAC;AACzF,CAAC","sourcesContent":["/**\n * Host-owned behavior shared byte-for-byte by live view and static export.\n * Missing refresh endpoints and locked-down storage are normal static-site\n * conditions, so every boundary fails quietly without altering report data.\n */\nexport const REPORT_LOCALE_RUNTIME = `(() => {\n \"use strict\";\n const locales = [\"en\", \"zh-CN\"];\n const views = Array.from(document.querySelectorAll(\"[data-niceeval-locale]\"));\n const selectors = Array.from(document.querySelectorAll(\"[data-niceeval-locale-select]\"));\n if (views.length === 0) return;\n const stored = () => {\n try {\n const value = localStorage.getItem(\"niceeval:view:locale\");\n return locales.includes(value) ? value : undefined;\n } catch { return undefined; }\n };\n const preferred = () => {\n const values = typeof navigator === \"undefined\" ? [] : [navigator.language, ...(navigator.languages || [])];\n return values.some(value => String(value).toLowerCase().startsWith(\"zh\")) ? \"zh-CN\" : \"en\";\n };\n const select = (locale, persist) => {\n if (!locales.includes(locale)) return;\n for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;\n for (const selector of selectors) selector.value = locale;\n document.documentElement.lang = locale;\n const title = document.documentElement.getAttribute(\"data-niceeval-title-\" + locale.toLowerCase());\n if (title !== null) document.title = title;\n if (!persist) return;\n try { localStorage.setItem(\"niceeval:view:locale\", locale); } catch {}\n };\n for (const selector of selectors) {\n selector.addEventListener(\"change\", () => select(selector.value, true));\n }\n for (const experiment of document.querySelectorAll(\"[data-niceeval-experiment-select]\")) {\n experiment.addEventListener(\"change\", () => {\n if (experiment.value) location.href = experiment.value;\n });\n }\n select(stored() || preferred(), false);\n})();`;\nexport const REPORT_RELOAD_RUNTIME = `(() => {\n \"use strict\";\n if (location.protocol !== \"http:\" && location.protocol !== \"https:\") return;\n const source = document.currentScript && document.currentScript.src;\n if (!source) return;\n const endpoint = new URL(\"refresh\", source).toString();\n let observed;\n let live;\n const probe = async () => {\n try {\n // The runtime file exists in both view and static output with identical\n // bytes. Only the live Host adds its revision header, so a generic\n // static server stops here without ever requesting a missing endpoint\n // (and therefore without producing a browser 404 console error).\n if (live === undefined) {\n const runtime = await fetch(source, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n });\n live = runtime.ok && runtime.headers.has(\"x-niceeval-report-revision\");\n }\n if (!live) return;\n const response = await fetch(endpoint, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n headers: { \"x-niceeval-refresh-probe\": \"1\" },\n });\n if (response.status !== 204) return;\n const identity = response.headers.get(\"x-niceeval-report-content-hash\");\n if (response.headers.get(\"x-niceeval-view-stale\") === \"1\" ||\n (observed !== undefined && identity !== null && identity !== observed)) {\n location.reload();\n return;\n }\n if (identity !== null) observed = identity;\n setTimeout(probe, 1000);\n } catch {\n // Static, offline, and stopped view endpoints quietly disable reload.\n }\n };\n setTimeout(probe, 1000);\n})();`;\n/** Package enhancer first, then shell locale and optional reload behavior. */\nexport function reportSiteRuntime(enhancer: string): string {\n return `${enhancer.trimEnd()}\\n${REPORT_LOCALE_RUNTIME}\\n${REPORT_RELOAD_RUNTIME}\\n`;\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Missing refresh endpoints and locked-down storage are normal static-site
4
4
  * conditions, so every boundary fails quietly without altering report data.
5
5
  */
6
- export declare const REPORT_LOCALE_RUNTIME = "(() => {\n \"use strict\";\n const locales = [\"en\", \"zh-CN\"];\n const views = Array.from(document.querySelectorAll(\"[data-niceeval-locale]\"));\n const buttons = Array.from(document.querySelectorAll(\"[data-niceeval-locale-button]\"));\n if (views.length === 0) return;\n const stored = () => {\n try {\n const value = localStorage.getItem(\"niceeval:view:locale\");\n return locales.includes(value) ? value : undefined;\n } catch { return undefined; }\n };\n const preferred = () => {\n const values = typeof navigator === \"undefined\" ? [] : [navigator.language, ...(navigator.languages || [])];\n return values.some(value => String(value).toLowerCase().startsWith(\"zh\")) ? \"zh-CN\" : \"en\";\n };\n const select = (locale, persist) => {\n if (!locales.includes(locale)) return;\n for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;\n for (const button of buttons) {\n const active = button.dataset.niceevalLocaleButton === locale;\n button.setAttribute(\"aria-pressed\", String(active));\n button.classList.toggle(\"is-active\", active);\n }\n document.documentElement.lang = locale;\n const title = document.documentElement.getAttribute(\"data-niceeval-title-\" + locale.toLowerCase());\n if (title !== null) document.title = title;\n if (!persist) return;\n try { localStorage.setItem(\"niceeval:view:locale\", locale); } catch {}\n };\n for (const button of buttons) {\n button.addEventListener(\"click\", () => select(button.dataset.niceevalLocaleButton, true));\n }\n select(stored() || preferred(), false);\n})();";
6
+ export declare const REPORT_LOCALE_RUNTIME = "(() => {\n \"use strict\";\n const locales = [\"en\", \"zh-CN\"];\n const views = Array.from(document.querySelectorAll(\"[data-niceeval-locale]\"));\n const selectors = Array.from(document.querySelectorAll(\"[data-niceeval-locale-select]\"));\n if (views.length === 0) return;\n const stored = () => {\n try {\n const value = localStorage.getItem(\"niceeval:view:locale\");\n return locales.includes(value) ? value : undefined;\n } catch { return undefined; }\n };\n const preferred = () => {\n const values = typeof navigator === \"undefined\" ? [] : [navigator.language, ...(navigator.languages || [])];\n return values.some(value => String(value).toLowerCase().startsWith(\"zh\")) ? \"zh-CN\" : \"en\";\n };\n const select = (locale, persist) => {\n if (!locales.includes(locale)) return;\n for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;\n for (const selector of selectors) selector.value = locale;\n document.documentElement.lang = locale;\n const title = document.documentElement.getAttribute(\"data-niceeval-title-\" + locale.toLowerCase());\n if (title !== null) document.title = title;\n if (!persist) return;\n try { localStorage.setItem(\"niceeval:view:locale\", locale); } catch {}\n };\n for (const selector of selectors) {\n selector.addEventListener(\"change\", () => select(selector.value, true));\n }\n for (const experiment of document.querySelectorAll(\"[data-niceeval-experiment-select]\")) {\n experiment.addEventListener(\"change\", () => {\n if (experiment.value) location.href = experiment.value;\n });\n }\n select(stored() || preferred(), false);\n})();";
7
7
  export declare const REPORT_RELOAD_RUNTIME = "(() => {\n \"use strict\";\n if (location.protocol !== \"http:\" && location.protocol !== \"https:\") return;\n const source = document.currentScript && document.currentScript.src;\n if (!source) return;\n const endpoint = new URL(\"refresh\", source).toString();\n let observed;\n let live;\n const probe = async () => {\n try {\n // The runtime file exists in both view and static output with identical\n // bytes. Only the live Host adds its revision header, so a generic\n // static server stops here without ever requesting a missing endpoint\n // (and therefore without producing a browser 404 console error).\n if (live === undefined) {\n const runtime = await fetch(source, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n });\n live = runtime.ok && runtime.headers.has(\"x-niceeval-report-revision\");\n }\n if (!live) return;\n const response = await fetch(endpoint, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n headers: { \"x-niceeval-refresh-probe\": \"1\" },\n });\n if (response.status !== 204) return;\n const identity = response.headers.get(\"x-niceeval-report-content-hash\");\n if (response.headers.get(\"x-niceeval-view-stale\") === \"1\" ||\n (observed !== undefined && identity !== null && identity !== observed)) {\n location.reload();\n return;\n }\n if (identity !== null) observed = identity;\n setTimeout(probe, 1000);\n } catch {\n // Static, offline, and stopped view endpoints quietly disable reload.\n }\n };\n setTimeout(probe, 1000);\n})();";
8
8
  /** Package enhancer first, then shell locale and optional reload behavior. */
9
9
  export declare function reportSiteRuntime(enhancer: string): string;
@@ -3,7 +3,7 @@
3
3
  * Missing refresh endpoints and locked-down storage are normal static-site
4
4
  * conditions, so every boundary fails quietly without altering report data.
5
5
  */
6
- export declare const REPORT_LOCALE_RUNTIME = "(() => {\n \"use strict\";\n const locales = [\"en\", \"zh-CN\"];\n const views = Array.from(document.querySelectorAll(\"[data-niceeval-locale]\"));\n const buttons = Array.from(document.querySelectorAll(\"[data-niceeval-locale-button]\"));\n if (views.length === 0) return;\n const stored = () => {\n try {\n const value = localStorage.getItem(\"niceeval:view:locale\");\n return locales.includes(value) ? value : undefined;\n } catch { return undefined; }\n };\n const preferred = () => {\n const values = typeof navigator === \"undefined\" ? [] : [navigator.language, ...(navigator.languages || [])];\n return values.some(value => String(value).toLowerCase().startsWith(\"zh\")) ? \"zh-CN\" : \"en\";\n };\n const select = (locale, persist) => {\n if (!locales.includes(locale)) return;\n for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;\n for (const button of buttons) {\n const active = button.dataset.niceevalLocaleButton === locale;\n button.setAttribute(\"aria-pressed\", String(active));\n button.classList.toggle(\"is-active\", active);\n }\n document.documentElement.lang = locale;\n const title = document.documentElement.getAttribute(\"data-niceeval-title-\" + locale.toLowerCase());\n if (title !== null) document.title = title;\n if (!persist) return;\n try { localStorage.setItem(\"niceeval:view:locale\", locale); } catch {}\n };\n for (const button of buttons) {\n button.addEventListener(\"click\", () => select(button.dataset.niceevalLocaleButton, true));\n }\n select(stored() || preferred(), false);\n})();";
6
+ export declare const REPORT_LOCALE_RUNTIME = "(() => {\n \"use strict\";\n const locales = [\"en\", \"zh-CN\"];\n const views = Array.from(document.querySelectorAll(\"[data-niceeval-locale]\"));\n const selectors = Array.from(document.querySelectorAll(\"[data-niceeval-locale-select]\"));\n if (views.length === 0) return;\n const stored = () => {\n try {\n const value = localStorage.getItem(\"niceeval:view:locale\");\n return locales.includes(value) ? value : undefined;\n } catch { return undefined; }\n };\n const preferred = () => {\n const values = typeof navigator === \"undefined\" ? [] : [navigator.language, ...(navigator.languages || [])];\n return values.some(value => String(value).toLowerCase().startsWith(\"zh\")) ? \"zh-CN\" : \"en\";\n };\n const select = (locale, persist) => {\n if (!locales.includes(locale)) return;\n for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;\n for (const selector of selectors) selector.value = locale;\n document.documentElement.lang = locale;\n const title = document.documentElement.getAttribute(\"data-niceeval-title-\" + locale.toLowerCase());\n if (title !== null) document.title = title;\n if (!persist) return;\n try { localStorage.setItem(\"niceeval:view:locale\", locale); } catch {}\n };\n for (const selector of selectors) {\n selector.addEventListener(\"change\", () => select(selector.value, true));\n }\n for (const experiment of document.querySelectorAll(\"[data-niceeval-experiment-select]\")) {\n experiment.addEventListener(\"change\", () => {\n if (experiment.value) location.href = experiment.value;\n });\n }\n select(stored() || preferred(), false);\n})();";
7
7
  export declare const REPORT_RELOAD_RUNTIME = "(() => {\n \"use strict\";\n if (location.protocol !== \"http:\" && location.protocol !== \"https:\") return;\n const source = document.currentScript && document.currentScript.src;\n if (!source) return;\n const endpoint = new URL(\"refresh\", source).toString();\n let observed;\n let live;\n const probe = async () => {\n try {\n // The runtime file exists in both view and static output with identical\n // bytes. Only the live Host adds its revision header, so a generic\n // static server stops here without ever requesting a missing endpoint\n // (and therefore without producing a browser 404 console error).\n if (live === undefined) {\n const runtime = await fetch(source, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n });\n live = runtime.ok && runtime.headers.has(\"x-niceeval-report-revision\");\n }\n if (!live) return;\n const response = await fetch(endpoint, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n headers: { \"x-niceeval-refresh-probe\": \"1\" },\n });\n if (response.status !== 204) return;\n const identity = response.headers.get(\"x-niceeval-report-content-hash\");\n if (response.headers.get(\"x-niceeval-view-stale\") === \"1\" ||\n (observed !== undefined && identity !== null && identity !== observed)) {\n location.reload();\n return;\n }\n if (identity !== null) observed = identity;\n setTimeout(probe, 1000);\n } catch {\n // Static, offline, and stopped view endpoints quietly disable reload.\n }\n };\n setTimeout(probe, 1000);\n})();";
8
8
  /** Package enhancer first, then shell locale and optional reload behavior. */
9
9
  export declare function reportSiteRuntime(enhancer: string): string;
@@ -3,7 +3,7 @@
3
3
  * Missing refresh endpoints and locked-down storage are normal static-site
4
4
  * conditions, so every boundary fails quietly without altering report data.
5
5
  */
6
- export declare const REPORT_LOCALE_RUNTIME = "(() => {\n \"use strict\";\n const locales = [\"en\", \"zh-CN\"];\n const views = Array.from(document.querySelectorAll(\"[data-niceeval-locale]\"));\n const buttons = Array.from(document.querySelectorAll(\"[data-niceeval-locale-button]\"));\n if (views.length === 0) return;\n const stored = () => {\n try {\n const value = localStorage.getItem(\"niceeval:view:locale\");\n return locales.includes(value) ? value : undefined;\n } catch { return undefined; }\n };\n const preferred = () => {\n const values = typeof navigator === \"undefined\" ? [] : [navigator.language, ...(navigator.languages || [])];\n return values.some(value => String(value).toLowerCase().startsWith(\"zh\")) ? \"zh-CN\" : \"en\";\n };\n const select = (locale, persist) => {\n if (!locales.includes(locale)) return;\n for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;\n for (const button of buttons) {\n const active = button.dataset.niceevalLocaleButton === locale;\n button.setAttribute(\"aria-pressed\", String(active));\n button.classList.toggle(\"is-active\", active);\n }\n document.documentElement.lang = locale;\n const title = document.documentElement.getAttribute(\"data-niceeval-title-\" + locale.toLowerCase());\n if (title !== null) document.title = title;\n if (!persist) return;\n try { localStorage.setItem(\"niceeval:view:locale\", locale); } catch {}\n };\n for (const button of buttons) {\n button.addEventListener(\"click\", () => select(button.dataset.niceevalLocaleButton, true));\n }\n select(stored() || preferred(), false);\n})();";
6
+ export declare const REPORT_LOCALE_RUNTIME = "(() => {\n \"use strict\";\n const locales = [\"en\", \"zh-CN\"];\n const views = Array.from(document.querySelectorAll(\"[data-niceeval-locale]\"));\n const selectors = Array.from(document.querySelectorAll(\"[data-niceeval-locale-select]\"));\n if (views.length === 0) return;\n const stored = () => {\n try {\n const value = localStorage.getItem(\"niceeval:view:locale\");\n return locales.includes(value) ? value : undefined;\n } catch { return undefined; }\n };\n const preferred = () => {\n const values = typeof navigator === \"undefined\" ? [] : [navigator.language, ...(navigator.languages || [])];\n return values.some(value => String(value).toLowerCase().startsWith(\"zh\")) ? \"zh-CN\" : \"en\";\n };\n const select = (locale, persist) => {\n if (!locales.includes(locale)) return;\n for (const view of views) view.hidden = view.dataset.niceevalLocale !== locale;\n for (const selector of selectors) selector.value = locale;\n document.documentElement.lang = locale;\n const title = document.documentElement.getAttribute(\"data-niceeval-title-\" + locale.toLowerCase());\n if (title !== null) document.title = title;\n if (!persist) return;\n try { localStorage.setItem(\"niceeval:view:locale\", locale); } catch {}\n };\n for (const selector of selectors) {\n selector.addEventListener(\"change\", () => select(selector.value, true));\n }\n for (const experiment of document.querySelectorAll(\"[data-niceeval-experiment-select]\")) {\n experiment.addEventListener(\"change\", () => {\n if (experiment.value) location.href = experiment.value;\n });\n }\n select(stored() || preferred(), false);\n})();";
7
7
  export declare const REPORT_RELOAD_RUNTIME = "(() => {\n \"use strict\";\n if (location.protocol !== \"http:\" && location.protocol !== \"https:\") return;\n const source = document.currentScript && document.currentScript.src;\n if (!source) return;\n const endpoint = new URL(\"refresh\", source).toString();\n let observed;\n let live;\n const probe = async () => {\n try {\n // The runtime file exists in both view and static output with identical\n // bytes. Only the live Host adds its revision header, so a generic\n // static server stops here without ever requesting a missing endpoint\n // (and therefore without producing a browser 404 console error).\n if (live === undefined) {\n const runtime = await fetch(source, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n });\n live = runtime.ok && runtime.headers.has(\"x-niceeval-report-revision\");\n }\n if (!live) return;\n const response = await fetch(endpoint, {\n cache: \"no-store\",\n credentials: \"same-origin\",\n headers: { \"x-niceeval-refresh-probe\": \"1\" },\n });\n if (response.status !== 204) return;\n const identity = response.headers.get(\"x-niceeval-report-content-hash\");\n if (response.headers.get(\"x-niceeval-view-stale\") === \"1\" ||\n (observed !== undefined && identity !== null && identity !== observed)) {\n location.reload();\n return;\n }\n if (identity !== null) observed = identity;\n setTimeout(probe, 1000);\n } catch {\n // Static, offline, and stopped view endpoints quietly disable reload.\n }\n };\n setTimeout(probe, 1000);\n})();";
8
8
  /** Package enhancer first, then shell locale and optional reload behavior. */
9
9
  export declare function reportSiteRuntime(enhancer: string): string;