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
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.projectInitCliCommand = exports.PROJECT_INIT_CLI_OPTIONS = void 0;
4
+ var contribution_ts_1 = require("./contribution.cjs");
5
+ Object.defineProperty(exports, "PROJECT_INIT_CLI_OPTIONS", { enumerable: true, get: function () { return contribution_ts_1.PROJECT_INIT_CLI_OPTIONS; } });
6
+ Object.defineProperty(exports, "projectInitCliCommand", { enumerable: true, get: function () { return contribution_ts_1.projectInitCliCommand; } });
7
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,qDAAoF;AAA3E,2HAAA,wBAAwB,OAAA;AAAE,wHAAA,qBAAqB,OAAA","sourcesContent":["export { PROJECT_INIT_CLI_OPTIONS, projectInitCliCommand } from \"./contribution.ts\";\n"]}
@@ -0,0 +1 @@
1
+ export { PROJECT_INIT_CLI_OPTIONS, projectInitCliCommand } from "./contribution.cjs";
@@ -0,0 +1 @@
1
+ export { PROJECT_INIT_CLI_OPTIONS, projectInitCliCommand } from "./contribution.mjs";
@@ -0,0 +1 @@
1
+ export { PROJECT_INIT_CLI_OPTIONS, projectInitCliCommand } from "./contribution.js";
@@ -0,0 +1,8 @@
1
+ import { createRequire as __niceevalCreateRequire } from "node:module";
2
+ const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
+ const __niceevalCanonical = __niceevalRequire("./index.cjs");
4
+ const __niceevalExport0 = __niceevalCanonical["PROJECT_INIT_CLI_OPTIONS"];
5
+ export { __niceevalExport0 as PROJECT_INIT_CLI_OPTIONS };
6
+ const __niceevalExport1 = __niceevalCanonical["projectInitCliCommand"];
7
+ export { __niceevalExport1 as projectInitCliCommand };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectProcessFacts = exports.ProjectPlatformError = exports.ProjectManifestFacts = exports.ProjectFileSystem = exports.projectHost = void 0;
4
+ var host_ts_1 = require("../host.cjs");
5
+ Object.defineProperty(exports, "projectHost", { enumerable: true, get: function () { return host_ts_1.projectHost; } });
6
+ var services_ts_1 = require("../services.cjs");
7
+ Object.defineProperty(exports, "ProjectFileSystem", { enumerable: true, get: function () { return services_ts_1.ProjectFileSystem; } });
8
+ Object.defineProperty(exports, "ProjectManifestFacts", { enumerable: true, get: function () { return services_ts_1.ProjectManifestFacts; } });
9
+ Object.defineProperty(exports, "ProjectPlatformError", { enumerable: true, get: function () { return services_ts_1.ProjectPlatformError; } });
10
+ Object.defineProperty(exports, "ProjectProcessFacts", { enumerable: true, get: function () { return services_ts_1.ProjectProcessFacts; } });
11
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,sCAAyC;AAAhC,sGAAA,WAAW,OAAA;AAEpB,8CAAqH;AAA5G,gHAAA,iBAAiB,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAAE,kHAAA,mBAAmB,OAAA","sourcesContent":["export { projectHost } from \"../host.ts\";\nexport type { ProjectHostSDK, ProjectInitializationReceipt, } from \"../host.ts\";\nexport { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, } from \"../services.ts\";\nexport type { ProjectFileSystemService, ProjectManagedPath, ProjectManifestFactsService, ProjectPathKind, ProjectProcessFactsService, } from \"../services.ts\";\n"]}
@@ -0,0 +1,4 @@
1
+ export { projectHost } from "../host.cjs";
2
+ export type { ProjectHostSDK, ProjectInitializationReceipt, } from "../host.cjs";
3
+ export { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, } from "../services.cjs";
4
+ export type { ProjectFileSystemService, ProjectManagedPath, ProjectManifestFactsService, ProjectPathKind, ProjectProcessFactsService, } from "../services.cjs";
@@ -0,0 +1,4 @@
1
+ export { projectHost } from "../host.mjs";
2
+ export type { ProjectHostSDK, ProjectInitializationReceipt, } from "../host.mjs";
3
+ export { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, } from "../services.mjs";
4
+ export type { ProjectFileSystemService, ProjectManagedPath, ProjectManifestFactsService, ProjectPathKind, ProjectProcessFactsService, } from "../services.mjs";
@@ -0,0 +1,4 @@
1
+ export { projectHost } from "../host.js";
2
+ export type { ProjectHostSDK, ProjectInitializationReceipt, } from "../host.js";
3
+ export { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, } from "../services.js";
4
+ export type { ProjectFileSystemService, ProjectManagedPath, ProjectManifestFactsService, ProjectPathKind, ProjectProcessFactsService, } from "../services.js";
@@ -0,0 +1,14 @@
1
+ import { createRequire as __niceevalCreateRequire } from "node:module";
2
+ const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
+ const __niceevalCanonical = __niceevalRequire("./index.cjs");
4
+ const __niceevalExport0 = __niceevalCanonical["ProjectFileSystem"];
5
+ export { __niceevalExport0 as ProjectFileSystem };
6
+ const __niceevalExport1 = __niceevalCanonical["ProjectManifestFacts"];
7
+ export { __niceevalExport1 as ProjectManifestFacts };
8
+ const __niceevalExport2 = __niceevalCanonical["ProjectPlatformError"];
9
+ export { __niceevalExport2 as ProjectPlatformError };
10
+ const __niceevalExport3 = __niceevalCanonical["ProjectProcessFacts"];
11
+ export { __niceevalExport3 as ProjectProcessFacts };
12
+ const __niceevalExport4 = __niceevalCanonical["projectHost"];
13
+ export { __niceevalExport4 as projectHost };
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { createRequire as __niceevalCreateRequire } from "node:module";
2
+ const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
+ const __niceevalCanonical = __niceevalRequire("./index.cjs");
4
+ const __niceevalExport0 = __niceevalCanonical["ProjectFileSystem"];
5
+ export { __niceevalExport0 as ProjectFileSystem };
6
+ const __niceevalExport1 = __niceevalCanonical["ProjectManifestFacts"];
7
+ export { __niceevalExport1 as ProjectManifestFacts };
8
+ const __niceevalExport2 = __niceevalCanonical["ProjectPlatformError"];
9
+ export { __niceevalExport2 as ProjectPlatformError };
10
+ const __niceevalExport3 = __niceevalCanonical["ProjectProcessFacts"];
11
+ export { __niceevalExport3 as ProjectProcessFacts };
12
+ const __niceevalExport4 = __niceevalCanonical["projectHost"];
13
+ export { __niceevalExport4 as projectHost };
14
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"names":[],"mappings":""}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.projectHost = void 0;
4
+ const effect_1 = require("effect");
5
+ const util_ts_1 = require("../util.cjs");
6
+ const services_ts_1 = require("./services.cjs");
7
+ const templates_ts_1 = require("./templates.cjs");
8
+ function instructionTarget(input) {
9
+ return input.agentsKind === "file"
10
+ ? "AGENTS.md"
11
+ : input.claudeKind === "file"
12
+ ? "CLAUDE.md"
13
+ : "AGENTS.md";
14
+ }
15
+ function initializeProject() {
16
+ return effect_1.Effect.gen(function* () {
17
+ const processFacts = yield* services_ts_1.ProjectProcessFacts;
18
+ const projectRoot = yield* processFacts.cwd;
19
+ const fileSystem = yield* services_ts_1.ProjectFileSystem;
20
+ const manifest = yield* services_ts_1.ProjectManifestFacts;
21
+ const evals = yield* fileSystem.ensureDirectory({ root: projectRoot, path: "evals" });
22
+ const existingConfig = yield* fileSystem.readText({
23
+ root: projectRoot,
24
+ path: "niceeval.config.ts",
25
+ });
26
+ if (existingConfig === null) {
27
+ yield* fileSystem.writeText({
28
+ root: projectRoot,
29
+ path: "niceeval.config.ts",
30
+ text: templates_ts_1.NICEEVAL_CONFIG_TEMPLATE,
31
+ });
32
+ }
33
+ const agentsKind = yield* fileSystem.pathKind({ root: projectRoot, path: "AGENTS.md" });
34
+ const claudeKind = yield* fileSystem.pathKind({ root: projectRoot, path: "CLAUDE.md" });
35
+ const target = instructionTarget({ agentsKind, claudeKind });
36
+ const existingInstructions = yield* fileSystem.readText({ root: projectRoot, path: target });
37
+ const nextInstructions = (0, util_ts_1.upsertManagedBlock)(existingInstructions ?? "", templates_ts_1.AGENT_RULE_BEGIN, templates_ts_1.AGENT_RULE_END, templates_ts_1.AGENT_RULE_CONTENT);
38
+ const instructionChange = existingInstructions === null
39
+ ? "created"
40
+ : nextInstructions === existingInstructions
41
+ ? "unchanged"
42
+ : "updated";
43
+ if (instructionChange !== "unchanged") {
44
+ yield* fileSystem.writeText({ root: projectRoot, path: target, text: nextInstructions });
45
+ }
46
+ const moduleKind = yield* manifest.moduleKind(projectRoot);
47
+ return Object.freeze({
48
+ projectRoot,
49
+ evals,
50
+ config: existingConfig === null ? "created" : "existing",
51
+ agentInstructions: Object.freeze({ path: target, change: instructionChange }),
52
+ prefersEsm: moduleKind === "esm",
53
+ });
54
+ });
55
+ }
56
+ exports.projectHost = Object.freeze({
57
+ initialize: initializeProject,
58
+ });
59
+ //# sourceMappingURL=host.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.js","sourceRoot":"","sources":["host.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,wCAAgD;AAChD,+CAAyH;AACzH,iDAAiH;AAejH,SAAS,iBAAiB,CAAC,KAG1B;IACG,OAAO,KAAK,CAAC,UAAU,KAAK,MAAM;QAC9B,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,KAAK,CAAC,UAAU,KAAK,MAAM;YACzB,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,WAAW,CAAC;AAC1B,CAAC;AACD,SAAS,iBAAiB;IACtB,OAAO,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACvB,MAAM,YAAY,GAAG,KAAK,CAAC,CAAC,iCAAmB,CAAC;QAChD,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC;QAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,+BAAiB,CAAC;QAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,kCAAoB,CAAC;QAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QACtF,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC9C,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,oBAAoB;SAC7B,CAAC,CA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CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,MAAM,CAAC,MAAM,CAAC;YACjB,WAAW;YACX,KAAK;YACL,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,SAAkB,CAAC,CAAC,CAAC,UAAmB;YAC1E,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;YAC7E,UAAU,EAAE,UAAU,KAAK,KAAK;SACnC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACY,QAAA,WAAW,GAAmB,MAAM,CAAC,MAAM,CAAC;IACrD,UAAU,EAAE,iBAAiB;CAChC,CAAC,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport { upsertManagedBlock } from \"../util.ts\";\nimport { ProjectFileSystem, ProjectManifestFacts, ProjectProcessFacts, type ProjectPlatformError, } from \"./services.ts\";\nimport { AGENT_RULE_BEGIN, AGENT_RULE_CONTENT, AGENT_RULE_END, NICEEVAL_CONFIG_TEMPLATE, } from \"./templates.ts\";\nexport interface ProjectInitializationReceipt {\n readonly projectRoot: string;\n readonly evals: \"created\" | \"existing\";\n readonly config: \"created\" | \"existing\";\n readonly agentInstructions: {\n readonly path: \"AGENTS.md\" | \"CLAUDE.md\";\n readonly change: \"created\" | \"updated\" | \"unchanged\";\n };\n readonly prefersEsm: boolean;\n}\nexport interface ProjectHostSDK {\n /** Owns all templates, target selection, and idempotent write policy. */\n readonly initialize: () => Effect.Effect<ProjectInitializationReceipt, ProjectPlatformError, ProjectFileSystem | ProjectManifestFacts | ProjectProcessFacts>;\n}\nfunction instructionTarget(input: {\n readonly agentsKind: \"missing\" | \"file\" | \"directory\" | \"other\";\n readonly claudeKind: \"missing\" | \"file\" | \"directory\" | \"other\";\n}): \"AGENTS.md\" | \"CLAUDE.md\" {\n return input.agentsKind === \"file\"\n ? \"AGENTS.md\"\n : input.claudeKind === \"file\"\n ? \"CLAUDE.md\"\n : \"AGENTS.md\";\n}\nfunction initializeProject(): Effect.Effect<ProjectInitializationReceipt, ProjectPlatformError, ProjectFileSystem | ProjectManifestFacts | ProjectProcessFacts> {\n return Effect.gen(function* () {\n const processFacts = yield* ProjectProcessFacts;\n const projectRoot = yield* processFacts.cwd;\n const fileSystem = yield* ProjectFileSystem;\n const manifest = yield* ProjectManifestFacts;\n const evals = yield* fileSystem.ensureDirectory({ root: projectRoot, path: \"evals\" });\n const existingConfig = yield* fileSystem.readText({\n root: projectRoot,\n path: \"niceeval.config.ts\",\n });\n if (existingConfig === null) {\n yield* fileSystem.writeText({\n root: projectRoot,\n path: \"niceeval.config.ts\",\n text: NICEEVAL_CONFIG_TEMPLATE,\n });\n }\n const agentsKind = yield* fileSystem.pathKind({ root: projectRoot, path: \"AGENTS.md\" });\n const claudeKind = yield* fileSystem.pathKind({ root: projectRoot, path: \"CLAUDE.md\" });\n const target = instructionTarget({ agentsKind, claudeKind });\n const existingInstructions = yield* fileSystem.readText({ root: projectRoot, path: target });\n const nextInstructions = upsertManagedBlock(existingInstructions ?? \"\", AGENT_RULE_BEGIN, AGENT_RULE_END, AGENT_RULE_CONTENT);\n const instructionChange = existingInstructions === null\n ? \"created\" as const\n : nextInstructions === existingInstructions\n ? \"unchanged\" as const\n : \"updated\" as const;\n if (instructionChange !== \"unchanged\") {\n yield* fileSystem.writeText({ root: projectRoot, path: target, text: nextInstructions });\n }\n const moduleKind = yield* manifest.moduleKind(projectRoot);\n return Object.freeze({\n projectRoot,\n evals,\n config: existingConfig === null ? \"created\" as const : \"existing\" as const,\n agentInstructions: Object.freeze({ path: target, change: instructionChange }),\n prefersEsm: moduleKind === \"esm\",\n });\n });\n}\nexport const projectHost: ProjectHostSDK = Object.freeze({\n initialize: initializeProject,\n});\n"]}
@@ -0,0 +1,17 @@
1
+ import { Effect } from "effect";
2
+ import { ProjectFileSystem, ProjectManifestFacts, ProjectProcessFacts, type ProjectPlatformError } from "./services.cjs";
3
+ export interface ProjectInitializationReceipt {
4
+ readonly projectRoot: string;
5
+ readonly evals: "created" | "existing";
6
+ readonly config: "created" | "existing";
7
+ readonly agentInstructions: {
8
+ readonly path: "AGENTS.md" | "CLAUDE.md";
9
+ readonly change: "created" | "updated" | "unchanged";
10
+ };
11
+ readonly prefersEsm: boolean;
12
+ }
13
+ export interface ProjectHostSDK {
14
+ /** Owns all templates, target selection, and idempotent write policy. */
15
+ readonly initialize: () => Effect.Effect<ProjectInitializationReceipt, ProjectPlatformError, ProjectFileSystem | ProjectManifestFacts | ProjectProcessFacts>;
16
+ }
17
+ export declare const projectHost: ProjectHostSDK;
@@ -0,0 +1,17 @@
1
+ import { Effect } from "effect";
2
+ import { ProjectFileSystem, ProjectManifestFacts, ProjectProcessFacts, type ProjectPlatformError } from "./services.mjs";
3
+ export interface ProjectInitializationReceipt {
4
+ readonly projectRoot: string;
5
+ readonly evals: "created" | "existing";
6
+ readonly config: "created" | "existing";
7
+ readonly agentInstructions: {
8
+ readonly path: "AGENTS.md" | "CLAUDE.md";
9
+ readonly change: "created" | "updated" | "unchanged";
10
+ };
11
+ readonly prefersEsm: boolean;
12
+ }
13
+ export interface ProjectHostSDK {
14
+ /** Owns all templates, target selection, and idempotent write policy. */
15
+ readonly initialize: () => Effect.Effect<ProjectInitializationReceipt, ProjectPlatformError, ProjectFileSystem | ProjectManifestFacts | ProjectProcessFacts>;
16
+ }
17
+ export declare const projectHost: ProjectHostSDK;
@@ -0,0 +1,17 @@
1
+ import { Effect } from "effect";
2
+ import { ProjectFileSystem, ProjectManifestFacts, ProjectProcessFacts, type ProjectPlatformError } from "./services.js";
3
+ export interface ProjectInitializationReceipt {
4
+ readonly projectRoot: string;
5
+ readonly evals: "created" | "existing";
6
+ readonly config: "created" | "existing";
7
+ readonly agentInstructions: {
8
+ readonly path: "AGENTS.md" | "CLAUDE.md";
9
+ readonly change: "created" | "updated" | "unchanged";
10
+ };
11
+ readonly prefersEsm: boolean;
12
+ }
13
+ export interface ProjectHostSDK {
14
+ /** Owns all templates, target selection, and idempotent write policy. */
15
+ readonly initialize: () => Effect.Effect<ProjectInitializationReceipt, ProjectPlatformError, ProjectFileSystem | ProjectManifestFacts | ProjectProcessFacts>;
16
+ }
17
+ export declare const projectHost: ProjectHostSDK;
@@ -0,0 +1,6 @@
1
+ import { createRequire as __niceevalCreateRequire } from "node:module";
2
+ const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
+ const __niceevalCanonical = __niceevalRequire("./host.cjs");
4
+ const __niceevalExport0 = __niceevalCanonical["projectHost"];
5
+ export { __niceevalExport0 as projectHost };
6
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.js","sources":[],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectProcessFacts = exports.ProjectPlatformError = exports.ProjectManifestFacts = exports.ProjectFileSystem = exports.projectHost = void 0;
4
+ var host_ts_1 = require("./host.cjs");
5
+ Object.defineProperty(exports, "projectHost", { enumerable: true, get: function () { return host_ts_1.projectHost; } });
6
+ var services_ts_1 = require("./services.cjs");
7
+ Object.defineProperty(exports, "ProjectFileSystem", { enumerable: true, get: function () { return services_ts_1.ProjectFileSystem; } });
8
+ Object.defineProperty(exports, "ProjectManifestFacts", { enumerable: true, get: function () { return services_ts_1.ProjectManifestFacts; } });
9
+ Object.defineProperty(exports, "ProjectPlatformError", { enumerable: true, get: function () { return services_ts_1.ProjectPlatformError; } });
10
+ Object.defineProperty(exports, "ProjectProcessFacts", { enumerable: true, get: function () { return services_ts_1.ProjectProcessFacts; } });
11
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,qCAAwC;AAA/B,sGAAA,WAAW,OAAA;AAEpB,6CAAoH;AAA3G,gHAAA,iBAAiB,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAAE,kHAAA,mBAAmB,OAAA","sourcesContent":["export { projectHost } from \"./host.ts\";\nexport type { ProjectHostSDK, ProjectInitializationReceipt, } from \"./host.ts\";\nexport { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, } from \"./services.ts\";\nexport type { ProjectFileSystemService, ProjectManagedPath, ProjectManifestFactsService, ProjectPathKind, ProjectProcessFactsService, } from \"./services.ts\";\n"]}
@@ -0,0 +1,4 @@
1
+ export { projectHost } from "./host.cjs";
2
+ export type { ProjectHostSDK, ProjectInitializationReceipt, } from "./host.cjs";
3
+ export { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, } from "./services.cjs";
4
+ export type { ProjectFileSystemService, ProjectManagedPath, ProjectManifestFactsService, ProjectPathKind, ProjectProcessFactsService, } from "./services.cjs";
@@ -0,0 +1,4 @@
1
+ export { projectHost } from "./host.mjs";
2
+ export type { ProjectHostSDK, ProjectInitializationReceipt, } from "./host.mjs";
3
+ export { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, } from "./services.mjs";
4
+ export type { ProjectFileSystemService, ProjectManagedPath, ProjectManifestFactsService, ProjectPathKind, ProjectProcessFactsService, } from "./services.mjs";
@@ -0,0 +1,4 @@
1
+ export { projectHost } from "./host.js";
2
+ export type { ProjectHostSDK, ProjectInitializationReceipt, } from "./host.js";
3
+ export { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, } from "./services.js";
4
+ export type { ProjectFileSystemService, ProjectManagedPath, ProjectManifestFactsService, ProjectPathKind, ProjectProcessFactsService, } from "./services.js";
@@ -0,0 +1,14 @@
1
+ import { createRequire as __niceevalCreateRequire } from "node:module";
2
+ const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
+ const __niceevalCanonical = __niceevalRequire("./index.cjs");
4
+ const __niceevalExport0 = __niceevalCanonical["ProjectFileSystem"];
5
+ export { __niceevalExport0 as ProjectFileSystem };
6
+ const __niceevalExport1 = __niceevalCanonical["ProjectManifestFacts"];
7
+ export { __niceevalExport1 as ProjectManifestFacts };
8
+ const __niceevalExport2 = __niceevalCanonical["ProjectPlatformError"];
9
+ export { __niceevalExport2 as ProjectPlatformError };
10
+ const __niceevalExport3 = __niceevalCanonical["ProjectProcessFacts"];
11
+ export { __niceevalExport3 as ProjectProcessFacts };
12
+ const __niceevalExport4 = __niceevalCanonical["projectHost"];
13
+ export { __niceevalExport4 as projectHost };
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"names":[],"mappings":""}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeProjectLive = exports.NodeProjectProcessFactsLive = exports.NodeProjectManifestFactsLive = exports.NodeProjectFileSystemLive = void 0;
4
+ const promises_1 = require("node:fs/promises");
5
+ const node_path_1 = require("node:path");
6
+ const effect_1 = require("effect");
7
+ const services_ts_1 = require("./services.cjs");
8
+ function failure(operation, resource, cause) {
9
+ return new services_ts_1.ProjectPlatformError({ operation, resource, cause });
10
+ }
11
+ function managedPath(root, path) {
12
+ return (0, node_path_1.join)(root, path);
13
+ }
14
+ function nodePathKind(path) {
15
+ return effect_1.Effect.tryPromise({
16
+ try: () => (0, promises_1.lstat)(path),
17
+ catch: (cause) => cause,
18
+ }).pipe(effect_1.Effect.map((stats) => stats.isFile() ? "file" : stats.isDirectory() ? "directory" : "other"), effect_1.Effect.catchAll((cause) => {
19
+ if (cause instanceof Error && "code" in cause && cause.code === "ENOENT") {
20
+ return effect_1.Effect.succeed("missing");
21
+ }
22
+ return effect_1.Effect.fail(failure("inspect-path", path, cause));
23
+ }));
24
+ }
25
+ const nodeProjectFileSystem = {
26
+ pathKind: ({ root, path }) => nodePathKind(managedPath(root, path)),
27
+ ensureDirectory: ({ root, path }) => effect_1.Effect.gen(function* () {
28
+ const target = managedPath(root, path);
29
+ const before = yield* nodePathKind(target);
30
+ yield* effect_1.Effect.tryPromise({
31
+ try: () => (0, promises_1.mkdir)(target, { recursive: true }),
32
+ catch: (cause) => failure("create-directory", target, cause),
33
+ });
34
+ return before === "missing" ? "created" : "existing";
35
+ }),
36
+ readText: ({ root, path }) => {
37
+ const target = managedPath(root, path);
38
+ return nodePathKind(target).pipe(effect_1.Effect.flatMap((kind) => kind === "missing"
39
+ ? effect_1.Effect.succeed(null)
40
+ : effect_1.Effect.tryPromise({
41
+ try: () => (0, promises_1.readFile)(target, "utf8"),
42
+ catch: (cause) => failure("read-file", target, cause),
43
+ })));
44
+ },
45
+ writeText: ({ root, path, text }) => {
46
+ const target = managedPath(root, path);
47
+ return effect_1.Effect.tryPromise({
48
+ try: () => (0, promises_1.writeFile)(target, text, "utf8"),
49
+ catch: (cause) => failure("write-file", target, cause),
50
+ });
51
+ },
52
+ };
53
+ exports.NodeProjectFileSystemLive = effect_1.Layer.succeed(services_ts_1.ProjectFileSystem, nodeProjectFileSystem);
54
+ exports.NodeProjectManifestFactsLive = effect_1.Layer.succeed(services_ts_1.ProjectManifestFacts, {
55
+ moduleKind: (projectRoot) => effect_1.Effect.gen(function* () {
56
+ let directory = (0, node_path_1.resolve)(projectRoot);
57
+ while (true) {
58
+ const manifestPath = (0, node_path_1.join)(directory, "package.json");
59
+ const kind = yield* nodePathKind(manifestPath);
60
+ if (kind === "file") {
61
+ const source = yield* effect_1.Effect.tryPromise({
62
+ try: () => (0, promises_1.readFile)(manifestPath, "utf8"),
63
+ catch: (cause) => failure("inspect-package-manifest", manifestPath, cause),
64
+ });
65
+ let decoded;
66
+ try {
67
+ decoded = JSON.parse(source);
68
+ }
69
+ catch {
70
+ return "commonjs-or-unspecified";
71
+ }
72
+ return typeof decoded === "object" && decoded !== null &&
73
+ "type" in decoded && decoded.type === "module"
74
+ ? "esm"
75
+ : "commonjs-or-unspecified";
76
+ }
77
+ const parent = (0, node_path_1.dirname)(directory);
78
+ if (parent === directory)
79
+ return "commonjs-or-unspecified";
80
+ directory = parent;
81
+ }
82
+ }),
83
+ });
84
+ exports.NodeProjectProcessFactsLive = effect_1.Layer.succeed(services_ts_1.ProjectProcessFacts, {
85
+ cwd: effect_1.Effect.try({
86
+ try: () => process.cwd(),
87
+ catch: (cause) => failure("read-process-cwd", "cwd", cause),
88
+ }),
89
+ });
90
+ exports.NodeProjectLive = effect_1.Layer.mergeAll(exports.NodeProjectFileSystemLive, exports.NodeProjectManifestFactsLive, exports.NodeProjectProcessFactsLive);
91
+ //# sourceMappingURL=node.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["node.ts"],"names":[],"mappings":";;;AAAA,+CAAqE;AACrE,yCAAmD;AACnD,mCAAuC;AACvC,+CAAkM;AAClM,SAAS,OAAO,CAAC,SAA4C,EAAE,QAAgB,EAAE,KAAc;IAC3F,OAAO,IAAI,kCAAoB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AACpE,CAAC;AACD,SAAS,WAAW,CAAC,IAAY,EAAE,IAAwB;IACvD,OAAO,IAAA,gBAAI,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC;AACD,SAAS,YAAY,CAAC,IAAY;IAC9B,OAAO,eAAM,CAAC,UAAU,CAAC;QACrB,GAAG,EAAE,GAAG,EAAE,CAAC,IAAA,gBAAK,EAAC,IAAI,CAAC;QACtB,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;KAC1B,CAAC,CAAC,IAAI,CAAC,eAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,eAAM,CAAC,QAAQ,CAAC,CAAC,KAA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,KAAK,CAAC;KAC9D,CAAC;CACL,CAAC,CAAC;AACU,QAAA,eAAe,GAAG,cAAK,CAAC,QAAQ,CAAC,iCAAyB,EAAE,oCAA4B,EAAE,mCAA2B,CAAC,CAAC","sourcesContent":["import { lstat, mkdir, readFile, writeFile } from \"node:fs/promises\";\nimport { dirname, join, resolve } from \"node:path\";\nimport { Effect, Layer } from \"effect\";\nimport { ProjectFileSystem, ProjectManifestFacts, ProjectPlatformError, ProjectProcessFacts, type ProjectFileSystemService, type ProjectManagedPath, type ProjectPathKind, } from \"./services.ts\";\nfunction failure(operation: ProjectPlatformError[\"operation\"], resource: string, cause: unknown): ProjectPlatformError {\n return new ProjectPlatformError({ operation, resource, cause });\n}\nfunction managedPath(root: string, path: ProjectManagedPath): string {\n return join(root, path);\n}\nfunction nodePathKind(path: string): Effect.Effect<ProjectPathKind, ProjectPlatformError> {\n return Effect.tryPromise({\n try: () => lstat(path),\n catch: (cause) => cause,\n }).pipe(Effect.map((stats) => stats.isFile() ? \"file\" : stats.isDirectory() ? \"directory\" : \"other\"), Effect.catchAll((cause) => {\n if (cause instanceof Error && \"code\" in cause && cause.code === \"ENOENT\") {\n return Effect.succeed(\"missing\" as const);\n }\n return Effect.fail(failure(\"inspect-path\", path, cause));\n }));\n}\nconst nodeProjectFileSystem: ProjectFileSystemService = {\n pathKind: ({ root, path }) => nodePathKind(managedPath(root, path)),\n ensureDirectory: ({ root, path }) => Effect.gen(function* () {\n const target = managedPath(root, path);\n const before = yield* nodePathKind(target);\n yield* Effect.tryPromise({\n try: () => mkdir(target, { recursive: true }),\n catch: (cause) => failure(\"create-directory\", target, cause),\n });\n return before === \"missing\" ? \"created\" as const : \"existing\" as const;\n }),\n readText: ({ root, path }) => {\n const target = managedPath(root, path);\n return nodePathKind(target).pipe(Effect.flatMap((kind) => kind === \"missing\"\n ? Effect.succeed(null)\n : Effect.tryPromise({\n try: () => readFile(target, \"utf8\"),\n catch: (cause) => failure(\"read-file\", target, cause),\n })));\n },\n writeText: ({ root, path, text }) => {\n const target = managedPath(root, path);\n return Effect.tryPromise({\n try: () => writeFile(target, text, \"utf8\"),\n catch: (cause) => failure(\"write-file\", target, cause),\n });\n },\n};\nexport const NodeProjectFileSystemLive = Layer.succeed(ProjectFileSystem, nodeProjectFileSystem);\nexport const NodeProjectManifestFactsLive = Layer.succeed(ProjectManifestFacts, {\n moduleKind: (projectRoot) => Effect.gen(function* () {\n let directory = resolve(projectRoot);\n while (true) {\n const manifestPath = join(directory, \"package.json\");\n const kind = yield* nodePathKind(manifestPath);\n if (kind === \"file\") {\n const source = yield* Effect.tryPromise({\n try: () => readFile(manifestPath, \"utf8\"),\n catch: (cause) => failure(\"inspect-package-manifest\", manifestPath, cause),\n });\n let decoded: unknown;\n try {\n decoded = JSON.parse(source) as unknown;\n }\n catch {\n return \"commonjs-or-unspecified\" as const;\n }\n return typeof decoded === \"object\" && decoded !== null &&\n \"type\" in decoded && decoded.type === \"module\"\n ? \"esm\" as const\n : \"commonjs-or-unspecified\" as const;\n }\n const parent = dirname(directory);\n if (parent === directory)\n return \"commonjs-or-unspecified\" as const;\n directory = parent;\n }\n }),\n});\nexport const NodeProjectProcessFactsLive = Layer.succeed(ProjectProcessFacts, {\n cwd: Effect.try({\n try: () => process.cwd(),\n catch: (cause) => failure(\"read-process-cwd\", \"cwd\", cause),\n }),\n});\nexport const NodeProjectLive = Layer.mergeAll(NodeProjectFileSystemLive, NodeProjectManifestFactsLive, NodeProjectProcessFactsLive);\n"]}
@@ -0,0 +1,6 @@
1
+ import { Layer } from "effect";
2
+ import { ProjectFileSystem, ProjectManifestFacts, ProjectProcessFacts } from "./services.cjs";
3
+ export declare const NodeProjectFileSystemLive: Layer.Layer<ProjectFileSystem, never, never>;
4
+ export declare const NodeProjectManifestFactsLive: Layer.Layer<ProjectManifestFacts, never, never>;
5
+ export declare const NodeProjectProcessFactsLive: Layer.Layer<ProjectProcessFacts, never, never>;
6
+ export declare const NodeProjectLive: Layer.Layer<ProjectFileSystem | ProjectManifestFacts | ProjectProcessFacts, never, never>;
@@ -0,0 +1,6 @@
1
+ import { Layer } from "effect";
2
+ import { ProjectFileSystem, ProjectManifestFacts, ProjectProcessFacts } from "./services.mjs";
3
+ export declare const NodeProjectFileSystemLive: Layer.Layer<ProjectFileSystem, never, never>;
4
+ export declare const NodeProjectManifestFactsLive: Layer.Layer<ProjectManifestFacts, never, never>;
5
+ export declare const NodeProjectProcessFactsLive: Layer.Layer<ProjectProcessFacts, never, never>;
6
+ export declare const NodeProjectLive: Layer.Layer<ProjectFileSystem | ProjectManifestFacts | ProjectProcessFacts, never, never>;
@@ -0,0 +1,6 @@
1
+ import { Layer } from "effect";
2
+ import { ProjectFileSystem, ProjectManifestFacts, ProjectProcessFacts } from "./services.js";
3
+ export declare const NodeProjectFileSystemLive: Layer.Layer<ProjectFileSystem, never, never>;
4
+ export declare const NodeProjectManifestFactsLive: Layer.Layer<ProjectManifestFacts, never, never>;
5
+ export declare const NodeProjectProcessFactsLive: Layer.Layer<ProjectProcessFacts, never, never>;
6
+ export declare const NodeProjectLive: Layer.Layer<ProjectFileSystem | ProjectManifestFacts | ProjectProcessFacts, never, never>;
@@ -0,0 +1,12 @@
1
+ import { createRequire as __niceevalCreateRequire } from "node:module";
2
+ const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
3
+ const __niceevalCanonical = __niceevalRequire("./node.cjs");
4
+ const __niceevalExport0 = __niceevalCanonical["NodeProjectFileSystemLive"];
5
+ export { __niceevalExport0 as NodeProjectFileSystemLive };
6
+ const __niceevalExport1 = __niceevalCanonical["NodeProjectLive"];
7
+ export { __niceevalExport1 as NodeProjectLive };
8
+ const __niceevalExport2 = __niceevalCanonical["NodeProjectManifestFactsLive"];
9
+ export { __niceevalExport2 as NodeProjectManifestFactsLive };
10
+ const __niceevalExport3 = __niceevalCanonical["NodeProjectProcessFactsLive"];
11
+ export { __niceevalExport3 as NodeProjectProcessFactsLive };
12
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sources":[],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectProcessFacts = exports.ProjectManifestFacts = exports.ProjectFileSystem = exports.ProjectPlatformError = void 0;
4
+ const effect_1 = require("effect");
5
+ class ProjectPlatformError extends effect_1.Data.TaggedError("ProjectPlatformError") {
6
+ }
7
+ exports.ProjectPlatformError = ProjectPlatformError;
8
+ class ProjectFileSystem extends effect_1.Context.Tag("niceeval/project/ProjectFileSystem")() {
9
+ }
10
+ exports.ProjectFileSystem = ProjectFileSystem;
11
+ class ProjectManifestFacts extends effect_1.Context.Tag("niceeval/project/ProjectManifestFacts")() {
12
+ }
13
+ exports.ProjectManifestFacts = ProjectManifestFacts;
14
+ class ProjectProcessFacts extends effect_1.Context.Tag("niceeval/project/ProjectProcessFacts")() {
15
+ }
16
+ exports.ProjectProcessFacts = ProjectProcessFacts;
17
+ //# sourceMappingURL=services.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["services.ts"],"names":[],"mappings":";;;AAAA,mCAAoD;AAGpD,MAAa,oBAAqB,SAAQ,aAAI,CAAC,WAAW,CAAC,sBAAsB,CAI/E;CACD;AALD,oDAKC;AAoBD,MAAa,iBAAkB,SAAQ,gBAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,EAA+C;CACtI;AADD,8CACC;AAID,MAAa,oBAAqB,SAAQ,gBAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,EAAqD;CAClJ;AADD,oDACC;AAID,MAAa,mBAAoB,SAAQ,gBAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,EAAmD;CAC9I;AADD,kDACC","sourcesContent":["import { Context, Data, type Effect } from \"effect\";\nexport type ProjectManagedPath = \"evals\" | \"niceeval.config.ts\" | \"AGENTS.md\" | \"CLAUDE.md\";\nexport type ProjectPathKind = \"missing\" | \"file\" | \"directory\" | \"other\";\nexport class ProjectPlatformError extends Data.TaggedError(\"ProjectPlatformError\")<{\n readonly operation: \"read-process-cwd\" | \"inspect-path\" | \"create-directory\" | \"read-file\" | \"write-file\" | \"inspect-package-manifest\";\n readonly resource: string;\n readonly cause: unknown;\n}> {\n}\nexport interface ProjectFileSystemService {\n readonly pathKind: (input: {\n readonly root: string;\n readonly path: ProjectManagedPath;\n }) => Effect.Effect<ProjectPathKind, ProjectPlatformError>;\n readonly ensureDirectory: (input: {\n readonly root: string;\n readonly path: \"evals\";\n }) => Effect.Effect<\"created\" | \"existing\", ProjectPlatformError>;\n readonly readText: (input: {\n readonly root: string;\n readonly path: Exclude<ProjectManagedPath, \"evals\">;\n }) => Effect.Effect<string | null, ProjectPlatformError>;\n readonly writeText: (input: {\n readonly root: string;\n readonly path: Exclude<ProjectManagedPath, \"evals\">;\n readonly text: string;\n }) => Effect.Effect<void, ProjectPlatformError>;\n}\nexport class ProjectFileSystem extends Context.Tag(\"niceeval/project/ProjectFileSystem\")<ProjectFileSystem, ProjectFileSystemService>() {\n}\nexport interface ProjectManifestFactsService {\n readonly moduleKind: (projectRoot: string) => Effect.Effect<\"esm\" | \"commonjs-or-unspecified\", ProjectPlatformError>;\n}\nexport class ProjectManifestFacts extends Context.Tag(\"niceeval/project/ProjectManifestFacts\")<ProjectManifestFacts, ProjectManifestFactsService>() {\n}\nexport interface ProjectProcessFactsService {\n readonly cwd: Effect.Effect<string, ProjectPlatformError>;\n}\nexport class ProjectProcessFacts extends Context.Tag(\"niceeval/project/ProjectProcessFacts\")<ProjectProcessFacts, ProjectProcessFactsService>() {\n}\n"]}
@@ -0,0 +1,47 @@
1
+ import { Context, type Effect } from "effect";
2
+ export type ProjectManagedPath = "evals" | "niceeval.config.ts" | "AGENTS.md" | "CLAUDE.md";
3
+ export type ProjectPathKind = "missing" | "file" | "directory" | "other";
4
+ declare const ProjectPlatformError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
5
+ readonly _tag: "ProjectPlatformError";
6
+ } & Readonly<A>;
7
+ export declare class ProjectPlatformError extends ProjectPlatformError_base<{
8
+ readonly operation: "read-process-cwd" | "inspect-path" | "create-directory" | "read-file" | "write-file" | "inspect-package-manifest";
9
+ readonly resource: string;
10
+ readonly cause: unknown;
11
+ }> {
12
+ }
13
+ export interface ProjectFileSystemService {
14
+ readonly pathKind: (input: {
15
+ readonly root: string;
16
+ readonly path: ProjectManagedPath;
17
+ }) => Effect.Effect<ProjectPathKind, ProjectPlatformError>;
18
+ readonly ensureDirectory: (input: {
19
+ readonly root: string;
20
+ readonly path: "evals";
21
+ }) => Effect.Effect<"created" | "existing", ProjectPlatformError>;
22
+ readonly readText: (input: {
23
+ readonly root: string;
24
+ readonly path: Exclude<ProjectManagedPath, "evals">;
25
+ }) => Effect.Effect<string | null, ProjectPlatformError>;
26
+ readonly writeText: (input: {
27
+ readonly root: string;
28
+ readonly path: Exclude<ProjectManagedPath, "evals">;
29
+ readonly text: string;
30
+ }) => Effect.Effect<void, ProjectPlatformError>;
31
+ }
32
+ declare const ProjectFileSystem_base: Context.TagClass<ProjectFileSystem, "niceeval/project/ProjectFileSystem", ProjectFileSystemService>;
33
+ export declare class ProjectFileSystem extends ProjectFileSystem_base {
34
+ }
35
+ export interface ProjectManifestFactsService {
36
+ readonly moduleKind: (projectRoot: string) => Effect.Effect<"esm" | "commonjs-or-unspecified", ProjectPlatformError>;
37
+ }
38
+ declare const ProjectManifestFacts_base: Context.TagClass<ProjectManifestFacts, "niceeval/project/ProjectManifestFacts", ProjectManifestFactsService>;
39
+ export declare class ProjectManifestFacts extends ProjectManifestFacts_base {
40
+ }
41
+ export interface ProjectProcessFactsService {
42
+ readonly cwd: Effect.Effect<string, ProjectPlatformError>;
43
+ }
44
+ declare const ProjectProcessFacts_base: Context.TagClass<ProjectProcessFacts, "niceeval/project/ProjectProcessFacts", ProjectProcessFactsService>;
45
+ export declare class ProjectProcessFacts extends ProjectProcessFacts_base {
46
+ }
47
+ export {};
@@ -0,0 +1,47 @@
1
+ import { Context, type Effect } from "effect";
2
+ export type ProjectManagedPath = "evals" | "niceeval.config.ts" | "AGENTS.md" | "CLAUDE.md";
3
+ export type ProjectPathKind = "missing" | "file" | "directory" | "other";
4
+ declare const ProjectPlatformError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
5
+ readonly _tag: "ProjectPlatformError";
6
+ } & Readonly<A>;
7
+ export declare class ProjectPlatformError extends ProjectPlatformError_base<{
8
+ readonly operation: "read-process-cwd" | "inspect-path" | "create-directory" | "read-file" | "write-file" | "inspect-package-manifest";
9
+ readonly resource: string;
10
+ readonly cause: unknown;
11
+ }> {
12
+ }
13
+ export interface ProjectFileSystemService {
14
+ readonly pathKind: (input: {
15
+ readonly root: string;
16
+ readonly path: ProjectManagedPath;
17
+ }) => Effect.Effect<ProjectPathKind, ProjectPlatformError>;
18
+ readonly ensureDirectory: (input: {
19
+ readonly root: string;
20
+ readonly path: "evals";
21
+ }) => Effect.Effect<"created" | "existing", ProjectPlatformError>;
22
+ readonly readText: (input: {
23
+ readonly root: string;
24
+ readonly path: Exclude<ProjectManagedPath, "evals">;
25
+ }) => Effect.Effect<string | null, ProjectPlatformError>;
26
+ readonly writeText: (input: {
27
+ readonly root: string;
28
+ readonly path: Exclude<ProjectManagedPath, "evals">;
29
+ readonly text: string;
30
+ }) => Effect.Effect<void, ProjectPlatformError>;
31
+ }
32
+ declare const ProjectFileSystem_base: Context.TagClass<ProjectFileSystem, "niceeval/project/ProjectFileSystem", ProjectFileSystemService>;
33
+ export declare class ProjectFileSystem extends ProjectFileSystem_base {
34
+ }
35
+ export interface ProjectManifestFactsService {
36
+ readonly moduleKind: (projectRoot: string) => Effect.Effect<"esm" | "commonjs-or-unspecified", ProjectPlatformError>;
37
+ }
38
+ declare const ProjectManifestFacts_base: Context.TagClass<ProjectManifestFacts, "niceeval/project/ProjectManifestFacts", ProjectManifestFactsService>;
39
+ export declare class ProjectManifestFacts extends ProjectManifestFacts_base {
40
+ }
41
+ export interface ProjectProcessFactsService {
42
+ readonly cwd: Effect.Effect<string, ProjectPlatformError>;
43
+ }
44
+ declare const ProjectProcessFacts_base: Context.TagClass<ProjectProcessFacts, "niceeval/project/ProjectProcessFacts", ProjectProcessFactsService>;
45
+ export declare class ProjectProcessFacts extends ProjectProcessFacts_base {
46
+ }
47
+ export {};