niceeval 0.13.2-canary.35 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (485) hide show
  1. package/INDEX.md +24 -2
  2. package/dist/agents/bub-install-spec.cjs +19 -5
  3. package/dist/agents/bub-install-spec.cjs.map +1 -1
  4. package/dist/agents/bub-install-spec.d.cts +9 -2
  5. package/dist/agents/bub-install-spec.d.mts +9 -2
  6. package/dist/agents/bub-install-spec.d.ts +9 -2
  7. package/dist/agents/bub-install-spec.js +14 -12
  8. package/dist/agents/bub.cjs +10 -6
  9. package/dist/agents/bub.cjs.map +1 -1
  10. package/dist/agents/bub.d.cts +2 -2
  11. package/dist/agents/bub.d.mts +2 -2
  12. package/dist/agents/bub.d.ts +2 -2
  13. package/dist/agents/claude-code.cjs.map +1 -1
  14. package/dist/agents/claude-code.d.cts +2 -2
  15. package/dist/agents/claude-code.d.mts +2 -2
  16. package/dist/agents/claude-code.d.ts +2 -2
  17. package/dist/agents/codex.cjs +4 -4
  18. package/dist/agents/codex.cjs.map +1 -1
  19. package/dist/agents/codex.d.cts +3 -3
  20. package/dist/agents/codex.d.mts +3 -3
  21. package/dist/agents/codex.d.ts +3 -3
  22. package/dist/agents/deepseek-harness.cjs +50 -2
  23. package/dist/agents/deepseek-harness.cjs.map +1 -1
  24. package/dist/agents/deepseek-harness.d.cts +2 -0
  25. package/dist/agents/deepseek-harness.d.mts +2 -0
  26. package/dist/agents/deepseek-harness.d.ts +2 -0
  27. package/dist/agents/exact-npm-plugins.cjs +28 -0
  28. package/dist/agents/exact-npm-plugins.cjs.map +1 -0
  29. package/dist/agents/exact-npm-plugins.d.cts +10 -0
  30. package/dist/agents/exact-npm-plugins.d.mts +10 -0
  31. package/dist/agents/exact-npm-plugins.d.ts +10 -0
  32. package/dist/agents/exact-npm-plugins.js +8 -0
  33. package/dist/agents/exact-npm-plugins.js.map +1 -0
  34. package/dist/agents/openclaw.cjs +51 -2
  35. package/dist/agents/openclaw.cjs.map +1 -1
  36. package/dist/agents/openclaw.d.cts +2 -0
  37. package/dist/agents/openclaw.d.mts +2 -0
  38. package/dist/agents/openclaw.d.ts +2 -0
  39. package/dist/agents/types.cjs.map +1 -1
  40. package/dist/agents/types.d.cts +2 -2
  41. package/dist/agents/types.d.mts +2 -2
  42. package/dist/agents/types.d.ts +2 -2
  43. package/dist/agents/ui-message-stream.cjs +24 -7
  44. package/dist/agents/ui-message-stream.cjs.map +1 -1
  45. package/dist/analysis/api.cjs +19 -1
  46. package/dist/analysis/api.cjs.map +1 -1
  47. package/dist/analysis/api.d.cts +2 -2
  48. package/dist/analysis/api.d.mts +2 -2
  49. package/dist/analysis/api.d.ts +2 -2
  50. package/dist/analysis/bindings.cjs +11 -18
  51. package/dist/analysis/bindings.cjs.map +1 -1
  52. package/dist/analysis/bindings.d.cts +177 -49
  53. package/dist/analysis/bindings.d.mts +177 -49
  54. package/dist/analysis/bindings.d.ts +177 -49
  55. package/dist/analysis/contracts.cjs +1 -0
  56. package/dist/analysis/contracts.cjs.map +1 -1
  57. package/dist/analysis/contracts.d.cts +43 -3
  58. package/dist/analysis/contracts.d.mts +43 -3
  59. package/dist/analysis/contracts.d.ts +43 -3
  60. package/dist/analysis/cost-projection.cjs +2 -1
  61. package/dist/analysis/cost-projection.cjs.map +1 -1
  62. package/dist/analysis/cost-projection.d.cts +1 -1
  63. package/dist/analysis/cost-projection.d.mts +1 -1
  64. package/dist/analysis/cost-projection.d.ts +1 -1
  65. package/dist/analysis/cost.cjs +13 -3
  66. package/dist/analysis/cost.cjs.map +1 -1
  67. package/dist/analysis/cost.d.cts +10 -3
  68. package/dist/analysis/cost.d.mts +10 -3
  69. package/dist/analysis/cost.d.ts +10 -3
  70. package/dist/analysis/experiment-groups.cjs +96 -0
  71. package/dist/analysis/experiment-groups.cjs.map +1 -0
  72. package/dist/analysis/experiment-groups.d.cts +9 -0
  73. package/dist/analysis/experiment-groups.d.mts +9 -0
  74. package/dist/analysis/experiment-groups.d.ts +9 -0
  75. package/dist/analysis/experiment-groups.js +10 -0
  76. package/dist/analysis/experiment-groups.js.map +1 -0
  77. package/dist/analysis/index.cjs +4 -1
  78. package/dist/analysis/index.cjs.map +1 -1
  79. package/dist/analysis/index.d.cts +4 -2
  80. package/dist/analysis/index.d.mts +4 -2
  81. package/dist/analysis/index.d.ts +4 -2
  82. package/dist/analysis/index.js +40 -36
  83. package/dist/analysis/index.mjs +40 -36
  84. package/dist/assertions/limits.cjs +4 -0
  85. package/dist/assertions/limits.cjs.map +1 -1
  86. package/dist/assertions/limits.d.cts +4 -0
  87. package/dist/assertions/limits.d.mts +4 -0
  88. package/dist/assertions/limits.d.ts +4 -0
  89. package/dist/assertions/match.cjs +63 -25
  90. package/dist/assertions/match.cjs.map +1 -1
  91. package/dist/assertions/match.d.cts +7 -0
  92. package/dist/assertions/match.d.mts +7 -0
  93. package/dist/assertions/match.d.ts +7 -0
  94. package/dist/assertions/record/attachment.cjs +32 -4
  95. package/dist/assertions/record/attachment.cjs.map +1 -1
  96. package/dist/assertions/record/diff.cjs +10 -4
  97. package/dist/assertions/record/diff.cjs.map +1 -1
  98. package/dist/assertions/record/producer.cjs +101 -4
  99. package/dist/assertions/record/producer.cjs.map +1 -1
  100. package/dist/assertions/record/producer.d.cts +4 -1
  101. package/dist/assertions/record/producer.d.mts +4 -1
  102. package/dist/assertions/record/producer.d.ts +4 -1
  103. package/dist/assertions/runtime.cjs +45 -5
  104. package/dist/assertions/runtime.cjs.map +1 -1
  105. package/dist/cli/record.cjs +113 -8
  106. package/dist/cli/record.cjs.map +1 -1
  107. package/dist/cli/record.d.cts +20 -1
  108. package/dist/cli/record.d.mts +20 -1
  109. package/dist/cli/record.d.ts +20 -1
  110. package/dist/cli/record.js +4 -2
  111. package/dist/cli.cjs +386 -31
  112. package/dist/cli.cjs.map +1 -1
  113. package/dist/cli.d.cts +10 -2
  114. package/dist/cli.d.mts +10 -2
  115. package/dist/cli.d.ts +10 -2
  116. package/dist/context/send-retry.cjs +4 -4
  117. package/dist/context/send-retry.cjs.map +1 -1
  118. package/dist/coordination/host/runtime.cjs +8 -30
  119. package/dist/coordination/host/runtime.cjs.map +1 -1
  120. package/dist/coordination/host/runtime.d.cts +3 -3
  121. package/dist/coordination/host/runtime.d.mts +3 -3
  122. package/dist/coordination/host/runtime.d.ts +3 -3
  123. package/dist/coordination/host/types.cjs.map +1 -1
  124. package/dist/coordination/host/types.d.cts +0 -5
  125. package/dist/coordination/host/types.d.mts +0 -5
  126. package/dist/coordination/host/types.d.ts +0 -5
  127. package/dist/coordination/platform/node.cjs +90 -9
  128. package/dist/coordination/platform/node.cjs.map +1 -1
  129. package/dist/define.cjs +25 -1
  130. package/dist/define.cjs.map +1 -1
  131. package/dist/experiment/host/index.cjs +1 -0
  132. package/dist/experiment/host/index.cjs.map +1 -1
  133. package/dist/i18n/en.cjs +19 -6
  134. package/dist/i18n/en.cjs.map +1 -1
  135. package/dist/i18n/en.d.cts +12 -4
  136. package/dist/i18n/en.d.mts +12 -4
  137. package/dist/i18n/en.d.ts +12 -4
  138. package/dist/index.cjs.map +1 -1
  139. package/dist/index.d.cts +1 -1
  140. package/dist/index.d.mts +1 -1
  141. package/dist/index.d.ts +1 -1
  142. package/dist/o11y/prices.json +1 -1
  143. package/dist/o11y/record/families.cjs +12 -3
  144. package/dist/o11y/record/families.cjs.map +1 -1
  145. package/dist/o11y/record/families.d.cts +8 -8
  146. package/dist/o11y/record/families.d.mts +8 -8
  147. package/dist/o11y/record/families.d.ts +8 -8
  148. package/dist/o11y/record/family-projectors.d.cts +66 -18
  149. package/dist/o11y/record/family-projectors.d.mts +66 -18
  150. package/dist/o11y/record/family-projectors.d.ts +66 -18
  151. package/dist/o11y/record/family-writers.d.cts +11 -3
  152. package/dist/o11y/record/family-writers.d.mts +11 -3
  153. package/dist/o11y/record/family-writers.d.ts +11 -3
  154. package/dist/o11y/record/runner-producer.cjs +14 -4
  155. package/dist/o11y/record/runner-producer.cjs.map +1 -1
  156. package/dist/record/codec/core.d.cts +2 -2
  157. package/dist/record/codec/core.d.mts +2 -2
  158. package/dist/record/codec/core.d.ts +2 -2
  159. package/dist/record/family/catalog.d.cts +44 -12
  160. package/dist/record/family/catalog.d.mts +44 -12
  161. package/dist/record/family/catalog.d.ts +44 -12
  162. package/dist/record/family/index.js +128 -124
  163. package/dist/record/family/observability-v1.cjs +35 -0
  164. package/dist/record/family/observability-v1.cjs.map +1 -0
  165. package/dist/record/family/observability-v1.d.cts +3 -0
  166. package/dist/record/family/observability-v1.d.mts +3 -0
  167. package/dist/record/family/observability-v1.d.ts +3 -0
  168. package/dist/record/family/observability-v1.js +6 -0
  169. package/dist/record/family/observability-v1.js.map +1 -0
  170. package/dist/record/family/observability.cjs +58 -9
  171. package/dist/record/family/observability.cjs.map +1 -1
  172. package/dist/record/family/observability.d.cts +1014 -15
  173. package/dist/record/family/observability.d.mts +1014 -15
  174. package/dist/record/family/observability.d.ts +1014 -15
  175. package/dist/record/family/observability.js +22 -18
  176. package/dist/record/host/runtime.cjs +600 -31
  177. package/dist/record/host/runtime.cjs.map +1 -1
  178. package/dist/record/host/types.cjs.map +1 -1
  179. package/dist/record/host/types.d.cts +33 -9
  180. package/dist/record/host/types.d.mts +33 -9
  181. package/dist/record/host/types.d.ts +33 -9
  182. package/dist/record/maintenance/runtime.cjs +1 -2
  183. package/dist/record/maintenance/runtime.cjs.map +1 -1
  184. package/dist/record/model/core.cjs.map +1 -1
  185. package/dist/record/model/core.d.cts +1 -1
  186. package/dist/record/model/core.d.mts +1 -1
  187. package/dist/record/model/core.d.ts +1 -1
  188. package/dist/record/model/definition.d.cts +6 -6
  189. package/dist/record/model/definition.d.mts +6 -6
  190. package/dist/record/model/definition.d.ts +6 -6
  191. package/dist/record/model/identifiers.cjs +1 -1
  192. package/dist/record/model/identifiers.cjs.map +1 -1
  193. package/dist/record/model/identifiers.d.cts +1 -1
  194. package/dist/record/model/identifiers.d.mts +1 -1
  195. package/dist/record/model/identifiers.d.ts +1 -1
  196. package/dist/record/platform/node.cjs +159 -23
  197. package/dist/record/platform/node.cjs.map +1 -1
  198. package/dist/record/platform/services.cjs.map +1 -1
  199. package/dist/record/platform/services.d.cts +15 -2
  200. package/dist/record/platform/services.d.mts +15 -2
  201. package/dist/record/platform/services.d.ts +15 -2
  202. package/dist/record/reader/errors.cjs +37 -1
  203. package/dist/record/reader/errors.cjs.map +1 -1
  204. package/dist/record/reader/errors.d.cts +49 -1
  205. package/dist/record/reader/errors.d.mts +49 -1
  206. package/dist/record/reader/errors.d.ts +49 -1
  207. package/dist/record/reader/errors.js +22 -12
  208. package/dist/record/reader/format.cjs +76 -17
  209. package/dist/record/reader/format.cjs.map +1 -1
  210. package/dist/record/reader/format.d.cts +11 -4
  211. package/dist/record/reader/format.d.mts +11 -4
  212. package/dist/record/reader/format.d.ts +11 -4
  213. package/dist/record/reader/format.js +2 -0
  214. package/dist/record/reader/index.js +32 -18
  215. package/dist/record/reader/runtime.cjs +64 -0
  216. package/dist/record/reader/runtime.cjs.map +1 -1
  217. package/dist/record/reader/runtime.d.cts +15 -0
  218. package/dist/record/reader/runtime.d.mts +15 -0
  219. package/dist/record/reader/runtime.d.ts +15 -0
  220. package/dist/record/reader/runtime.js +2 -0
  221. package/dist/report/assets/styles.css +53 -29
  222. package/dist/report/built-in/analysis-values.cjs +0 -8
  223. package/dist/report/built-in/analysis-values.cjs.map +1 -1
  224. package/dist/report/built-in/analysis-values.d.cts +0 -13
  225. package/dist/report/built-in/analysis-values.d.mts +0 -13
  226. package/dist/report/built-in/analysis-values.d.ts +0 -13
  227. package/dist/report/built-in/analysis-values.js +4 -6
  228. package/dist/report/built-in/index.cjs +1 -3
  229. package/dist/report/built-in/index.cjs.map +1 -1
  230. package/dist/report/built-in/index.d.cts +1 -1
  231. package/dist/report/built-in/index.d.mts +1 -1
  232. package/dist/report/built-in/index.d.ts +1 -1
  233. package/dist/report/built-in/index.js +4 -8
  234. package/dist/report/built-in/index.mjs +4 -8
  235. package/dist/report/built-in/machine.cjs +0 -2
  236. package/dist/report/built-in/machine.cjs.map +1 -1
  237. package/dist/report/built-in/machine.d.cts +0 -2
  238. package/dist/report/built-in/machine.d.mts +0 -2
  239. package/dist/report/built-in/machine.d.ts +0 -2
  240. package/dist/report/built-in/result-components.cjs +25 -73
  241. package/dist/report/built-in/result-components.cjs.map +1 -1
  242. package/dist/report/built-in/result-components.d.cts +3 -19
  243. package/dist/report/built-in/result-components.d.mts +3 -19
  244. package/dist/report/built-in/result-components.d.ts +3 -19
  245. package/dist/report/built-in/result-components.js +0 -4
  246. package/dist/report/built-in/run-membership-overview.cjs +30 -17
  247. package/dist/report/built-in/run-membership-overview.cjs.map +1 -1
  248. package/dist/report/built-in/run-membership-overview.d.cts +14 -0
  249. package/dist/report/built-in/run-membership-overview.d.mts +14 -0
  250. package/dist/report/built-in/run-membership-overview.d.ts +14 -0
  251. package/dist/report/built-in/run-membership-overview.js +4 -2
  252. package/dist/report/built-in/standard.cjs +80 -46
  253. package/dist/report/built-in/standard.cjs.map +1 -1
  254. package/dist/report/built-in/standard.d.cts +19 -42
  255. package/dist/report/built-in/standard.d.mts +19 -42
  256. package/dist/report/built-in/standard.d.ts +19 -42
  257. package/dist/report/built-in/standard.js +6 -6
  258. package/dist/report/components/attempt-detail/compute.cjs +78 -2
  259. package/dist/report/components/attempt-detail/compute.cjs.map +1 -1
  260. package/dist/report/components/attempt-detail/compute.d.cts +1 -1
  261. package/dist/report/components/attempt-detail/compute.d.mts +1 -1
  262. package/dist/report/components/attempt-detail/compute.d.ts +1 -1
  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 +2 -2
  266. package/dist/report/components/entity-lists/compute.cjs.map +1 -1
  267. package/dist/report/components/entity-lists/compute.d.cts +2 -2
  268. package/dist/report/components/entity-lists/compute.d.mts +2 -2
  269. package/dist/report/components/entity-lists/compute.d.ts +2 -2
  270. package/dist/report/components/entity-lists/index.cjs +6 -2
  271. package/dist/report/components/entity-lists/index.cjs.map +1 -1
  272. package/dist/report/components/entity-lists/index.d.cts +3 -6
  273. package/dist/report/components/entity-lists/index.d.mts +3 -6
  274. package/dist/report/components/entity-lists/index.d.ts +3 -6
  275. package/dist/report/components/summaries/compute.cjs +8 -1
  276. package/dist/report/components/summaries/compute.cjs.map +1 -1
  277. package/dist/report/components/summaries/compute.d.cts +9 -1
  278. package/dist/report/components/summaries/compute.d.mts +9 -1
  279. package/dist/report/components/summaries/compute.d.ts +9 -1
  280. package/dist/report/components/summaries/index.cjs +48 -4
  281. package/dist/report/components/summaries/index.cjs.map +1 -1
  282. package/dist/report/components/summaries/index.d.cts +7 -4
  283. package/dist/report/components/summaries/index.d.mts +7 -4
  284. package/dist/report/components/summaries/index.d.ts +7 -4
  285. package/dist/report/definition/primitives/chart.cjs +8 -5
  286. package/dist/report/definition/primitives/chart.cjs.map +1 -1
  287. package/dist/report/definition/primitives/points-dataset.cjs +1 -0
  288. package/dist/report/definition/primitives/points-dataset.cjs.map +1 -1
  289. package/dist/report/definition/primitives.cjs +6 -0
  290. package/dist/report/definition/primitives.cjs.map +1 -1
  291. package/dist/report/definition/report.cjs +27 -3
  292. package/dist/report/definition/report.cjs.map +1 -1
  293. package/dist/report/definition/report.d.cts +8 -0
  294. package/dist/report/definition/report.d.mts +8 -0
  295. package/dist/report/definition/report.d.ts +8 -0
  296. package/dist/report/execution/machine.cjs +30 -14
  297. package/dist/report/execution/machine.cjs.map +1 -1
  298. package/dist/report/execution/machine.d.cts +20 -10
  299. package/dist/report/execution/machine.d.mts +20 -10
  300. package/dist/report/execution/machine.d.ts +20 -10
  301. package/dist/report/execution/machine.js +6 -6
  302. package/dist/report/host/execute.cjs +25 -16
  303. package/dist/report/host/execute.cjs.map +1 -1
  304. package/dist/report/host/execute.d.cts +4 -0
  305. package/dist/report/host/execute.d.mts +4 -0
  306. package/dist/report/host/execute.d.ts +4 -0
  307. package/dist/report/host/from-record.cjs +22 -5
  308. package/dist/report/host/from-record.cjs.map +1 -1
  309. package/dist/report/host/machine.cjs +53 -11
  310. package/dist/report/host/machine.cjs.map +1 -1
  311. package/dist/report/host/site-runtime.cjs +9 -8
  312. package/dist/report/host/site-runtime.cjs.map +1 -1
  313. package/dist/report/host/site-runtime.d.cts +1 -1
  314. package/dist/report/host/site-runtime.d.mts +1 -1
  315. package/dist/report/host/site-runtime.d.ts +1 -1
  316. package/dist/report/host/static.cjs +56 -9
  317. package/dist/report/host/static.cjs.map +1 -1
  318. package/dist/report/index.cjs.map +1 -1
  319. package/dist/report/index.d.cts +1 -1
  320. package/dist/report/index.d.mts +1 -1
  321. package/dist/report/index.d.ts +1 -1
  322. package/dist/report/model/dataset.cjs +7 -2
  323. package/dist/report/model/dataset.cjs.map +1 -1
  324. package/dist/report/model/locale.cjs +2 -0
  325. package/dist/report/model/locale.cjs.map +1 -1
  326. package/dist/report/model/locale.d.cts +1 -0
  327. package/dist/report/model/locale.d.mts +1 -0
  328. package/dist/report/model/locale.d.ts +1 -0
  329. package/dist/report/model/metrics.cjs +3 -1
  330. package/dist/report/model/metrics.cjs.map +1 -1
  331. package/dist/report/model/pricing.cjs +16 -11
  332. package/dist/report/model/pricing.cjs.map +1 -1
  333. package/dist/report/react/styles.css +53 -29
  334. package/dist/runner/adoption.cjs +1 -0
  335. package/dist/runner/adoption.cjs.map +1 -1
  336. package/dist/runner/attempt.cjs +44 -5
  337. package/dist/runner/attempt.cjs.map +1 -1
  338. package/dist/runner/attempt.d.cts +13 -1
  339. package/dist/runner/attempt.d.mts +13 -1
  340. package/dist/runner/attempt.d.ts +13 -1
  341. package/dist/runner/config-identity.cjs +10 -2
  342. package/dist/runner/config-identity.cjs.map +1 -1
  343. package/dist/runner/config-identity.d.cts +4 -2
  344. package/dist/runner/config-identity.d.mts +4 -2
  345. package/dist/runner/config-identity.d.ts +4 -2
  346. package/dist/runner/feedback/human.cjs +139 -64
  347. package/dist/runner/feedback/human.cjs.map +1 -1
  348. package/dist/runner/feedback/json.cjs +14 -6
  349. package/dist/runner/feedback/json.cjs.map +1 -1
  350. package/dist/runner/feedback/json.d.cts +3 -2
  351. package/dist/runner/feedback/json.d.mts +3 -2
  352. package/dist/runner/feedback/json.d.ts +3 -2
  353. package/dist/runner/feedback/reducer.cjs +2 -0
  354. package/dist/runner/feedback/reducer.cjs.map +1 -1
  355. package/dist/runner/judge-config.cjs +1 -1
  356. package/dist/runner/judge-config.cjs.map +1 -1
  357. package/dist/runner/ledger.cjs +124 -12
  358. package/dist/runner/ledger.cjs.map +1 -1
  359. package/dist/runner/project-current.cjs +13 -5
  360. package/dist/runner/project-current.cjs.map +1 -1
  361. package/dist/runner/run.cjs +521 -256
  362. package/dist/runner/run.cjs.map +1 -1
  363. package/dist/runner/sandbox-pool.cjs +161 -30
  364. package/dist/runner/sandbox-pool.cjs.map +1 -1
  365. package/dist/runner/sandbox-pool.d.cts +34 -2
  366. package/dist/runner/sandbox-pool.d.mts +34 -2
  367. package/dist/runner/sandbox-pool.d.ts +34 -2
  368. package/dist/runner/shared-state-lease.cjs +803 -0
  369. package/dist/runner/shared-state-lease.cjs.map +1 -0
  370. package/dist/runner/shared-state-lease.d.cts +121 -0
  371. package/dist/runner/shared-state-lease.d.mts +121 -0
  372. package/dist/runner/shared-state-lease.d.ts +121 -0
  373. package/dist/runner/shared-state-lease.js +24 -0
  374. package/dist/runner/shared-state-lease.js.map +1 -0
  375. package/dist/runner/teardown-registry.cjs +97 -34
  376. package/dist/runner/teardown-registry.cjs.map +1 -1
  377. package/dist/runner/teardown-registry.d.cts +27 -1
  378. package/dist/runner/teardown-registry.d.mts +27 -1
  379. package/dist/runner/teardown-registry.d.ts +27 -1
  380. package/dist/runner/teardown-registry.js +20 -16
  381. package/dist/runner/types.cjs.map +1 -1
  382. package/dist/runner/types.d.cts +31 -5
  383. package/dist/runner/types.d.mts +31 -5
  384. package/dist/runner/types.d.ts +31 -5
  385. package/dist/sample/analysis.cjs +249 -459
  386. package/dist/sample/analysis.cjs.map +1 -1
  387. package/dist/sample/capability.cjs +46 -8
  388. package/dist/sample/capability.cjs.map +1 -1
  389. package/dist/sandbox/docker-profile/schema.cjs +283 -534
  390. package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
  391. package/dist/sandbox/docker-profile/schema.d.cts +10 -27
  392. package/dist/sandbox/docker-profile/schema.d.mts +10 -27
  393. package/dist/sandbox/docker-profile/schema.d.ts +10 -27
  394. package/dist/sandbox/e2b-agent-template.cjs +5 -2
  395. package/dist/sandbox/e2b-agent-template.cjs.map +1 -1
  396. package/dist/sandbox/keep-registry.cjs +28 -66
  397. package/dist/sandbox/keep-registry.cjs.map +1 -1
  398. package/dist/sandbox/types.cjs.map +1 -1
  399. package/dist/sandbox/types.d.cts +1 -1
  400. package/dist/sandbox/types.d.mts +1 -1
  401. package/dist/sandbox/types.d.ts +1 -1
  402. package/dist/shared/aggregate.cjs +16 -6
  403. package/dist/shared/aggregate.cjs.map +1 -1
  404. package/dist/shared/aggregate.d.cts +12 -4
  405. package/dist/shared/aggregate.d.mts +12 -4
  406. package/dist/shared/aggregate.d.ts +12 -4
  407. package/dist/shared/turn-label.cjs +20 -2
  408. package/dist/shared/turn-label.cjs.map +1 -1
  409. package/dist/shared/turn-label.d.cts +2 -0
  410. package/dist/shared/turn-label.d.mts +2 -0
  411. package/dist/shared/turn-label.d.ts +2 -0
  412. package/dist/shared/turn-label.js +4 -2
  413. package/dist/vendor/remark/remark-gfm.cjs +7 -7
  414. package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
  415. package/dist/vendor/remark/remark-parse.cjs +12 -12
  416. package/dist/vendor/remark/remark-parse.cjs.map +1 -1
  417. package/dist/vendor/remark/remark.cjs +13 -13
  418. package/dist/vendor/remark/remark.cjs.map +1 -1
  419. package/dist/view/server.cjs +6 -0
  420. package/dist/view/server.cjs.map +1 -1
  421. package/docs-site/zh/examples/ai-agent-application.mdx +1 -1
  422. package/docs-site/zh/examples/coding-agent-extensions.mdx +1 -1
  423. package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +1 -0
  424. package/docs-site/zh/examples/integrations/langgraph.mdx +1 -1
  425. package/docs-site/zh/explanation/assert.mdx +6 -6
  426. package/docs-site/zh/explanation/drive.mdx +1 -1
  427. package/docs-site/zh/explanation/evals.mdx +9 -9
  428. package/docs-site/zh/explanation/experiment.mdx +2 -2
  429. package/docs-site/zh/explanation/hitl.mdx +3 -3
  430. package/docs-site/zh/explanation/judge.mdx +5 -5
  431. package/docs-site/zh/explanation/overview.mdx +3 -3
  432. package/docs-site/zh/explanation/runner.mdx +1 -1
  433. package/docs-site/zh/index.mdx +3 -3
  434. package/docs-site/zh/reference/builtin-agents.mdx +9 -9
  435. package/docs-site/zh/reference/cli.mdx +18 -12
  436. package/docs-site/zh/reference/define-agent.mdx +130 -5
  437. package/docs-site/zh/reference/define-config.mdx +2 -2
  438. package/docs-site/zh/reference/define-eval.mdx +4 -4
  439. package/docs-site/zh/reference/events.mdx +1 -1
  440. package/docs-site/zh/reference/official-adapters.mdx +5 -5
  441. package/docs-site/zh/troubleshooting/debugging.mdx +1 -1
  442. package/docs-site/zh/troubleshooting/recover-after-kill.mdx +37 -5
  443. package/docs-site/zh/tutorials/accept-results.mdx +72 -0
  444. package/docs-site/zh/tutorials/agent-onboarding.mdx +6 -6
  445. package/docs-site/zh/tutorials/authoring.mdx +9 -13
  446. package/docs-site/zh/tutorials/ci-integration.mdx +6 -6
  447. package/docs-site/zh/tutorials/compare-runs.mdx +61 -0
  448. package/docs-site/zh/tutorials/concurrency.mdx +13 -12
  449. package/docs-site/zh/tutorials/configuration.mdx +4 -6
  450. package/docs-site/zh/tutorials/connect-your-agent.mdx +1 -1
  451. package/docs-site/zh/tutorials/control-run-cost.mdx +58 -0
  452. package/docs-site/zh/tutorials/criteria-files.mdx +2 -2
  453. package/docs-site/zh/tutorials/custom-reports.mdx +2 -2
  454. package/docs-site/zh/tutorials/debug-lifecycle-plan.mdx +46 -0
  455. package/docs-site/zh/tutorials/docker-in-docker.mdx +50 -44
  456. package/docs-site/zh/tutorials/eval-groups.mdx +6 -6
  457. package/docs-site/zh/tutorials/evaluation-kinds.mdx +3 -3
  458. package/docs-site/zh/tutorials/experiments.mdx +2 -3
  459. package/docs-site/zh/tutorials/handle-execution-failures.mdx +18 -10
  460. package/docs-site/zh/tutorials/install-custom-sandbox-agent.mdx +16 -8
  461. package/docs-site/zh/tutorials/plugins.mdx +14 -0
  462. package/docs-site/zh/tutorials/rerun-and-cache.mdx +3 -17
  463. package/docs-site/zh/tutorials/sandbox-agent.mdx +17 -11
  464. package/docs-site/zh/tutorials/sandbox-providers.mdx +17 -13
  465. package/docs-site/zh/tutorials/sandbox-reuse.mdx +12 -19
  466. package/docs-site/zh/tutorials/select-and-preview.mdx +65 -0
  467. package/docs-site/zh/tutorials/verify-judge.mdx +78 -0
  468. package/docs-site/zh/tutorials/viewing-results.mdx +27 -8
  469. package/docs-site/zh/tutorials/write-experiment.mdx +7 -5
  470. package/docs-site/zh/tutorials/write-send.mdx +2 -2
  471. package/package.json +9 -5
  472. package/dist/report/built-in/overview.cjs +0 -45
  473. package/dist/report/built-in/overview.cjs.map +0 -1
  474. package/dist/report/built-in/overview.d.cts +0 -6
  475. package/dist/report/built-in/overview.d.mts +0 -6
  476. package/dist/report/built-in/overview.d.ts +0 -6
  477. package/dist/report/built-in/overview.js +0 -9
  478. package/dist/report/built-in/overview.js.map +0 -1
  479. package/dist/runner/gate-lease.cjs +0 -283
  480. package/dist/runner/gate-lease.cjs.map +0 -1
  481. package/dist/runner/gate-lease.d.cts +0 -62
  482. package/dist/runner/gate-lease.d.mts +0 -62
  483. package/dist/runner/gate-lease.d.ts +0 -62
  484. package/dist/runner/gate-lease.js +0 -22
  485. package/dist/runner/gate-lease.js.map +0 -1
@@ -47,8 +47,7 @@ function panelCapabilityForFeedback(io) {
47
47
  const HUMAN_FAILURE_CAP = 10;
48
48
  /** live 面板 FAILURES 分节滚动保留的条数(见 cli.md「运行中的 live 面板」)。 */
49
49
  const LIVE_FAILURES_VISIBLE = 5;
50
- /** 结束反馈 FAILURES 面板按失败形态聚合后,展开的组数上限;超出收进
51
- * `+K more kinds — niceeval view` 尾行(见 cli.md「人看的结束反馈」)。 */
50
+ /** 结束反馈中断言失败形态的展开上限;execution error 必须逐条保留自己的 message,不受此上限折叠。 */
52
51
  const FAILURE_GROUPS_CAP = 10;
53
52
  /** 非 TTY / `--json` 没有可依赖的终端宽度,失败单行投影用固定预算(见
54
53
  * docs/feature/assertions/library/display.md「一条摘要怎样排版」)。 */
@@ -59,6 +58,7 @@ const NON_TTY_HEARTBEAT_IDLE_MS = 30000;
59
58
  * 这里只需要给「下一帧」留出一行余地,不需要额外的表头/尾行预留)。 */
60
59
  const DASHBOARD_ROW_RESERVE = 1;
61
60
  const HUMAN_RESULTS_EXPERIMENT_CAP = 5;
61
+ const HUMAN_ERROR_TEXT_MAX_BYTES = 240;
62
62
  function freshHumanResult(result) {
63
63
  const score = result.scoreResult;
64
64
  const scoreState = score === undefined
@@ -145,14 +145,21 @@ function buildResultsPanelRows(items) {
145
145
  }
146
146
  return rows;
147
147
  }
148
- function buildPreAttemptErrorRows(results) {
148
+ function buildPreAttemptErrorRows(results, runIdsByExperiment, panel) {
149
149
  const errored = results.filter((result) => result.verdict === "errored" && result.locator === undefined && result.error !== undefined);
150
150
  if (errored.length === 0)
151
151
  return undefined;
152
152
  const groups = new Map();
153
153
  for (const result of errored) {
154
154
  const error = result.error;
155
- const failureId = error.origin.scope === "run" ? error.origin.timingNodeId : `${error.code}:${error.message}`;
155
+ const runId = result.experimentId === undefined
156
+ ? undefined
157
+ : runIdsByExperiment.get(result.experimentId);
158
+ // Run timing node IDs are local identities. The same `n1` in another Run
159
+ // names a different physical failure and must not absorb its message.
160
+ const failureId = error.origin.scope === "run"
161
+ ? `${runId ?? result.experimentId ?? "default"}\u0000${error.origin.timingNodeId}`
162
+ : `${result.experimentId ?? "default"}\u0000${error.code}:${error.message}`;
156
163
  const members = groups.get(failureId);
157
164
  if (members)
158
165
  members.push(result);
@@ -160,28 +167,34 @@ function buildPreAttemptErrorRows(results) {
160
167
  groups.set(failureId, [result]);
161
168
  }
162
169
  const rows = [];
163
- for (const [failureId, members] of groups) {
170
+ const contentWidth = (0, panel_ts_1.panelContentWidth)(panel.width, panel.mode);
171
+ for (const members of groups.values()) {
164
172
  const representative = members[0];
165
173
  const error = representative.error;
166
- const codeMatch = /\bERR_[A-Z0-9_]+\b/u.exec(error.message);
167
- const errorCode = codeMatch?.[0] ?? error.code;
168
- const focusedMessage = codeMatch === null ? error.message.slice(-600) : error.message.slice(codeMatch.index);
169
- rows.push({ kind: "line", text: `${FAILURE_SYMBOL} ${representative.experimentId ?? "default"} · sandbox provisioning failed` });
170
- rows.push({ kind: "line", text: ` phase: ${error.origin.scope === "run" ? "sandbox.image.build" : error.origin.phase}` });
171
- rows.push({ kind: "line", text: ` affected: ${members.map((member) => member.id).join(", ")}` });
172
- rows.push({ kind: "line", text: ` shared failure: ${failureId}` });
173
- rows.push({ kind: "line", text: ` ${errorCode}` });
174
- for (const line of focusedMessage.split(/\r?\n/u).slice(0, 6)) {
175
- const text = line.trimEnd();
176
- if (text.length > 0)
177
- rows.push({ kind: "line", text: ` ${text}` });
178
- }
179
- if (errorCode === "ERR_PNPM_IGNORED_BUILDS") {
180
- rows.push({ kind: "line", text: " fix: Review these dependencies and configure pnpm allowBuilds." });
181
- }
174
+ rows.push({
175
+ kind: "line",
176
+ text: `${FAILURE_SYMBOL} ${representative.experimentId ?? "default"} · ${preAttemptErrorTitle(error.origin)}`,
177
+ });
178
+ rows.push({
179
+ kind: "line",
180
+ text: ` affected: ${members.map((member) => `${member.experimentId ?? "default"}/${member.id}`).join(", ")}`,
181
+ });
182
+ rows.push(...labelledWrappedRows("error", boundedHumanError(error.message), contentWidth));
182
183
  }
183
184
  return { rows, slots: errored.length };
184
185
  }
186
+ function preAttemptErrorTitle(origin) {
187
+ if (origin.scope === "run")
188
+ return "Sandbox image build failed";
189
+ const phase = origin.phase;
190
+ switch (phase) {
191
+ case "judge.precheck": return "Judge precheck failed";
192
+ case "experiment.setup": return "Experiment setup failed";
193
+ case "sandbox.queue": return "Sandbox queue failed";
194
+ case "sandbox.create": return "Sandbox provisioning failed";
195
+ default: return `${phaseLabel(phase)} failed`;
196
+ }
197
+ }
185
198
  /** 按 `io.stderr.isTTY` 派发:构造时选一次,运行期不再切换。 */
186
199
  function createHumanRenderer(options) {
187
200
  const { io, command } = options;
@@ -305,7 +318,7 @@ function renderDurableLines(event, state, panel) {
305
318
  case "summary":
306
319
  return buildSummaryLines(event, state, panel);
307
320
  case "receipt":
308
- return buildReceiptLines(event, panel);
321
+ return buildReceiptLines(event, state, panel);
309
322
  default: {
310
323
  // 穷尽性检查:新增 DurableFeedbackEvent 变体时这里编译期报错提醒补上对应分支。
311
324
  const exhaustive = event;
@@ -381,20 +394,9 @@ function buildFailureFactLine(failure, maxWidth) {
381
394
  const budget = Math.max(0, maxWidth - (0, text_layout_ts_1.stringWidth)(prefix));
382
395
  const info = failure.fact
383
396
  ? (0, display_ts_1.fitCompactAssertionSummary)(failure.fact, budget)
384
- : buildErroredInfo(failure.phase, failure.code, failure.reason);
397
+ : `error: ${boundedHumanError(failure.reason)}`;
385
398
  return prefix + clipDisplayWidth(info, budget);
386
399
  }
387
- /**
388
- * errored 且没有主 Fact 摘要(真正的结构化执行错误)时的信息段:
389
- * `errored · <phase> · <code>`,余量够再接 `: <message>`。`phase`/`code` 用未翻译的原始字面量
390
- * (`LifecyclePhase` 枚举值 / `AttemptError.code`),不走 `phaseLabel()` 的人读短语 —— 这一段
391
- * 是给读者对照 `--json` `error` 事件、`result.json` 与 `show` 里同一个字面量用的,不是散文。
392
- */
393
- function buildErroredInfo(phase, code, reason) {
394
- const parts = ["errored", ...(phase ? [phase] : []), ...(code ? [code] : [])];
395
- const base = parts.join(" · ");
396
- return reason ? `${base}: ${reason}` : base;
397
- }
398
400
  /** 按显示列硬夹紧,超宽尾部截断补 `…`。`fitCompactAssertionSummary` 的截断口径是字符数,不是
399
401
  * 显示列(见该函数注释「显示宽度的精确裁剪仍归渲染面」);这里补上那道显示宽度的硬夹紧,
400
402
  * 堵住 CJK 内容"按字符数收口仍超显示列"的缝,保证渲染行恒不超过预算。 */
@@ -423,6 +425,11 @@ function buildDiagnosticLines(event, state) {
423
425
  // 跨用例撞上同一类状况时,读者需要的是「这类事发生了 N 次」,不是 N 段几乎相同的文字;
424
426
  // 逐 code 的次数与首条 message 由结束反馈的 WARNINGS / RECOVERY 面板汇总。
425
427
  const code = event.code ?? event.key;
428
+ // Judge precheck already has a live lifecycle row and a terminal pre-Attempt
429
+ // error block. Repeating its machine code in Human output adds no fact and
430
+ // exposes machine vocabulary in the default profile.
431
+ if (code === "judge-precheck-failed")
432
+ return [];
426
433
  const firstForCode = state.diagnostics.find((d) => (d.code ?? d.key) === code);
427
434
  const count = state.diagnostics.find((d) => d.key === event.key)?.count ?? 1;
428
435
  if (count > 1 || firstForCode?.key !== event.key)
@@ -511,11 +518,11 @@ function buildSummaryLines(event, state, panel) {
511
518
  mode: panel.mode,
512
519
  }));
513
520
  }
514
- const preAttemptErrors = buildPreAttemptErrorRows(summary.results);
521
+ const preAttemptErrors = buildPreAttemptErrorRows(summary.results, state.runIdsByExperiment, panel);
515
522
  if (preAttemptErrors !== undefined) {
516
523
  blocks.push((0, panel_ts_1.renderPanel)({
517
524
  title: (0, index_ts_1.t)("feedback.human.errorsHeader"),
518
- meta: `${preAttemptErrors.slots} slots`,
525
+ meta: `${preAttemptErrors.slots} attempt${preAttemptErrors.slots === 1 ? "" : "s"} not started`,
519
526
  rows: preAttemptErrors.rows,
520
527
  width: panel.width,
521
528
  mode: panel.mode,
@@ -554,7 +561,10 @@ function buildSummaryLines(event, state, panel) {
554
561
  // `WARNINGS`(有诊断才出现,位于 FAILURES 与 NEXT 之间,见 cli.md「人看的结束反馈」):
555
562
  // 按 code 汇总本次去重后的诊断,运行中同 code 只完整打印过第一条,这里是「这类事一共
556
563
  // 发生了几次」的权威答案。
557
- const warningsRows = buildWarningsPanelRows(state.diagnostics);
564
+ const preAttemptCodes = new Set(summary.results.flatMap((result) => result.verdict === "errored" && result.locator === undefined && result.error !== undefined
565
+ ? [result.error.code]
566
+ : []));
567
+ const warningsRows = buildWarningsPanelRows(state.diagnostics.filter((diagnostic) => diagnostic.severity !== "error" || !preAttemptCodes.has(diagnostic.code ?? diagnostic.key)));
558
568
  if (warningsRows) {
559
569
  blocks.push((0, panel_ts_1.renderPanel)({ title: (0, index_ts_1.t)("feedback.human.warningsHeader"), rows: warningsRows, width: panel.width, mode: panel.mode }));
560
570
  }
@@ -574,7 +584,14 @@ function buildSummaryLines(event, state, panel) {
574
584
  function buildFailuresPanelRows(failures, panel) {
575
585
  const groups = groupFailuresByShape(failures);
576
586
  const contentWidth = (0, panel_ts_1.panelContentWidth)(panel.width, panel.mode);
577
- const shown = groups.slice(0, FAILURE_GROUPS_CAP);
587
+ let shownAssertionKinds = 0;
588
+ const shown = groups.filter((group) => {
589
+ if (group.representative.fact === undefined)
590
+ return true;
591
+ shownAssertionKinds += 1;
592
+ return shownAssertionKinds <= FAILURE_GROUPS_CAP;
593
+ });
594
+ const omitted = groups.length - shown.length;
578
595
  const multi = shown.filter((g) => g.size > 1);
579
596
  const countWidth = Math.max(0, ...multi.map((g) => (0, text_layout_ts_1.stringWidth)(`${FAILURE_SYMBOL} ×${g.size}`)));
580
597
  const rows = [];
@@ -586,10 +603,10 @@ function buildFailuresPanelRows(failures, panel) {
586
603
  rows.push(buildMultiFailureGroupRow(group, countWidth));
587
604
  }
588
605
  }
589
- if (groups.length > FAILURE_GROUPS_CAP) {
606
+ if (omitted > 0) {
590
607
  rows.push({
591
608
  kind: "line",
592
- text: (0, index_ts_1.t)("feedback.human.moreFailureKinds", { count: groups.length - FAILURE_GROUPS_CAP }),
609
+ text: (0, index_ts_1.t)("feedback.human.moreFailureKinds", { count: omitted }),
593
610
  });
594
611
  }
595
612
  return { rows, meta: (0, index_ts_1.t)("feedback.human.failuresTotalKinds", { total: failures.length, kinds: groups.length }) };
@@ -610,18 +627,14 @@ function groupFailuresByShape(failures) {
610
627
  .map(([key, g]) => ({ key, ...g }))
611
628
  .sort((a, b) => b.size - a.size);
612
629
  }
613
- /** 组 key 与形态摘要文本共用同一个"剥掉 received 的断言摘要"投影(有主断言摘要时,`failed`
614
- * 与 Fact unavailable 造成的 `errored` 都走这条);没有主 Fact 摘要的 `errored`(真正的
615
- * 结构化执行错误)按 `phase · code` 分组,摘要文本复用 `buildErroredInfo`(不带 message)。 */
630
+ /** 断言按稳定形态聚合;execution error 的 key 包含 locator,确保不同 Attempt 不会因共享
631
+ * phase/code 而吞掉各自的 Provider message。 */
616
632
  function failureShapeOf(failure) {
617
633
  if (failure.fact) {
618
634
  const shapeText = (0, display_ts_1.compactAssertionSummary)({ ...failure.fact, received: undefined, additionalFailures: 0 });
619
635
  return { key: `fact\u0000${failure.fact.title}\u0000${failure.fact.matcher ?? ""}`, shapeText };
620
636
  }
621
- return {
622
- key: `errored\u0000${failure.phase ?? "?"}\u0000${failure.code ?? "?"}`,
623
- shapeText: buildErroredInfo(failure.phase, failure.code, ""),
624
- };
637
+ return { key: `errored\u0000${failure.locator}`, shapeText: "error" };
625
638
  }
626
639
  function buildMultiFailureGroupRow(group, countWidth) {
627
640
  const countToken = (0, text_layout_ts_1.padStartDisplay)(`${FAILURE_SYMBOL} ×${group.size}`, countWidth);
@@ -636,13 +649,15 @@ function buildSingleFailureGroupRows(failure, contentWidth) {
636
649
  const identityLine = `${FAILURE_SYMBOL} ${failure.locator} ${failure.identity.evalId} [${failure.who}]`;
637
650
  const indent = (0, text_layout_ts_1.stringWidth)(`${FAILURE_SYMBOL} `);
638
651
  const budget = Math.max(0, contentWidth - indent);
639
- const info = failure.fact
640
- ? (0, display_ts_1.fitCompactAssertionSummary)(failure.fact, budget)
641
- : buildErroredInfo(failure.phase, failure.code, failure.reason);
642
- return [
643
- { kind: "line", text: identityLine },
644
- { kind: "line", text: `${" ".repeat(indent)}${clipDisplayWidth(info, budget)}` },
645
- ];
652
+ const rows = [{ kind: "line", text: identityLine }];
653
+ if (failure.fact) {
654
+ rows.push({ kind: "line", text: `${" ".repeat(indent)}${clipDisplayWidth((0, display_ts_1.fitCompactAssertionSummary)(failure.fact, budget), budget)}` });
655
+ }
656
+ else {
657
+ rows.push(...labelledWrappedRows("error", boundedHumanError(failure.reason), contentWidth));
658
+ }
659
+ rows.push(...labelledWrappedRows("details", `niceeval show ${failure.locator}`, contentWidth));
660
+ return rows;
646
661
  }
647
662
  /** `WARNINGS` 面板:`state.diagnostics` 已经按去重 key 折叠,这里再按对外稳定词法 `code` 二次
648
663
  * 聚合。info 由自己的完成面板消费;没有 warning/error 时返回 undefined。 */
@@ -672,38 +687,98 @@ function buildWarningsPanelRows(diagnostics) {
672
687
  }));
673
688
  }
674
689
  function buildRecoveryPanelRows(diagnostics) {
675
- let slots = 0;
676
690
  let locks = 0;
677
691
  for (const d of diagnostics) {
678
692
  if (d.severity !== "info" || d.code !== types_ts_1.COORDINATION_RECOVERED_CODE)
679
693
  continue;
680
- if (d.data?.resource === "concurrency-slot")
681
- slots += d.count;
682
694
  if (d.data?.resource === "case-lock")
683
695
  locks += d.count;
684
696
  }
685
- if (slots === 0 && locks === 0)
697
+ if (locks === 0)
686
698
  return undefined;
687
- const summary = (0, index_ts_1.t)("feedback.human.coordinationRecoveredSummary", {
688
- slots: pluralUnit(slots, "feedback.human.unit.concurrencySlot", "feedback.human.unit.concurrencySlots"),
689
- locks: pluralUnit(locks, "feedback.human.unit.caseLock", "feedback.human.unit.caseLocks"),
690
- });
699
+ const summary = pluralUnit(locks, "feedback.human.unit.caseLock", "feedback.human.unit.caseLocks");
691
700
  return [{ kind: "line", text: `i ${types_ts_1.COORDINATION_RECOVERED_CODE} ${summary}` }];
692
701
  }
693
702
  function warningCodeLabel(code, count) {
694
703
  return count > 1 ? `${code} ×${count}` : code;
695
704
  }
696
705
  /** `NEXT` 面板只由 receipt 的真实 Run ID 给出 Record 读取命令。 */
697
- function buildReceiptLines(event, panel) {
706
+ function buildReceiptLines(event, state, panel) {
698
707
  const rows = [];
708
+ const published = new Set(event.receipt.runIds);
709
+ const emitted = new Set();
710
+ for (const [experimentId, runId] of state.runIdsByExperiment) {
711
+ if (!published.has(runId))
712
+ continue;
713
+ rows.push({ kind: "line", text: experimentId });
714
+ rows.push(...labelledWrappedRows("details", `niceeval show --run ${runId}`, (0, panel_ts_1.panelContentWidth)(panel.width, panel.mode)));
715
+ emitted.add(runId);
716
+ }
699
717
  for (const runId of event.receipt.runIds) {
700
- rows.push({ kind: "line", text: `niceeval show --run ${runId}` });
718
+ if (!emitted.has(runId))
719
+ rows.push({ kind: "line", text: `details: niceeval show --run ${runId}` });
701
720
  }
702
721
  if (rows.length === 0) {
703
722
  rows.push({ kind: "line", text: "No published Record Runs are available for this invocation." });
704
723
  }
705
724
  return (0, panel_ts_1.renderPanel)({ title: (0, index_ts_1.t)("feedback.human.nextHeader"), rows, width: panel.width, mode: panel.mode });
706
725
  }
726
+ function boundedHumanError(message) {
727
+ const safe = (0, display_ts_1.stripControl)(message).replace(/\s+/gu, " ").trim();
728
+ const signalIndexes = [
729
+ safe.search(/\b[1-5]\d{2}\s+[A-Z][A-Za-z -]{2,40}(?:\s+[—·:-]\s+[A-Z][A-Z0-9_-]+)?/u),
730
+ safe.search(/\b[A-Z][A-Z0-9]+(?:_[A-Z0-9]+){1,}\b/u),
731
+ ].filter((index) => index >= 0);
732
+ // Wrappers often prepend a long command or transport path before the
733
+ // Provider's safe status/code. Focus the Human budget at that first stable
734
+ // signal; the full structured error remains available through details.
735
+ const focused = signalIndexes.length === 0 ? safe : safe.slice(Math.min(...signalIndexes));
736
+ if (utf8Bytes(focused) <= HUMAN_ERROR_TEXT_MAX_BYTES)
737
+ return focused;
738
+ const separator = " … ";
739
+ const available = HUMAN_ERROR_TEXT_MAX_BYTES - utf8Bytes(separator);
740
+ const head = Math.ceil(available / 2);
741
+ const tail = available - head;
742
+ return `${utf8Prefix(focused, head)}${separator}${utf8Suffix(focused, tail)}`;
743
+ }
744
+ function utf8Bytes(value) {
745
+ return new TextEncoder().encode(value).byteLength;
746
+ }
747
+ function utf8Prefix(value, maximumBytes) {
748
+ let bytes = 0;
749
+ let result = "";
750
+ for (const character of value) {
751
+ const nextBytes = utf8Bytes(character);
752
+ if (bytes + nextBytes > maximumBytes)
753
+ break;
754
+ result += character;
755
+ bytes += nextBytes;
756
+ }
757
+ return result;
758
+ }
759
+ function utf8Suffix(value, maximumBytes) {
760
+ let bytes = 0;
761
+ const result = [];
762
+ const characters = Array.from(value);
763
+ for (let index = characters.length - 1; index >= 0; index -= 1) {
764
+ const character = characters[index];
765
+ const nextBytes = utf8Bytes(character);
766
+ if (bytes + nextBytes > maximumBytes)
767
+ break;
768
+ result.push(character);
769
+ bytes += nextBytes;
770
+ }
771
+ return result.reverse().join("");
772
+ }
773
+ function labelledWrappedRows(label, text, contentWidth) {
774
+ const prefix = ` ${label}: `;
775
+ const continuation = " ".repeat((0, text_layout_ts_1.stringWidth)(prefix));
776
+ const lines = (0, text_layout_ts_1.wrapDisplay)(text, Math.max(4, contentWidth - (0, text_layout_ts_1.stringWidth)(prefix)));
777
+ return lines.map((line, index) => ({
778
+ kind: "line",
779
+ text: `${index === 0 ? prefix : continuation}${line}`,
780
+ }));
781
+ }
707
782
  /** estimated cost 展示:金额前加 `~`,明确是价目表估算(observed 只留在 result.usage.costUSD)。 */
708
783
  function formatEstimatedCost(value) {
709
784
  const cost = (0, format_ts_1.formatCost)(value);