niceeval 0.13.3 → 0.13.4-canary.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (487) hide show
  1. package/INDEX.md +5 -5
  2. package/dist/agents/index.cjs +2 -2
  3. package/dist/agents/index.cjs.map +1 -1
  4. package/dist/agents/project.json +6 -0
  5. package/dist/agents/streaming.cjs.map +1 -1
  6. package/dist/agents/types.cjs.map +1 -1
  7. package/dist/agents/types.d.cts +1 -1
  8. package/dist/agents/types.d.mts +1 -1
  9. package/dist/agents/types.d.ts +1 -1
  10. package/dist/analysis/bindings.d.cts +8 -8
  11. package/dist/analysis/bindings.d.mts +8 -8
  12. package/dist/analysis/bindings.d.ts +8 -8
  13. package/dist/analysis/contracts.cjs.map +1 -1
  14. package/dist/analysis/contracts.d.cts +8 -19
  15. package/dist/analysis/contracts.d.mts +8 -19
  16. package/dist/analysis/contracts.d.ts +8 -19
  17. package/dist/analysis/experiment-groups.cjs +7 -14
  18. package/dist/analysis/experiment-groups.cjs.map +1 -1
  19. package/dist/analysis/index.cjs.map +1 -1
  20. package/dist/analysis/index.d.cts +1 -1
  21. package/dist/analysis/index.d.mts +1 -1
  22. package/dist/analysis/index.d.ts +1 -1
  23. package/dist/cli/application.cjs +4 -13
  24. package/dist/cli/application.cjs.map +1 -1
  25. package/dist/cli/application.d.cts +62 -59
  26. package/dist/cli/application.d.mts +62 -59
  27. package/dist/cli/application.d.ts +62 -59
  28. package/dist/cli/application.js +6 -12
  29. package/dist/cli/bootstrap.cjs +28 -2
  30. package/dist/cli/bootstrap.cjs.map +1 -1
  31. package/dist/cli/contribution.cjs +185 -0
  32. package/dist/cli/contribution.cjs.map +1 -0
  33. package/dist/cli/contribution.d.cts +55 -0
  34. package/dist/cli/contribution.d.mts +55 -0
  35. package/dist/cli/contribution.d.ts +55 -0
  36. package/dist/cli/contribution.js +20 -0
  37. package/dist/cli/contribution.js.map +1 -0
  38. package/dist/cli/node-application.cjs +119 -87
  39. package/dist/cli/node-application.cjs.map +1 -1
  40. package/dist/cli/node-application.d.cts +2 -8
  41. package/dist/cli/node-application.d.mts +2 -8
  42. package/dist/cli/node-application.d.ts +2 -8
  43. package/dist/cli/node-application.js +12 -22
  44. package/dist/cli/program.cjs +87 -2756
  45. package/dist/cli/program.cjs.map +1 -1
  46. package/dist/cli/program.d.cts +11 -332
  47. package/dist/cli/program.d.mts +11 -332
  48. package/dist/cli/program.d.ts +11 -332
  49. package/dist/cli/program.js +4 -28
  50. package/dist/cli.cjs +0 -3
  51. package/dist/cli.cjs.map +1 -1
  52. package/dist/cli.d.cts +0 -1
  53. package/dist/cli.d.mts +0 -1
  54. package/dist/cli.d.ts +0 -1
  55. package/dist/cli.js +6 -14
  56. package/dist/define.cjs +1 -1
  57. package/dist/define.cjs.map +1 -1
  58. package/dist/docker/cache-administration.cjs +8 -0
  59. package/dist/docker/cache-administration.cjs.map +1 -0
  60. package/dist/docker/cache-administration.d.cts +33 -0
  61. package/dist/docker/cache-administration.d.mts +33 -0
  62. package/dist/docker/cache-administration.d.ts +33 -0
  63. package/dist/docker/cache-administration.js +6 -0
  64. package/dist/docker/cache-administration.js.map +1 -0
  65. package/dist/docker/cache-live.cjs +27 -0
  66. package/dist/docker/cache-live.cjs.map +1 -0
  67. package/dist/docker/cache-live.d.cts +3 -0
  68. package/dist/docker/cache-live.d.mts +3 -0
  69. package/dist/docker/cache-live.d.ts +3 -0
  70. package/dist/docker/cache-live.js +6 -0
  71. package/dist/docker/cache-live.js.map +1 -0
  72. package/dist/docker/cli/contribution.cjs +223 -0
  73. package/dist/docker/cli/contribution.cjs.map +1 -0
  74. package/dist/docker/cli/contribution.d.cts +48 -0
  75. package/dist/docker/cli/contribution.d.mts +48 -0
  76. package/dist/docker/cli/contribution.d.ts +48 -0
  77. package/dist/docker/cli/contribution.js +8 -0
  78. package/dist/docker/cli/contribution.js.map +1 -0
  79. package/dist/eval/cli/contribution.cjs +62 -0
  80. package/dist/eval/cli/contribution.cjs.map +1 -0
  81. package/dist/eval/cli/contribution.d.cts +21 -0
  82. package/dist/eval/cli/contribution.d.mts +21 -0
  83. package/dist/eval/cli/contribution.d.ts +21 -0
  84. package/dist/eval/cli/contribution.js +8 -0
  85. package/dist/eval/cli/contribution.js.map +1 -0
  86. package/dist/eval/host/index.cjs +23 -0
  87. package/dist/eval/host/index.cjs.map +1 -0
  88. package/dist/eval/host/index.d.cts +27 -0
  89. package/dist/eval/host/index.d.mts +27 -0
  90. package/dist/eval/host/index.d.ts +27 -0
  91. package/dist/eval/host/index.js +8 -0
  92. package/dist/eval/host/index.js.map +1 -0
  93. package/dist/eval/host/index.mjs +8 -0
  94. package/dist/eval/host/index.mjs.map +1 -0
  95. package/dist/experiment/host/cli/contribution.cjs +835 -0
  96. package/dist/experiment/host/cli/contribution.cjs.map +1 -0
  97. package/dist/experiment/host/cli/contribution.d.cts +329 -0
  98. package/dist/experiment/host/cli/contribution.d.mts +329 -0
  99. package/dist/experiment/host/cli/contribution.d.ts +329 -0
  100. package/dist/experiment/host/cli/contribution.js +22 -0
  101. package/dist/experiment/host/cli/contribution.js.map +1 -0
  102. package/dist/experiment/host/cli/index.cjs +9 -0
  103. package/dist/experiment/host/cli/index.cjs.map +1 -0
  104. package/dist/experiment/host/cli/index.d.cts +2 -0
  105. package/dist/experiment/host/cli/index.d.mts +2 -0
  106. package/dist/experiment/host/cli/index.d.ts +2 -0
  107. package/dist/experiment/host/cli/index.js +10 -0
  108. package/dist/experiment/host/cli/index.js.map +1 -0
  109. package/dist/experiment/host/cli/terminal.cjs +15 -0
  110. package/dist/experiment/host/cli/terminal.cjs.map +1 -0
  111. package/dist/experiment/host/cli/terminal.d.cts +14 -0
  112. package/dist/experiment/host/cli/terminal.d.mts +14 -0
  113. package/dist/experiment/host/cli/terminal.d.ts +14 -0
  114. package/dist/experiment/host/cli/terminal.js +8 -0
  115. package/dist/experiment/host/cli/terminal.js.map +1 -0
  116. package/dist/experiment/host/index.cjs +35 -58
  117. package/dist/experiment/host/index.cjs.map +1 -1
  118. package/dist/experiment/host/index.d.cts +5 -79
  119. package/dist/experiment/host/index.d.mts +5 -79
  120. package/dist/experiment/host/index.d.ts +5 -79
  121. package/dist/experiment/host/index.js +4 -2
  122. package/dist/experiment/host/index.mjs +4 -2
  123. package/dist/experiment/host/operations.cjs +678 -0
  124. package/dist/experiment/host/operations.cjs.map +1 -0
  125. package/dist/experiment/host/operations.d.cts +19 -0
  126. package/dist/experiment/host/operations.d.mts +19 -0
  127. package/dist/experiment/host/operations.d.ts +19 -0
  128. package/dist/experiment/host/operations.js +24 -0
  129. package/dist/experiment/host/operations.js.map +1 -0
  130. package/dist/experiment/host/presentation.cjs +81 -0
  131. package/dist/experiment/host/presentation.cjs.map +1 -0
  132. package/dist/experiment/host/presentation.d.cts +9 -0
  133. package/dist/experiment/host/presentation.d.mts +9 -0
  134. package/dist/experiment/host/presentation.d.ts +9 -0
  135. package/dist/experiment/host/presentation.js +8 -0
  136. package/dist/experiment/host/presentation.js.map +1 -0
  137. package/dist/experiment/host/teardown.cjs +394 -0
  138. package/dist/experiment/host/teardown.cjs.map +1 -0
  139. package/dist/experiment/host/teardown.d.cts +5 -0
  140. package/dist/experiment/host/teardown.d.mts +5 -0
  141. package/dist/experiment/host/teardown.d.ts +5 -0
  142. package/dist/experiment/host/teardown.js +8 -0
  143. package/dist/experiment/host/teardown.js.map +1 -0
  144. package/dist/experiment/host/types.cjs +9 -0
  145. package/dist/experiment/host/types.cjs.map +1 -0
  146. package/dist/experiment/host/types.d.cts +423 -0
  147. package/dist/experiment/host/types.d.mts +423 -0
  148. package/dist/experiment/host/types.d.ts +423 -0
  149. package/dist/experiment/host/types.js +6 -0
  150. package/dist/experiment/host/types.js.map +1 -0
  151. package/dist/i18n/en.cjs +8 -50
  152. package/dist/i18n/en.cjs.map +1 -1
  153. package/dist/i18n/en.d.cts +2 -6
  154. package/dist/i18n/en.d.mts +2 -6
  155. package/dist/i18n/en.d.ts +2 -6
  156. package/dist/o11y/project.json +6 -0
  157. package/dist/project/cli/contribution.cjs +66 -0
  158. package/dist/project/cli/contribution.cjs.map +1 -0
  159. package/dist/project/cli/contribution.d.cts +17 -0
  160. package/dist/project/cli/contribution.d.mts +17 -0
  161. package/dist/project/cli/contribution.d.ts +17 -0
  162. package/dist/project/cli/contribution.js +8 -0
  163. package/dist/project/cli/contribution.js.map +1 -0
  164. package/dist/project/cli/index.cjs +7 -0
  165. package/dist/project/cli/index.cjs.map +1 -0
  166. package/dist/project/cli/index.d.cts +1 -0
  167. package/dist/project/cli/index.d.mts +1 -0
  168. package/dist/project/cli/index.d.ts +1 -0
  169. package/dist/project/cli/index.js +8 -0
  170. package/dist/project/cli/index.js.map +1 -0
  171. package/dist/project/host/index.cjs +11 -0
  172. package/dist/project/host/index.cjs.map +1 -0
  173. package/dist/project/host/index.d.cts +4 -0
  174. package/dist/project/host/index.d.mts +4 -0
  175. package/dist/project/host/index.d.ts +4 -0
  176. package/dist/project/host/index.js +14 -0
  177. package/dist/project/host/index.js.map +1 -0
  178. package/dist/project/host/index.mjs +14 -0
  179. package/dist/project/host/index.mjs.map +1 -0
  180. package/dist/project/host.cjs +59 -0
  181. package/dist/project/host.cjs.map +1 -0
  182. package/dist/project/host.d.cts +17 -0
  183. package/dist/project/host.d.mts +17 -0
  184. package/dist/project/host.d.ts +17 -0
  185. package/dist/project/host.js +6 -0
  186. package/dist/project/host.js.map +1 -0
  187. package/dist/project/index.cjs +11 -0
  188. package/dist/project/index.cjs.map +1 -0
  189. package/dist/project/index.d.cts +4 -0
  190. package/dist/project/index.d.mts +4 -0
  191. package/dist/project/index.d.ts +4 -0
  192. package/dist/project/index.js +14 -0
  193. package/dist/project/index.js.map +1 -0
  194. package/dist/project/node.cjs +91 -0
  195. package/dist/project/node.cjs.map +1 -0
  196. package/dist/project/node.d.cts +6 -0
  197. package/dist/project/node.d.mts +6 -0
  198. package/dist/project/node.d.ts +6 -0
  199. package/dist/project/node.js +12 -0
  200. package/dist/project/node.js.map +1 -0
  201. package/dist/project/services.cjs +17 -0
  202. package/dist/project/services.cjs.map +1 -0
  203. package/dist/project/services.d.cts +47 -0
  204. package/dist/project/services.d.mts +47 -0
  205. package/dist/project/services.d.ts +47 -0
  206. package/dist/project/services.js +12 -0
  207. package/dist/project/services.js.map +1 -0
  208. package/dist/project/templates.cjs +28 -0
  209. package/dist/project/templates.cjs.map +1 -0
  210. package/dist/project/templates.d.cts +4 -0
  211. package/dist/project/templates.d.mts +4 -0
  212. package/dist/project/templates.d.ts +4 -0
  213. package/dist/project/templates.js +12 -0
  214. package/dist/project/templates.js.map +1 -0
  215. package/dist/project.json +6 -0
  216. package/dist/record/family/catalog.d.cts +10 -10
  217. package/dist/record/family/catalog.d.mts +10 -10
  218. package/dist/record/family/catalog.d.ts +10 -10
  219. package/dist/record/family/file-changes.d.cts +8 -8
  220. package/dist/record/family/file-changes.d.mts +8 -8
  221. package/dist/record/family/file-changes.d.ts +8 -8
  222. package/dist/record/host/cli/contribution.cjs +206 -0
  223. package/dist/record/host/cli/contribution.cjs.map +1 -0
  224. package/dist/record/host/cli/contribution.d.cts +32 -0
  225. package/dist/record/host/cli/contribution.d.mts +32 -0
  226. package/dist/record/host/cli/contribution.d.ts +32 -0
  227. package/dist/record/host/cli/contribution.js +10 -0
  228. package/dist/record/host/cli/contribution.js.map +1 -0
  229. package/dist/record/host/cli/index.cjs +8 -0
  230. package/dist/record/host/cli/index.cjs.map +1 -0
  231. package/dist/record/host/cli/index.d.cts +1 -0
  232. package/dist/record/host/cli/index.d.mts +1 -0
  233. package/dist/record/host/cli/index.d.ts +1 -0
  234. package/dist/record/host/cli/index.js +10 -0
  235. package/dist/record/host/cli/index.js.map +1 -0
  236. package/dist/record/host/cli/presentation.cjs +122 -0
  237. package/dist/record/host/cli/presentation.cjs.map +1 -0
  238. package/dist/record/host/cli/presentation.d.cts +7 -0
  239. package/dist/record/host/cli/presentation.d.mts +7 -0
  240. package/dist/record/host/cli/presentation.d.ts +7 -0
  241. package/dist/record/host/cli/presentation.js +12 -0
  242. package/dist/record/host/cli/presentation.js.map +1 -0
  243. package/dist/record/host/index.cjs.map +1 -1
  244. package/dist/record/host/index.d.cts +1 -1
  245. package/dist/record/host/index.d.mts +1 -1
  246. package/dist/record/host/index.d.ts +1 -1
  247. package/dist/record/host/runtime.cjs +184 -1
  248. package/dist/record/host/runtime.cjs.map +1 -1
  249. package/dist/record/host/types.cjs.map +1 -1
  250. package/dist/record/host/types.d.cts +120 -0
  251. package/dist/record/host/types.d.mts +120 -0
  252. package/dist/record/host/types.d.ts +120 -0
  253. package/dist/record/project.json +6 -0
  254. package/dist/report/assets/styles.css +80 -0
  255. package/dist/report/cli/contribution.cjs +325 -0
  256. package/dist/report/cli/contribution.cjs.map +1 -0
  257. package/dist/report/cli/contribution.d.cts +143 -0
  258. package/dist/report/cli/contribution.d.mts +143 -0
  259. package/dist/report/cli/contribution.d.ts +143 -0
  260. package/dist/report/cli/contribution.js +12 -0
  261. package/dist/report/cli/contribution.js.map +1 -0
  262. package/dist/report/client-dist/app.js +9 -9
  263. package/dist/report/components/attempt-detail/content.cjs +1 -1
  264. package/dist/report/components/attempt-detail/content.cjs.map +1 -1
  265. package/dist/report/components/entity-lists/compute.cjs +5 -0
  266. package/dist/report/components/entity-lists/compute.cjs.map +1 -1
  267. package/dist/report/components/entity-lists/compute.d.cts +2 -0
  268. package/dist/report/components/entity-lists/compute.d.mts +2 -0
  269. package/dist/report/components/entity-lists/compute.d.ts +2 -0
  270. package/dist/report/components/entity-lists/content.cjs +35 -12
  271. package/dist/report/components/entity-lists/content.cjs.map +1 -1
  272. package/dist/report/components/entity-lists/index.cjs +0 -3
  273. package/dist/report/components/entity-lists/index.cjs.map +1 -1
  274. package/dist/report/components/summaries/index.cjs +2 -4
  275. package/dist/report/components/summaries/index.cjs.map +1 -1
  276. package/dist/report/definition/cell.cjs +7 -2
  277. package/dist/report/definition/cell.cjs.map +1 -1
  278. package/dist/report/definition/cell.d.cts +2 -0
  279. package/dist/report/definition/cell.d.mts +2 -0
  280. package/dist/report/definition/cell.d.ts +2 -0
  281. package/dist/report/definition/primitives/assertion-evidence.cjs +190 -4
  282. package/dist/report/definition/primitives/assertion-evidence.cjs.map +1 -1
  283. package/dist/report/definition/primitives/assertion-evidence.d.cts +4 -0
  284. package/dist/report/definition/primitives/assertion-evidence.d.mts +4 -0
  285. package/dist/report/definition/primitives/assertion-evidence.d.ts +4 -0
  286. package/dist/report/execution/machine.cjs +2 -3
  287. package/dist/report/execution/machine.cjs.map +1 -1
  288. package/dist/report/execution/machine.d.cts +11 -8
  289. package/dist/report/execution/machine.d.mts +11 -8
  290. package/dist/report/execution/machine.d.ts +11 -8
  291. package/dist/report/host/from-record.cjs +13 -8
  292. package/dist/report/host/from-record.cjs.map +1 -1
  293. package/dist/report/host/index.cjs +5 -1
  294. package/dist/report/host/index.cjs.map +1 -1
  295. package/dist/report/host/index.d.cts +1 -0
  296. package/dist/report/host/index.d.mts +1 -0
  297. package/dist/report/host/index.d.ts +1 -0
  298. package/dist/report/host/index.js +8 -2
  299. package/dist/report/host/index.mjs +8 -2
  300. package/dist/report/host/machine.cjs +23 -22
  301. package/dist/report/host/machine.cjs.map +1 -1
  302. package/dist/report/host/machine.d.cts +1 -1
  303. package/dist/report/host/machine.d.mts +1 -1
  304. package/dist/report/host/machine.d.ts +1 -1
  305. package/dist/report/host/node/loader.cjs +4 -2
  306. package/dist/report/host/node/loader.cjs.map +1 -1
  307. package/dist/report/host/node/loader.d.cts +3 -1
  308. package/dist/report/host/node/loader.d.mts +3 -1
  309. package/dist/report/host/node/loader.d.ts +3 -1
  310. package/dist/report/host/node.cjs +44 -9
  311. package/dist/report/host/node.cjs.map +1 -1
  312. package/dist/report/host/node.d.cts +13 -3
  313. package/dist/report/host/node.d.mts +13 -3
  314. package/dist/report/host/node.d.ts +13 -3
  315. package/dist/report/host/node.js +44 -32
  316. package/dist/report/host/operations.cjs +14 -0
  317. package/dist/report/host/operations.cjs.map +1 -0
  318. package/dist/report/host/operations.d.cts +39 -0
  319. package/dist/report/host/operations.d.mts +39 -0
  320. package/dist/report/host/operations.d.ts +39 -0
  321. package/dist/report/host/operations.js +10 -0
  322. package/dist/report/host/operations.js.map +1 -0
  323. package/dist/report/model/chart/plot.cjs +1 -1
  324. package/dist/report/model/chart/plot.cjs.map +1 -1
  325. package/dist/report/model/locale.cjs +4 -0
  326. package/dist/report/model/locale.cjs.map +1 -1
  327. package/dist/report/model/locale.d.cts +3 -1
  328. package/dist/report/model/locale.d.mts +3 -1
  329. package/dist/report/model/locale.d.ts +3 -1
  330. package/dist/report/react/styles.css +80 -0
  331. package/dist/runner/build-preparation.cjs +5 -5
  332. package/dist/runner/build-preparation.cjs.map +1 -1
  333. package/dist/runner/build-preparation.d.cts +2 -3
  334. package/dist/runner/build-preparation.d.mts +2 -3
  335. package/dist/runner/build-preparation.d.ts +2 -3
  336. package/dist/runner/feedback/coordinator.cjs +18 -15
  337. package/dist/runner/feedback/coordinator.cjs.map +1 -1
  338. package/dist/runner/feedback/coordinator.d.cts +6 -0
  339. package/dist/runner/feedback/coordinator.d.mts +6 -0
  340. package/dist/runner/feedback/coordinator.d.ts +6 -0
  341. package/dist/runner/ledger.cjs +3 -13
  342. package/dist/runner/ledger.cjs.map +1 -1
  343. package/dist/runner/ledger.d.cts +1 -3
  344. package/dist/runner/ledger.d.mts +1 -3
  345. package/dist/runner/ledger.d.ts +1 -3
  346. package/dist/runner/run.cjs +63 -18
  347. package/dist/runner/run.cjs.map +1 -1
  348. package/dist/runner/session.cjs +10 -0
  349. package/dist/runner/session.cjs.map +1 -1
  350. package/dist/runner/session.d.cts +25 -0
  351. package/dist/runner/session.d.mts +25 -0
  352. package/dist/runner/session.d.ts +25 -0
  353. package/dist/runner/types.cjs.map +1 -1
  354. package/dist/runner/types.d.cts +1 -2
  355. package/dist/runner/types.d.mts +1 -2
  356. package/dist/runner/types.d.ts +1 -2
  357. package/dist/sandbox/build-coordinator.cjs +38 -19
  358. package/dist/sandbox/build-coordinator.cjs.map +1 -1
  359. package/dist/sandbox/build-coordinator.d.cts +47 -7
  360. package/dist/sandbox/build-coordinator.d.mts +47 -7
  361. package/dist/sandbox/build-coordinator.d.ts +47 -7
  362. package/dist/sandbox/build-coordinator.js +8 -4
  363. package/dist/sandbox/cli/contribution.cjs +128 -0
  364. package/dist/sandbox/cli/contribution.cjs.map +1 -0
  365. package/dist/sandbox/cli/contribution.d.cts +71 -0
  366. package/dist/sandbox/cli/contribution.d.mts +71 -0
  367. package/dist/sandbox/cli/contribution.d.ts +71 -0
  368. package/dist/sandbox/cli/contribution.js +8 -0
  369. package/dist/sandbox/cli/contribution.js.map +1 -0
  370. package/dist/sandbox/cli-commands.cjs +14 -21
  371. package/dist/sandbox/cli-commands.cjs.map +1 -1
  372. package/dist/sandbox/cli-commands.d.cts +12 -8
  373. package/dist/sandbox/cli-commands.d.mts +12 -8
  374. package/dist/sandbox/cli-commands.d.ts +12 -8
  375. package/dist/sandbox/compose.cjs +22 -2
  376. package/dist/sandbox/compose.cjs.map +1 -1
  377. package/dist/sandbox/compose.d.cts +1 -1
  378. package/dist/sandbox/compose.d.mts +1 -1
  379. package/dist/sandbox/compose.d.ts +1 -1
  380. package/dist/sandbox/docker-profile/cli.cjs +13 -9
  381. package/dist/sandbox/docker-profile/cli.cjs.map +1 -1
  382. package/dist/sandbox/docker-profile/cli.d.cts +2 -0
  383. package/dist/sandbox/docker-profile/cli.d.mts +2 -0
  384. package/dist/sandbox/docker-profile/cli.d.ts +2 -0
  385. package/dist/sandbox/docker-profile/runtime.cjs +68 -7
  386. package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
  387. package/dist/sandbox/docker-profile/runtime.d.cts +19 -1
  388. package/dist/sandbox/docker-profile/runtime.d.mts +19 -1
  389. package/dist/sandbox/docker-profile/runtime.d.ts +19 -1
  390. package/dist/sandbox/docker-profile/runtime.js +10 -8
  391. package/dist/sandbox/docker-profile/schema.cjs +68 -19
  392. package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
  393. package/dist/sandbox/docker-profile/schema.d.cts +23 -9
  394. package/dist/sandbox/docker-profile/schema.d.mts +23 -9
  395. package/dist/sandbox/docker-profile/schema.d.ts +23 -9
  396. package/dist/sandbox/docker-task-build-cache.cjs +532 -0
  397. package/dist/sandbox/docker-task-build-cache.cjs.map +1 -0
  398. package/dist/sandbox/docker-task-build-cache.d.cts +68 -0
  399. package/dist/sandbox/docker-task-build-cache.d.mts +68 -0
  400. package/dist/sandbox/docker-task-build-cache.d.ts +68 -0
  401. package/dist/sandbox/docker-task-build-cache.js +20 -0
  402. package/dist/sandbox/docker-task-build-cache.js.map +1 -0
  403. package/dist/sandbox/docker.cjs +50 -0
  404. package/dist/sandbox/docker.cjs.map +1 -1
  405. package/dist/sandbox/docker.d.cts +15 -0
  406. package/dist/sandbox/docker.d.mts +15 -0
  407. package/dist/sandbox/docker.d.ts +15 -0
  408. package/dist/sandbox/dockerfile-build.cjs +55 -5
  409. package/dist/sandbox/dockerfile-build.cjs.map +1 -1
  410. package/dist/sandbox/dockerfile-build.d.cts +2 -2
  411. package/dist/sandbox/dockerfile-build.d.mts +2 -2
  412. package/dist/sandbox/dockerfile-build.d.ts +2 -2
  413. package/dist/sandbox/index.cjs +5 -3
  414. package/dist/sandbox/index.cjs.map +1 -1
  415. package/dist/sandbox/index.d.cts +4 -3
  416. package/dist/sandbox/index.d.mts +4 -3
  417. package/dist/sandbox/index.d.ts +4 -3
  418. package/dist/sandbox/index.js +16 -14
  419. package/dist/sandbox/index.mjs +16 -14
  420. package/dist/sandbox/keep.cjs +1 -3
  421. package/dist/sandbox/keep.cjs.map +1 -1
  422. package/dist/sandbox/layer.cjs +70 -79
  423. package/dist/sandbox/layer.cjs.map +1 -1
  424. package/dist/sandbox/layer.d.cts +6 -12
  425. package/dist/sandbox/layer.d.mts +6 -12
  426. package/dist/sandbox/layer.d.ts +6 -12
  427. package/dist/sandbox/layer.js +16 -18
  428. package/dist/sandbox/ledger-paths.cjs +4 -18
  429. package/dist/sandbox/ledger-paths.cjs.map +1 -1
  430. package/dist/sandbox/ledger-paths.d.cts +3 -13
  431. package/dist/sandbox/ledger-paths.d.mts +3 -13
  432. package/dist/sandbox/ledger-paths.d.ts +3 -13
  433. package/dist/sandbox/ledger-paths.js +4 -8
  434. package/dist/sandbox/registry.cjs +1 -1
  435. package/dist/sandbox/registry.cjs.map +1 -1
  436. package/dist/sandbox/runtime.cjs +27 -37
  437. package/dist/sandbox/runtime.cjs.map +1 -1
  438. package/dist/sandbox/runtime.d.cts +1 -2
  439. package/dist/sandbox/runtime.d.mts +1 -2
  440. package/dist/sandbox/runtime.d.ts +1 -2
  441. package/dist/sandbox/runtime.js +6 -8
  442. package/dist/sandbox/types.cjs.map +1 -1
  443. package/dist/sandbox/types.d.cts +3 -3
  444. package/dist/sandbox/types.d.mts +3 -3
  445. package/dist/sandbox/types.d.ts +3 -3
  446. package/dist/sources/project.json +6 -0
  447. package/dist/vendor/remark/remark-gfm.cjs +72 -72
  448. package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
  449. package/dist/vendor/remark/remark-parse.cjs +54 -54
  450. package/dist/vendor/remark/remark-parse.cjs.map +1 -1
  451. package/dist/vendor/remark/remark.cjs +125 -125
  452. package/dist/vendor/remark/remark.cjs.map +2 -2
  453. package/docs-site/zh/README.md +1 -1
  454. package/docs-site/zh/explanation/assert.mdx +4 -0
  455. package/docs-site/zh/explanation/judge.mdx +40 -9
  456. package/docs-site/zh/reference/cli.mdx +67 -43
  457. package/docs-site/zh/reference/define-agent.mdx +2 -2
  458. package/docs-site/zh/reference/report-components.mdx +4 -3
  459. package/docs-site/zh/troubleshooting/debug-sandbox.mdx +6 -0
  460. package/docs-site/zh/troubleshooting/debugging.mdx +28 -1
  461. package/docs-site/zh/tutorials/agent-feedback-loop.mdx +4 -2
  462. package/docs-site/zh/tutorials/concurrency.mdx +2 -2
  463. package/docs-site/zh/tutorials/custom-reports.mdx +175 -9
  464. package/docs-site/zh/tutorials/docker-in-docker.mdx +52 -7
  465. package/docs-site/zh/tutorials/eval-groups.mdx +1 -2
  466. package/docs-site/zh/tutorials/evaluation-kinds.mdx +39 -6
  467. package/docs-site/zh/tutorials/nixos-managed-dind.mdx +14 -5
  468. package/docs-site/zh/tutorials/sandbox-providers.mdx +1 -28
  469. package/docs-site/zh/tutorials/sandbox-reuse.mdx +1 -1
  470. package/docs-site/zh/tutorials/viewing-results.mdx +2 -0
  471. package/package.json +24 -19
  472. package/README.md +0 -176
  473. package/README.zh.md +0 -176
  474. package/dist/cli/record.cjs +0 -246
  475. package/dist/cli/record.cjs.map +0 -1
  476. package/dist/cli/record.d.cts +0 -40
  477. package/dist/cli/record.d.mts +0 -40
  478. package/dist/cli/record.d.ts +0 -40
  479. package/dist/cli/record.js +0 -10
  480. package/dist/cli/record.js.map +0 -1
  481. package/dist/sandbox/local.cjs +0 -361
  482. package/dist/sandbox/local.cjs.map +0 -1
  483. package/dist/sandbox/local.d.cts +0 -80
  484. package/dist/sandbox/local.d.mts +0 -80
  485. package/dist/sandbox/local.d.ts +0 -80
  486. package/dist/sandbox/local.js +0 -6
  487. package/dist/sandbox/local.js.map +0 -1
@@ -5205,7 +5205,7 @@ export declare const fileChangesDomainBinding: Readonly<{
5205
5205
  readonly state: "partial";
5206
5206
  readonly limitations: readonly [{
5207
5207
  readonly code: "capture-failed" | "capture-interrupted";
5208
- readonly stage: "normalize" | "export" | "checkpoint" | "finalizer-export";
5208
+ readonly stage: "normalize" | "checkpoint" | "export" | "finalizer-export";
5209
5209
  readonly atWindowId: string | null;
5210
5210
  } | {
5211
5211
  readonly code: "collection-cap-reached";
@@ -5218,7 +5218,7 @@ export declare const fileChangesDomainBinding: Readonly<{
5218
5218
  readonly omittedAtLeast: number;
5219
5219
  }, ...({
5220
5220
  readonly code: "capture-failed" | "capture-interrupted";
5221
- readonly stage: "normalize" | "export" | "checkpoint" | "finalizer-export";
5221
+ readonly stage: "normalize" | "checkpoint" | "export" | "finalizer-export";
5222
5222
  readonly atWindowId: string | null;
5223
5223
  } | {
5224
5224
  readonly code: "collection-cap-reached";
@@ -5304,7 +5304,7 @@ export declare const fileChangesDomainBinding: Readonly<{
5304
5304
  readonly state: "partial";
5305
5305
  readonly limitations: readonly [{
5306
5306
  readonly code: "capture-failed" | "capture-interrupted";
5307
- readonly stage: "normalize" | "export" | "checkpoint" | "finalizer-export";
5307
+ readonly stage: "normalize" | "checkpoint" | "export" | "finalizer-export";
5308
5308
  readonly atWindowId: string | null;
5309
5309
  } | {
5310
5310
  readonly code: "collection-cap-reached";
@@ -5317,7 +5317,7 @@ export declare const fileChangesDomainBinding: Readonly<{
5317
5317
  readonly omittedAtLeast: number;
5318
5318
  }, ...({
5319
5319
  readonly code: "capture-failed" | "capture-interrupted";
5320
- readonly stage: "normalize" | "export" | "checkpoint" | "finalizer-export";
5320
+ readonly stage: "normalize" | "checkpoint" | "export" | "finalizer-export";
5321
5321
  readonly atWindowId: string | null;
5322
5322
  } | {
5323
5323
  readonly code: "collection-cap-reached";
@@ -7623,7 +7623,7 @@ export declare const builtinDomainViewBindings: Readonly<{
7623
7623
  readonly state: "partial";
7624
7624
  readonly limitations: readonly [{
7625
7625
  readonly code: "capture-failed" | "capture-interrupted";
7626
- readonly stage: "normalize" | "export" | "checkpoint" | "finalizer-export";
7626
+ readonly stage: "normalize" | "checkpoint" | "export" | "finalizer-export";
7627
7627
  readonly atWindowId: string | null;
7628
7628
  } | {
7629
7629
  readonly code: "collection-cap-reached";
@@ -7636,7 +7636,7 @@ export declare const builtinDomainViewBindings: Readonly<{
7636
7636
  readonly omittedAtLeast: number;
7637
7637
  }, ...({
7638
7638
  readonly code: "capture-failed" | "capture-interrupted";
7639
- readonly stage: "normalize" | "export" | "checkpoint" | "finalizer-export";
7639
+ readonly stage: "normalize" | "checkpoint" | "export" | "finalizer-export";
7640
7640
  readonly atWindowId: string | null;
7641
7641
  } | {
7642
7642
  readonly code: "collection-cap-reached";
@@ -7722,7 +7722,7 @@ export declare const builtinDomainViewBindings: Readonly<{
7722
7722
  readonly state: "partial";
7723
7723
  readonly limitations: readonly [{
7724
7724
  readonly code: "capture-failed" | "capture-interrupted";
7725
- readonly stage: "normalize" | "export" | "checkpoint" | "finalizer-export";
7725
+ readonly stage: "normalize" | "checkpoint" | "export" | "finalizer-export";
7726
7726
  readonly atWindowId: string | null;
7727
7727
  } | {
7728
7728
  readonly code: "collection-cap-reached";
@@ -7735,7 +7735,7 @@ export declare const builtinDomainViewBindings: Readonly<{
7735
7735
  readonly omittedAtLeast: number;
7736
7736
  }, ...({
7737
7737
  readonly code: "capture-failed" | "capture-interrupted";
7738
- readonly stage: "normalize" | "export" | "checkpoint" | "finalizer-export";
7738
+ readonly stage: "normalize" | "checkpoint" | "export" | "finalizer-export";
7739
7739
  readonly atWindowId: string | null;
7740
7740
  } | {
7741
7741
  readonly code: "collection-cap-reached";
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.js","sourceRoot":"","sources":["contracts.ts"],"names":[],"mappings":";;;AAuTA,wCAqBC;AAED,oCAIC;AAED,gDAEC;AAzKY,QAAA,sBAAsB,GAAkB,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAoCxF,MAAM,+BAA+B,GAAkB,MAAM,CAAC,6CAA6C,CAAC,CAAC;AAqF7G,MAAM,gBAAgB,GAAkB,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAO/E,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAAU,CAAC;AAC/C,MAAM,yBAAyB,GAAG,IAAI,OAAO,EAA8B,CAAC;AAQ5E,sEAAsE;AACtE,SAAgB,cAAc,CAAM,KAKnC;IACG,MAAM,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAA+B,CAAC;IAC3D,MAAM,QAAQ,GAAuB,MAAM,CAAC,MAAM,CAAC;QAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,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{ MembershipAction } from \"../record/model/core.ts\";\nimport type { AttemptId, EvalId, ExecutionIdentityDigest, ExperimentId, RunId, SlotId, UtcMillis, } from \"../record/model/identifiers.ts\";\nimport type { AttemptLocator } from \"../attempt-locator.ts\";\nexport type { AttemptId, EvalId, ExecutionIdentityDigest, ExperimentId, RunId, SlotId, UtcMillis, };\n/** JSON is the only wire shape accepted by the Sample snapshot codec. */\nexport type JsonValue = null | boolean | number | string | readonly JsonValue[] | {\n readonly [key: string]: JsonValue;\n};\n/** Stable identity for one Sample capability and its portable snapshot. */\nexport interface SampleIdentity {\n readonly kind: \"analysis-sample\";\n readonly id: string;\n}\n/**\n * A public identity for evidence from one immutable Attempt. It deliberately\n * carries a locator rather than Record's nominal selected-reference capability\n * or an AttemptId that could be used as an ad-hoc storage lookup.\n */\nexport interface AttemptEvidenceIdentity {\n readonly kind: \"attempt\";\n readonly locator: AttemptLocator;\n readonly originRunId: RunId;\n}\nexport type AnalysisSelectionProblem = {\n readonly code: \"incomplete-run\";\n readonly runId: RunId;\n} | {\n readonly code: \"record-core-invalid\";\n readonly runId: RunId;\n} | {\n readonly code: \"selection-run-missing\";\n readonly runId: RunId;\n} | {\n readonly code: \"selection-run-unreadable\";\n readonly runId: RunId;\n};\n/**\n * One current target Slot identity. `project-current` keeps only Sample\n * members whose experiment/eval/attempt ordinal aligns, then whose digest\n * still narrows that aligned identity.\n */\nexport interface AnalysisCurrentSlotIdentity {\n readonly experimentId: ExperimentId;\n readonly evalId: EvalId;\n /** Logical attempt identity; never inferred from expectedSlots array order. */\n readonly attemptOrdinal: number;\n /** Narrows an already aligned logical identity; it is not the alignment key. */\n readonly executionIdentityDigest: ExecutionIdentityDigest;\n}\n/** Exact occurrence retained after project-current logical alignment. */\nexport interface AnalysisSlotOccurrenceIdentity {\n readonly runId: RunId;\n readonly slotId: SlotId;\n}\n/** Host-issued selection used by Application, CLI, and Report from-record. */\nexport type AnalysisSelectionRequest = {\n readonly policy: \"explicit-runs\";\n readonly runIds: readonly RunId[];\n} | {\n readonly policy: \"project-current\";\n readonly experimentIds?: readonly ExperimentId[];\n readonly currentSlots: readonly AnalysisCurrentSlotIdentity[];\n};\n/**\n * The exact selection audit retained by a closed SampleSnapshot. `runIds` are\n * the explicit request; `selectedRunIds` are recomputed from the current,\n * non-excluded Sample frame after every monotonic narrowing.\n */\nexport type AnalysisSelectionSummary = {\n readonly policy: \"explicit-runs\";\n readonly runIds: readonly RunId[];\n readonly selectedRunIds: readonly RunId[];\n readonly problems: readonly AnalysisSelectionProblem[];\n} | {\n readonly policy: \"project-current\";\n readonly experimentIds: readonly ExperimentId[] | \"all\";\n readonly selectedRunIds: readonly RunId[];\n readonly problems: readonly AnalysisSelectionProblem[];\n};\nexport interface AnalysisRun {\n readonly runId: RunId;\n readonly experimentId: ExperimentId;\n /**\n * The safe, immutable portion of the selected Run's Core context. A later\n * Core read can be unavailable after selection, in which case no context is\n * invented for that Run.\n */\n readonly context: AnalysisRunContext | null;\n readonly startedAt: UtcMillis;\n readonly completedAt: UtcMillis;\n readonly expectedSlots: readonly SlotId[];\n}\n/**\n * Display- and grouping-safe Run configuration retained by a Sample. It has\n * no Record capability and is recursively JSON-only.\n */\nexport interface AnalysisRunContext {\n readonly execution: AnalysisRunExecution;\n readonly labels: Readonly<Record<string, string>>;\n}\nexport interface AnalysisRunExecution {\n readonly agentId: string;\n readonly model: string | null;\n readonly reasoningEffort: string | null;\n readonly flags: Readonly<Record<string, JsonValue>>;\n}\nexport interface AnalysisSlotRef {\n /** Occurrence identity is always the exact selected Run/Slot pair. */\n readonly runId: RunId;\n readonly slotId: SlotId;\n /** Derived from the associated selected AnalysisRun, never a Record Slot field. */\n readonly experimentId: ExperimentId;\n /** Logical alignment is experiment + eval + durable attempt ordinal. */\n readonly evalId: EvalId;\n readonly attemptOrdinal: number;\n /** This remains an identity-narrowing value, never a logical alignment key. */\n readonly executionIdentityDigest: ExecutionIdentityDigest;\n}\n/** A Member with an exact origin Attempt. */\nexport interface IncludedAnalysisSlot extends AnalysisSlotRef {\n readonly state: \"included\";\n /** Core provenance is not inferred from whether the Attempt is local. */\n readonly action: \"executed\" | \"carried\" | \"accepted\";\n readonly relation: \"origin\" | \"reference\";\n readonly attempt: AttemptEvidenceIdentity;\n}\n/**\n * An expected Slot without an Attempt. `null` means no Member document was\n * recorded; the two actions retain a recorded null Member without suggesting\n * that it is pending work.\n */\nexport interface NotRecordedAnalysisSlot extends AnalysisSlotRef {\n readonly state: \"not-recorded\";\n readonly action: \"not-dispatched\" | \"interrupted\" | null;\n readonly attempt: null;\n}\n/** Core could be read far enough to identify the frame but not its member. */\nexport interface CoreInvalidAnalysisSlot extends AnalysisSlotRef {\n readonly state: \"core-invalid\";\n readonly action: MembershipAction | null;\n readonly attempt: null;\n readonly issues: readonly AnalysisIssue[];\n}\nexport type ActiveAnalysisSlot = IncludedAnalysisSlot | NotRecordedAnalysisSlot | CoreInvalidAnalysisSlot;\n/** A monotonic Sample narrowing preserves the previous, non-nested state. */\nexport interface ExcludedAnalysisSlot extends AnalysisSlotRef {\n readonly state: \"excluded\";\n readonly base: ActiveAnalysisSlot;\n /** Present when `project-current` dropped this Slot for identity mismatch. */\n readonly reason?: \"identity-mismatch\";\n}\nexport type AnalysisSlot = ActiveAnalysisSlot | ExcludedAnalysisSlot;\nexport interface SampleCoverage {\n readonly frameTotal: number;\n readonly selected: number;\n readonly included: number;\n readonly notRecorded: number;\n readonly coreInvalid: number;\n readonly excluded: number;\n}\n/**\n * The closed, portable representation of a Record selection. It contains\n * only selection identity, Core-derived Run/Slot denominator facts, and\n * selection problems. Decoding it can never reopen a Record.\n */\nexport interface SampleSnapshot {\n readonly version: 1;\n readonly identity: SampleIdentity;\n readonly selection: AnalysisSelectionSummary;\n readonly runs: readonly AnalysisRun[];\n readonly slots: readonly AnalysisSlot[];\n readonly coverage: SampleCoverage;\n}\nexport const sampleCapabilityTypeId: unique symbol = Symbol(\"niceeval.analysis.Sample\");\n/** A Host-issued, Scope-bound lazy Record-reading capability. */\nexport interface Sample {\n readonly kind: \"analysis-sample\";\n readonly snapshot: SampleSnapshot;\n readonly [sampleCapabilityTypeId]: true;\n}\nexport type ExperimentGroupIdentity = {\n readonly kind: \"named\";\n readonly groupId: string;\n readonly key: `named/${string}`;\n} | {\n readonly kind: \"singleton\";\n readonly experimentId: ExperimentId;\n readonly key: `singleton/${string}`;\n};\nexport type NonComparableReason = \"eval-population-mismatch\";\nexport interface NonComparableIssue {\n readonly reason: NonComparableReason;\n readonly members: readonly ExperimentId[];\n readonly actual: readonly {\n readonly member: ExperimentId;\n readonly population: JsonValue | null;\n readonly basis: JsonValue | null;\n }[];\n readonly refs: readonly EvidenceRef[];\n readonly params: Readonly<Record<string, JsonValue>>;\n}\nexport type ExperimentComparisonState = {\n readonly state: \"comparable\";\n readonly members: readonly ExperimentId[];\n} | {\n readonly state: \"non-comparable\";\n readonly members: readonly ExperimentId[];\n readonly issues: readonly NonComparableIssue[];\n};\nconst experimentComparisonScopeTypeId: unique symbol = Symbol(\"niceeval.analysis.ExperimentComparisonScope\");\n/** Analysis-issued comparison capability; the backing Sample remains private. */\nexport interface ExperimentComparisonScope {\n readonly group: ExperimentGroupIdentity;\n readonly comparison: ExperimentComparisonState;\n readonly [experimentComparisonScopeTypeId]: true;\n}\nexport interface AnalysisComparisonGroupMismatchError {\n readonly code: \"analysis-comparison-group-mismatch\";\n readonly groups: readonly ExperimentGroupIdentity[];\n}\nexport interface SampleSelector {\n readonly runIds?: readonly RunId[];\n readonly slotIds?: readonly SlotId[];\n}\nexport interface SampleClosedError {\n readonly code: \"analysis-sample-closed\";\n readonly sample: SampleIdentity;\n}\nexport interface SampleSnapshotCodecError {\n readonly code: \"sample-snapshot-invalid\";\n readonly path: readonly string[];\n readonly reason: string;\n}\nexport interface AnalysisRequestError {\n readonly code: \"analysis-request-invalid\";\n readonly reason: string;\n}\nexport type AnalysisInputIssueCode = \"missing\" | \"migration-required\" | \"unsupported\" | \"producer-incompatible\" | \"input-invalid\" | \"reduction-failed\" | \"relation-unmatched\";\nexport interface EvidenceIdentity {\n readonly kind: \"attempt\";\n readonly locator: AttemptLocator;\n}\nexport interface EvidenceRef {\n readonly identity: EvidenceIdentity;\n}\nexport interface AnalysisIssue {\n readonly code: AnalysisInputIssueCode;\n readonly message: string;\n readonly refs: readonly EvidenceRef[];\n}\nexport interface ProducerIdentity {\n readonly id: string;\n}\n/** Internal result of a published AnalysisInput read. It never reaches Report. */\nexport type SampleInputObservation<Value> = {\n readonly state: \"value\";\n readonly value: Value;\n readonly refs: readonly EvidenceRef[];\n readonly producer?: ProducerIdentity;\n} | {\n readonly state: \"missing\" | \"migration-required\" | \"unsupported\" | \"failed\";\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n readonly producer?: ProducerIdentity;\n};\nexport type MetricState = \"available\" | \"partial\"\n/** A specialized closed metric may have no reportable value at all. */\n | \"unavailable\" | \"empty\" | \"migration-required\" | \"unsupported\" | \"failed\";\nexport type MetricBasis = \"attempt\" | \"eval\" | \"run\" | \"pair\" | \"slot\";\nexport type MeasureFormat = string | {\n readonly kind: string;\n readonly options?: JsonValue;\n};\n/** A closed Measure cell: never a selected Record handle or reader callback. */\nexport interface MetricValue<Value = number> {\n readonly value: Value | null;\n readonly state: MetricState;\n readonly samples: number;\n readonly total: number;\n readonly basis: MetricBasis;\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n readonly unit?: string;\n readonly format?: MeasureFormat;\n readonly better?: \"higher\" | \"lower\" | \"neutral\";\n readonly bounds?: {\n readonly min?: number;\n readonly max?: number;\n };\n}\nexport interface ClosedRowsIdentity {\n readonly kind: \"closed-rows\";\n readonly id: string;\n}\nconst closedRowsTypeId: unique symbol = Symbol(\"niceeval.analysis.ClosedRows\");\n/** @internal Metadata is retained out-of-band so an ordinary array cannot forge it. */\nexport interface ClosedRowsMetadata {\n readonly identity: ClosedRowsIdentity;\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n}\nconst closedRowsBrands = new WeakSet<object>();\nconst closedRowsMetadataByValue = new WeakMap<object, ClosedRowsMetadata>();\n/** A branded, frozen array produced only by Analysis query execution. */\nexport interface ClosedRows<Row> extends ReadonlyArray<Readonly<Row>> {\n readonly [closedRowsTypeId]: true;\n readonly identity: ClosedRowsIdentity;\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n}\n/** @internal Keeps the brand unforgeable to normal public callers. */\nexport function makeClosedRows<Row>(input: {\n readonly rows: readonly Readonly<Row>[];\n readonly identity: ClosedRowsIdentity;\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n}): ClosedRows<Row> {\n const rows = [...input.rows] as unknown as ClosedRows<Row>;\n const metadata: ClosedRowsMetadata = Object.freeze({\n identity: Object.freeze({ kind: input.identity.kind, id: input.identity.id }),\n issues: Object.freeze([...input.issues]),\n refs: Object.freeze([...input.refs]),\n });\n Object.defineProperties(rows, {\n [closedRowsTypeId]: { value: true, enumerable: false },\n identity: { value: metadata.identity, enumerable: true },\n issues: { value: metadata.issues, enumerable: true },\n refs: { value: metadata.refs, enumerable: true },\n });\n closedRowsBrands.add(rows);\n closedRowsMetadataByValue.set(rows, metadata);\n return Object.freeze(rows);\n}\n/** @internal Checks actual Analysis issuance, rather than structural shape. */\nexport function isClosedRows(value: unknown): value is ClosedRows<unknown> {\n return Array.isArray(value)\n && closedRowsBrands.has(value)\n && Reflect.get(value, closedRowsTypeId) === true;\n}\n/** @internal Returns immutable metadata registered at Analysis close time. */\nexport function closedRowsMetadata(value: unknown): ClosedRowsMetadata | undefined {\n return isClosedRows(value) ? closedRowsMetadataByValue.get(value) : undefined;\n}\nexport interface PopulationIdentity {\n readonly kind: \"population\";\n readonly id: string;\n}\n/** The common, entirely closed base of every published DomainView. */\nexport interface DomainView {\n readonly kind: \"domain-view\";\n readonly identity: {\n readonly kind: \"domain-view\";\n readonly id: string;\n };\n readonly issues: readonly AnalysisIssue[];\n readonly ref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EAAE;QACpD,IAAI,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;KACnD,CAAC,CAAC;IACH,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3B,yBAAyB,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AACD,+EAA+E;AAC/E,SAAgB,YAAY,CAAC,KAAc;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;WACpB,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC;WAC3B,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,IAAI,CAAC;AACzD,CAAC;AACD,8EAA8E;AAC9E,SAAgB,kBAAkB,CAAC,KAAc;IAC7C,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAClF,CAAC","sourcesContent":["import type { MembershipAction } from \"../record/model/core.ts\";\nimport type { AttemptId, EvalId, ExecutionIdentityDigest, ExperimentId, RunId, SlotId, UtcMillis, } from \"../record/model/identifiers.ts\";\nimport type { AttemptLocator } from \"../attempt-locator.ts\";\nexport type { AttemptId, EvalId, ExecutionIdentityDigest, ExperimentId, RunId, SlotId, UtcMillis, };\n/** JSON is the only wire shape accepted by the Sample snapshot codec. */\nexport type JsonValue = null | boolean | number | string | readonly JsonValue[] | {\n readonly [key: string]: JsonValue;\n};\n/** Stable identity for one Sample capability and its portable snapshot. */\nexport interface SampleIdentity {\n readonly kind: \"analysis-sample\";\n readonly id: string;\n}\n/**\n * A public identity for evidence from one immutable Attempt. It deliberately\n * carries a locator rather than Record's nominal selected-reference capability\n * or an AttemptId that could be used as an ad-hoc storage lookup.\n */\nexport interface AttemptEvidenceIdentity {\n readonly kind: \"attempt\";\n readonly locator: AttemptLocator;\n readonly originRunId: RunId;\n}\nexport type AnalysisSelectionProblem = {\n readonly code: \"incomplete-run\";\n readonly runId: RunId;\n} | {\n readonly code: \"record-core-invalid\";\n readonly runId: RunId;\n} | {\n readonly code: \"selection-run-missing\";\n readonly runId: RunId;\n} | {\n readonly code: \"selection-run-unreadable\";\n readonly runId: RunId;\n};\n/**\n * One current target Slot identity. `project-current` keeps only Sample\n * members whose experiment/eval/attempt ordinal aligns, then whose digest\n * still narrows that aligned identity.\n */\nexport interface AnalysisCurrentSlotIdentity {\n readonly experimentId: ExperimentId;\n readonly evalId: EvalId;\n /** Logical attempt identity; never inferred from expectedSlots array order. */\n readonly attemptOrdinal: number;\n /** Narrows an already aligned logical identity; it is not the alignment key. */\n readonly executionIdentityDigest: ExecutionIdentityDigest;\n}\n/** Exact occurrence retained after project-current logical alignment. */\nexport interface AnalysisSlotOccurrenceIdentity {\n readonly runId: RunId;\n readonly slotId: SlotId;\n}\n/** Host-issued selection used by Application, CLI, and Report from-record. */\nexport type AnalysisSelectionRequest = {\n readonly policy: \"explicit-runs\";\n readonly runIds: readonly RunId[];\n} | {\n readonly policy: \"project-current\";\n readonly experimentIds?: readonly ExperimentId[];\n readonly currentSlots: readonly AnalysisCurrentSlotIdentity[];\n};\n/**\n * The exact selection audit retained by a closed SampleSnapshot. `runIds` are\n * the explicit request; `selectedRunIds` are recomputed from the current,\n * non-excluded Sample frame after every monotonic narrowing.\n */\nexport type AnalysisSelectionSummary = {\n readonly policy: \"explicit-runs\";\n readonly runIds: readonly RunId[];\n readonly selectedRunIds: readonly RunId[];\n readonly problems: readonly AnalysisSelectionProblem[];\n} | {\n readonly policy: \"project-current\";\n readonly experimentIds: readonly ExperimentId[] | \"all\";\n readonly selectedRunIds: readonly RunId[];\n readonly problems: readonly AnalysisSelectionProblem[];\n};\nexport interface AnalysisRun {\n readonly runId: RunId;\n readonly experimentId: ExperimentId;\n /**\n * The safe, immutable portion of the selected Run's Core context. A later\n * Core read can be unavailable after selection, in which case no context is\n * invented for that Run.\n */\n readonly context: AnalysisRunContext | null;\n readonly startedAt: UtcMillis;\n readonly completedAt: UtcMillis;\n readonly expectedSlots: readonly SlotId[];\n}\n/**\n * Display- and grouping-safe Run configuration retained by a Sample. It has\n * no Record capability and is recursively JSON-only.\n */\nexport interface AnalysisRunContext {\n readonly execution: AnalysisRunExecution;\n readonly labels: Readonly<Record<string, string>>;\n}\nexport interface AnalysisRunExecution {\n readonly agentId: string;\n readonly model: string | null;\n readonly reasoningEffort: string | null;\n readonly flags: Readonly<Record<string, JsonValue>>;\n}\nexport interface AnalysisSlotRef {\n /** Occurrence identity is always the exact selected Run/Slot pair. */\n readonly runId: RunId;\n readonly slotId: SlotId;\n /** Derived from the associated selected AnalysisRun, never a Record Slot field. */\n readonly experimentId: ExperimentId;\n /** Logical alignment is experiment + eval + durable attempt ordinal. */\n readonly evalId: EvalId;\n readonly attemptOrdinal: number;\n /** This remains an identity-narrowing value, never a logical alignment key. */\n readonly executionIdentityDigest: ExecutionIdentityDigest;\n}\n/** A Member with an exact origin Attempt. */\nexport interface IncludedAnalysisSlot extends AnalysisSlotRef {\n readonly state: \"included\";\n /** Core provenance is not inferred from whether the Attempt is local. */\n readonly action: \"executed\" | \"carried\" | \"accepted\";\n readonly relation: \"origin\" | \"reference\";\n readonly attempt: AttemptEvidenceIdentity;\n}\n/**\n * An expected Slot without an Attempt. `null` means no Member document was\n * recorded; the two actions retain a recorded null Member without suggesting\n * that it is pending work.\n */\nexport interface NotRecordedAnalysisSlot extends AnalysisSlotRef {\n readonly state: \"not-recorded\";\n readonly action: \"not-dispatched\" | \"interrupted\" | null;\n readonly attempt: null;\n}\n/** Core could be read far enough to identify the frame but not its member. */\nexport interface CoreInvalidAnalysisSlot extends AnalysisSlotRef {\n readonly state: \"core-invalid\";\n readonly action: MembershipAction | null;\n readonly attempt: null;\n readonly issues: readonly AnalysisIssue[];\n}\nexport type ActiveAnalysisSlot = IncludedAnalysisSlot | NotRecordedAnalysisSlot | CoreInvalidAnalysisSlot;\n/** A monotonic Sample narrowing preserves the previous, non-nested state. */\nexport interface ExcludedAnalysisSlot extends AnalysisSlotRef {\n readonly state: \"excluded\";\n readonly base: ActiveAnalysisSlot;\n /** Present when `project-current` dropped this Slot for identity mismatch. */\n readonly reason?: \"identity-mismatch\";\n}\nexport type AnalysisSlot = ActiveAnalysisSlot | ExcludedAnalysisSlot;\nexport interface SampleCoverage {\n readonly frameTotal: number;\n readonly selected: number;\n readonly included: number;\n readonly notRecorded: number;\n readonly coreInvalid: number;\n readonly excluded: number;\n}\n/**\n * The closed, portable representation of a Record selection. It contains\n * only selection identity, Core-derived Run/Slot denominator facts, and\n * selection problems. Decoding it can never reopen a Record.\n */\nexport interface SampleSnapshot {\n readonly version: 1;\n readonly identity: SampleIdentity;\n readonly selection: AnalysisSelectionSummary;\n readonly runs: readonly AnalysisRun[];\n readonly slots: readonly AnalysisSlot[];\n readonly coverage: SampleCoverage;\n}\nexport const sampleCapabilityTypeId: unique symbol = Symbol(\"niceeval.analysis.Sample\");\n/** A Host-issued, Scope-bound lazy Record-reading capability. */\nexport interface Sample {\n readonly kind: \"analysis-sample\";\n readonly snapshot: SampleSnapshot;\n readonly [sampleCapabilityTypeId]: true;\n}\nexport type ExperimentGroupIdentity = {\n readonly kind: \"named\";\n readonly groupId: string;\n readonly key: `named/${string}`;\n} | {\n readonly kind: \"singleton\";\n readonly experimentId: ExperimentId;\n readonly key: `singleton/${string}`;\n};\nexport interface ExperimentEvalCoverage {\n readonly member: ExperimentId;\n readonly coveredEvalCount: number;\n readonly groupEvalCount: number;\n}\nexport interface ExperimentComparison {\n readonly members: readonly ExperimentId[];\n readonly coverage: readonly ExperimentEvalCoverage[];\n}\nconst experimentComparisonScopeTypeId: unique symbol = Symbol(\"niceeval.analysis.ExperimentComparisonScope\");\n/** Analysis-issued comparison capability; the backing Sample remains private. */\nexport interface ExperimentComparisonScope {\n readonly group: ExperimentGroupIdentity;\n readonly comparison: ExperimentComparison;\n readonly [experimentComparisonScopeTypeId]: true;\n}\nexport interface AnalysisComparisonGroupMismatchError {\n readonly code: \"analysis-comparison-group-mismatch\";\n readonly groups: readonly ExperimentGroupIdentity[];\n}\nexport interface SampleSelector {\n readonly runIds?: readonly RunId[];\n readonly slotIds?: readonly SlotId[];\n}\nexport interface SampleClosedError {\n readonly code: \"analysis-sample-closed\";\n readonly sample: SampleIdentity;\n}\nexport interface SampleSnapshotCodecError {\n readonly code: \"sample-snapshot-invalid\";\n readonly path: readonly string[];\n readonly reason: string;\n}\nexport interface AnalysisRequestError {\n readonly code: \"analysis-request-invalid\";\n readonly reason: string;\n}\nexport type AnalysisInputIssueCode = \"missing\" | \"migration-required\" | \"unsupported\" | \"producer-incompatible\" | \"input-invalid\" | \"reduction-failed\" | \"relation-unmatched\";\nexport interface EvidenceIdentity {\n readonly kind: \"attempt\";\n readonly locator: AttemptLocator;\n}\nexport interface EvidenceRef {\n readonly identity: EvidenceIdentity;\n}\nexport interface AnalysisIssue {\n readonly code: AnalysisInputIssueCode;\n readonly message: string;\n readonly refs: readonly EvidenceRef[];\n}\nexport interface ProducerIdentity {\n readonly id: string;\n}\n/** Internal result of a published AnalysisInput read. It never reaches Report. */\nexport type SampleInputObservation<Value> = {\n readonly state: \"value\";\n readonly value: Value;\n readonly refs: readonly EvidenceRef[];\n readonly producer?: ProducerIdentity;\n} | {\n readonly state: \"missing\" | \"migration-required\" | \"unsupported\" | \"failed\";\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n readonly producer?: ProducerIdentity;\n};\nexport type MetricState = \"available\" | \"partial\"\n/** A specialized closed metric may have no reportable value at all. */\n | \"unavailable\" | \"empty\" | \"migration-required\" | \"unsupported\" | \"failed\";\nexport type MetricBasis = \"attempt\" | \"eval\" | \"run\" | \"pair\" | \"slot\";\nexport type MeasureFormat = string | {\n readonly kind: string;\n readonly options?: JsonValue;\n};\n/** A closed Measure cell: never a selected Record handle or reader callback. */\nexport interface MetricValue<Value = number> {\n readonly value: Value | null;\n readonly state: MetricState;\n readonly samples: number;\n readonly total: number;\n readonly basis: MetricBasis;\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n readonly unit?: string;\n readonly format?: MeasureFormat;\n readonly better?: \"higher\" | \"lower\" | \"neutral\";\n readonly bounds?: {\n readonly min?: number;\n readonly max?: number;\n };\n}\nexport interface ClosedRowsIdentity {\n readonly kind: \"closed-rows\";\n readonly id: string;\n}\nconst closedRowsTypeId: unique symbol = Symbol(\"niceeval.analysis.ClosedRows\");\n/** @internal Metadata is retained out-of-band so an ordinary array cannot forge it. */\nexport interface ClosedRowsMetadata {\n readonly identity: ClosedRowsIdentity;\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n}\nconst closedRowsBrands = new WeakSet<object>();\nconst closedRowsMetadataByValue = new WeakMap<object, ClosedRowsMetadata>();\n/** A branded, frozen array produced only by Analysis query execution. */\nexport interface ClosedRows<Row> extends ReadonlyArray<Readonly<Row>> {\n readonly [closedRowsTypeId]: true;\n readonly identity: ClosedRowsIdentity;\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n}\n/** @internal Keeps the brand unforgeable to normal public callers. */\nexport function makeClosedRows<Row>(input: {\n readonly rows: readonly Readonly<Row>[];\n readonly identity: ClosedRowsIdentity;\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n}): ClosedRows<Row> {\n const rows = [...input.rows] as unknown as ClosedRows<Row>;\n const metadata: ClosedRowsMetadata = Object.freeze({\n identity: Object.freeze({ kind: input.identity.kind, id: input.identity.id }),\n issues: Object.freeze([...input.issues]),\n refs: Object.freeze([...input.refs]),\n });\n Object.defineProperties(rows, {\n [closedRowsTypeId]: { value: true, enumerable: false },\n identity: { value: metadata.identity, enumerable: true },\n issues: { value: metadata.issues, enumerable: true },\n refs: { value: metadata.refs, enumerable: true },\n });\n closedRowsBrands.add(rows);\n closedRowsMetadataByValue.set(rows, metadata);\n return Object.freeze(rows);\n}\n/** @internal Checks actual Analysis issuance, rather than structural shape. */\nexport function isClosedRows(value: unknown): value is ClosedRows<unknown> {\n return Array.isArray(value)\n && closedRowsBrands.has(value)\n && Reflect.get(value, closedRowsTypeId) === true;\n}\n/** @internal Returns immutable metadata registered at Analysis close time. */\nexport function closedRowsMetadata(value: unknown): ClosedRowsMetadata | undefined {\n return isClosedRows(value) ? closedRowsMetadataByValue.get(value) : undefined;\n}\nexport interface PopulationIdentity {\n readonly kind: \"population\";\n readonly id: string;\n}\n/** The common, entirely closed base of every published DomainView. */\nexport interface DomainView {\n readonly kind: \"domain-view\";\n readonly identity: {\n readonly kind: \"domain-view\";\n readonly id: string;\n };\n readonly issues: readonly AnalysisIssue[];\n readonly refs: readonly EvidenceRef[];\n}\n"]}
@@ -187,31 +187,20 @@ export type ExperimentGroupIdentity = {
187
187
  readonly experimentId: ExperimentId;
188
188
  readonly key: `singleton/${string}`;
189
189
  };
190
- export type NonComparableReason = "eval-population-mismatch";
191
- export interface NonComparableIssue {
192
- readonly reason: NonComparableReason;
193
- readonly members: readonly ExperimentId[];
194
- readonly actual: readonly {
195
- readonly member: ExperimentId;
196
- readonly population: JsonValue | null;
197
- readonly basis: JsonValue | null;
198
- }[];
199
- readonly refs: readonly EvidenceRef[];
200
- readonly params: Readonly<Record<string, JsonValue>>;
190
+ export interface ExperimentEvalCoverage {
191
+ readonly member: ExperimentId;
192
+ readonly coveredEvalCount: number;
193
+ readonly groupEvalCount: number;
201
194
  }
202
- export type ExperimentComparisonState = {
203
- readonly state: "comparable";
204
- readonly members: readonly ExperimentId[];
205
- } | {
206
- readonly state: "non-comparable";
195
+ export interface ExperimentComparison {
207
196
  readonly members: readonly ExperimentId[];
208
- readonly issues: readonly NonComparableIssue[];
209
- };
197
+ readonly coverage: readonly ExperimentEvalCoverage[];
198
+ }
210
199
  declare const experimentComparisonScopeTypeId: unique symbol;
211
200
  /** Analysis-issued comparison capability; the backing Sample remains private. */
212
201
  export interface ExperimentComparisonScope {
213
202
  readonly group: ExperimentGroupIdentity;
214
- readonly comparison: ExperimentComparisonState;
203
+ readonly comparison: ExperimentComparison;
215
204
  readonly [experimentComparisonScopeTypeId]: true;
216
205
  }
217
206
  export interface AnalysisComparisonGroupMismatchError {
@@ -187,31 +187,20 @@ export type ExperimentGroupIdentity = {
187
187
  readonly experimentId: ExperimentId;
188
188
  readonly key: `singleton/${string}`;
189
189
  };
190
- export type NonComparableReason = "eval-population-mismatch";
191
- export interface NonComparableIssue {
192
- readonly reason: NonComparableReason;
193
- readonly members: readonly ExperimentId[];
194
- readonly actual: readonly {
195
- readonly member: ExperimentId;
196
- readonly population: JsonValue | null;
197
- readonly basis: JsonValue | null;
198
- }[];
199
- readonly refs: readonly EvidenceRef[];
200
- readonly params: Readonly<Record<string, JsonValue>>;
190
+ export interface ExperimentEvalCoverage {
191
+ readonly member: ExperimentId;
192
+ readonly coveredEvalCount: number;
193
+ readonly groupEvalCount: number;
201
194
  }
202
- export type ExperimentComparisonState = {
203
- readonly state: "comparable";
204
- readonly members: readonly ExperimentId[];
205
- } | {
206
- readonly state: "non-comparable";
195
+ export interface ExperimentComparison {
207
196
  readonly members: readonly ExperimentId[];
208
- readonly issues: readonly NonComparableIssue[];
209
- };
197
+ readonly coverage: readonly ExperimentEvalCoverage[];
198
+ }
210
199
  declare const experimentComparisonScopeTypeId: unique symbol;
211
200
  /** Analysis-issued comparison capability; the backing Sample remains private. */
212
201
  export interface ExperimentComparisonScope {
213
202
  readonly group: ExperimentGroupIdentity;
214
- readonly comparison: ExperimentComparisonState;
203
+ readonly comparison: ExperimentComparison;
215
204
  readonly [experimentComparisonScopeTypeId]: true;
216
205
  }
217
206
  export interface AnalysisComparisonGroupMismatchError {
@@ -187,31 +187,20 @@ export type ExperimentGroupIdentity = {
187
187
  readonly experimentId: ExperimentId;
188
188
  readonly key: `singleton/${string}`;
189
189
  };
190
- export type NonComparableReason = "eval-population-mismatch";
191
- export interface NonComparableIssue {
192
- readonly reason: NonComparableReason;
193
- readonly members: readonly ExperimentId[];
194
- readonly actual: readonly {
195
- readonly member: ExperimentId;
196
- readonly population: JsonValue | null;
197
- readonly basis: JsonValue | null;
198
- }[];
199
- readonly refs: readonly EvidenceRef[];
200
- readonly params: Readonly<Record<string, JsonValue>>;
190
+ export interface ExperimentEvalCoverage {
191
+ readonly member: ExperimentId;
192
+ readonly coveredEvalCount: number;
193
+ readonly groupEvalCount: number;
201
194
  }
202
- export type ExperimentComparisonState = {
203
- readonly state: "comparable";
204
- readonly members: readonly ExperimentId[];
205
- } | {
206
- readonly state: "non-comparable";
195
+ export interface ExperimentComparison {
207
196
  readonly members: readonly ExperimentId[];
208
- readonly issues: readonly NonComparableIssue[];
209
- };
197
+ readonly coverage: readonly ExperimentEvalCoverage[];
198
+ }
210
199
  declare const experimentComparisonScopeTypeId: unique symbol;
211
200
  /** Analysis-issued comparison capability; the backing Sample remains private. */
212
201
  export interface ExperimentComparisonScope {
213
202
  readonly group: ExperimentGroupIdentity;
214
- readonly comparison: ExperimentComparisonState;
203
+ readonly comparison: ExperimentComparison;
215
204
  readonly [experimentComparisonScopeTypeId]: true;
216
205
  }
217
206
  export interface AnalysisComparisonGroupMismatchError {
@@ -42,7 +42,7 @@ function experimentComparisonScope(sample, group) {
42
42
  .filter((run) => memberSet.has(String(run.experimentId)))
43
43
  .map((run) => run.runId);
44
44
  const narrowed = (0, capability_ts_1.narrowSample)(sample, { runIds });
45
- const comparison = comparisonState(narrowed, summary.members);
45
+ const comparison = comparisonDescription(narrowed, summary.members);
46
46
  const scope = Object.freeze({
47
47
  group: summary.group,
48
48
  comparison,
@@ -62,7 +62,7 @@ function sampleForExperimentComparisonScope(scope) {
62
62
  }
63
63
  return sample;
64
64
  }
65
- function comparisonState(sample, members) {
65
+ function comparisonDescription(sample, members) {
66
66
  const populations = members.map((member) => {
67
67
  const values = [...new Set(sample.snapshot.slots
68
68
  .filter((slot) => slot.state !== "excluded" && String(slot.experimentId) === String(member))
@@ -70,22 +70,15 @@ function comparisonState(sample, members) {
70
70
  .sort(compareUtf8);
71
71
  return Object.freeze({ member, population: Object.freeze(values) });
72
72
  });
73
- const reference = JSON.stringify(populations[0]?.population ?? []);
74
- if (populations.every((entry) => JSON.stringify(entry.population) === reference)) {
75
- return Object.freeze({ state: "comparable", members });
76
- }
77
- const issue = Object.freeze({
78
- reason: "eval-population-mismatch",
73
+ const groupEvalCount = new Set(populations.flatMap((entry) => entry.population)).size;
74
+ return Object.freeze({
79
75
  members,
80
- actual: Object.freeze(populations.map((entry) => Object.freeze({
76
+ coverage: Object.freeze(populations.map((entry) => Object.freeze({
81
77
  member: entry.member,
82
- population: entry.population,
83
- basis: null,
78
+ coveredEvalCount: entry.population.length,
79
+ groupEvalCount,
84
80
  }))),
85
- refs: Object.freeze([]),
86
- params: Object.freeze({ expected: populations[0]?.population ?? [] }),
87
81
  });
88
- return Object.freeze({ state: "non-comparable", members, issues: Object.freeze([issue]) });
89
82
  }
90
83
  function sameGroup(left, right) {
91
84
  return left.kind === right.kind && left.key === right.key;
@@ -1 +1 @@
1
- {"version":3,"file":"experiment-groups.js","sourceRoot":"","sources":["experiment-groups.ts"],"names":[],"mappings":";;AASA,4CA2BC;AACD,8DAkBC;AAED,gFASC;AAjED,2DAAuD;AACvD,yDAA2D;AAC3D,MAAM,UAAU,GAAkB,MAAM,CAAC,qDAAqD,CAAC,CAAC;AAChG,MAAM,YAAY,GAAG,IAAI,OAAO,EAAqC,CAAC;AAKtE,SAAgB,gBAAgB,CAAC,MAAc;IAC3C,MAAM,WAAW,GAAG,IAAI,GAAG,EAAwB,CAAC;IACpD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,C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AAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AACxG,CAAC;AACD,SAAS,SAAS,CAAC,IAA6B,EAAE,KAA8B;IAC5E,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC;AAC9D,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 type { ExperimentComparisonScope, ExperimentComparisonState, ExperimentGroupIdentity, ExperimentId, JsonValue, NonComparableIssue, Sample, } from \"./contracts.ts\";\nimport { narrowSample } from \"../sample/capability.ts\";\nimport { experimentGroupOf } from \"../shared/aggregate.ts\";\nconst scopeBrand: unique symbol = Symbol(\"niceeval.analysis.ExperimentComparisonScope.runtime\");\nconst scopeSamples = new WeakMap<ExperimentComparisonScope, Sample>();\nexport interface ExperimentGroupSummary {\n readonly group: ExperimentGroupIdentity;\n readonly members: readonly ExperimentId[];\n}\nexport function experimentGroups(sample: Sample): readonly ExperimentGroupSummary[] {\n const experiments = new Map<string, ExperimentId>();\n const selectedRuns = new Set(sample.snapshot.selection.selectedRunIds.map(String));\n for (const run of sample.snapshot.runs) {\n if (!selectedRuns.has(String(run.runId)))\n continue;\n experiments.set(String(run.experimentId), run.experimentId);\n }\n const byGroup = new Map<string, {\n group: ExperimentGroupIdentity;\n members: Map<string, ExperimentId>;\n }>();\n for (const experimentId of experiments.values()) {\n const derived = experimentGroupOf(String(experimentId));\n const group = derived.kind === \"named\"\n ? Object.freeze({ kind: \"named\" as const, groupId: derived.groupId, key: derived.key })\n : Object.freeze({ kind: \"singleton\" as const, experimentId, key: derived.key });\n const entry = byGroup.get(group.key) ?? { group, members: new Map<string, ExperimentId>() };\n entry.members.set(String(experimentId), experimentId);\n byGroup.set(group.key, entry);\n }\n return Object.freeze([...byGroup.values()]\n .sort((left, right) => compareUtf8(left.group.key, right.group.key))\n .map((entry) => Object.freeze({\n group: entry.group,\n members: Object.freeze([...entry.members.values()].sort((left, right) => compareUtf8(String(left), String(right)))),\n })));\n}\nexport function experimentComparisonScope(sample: Sample, group: ExperimentGroupIdentity): ExperimentComparisonScope {\n const summary = experimentGroups(sample).find((candidate) => candidate.group.key === group.key);\n if (summary === undefined || !sameGroup(summary.group, group)) {\n throw Object.freeze({ code: \"analysis-comparison-group-not-found\" as const, group });\n }\n const memberSet = new Set(summary.members.map(String));\n const runIds = sample.snapshot.runs\n .filter((run) => memberSet.has(String(run.experimentId)))\n .map((run) => run.runId);\n const narrowed = narrowSample(sample, { runIds });\n const comparison = comparisonState(narrowed, summary.members);\n const scope = Object.freeze({\n group: summary.group,\n comparison,\n [scopeBrand]: true as const,\n }) as unknown as ExperimentComparisonScope;\n scopeSamples.set(scope, narrowed);\n return scope;\n}\n/** @internal Used only by named comparison components. */\nexport function sampleForExperimentComparisonScope(scope: ExperimentComparisonScope): Sample {\n const sample = scopeSamples.get(scope);\n if (sample === undefined) {\n throw Object.freeze({\n code: \"analysis-comparison-group-mismatch\" as const,\n groups: Object.freeze([scope?.group].filter((value): value is ExperimentGroupIdentity => value !== undefined)),\n });\n }\n return sample;\n}\nfunction comparisonState(sample: Sample, members: readonly ExperimentId[]): ExperimentComparisonState {\n const populations = members.map((member) => {\n const values = [...new Set(sample.snapshot.slots\n .filter((slot) => slot.state !== \"excluded\" && String(slot.experimentId) === String(member))\n .map((slot) => String(slot.evalId)))]\n .sort(compareUtf8);\n return Object.freeze({ member, population: Object.freeze(values) });\n });\n const reference = JSON.stringify(populations[0]?.population ?? []);\n if (populations.every((entry) => JSON.stringify(entry.population) === reference)) {\n return Object.freeze({ state: \"comparable\" as const, members });\n }\n const issue: NonComparableIssue = Object.freeze({\n reason: \"eval-population-mismatch\" as const,\n members,\n actual: Object.freeze(populations.map((entry) => Object.freeze({\n member: entry.member,\n population: entry.population as JsonValue,\n basis: null,\n }))),\n refs: Object.freeze([]),\n params: Object.freeze({ expected: populations[0]?.population as JsonValue ?? [] }),\n });\n return Object.freeze({ state: \"non-comparable\" as const, members, issues: Object.freeze([issue]) });\n}\nfunction sameGroup(left: ExperimentGroupIdentity, right: ExperimentGroupIdentity): boolean {\n return left.kind === right.kind && left.key === right.key;\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n"]}
1
+ {"version":3,"file":"experiment-groups.js","sourceRoot":"","sources":["experiment-groups.ts"],"names":[],"mappings":";;AASA,4CA2BC;AACD,8DAkBC;AAED,gFASC;AAjED,2DAAuD;AACvD,yDAA2D;AAC3D,MAAM,UAAU,GAAkB,MAAM,CAAC,qDAAqD,CAAC,CAAC;AAChG,MAAM,YAAY,GAAG,IAAI,OAAO,EAAqC,CAAC;AAKtE,SAAgB,gBAAgB,CAAC,MAAc;IAC3C,MAAM,WAAW,GAAG,IAAI,GAAG,EAAwB,CAAC;IACpD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACrC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACpC,SAAS;QACb,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,GAAG,EAGnB,CAAC;IACL,KAAK,MAAM,YAAY,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;QAC9C,MAAM,OAA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E,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IACtF,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,OAAO;QACP,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;YAC7D,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,gBAAgB,EAAE,KAAK,CAAC,UAAU,CAAC,MAAM;YACzC,cAAc;SACjB,CAAC,CAAC,CAAC;KACP,CAAC,CAAC;AACP,CAAC;AACD,SAAS,SAAS,CAAC,IAA6B,EAAE,KAA8B;IAC5E,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC;AAC9D,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 type { ExperimentComparisonScope, ExperimentGroupIdentity, ExperimentId, Sample, } from \"./contracts.ts\";\nimport { narrowSample } from \"../sample/capability.ts\";\nimport { experimentGroupOf } from \"../shared/aggregate.ts\";\nconst scopeBrand: unique symbol = Symbol(\"niceeval.analysis.ExperimentComparisonScope.runtime\");\nconst scopeSamples = new WeakMap<ExperimentComparisonScope, Sample>();\nexport interface ExperimentGroupSummary {\n readonly group: ExperimentGroupIdentity;\n readonly members: readonly ExperimentId[];\n}\nexport function experimentGroups(sample: Sample): readonly ExperimentGroupSummary[] {\n const experiments = new Map<string, ExperimentId>();\n const selectedRuns = new Set(sample.snapshot.selection.selectedRunIds.map(String));\n for (const run of sample.snapshot.runs) {\n if (!selectedRuns.has(String(run.runId)))\n continue;\n experiments.set(String(run.experimentId), run.experimentId);\n }\n const byGroup = new Map<string, {\n group: ExperimentGroupIdentity;\n members: Map<string, ExperimentId>;\n }>();\n for (const experimentId of experiments.values()) {\n const derived = experimentGroupOf(String(experimentId));\n const group = derived.kind === \"named\"\n ? Object.freeze({ kind: \"named\" as const, groupId: derived.groupId, key: derived.key })\n : Object.freeze({ kind: \"singleton\" as const, experimentId, key: derived.key });\n const entry = byGroup.get(group.key) ?? { group, members: new Map<string, ExperimentId>() };\n entry.members.set(String(experimentId), experimentId);\n byGroup.set(group.key, entry);\n }\n return Object.freeze([...byGroup.values()]\n .sort((left, right) => compareUtf8(left.group.key, right.group.key))\n .map((entry) => Object.freeze({\n group: entry.group,\n members: Object.freeze([...entry.members.values()].sort((left, right) => compareUtf8(String(left), String(right)))),\n })));\n}\nexport function experimentComparisonScope(sample: Sample, group: ExperimentGroupIdentity): ExperimentComparisonScope {\n const summary = experimentGroups(sample).find((candidate) => candidate.group.key === group.key);\n if (summary === undefined || !sameGroup(summary.group, group)) {\n throw Object.freeze({ code: \"analysis-comparison-group-not-found\" as const, group });\n }\n const memberSet = new Set(summary.members.map(String));\n const runIds = sample.snapshot.runs\n .filter((run) => memberSet.has(String(run.experimentId)))\n .map((run) => run.runId);\n const narrowed = narrowSample(sample, { runIds });\n const comparison = comparisonDescription(narrowed, summary.members);\n const scope = Object.freeze({\n group: summary.group,\n comparison,\n [scopeBrand]: true as const,\n }) as unknown as ExperimentComparisonScope;\n scopeSamples.set(scope, narrowed);\n return scope;\n}\n/** @internal Used only by named comparison components. */\nexport function sampleForExperimentComparisonScope(scope: ExperimentComparisonScope): Sample {\n const sample = scopeSamples.get(scope);\n if (sample === undefined) {\n throw Object.freeze({\n code: \"analysis-comparison-group-mismatch\" as const,\n groups: Object.freeze([scope?.group].filter((value): value is ExperimentGroupIdentity => value !== undefined)),\n });\n }\n return sample;\n}\nfunction comparisonDescription(sample: Sample, members: readonly ExperimentId[]) {\n const populations = members.map((member) => {\n const values = [...new Set(sample.snapshot.slots\n .filter((slot) => slot.state !== \"excluded\" && String(slot.experimentId) === String(member))\n .map((slot) => String(slot.evalId)))]\n .sort(compareUtf8);\n return Object.freeze({ member, population: Object.freeze(values) });\n });\n const groupEvalCount = new Set(populations.flatMap((entry) => entry.population)).size;\n return Object.freeze({\n members,\n coverage: Object.freeze(populations.map((entry) => Object.freeze({\n member: entry.member,\n coveredEvalCount: entry.population.length,\n groupEvalCount,\n }))),\n });\n}\nfunction sameGroup(left: ExperimentGroupIdentity, right: ExperimentGroupIdentity): boolean {\n return left.kind === right.kind && left.key === right.key;\n}\nfunction compareUtf8(left: string, right: string): number {\n return Buffer.compare(Buffer.from(left), Buffer.from(right));\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,mCAAoK;AAA3J,mGAAA,SAAS,OAAA;AAAE,6GAAA,mBAAmB,OAAA;AAAE,kHAAA,wBAAwB,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,+FAAA,KAAK,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAAE,qGAAA,WAAW,OAAA;AAChJ,mDAA0V;AAAjV,iHAAA,eAAe,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAAE,+GAAA,aAAa,OAAA;AAAE,+GAAA,aAAa,OAAA;AAAE,oHAAA,kBAAkB,OAAA;AAAE,iHAAA,eAAe,OAAA;AAAE,+GAAA,aAAa,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAAE,gHAAA,cAAc,OAAA;AAAE,wHAAA,sBAAsB,OAAA;AAAE,oHAAA,kBAAkB,OAAA;AAAE,8GAAA,YAAY,OAAA;AAAE,sGAAA,IAAI,OAAA;AAAE,0GAAA,QAAQ,OAAA;AAAE,yGAAA,OAAO,OAAA;AAAE,uGAAA,KAAK,OAAA;AAAE,qHAAA,mBAAmB,OAAA;AAAE,4HAAA,0BAA0B,OAAA;AAAE,qGAAA,GAAG,OAAA;AAAE,gHAAA,cAAc,OAAA;AAC9T,qCAAgG;AAAvF,gHAAA,qBAAqB,OAAA;AAAE,kGAAA,OAAO,OAAA;AAAE,+GAAA,oBAAoB,OAAA;AAAE,uGAAA,YAAY,OAAA;AAC3E,yDAAoG;AAA3F,qHAAA,oBAAoB,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAAE,6GAAA,YAAY,OAAA;AACjE,+DAAsF;AAA7E,iIAAA,yBAAyB,OAAA;AAAE,wHAAA,gBAAgB,OAAA;AAOpD,iEAAoE;AAA3D,oHAAA,kBAAkB,OAAA","sourcesContent":["// `niceeval/analysis` is the public author surface for statistical meaning.\n// The separate public Host SDK issues Sample capabilities; Record readers stay\n// in its private binding map, while Report receives rows, frames, and values.\nexport { aggregate, attemptEvidenceView, attemptObservabilityView, fileChangesView, query, sandboxHistoryView, sourceNavigationView, sourcesView, } from \"./api.ts\";\nexport { allLogicalSlots, attemptLatencyMs, attemptTokens, attemptPassed, attemptToolFailure, defineDimension, defineMeasure, definePopulation, defineRelation, latestCompletedAttempt, logicalSlotMembers, logicalSlots, mean, oneValue, partial, ratio, requireSameProducer, retainContributingEvidence, sum, sumAcrossSlots, } from \"./definitions.ts\";\nexport { builtInPricingProfile, costUSD, definePricingProfile, totalCostUSD, } from \"./cost.ts\";\nexport { decodeSampleSnapshot, encodeSampleSnapshot, narrowSample, } from \"../sample/capability.ts\";\nexport { experimentComparisonScope, experimentGroups, } from \"./experiment-groups.ts\";\nexport type { AggregateRequest, AggregateRow, AttemptEvidenceDomainView, AttemptObservabilityDomainView, BuiltinDomainView, BuiltinDomainViewKind, ClosedDomainEntry, DimensionSet, DomainViewQuery, DomainViewRequest, FileChangesDomainView, FrameQuery, MeasureSet, MeasureCell, SandboxHistoryDomainView, SemanticFrame, SemanticRow, SourceNavigationDomainView, SourcesDomainView, } from \"./api.ts\";\nexport type { CostBasis, CostComponent, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, ObservedCostComponent, ObservedOtherCurrency, PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfile, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, ProjectedMoney, RequestPricingCharge, RequestPricingChargeInput, TokenPricingCharge, TokenPricingChargeInput, UnpricedCoverage, UnpricedCoverageInput, } from \"./cost.ts\";\nexport type { AttemptEvidenceDomainDetail, AttemptObservabilityDomainDetail, BuiltinDomainDetail, ClosedBlobContent, ClosedAssertionCollectionReceipt, ClosedAssertionContribution, ClosedAssertionCoverage, ClosedAssertionLimitation, ClosedAssertionDecision, ClosedAssertionDisplay, ClosedAssertionFactField, ClosedAssertionFactValue, ClosedAssertionObserved, ClosedAssertionPolicy, ClosedAssertionSource, ClosedAssertionSourceSite, ClosedCommandEntry, ClosedCommandInvocation, ClosedCommandOutcome, ClosedCommandStream, ClosedCommandWorkingDirectory, ClosedCommandsDetail, ClosedConversationDetail, ClosedConversationItem, ClosedConversationTurn, ClosedDiagnosticRedaction, ClosedDiagnosticsDetail, ClosedFileChange, ClosedFileChangeEndpoint, ClosedFileChangeWindow, ClosedFileChangesAttribution, ClosedFileChangesCollection, ClosedFileChangesCollectionLimitation, ClosedFileRevision, ClosedSourceFrame, ClosedTimingDetail, ClosedTimingInterval, ClosedTraceCollection, ClosedUsageDetail, ClosedUsageObservation, FileChangesDomainDetail, FileChangesNet, SourceNavigationDomainDetail, SourcesDomainDetail, } from \"./domain-view.ts\";\nexport type { AcrossSlotsReduction, AnalysisDefinitionError, AnalysisInput, Denominator, Dimension, DimensionValue, EvidencePolicy, LogicalSlot, Measure, MeasureOptions, MissingPolicy, Population, PopulationMembers, ProducerPolicy, Relation, RelationTarget, WithinAttemptReduction, WithinSlotReduction, } from \"./definitions.ts\";\nexport type { AnalysisCurrentSlotIdentity, AnalysisSlotOccurrenceIdentity, AnalysisRun, AnalysisRunContext, AnalysisRunExecution, AnalysisSelectionRequest, AnalysisSelectionSummary, EvalId, ExecutionIdentityDigest, AnalysisSlot, AnalysisIssue, AnalysisRequestError, SampleClosedError, SampleIdentity, AttemptId, ClosedRows, ClosedRowsIdentity, DomainView, EvidenceIdentity, EvidenceRef, ExperimentId, ExperimentComparisonScope, ExperimentComparisonState, ExperimentGroupIdentity, JsonValue, MeasureFormat, MetricBasis, MetricState, MetricValue, NonComparableIssue, NonComparableReason, PopulationIdentity, ProducerIdentity, RunId, Sample, SampleCoverage, SampleSelector, SampleSnapshot, SampleSnapshotCodecError, SlotId, } from \"./contracts.ts\";\nexport type { ExperimentGroupSummary } from \"./experiment-groups.ts\";\nexport { ExperimentIdSchema } from \"../record/codec/identifiers.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,mCAAoK;AAA3J,mGAAA,SAAS,OAAA;AAAE,6GAAA,mBAAmB,OAAA;AAAE,kHAAA,wBAAwB,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,+FAAA,KAAK,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAAE,qGAAA,WAAW,OAAA;AAChJ,mDAA0V;AAAjV,iHAAA,eAAe,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAAE,+GAAA,aAAa,OAAA;AAAE,+GAAA,aAAa,OAAA;AAAE,oHAAA,kBAAkB,OAAA;AAAE,iHAAA,eAAe,OAAA;AAAE,+GAAA,aAAa,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAAE,gHAAA,cAAc,OAAA;AAAE,wHAAA,sBAAsB,OAAA;AAAE,oHAAA,kBAAkB,OAAA;AAAE,8GAAA,YAAY,OAAA;AAAE,sGAAA,IAAI,OAAA;AAAE,0GAAA,QAAQ,OAAA;AAAE,yGAAA,OAAO,OAAA;AAAE,uGAAA,KAAK,OAAA;AAAE,qHAAA,mBAAmB,OAAA;AAAE,4HAAA,0BAA0B,OAAA;AAAE,qGAAA,GAAG,OAAA;AAAE,gHAAA,cAAc,OAAA;AAC9T,qCAAgG;AAAvF,gHAAA,qBAAqB,OAAA;AAAE,kGAAA,OAAO,OAAA;AAAE,+GAAA,oBAAoB,OAAA;AAAE,uGAAA,YAAY,OAAA;AAC3E,yDAAoG;AAA3F,qHAAA,oBAAoB,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAAE,6GAAA,YAAY,OAAA;AACjE,+DAAsF;AAA7E,iIAAA,yBAAyB,OAAA;AAAE,wHAAA,gBAAgB,OAAA;AAOpD,iEAAoE;AAA3D,oHAAA,kBAAkB,OAAA","sourcesContent":["// `niceeval/analysis` is the public author surface for statistical meaning.\n// The separate public Host SDK issues Sample capabilities; Record readers stay\n// in its private binding map, while Report receives rows, frames, and values.\nexport { aggregate, attemptEvidenceView, attemptObservabilityView, fileChangesView, query, sandboxHistoryView, sourceNavigationView, sourcesView, } from \"./api.ts\";\nexport { allLogicalSlots, attemptLatencyMs, attemptTokens, attemptPassed, attemptToolFailure, defineDimension, defineMeasure, definePopulation, defineRelation, latestCompletedAttempt, logicalSlotMembers, logicalSlots, mean, oneValue, partial, ratio, requireSameProducer, retainContributingEvidence, sum, sumAcrossSlots, } from \"./definitions.ts\";\nexport { builtInPricingProfile, costUSD, definePricingProfile, totalCostUSD, } from \"./cost.ts\";\nexport { decodeSampleSnapshot, encodeSampleSnapshot, narrowSample, } from \"../sample/capability.ts\";\nexport { experimentComparisonScope, experimentGroups, } from \"./experiment-groups.ts\";\nexport type { AggregateRequest, AggregateRow, AttemptEvidenceDomainView, AttemptObservabilityDomainView, BuiltinDomainView, BuiltinDomainViewKind, ClosedDomainEntry, DimensionSet, DomainViewQuery, DomainViewRequest, FileChangesDomainView, FrameQuery, MeasureSet, MeasureCell, SandboxHistoryDomainView, SemanticFrame, SemanticRow, SourceNavigationDomainView, SourcesDomainView, } from \"./api.ts\";\nexport type { CostBasis, CostComponent, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, ObservedCostComponent, ObservedOtherCurrency, PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfile, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, ProjectedMoney, RequestPricingCharge, RequestPricingChargeInput, TokenPricingCharge, TokenPricingChargeInput, UnpricedCoverage, UnpricedCoverageInput, } from \"./cost.ts\";\nexport type { AttemptEvidenceDomainDetail, AttemptObservabilityDomainDetail, BuiltinDomainDetail, ClosedBlobContent, ClosedAssertionCollectionReceipt, ClosedAssertionContribution, ClosedAssertionCoverage, ClosedAssertionLimitation, ClosedAssertionDecision, ClosedAssertionDisplay, ClosedAssertionFactField, ClosedAssertionFactValue, ClosedAssertionObserved, ClosedAssertionPolicy, ClosedAssertionSource, ClosedAssertionSourceSite, ClosedCommandEntry, ClosedCommandInvocation, ClosedCommandOutcome, ClosedCommandStream, ClosedCommandWorkingDirectory, ClosedCommandsDetail, ClosedConversationDetail, ClosedConversationItem, ClosedConversationTurn, ClosedDiagnosticRedaction, ClosedDiagnosticsDetail, ClosedFileChange, ClosedFileChangeEndpoint, ClosedFileChangeWindow, ClosedFileChangesAttribution, ClosedFileChangesCollection, ClosedFileChangesCollectionLimitation, ClosedFileRevision, ClosedSourceFrame, ClosedTimingDetail, ClosedTimingInterval, ClosedTraceCollection, ClosedUsageDetail, ClosedUsageObservation, FileChangesDomainDetail, FileChangesNet, SourceNavigationDomainDetail, SourcesDomainDetail, } from \"./domain-view.ts\";\nexport type { AcrossSlotsReduction, AnalysisDefinitionError, AnalysisInput, Denominator, Dimension, DimensionValue, EvidencePolicy, LogicalSlot, Measure, MeasureOptions, MissingPolicy, Population, PopulationMembers, ProducerPolicy, Relation, RelationTarget, WithinAttemptReduction, WithinSlotReduction, } from \"./definitions.ts\";\nexport type { AnalysisCurrentSlotIdentity, AnalysisSlotOccurrenceIdentity, AnalysisRun, AnalysisRunContext, AnalysisRunExecution, AnalysisSelectionRequest, AnalysisSelectionSummary, EvalId, ExecutionIdentityDigest, AnalysisSlot, AnalysisIssue, AnalysisRequestError, SampleClosedError, SampleIdentity, AttemptId, ClosedRows, ClosedRowsIdentity, DomainView, EvidenceIdentity, EvidenceRef, ExperimentId, ExperimentComparison, ExperimentComparisonScope, ExperimentEvalCoverage, ExperimentGroupIdentity, JsonValue, MeasureFormat, MetricBasis, MetricState, MetricValue, PopulationIdentity, ProducerIdentity, RunId, Sample, SampleCoverage, SampleSelector, SampleSnapshot, SampleSnapshotCodecError, SlotId, } from \"./contracts.ts\";\nexport type { ExperimentGroupSummary } from \"./experiment-groups.ts\";\nexport { ExperimentIdSchema } from \"../record/codec/identifiers.ts\";\n"]}
@@ -7,6 +7,6 @@ export type { AggregateRequest, AggregateRow, AttemptEvidenceDomainView, Attempt
7
7
  export type { CostBasis, CostComponent, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, ObservedCostComponent, ObservedOtherCurrency, PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfile, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, ProjectedMoney, RequestPricingCharge, RequestPricingChargeInput, TokenPricingCharge, TokenPricingChargeInput, UnpricedCoverage, UnpricedCoverageInput, } from "./cost.cjs";
8
8
  export type { AttemptEvidenceDomainDetail, AttemptObservabilityDomainDetail, BuiltinDomainDetail, ClosedBlobContent, ClosedAssertionCollectionReceipt, ClosedAssertionContribution, ClosedAssertionCoverage, ClosedAssertionLimitation, ClosedAssertionDecision, ClosedAssertionDisplay, ClosedAssertionFactField, ClosedAssertionFactValue, ClosedAssertionObserved, ClosedAssertionPolicy, ClosedAssertionSource, ClosedAssertionSourceSite, ClosedCommandEntry, ClosedCommandInvocation, ClosedCommandOutcome, ClosedCommandStream, ClosedCommandWorkingDirectory, ClosedCommandsDetail, ClosedConversationDetail, ClosedConversationItem, ClosedConversationTurn, ClosedDiagnosticRedaction, ClosedDiagnosticsDetail, ClosedFileChange, ClosedFileChangeEndpoint, ClosedFileChangeWindow, ClosedFileChangesAttribution, ClosedFileChangesCollection, ClosedFileChangesCollectionLimitation, ClosedFileRevision, ClosedSourceFrame, ClosedTimingDetail, ClosedTimingInterval, ClosedTraceCollection, ClosedUsageDetail, ClosedUsageObservation, FileChangesDomainDetail, FileChangesNet, SourceNavigationDomainDetail, SourcesDomainDetail, } from "./domain-view.cjs";
9
9
  export type { AcrossSlotsReduction, AnalysisDefinitionError, AnalysisInput, Denominator, Dimension, DimensionValue, EvidencePolicy, LogicalSlot, Measure, MeasureOptions, MissingPolicy, Population, PopulationMembers, ProducerPolicy, Relation, RelationTarget, WithinAttemptReduction, WithinSlotReduction, } from "./definitions.cjs";
10
- export type { AnalysisCurrentSlotIdentity, AnalysisSlotOccurrenceIdentity, AnalysisRun, AnalysisRunContext, AnalysisRunExecution, AnalysisSelectionRequest, AnalysisSelectionSummary, EvalId, ExecutionIdentityDigest, AnalysisSlot, AnalysisIssue, AnalysisRequestError, SampleClosedError, SampleIdentity, AttemptId, ClosedRows, ClosedRowsIdentity, DomainView, EvidenceIdentity, EvidenceRef, ExperimentId, ExperimentComparisonScope, ExperimentComparisonState, ExperimentGroupIdentity, JsonValue, MeasureFormat, MetricBasis, MetricState, MetricValue, NonComparableIssue, NonComparableReason, PopulationIdentity, ProducerIdentity, RunId, Sample, SampleCoverage, SampleSelector, SampleSnapshot, SampleSnapshotCodecError, SlotId, } from "./contracts.cjs";
10
+ export type { AnalysisCurrentSlotIdentity, AnalysisSlotOccurrenceIdentity, AnalysisRun, AnalysisRunContext, AnalysisRunExecution, AnalysisSelectionRequest, AnalysisSelectionSummary, EvalId, ExecutionIdentityDigest, AnalysisSlot, AnalysisIssue, AnalysisRequestError, SampleClosedError, SampleIdentity, AttemptId, ClosedRows, ClosedRowsIdentity, DomainView, EvidenceIdentity, EvidenceRef, ExperimentId, ExperimentComparison, ExperimentComparisonScope, ExperimentEvalCoverage, ExperimentGroupIdentity, JsonValue, MeasureFormat, MetricBasis, MetricState, MetricValue, PopulationIdentity, ProducerIdentity, RunId, Sample, SampleCoverage, SampleSelector, SampleSnapshot, SampleSnapshotCodecError, SlotId, } from "./contracts.cjs";
11
11
  export type { ExperimentGroupSummary } from "./experiment-groups.cjs";
12
12
  export { ExperimentIdSchema } from "../record/codec/identifiers.cjs";
@@ -7,6 +7,6 @@ export type { AggregateRequest, AggregateRow, AttemptEvidenceDomainView, Attempt
7
7
  export type { CostBasis, CostComponent, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, ObservedCostComponent, ObservedOtherCurrency, PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfile, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, ProjectedMoney, RequestPricingCharge, RequestPricingChargeInput, TokenPricingCharge, TokenPricingChargeInput, UnpricedCoverage, UnpricedCoverageInput, } from "./cost.mjs";
8
8
  export type { AttemptEvidenceDomainDetail, AttemptObservabilityDomainDetail, BuiltinDomainDetail, ClosedBlobContent, ClosedAssertionCollectionReceipt, ClosedAssertionContribution, ClosedAssertionCoverage, ClosedAssertionLimitation, ClosedAssertionDecision, ClosedAssertionDisplay, ClosedAssertionFactField, ClosedAssertionFactValue, ClosedAssertionObserved, ClosedAssertionPolicy, ClosedAssertionSource, ClosedAssertionSourceSite, ClosedCommandEntry, ClosedCommandInvocation, ClosedCommandOutcome, ClosedCommandStream, ClosedCommandWorkingDirectory, ClosedCommandsDetail, ClosedConversationDetail, ClosedConversationItem, ClosedConversationTurn, ClosedDiagnosticRedaction, ClosedDiagnosticsDetail, ClosedFileChange, ClosedFileChangeEndpoint, ClosedFileChangeWindow, ClosedFileChangesAttribution, ClosedFileChangesCollection, ClosedFileChangesCollectionLimitation, ClosedFileRevision, ClosedSourceFrame, ClosedTimingDetail, ClosedTimingInterval, ClosedTraceCollection, ClosedUsageDetail, ClosedUsageObservation, FileChangesDomainDetail, FileChangesNet, SourceNavigationDomainDetail, SourcesDomainDetail, } from "./domain-view.mjs";
9
9
  export type { AcrossSlotsReduction, AnalysisDefinitionError, AnalysisInput, Denominator, Dimension, DimensionValue, EvidencePolicy, LogicalSlot, Measure, MeasureOptions, MissingPolicy, Population, PopulationMembers, ProducerPolicy, Relation, RelationTarget, WithinAttemptReduction, WithinSlotReduction, } from "./definitions.mjs";
10
- export type { AnalysisCurrentSlotIdentity, AnalysisSlotOccurrenceIdentity, AnalysisRun, AnalysisRunContext, AnalysisRunExecution, AnalysisSelectionRequest, AnalysisSelectionSummary, EvalId, ExecutionIdentityDigest, AnalysisSlot, AnalysisIssue, AnalysisRequestError, SampleClosedError, SampleIdentity, AttemptId, ClosedRows, ClosedRowsIdentity, DomainView, EvidenceIdentity, EvidenceRef, ExperimentId, ExperimentComparisonScope, ExperimentComparisonState, ExperimentGroupIdentity, JsonValue, MeasureFormat, MetricBasis, MetricState, MetricValue, NonComparableIssue, NonComparableReason, PopulationIdentity, ProducerIdentity, RunId, Sample, SampleCoverage, SampleSelector, SampleSnapshot, SampleSnapshotCodecError, SlotId, } from "./contracts.mjs";
10
+ export type { AnalysisCurrentSlotIdentity, AnalysisSlotOccurrenceIdentity, AnalysisRun, AnalysisRunContext, AnalysisRunExecution, AnalysisSelectionRequest, AnalysisSelectionSummary, EvalId, ExecutionIdentityDigest, AnalysisSlot, AnalysisIssue, AnalysisRequestError, SampleClosedError, SampleIdentity, AttemptId, ClosedRows, ClosedRowsIdentity, DomainView, EvidenceIdentity, EvidenceRef, ExperimentId, ExperimentComparison, ExperimentComparisonScope, ExperimentEvalCoverage, ExperimentGroupIdentity, JsonValue, MeasureFormat, MetricBasis, MetricState, MetricValue, PopulationIdentity, ProducerIdentity, RunId, Sample, SampleCoverage, SampleSelector, SampleSnapshot, SampleSnapshotCodecError, SlotId, } from "./contracts.mjs";
11
11
  export type { ExperimentGroupSummary } from "./experiment-groups.mjs";
12
12
  export { ExperimentIdSchema } from "../record/codec/identifiers.mjs";
@@ -7,6 +7,6 @@ export type { AggregateRequest, AggregateRow, AttemptEvidenceDomainView, Attempt
7
7
  export type { CostBasis, CostComponent, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, ObservedCostComponent, ObservedOtherCurrency, PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfile, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, ProjectedMoney, RequestPricingCharge, RequestPricingChargeInput, TokenPricingCharge, TokenPricingChargeInput, UnpricedCoverage, UnpricedCoverageInput, } from "./cost.js";
8
8
  export type { AttemptEvidenceDomainDetail, AttemptObservabilityDomainDetail, BuiltinDomainDetail, ClosedBlobContent, ClosedAssertionCollectionReceipt, ClosedAssertionContribution, ClosedAssertionCoverage, ClosedAssertionLimitation, ClosedAssertionDecision, ClosedAssertionDisplay, ClosedAssertionFactField, ClosedAssertionFactValue, ClosedAssertionObserved, ClosedAssertionPolicy, ClosedAssertionSource, ClosedAssertionSourceSite, ClosedCommandEntry, ClosedCommandInvocation, ClosedCommandOutcome, ClosedCommandStream, ClosedCommandWorkingDirectory, ClosedCommandsDetail, ClosedConversationDetail, ClosedConversationItem, ClosedConversationTurn, ClosedDiagnosticRedaction, ClosedDiagnosticsDetail, ClosedFileChange, ClosedFileChangeEndpoint, ClosedFileChangeWindow, ClosedFileChangesAttribution, ClosedFileChangesCollection, ClosedFileChangesCollectionLimitation, ClosedFileRevision, ClosedSourceFrame, ClosedTimingDetail, ClosedTimingInterval, ClosedTraceCollection, ClosedUsageDetail, ClosedUsageObservation, FileChangesDomainDetail, FileChangesNet, SourceNavigationDomainDetail, SourcesDomainDetail, } from "./domain-view.js";
9
9
  export type { AcrossSlotsReduction, AnalysisDefinitionError, AnalysisInput, Denominator, Dimension, DimensionValue, EvidencePolicy, LogicalSlot, Measure, MeasureOptions, MissingPolicy, Population, PopulationMembers, ProducerPolicy, Relation, RelationTarget, WithinAttemptReduction, WithinSlotReduction, } from "./definitions.js";
10
- export type { AnalysisCurrentSlotIdentity, AnalysisSlotOccurrenceIdentity, AnalysisRun, AnalysisRunContext, AnalysisRunExecution, AnalysisSelectionRequest, AnalysisSelectionSummary, EvalId, ExecutionIdentityDigest, AnalysisSlot, AnalysisIssue, AnalysisRequestError, SampleClosedError, SampleIdentity, AttemptId, ClosedRows, ClosedRowsIdentity, DomainView, EvidenceIdentity, EvidenceRef, ExperimentId, ExperimentComparisonScope, ExperimentComparisonState, ExperimentGroupIdentity, JsonValue, MeasureFormat, MetricBasis, MetricState, MetricValue, NonComparableIssue, NonComparableReason, PopulationIdentity, ProducerIdentity, RunId, Sample, SampleCoverage, SampleSelector, SampleSnapshot, SampleSnapshotCodecError, SlotId, } from "./contracts.js";
10
+ export type { AnalysisCurrentSlotIdentity, AnalysisSlotOccurrenceIdentity, AnalysisRun, AnalysisRunContext, AnalysisRunExecution, AnalysisSelectionRequest, AnalysisSelectionSummary, EvalId, ExecutionIdentityDigest, AnalysisSlot, AnalysisIssue, AnalysisRequestError, SampleClosedError, SampleIdentity, AttemptId, ClosedRows, ClosedRowsIdentity, DomainView, EvidenceIdentity, EvidenceRef, ExperimentId, ExperimentComparison, ExperimentComparisonScope, ExperimentEvalCoverage, ExperimentGroupIdentity, JsonValue, MeasureFormat, MetricBasis, MetricState, MetricValue, PopulationIdentity, ProducerIdentity, RunId, Sample, SampleCoverage, SampleSelector, SampleSnapshot, SampleSnapshotCodecError, SlotId, } from "./contracts.js";
11
11
  export type { ExperimentGroupSummary } from "./experiment-groups.js";
12
12
  export { ExperimentIdSchema } from "../record/codec/identifiers.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CliReportPlatform = exports.CliTerminal = exports.CliPath = exports.BrowserLauncher = exports.PackageMetadata = exports.ProjectInitializer = exports.CliOutput = exports.CliInvocationFacts = exports.CliInvocationError = exports.CliArguments = void 0;
3
+ exports.CliPath = exports.PackageMetadata = exports.CliOutput = exports.CliInterruption = exports.CliInvocationFacts = exports.CliInvocationError = exports.CliArguments = void 0;
4
4
  /**
5
5
  * Platform-neutral CLI application contract. Command parsing, selection and
6
6
  * presentation consume these capabilities; Node wiring lives only in the
@@ -16,25 +16,16 @@ exports.CliInvocationError = CliInvocationError;
16
16
  class CliInvocationFacts extends effect_1.Context.Tag("niceeval/cli/CliInvocationFacts")() {
17
17
  }
18
18
  exports.CliInvocationFacts = CliInvocationFacts;
19
+ class CliInterruption extends effect_1.Context.Tag("niceeval/cli/CliInterruption")() {
20
+ }
21
+ exports.CliInterruption = CliInterruption;
19
22
  class CliOutput extends effect_1.Context.Tag("niceeval/cli/CliOutput")() {
20
23
  }
21
24
  exports.CliOutput = CliOutput;
22
- class ProjectInitializer extends effect_1.Context.Tag("niceeval/cli/ProjectInitializer")() {
23
- }
24
- exports.ProjectInitializer = ProjectInitializer;
25
25
  class PackageMetadata extends effect_1.Context.Tag("niceeval/cli/PackageMetadata")() {
26
26
  }
27
27
  exports.PackageMetadata = PackageMetadata;
28
- class BrowserLauncher extends effect_1.Context.Tag("niceeval/cli/BrowserLauncher")() {
29
- }
30
- exports.BrowserLauncher = BrowserLauncher;
31
28
  class CliPath extends effect_1.Context.Tag("niceeval/cli/CliPath")() {
32
29
  }
33
30
  exports.CliPath = CliPath;
34
- class CliTerminal extends effect_1.Context.Tag("niceeval/cli/CliTerminal")() {
35
- }
36
- exports.CliTerminal = CliTerminal;
37
- class CliReportPlatform extends effect_1.Context.Tag("niceeval/cli/CliReportPlatform")() {
38
- }
39
- exports.CliReportPlatform = CliReportPlatform;
40
31
  //# sourceMappingURL=application.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,mCAA+C;AAsC/C,MAAa,YAAa,SAAQ,gBAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,EAAqC;CAC9G;AADD,oCACC;AACD,MAAa,kBAAmB,SAAQ,aAAI,CAAC,WAAW,CAAC,oBAAoB,CAG3E;CACD;AAJD,gDAIC;AAID,MAAa,kBAAmB,SAAQ,gBAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,EAA4C;CACjI;AADD,gDACC;AAQD,MAAa,SAAU,SAAQ,gBAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,EAA+B;CAClG;AADD,8BACC;AAMD,MAAa,kBAAmB,SAAQ,gBAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,EAAiD;CACtI;AADD,gDACC;AAID,MAAa,eAAgB,SAAQ,gBAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,EAA2C;CAC1H;AADD,0CACC;AAID,MAAa,eAAgB,SAAQ,gBAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,EAA2C;CAC1H;AADD,0CACC;AAKD,MAAa,OAAQ,SAAQ,gBAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,EAA2B;CAC1F;AADD,0BACC;AAKD,MAAa,WAAY,SAAQ,gBAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,EAAmC;CAC1G;AADD,kCACC;AAiBD,MAAa,iBAAkB,SAAQ,gBAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,EAA+C;CAClI;AADD,8CACC","sourcesContent":["/**\n * Platform-neutral CLI application contract. Command parsing, selection and\n * presentation consume these capabilities; Node wiring lives only in the\n * bootstrap adapter.\n */\nimport { Context, Data, Effect } from \"effect\";\nimport type { Config } from \"../runner/types.ts\";\nimport type { FeedbackIO } from \"../runner/feedback/io.ts\";\nimport type { InputGuardStdin } from \"../runner/feedback/input-guard.ts\";\nimport type { ReportDefinition } from \"../report/definition/report.ts\";\nimport type { ThemeDefinition } from \"../report/theme.ts\";\nimport type { ConfigModuleLoadError, ProjectCredentialsFailure } from \"./project-configuration.ts\";\nexport interface CliInvocation {\n readonly cwd: string;\n readonly argv: readonly string[];\n readonly hostname: string;\n readonly noColor?: string;\n readonly platform: \"darwin\" | \"win32\" | \"linux\" | string;\n readonly stdout: {\n readonly isTTY: boolean;\n readonly columns?: number;\n };\n readonly stderr: {\n readonly isTTY: boolean;\n readonly columns?: number;\n };\n}\nexport type CliOptionDefinition = Readonly<{\n type: \"string\" | \"boolean\";\n multiple?: true;\n short?: string;\n}>;\nexport interface CliParsedTokens {\n readonly values: Record<string, string | boolean | string[] | undefined>;\n readonly positionals: string[];\n readonly tokens: readonly {\n readonly kind: string;\n readonly name?: string;\n }[];\n}\nexport interface CliArgumentsService {\n readonly parse: (argv: readonly string[], options: Readonly<Record<string, CliOptionDefinition>>) => CliParsedTokens;\n}\nexport class CliArguments extends Context.Tag(\"niceeval/cli/CliArguments\")<CliArguments, CliArgumentsService>() {\n}\nexport class CliInvocationError extends Data.TaggedError(\"CliInvocationError\")<{\n readonly operation: string;\n readonly cause: unknown;\n}> {\n}\nexport interface CliInvocationService {\n readonly facts: Effect.Effect<CliInvocation, CliInvocationError>;\n}\nexport class CliInvocationFacts extends Context.Tag(\"niceeval/cli/CliInvocationFacts\")<CliInvocationFacts, CliInvocationService>() {\n}\nexport interface CliOutputService {\n readonly writeStdout: (text: string) => Effect.Effect<void, CliInvocationError>;\n readonly writeStderr: (text: string) => Effect.Effect<void, CliInvocationError>;\n /** Callback bridge for Host observer contracts that cannot return Effect. */\n readonly writeStdoutSync: (text: string) => void;\n readonly writeStderrSync: (text: string) => void;\n}\nexport class CliOutput extends Context.Tag(\"niceeval/cli/CliOutput\")<CliOutput, CliOutputService>() {\n}\nexport interface ProjectInitializerService {\n readonly initialize: (cwd: string) => Effect.Effect<{\n readonly prefersEsm: boolean;\n }, CliInvocationError>;\n}\nexport class ProjectInitializer extends Context.Tag(\"niceeval/cli/ProjectInitializer\")<ProjectInitializer, ProjectInitializerService>() {\n}\nexport interface PackageMetadataService {\n readonly version: Effect.Effect<string, CliInvocationError>;\n}\nexport class PackageMetadata extends Context.Tag(\"niceeval/cli/PackageMetadata\")<PackageMetadata, PackageMetadataService>() {\n}\nexport interface BrowserLauncherService {\n readonly open: (url: string) => Effect.Effect<boolean, CliInvocationError>;\n}\nexport class BrowserLauncher extends Context.Tag(\"niceeval/cli/BrowserLauncher\")<BrowserLauncher, BrowserLauncherService>() {\n}\nexport interface CliPathService {\n readonly resolve: (...parts: readonly string[]) => string;\n readonly isAbsolute: (path: string) => boolean;\n}\nexport class CliPath extends Context.Tag(\"niceeval/cli/CliPath\")<CliPath, CliPathService>() {\n}\nexport interface CliTerminalService {\n readonly feedback: FeedbackIO;\n readonly stdin: InputGuardStdin;\n}\nexport class CliTerminal extends Context.Tag(\"niceeval/cli/CliTerminal\")<CliTerminal, CliTerminalService>() {\n}\nexport interface CliReportPlatformService {\n readonly loadConfig: (cwd: string) => Effect.Effect<{\n readonly report?: ReportDefinition;\n readonly theme?: ThemeDefinition;\n readonly watchInputs: readonly string[];\n }, CliInvocationError>;\n readonly loadReport: (path: string) => Effect.Effect<{\n readonly report: ReportDefinition;\n readonly watchInputs: readonly string[];\n }, CliInvocationError>;\n readonly loadTheme: (path: string) => Effect.Effect<{\n readonly theme: ThemeDefinition;\n readonly watchInputs: readonly string[];\n }, CliInvocationError>;\n readonly resolveModulePath: (cwd: string, value: string) => string;\n}\nexport class CliReportPlatform extends Context.Tag(\"niceeval/cli/CliReportPlatform\")<CliReportPlatform, CliReportPlatformService>() {\n}\n/** A narrow application facade; config always follows credential preparation. */\nexport interface ProjectConfigurationFacade {\n readonly load: (cwd: string) => Effect.Effect<Config, ProjectCredentialsFailure | ConfigModuleLoadError>;\n readonly rebuild: (cwd: string) => Effect.Effect<Config, ProjectCredentialsFailure | ConfigModuleLoadError>;\n}\n"]}
1
+ {"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,mCAA+C;AAwE/C,MAAa,YAAa,SAAQ,gBAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,EAAqC;CAC9G;AADD,oCACC;AACD,MAAa,kBAAmB,SAAQ,aAAI,CAAC,WAAW,CAAC,oBAAoB,CAG3E;CACD;AAJD,gDAIC;AAID,MAAa,kBAAmB,SAAQ,gBAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,EAA4C;CACjI;AADD,gDACC;AAYD,MAAa,eAAgB,SAAQ,gBAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,EAA2C;CAC1H;AADD,0CACC;AAQD,MAAa,SAAU,SAAQ,gBAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,EAA+B;CAClG;AADD,8BACC;AAID,MAAa,eAAgB,SAAQ,gBAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,EAA2C;CAC1H;AADD,0CACC;AAKD,MAAa,OAAQ,SAAQ,gBAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,EAA2B;CAC1F;AADD,0BACC","sourcesContent":["/**\n * Platform-neutral CLI application contract. Command parsing, selection and\n * presentation consume these capabilities; Node wiring lives only in the\n * bootstrap adapter.\n */\nimport { Context, Data, Effect } from \"effect\";\nexport interface CliInvocation {\n readonly cwd: string;\n readonly argv: readonly string[];\n readonly hostname: string;\n /** Process identity exposed by the Node adapter for feature-owned lease coordination. */\n readonly pid: number;\n readonly noColor?: string;\n readonly platform: \"darwin\" | \"win32\" | \"linux\" | string;\n readonly stdout: {\n readonly isTTY: boolean;\n readonly columns?: number;\n };\n readonly stderr: {\n readonly isTTY: boolean;\n readonly columns?: number;\n };\n}\n/** Immutable display metadata owned with an option, rather than reconstructed by a central CLI registry. */\nexport interface CliOptionHelp {\n readonly summary: string;\n /** Hidden options remain parser-recognized but do not become part of user help or generated reference. */\n readonly visibility: \"public\" | \"hidden\";\n}\n/** A parser option plus the feature-owned metadata needed to compose and document it. */\nexport interface CliOptionalOptionValue {\n /** Value produced by a bare option. Boolean `true` preserves ordinary flag semantics. */\n readonly default: string | true;\n /** Accept one following token as the value. Inline `--name=value` is always accepted. */\n readonly separated?: true;\n /** Closed value vocabulary. Omit for an arbitrary non-empty string. */\n readonly values?: readonly string[];\n}\nexport type CliOptionDefinition = Readonly<{\n readonly type: \"string\" | \"boolean\";\n readonly multiple?: true;\n readonly short?: string;\n /** Generic boolean|string union syntax owned by this option, not by the root router. */\n readonly optionalValue?: CliOptionalOptionValue;\n readonly help?: CliOptionHelp;\n}>;\nexport type CliParsedToken = Readonly<{\n readonly kind: \"option\";\n readonly index: number;\n readonly name: string;\n readonly rawName: string;\n readonly value?: string;\n readonly inlineValue?: boolean;\n}> | Readonly<{\n readonly kind: \"positional\";\n readonly index: number;\n readonly name?: undefined;\n readonly rawName?: undefined;\n readonly value: string;\n readonly inlineValue?: undefined;\n}> | Readonly<{\n readonly kind: \"option-terminator\";\n readonly index: number;\n readonly name?: undefined;\n readonly rawName?: undefined;\n readonly value?: undefined;\n readonly inlineValue?: undefined;\n}>;\nexport interface CliParsedTokens {\n readonly values: Record<string, string | boolean | string[] | undefined>;\n readonly positionals: readonly string[];\n /** Exact Node parseArgs tokens, including raw argv indexes used for root projection. */\n readonly tokens: readonly CliParsedToken[];\n}\nexport interface CliArgumentsService {\n readonly parse: (argv: readonly string[], options: Readonly<Record<string, CliOptionDefinition>>) => CliParsedTokens;\n}\nexport class CliArguments extends Context.Tag(\"niceeval/cli/CliArguments\")<CliArguments, CliArgumentsService>() {\n}\nexport class CliInvocationError extends Data.TaggedError(\"CliInvocationError\")<{\n readonly operation: string;\n readonly cause: unknown;\n}> {\n}\nexport interface CliInvocationService {\n readonly facts: Effect.Effect<CliInvocation, CliInvocationError>;\n}\nexport class CliInvocationFacts extends Context.Tag(\"niceeval/cli/CliInvocationFacts\")<CliInvocationFacts, CliInvocationService>() {\n}\n/**\n * Process-signal ownership stays at the application boundary. A feature may\n * claim the Invocation signal immediately before dispatch, but it never reads\n * Node globals or installs handlers of its own.\n */\nexport interface CliInterruptionService {\n readonly invocationSignal: AbortSignal;\n /** False means bootstrap already accepted a root-owned first signal. */\n readonly enterGracefulDispatch: () => boolean;\n readonly requestInterrupt: () => void;\n}\nexport class CliInterruption extends Context.Tag(\"niceeval/cli/CliInterruption\")<CliInterruption, CliInterruptionService>() {\n}\nexport interface CliOutputService {\n readonly writeStdout: (text: string) => Effect.Effect<void, CliInvocationError>;\n readonly writeStderr: (text: string) => Effect.Effect<void, CliInvocationError>;\n /** Callback bridge for Host observer contracts that cannot return Effect. */\n readonly writeStdoutSync: (text: string) => void;\n readonly writeStderrSync: (text: string) => void;\n}\nexport class CliOutput extends Context.Tag(\"niceeval/cli/CliOutput\")<CliOutput, CliOutputService>() {\n}\nexport interface PackageMetadataService {\n readonly version: Effect.Effect<string, CliInvocationError>;\n}\nexport class PackageMetadata extends Context.Tag(\"niceeval/cli/PackageMetadata\")<PackageMetadata, PackageMetadataService>() {\n}\nexport interface CliPathService {\n readonly resolve: (...parts: readonly string[]) => string;\n readonly isAbsolute: (path: string) => boolean;\n}\nexport class CliPath extends Context.Tag(\"niceeval/cli/CliPath\")<CliPath, CliPathService>() {\n}\n"]}