@bjoernrochel/sevro 1.0.0 → 1.1.0

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 (403) hide show
  1. package/CONTRIBUTING.md +34 -4
  2. package/README.md +7 -6
  3. package/dist/examples/basic/graded.json +13 -0
  4. package/dist/examples/basic/host.js +9 -0
  5. package/dist/examples/basic/host.js.map +1 -0
  6. package/dist/examples/basic/prompt-only.json +7 -0
  7. package/dist/examples/recipes/candidate.js +23 -0
  8. package/dist/examples/recipes/candidate.js.map +1 -0
  9. package/dist/examples/recipes/cases/coding-change.json +21 -0
  10. package/dist/examples/recipes/cases/host-tools.json +21 -0
  11. package/dist/examples/recipes/cases/mise.json +21 -0
  12. package/dist/examples/recipes/cases/node.json +21 -0
  13. package/dist/examples/recipes/cases/python-uv.json +21 -0
  14. package/dist/examples/recipes/cases/semantic.json +17 -0
  15. package/dist/examples/recipes/coding-change/check.js +16 -0
  16. package/dist/examples/recipes/coding-change/check.js.map +1 -0
  17. package/dist/examples/recipes/executable.js +20 -0
  18. package/dist/examples/recipes/executable.js.map +1 -0
  19. package/dist/examples/recipes/extension-artifacts.js +56 -0
  20. package/dist/examples/recipes/extension-artifacts.js.map +1 -0
  21. package/dist/examples/recipes/extension-methods.js +167 -0
  22. package/dist/examples/recipes/extension-methods.js.map +1 -0
  23. package/dist/examples/recipes/extension.js +28 -0
  24. package/dist/examples/recipes/extension.js.map +1 -0
  25. package/dist/examples/recipes/modules.js +9 -0
  26. package/dist/examples/recipes/modules.js.map +1 -0
  27. package/dist/examples/recipes/repository-skill/.agents/skills/startup-guide/SKILL.md +7 -0
  28. package/dist/examples/recipes/repository-skill/.claude/skills/startup-guide/SKILL.md +7 -0
  29. package/dist/examples/recipes/repository-skill/README.md +3 -0
  30. package/dist/examples/recipes/run-inputs.js +144 -0
  31. package/dist/examples/recipes/run-inputs.js.map +1 -0
  32. package/dist/examples/recipes/run-options.js +103 -0
  33. package/dist/examples/recipes/run-options.js.map +1 -0
  34. package/dist/examples/recipes/run.js +62 -0
  35. package/dist/examples/recipes/run.js.map +1 -0
  36. package/dist/examples/recipes/runtime/empty.json +1 -0
  37. package/dist/examples/recipes/runtime/goals.json +1 -0
  38. package/dist/examples/recipes/runtime/mise.json +6 -0
  39. package/dist/examples/recipes/runtime/path.json +1 -0
  40. package/dist/examples/recipes/runtime/plugins.json +4 -0
  41. package/dist/examples/recipes/runtime/python-uv.json +10 -0
  42. package/dist/examples/recipes/semantic-judge.js +27 -0
  43. package/dist/examples/recipes/semantic-judge.js.map +1 -0
  44. package/dist/examples/templates/coding/adapter.js +14 -0
  45. package/dist/examples/templates/coding/adapter.js.map +1 -0
  46. package/dist/examples/templates/coding/case.json +15 -0
  47. package/dist/examples/templates/repository-skill/.agents/skills/startup-guide/SKILL.md +6 -0
  48. package/dist/examples/templates/repository-skill/extension-data.js +61 -0
  49. package/dist/examples/templates/repository-skill/extension-data.js.map +1 -0
  50. package/dist/examples/templates/repository-skill/extension.js +29 -0
  51. package/dist/examples/templates/repository-skill/extension.js.map +1 -0
  52. package/dist/examples/templates/response/adapter.js +13 -0
  53. package/dist/examples/templates/response/adapter.js.map +1 -0
  54. package/dist/examples/templates/response/case.json +13 -0
  55. package/dist/src/advisory.js +86 -0
  56. package/dist/src/advisory.js.map +1 -0
  57. package/dist/src/candidate-artifacts.js +139 -0
  58. package/dist/src/candidate-artifacts.js.map +1 -0
  59. package/dist/src/candidate-codex-state.js +110 -0
  60. package/dist/src/candidate-codex-state.js.map +1 -0
  61. package/dist/src/case-validation.js +92 -0
  62. package/dist/src/case-validation.js.map +1 -0
  63. package/dist/src/cli/cancellation.js +21 -0
  64. package/dist/src/cli/cancellation.js.map +1 -0
  65. package/dist/src/cli/command.js +60 -0
  66. package/dist/src/cli/command.js.map +1 -0
  67. package/dist/src/cli/completion.js +14 -0
  68. package/dist/src/cli/completion.js.map +1 -0
  69. package/dist/src/cli/demo.js +45 -0
  70. package/dist/src/cli/demo.js.map +1 -0
  71. package/dist/src/cli/evaluation.js +40 -0
  72. package/dist/src/cli/evaluation.js.map +1 -0
  73. package/dist/src/cli/extension.js +54 -0
  74. package/dist/src/cli/extension.js.map +1 -0
  75. package/dist/src/cli/help.js +190 -0
  76. package/dist/src/cli/help.js.map +1 -0
  77. package/dist/src/cli/hosts.js +33 -0
  78. package/dist/src/cli/hosts.js.map +1 -0
  79. package/dist/src/cli/init-settings.js +29 -0
  80. package/dist/src/cli/init-settings.js.map +1 -0
  81. package/dist/src/cli/init.js +82 -0
  82. package/dist/src/cli/init.js.map +1 -0
  83. package/dist/src/cli/invocation.js +431 -0
  84. package/dist/src/cli/invocation.js.map +1 -0
  85. package/dist/src/cli/loading.js +110 -0
  86. package/dist/src/cli/loading.js.map +1 -0
  87. package/dist/src/cli/preparation.js +88 -0
  88. package/dist/src/cli/preparation.js.map +1 -0
  89. package/dist/src/cli/presentation.js +61 -0
  90. package/dist/src/cli/presentation.js.map +1 -0
  91. package/dist/src/cli/progress.js +5 -0
  92. package/dist/src/cli/progress.js.map +1 -0
  93. package/dist/src/cli/run-manifest.js +108 -0
  94. package/dist/src/cli/run-manifest.js.map +1 -0
  95. package/dist/src/cli/run-options.js +367 -0
  96. package/dist/src/cli/run-options.js.map +1 -0
  97. package/dist/src/cli/run-overrides.js +51 -0
  98. package/dist/src/cli/run-overrides.js.map +1 -0
  99. package/dist/src/cli/settings.js +127 -0
  100. package/dist/src/cli/settings.js.map +1 -0
  101. package/dist/src/cli/summary.js +28 -0
  102. package/dist/src/cli/summary.js.map +1 -0
  103. package/dist/src/cli.js +20 -0
  104. package/dist/src/cli.js.map +1 -0
  105. package/dist/src/contract-types.js +2 -0
  106. package/dist/src/contract-types.js.map +1 -0
  107. package/dist/src/engine.js +4 -0
  108. package/dist/src/engine.js.map +1 -0
  109. package/dist/src/evaluation/advisory.js +85 -0
  110. package/dist/src/evaluation/advisory.js.map +1 -0
  111. package/dist/src/evaluation/check-plan.js +292 -0
  112. package/dist/src/evaluation/check-plan.js.map +1 -0
  113. package/dist/src/evaluation/collection.js +61 -0
  114. package/dist/src/evaluation/collection.js.map +1 -0
  115. package/dist/src/evaluation/context.js +2 -0
  116. package/dist/src/evaluation/context.js.map +1 -0
  117. package/dist/src/evaluation/grading-host.js +28 -0
  118. package/dist/src/evaluation/grading-host.js.map +1 -0
  119. package/dist/src/evaluation/grading.js +154 -0
  120. package/dist/src/evaluation/grading.js.map +1 -0
  121. package/dist/src/evaluation/invocation-plan.js +312 -0
  122. package/dist/src/evaluation/invocation-plan.js.map +1 -0
  123. package/dist/src/evaluation/plan.js +376 -0
  124. package/dist/src/evaluation/plan.js.map +1 -0
  125. package/dist/src/evaluation/progress.js +14 -0
  126. package/dist/src/evaluation/progress.js.map +1 -0
  127. package/dist/src/evaluation/resources.js +159 -0
  128. package/dist/src/evaluation/resources.js.map +1 -0
  129. package/dist/src/evaluation/run.js +148 -0
  130. package/dist/src/evaluation/run.js.map +1 -0
  131. package/dist/src/evaluation/scheduler.js +27 -0
  132. package/dist/src/evaluation/scheduler.js.map +1 -0
  133. package/dist/src/evaluation/semantic.js +183 -0
  134. package/dist/src/evaluation/semantic.js.map +1 -0
  135. package/dist/src/evaluation/trial.js +593 -0
  136. package/dist/src/evaluation/trial.js.map +1 -0
  137. package/dist/src/evaluation/types.js +20 -0
  138. package/dist/src/evaluation/types.js.map +1 -0
  139. package/dist/src/evidence/host-results.js +67 -0
  140. package/dist/src/evidence/host-results.js.map +1 -0
  141. package/dist/src/evidence/retained-artifacts.js +17 -0
  142. package/dist/src/evidence/retained-artifacts.js.map +1 -0
  143. package/dist/src/evidence/trial-writer.js +131 -0
  144. package/dist/src/evidence/trial-writer.js.map +1 -0
  145. package/dist/src/evidence/usage.js +14 -0
  146. package/dist/src/evidence/usage.js.map +1 -0
  147. package/dist/src/executable.js +20 -0
  148. package/dist/src/executable.js.map +1 -0
  149. package/dist/src/extension-client.js +212 -0
  150. package/dist/src/extension-client.js.map +1 -0
  151. package/dist/src/extension-session.js +236 -0
  152. package/dist/src/extension-session.js.map +1 -0
  153. package/dist/src/fixtures/advisory.js +206 -0
  154. package/dist/src/fixtures/advisory.js.map +1 -0
  155. package/dist/src/fixtures/bin.js +41 -0
  156. package/dist/src/fixtures/bin.js.map +1 -0
  157. package/dist/src/fixtures/cleanup.js +43 -0
  158. package/dist/src/fixtures/cleanup.js.map +1 -0
  159. package/dist/src/fixtures/create.js +94 -0
  160. package/dist/src/fixtures/create.js.map +1 -0
  161. package/dist/src/fixtures/generated.js +181 -0
  162. package/dist/src/fixtures/generated.js.map +1 -0
  163. package/dist/src/fixtures/git-hooks.js +16 -0
  164. package/dist/src/fixtures/git-hooks.js.map +1 -0
  165. package/dist/src/fixtures/preparation.js +201 -0
  166. package/dist/src/fixtures/preparation.js.map +1 -0
  167. package/dist/src/fixtures/repository.js +255 -0
  168. package/dist/src/fixtures/repository.js.map +1 -0
  169. package/dist/src/fixtures/setup.js +175 -0
  170. package/dist/src/fixtures/setup.js.map +1 -0
  171. package/dist/src/fixtures/tools.js +57 -0
  172. package/dist/src/fixtures/tools.js.map +1 -0
  173. package/dist/src/fixtures/workspace-state.js +155 -0
  174. package/dist/src/fixtures/workspace-state.js.map +1 -0
  175. package/dist/src/generated/cli-result.cjs +2 -0
  176. package/dist/src/generated/extension.cjs +2 -0
  177. package/dist/src/generated/report.cjs +2 -0
  178. package/dist/src/generated/run-evidence.cjs +2 -0
  179. package/dist/src/generated/runtime.cjs +2 -0
  180. package/dist/src/git.js +72 -0
  181. package/dist/src/git.js.map +1 -0
  182. package/dist/src/graders/artifact.js +68 -0
  183. package/dist/src/graders/artifact.js.map +1 -0
  184. package/dist/src/graders/git-head.js +112 -0
  185. package/dist/src/graders/git-head.js.map +1 -0
  186. package/dist/src/graders/output.js +345 -0
  187. package/dist/src/graders/output.js.map +1 -0
  188. package/dist/src/graders/semantic.js +132 -0
  189. package/dist/src/graders/semantic.js.map +1 -0
  190. package/dist/src/graders/shell.js +321 -0
  191. package/dist/src/graders/shell.js.map +1 -0
  192. package/dist/src/host-diagnostic-redaction.js +52 -0
  193. package/dist/src/host-diagnostic-redaction.js.map +1 -0
  194. package/dist/src/host-diagnostics.js +248 -0
  195. package/dist/src/host-diagnostics.js.map +1 -0
  196. package/dist/src/hosts/claude-continuation.js +89 -0
  197. package/dist/src/hosts/claude-continuation.js.map +1 -0
  198. package/dist/src/hosts/claude-credential.js +121 -0
  199. package/dist/src/hosts/claude-credential.js.map +1 -0
  200. package/dist/src/hosts/claude-events.js +136 -0
  201. package/dist/src/hosts/claude-events.js.map +1 -0
  202. package/dist/src/hosts/claude-keychain.js +100 -0
  203. package/dist/src/hosts/claude-keychain.js.map +1 -0
  204. package/dist/src/hosts/claude-login-recovery.js +67 -0
  205. package/dist/src/hosts/claude-login-recovery.js.map +1 -0
  206. package/dist/src/hosts/claude-login-refresh.js +146 -0
  207. package/dist/src/hosts/claude-login-refresh.js.map +1 -0
  208. package/dist/src/hosts/claude-login-store.js +124 -0
  209. package/dist/src/hosts/claude-login-store.js.map +1 -0
  210. package/dist/src/hosts/claude-login.js +74 -0
  211. package/dist/src/hosts/claude-login.js.map +1 -0
  212. package/dist/src/hosts/claude-native-goal.js +138 -0
  213. package/dist/src/hosts/claude-native-goal.js.map +1 -0
  214. package/dist/src/hosts/claude-process.js +10 -0
  215. package/dist/src/hosts/claude-process.js.map +1 -0
  216. package/dist/src/hosts/claude-refresh-lock.js +76 -0
  217. package/dist/src/hosts/claude-refresh-lock.js.map +1 -0
  218. package/dist/src/hosts/claude-repository-invocation.js +229 -0
  219. package/dist/src/hosts/claude-repository-invocation.js.map +1 -0
  220. package/dist/src/hosts/claude-settings.js +156 -0
  221. package/dist/src/hosts/claude-settings.js.map +1 -0
  222. package/dist/src/hosts/claude-skill-activations.js +131 -0
  223. package/dist/src/hosts/claude-skill-activations.js.map +1 -0
  224. package/dist/src/hosts/claude-state.js +237 -0
  225. package/dist/src/hosts/claude-state.js.map +1 -0
  226. package/dist/src/hosts/claude-tool-calls.js +150 -0
  227. package/dist/src/hosts/claude-tool-calls.js.map +1 -0
  228. package/dist/src/hosts/claude.js +373 -0
  229. package/dist/src/hosts/claude.js.map +1 -0
  230. package/dist/src/hosts/codex-app-server.js +764 -0
  231. package/dist/src/hosts/codex-app-server.js.map +1 -0
  232. package/dist/src/hosts/codex-configuration.js +91 -0
  233. package/dist/src/hosts/codex-configuration.js.map +1 -0
  234. package/dist/src/hosts/codex-events.js +104 -0
  235. package/dist/src/hosts/codex-events.js.map +1 -0
  236. package/dist/src/hosts/codex-exec-controls.js +434 -0
  237. package/dist/src/hosts/codex-exec-controls.js.map +1 -0
  238. package/dist/src/hosts/codex-invocation.js +54 -0
  239. package/dist/src/hosts/codex-invocation.js.map +1 -0
  240. package/dist/src/hosts/codex-marketplace.js +185 -0
  241. package/dist/src/hosts/codex-marketplace.js.map +1 -0
  242. package/dist/src/hosts/codex-native-calls.js +516 -0
  243. package/dist/src/hosts/codex-native-calls.js.map +1 -0
  244. package/dist/src/hosts/codex-process.js +10 -0
  245. package/dist/src/hosts/codex-process.js.map +1 -0
  246. package/dist/src/hosts/codex-profile.js +206 -0
  247. package/dist/src/hosts/codex-profile.js.map +1 -0
  248. package/dist/src/hosts/codex-session-files.js +89 -0
  249. package/dist/src/hosts/codex-session-files.js.map +1 -0
  250. package/dist/src/hosts/codex-state.js +310 -0
  251. package/dist/src/hosts/codex-state.js.map +1 -0
  252. package/dist/src/hosts/codex.js +527 -0
  253. package/dist/src/hosts/codex.js.map +1 -0
  254. package/dist/src/hosts/isolation-common.js +43 -0
  255. package/dist/src/hosts/isolation-common.js.map +1 -0
  256. package/dist/src/hosts/isolation-roots.js +64 -0
  257. package/dist/src/hosts/isolation-roots.js.map +1 -0
  258. package/dist/src/hosts/isolation.js +12 -0
  259. package/dist/src/hosts/isolation.js.map +1 -0
  260. package/dist/src/hosts/linux-sandbox.js +127 -0
  261. package/dist/src/hosts/linux-sandbox.js.map +1 -0
  262. package/dist/src/hosts/mac-sandbox.js +137 -0
  263. package/dist/src/hosts/mac-sandbox.js.map +1 -0
  264. package/dist/src/hosts/native-controls.js +151 -0
  265. package/dist/src/hosts/native-controls.js.map +1 -0
  266. package/dist/src/hosts/native-request.js +33 -0
  267. package/dist/src/hosts/native-request.js.map +1 -0
  268. package/dist/src/hosts/process-lifecycle.js +167 -0
  269. package/dist/src/hosts/process-lifecycle.js.map +1 -0
  270. package/dist/src/hosts/protected-worktrees.js +81 -0
  271. package/dist/src/hosts/protected-worktrees.js.map +1 -0
  272. package/dist/src/hosts/skill-hook-catalog.js +100 -0
  273. package/dist/src/hosts/skill-hook-catalog.js.map +1 -0
  274. package/dist/src/hosts/skill-hook-handler.js +228 -0
  275. package/dist/src/hosts/skill-hook-handler.js.map +1 -0
  276. package/dist/src/hosts/skill-hooks.js +423 -0
  277. package/dist/src/hosts/skill-hooks.js.map +1 -0
  278. package/dist/src/hosts/workspace-fingerprint.js +72 -0
  279. package/dist/src/hosts/workspace-fingerprint.js.map +1 -0
  280. package/dist/src/identity.js +167 -0
  281. package/dist/src/identity.js.map +1 -0
  282. package/dist/src/instrumentation.js +83 -0
  283. package/dist/src/instrumentation.js.map +1 -0
  284. package/dist/src/native-transcript-state.js +85 -0
  285. package/dist/src/native-transcript-state.js.map +1 -0
  286. package/dist/src/native-transcript-view.js +65 -0
  287. package/dist/src/native-transcript-view.js.map +1 -0
  288. package/dist/src/native-transcripts.js +208 -0
  289. package/dist/src/native-transcripts.js.map +1 -0
  290. package/dist/src/paths.js +13 -0
  291. package/dist/src/paths.js.map +1 -0
  292. package/dist/src/process-lifecycle.js +101 -0
  293. package/dist/src/process-lifecycle.js.map +1 -0
  294. package/dist/src/provenance.js +263 -0
  295. package/dist/src/provenance.js.map +1 -0
  296. package/dist/src/prune.js +228 -0
  297. package/dist/src/prune.js.map +1 -0
  298. package/dist/src/report.js +276 -0
  299. package/dist/src/report.js.map +1 -0
  300. package/dist/src/resolved-case.js +29 -0
  301. package/dist/src/resolved-case.js.map +1 -0
  302. package/dist/src/results-lock.js +40 -0
  303. package/dist/src/results-lock.js.map +1 -0
  304. package/dist/src/results.js +127 -0
  305. package/dist/src/results.js.map +1 -0
  306. package/dist/src/run-owner.js +283 -0
  307. package/dist/src/run-owner.js.map +1 -0
  308. package/dist/src/runner-paths.js +11 -0
  309. package/dist/src/runner-paths.js.map +1 -0
  310. package/dist/src/runtime/config.js +323 -0
  311. package/dist/src/runtime/config.js.map +1 -0
  312. package/dist/src/runtime/discovery-apple.js +65 -0
  313. package/dist/src/runtime/discovery-apple.js.map +1 -0
  314. package/dist/src/runtime/discovery-providers.js +37 -0
  315. package/dist/src/runtime/discovery-providers.js.map +1 -0
  316. package/dist/src/runtime/discovery.js +40 -0
  317. package/dist/src/runtime/discovery.js.map +1 -0
  318. package/dist/src/runtime/hook-processes.js +81 -0
  319. package/dist/src/runtime/hook-processes.js.map +1 -0
  320. package/dist/src/runtime/hooks.js +304 -0
  321. package/dist/src/runtime/hooks.js.map +1 -0
  322. package/dist/src/runtime/paths.js +244 -0
  323. package/dist/src/runtime/paths.js.map +1 -0
  324. package/dist/src/runtime/query.js +76 -0
  325. package/dist/src/runtime/query.js.map +1 -0
  326. package/dist/src/runtime/seeds.js +98 -0
  327. package/dist/src/runtime/seeds.js.map +1 -0
  328. package/dist/src/runtime/shared-cache.js +81 -0
  329. package/dist/src/runtime/shared-cache.js.map +1 -0
  330. package/dist/src/runtime/state.js +106 -0
  331. package/dist/src/runtime/state.js.map +1 -0
  332. package/dist/src/runtime-process.js +148 -0
  333. package/dist/src/runtime-process.js.map +1 -0
  334. package/dist/src/schema-types.js +2 -0
  335. package/dist/src/schema-types.js.map +1 -0
  336. package/dist/src/schema.js +16 -0
  337. package/dist/src/schema.js.map +1 -0
  338. package/dist/src/shell.js +5 -0
  339. package/dist/src/shell.js.map +1 -0
  340. package/dist/src/sqlite-lock.js +18 -0
  341. package/dist/src/sqlite-lock.js.map +1 -0
  342. package/dist/src/storage.js +21 -0
  343. package/dist/src/storage.js.map +1 -0
  344. package/dist/src/transcript-retention.js +109 -0
  345. package/dist/src/transcript-retention.js.map +1 -0
  346. package/dist/src/value-guards.js +26 -0
  347. package/dist/src/value-guards.js.map +1 -0
  348. package/docs/architecture.md +5 -2
  349. package/docs/creating-cases.md +2 -3
  350. package/docs/development-cli.md +12 -7
  351. package/docs/documentation-quality.md +4 -3
  352. package/docs/evaluation-workflow.md +8 -8
  353. package/docs/getting-started.md +7 -6
  354. package/docs/guide-evaluation.md +1 -1
  355. package/docs/identity-v1.md +4 -1
  356. package/docs/installing.md +31 -13
  357. package/docs/licensing.md +2 -2
  358. package/docs/native-hosts.md +1 -1
  359. package/docs/recipes.md +41 -40
  360. package/docs/releases.md +20 -4
  361. package/docs/run-settings-v1.md +3 -3
  362. package/docs/specs/repository-guide.md +1 -1
  363. package/docs/troubleshooting.md +1 -1
  364. package/docs/typescript-quality.md +18 -1
  365. package/examples/recipes/executable.ts +19 -0
  366. package/examples/recipes/extension-artifacts.ts +1 -1
  367. package/examples/recipes/extension.ts +2 -1
  368. package/examples/recipes/modules.ts +9 -0
  369. package/examples/recipes/run-inputs.ts +14 -19
  370. package/examples/recipes/run-options.ts +9 -8
  371. package/examples/recipes/run.ts +21 -7
  372. package/examples/templates/repository-skill/extension-data.ts +1 -1
  373. package/examples/templates/repository-skill/extension.ts +2 -1
  374. package/package.json +14 -6
  375. package/src/cli/demo.ts +3 -2
  376. package/src/cli/help.ts +4 -3
  377. package/src/cli/init-settings.ts +5 -4
  378. package/src/cli/init.ts +9 -8
  379. package/src/cli/invocation.ts +2 -1
  380. package/src/cli/preparation.ts +2 -2
  381. package/src/cli.ts +1 -1
  382. package/src/executable.ts +19 -0
  383. package/src/extension-client.ts +6 -12
  384. package/src/fixtures/setup.ts +3 -2
  385. package/src/git.ts +2 -1
  386. package/src/graders/git-head.ts +3 -2
  387. package/src/graders/shell.ts +4 -3
  388. package/src/hosts/claude-keychain.ts +3 -2
  389. package/src/hosts/claude-login-refresh.ts +3 -2
  390. package/src/hosts/claude-refresh-lock.ts +2 -1
  391. package/src/hosts/isolation-roots.ts +3 -2
  392. package/src/hosts/process-lifecycle.ts +4 -6
  393. package/src/hosts/protected-worktrees.ts +2 -1
  394. package/src/hosts/skill-hook-handler.ts +1 -1
  395. package/src/hosts/skill-hooks.ts +10 -2
  396. package/src/provenance.ts +7 -6
  397. package/src/results-lock.ts +4 -4
  398. package/src/run-owner.ts +15 -9
  399. package/src/runner-paths.ts +21 -0
  400. package/src/runtime/hook-processes.ts +2 -1
  401. package/src/runtime/hooks.ts +9 -7
  402. package/src/runtime-process.ts +194 -0
  403. package/src/sqlite-lock.ts +25 -0
package/docs/recipes.md CHANGED
@@ -7,14 +7,15 @@ small extension.
7
7
 
8
8
  ## Prepare a recipe project
9
9
 
10
- Use Bun 1.3.13, Git, Node 24.13.0, and `rg`. Shell checks need macOS
10
+ Use Node.js 24.13.0 or newer, Git, and `rg`. Bun is optional for the installed
11
+ recipes; the same JavaScript files also run with Bun 1.3.13. Shell checks need macOS
11
12
  `sandbox-exec` or Ubuntu `bubblewrap`; native Claude also needs `socat` on
12
13
  Ubuntu. Python/UV and mise add the prerequisites stated below.
13
14
  [Install Sevro](installing.md), then set the recipe path from the directory
14
15
  containing its local installation:
15
16
 
16
17
  ```sh
17
- export SEVRO_RECIPES="$PWD/node_modules/@bjoernrochel/sevro/examples/recipes"
18
+ export SEVRO_RECIPES="$PWD/node_modules/@bjoernrochel/sevro/dist/examples/recipes"
18
19
  ```
19
20
 
20
21
  Run commands below from an otherwise empty working directory to keep generated
@@ -24,7 +25,7 @@ the CLI beside its original package; it does not require a global installation.
24
25
  To adapt a separate copy, preserve the small project's whole directory:
25
26
 
26
27
  ```sh
27
- export SEVRO_RECIPE_CLI="$(cd "$SEVRO_RECIPES/../../src" && pwd)/cli.ts"
28
+ export SEVRO_RECIPE_CLI="$(cd "$SEVRO_RECIPES/../../src" && pwd)/cli.js"
28
29
  cp -R "$SEVRO_RECIPES" ./my-recipes
29
30
  export SEVRO_RECIPES="$PWD/my-recipes"
30
31
  ```
@@ -45,7 +46,7 @@ deliberately exits `1` with execution/grading `completed` and task `failed`.
45
46
  Run negative controls separately when using a shell with `set -e`. A missing
46
47
  tool is a prerequisite error, not a passing or intentionally failing control.
47
48
 
48
- `candidate.ts` is an explicitly trusted deterministic fixture editor. It changes
49
+ `candidate.js` (built from `candidate.ts`) is an explicitly trusted deterministic fixture editor. It changes
49
50
  the arithmetic implementation for the coding recipe and supplies a fixed answer
50
51
  for the other controls. It does not simulate native tool permissions: the real
51
52
  isolated shell graders execute the stated tools and assertions. Native routes
@@ -59,16 +60,16 @@ available identifier and supply your private authentication file path:
59
60
  ```sh
60
61
  export SEVRO_RECIPE_MODEL='replace-with-an-available-Codex-model'
61
62
  export SEVRO_RECIPE_CODEX_AUTH="${CODEX_HOME:-$HOME/.codex}/auth.json"
62
- bun "$SEVRO_RECIPES/run.ts" coding-change codex --dry
63
- bun "$SEVRO_RECIPES/run.ts" coding-change codex
63
+ node "$SEVRO_RECIPES/run.js" coding-change codex --dry
64
+ node "$SEVRO_RECIPES/run.js" coding-change codex
64
65
  ```
65
66
 
66
67
  For Claude, use its supported credential route and a Claude model identifier:
67
68
 
68
69
  ```sh
69
70
  export SEVRO_RECIPE_MODEL='replace-with-an-available-Claude-model'
70
- bun "$SEVRO_RECIPES/run.ts" coding-change claude --dry
71
- bun "$SEVRO_RECIPES/run.ts" coding-change claude
71
+ node "$SEVRO_RECIPES/run.js" coding-change claude --dry
72
+ node "$SEVRO_RECIPES/run.js" coding-change claude
72
73
  ```
73
74
 
74
75
  Substitute the other recipe name to run its native task. `--dry` prepares and
@@ -86,13 +87,13 @@ Files: [coding-change case](../examples/recipes/cases/coding-change.json),
86
87
  The fixture contains a broken `math.cjs` and a task README. The task asks the
87
88
  participant to implement addition. The evaluator checks positive, negative and
88
89
  zero arguments. Its source stays outside the candidate fixture: the launcher
89
- transpiles the checked TypeScript test and embeds its JavaScript in the
90
+ reads the compiled evaluator test and embeds its JavaScript in the
90
91
  evaluator-owned shell command before execution.
91
92
 
92
93
  <!-- sevro-example:recipe-coding-change-pass -->
93
94
 
94
95
  ```sh
95
- bun "$SEVRO_RECIPES/run.ts" coding-change deterministic
96
+ node "$SEVRO_RECIPES/run.js" coding-change deterministic
96
97
  ```
97
98
 
98
99
  The isolated check first asserts that the original evaluator test is unreadable,
@@ -103,7 +104,7 @@ in place, so the arithmetic assertion fails:
103
104
  <!-- sevro-example:recipe-coding-change-fail -->
104
105
 
105
106
  ```sh
106
- bun "$SEVRO_RECIPES/run.ts" coding-change deterministic --fail
107
+ node "$SEVRO_RECIPES/run.js" coding-change deterministic --fail
107
108
  ```
108
109
 
109
110
  Use a native route below to evaluate an actual coding agent. Adding a participant
@@ -150,7 +151,7 @@ process must find exactly that line.
150
151
  <!-- sevro-example:recipe-host-tools-pass -->
151
152
 
152
153
  ```sh
153
- bun "$SEVRO_RECIPES/run.ts" host-tools deterministic
154
+ node "$SEVRO_RECIPES/run.js" host-tools deterministic
154
155
  ```
155
156
 
156
157
  The negative fixture contains port `9000`, so that same search fails:
@@ -158,7 +159,7 @@ The negative fixture contains port `9000`, so that same search fails:
158
159
  <!-- sevro-example:recipe-host-tools-fail -->
159
160
 
160
161
  ```sh
161
- bun "$SEVRO_RECIPES/run.ts" host-tools deterministic --fail
162
+ node "$SEVRO_RECIPES/run.js" host-tools deterministic --fail
162
163
  ```
163
164
 
164
165
  ### Node
@@ -170,7 +171,7 @@ Node process parses it, asserts the port, and prints `3000`.
170
171
  <!-- sevro-example:recipe-node-pass -->
171
172
 
172
173
  ```sh
173
- bun "$SEVRO_RECIPES/run.ts" node deterministic
174
+ node "$SEVRO_RECIPES/run.js" node deterministic
174
175
  ```
175
176
 
176
177
  The negative fixture sets port `9000`, causing the Node assertion to fail:
@@ -178,7 +179,7 @@ The negative fixture sets port `9000`, causing the Node assertion to fail:
178
179
  <!-- sevro-example:recipe-node-fail -->
179
180
 
180
181
  ```sh
181
- bun "$SEVRO_RECIPES/run.ts" node deterministic --fail
182
+ node "$SEVRO_RECIPES/run.js" node deterministic --fail
182
183
  ```
183
184
 
184
185
  ### Python with UV
@@ -198,7 +199,7 @@ port and prints `3000`:
198
199
  <!-- sevro-example:recipe-python-uv-pass -->
199
200
 
200
201
  ```sh
201
- bun "$SEVRO_RECIPES/run.ts" python-uv deterministic
202
+ node "$SEVRO_RECIPES/run.js" python-uv deterministic
202
203
  ```
203
204
 
204
205
  The negative fixture changes the port to `9000`; Python raises an assertion:
@@ -206,7 +207,7 @@ The negative fixture changes the port to `9000`; Python raises an assertion:
206
207
  <!-- sevro-example:recipe-python-uv-fail -->
207
208
 
208
209
  ```sh
209
- bun "$SEVRO_RECIPES/run.ts" python-uv deterministic --fail
210
+ node "$SEVRO_RECIPES/run.js" python-uv deterministic --fail
210
211
  ```
211
212
 
212
213
  For real dependencies, prepare a public cache once outside the evaluated project
@@ -238,7 +239,7 @@ sandbox or grant mise's whole data directory.
238
239
  <!-- sevro-example:recipe-mise-pass -->
239
240
 
240
241
  ```sh
241
- bun "$SEVRO_RECIPES/run.ts" mise deterministic
242
+ node "$SEVRO_RECIPES/run.js" mise deterministic
242
243
  ```
243
244
 
244
245
  The negative fixture changes the port to `9000`, failing the same Node check:
@@ -246,7 +247,7 @@ The negative fixture changes the port to `9000`, failing the same Node check:
246
247
  <!-- sevro-example:recipe-mise-fail -->
247
248
 
248
249
  ```sh
249
- bun "$SEVRO_RECIPES/run.ts" mise deterministic --fail
250
+ node "$SEVRO_RECIPES/run.js" mise deterministic --fail
250
251
  ```
251
252
 
252
253
  An attempted isolated `mise exec` with read-only operator data returned
@@ -274,13 +275,13 @@ and retains the artifacts. Expect exit `0`, execution `not_run`, grading
274
275
  <!-- sevro-example:recipe-repository-skill-codex-dry -->
275
276
 
276
277
  ```sh
277
- bun "$SEVRO_RECIPES/run.ts" repository-skill codex --dry
278
+ node "$SEVRO_RECIPES/run.js" repository-skill codex --dry
278
279
  ```
279
280
 
280
281
  <!-- sevro-example:recipe-repository-skill-claude-dry -->
281
282
 
282
283
  ```sh
283
- bun "$SEVRO_RECIPES/run.ts" repository-skill claude --dry
284
+ node "$SEVRO_RECIPES/run.js" repository-skill claude --dry
284
285
  ```
285
286
 
286
287
  For a real Codex trial, export `SEVRO_RECIPE_MODEL` to an available Codex model
@@ -291,15 +292,15 @@ remove `--dry`. Credentials stay outside recipe/project inputs and argv.
291
292
  These calls consume account quota.
292
293
 
293
294
  ```sh
294
- bun "$SEVRO_RECIPES/run.ts" repository-skill codex
295
- bun "$SEVRO_RECIPES/run.ts" repository-skill codex --fail
295
+ node "$SEVRO_RECIPES/run.js" repository-skill codex
296
+ node "$SEVRO_RECIPES/run.js" repository-skill codex --fail
296
297
  ```
297
298
 
298
299
  With `SEVRO_RECIPE_MODEL` set for Claude instead:
299
300
 
300
301
  ```sh
301
- bun "$SEVRO_RECIPES/run.ts" repository-skill claude
302
- bun "$SEVRO_RECIPES/run.ts" repository-skill claude --fail
302
+ node "$SEVRO_RECIPES/run.js" repository-skill claude
303
+ node "$SEVRO_RECIPES/run.js" repository-skill claude --fail
303
304
  ```
304
305
 
305
306
  The neutral invocation placeholder becomes `$startup-guide` for Codex and
@@ -327,13 +328,13 @@ construction, verdict parsing, and retained semantic evidence:
327
328
  <!-- sevro-example:recipe-semantic-pass -->
328
329
 
329
330
  ```sh
330
- bun "$SEVRO_RECIPES/run.ts" semantic deterministic
331
+ node "$SEVRO_RECIPES/run.js" semantic deterministic
331
332
  ```
332
333
 
333
334
  <!-- sevro-example:recipe-semantic-fail -->
334
335
 
335
336
  ```sh
336
- bun "$SEVRO_RECIPES/run.ts" semantic deterministic --fail
337
+ node "$SEVRO_RECIPES/run.js" semantic deterministic --fail
337
338
  ```
338
339
 
339
340
  The protocol judge derives pass/fail from the actual candidate-response field
@@ -345,8 +346,8 @@ For an actual model candidate and judge, set the native variables above and
345
346
  export `SEVRO_RECIPE_JUDGE_MODEL` to an available Codex judge model:
346
347
 
347
348
  ```sh
348
- bun "$SEVRO_RECIPES/run.ts" semantic codex --dry
349
- bun "$SEVRO_RECIPES/run.ts" semantic codex
349
+ node "$SEVRO_RECIPES/run.js" semantic codex --dry
350
+ node "$SEVRO_RECIPES/run.js" semantic codex
350
351
  ```
351
352
 
352
353
  `semantic claude` selects a Claude candidate with a separate Codex judge;
@@ -367,12 +368,12 @@ a grading error, not a failed proposition or a passing task. Read
367
368
  Files: [extension.ts](../examples/recipes/extension.ts),
368
369
  [methods](../examples/recipes/extension-methods.ts), and
369
370
  [artifact preparation](../examples/recipes/extension-artifacts.ts). Prerequisites:
370
- Bun, Git and the platform's shell isolation tool. No model is required:
371
+ Node or Bun, Git and the platform's shell isolation tool. No model is required:
371
372
 
372
373
  <!-- sevro-example:recipe-lifecycle-pass -->
373
374
 
374
375
  ```sh
375
- bun "$SEVRO_RECIPES/run.ts" lifecycle deterministic
376
+ node "$SEVRO_RECIPES/run.js" lifecycle deterministic
376
377
  ```
377
378
 
378
379
  `describe` advertises version/capabilities/grader; `resolve` returns the task
@@ -387,7 +388,7 @@ response; diagnostics belong on stderr.
387
388
  <!-- sevro-example:recipe-lifecycle-fail -->
388
389
 
389
390
  ```sh
390
- bun "$SEVRO_RECIPES/run.ts" lifecycle deterministic --fail
391
+ node "$SEVRO_RECIPES/run.js" lifecycle deterministic --fail
391
392
  ```
392
393
 
393
394
  The wrong final answer fails the built-in output assertion and extension check,
@@ -413,13 +414,13 @@ First add only native goals to the empty runtime and validate preparation:
413
414
  <!-- sevro-example:recipe-goals-codex-dry -->
414
415
 
415
416
  ```sh
416
- bun "$SEVRO_RECIPES/run.ts" plugins codex --dry --goals-only
417
+ node "$SEVRO_RECIPES/run.js" plugins codex --dry --goals-only
417
418
  ```
418
419
 
419
420
  <!-- sevro-example:recipe-goals-claude-dry -->
420
421
 
421
422
  ```sh
422
- bun "$SEVRO_RECIPES/run.ts" plugins claude --dry --goals-only
423
+ node "$SEVRO_RECIPES/run.js" plugins claude --dry --goals-only
423
424
  ```
424
425
 
425
426
  Then add `hooks.plugins: ["startup"]` so only this prepared plugin's command
@@ -429,13 +430,13 @@ Claude uses plugin-only settings, so do not add `--claude-project-settings`:
429
430
  <!-- sevro-example:recipe-plugins-codex-dry -->
430
431
 
431
432
  ```sh
432
- bun "$SEVRO_RECIPES/run.ts" plugins codex --dry
433
+ node "$SEVRO_RECIPES/run.js" plugins codex --dry
433
434
  ```
434
435
 
435
436
  <!-- sevro-example:recipe-plugins-claude-dry -->
436
437
 
437
438
  ```sh
438
- bun "$SEVRO_RECIPES/run.ts" plugins claude --dry
439
+ node "$SEVRO_RECIPES/run.js" plugins claude --dry
439
440
  ```
440
441
 
441
442
  All four dry commands expect `not_run`/`not_requested`/`not_assessed`, exit `0`.
@@ -454,15 +455,15 @@ with network denied and only the prepared plugin subtree readable.
454
455
  facility or passing this startup task alone does not prove goal completion.
455
456
 
456
457
  ```sh
457
- bun "$SEVRO_RECIPES/run.ts" plugins codex
458
- bun "$SEVRO_RECIPES/run.ts" plugins codex --fail
458
+ node "$SEVRO_RECIPES/run.js" plugins codex
459
+ node "$SEVRO_RECIPES/run.js" plugins codex --fail
459
460
  ```
460
461
 
461
462
  Or, with the Claude model/credential route configured:
462
463
 
463
464
  ```sh
464
- bun "$SEVRO_RECIPES/run.ts" plugins claude
465
- bun "$SEVRO_RECIPES/run.ts" plugins claude --fail
465
+ node "$SEVRO_RECIPES/run.js" plugins claude
466
+ node "$SEVRO_RECIPES/run.js" plugins claude --fail
466
467
  ```
467
468
 
468
469
  For a deliberate failure, run that live command with `--fail`; the requested
package/docs/releases.md CHANGED
@@ -12,7 +12,21 @@ Published `rc.1` and `rc.2` retain their original BSL grants. Always select a ne
12
12
  version for publication; a local development tarball does not replace an
13
13
  already published artifact.
14
14
 
15
- ## Unreleased: smaller npm package
15
+ <a id="unreleased-node-runtime-support"></a>
16
+
17
+ ## Node runtime support
18
+
19
+ The package ships compiled JavaScript for Node.js 24.13.0 or newer and Bun
20
+ 1.3.13. Development retains Bun. Builds populate `dist/`; the package phase
21
+ checks both runtimes and includes Node workflows with Bun absent from PATH.
22
+ `runnerBuildDigest` includes compiled output for installed execution, so this
23
+ changes build identities. Existing evidence keeps its original identity.
24
+ Release preparation builds first, then packs with lifecycle scripts disabled;
25
+ this adds no release test rerun.
26
+
27
+ <a id="unreleased-smaller-npm-package"></a>
28
+
29
+ ## Package contents and size
16
30
 
17
31
  The npm package omits logo images, historical validation and usability pages,
18
32
  and raw evidence, including the Darrow migration patch and old guide verification
@@ -20,10 +34,11 @@ record. All remain in the repository; packaged pages link to their online copies
20
34
  The current `LICENSE`, contribution terms, branding permissions and retained
21
35
  earlier-release license text still ship. No licensing or branding grants change.
22
36
 
23
- For this cleanup, `npm pack --dry-run --ignore-scripts --json` measured the
37
+ During the package-size cleanup, `npm pack --dry-run --ignore-scripts --json` measured a
24
38
  development tarball at about 0.39 MB compressed, down from 3,545,849 bytes, and
25
39
  about 1.86 MB unpacked, down from 6,632,891 bytes (about 89% and 72% smaller).
26
- These are candidate measurements, not a newly published release.
40
+ These historical development-build measurements do not guarantee the size of
41
+ every release.
27
42
 
28
43
  `runnerBuildDigest` hashes packaged paths and bytes under `docs/` as well as the
29
44
  runtime and other package inputs. This packaging change therefore causes a
@@ -42,7 +57,8 @@ including a release candidate. Use `next` for a preview that should require an
42
57
  explicit opt-in. Preparation accepts either tag for prerelease and stable versions.
43
58
 
44
59
  Preparation creates a new absolute output directory and never replaces an
45
- existing directory. It packs with lifecycle scripts disabled, retains the npm
60
+ existing directory. `release:prepare` first builds the JavaScript artifact,
61
+ then packs with lifecycle scripts disabled, retains the npm
46
62
  file inventory, and writes `release.json` and `SHA256SUMS` beside the tarball.
47
63
  The record identifies the package, version, release tag, distribution tag,
48
64
  tarball SHA-256 and npm SHA-512 integrity, and the preparation runtimes.
@@ -7,14 +7,14 @@ Save recurring evaluation selections in a JSON run manifest, then use
7
7
  ## Repeat an evaluation
8
8
 
9
9
  Start with an existing [resolved case and adapter](getting-started.md), and save
10
- this `evaluation.json` beside `case.json` and `host-adapter.ts`:
10
+ this `evaluation.json` beside `case.json` and `host-adapter.js`:
11
11
 
12
12
  ```json
13
13
  {
14
14
  "format": "sevro.run.v1",
15
15
  "settings": {
16
16
  "case-file": "./case.json",
17
- "adapter-module": "./host-adapter.ts",
17
+ "adapter-module": "./host-adapter.js",
18
18
  "project-root": ".",
19
19
  "condition": "passive",
20
20
  "trials": 3,
@@ -95,7 +95,7 @@ occurrences build the replacement array. `--no-dry`, `--no-shell-isolation`,
95
95
  `true` values with `false`.
96
96
 
97
97
  Selecting an alternative route on the CLI removes its saved alternative and
98
- route-only settings. For example, `--adapter-module ./host-adapter.ts` replaces
98
+ route-only settings. For example, `--adapter-module ./host-adapter.js` replaces
99
99
  a saved native candidate and its model/effort. Selecting `--host claude` over
100
100
  a saved Codex candidate requires fresh explicit `--model` and `--effort`;
101
101
  grading roles keep their separate selections. Shared Codex settings remain
@@ -1,6 +1,6 @@
1
1
  # Repository guide
2
2
 
3
- The repository-scoped `sevro-guide` explains this checkout. It is independent
3
+ The repository-scoped `sevro-guide` explains Sevro from repository sources. It is independent
4
4
  of npm packaging and serves a static documentation spine, not an execution agent.
5
5
 
6
6
  ## Contract
@@ -5,7 +5,7 @@ cause is not a diagnosis of your machine.
5
5
 
6
6
  | Symptom | Check and next step |
7
7
  | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
8
- | Command cannot run | Use Bun 1.3.13 and verify the local package/version. Read [installation](installing.md). |
8
+ | Command cannot run | Use Node.js 24.13.0 or newer, or the explicit Bun 1.3.13 invocation, and verify the local package/version. Read [installation](installing.md). |
9
9
  | Project snapshot contains a symbolic link | Use a separate evaluated project directory as in [the tutorial](getting-started.md); do not include installed dependencies in a plain-directory snapshot. |
10
10
  | Exit 0 but no passing task | Prompt-only/dry runs are `not_assessed`. Read [results](reading-results.md). |
11
11
  | Exit 64 before execution | Check absolute paths, exclusive route options, configuration, and capabilities in the [CLI reference](development-cli.md). |
@@ -25,7 +25,7 @@ order; `--fast` runs only `static` without installing dependencies.
25
25
  | `static` | Schema freshness, documentation contracts, formatting, type-aware lint and typing |
26
26
  | `docs` | All guide dry runs, tutorial examples and recipe checks |
27
27
  | `tests` | Coverage integrity controls, the complete instrumented Bun suite and both coverage thresholds |
28
- | `package` | Packed-package installation and installed CLI workflows |
28
+ | `package` | Packed-package installation and installed CLI workflows on Bun and Node |
29
29
 
30
30
  Use the same prerequisites as the corresponding complete-gate checks. A single
31
31
  phase is partial evidence; full acceptance requires all four on the same candidate.
@@ -46,6 +46,9 @@ need no manual manifest edit. Non-ignored untracked sources are included in loca
46
46
  candidate checks; committed CI checkouts use their tracked paths. Declarations
47
47
  take precedence over directory roles, and only the validators in the shared
48
48
  [schema catalog](../scripts/schema-catalog.ts) receive the generated disposition.
49
+ Generated `dist/` output is ignored by Git, lint and the authored-source inventory.
50
+ It is rebuilt from inventoried TypeScript and validated through installed-package
51
+ workflows; it never substitutes for authored production coverage.
49
52
  Unknown or ambiguous paths, missing tracked files, an incomplete generated set,
50
53
  and sources outside lint or typing are refused. An independent filesystem audit
51
54
  also refuses ignored authored sources rather than silently dropping them.
@@ -203,6 +206,20 @@ deliberately exit 1. A five-of-five statement, one-of-two branch sample must fai
203
206
  with `Below 95%: branches`. The integration suite retains real CLI/extension,
204
207
  graceful SIGINT/SIGTERM cancellation, filesystem isolation and owned-child paths.
205
208
 
209
+ ## Installed runtime acceptance
210
+
211
+ Bun 1.3.13 remains the contributor runtime and test runner. `bun run build`
212
+ emits JavaScript and source maps under `dist/`; `prepack` builds before ordinary
213
+ `npm pack`. Packing with lifecycle scripts disabled requires an explicit build.
214
+ `bun run test:runtime-node` installs the candidate archive with npm, removes Bun
215
+ from the consumer PATH, and exercises the Node 24.13.0 CLI, templates and recipes.
216
+ It also interrupts a real isolated shell check, verifies the interruption exit
217
+ and retained evidence, and refuses a surviving owned child process.
218
+ It reuses the installed-package workflow checks, including synthetic native
219
+ fixtures, with Node selected explicitly. The package quality phase requires
220
+ both the existing Bun package checks and Node acceptance. These deterministic
221
+ checks do not establish authenticated model behavior.
222
+
206
223
  ## Environment and CI
207
224
 
208
225
  The discovery backend was observed with Bun 1.3.13, macOS arm64 and Node 24.13.0.
@@ -0,0 +1,19 @@
1
+ import { accessSync, constants, statSync } from "node:fs";
2
+ import { delimiter, resolve } from "node:path";
3
+
4
+ export function which(name: string, path?: string): string | null {
5
+ for (const directory of executablePath(path).split(delimiter)) {
6
+ const candidate = resolve(directory, name);
7
+ try {
8
+ accessSync(candidate, constants.X_OK);
9
+ if (statSync(candidate).isFile()) return candidate;
10
+ } catch {
11
+ /* Continue searching the declared executable path. */
12
+ }
13
+ }
14
+ return null;
15
+ }
16
+
17
+ function executablePath(path: string | undefined): string {
18
+ return path ?? process.env.PATH ?? "";
19
+ }
@@ -16,7 +16,7 @@ export async function repositoryArtifacts(host: string) {
16
16
  const directory = host === "claude" ? ".claude" : ".agents";
17
17
  const relative = `${directory}/skills/startup-guide/SKILL.md`;
18
18
  const body = await readFile(
19
- join(import.meta.dir, "repository-skill", relative),
19
+ join(import.meta.dirname, "repository-skill", relative),
20
20
  "utf8",
21
21
  );
22
22
  return [artifact(relative, body)];
@@ -1,3 +1,4 @@
1
+ import { readFileSync } from "node:fs";
1
2
  import {
2
3
  describe,
3
4
  evaluate,
@@ -9,7 +10,7 @@ import {
9
10
  const mode = process.argv[2] ?? "lifecycle";
10
11
  const host = process.argv[3] ?? "deterministic";
11
12
  const fail = process.argv[4] === "fail";
12
- const request = record(JSON.parse(await Bun.stdin.text()) as unknown);
13
+ const request = record(JSON.parse(readFileSync(0, "utf8")) as unknown);
13
14
 
14
15
  async function result() {
15
16
  switch (request.method) {
@@ -0,0 +1,9 @@
1
+ import { join } from "node:path";
2
+
3
+ /** Locate source modules for Bun development or compiled modules for consumers. */
4
+ export function recipeFile(...parts: string[]): string {
5
+ const path = join(import.meta.dirname, ...parts);
6
+ return import.meta.filename.endsWith(".ts")
7
+ ? path
8
+ : path.replace(/\.ts$/, ".js");
9
+ }
@@ -1,3 +1,4 @@
1
+ import { recipeFile } from "./modules";
1
2
  import { readFile, writeFile } from "node:fs/promises";
2
3
  import { join } from "node:path";
3
4
  import { record } from "./extension-methods";
@@ -7,6 +8,11 @@ function shellQuote(text: string): string {
7
8
  return `'${text.replaceAll("'", "'\\''")}'`;
8
9
  }
9
10
 
11
+ function evaluatorCode(test: string): string {
12
+ if (import.meta.filename.endsWith(".js")) return test;
13
+ return new Bun.Transpiler({ loader: "ts" }).transformSync(test);
14
+ }
15
+
10
16
  async function caseFile(
11
17
  options: RecipeOptions,
12
18
  state: string,
@@ -14,22 +20,17 @@ async function caseFile(
14
20
  const value = record(
15
21
  JSON.parse(
16
22
  await readFile(
17
- join(import.meta.dir, "cases", `${options.recipe}.json`),
23
+ join(import.meta.dirname, "cases", `${options.recipe}.json`),
18
24
  "utf8",
19
25
  ),
20
26
  ) as unknown,
21
27
  );
22
28
  if (options.recipe === "coding-change") {
23
- const test = await readFile(
24
- join(import.meta.dir, "coding-change/check.ts"),
25
- "utf8",
26
- );
29
+ const test = await readFile(recipeFile("coding-change/check.ts"), "utf8");
27
30
  const checks: unknown[] = Array.isArray(value.checks) ? value.checks : [];
28
31
  const check = record(checks[0]);
29
- const javascript = new Bun.Transpiler({ loader: "ts" }).transformSync(test);
30
- const protectedTest = shellQuote(
31
- join(import.meta.dir, "coding-change/check.ts"),
32
- );
32
+ const javascript = evaluatorCode(test);
33
+ const protectedTest = shellQuote(recipeFile("coding-change/check.ts"));
33
34
  record(check.configuration).run =
34
35
  `test ! -r ${protectedTest}\nnode --input-type=module -e ${shellQuote(javascript)}`;
35
36
  }
@@ -62,7 +63,7 @@ async function extensionFiles(
62
63
  command,
63
64
  JSON.stringify([
64
65
  process.execPath,
65
- join(import.meta.dir, "extension.ts"),
66
+ recipeFile("extension.ts"),
66
67
  options.recipe,
67
68
  options.route,
68
69
  options.fail ? "fail" : "pass",
@@ -80,10 +81,7 @@ async function extensionFiles(
80
81
  command,
81
82
  "--case-id",
82
83
  "recipe-extension",
83
- ...sources.flatMap((path) => [
84
- "--extension-source-file",
85
- join(import.meta.dir, path),
86
- ]),
84
+ ...sources.flatMap((path) => ["--extension-source-file", recipeFile(path)]),
87
85
  ];
88
86
  }
89
87
 
@@ -118,7 +116,7 @@ export async function hostArguments(
118
116
  state: string,
119
117
  ): Promise<string[]> {
120
118
  if (options.route === "deterministic")
121
- return ["--adapter-module", join(import.meta.dir, "candidate.ts")];
119
+ return ["--adapter-module", recipeFile("candidate.ts")];
122
120
  const model = selectedModel(options.dry, "SEVRO_RECIPE_MODEL");
123
121
  if (!model)
124
122
  throw new Error(
@@ -156,10 +154,7 @@ export async function semanticArguments(
156
154
  ): Promise<string[]> {
157
155
  if (options.recipe !== "semantic") return [];
158
156
  if (options.route === "deterministic")
159
- return [
160
- "--semantic-adapter-module",
161
- join(import.meta.dir, "semantic-judge.ts"),
162
- ];
157
+ return ["--semantic-adapter-module", recipeFile("semantic-judge.ts")];
163
158
  const model = selectedModel(options.dry, "SEVRO_RECIPE_JUDGE_MODEL");
164
159
  if (!model)
165
160
  throw new Error(
@@ -1,3 +1,5 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { which } from "./executable";
1
3
  import { delimiter, isAbsolute, join } from "node:path";
2
4
  import { homedir } from "node:os";
3
5
 
@@ -60,7 +62,7 @@ function validateGoalsStep(flags: string[]): void {
60
62
  }
61
63
 
62
64
  export function requireTool(name: string): string {
63
- const path = Bun.which(name);
65
+ const path = which(name);
64
66
  if (!path)
65
67
  throw new Error(
66
68
  `Recipe prerequisite missing: install ${name} and put it on PATH`,
@@ -78,7 +80,7 @@ export function runtimeFile(options: RecipeOptions): string {
78
80
  plugins: options.goalsOnly ? "goals" : "plugins",
79
81
  };
80
82
  return join(
81
- import.meta.dir,
83
+ import.meta.dirname,
82
84
  "runtime",
83
85
  `${files[options.recipe] ?? "empty"}.json`,
84
86
  );
@@ -99,19 +101,18 @@ function requireStandaloneRipgrep(): void {
99
101
  const paths = (process.env.PATH ?? "")
100
102
  .split(delimiter)
101
103
  .filter((entry) => !roots.some((root) => entry.startsWith(root)));
102
- if (!Bun.which("rg", { PATH: paths.join(delimiter) }))
104
+ if (!which("rg", paths.join(delimiter)))
103
105
  throw new Error(
104
106
  "Install standalone ripgrep outside Codex/Claude credential directories, then put it on PATH (for example brew install ripgrep or apt-get install ripgrep)",
105
107
  );
106
108
  }
107
109
 
108
110
  function selectMiseNode(): void {
109
- const result = Bun.spawnSync([requireTool("mise"), "where", "node@24.13.0"], {
110
- stdout: "pipe",
111
- stderr: "pipe",
111
+ const result = spawnSync(requireTool("mise"), ["where", "node@24.13.0"], {
112
+ encoding: "utf8",
112
113
  });
113
- const installation = result.stdout.toString().trim();
114
- if (result.exitCode !== 0 || !isAbsolute(installation))
114
+ const installation = result.stdout.trim();
115
+ if (result.status !== 0 || !isAbsolute(installation))
115
116
  throw new Error(
116
117
  "Install the recipe's Node with mise install node@24.13.0 before running it",
117
118
  );
@@ -1,3 +1,5 @@
1
+ import { spawn } from "node:child_process";
2
+ import { Readable } from "node:stream";
1
3
  import { mkdir, realpath, writeFile } from "node:fs/promises";
2
4
  import { join, resolve } from "node:path";
3
5
  import { hostArguments, recipeInputs, semanticArguments } from "./run-inputs";
@@ -20,7 +22,13 @@ await mkdir(join(state, "project"), { recursive: true });
20
22
  await mkdir(join(state, "config"), { recursive: true });
21
23
  const root = await realpath(state);
22
24
  const cli =
23
- process.env.SEVRO_RECIPE_CLI ?? resolve(import.meta.dir, "../../src/cli.ts");
25
+ process.env.SEVRO_RECIPE_CLI ??
26
+ resolve(
27
+ import.meta.dirname,
28
+ import.meta.filename.endsWith(".ts")
29
+ ? "../../src/cli.ts"
30
+ : "../../src/cli.js",
31
+ );
24
32
  const args = [
25
33
  process.execPath,
26
34
  cli,
@@ -42,20 +50,26 @@ const args = [
42
50
  "1",
43
51
  "--shell-isolation",
44
52
  "--protected-root",
45
- import.meta.dir,
53
+ import.meta.dirname,
46
54
  ...(await recipeInputs(options, root)),
47
55
  ...(await hostArguments(options, root)),
48
56
  ...(await semanticArguments(options, root)),
49
57
  ...(options.dry ? ["--dry"] : []),
50
58
  ];
51
- const child = Bun.spawn(args, {
59
+ const child = spawn(process.execPath, args.slice(1), {
52
60
  env: { ...process.env, SEVRO_RECIPE_FAIL: options.fail ? "1" : "0" },
53
- stdout: "pipe",
54
- stderr: "inherit",
61
+ stdio: ["ignore", "pipe", "inherit"],
55
62
  });
56
63
  const [output, code] = await Promise.all([
57
- new Response(child.stdout).text(),
58
- child.exited,
64
+ new Response(
65
+ Readable.toWeb(child.stdout) as unknown as ReadableStream<Uint8Array>,
66
+ ).text(),
67
+ new Promise<number>((resolve, reject) => {
68
+ child.once("error", reject);
69
+ child.once("close", (code) => {
70
+ resolve(code ?? 1);
71
+ });
72
+ }),
59
73
  ]);
60
74
  await writeFile(join(root, "result.json"), output);
61
75
  process.stderr.write(`Recipe result: ${join(root, "result.json")}\n`);