niceeval 0.13.3 → 0.13.4-canary.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (487) hide show
  1. package/INDEX.md +5 -5
  2. package/dist/agents/index.cjs +2 -2
  3. package/dist/agents/index.cjs.map +1 -1
  4. package/dist/agents/project.json +6 -0
  5. package/dist/agents/streaming.cjs.map +1 -1
  6. package/dist/agents/types.cjs.map +1 -1
  7. package/dist/agents/types.d.cts +1 -1
  8. package/dist/agents/types.d.mts +1 -1
  9. package/dist/agents/types.d.ts +1 -1
  10. package/dist/analysis/bindings.d.cts +8 -8
  11. package/dist/analysis/bindings.d.mts +8 -8
  12. package/dist/analysis/bindings.d.ts +8 -8
  13. package/dist/analysis/contracts.cjs.map +1 -1
  14. package/dist/analysis/contracts.d.cts +8 -19
  15. package/dist/analysis/contracts.d.mts +8 -19
  16. package/dist/analysis/contracts.d.ts +8 -19
  17. package/dist/analysis/experiment-groups.cjs +7 -14
  18. package/dist/analysis/experiment-groups.cjs.map +1 -1
  19. package/dist/analysis/index.cjs.map +1 -1
  20. package/dist/analysis/index.d.cts +1 -1
  21. package/dist/analysis/index.d.mts +1 -1
  22. package/dist/analysis/index.d.ts +1 -1
  23. package/dist/cli/application.cjs +4 -13
  24. package/dist/cli/application.cjs.map +1 -1
  25. package/dist/cli/application.d.cts +62 -59
  26. package/dist/cli/application.d.mts +62 -59
  27. package/dist/cli/application.d.ts +62 -59
  28. package/dist/cli/application.js +6 -12
  29. package/dist/cli/bootstrap.cjs +28 -2
  30. package/dist/cli/bootstrap.cjs.map +1 -1
  31. package/dist/cli/contribution.cjs +185 -0
  32. package/dist/cli/contribution.cjs.map +1 -0
  33. package/dist/cli/contribution.d.cts +55 -0
  34. package/dist/cli/contribution.d.mts +55 -0
  35. package/dist/cli/contribution.d.ts +55 -0
  36. package/dist/cli/contribution.js +20 -0
  37. package/dist/cli/contribution.js.map +1 -0
  38. package/dist/cli/node-application.cjs +119 -87
  39. package/dist/cli/node-application.cjs.map +1 -1
  40. package/dist/cli/node-application.d.cts +2 -8
  41. package/dist/cli/node-application.d.mts +2 -8
  42. package/dist/cli/node-application.d.ts +2 -8
  43. package/dist/cli/node-application.js +12 -22
  44. package/dist/cli/program.cjs +87 -2756
  45. package/dist/cli/program.cjs.map +1 -1
  46. package/dist/cli/program.d.cts +11 -332
  47. package/dist/cli/program.d.mts +11 -332
  48. package/dist/cli/program.d.ts +11 -332
  49. package/dist/cli/program.js +4 -28
  50. package/dist/cli.cjs +0 -3
  51. package/dist/cli.cjs.map +1 -1
  52. package/dist/cli.d.cts +0 -1
  53. package/dist/cli.d.mts +0 -1
  54. package/dist/cli.d.ts +0 -1
  55. package/dist/cli.js +6 -14
  56. package/dist/define.cjs +1 -1
  57. package/dist/define.cjs.map +1 -1
  58. package/dist/docker/cache-administration.cjs +8 -0
  59. package/dist/docker/cache-administration.cjs.map +1 -0
  60. package/dist/docker/cache-administration.d.cts +33 -0
  61. package/dist/docker/cache-administration.d.mts +33 -0
  62. package/dist/docker/cache-administration.d.ts +33 -0
  63. package/dist/docker/cache-administration.js +6 -0
  64. package/dist/docker/cache-administration.js.map +1 -0
  65. package/dist/docker/cache-live.cjs +27 -0
  66. package/dist/docker/cache-live.cjs.map +1 -0
  67. package/dist/docker/cache-live.d.cts +3 -0
  68. package/dist/docker/cache-live.d.mts +3 -0
  69. package/dist/docker/cache-live.d.ts +3 -0
  70. package/dist/docker/cache-live.js +6 -0
  71. package/dist/docker/cache-live.js.map +1 -0
  72. package/dist/docker/cli/contribution.cjs +223 -0
  73. package/dist/docker/cli/contribution.cjs.map +1 -0
  74. package/dist/docker/cli/contribution.d.cts +48 -0
  75. package/dist/docker/cli/contribution.d.mts +48 -0
  76. package/dist/docker/cli/contribution.d.ts +48 -0
  77. package/dist/docker/cli/contribution.js +8 -0
  78. package/dist/docker/cli/contribution.js.map +1 -0
  79. package/dist/eval/cli/contribution.cjs +62 -0
  80. package/dist/eval/cli/contribution.cjs.map +1 -0
  81. package/dist/eval/cli/contribution.d.cts +21 -0
  82. package/dist/eval/cli/contribution.d.mts +21 -0
  83. package/dist/eval/cli/contribution.d.ts +21 -0
  84. package/dist/eval/cli/contribution.js +8 -0
  85. package/dist/eval/cli/contribution.js.map +1 -0
  86. package/dist/eval/host/index.cjs +23 -0
  87. package/dist/eval/host/index.cjs.map +1 -0
  88. package/dist/eval/host/index.d.cts +27 -0
  89. package/dist/eval/host/index.d.mts +27 -0
  90. package/dist/eval/host/index.d.ts +27 -0
  91. package/dist/eval/host/index.js +8 -0
  92. package/dist/eval/host/index.js.map +1 -0
  93. package/dist/eval/host/index.mjs +8 -0
  94. package/dist/eval/host/index.mjs.map +1 -0
  95. package/dist/experiment/host/cli/contribution.cjs +835 -0
  96. package/dist/experiment/host/cli/contribution.cjs.map +1 -0
  97. package/dist/experiment/host/cli/contribution.d.cts +329 -0
  98. package/dist/experiment/host/cli/contribution.d.mts +329 -0
  99. package/dist/experiment/host/cli/contribution.d.ts +329 -0
  100. package/dist/experiment/host/cli/contribution.js +22 -0
  101. package/dist/experiment/host/cli/contribution.js.map +1 -0
  102. package/dist/experiment/host/cli/index.cjs +9 -0
  103. package/dist/experiment/host/cli/index.cjs.map +1 -0
  104. package/dist/experiment/host/cli/index.d.cts +2 -0
  105. package/dist/experiment/host/cli/index.d.mts +2 -0
  106. package/dist/experiment/host/cli/index.d.ts +2 -0
  107. package/dist/experiment/host/cli/index.js +10 -0
  108. package/dist/experiment/host/cli/index.js.map +1 -0
  109. package/dist/experiment/host/cli/terminal.cjs +15 -0
  110. package/dist/experiment/host/cli/terminal.cjs.map +1 -0
  111. package/dist/experiment/host/cli/terminal.d.cts +14 -0
  112. package/dist/experiment/host/cli/terminal.d.mts +14 -0
  113. package/dist/experiment/host/cli/terminal.d.ts +14 -0
  114. package/dist/experiment/host/cli/terminal.js +8 -0
  115. package/dist/experiment/host/cli/terminal.js.map +1 -0
  116. package/dist/experiment/host/index.cjs +35 -58
  117. package/dist/experiment/host/index.cjs.map +1 -1
  118. package/dist/experiment/host/index.d.cts +5 -79
  119. package/dist/experiment/host/index.d.mts +5 -79
  120. package/dist/experiment/host/index.d.ts +5 -79
  121. package/dist/experiment/host/index.js +4 -2
  122. package/dist/experiment/host/index.mjs +4 -2
  123. package/dist/experiment/host/operations.cjs +678 -0
  124. package/dist/experiment/host/operations.cjs.map +1 -0
  125. package/dist/experiment/host/operations.d.cts +19 -0
  126. package/dist/experiment/host/operations.d.mts +19 -0
  127. package/dist/experiment/host/operations.d.ts +19 -0
  128. package/dist/experiment/host/operations.js +24 -0
  129. package/dist/experiment/host/operations.js.map +1 -0
  130. package/dist/experiment/host/presentation.cjs +81 -0
  131. package/dist/experiment/host/presentation.cjs.map +1 -0
  132. package/dist/experiment/host/presentation.d.cts +9 -0
  133. package/dist/experiment/host/presentation.d.mts +9 -0
  134. package/dist/experiment/host/presentation.d.ts +9 -0
  135. package/dist/experiment/host/presentation.js +8 -0
  136. package/dist/experiment/host/presentation.js.map +1 -0
  137. package/dist/experiment/host/teardown.cjs +394 -0
  138. package/dist/experiment/host/teardown.cjs.map +1 -0
  139. package/dist/experiment/host/teardown.d.cts +5 -0
  140. package/dist/experiment/host/teardown.d.mts +5 -0
  141. package/dist/experiment/host/teardown.d.ts +5 -0
  142. package/dist/experiment/host/teardown.js +8 -0
  143. package/dist/experiment/host/teardown.js.map +1 -0
  144. package/dist/experiment/host/types.cjs +9 -0
  145. package/dist/experiment/host/types.cjs.map +1 -0
  146. package/dist/experiment/host/types.d.cts +423 -0
  147. package/dist/experiment/host/types.d.mts +423 -0
  148. package/dist/experiment/host/types.d.ts +423 -0
  149. package/dist/experiment/host/types.js +6 -0
  150. package/dist/experiment/host/types.js.map +1 -0
  151. package/dist/i18n/en.cjs +8 -50
  152. package/dist/i18n/en.cjs.map +1 -1
  153. package/dist/i18n/en.d.cts +2 -6
  154. package/dist/i18n/en.d.mts +2 -6
  155. package/dist/i18n/en.d.ts +2 -6
  156. package/dist/o11y/project.json +6 -0
  157. package/dist/project/cli/contribution.cjs +66 -0
  158. package/dist/project/cli/contribution.cjs.map +1 -0
  159. package/dist/project/cli/contribution.d.cts +17 -0
  160. package/dist/project/cli/contribution.d.mts +17 -0
  161. package/dist/project/cli/contribution.d.ts +17 -0
  162. package/dist/project/cli/contribution.js +8 -0
  163. package/dist/project/cli/contribution.js.map +1 -0
  164. package/dist/project/cli/index.cjs +7 -0
  165. package/dist/project/cli/index.cjs.map +1 -0
  166. package/dist/project/cli/index.d.cts +1 -0
  167. package/dist/project/cli/index.d.mts +1 -0
  168. package/dist/project/cli/index.d.ts +1 -0
  169. package/dist/project/cli/index.js +8 -0
  170. package/dist/project/cli/index.js.map +1 -0
  171. package/dist/project/host/index.cjs +11 -0
  172. package/dist/project/host/index.cjs.map +1 -0
  173. package/dist/project/host/index.d.cts +4 -0
  174. package/dist/project/host/index.d.mts +4 -0
  175. package/dist/project/host/index.d.ts +4 -0
  176. package/dist/project/host/index.js +14 -0
  177. package/dist/project/host/index.js.map +1 -0
  178. package/dist/project/host/index.mjs +14 -0
  179. package/dist/project/host/index.mjs.map +1 -0
  180. package/dist/project/host.cjs +59 -0
  181. package/dist/project/host.cjs.map +1 -0
  182. package/dist/project/host.d.cts +17 -0
  183. package/dist/project/host.d.mts +17 -0
  184. package/dist/project/host.d.ts +17 -0
  185. package/dist/project/host.js +6 -0
  186. package/dist/project/host.js.map +1 -0
  187. package/dist/project/index.cjs +11 -0
  188. package/dist/project/index.cjs.map +1 -0
  189. package/dist/project/index.d.cts +4 -0
  190. package/dist/project/index.d.mts +4 -0
  191. package/dist/project/index.d.ts +4 -0
  192. package/dist/project/index.js +14 -0
  193. package/dist/project/index.js.map +1 -0
  194. package/dist/project/node.cjs +91 -0
  195. package/dist/project/node.cjs.map +1 -0
  196. package/dist/project/node.d.cts +6 -0
  197. package/dist/project/node.d.mts +6 -0
  198. package/dist/project/node.d.ts +6 -0
  199. package/dist/project/node.js +12 -0
  200. package/dist/project/node.js.map +1 -0
  201. package/dist/project/services.cjs +17 -0
  202. package/dist/project/services.cjs.map +1 -0
  203. package/dist/project/services.d.cts +47 -0
  204. package/dist/project/services.d.mts +47 -0
  205. package/dist/project/services.d.ts +47 -0
  206. package/dist/project/services.js +12 -0
  207. package/dist/project/services.js.map +1 -0
  208. package/dist/project/templates.cjs +28 -0
  209. package/dist/project/templates.cjs.map +1 -0
  210. package/dist/project/templates.d.cts +4 -0
  211. package/dist/project/templates.d.mts +4 -0
  212. package/dist/project/templates.d.ts +4 -0
  213. package/dist/project/templates.js +12 -0
  214. package/dist/project/templates.js.map +1 -0
  215. package/dist/project.json +6 -0
  216. package/dist/record/family/catalog.d.cts +10 -10
  217. package/dist/record/family/catalog.d.mts +10 -10
  218. package/dist/record/family/catalog.d.ts +10 -10
  219. package/dist/record/family/file-changes.d.cts +8 -8
  220. package/dist/record/family/file-changes.d.mts +8 -8
  221. package/dist/record/family/file-changes.d.ts +8 -8
  222. package/dist/record/host/cli/contribution.cjs +206 -0
  223. package/dist/record/host/cli/contribution.cjs.map +1 -0
  224. package/dist/record/host/cli/contribution.d.cts +32 -0
  225. package/dist/record/host/cli/contribution.d.mts +32 -0
  226. package/dist/record/host/cli/contribution.d.ts +32 -0
  227. package/dist/record/host/cli/contribution.js +10 -0
  228. package/dist/record/host/cli/contribution.js.map +1 -0
  229. package/dist/record/host/cli/index.cjs +8 -0
  230. package/dist/record/host/cli/index.cjs.map +1 -0
  231. package/dist/record/host/cli/index.d.cts +1 -0
  232. package/dist/record/host/cli/index.d.mts +1 -0
  233. package/dist/record/host/cli/index.d.ts +1 -0
  234. package/dist/record/host/cli/index.js +10 -0
  235. package/dist/record/host/cli/index.js.map +1 -0
  236. package/dist/record/host/cli/presentation.cjs +122 -0
  237. package/dist/record/host/cli/presentation.cjs.map +1 -0
  238. package/dist/record/host/cli/presentation.d.cts +7 -0
  239. package/dist/record/host/cli/presentation.d.mts +7 -0
  240. package/dist/record/host/cli/presentation.d.ts +7 -0
  241. package/dist/record/host/cli/presentation.js +12 -0
  242. package/dist/record/host/cli/presentation.js.map +1 -0
  243. package/dist/record/host/index.cjs.map +1 -1
  244. package/dist/record/host/index.d.cts +1 -1
  245. package/dist/record/host/index.d.mts +1 -1
  246. package/dist/record/host/index.d.ts +1 -1
  247. package/dist/record/host/runtime.cjs +184 -1
  248. package/dist/record/host/runtime.cjs.map +1 -1
  249. package/dist/record/host/types.cjs.map +1 -1
  250. package/dist/record/host/types.d.cts +120 -0
  251. package/dist/record/host/types.d.mts +120 -0
  252. package/dist/record/host/types.d.ts +120 -0
  253. package/dist/record/project.json +6 -0
  254. package/dist/report/assets/styles.css +80 -0
  255. package/dist/report/cli/contribution.cjs +325 -0
  256. package/dist/report/cli/contribution.cjs.map +1 -0
  257. package/dist/report/cli/contribution.d.cts +143 -0
  258. package/dist/report/cli/contribution.d.mts +143 -0
  259. package/dist/report/cli/contribution.d.ts +143 -0
  260. package/dist/report/cli/contribution.js +12 -0
  261. package/dist/report/cli/contribution.js.map +1 -0
  262. package/dist/report/client-dist/app.js +9 -9
  263. package/dist/report/components/attempt-detail/content.cjs +1 -1
  264. package/dist/report/components/attempt-detail/content.cjs.map +1 -1
  265. package/dist/report/components/entity-lists/compute.cjs +5 -0
  266. package/dist/report/components/entity-lists/compute.cjs.map +1 -1
  267. package/dist/report/components/entity-lists/compute.d.cts +2 -0
  268. package/dist/report/components/entity-lists/compute.d.mts +2 -0
  269. package/dist/report/components/entity-lists/compute.d.ts +2 -0
  270. package/dist/report/components/entity-lists/content.cjs +35 -12
  271. package/dist/report/components/entity-lists/content.cjs.map +1 -1
  272. package/dist/report/components/entity-lists/index.cjs +0 -3
  273. package/dist/report/components/entity-lists/index.cjs.map +1 -1
  274. package/dist/report/components/summaries/index.cjs +2 -4
  275. package/dist/report/components/summaries/index.cjs.map +1 -1
  276. package/dist/report/definition/cell.cjs +7 -2
  277. package/dist/report/definition/cell.cjs.map +1 -1
  278. package/dist/report/definition/cell.d.cts +2 -0
  279. package/dist/report/definition/cell.d.mts +2 -0
  280. package/dist/report/definition/cell.d.ts +2 -0
  281. package/dist/report/definition/primitives/assertion-evidence.cjs +190 -4
  282. package/dist/report/definition/primitives/assertion-evidence.cjs.map +1 -1
  283. package/dist/report/definition/primitives/assertion-evidence.d.cts +4 -0
  284. package/dist/report/definition/primitives/assertion-evidence.d.mts +4 -0
  285. package/dist/report/definition/primitives/assertion-evidence.d.ts +4 -0
  286. package/dist/report/execution/machine.cjs +2 -3
  287. package/dist/report/execution/machine.cjs.map +1 -1
  288. package/dist/report/execution/machine.d.cts +11 -8
  289. package/dist/report/execution/machine.d.mts +11 -8
  290. package/dist/report/execution/machine.d.ts +11 -8
  291. package/dist/report/host/from-record.cjs +13 -8
  292. package/dist/report/host/from-record.cjs.map +1 -1
  293. package/dist/report/host/index.cjs +5 -1
  294. package/dist/report/host/index.cjs.map +1 -1
  295. package/dist/report/host/index.d.cts +1 -0
  296. package/dist/report/host/index.d.mts +1 -0
  297. package/dist/report/host/index.d.ts +1 -0
  298. package/dist/report/host/index.js +8 -2
  299. package/dist/report/host/index.mjs +8 -2
  300. package/dist/report/host/machine.cjs +23 -22
  301. package/dist/report/host/machine.cjs.map +1 -1
  302. package/dist/report/host/machine.d.cts +1 -1
  303. package/dist/report/host/machine.d.mts +1 -1
  304. package/dist/report/host/machine.d.ts +1 -1
  305. package/dist/report/host/node/loader.cjs +4 -2
  306. package/dist/report/host/node/loader.cjs.map +1 -1
  307. package/dist/report/host/node/loader.d.cts +3 -1
  308. package/dist/report/host/node/loader.d.mts +3 -1
  309. package/dist/report/host/node/loader.d.ts +3 -1
  310. package/dist/report/host/node.cjs +44 -9
  311. package/dist/report/host/node.cjs.map +1 -1
  312. package/dist/report/host/node.d.cts +13 -3
  313. package/dist/report/host/node.d.mts +13 -3
  314. package/dist/report/host/node.d.ts +13 -3
  315. package/dist/report/host/node.js +44 -32
  316. package/dist/report/host/operations.cjs +14 -0
  317. package/dist/report/host/operations.cjs.map +1 -0
  318. package/dist/report/host/operations.d.cts +39 -0
  319. package/dist/report/host/operations.d.mts +39 -0
  320. package/dist/report/host/operations.d.ts +39 -0
  321. package/dist/report/host/operations.js +10 -0
  322. package/dist/report/host/operations.js.map +1 -0
  323. package/dist/report/model/chart/plot.cjs +1 -1
  324. package/dist/report/model/chart/plot.cjs.map +1 -1
  325. package/dist/report/model/locale.cjs +4 -0
  326. package/dist/report/model/locale.cjs.map +1 -1
  327. package/dist/report/model/locale.d.cts +3 -1
  328. package/dist/report/model/locale.d.mts +3 -1
  329. package/dist/report/model/locale.d.ts +3 -1
  330. package/dist/report/react/styles.css +80 -0
  331. package/dist/runner/build-preparation.cjs +5 -5
  332. package/dist/runner/build-preparation.cjs.map +1 -1
  333. package/dist/runner/build-preparation.d.cts +2 -3
  334. package/dist/runner/build-preparation.d.mts +2 -3
  335. package/dist/runner/build-preparation.d.ts +2 -3
  336. package/dist/runner/feedback/coordinator.cjs +18 -15
  337. package/dist/runner/feedback/coordinator.cjs.map +1 -1
  338. package/dist/runner/feedback/coordinator.d.cts +6 -0
  339. package/dist/runner/feedback/coordinator.d.mts +6 -0
  340. package/dist/runner/feedback/coordinator.d.ts +6 -0
  341. package/dist/runner/ledger.cjs +3 -13
  342. package/dist/runner/ledger.cjs.map +1 -1
  343. package/dist/runner/ledger.d.cts +1 -3
  344. package/dist/runner/ledger.d.mts +1 -3
  345. package/dist/runner/ledger.d.ts +1 -3
  346. package/dist/runner/run.cjs +63 -18
  347. package/dist/runner/run.cjs.map +1 -1
  348. package/dist/runner/session.cjs +10 -0
  349. package/dist/runner/session.cjs.map +1 -1
  350. package/dist/runner/session.d.cts +25 -0
  351. package/dist/runner/session.d.mts +25 -0
  352. package/dist/runner/session.d.ts +25 -0
  353. package/dist/runner/types.cjs.map +1 -1
  354. package/dist/runner/types.d.cts +1 -2
  355. package/dist/runner/types.d.mts +1 -2
  356. package/dist/runner/types.d.ts +1 -2
  357. package/dist/sandbox/build-coordinator.cjs +38 -19
  358. package/dist/sandbox/build-coordinator.cjs.map +1 -1
  359. package/dist/sandbox/build-coordinator.d.cts +47 -7
  360. package/dist/sandbox/build-coordinator.d.mts +47 -7
  361. package/dist/sandbox/build-coordinator.d.ts +47 -7
  362. package/dist/sandbox/build-coordinator.js +8 -4
  363. package/dist/sandbox/cli/contribution.cjs +128 -0
  364. package/dist/sandbox/cli/contribution.cjs.map +1 -0
  365. package/dist/sandbox/cli/contribution.d.cts +71 -0
  366. package/dist/sandbox/cli/contribution.d.mts +71 -0
  367. package/dist/sandbox/cli/contribution.d.ts +71 -0
  368. package/dist/sandbox/cli/contribution.js +8 -0
  369. package/dist/sandbox/cli/contribution.js.map +1 -0
  370. package/dist/sandbox/cli-commands.cjs +14 -21
  371. package/dist/sandbox/cli-commands.cjs.map +1 -1
  372. package/dist/sandbox/cli-commands.d.cts +12 -8
  373. package/dist/sandbox/cli-commands.d.mts +12 -8
  374. package/dist/sandbox/cli-commands.d.ts +12 -8
  375. package/dist/sandbox/compose.cjs +22 -2
  376. package/dist/sandbox/compose.cjs.map +1 -1
  377. package/dist/sandbox/compose.d.cts +1 -1
  378. package/dist/sandbox/compose.d.mts +1 -1
  379. package/dist/sandbox/compose.d.ts +1 -1
  380. package/dist/sandbox/docker-profile/cli.cjs +13 -9
  381. package/dist/sandbox/docker-profile/cli.cjs.map +1 -1
  382. package/dist/sandbox/docker-profile/cli.d.cts +2 -0
  383. package/dist/sandbox/docker-profile/cli.d.mts +2 -0
  384. package/dist/sandbox/docker-profile/cli.d.ts +2 -0
  385. package/dist/sandbox/docker-profile/runtime.cjs +68 -7
  386. package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
  387. package/dist/sandbox/docker-profile/runtime.d.cts +19 -1
  388. package/dist/sandbox/docker-profile/runtime.d.mts +19 -1
  389. package/dist/sandbox/docker-profile/runtime.d.ts +19 -1
  390. package/dist/sandbox/docker-profile/runtime.js +10 -8
  391. package/dist/sandbox/docker-profile/schema.cjs +68 -19
  392. package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
  393. package/dist/sandbox/docker-profile/schema.d.cts +23 -9
  394. package/dist/sandbox/docker-profile/schema.d.mts +23 -9
  395. package/dist/sandbox/docker-profile/schema.d.ts +23 -9
  396. package/dist/sandbox/docker-task-build-cache.cjs +532 -0
  397. package/dist/sandbox/docker-task-build-cache.cjs.map +1 -0
  398. package/dist/sandbox/docker-task-build-cache.d.cts +68 -0
  399. package/dist/sandbox/docker-task-build-cache.d.mts +68 -0
  400. package/dist/sandbox/docker-task-build-cache.d.ts +68 -0
  401. package/dist/sandbox/docker-task-build-cache.js +20 -0
  402. package/dist/sandbox/docker-task-build-cache.js.map +1 -0
  403. package/dist/sandbox/docker.cjs +50 -0
  404. package/dist/sandbox/docker.cjs.map +1 -1
  405. package/dist/sandbox/docker.d.cts +15 -0
  406. package/dist/sandbox/docker.d.mts +15 -0
  407. package/dist/sandbox/docker.d.ts +15 -0
  408. package/dist/sandbox/dockerfile-build.cjs +55 -5
  409. package/dist/sandbox/dockerfile-build.cjs.map +1 -1
  410. package/dist/sandbox/dockerfile-build.d.cts +2 -2
  411. package/dist/sandbox/dockerfile-build.d.mts +2 -2
  412. package/dist/sandbox/dockerfile-build.d.ts +2 -2
  413. package/dist/sandbox/index.cjs +5 -3
  414. package/dist/sandbox/index.cjs.map +1 -1
  415. package/dist/sandbox/index.d.cts +4 -3
  416. package/dist/sandbox/index.d.mts +4 -3
  417. package/dist/sandbox/index.d.ts +4 -3
  418. package/dist/sandbox/index.js +16 -14
  419. package/dist/sandbox/index.mjs +16 -14
  420. package/dist/sandbox/keep.cjs +1 -3
  421. package/dist/sandbox/keep.cjs.map +1 -1
  422. package/dist/sandbox/layer.cjs +70 -79
  423. package/dist/sandbox/layer.cjs.map +1 -1
  424. package/dist/sandbox/layer.d.cts +6 -12
  425. package/dist/sandbox/layer.d.mts +6 -12
  426. package/dist/sandbox/layer.d.ts +6 -12
  427. package/dist/sandbox/layer.js +16 -18
  428. package/dist/sandbox/ledger-paths.cjs +4 -18
  429. package/dist/sandbox/ledger-paths.cjs.map +1 -1
  430. package/dist/sandbox/ledger-paths.d.cts +3 -13
  431. package/dist/sandbox/ledger-paths.d.mts +3 -13
  432. package/dist/sandbox/ledger-paths.d.ts +3 -13
  433. package/dist/sandbox/ledger-paths.js +4 -8
  434. package/dist/sandbox/registry.cjs +1 -1
  435. package/dist/sandbox/registry.cjs.map +1 -1
  436. package/dist/sandbox/runtime.cjs +27 -37
  437. package/dist/sandbox/runtime.cjs.map +1 -1
  438. package/dist/sandbox/runtime.d.cts +1 -2
  439. package/dist/sandbox/runtime.d.mts +1 -2
  440. package/dist/sandbox/runtime.d.ts +1 -2
  441. package/dist/sandbox/runtime.js +6 -8
  442. package/dist/sandbox/types.cjs.map +1 -1
  443. package/dist/sandbox/types.d.cts +3 -3
  444. package/dist/sandbox/types.d.mts +3 -3
  445. package/dist/sandbox/types.d.ts +3 -3
  446. package/dist/sources/project.json +6 -0
  447. package/dist/vendor/remark/remark-gfm.cjs +72 -72
  448. package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
  449. package/dist/vendor/remark/remark-parse.cjs +54 -54
  450. package/dist/vendor/remark/remark-parse.cjs.map +1 -1
  451. package/dist/vendor/remark/remark.cjs +125 -125
  452. package/dist/vendor/remark/remark.cjs.map +2 -2
  453. package/docs-site/zh/README.md +1 -1
  454. package/docs-site/zh/explanation/assert.mdx +4 -0
  455. package/docs-site/zh/explanation/judge.mdx +40 -9
  456. package/docs-site/zh/reference/cli.mdx +67 -43
  457. package/docs-site/zh/reference/define-agent.mdx +2 -2
  458. package/docs-site/zh/reference/report-components.mdx +4 -3
  459. package/docs-site/zh/troubleshooting/debug-sandbox.mdx +6 -0
  460. package/docs-site/zh/troubleshooting/debugging.mdx +28 -1
  461. package/docs-site/zh/tutorials/agent-feedback-loop.mdx +4 -2
  462. package/docs-site/zh/tutorials/concurrency.mdx +2 -2
  463. package/docs-site/zh/tutorials/custom-reports.mdx +175 -9
  464. package/docs-site/zh/tutorials/docker-in-docker.mdx +52 -7
  465. package/docs-site/zh/tutorials/eval-groups.mdx +1 -2
  466. package/docs-site/zh/tutorials/evaluation-kinds.mdx +39 -6
  467. package/docs-site/zh/tutorials/nixos-managed-dind.mdx +14 -5
  468. package/docs-site/zh/tutorials/sandbox-providers.mdx +1 -28
  469. package/docs-site/zh/tutorials/sandbox-reuse.mdx +1 -1
  470. package/docs-site/zh/tutorials/viewing-results.mdx +2 -0
  471. package/package.json +24 -19
  472. package/README.md +0 -176
  473. package/README.zh.md +0 -176
  474. package/dist/cli/record.cjs +0 -246
  475. package/dist/cli/record.cjs.map +0 -1
  476. package/dist/cli/record.d.cts +0 -40
  477. package/dist/cli/record.d.mts +0 -40
  478. package/dist/cli/record.d.ts +0 -40
  479. package/dist/cli/record.js +0 -10
  480. package/dist/cli/record.js.map +0 -1
  481. package/dist/sandbox/local.cjs +0 -361
  482. package/dist/sandbox/local.cjs.map +0 -1
  483. package/dist/sandbox/local.d.cts +0 -80
  484. package/dist/sandbox/local.d.mts +0 -80
  485. package/dist/sandbox/local.d.ts +0 -80
  486. package/dist/sandbox/local.js +0 -6
  487. package/dist/sandbox/local.js.map +0 -1
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  title: "编写自定义报告"
3
- description: "先定义 Analysis 统计口径,再用标准 React JSX 编写可在终端、网页和静态站阅读的 Report。"
3
+ sidebarTitle: "编写自定义报告"
4
+ description: "用内建统计口径写出第一个 Report,再添加自定义 Measure、详情 overlay 和项目默认配置。"
4
5
  ---
5
6
 
6
- 自定义 Report 只负责页面和显示。Record 保存已发布事实,Analysis 定义总体、分母和缺失语义;Report 组织 `ClosedRows`、`MetricValue` 与关闭的 DomainView。
7
+ 这篇教程会先用内建的 `model` 和 `passRate` 写出一份可运行报告。跑通以后,再把业务统计口径拆成自定义 Measure,并了解详情 overlay。
7
8
 
8
9
  ```text
9
10
  Record → Sample → Analysis
@@ -15,9 +16,169 @@ Record → Sample → Analysis
15
16
  show:一个目标 Page view / --out:全部 Page
16
17
  ```
17
18
 
18
- ## 从 Measure 开始
19
+ ## 写出第一个 Page
19
20
 
20
- 把业务统计口径定义在 Report 模块之外。Measure 决定分母、缺失和 Evidence;页面不应从数组长度重新计算通过率或成本。
21
+ 项目需要使用 React JSX。确认 `tsconfig.json` 包含下面的选项:
22
+
23
+ ```json
24
+ {
25
+ "compilerOptions": {
26
+ "jsx": "react-jsx"
27
+ }
28
+ }
29
+ ```
30
+
31
+ 新建 `reports/quality.tsx`。先直接使用 NiceEval 提供的维度和 Measure:
32
+
33
+ ```tsx
34
+ import {
35
+ aggregate,
36
+ Bars,
37
+ Col,
38
+ defineComponent,
39
+ defineReport,
40
+ model,
41
+ passRate,
42
+ durationMs,
43
+ Section,
44
+ Table,
45
+ tokens,
46
+ } from "niceeval/report";
47
+
48
+ const QualityComparison = defineComponent(async (_props: {}, ctx) => {
49
+ const rows = await aggregate(ctx.scope, {
50
+ by: { model },
51
+ values: { passRate, durationMs, tokens },
52
+ });
53
+
54
+ return (
55
+ <Section title="模型质量">
56
+ <Col>
57
+ <Bars points={rows} x="model" y="passRate" />
58
+ <Table rows={rows} caption="各模型质量与用量" />
59
+ </Col>
60
+ </Section>
61
+ );
62
+ });
63
+
64
+ export default defineReport({
65
+ title: { en: "Quality", "zh-CN": "质量" },
66
+ pages: [{
67
+ id: "overview",
68
+ path: "/",
69
+ title: { en: "Overview", "zh-CN": "概览" },
70
+ presentation: "page",
71
+ render: () => <QualityComparison />,
72
+ }],
73
+ });
74
+ ```
75
+
76
+ Report module 必须默认导出 `defineReport()` 的结果。`ctx.scope` 是这次命令选中的固定 Sample;`aggregate()` 按模型分组,并为每组计算通过率、平均耗时和平均 Token 数。
77
+
78
+ 先用已有 Run 在终端检查这个 Page,再打开完整网页:
79
+
80
+ ```sh
81
+ pnpm exec niceeval show --run <run-id> --report ./reports/quality.tsx
82
+ pnpm exec niceeval view --run <run-id> --report ./reports/quality.tsx
83
+ ```
84
+
85
+ 第一条命令应打印“模型质量”和各模型的通过率。第二条命令会打开报告站;修改 `quality.tsx` 后,成功的 rebuild 会替换当前内容,失败时仍保留上一份可用报告。
86
+
87
+ ## 用 `aggregate()` 组装图表数据
88
+
89
+ 所有内建图表都读取 `aggregate()` 返回的同一批 rows。组装时只做三件事:
90
+
91
+ 1. `by` 决定一行代表什么,例如一个模型、Agent、Experiment 或评估用例。
92
+ 2. `values` 决定每行计算哪些指标,例如通过率、平均耗时和平均 Token 数。
93
+ 3. 图表的 `x`、`y` 与 `color` 引用这些字段名,不再读取或重新计算 Sample。
94
+
95
+ 下面这个输入会得到每个“模型 × Agent”一行的数据:
96
+
97
+ ```tsx
98
+ const rows = await aggregate(ctx.scope, {
99
+ by: { model, agent },
100
+ values: { passRate, durationMs, tokens },
101
+ });
102
+ ```
103
+
104
+ 每个指标格都是完整的 `MetricValue`,包含数值、状态、实际样本数和固定分母。把同一份 `rows` 交给多个图表,才能保证图和表使用相同口径。
105
+
106
+ ### 用柱状图比较通过率
107
+
108
+ `Bars` 适合比较一个离散维度上的同一指标。`color` 可以把第二个维度拆成不同系列:
109
+
110
+ ```tsx
111
+ import {
112
+ agent,
113
+ aggregate,
114
+ Bars,
115
+ model,
116
+ passRate,
117
+ } from "niceeval/report";
118
+
119
+ const rows = await aggregate(ctx.scope, {
120
+ by: { model, agent },
121
+ values: { passRate },
122
+ });
123
+
124
+ return <Bars points={rows} x="model" y="passRate" color="agent" />;
125
+ ```
126
+
127
+ 同一个模型由多个 Agent 运行时,这张图会按 Agent 分色。若只想比较模型,删掉 `agent` 分组和 `color` 即可。
128
+
129
+ ### 用散点图找质量与速度的取舍
130
+
131
+ `Scatter` 适合把两个连续指标放在一起。下面每个点代表一个 Experiment,横轴越靠左表示平均耗时越短,纵轴越靠上表示通过率越高:
132
+
133
+ ```tsx
134
+ import {
135
+ aggregate,
136
+ durationMs,
137
+ experiment,
138
+ model,
139
+ passRate,
140
+ Scatter,
141
+ } from "niceeval/report";
142
+
143
+ const rows = await aggregate(ctx.scope, {
144
+ by: { experiment, model },
145
+ values: { durationMs, passRate },
146
+ });
147
+
148
+ return (
149
+ <Scatter
150
+ points={rows}
151
+ x="durationMs"
152
+ y="passRate"
153
+ color="model"
154
+ />
155
+ );
156
+ ```
157
+
158
+ ### 用表格保留完整读数
159
+
160
+ 图表适合看趋势,`Table` 适合核对精确值和缺失状态。通常用 `Col` 把大图表和完整表格纵向排列:
161
+
162
+ ```tsx
163
+ return (
164
+ <Col>
165
+ <Bars points={rows} x="model" y="passRate" color="agent" />
166
+ <Table
167
+ rows={rows}
168
+ columns={["model", "agent", "passRate", "durationMs", "tokens"]}
169
+ caption="模型与 Agent 对比"
170
+ />
171
+ </Col>
172
+ );
173
+ ```
174
+
175
+ `columns` 控制展示顺序,不会改变 rows 或统计口径。省略它时,`Table` 按 rows 的字段顺序显示全部列。
176
+
177
+ `Grid` 是另一种选择,但不是另一套数据 API。它让每个直接子节点占一格,并根据宽度自动换列。截图里的摘要条就是 `<Grid><Stat ... /><Stat ... /></Grid>`。它适合 KPI 卡片或多个小面板;把 `Bars` 和大表格直接放进去时,两者也会各占一格,宽屏上可能并排,因此不是本教程的默认写法。
178
+
179
+ ## 定义自己的统计口径
180
+
181
+ 内建 Measure 不足时,把业务统计口径定义在 Report 模块之外。Measure 决定分母、缺失和 Evidence;页面不应从数组长度重新计算通过率或成本。
21
182
 
22
183
  ```ts
23
184
  // reports/quality-measures.ts
@@ -56,7 +217,7 @@ export const passRate = defineMeasure({
56
217
  });
57
218
  ```
58
219
 
59
- ## 组织一个 Page
220
+ ## 在 Page 中使用自定义 Measure
60
221
 
61
222
  Report 模块是 `.tsx` 文件,并使用 TypeScript 的 `"jsx": "react-jsx"`。组合组件通过 `ctx.scope` 获得这次选择固定的 Sample。组件和 Page 不获得 Record reader、文件路径或浏览器请求能力。
62
223
 
@@ -65,9 +226,9 @@ Report 模块是 `.tsx` 文件,并使用 TypeScript 的 `"jsx": "react-jsx"`
65
226
  import {
66
227
  aggregate,
67
228
  Bars,
229
+ Col,
68
230
  defineComponent,
69
231
  defineReport,
70
- Grid,
71
232
  Table,
72
233
  } from "niceeval/report";
73
234
  import { experiment, passRate } from "./quality-measures.ts";
@@ -79,10 +240,10 @@ const QualityComparison = defineComponent(async (_props: {}, ctx) => {
79
240
  });
80
241
 
81
242
  return (
82
- <Grid>
243
+ <Col>
83
244
  <Bars points={rows} x="experiment" y="passRate" />
84
245
  <Table rows={rows} caption="实验通过率" />
85
- </Grid>
246
+ </Col>
86
247
  );
87
248
  });
88
249
 
@@ -92,6 +253,7 @@ export default defineReport({
92
253
  id: "overview",
93
254
  path: "/",
94
255
  title: { en: "Overview", "zh-CN": "概览" },
256
+ presentation: "page",
95
257
  render: () => <QualityComparison />,
96
258
  }],
97
259
  });
@@ -153,7 +315,11 @@ Codex sealed Usage 含 `requestKind: "model"` observation。因此即使 model r
153
315
 
154
316
  ## 添加详情与显示原语
155
317
 
156
- 需要多个详情地址时,定义参数 Page。`pages` 是唯一的页面集合,详情页必须在此显式声明;`params.enumerate(sample)` 只在 view 或静态导出时列出全部实例,Host 不会补建详情 route。`show --page <route>` 只执行请求的一个实例,并检查 `decode()` 后再 `encode()` 得到同一 canonical key。
318
+ 需要多个详情地址时,定义参数 Page。每个 Page 都要说明 `presentation`:独立业务页面使用 `"page"`,在当前页面上打开的 Attempt、Source 或 Diff 详情使用 `"overlay"`。
319
+
320
+ `pages` 是唯一的页面集合,详情必须在此显式声明;`params.enumerate(sample)` 只在 view 或静态导出时列出全部实例,Host 不会补建详情。`show --page <route>` 只执行请求的一个实例,并检查 `decode()` 后再 `encode()` 得到同一 canonical key。
321
+
322
+ 浏览器中的 Report 只有一个根 document。业务 Page 和 overlay 通过 hash 导航;overlay 会保留当前业务 Page,按 Escape、点击关闭按钮或浏览器返回即可关闭。静态报告仍需要浏览器启用随包交付的 JavaScript。
157
323
 
158
324
  新的显示原语使用双面 `defineComponent()`:`resolve()` 最多取得一次关闭输入,`text()` 与 `web()` 同步读取同一个值。两个面不能各自再次调用 Analysis,也不能用网页专有内容代替终端文字。
159
325
 
@@ -13,6 +13,20 @@ description: "根据任务信任边界选择 Docker socket、raw privileged DinD
13
13
  | Raw privileged DinD | 一次性 VM 或专用 runner,需要独立 image、network 和 cache | 每个 Sandbox 启动 inner daemon | outer container 是 raw privileged,不是安全隔离方案 |
14
14
  | Managed rootless DinD | 不可信 Agent、共享宿主、并发评估、需要资源准入和强杀恢复 | 最高,需要宿主 profile | privileged 限制在受管 rootless user namespace 或专用 VM,并有 watchdog 与容量契约 |
15
15
 
16
+ 完整的 Docker profile 依赖 Linux cgroup v2、systemd 和支持 project quota 的文件系统。NixOS 可以用
17
+ NiceEval module 部署;Ubuntu、Debian 与其它 systemd Linux 需要安装等价的宿主服务。
18
+
19
+ macOS 上的实际选择是 OrbStack 或 Apple `container`:
20
+
21
+ - OrbStack 的 Docker engine 可以用于可信任务的 Docker socket 模式。需要完整 profile 时,在 OrbStack
22
+ Linux machine 内运行 NiceEval,并按该发行版的 Linux 安装方式部署宿主服务。
23
+ - Apple 官方 [`container`](https://github.com/apple/container) 在 Apple silicon 和 macOS 26 上把 Linux
24
+ container 作为轻量 VM 运行。当前 NiceEval Docker Provider 不操作它的 CLI 或 API,因此不能直接选择
25
+ `container`;这需要独立 Provider。
26
+
27
+ Apple `container` 使用 Containerization framework,不是 containerd。直接安装 containerd 也不会让 Darwin
28
+ 获得 Linux cgroup 或 project quota;它仍需要 Linux VM。
29
+
16
30
  三种模式都要求镜像预装 Docker CLI。两种 DinD 模式只接受从官方
17
31
  `docker:<version>-dind` 派生的兼容镜像。镜像需要 Docker daemon、Node 和评估工具,
18
32
  但不需要自定义 NiceEval `ENTRYPOINT`。NiceEval 负责启动与监督 inner daemon、
@@ -173,13 +187,40 @@ export default defineExperiment({
173
187
  dockerAccess: {
174
188
  mode: "dind",
175
189
  isolation: "raw-privileged",
190
+ storageProfile: "default",
191
+ },
192
+ resources: {
193
+ dockerDataBytes: 6 * 1024 ** 3,
176
194
  },
177
195
  }),
178
196
  });
179
197
  ```
180
198
 
181
199
  必填的 `raw-privileged` 字面量是风险授权。NiceEval 不会把 raw 模式描述成 rootless,也不会在失败时
182
- 自动改用 managed profile。
200
+ 自动改用 managed profile。`storageProfile` 为 inner `/var/lib/docker` 分配磁盘配额;不要把该路径放进
201
+ `tmpfs`。这个 profile 只增加磁盘准入、配额和强杀恢复,不会把 raw privileged 变成安全隔离方案。
202
+
203
+ ### 在 macOS 上使用 OrbStack
204
+
205
+ 可信的本地评估可以复用 OrbStack Docker engine。先让 OrbStack 创建 Docker context,再读取实际 Unix socket:
206
+
207
+ ```bash
208
+ docker context inspect orbstack --format '{{.Endpoints.docker.Host}}'
209
+ ```
210
+
211
+ 把输出的 `unix://` 路径去掉 scheme 后填入 `dockerAccess.socketPath`。这仍是 Docker socket 模式;Agent
212
+ 可以完全控制 OrbStack daemon,不适合不可信任务。
213
+
214
+ 需要 managed profile 时,使用 OrbStack 的完整 Ubuntu machine,而不是把 profile 服务装进 macOS:
215
+
216
+ ```bash
217
+ orb create ubuntu niceeval-runner
218
+ orb -m niceeval-runner
219
+ ```
220
+
221
+ 进入 machine 后,按 Ubuntu 的宿主安装流程准备 systemd、cgroup v2 和 project-quota 文件系统,并在该
222
+ machine 内运行 NiceEval。Ubuntu 安装包发布前,这条路径不是开箱即用能力;不要用 OrbStack Docker engine
223
+ 冒充 managed profile。
183
224
 
184
225
  ### Managed rootless DinD
185
226
 
@@ -216,9 +257,9 @@ export default defineExperiment({
216
257
  cpus: 4,
217
258
  memoryBytes: 6 * GiB,
218
259
  pidsLimit: 2048,
260
+ dockerDataBytes: 6 * GiB,
219
261
  readOnlyRootfs: true,
220
262
  tmpfs: {
221
- "/var/lib/docker": { sizeBytes: 3 * GiB, mode: 0o711, executable: true },
222
263
  "/home/sandbox/workspace": {
223
264
  sizeBytes: 2 * GiB,
224
265
  mode: 0o755,
@@ -238,6 +279,10 @@ export default defineExperiment({
238
279
  profile 缺失、拼错、attestation 失败或容量不足时,NiceEval 会在模型调用前失败,绝不降级成 raw
239
280
  privileged。宿主部署完成后先检查 profile:
240
281
 
282
+ `dockerDataBytes` 是每个 Attempt 的 inner Docker data 硬上限。watchdog 从磁盘配额池中授予一份私有
283
+ allocation,并把它挂到 `/var/lib/docker`。Docker image layer 与 BuildKit cache 因而占磁盘,不计入宿主
284
+ `Shmem`;workspace、`/tmp` 等确实需要内存语义的路径仍可使用有界 `tmpfs`。
285
+
241
286
  ```bash
242
287
  npx niceeval docker profile list
243
288
  npx niceeval docker profile doctor default --smoke
@@ -250,16 +295,16 @@ Dockerfile。项目镜像仍由默认 `docker info` readiness 验证。
250
295
 
251
296
  ### 为 DinD 设置运行并发
252
297
 
253
- `resources.memoryBytes` 限制一台 Sandbox,不会自动设置 Run 的并发数。DinD 还会占用 inner
254
- image、BuildKit、tmpfs 和 page cache,默认并发对本机可能过高。先用较小并发完成 smoke run:
298
+ `resources.memoryBytes` 限制一台 Sandbox,`dockerDataBytes` 限制它的 inner Docker data。profile 会对
299
+ 所有 NiceEval 进程执行共享容量准入;当前没有足够的内存或磁盘 allocation 时,新 Attempt 会等待。先用
300
+ 较小并发完成 smoke run:
255
301
 
256
302
  ```bash
257
303
  pnpm exec niceeval exp dind-managed --max-concurrency 2
258
304
  ```
259
305
 
260
- 再根据宿主的可用内存、CPU 和磁盘吞吐逐步增加。可以先用
261
- `可用内存 ÷ memoryBytes` 估算保守上限,同时为宿主 Docker、NiceEval 和其它进程留余量。
262
- Experiment 只服务这类重型 Sandbox 时,也可以直接设置 `maxConcurrency`。
306
+ 再根据宿主的可用内存、CPU 和磁盘吞吐逐步增加。profile 的总预算负责阻止多个 Experiment 合计超过宿主
307
+ 容量,`maxConcurrency` 仍负责限制单次 Run 的并行度。两者不能互相替代。
263
308
 
264
309
  ### 定位 DinD 创建失败
265
310
 
@@ -104,8 +104,7 @@ export default defineExperiment({
104
104
  这里不要写 `sandboxReuse: true`。`maxConcurrency: 4` 是整个 Experiment 的上限,不会让
105
105
  同组同时跑四条;它允许其它评估组或未分组评估用例使用剩余并发位。
106
106
 
107
- 评估组只支持 Sandbox 型 Agent 和支持复用的 Provider。Direct Agent 与 `localSandbox()`
108
- 不能运行评估组。
107
+ 评估组只支持 Sandbox 型 Agent 和支持复用的 Provider。Direct Agent 不能运行评估组。
109
108
 
110
109
  ## 第 4 步:先检查组 ID 和选择结果
111
110
 
@@ -79,22 +79,53 @@ export default defineScoreEval({
79
79
 
80
80
  ## Judge 也是 measurement
81
81
 
82
- Judge recipe 直接登记 measurement Assertion。先声明 `judge` capability,再在同一 handle 上配置阈值或分数:
82
+ Judge recipe 直接登记 measurement Assertion。先声明 `judge` capability,再根据评估类型消费同一条结果。
83
+
84
+ 通过制评估表达“这些要求都必须成立”。把每个可以独立失败的开放式要求拆成一条 Judge,并分别调用 `.gate(n)`:
85
+
86
+ ```ts
87
+ export default defineEval({
88
+ judge: true,
89
+ async test(t) {
90
+ const turn = await t.send("说明这项变更的动机、风险和回滚方法。");
91
+
92
+ turn.judge.autoevals.closedQA("说明是否交代了变更动机?")
93
+ .gate(1)
94
+ .label("变更动机");
95
+ turn.judge.autoevals.closedQA("说明是否识别了具体风险?")
96
+ .gate(1)
97
+ .label("具体风险");
98
+ turn.judge.autoevals.closedQA("说明是否给出了可执行的回滚方法?")
99
+ .gate(1)
100
+ .label("回滚方法");
101
+ },
102
+ });
103
+ ```
104
+
105
+ 三项中的任意一项失败,Attempt 都会失败。不要只写一个“是否说明了动机、风险和回滚”的 Judge;`closedQA` 只返回 `0` 或 `1`,合并后既没有部分分,也看不出哪项失败。
106
+
107
+ 计分制评估表达“各项完成多少就累计多少”。独立要求仍然拆开,并用 `.score(n)` 写出各自权重:
83
108
 
84
109
  ```ts
85
110
  export default defineScoreEval({
86
111
  judge: true,
87
112
  async test(t) {
88
113
  const turn = await t.send("说明这项变更的动机和风险。");
89
- turn.judge.autoevals.closedQA("说明是否具体、准确?")
90
- .score(20)
91
- .atLeast(0.7)
92
- .label("说明质量");
114
+ turn.judge.autoevals.closedQA("说明是否交代了变更动机?")
115
+ .score(8)
116
+ .label("变更动机");
117
+ turn.judge.autoevals.closedQA("说明是否识别了具体风险?")
118
+ .score(12)
119
+ .label("具体风险");
93
120
  },
94
121
  });
95
122
  ```
96
123
 
97
- 同一条 Judge Assertion 可以同时配置 `.score(n)` 与 `.atLeast(n)`,evaluator 只运行一次。Judge 没有单独的消费 API。
124
+ 如果两项都满足,上例贡献 `20` 分;只满足风险要求时贡献 `12` 分。`.score(n)` 的 `n` 是单项权重,不是自动声明的固定总分。
125
+
126
+ 评价一个不可分割的整体质量时,可以只使用一条 Judge。例如“整段说明相对参考答案的事实一致性”可以用一条 `factuality(...).score(20)`。它只会按 recipe 的固定档位贡献 `0`、`8`、`12` 或 `20` 分,不能表示“三个要求完成了两个,所以得到三分之二”。
127
+
128
+ 同一条 Judge Assertion 可以同时配置 `.score(n)` 与 `.atLeast(n)`,evaluator 只运行一次。`.atLeast(n)` 只记录该项是否达到阈值,不改变分数,也不会让计分制评估失败。Judge 没有单独的消费 API。
98
129
 
99
130
  ## 代码任务用真实命令验收
100
131
 
@@ -110,6 +141,8 @@ await t.check(
110
141
  ## 实用建议
111
142
 
112
143
  - 把每个必须成立的条件登记为 Boolean Assertion,让一次 Attempt 收集完整失败信息。
144
+ - 把可以独立失败、独立计权或需要单独诊断的开放式标准拆成多个 Judge。
145
+ - 只有不可分割的整体质量维度才使用一个 Judge 的 measurement 乘单项权重。
113
146
  - 后续步骤依赖某条结果时,`await handle.orStop()`。
114
147
  - 任务存在有意义的部分完成度时使用 `defineScoreEval`;`test` 正常返回时自动收尾。
115
148
  - 开放式语义用 Judge;可精确检查的文件、命令与结构化输出优先用确定性 Match。
@@ -8,6 +8,11 @@ Managed rootless DinD 适合在共享 NixOS 宿主上运行不可信 Agent。Nic
8
8
  系统用户、rootless Docker daemon、容量受限的数据盘、资源 slice 和 watchdog。日常运行 NiceEval
9
9
  不需要 `sudo`,但首次部署和更新系统配置需要管理员权限。
10
10
 
11
+ 本页只介绍 NixOS 的部署入口。Docker profile 本身是 Linux 宿主能力,不是 NixOS 专属能力。Ubuntu、
12
+ Debian 与其它 systemd Linux 需要安装等价的宿主服务。macOS 用户可以在 OrbStack Linux machine 内运行
13
+ NiceEval 和对应的 Linux 宿主服务;Apple `container` 当前需要独立 NiceEval Provider。具体边界与命令见
14
+ [让 Sandbox 使用 Docker](/zh/tutorials/docker-in-docker#在-macos-上使用-orbstack)。
15
+
11
16
  如果任务可以信任 Agent,或者只在一次性 VM 中运行,先阅读[让 Sandbox 使用 Docker](/zh/tutorials/docker-in-docker)
12
17
  选择 Docker socket 或 raw privileged DinD。它们不需要本页的宿主 profile。
13
18
 
@@ -66,6 +71,8 @@ Managed rootless DinD 适合在共享 NixOS 宿主上运行不可信 Agent。Nic
66
71
  pids = 4096;
67
72
  maxContainers = 2;
68
73
  maxBuilds = 1;
74
+ ephemeralDiskBytes = "6G";
75
+ dockerDataAllocationCount = 2;
69
76
  };
70
77
 
71
78
  aggregate = {
@@ -82,11 +89,13 @@ Managed rootless DinD 适合在共享 NixOS 宿主上运行不可信 Agent。Nic
82
89
  }
83
90
  ```
84
91
 
85
- `capacity` 是 NiceEval 可以分配给评估任务的预算。`aggregate` 是 daemon、构建进程、watchdog 和评估
86
- 容器共同受到的硬限制,因此每一项都不能小于 `capacity`。两者之间的余量留给宿主侧开销。
92
+ `capacity` 是 NiceEval 可以分配给评估任务的预算。`ephemeralDiskBytes` 是每个 Docker data allocation
93
+ 的硬上限,`dockerDataAllocationCount` 是 profile 可同时授予的 Docker data allocation 数量。`aggregate` 是 daemon、构建进程、
94
+ watchdog 和评估容器共同受到的硬限制,因此每一项都不能小于 `capacity`。两者之间的余量留给宿主侧开销。
87
95
 
88
- `loop-ext4` 会在 `/var/lib/niceeval/docker-profiles/default.img` 创建稀疏镜像,并挂载为 Docker
89
- data root。`size` 是这个 profile 的磁盘上限,不代表 rebuild 时立即占用同等物理空间。
96
+ `loop-ext4` 会在 `/var/lib/niceeval/docker-profiles/default.img` 创建独立的 ext4 quota 文件系统。
97
+ watchdog 从中分配私有目录,并把目录挂到每个 Sandbox 的 `/var/lib/docker`。不要再为该路径声明
98
+ `tmpfs`;inner image layer 和 BuildKit cache 应占磁盘,不应计入宿主 `Shmem`。
90
99
 
91
100
  ## 应用系统配置
92
101
 
@@ -142,7 +151,7 @@ dockerAccess: {
142
151
  },
143
152
  ```
144
153
 
145
- Experiment 还必须声明单容器 CPU、内存、PID、只读 rootfs 和 tmpfs。完整配置见
154
+ Experiment 还必须声明单容器 CPU、内存、PID、`dockerDataBytes`、只读 rootfs 和其余可写路径的 tmpfs。完整配置见
146
155
  [让 Sandbox 使用 Docker](/zh/tutorials/docker-in-docker#managed-rootless-dind)。先用较小的
147
156
  `maxConcurrency` 运行一次,再根据 profile 的 `capacity` 增加并发。
148
157
 
@@ -51,7 +51,6 @@ export default defineExperiment({
51
51
  | `dockerSandbox({ source: { type: "image", image: "node:24-slim" } })` | `pnpm add dockerode @types/dockerode` |
52
52
  | `vercelSandbox({ snapshotId })` | `pnpm add @vercel/sandbox` |
53
53
  | `e2bSandbox({ template })` | `pnpm add e2b` |
54
- | `localSandbox()` | 无需额外安装 |
55
54
 
56
55
  漏装时不会静默失败:NiceEval 在创建 sandbox 的那一刻报错并直接给出上面的安装命令,例如 `Docker sandbox requires 'dockerode'. Install it with: pnpm add dockerode @types/dockerode`。
57
56
 
@@ -381,35 +380,9 @@ Docker 适合本地开发和标准 CI。优点是简单、可控、无云端依
381
380
 
382
381
  Vercel Sandbox 适合需要云端隔离、更多资源或更稳定环境的任务。需要相应 token 或 OIDC 配置。
383
382
 
384
- ## 本地目录
385
-
386
- `localSandbox()` 让 Agent 直接在你机器上的一个 Git 仓库里跑,不需要 Docker,也不需要云凭据:
387
-
388
- ```ts
389
- import { defineExperiment } from "niceeval";
390
- import { localSandbox } from "niceeval/sandbox";
391
-
392
- export default defineExperiment({
393
- agent: myCodingAgent,
394
- sandbox: localSandbox(), // 默认用当前 Git 仓库根做工作目录
395
- });
396
- ```
397
-
398
- 要评别的目录,传 `localSandbox({ dir: "/path/to/repo" })`。
399
-
400
- NiceEval 只观察、不还原:Agent 改了什么会真实落在你的工作树上。NiceEval 用一份独立的私有 Git 记录采集 diff 和评分,不碰你自己的 `.git`、暂存区和未提交改动,跑完也不会执行任何 `git reset`。要保留还是丢弃 Agent 的改动,由你决定。
401
-
402
- 使用前记住三件事:
403
-
404
- - Agent 以你的身份、在你的机器上执行命令。只在你信任任务和 Prompt 的时候用它。要隔离就用 Docker 或云 Provider。
405
- - 本地目录同一时刻只跑一个 Attempt(强制串行),`--max-concurrency` 抬不高它。
406
- - 连续跑多个评估用例时,前一个的改动会留在工作树上,成为后一个的起点。要每题干净起点,用容器 Provider。
407
-
408
- `{ user: "..." }` 和 `--keep-sandbox` 对本地目录不可用,会直接报错:NiceEval 不在你的机器上提权或换身份,也不需要「留存」一个本来就在你工作树里的现场。
409
-
410
383
  ## 自定义 Provider
411
384
 
412
- 用 `defineSandbox` 接入其它服务。`create` 的 `feedback` 已绑定到 `sandbox.create` 阶段,可以报告分配实例、拉镜像或恢复 Sandbox 快照的状态:
385
+ 用 `defineSandbox` 接入其它服务。自定义 Provider 的作者必须负责文件系统、进程、网络与凭据隔离;NiceEval 不会为一个任意 `Sandbox` 实现自动补上这些安全边界。`create` 的 `feedback` 已绑定到 `sandbox.create` 阶段,可以报告分配实例、拉镜像或恢复 Sandbox 快照的状态:
413
386
 
414
387
  ```ts
415
388
  import { defineSandbox } from "niceeval/sandbox";
@@ -32,7 +32,7 @@ import { SandboxLanes } from '/snippets/diagram-sandbox-lanes.jsx';
32
32
  同一条实验轨迹。否则应换干净 cohort 从头重建。
33
33
  - **工作目录之外的状态会留下。** `$HOME`、`/tmp`、全局安装、后台进程都活过题间重置。
34
34
  评估的准备代码必须能接受这一点(下面「把准备代码写对」)。
35
- - 与 `--keep-sandbox`、`localSandbox()` 互斥。
35
+ - 与 `--keep-sandbox` 互斥。
36
36
 
37
37
  适合的场景:本地冒烟一批评估、同一道题重复跑 N 次看稳定性、验证接线——要的是快,
38
38
  同时保留结果沿用与 `--rerun` 的选择。
@@ -71,6 +71,8 @@ Problems
71
71
 
72
72
  `Result` 显示 `passed`、`failed`、`errored`、`not started` 或 `using result @<locator>`;`Details` 的 locator 可继续下钻。Attempt 创建前失败时,页面另外显示 `Run errors` 和该错误真正影响的未启动 Attempt 数。Human 页不显示 Slot 等内部字段;机器 `--json` 仍保留稳定 membership keys。
73
73
 
74
+ Attempt 的 `failed` 只说明影响 Verdict 的断言未满足,不会自动把原因归给被测对象。按[排查手册](/zh/troubleshooting/debugging#attempt-判定为-failed)分别比较任务、实际产物与断言,再决定修哪一层。
75
+
74
76
  `show --json` 仍是同一个单目标操作。内建 Report 返回 Host 拥有的具名领域 JSON;自定义 Report 返回该 Page 的 route、标题、固定英语 80-column rendered text、下载摘要和问题表。
75
77
  两种 v1 JSON 都在顶层带有同一形状的 `projections` 对象,只包含目标 Page 捕获的闭合投影。
76
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "niceeval",
3
- "version": "0.13.3",
3
+ "version": "0.13.4-canary.39",
4
4
  "description": "Agent-native eval tool — eval agents, services, functions, and coding-agent fixtures",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -115,6 +115,16 @@
115
115
  "default": "./dist/analysis/index.cjs"
116
116
  }
117
117
  },
118
+ "./eval/host": {
119
+ "import": {
120
+ "types": "./dist/eval/host/index.d.mts",
121
+ "default": "./dist/eval/host/index.mjs"
122
+ },
123
+ "require": {
124
+ "types": "./dist/eval/host/index.d.cts",
125
+ "default": "./dist/eval/host/index.cjs"
126
+ }
127
+ },
118
128
  "./experiment/host": {
119
129
  "import": {
120
130
  "types": "./dist/experiment/host/index.d.mts",
@@ -215,6 +225,16 @@
215
225
  "default": "./dist/report/extension/index.cjs"
216
226
  }
217
227
  },
228
+ "./project/host": {
229
+ "import": {
230
+ "types": "./dist/project/host/index.d.mts",
231
+ "default": "./dist/project/host/index.mjs"
232
+ },
233
+ "require": {
234
+ "types": "./dist/project/host/index.d.cts",
235
+ "default": "./dist/project/host/index.cjs"
236
+ }
237
+ },
218
238
  "./report/react/styles.css": "./dist/report/react/styles.css",
219
239
  "./report/react/enhance.js": "./dist/report/react/enhance.js"
220
240
  },
@@ -316,27 +336,12 @@
316
336
  }
317
337
  },
318
338
  "scripts": {
319
- "typecheck": "tsc --noEmit && tsc -p docs/feature/assertions/reference/tsconfig.json",
320
- "lint": "pnpm run docs:mint && concurrently --names vitest,validate,links \"pnpm run lint:vitest\" \"pnpm run docs:validate\" \"pnpm run docs:links\"",
321
- "lint:vitest": "vitest run --project lint-docs --project lint-docs-site",
322
- "lint:docs": "vitest run --project lint-docs",
323
- "lint:docs-site": "pnpm run docs:mint && concurrently --names vitest,validate,links \"vitest run --project lint-docs-site\" \"pnpm run docs:validate\" \"pnpm run docs:links\"",
339
+ "typecheck": "tsc --noEmit",
324
340
  "niceeval": "node bin/niceeval.js",
325
- "e2e": "tsx e2e/scripts/cli.ts",
326
- "gen:diff-code": "tsx scripts/gen-diff-code.ts",
327
- "pr:body": "tsx scripts/pr-body.ts",
328
- "docs:reference": "tsx scripts/generate-reference.ts",
329
- "tiers:sync": "node scripts/sync-tiers.mjs sync",
330
341
  "view:build": "vite build --config src/report/client/vite.config.ts",
331
342
  "build:report": "pnpm run build:package",
332
343
  "build:package": "pnpm run view:build && node scripts/package-runtime/build.mjs",
333
- "build:index": "tsx scripts/generate-reference.ts --bundled-index",
334
- "dev:link": "node scripts/link-consumer.mjs",
335
- "site:dev": "cd site && node scripts/dev.mjs",
336
- "site:build": "cd site && next build && cd .. && tsx scripts/submit-indexnow.ts",
337
- "docs:dev": "node scripts/docs-dev.mjs",
338
- "docs:mint": "cd docs-site && npx --yes mint@4.2.812 --version",
339
- "docs:validate": "cd docs-site && npx --yes mint@4.2.812 validate",
340
- "docs:links": "cd docs-site && npx --yes mint@4.2.812 broken-links --check-anchors --check-redirects"
344
+ "build:index": "tsx ../../scripts/generate-reference.ts --bundled-index",
345
+ "stage:docs": "node scripts/stage-docs.mjs"
341
346
  }
342
347
  }