@openagentsy/hooks 0.0.0-stage → 0.2.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 (307) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +32 -2
  3. package/dist/accountability.d.ts +29 -0
  4. package/dist/accountability.d.ts.map +1 -0
  5. package/dist/accountability.js +21 -0
  6. package/dist/accountability.js.map +1 -0
  7. package/dist/accountability.test.d.ts +2 -0
  8. package/dist/accountability.test.d.ts.map +1 -0
  9. package/dist/accountability.test.js +42 -0
  10. package/dist/accountability.test.js.map +1 -0
  11. package/dist/approvals.d.ts +110 -0
  12. package/dist/approvals.d.ts.map +1 -0
  13. package/dist/approvals.js +464 -0
  14. package/dist/approvals.js.map +1 -0
  15. package/dist/approvals.test.d.ts +2 -0
  16. package/dist/approvals.test.d.ts.map +1 -0
  17. package/dist/approvals.test.js +307 -0
  18. package/dist/approvals.test.js.map +1 -0
  19. package/dist/base-tool.d.ts +26 -0
  20. package/dist/base-tool.d.ts.map +1 -0
  21. package/dist/base-tool.js +37 -0
  22. package/dist/base-tool.js.map +1 -0
  23. package/dist/base-tool.test.d.ts +2 -0
  24. package/dist/base-tool.test.d.ts.map +1 -0
  25. package/dist/base-tool.test.js +34 -0
  26. package/dist/base-tool.test.js.map +1 -0
  27. package/dist/eval/index.d.ts +3 -0
  28. package/dist/eval/index.d.ts.map +1 -0
  29. package/dist/eval/index.js +3 -0
  30. package/dist/eval/index.js.map +1 -0
  31. package/dist/eval/runner.d.ts +179 -0
  32. package/dist/eval/runner.d.ts.map +1 -0
  33. package/dist/eval/runner.js +616 -0
  34. package/dist/eval/runner.js.map +1 -0
  35. package/dist/eval/runner.test.d.ts +2 -0
  36. package/dist/eval/runner.test.d.ts.map +1 -0
  37. package/dist/eval/runner.test.js +431 -0
  38. package/dist/eval/runner.test.js.map +1 -0
  39. package/dist/eval/types.d.ts +173 -0
  40. package/dist/eval/types.d.ts.map +1 -0
  41. package/dist/eval/types.js +104 -0
  42. package/dist/eval/types.js.map +1 -0
  43. package/dist/event.d.ts +59 -0
  44. package/dist/event.d.ts.map +1 -0
  45. package/dist/event.js +178 -0
  46. package/dist/event.js.map +1 -0
  47. package/dist/event.test.d.ts +2 -0
  48. package/dist/event.test.d.ts.map +1 -0
  49. package/dist/event.test.js +49 -0
  50. package/dist/event.test.js.map +1 -0
  51. package/dist/index.d.ts +30 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +29 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/lessons/capture.d.ts +66 -0
  56. package/dist/lessons/capture.d.ts.map +1 -0
  57. package/dist/lessons/capture.js +166 -0
  58. package/dist/lessons/capture.js.map +1 -0
  59. package/dist/lessons/capture.test.d.ts +2 -0
  60. package/dist/lessons/capture.test.d.ts.map +1 -0
  61. package/dist/lessons/capture.test.js +200 -0
  62. package/dist/lessons/capture.test.js.map +1 -0
  63. package/dist/lessons/decide.d.ts +90 -0
  64. package/dist/lessons/decide.d.ts.map +1 -0
  65. package/dist/lessons/decide.js +334 -0
  66. package/dist/lessons/decide.js.map +1 -0
  67. package/dist/lessons/decide.test.d.ts +2 -0
  68. package/dist/lessons/decide.test.d.ts.map +1 -0
  69. package/dist/lessons/decide.test.js +527 -0
  70. package/dist/lessons/decide.test.js.map +1 -0
  71. package/dist/lessons/id.d.ts +5 -0
  72. package/dist/lessons/id.d.ts.map +1 -0
  73. package/dist/lessons/id.js +20 -0
  74. package/dist/lessons/id.js.map +1 -0
  75. package/dist/lessons/index.d.ts +5 -0
  76. package/dist/lessons/index.d.ts.map +1 -0
  77. package/dist/lessons/index.js +5 -0
  78. package/dist/lessons/index.js.map +1 -0
  79. package/dist/lessons/model.d.ts +163 -0
  80. package/dist/lessons/model.d.ts.map +1 -0
  81. package/dist/lessons/model.js +181 -0
  82. package/dist/lessons/model.js.map +1 -0
  83. package/dist/lessons/model.test.d.ts +2 -0
  84. package/dist/lessons/model.test.d.ts.map +1 -0
  85. package/dist/lessons/model.test.js +178 -0
  86. package/dist/lessons/model.test.js.map +1 -0
  87. package/dist/lessons/permissions.test.d.ts +2 -0
  88. package/dist/lessons/permissions.test.d.ts.map +1 -0
  89. package/dist/lessons/permissions.test.js +88 -0
  90. package/dist/lessons/permissions.test.js.map +1 -0
  91. package/dist/lessons/store.d.ts +74 -0
  92. package/dist/lessons/store.d.ts.map +1 -0
  93. package/dist/lessons/store.js +231 -0
  94. package/dist/lessons/store.js.map +1 -0
  95. package/dist/output-checks.d.ts +64 -0
  96. package/dist/output-checks.d.ts.map +1 -0
  97. package/dist/output-checks.js +248 -0
  98. package/dist/output-checks.js.map +1 -0
  99. package/dist/output-checks.test.d.ts +2 -0
  100. package/dist/output-checks.test.d.ts.map +1 -0
  101. package/dist/output-checks.test.js +58 -0
  102. package/dist/output-checks.test.js.map +1 -0
  103. package/dist/paths.d.ts +37 -0
  104. package/dist/paths.d.ts.map +1 -0
  105. package/dist/paths.js +70 -0
  106. package/dist/paths.js.map +1 -0
  107. package/dist/paths.test.d.ts +2 -0
  108. package/dist/paths.test.d.ts.map +1 -0
  109. package/dist/paths.test.js +36 -0
  110. package/dist/paths.test.js.map +1 -0
  111. package/dist/policies/agi-framing.d.ts +12 -0
  112. package/dist/policies/agi-framing.d.ts.map +1 -0
  113. package/dist/policies/agi-framing.js +33 -0
  114. package/dist/policies/agi-framing.js.map +1 -0
  115. package/dist/policies/anti-anthropomorphism.d.ts +13 -0
  116. package/dist/policies/anti-anthropomorphism.d.ts.map +1 -0
  117. package/dist/policies/anti-anthropomorphism.js +34 -0
  118. package/dist/policies/anti-anthropomorphism.js.map +1 -0
  119. package/dist/policies/anti-dependence.d.ts +12 -0
  120. package/dist/policies/anti-dependence.d.ts.map +1 -0
  121. package/dist/policies/anti-dependence.js +33 -0
  122. package/dist/policies/anti-dependence.js.map +1 -0
  123. package/dist/policies/anti-sycophancy.d.ts +13 -0
  124. package/dist/policies/anti-sycophancy.d.ts.map +1 -0
  125. package/dist/policies/anti-sycophancy.js +34 -0
  126. package/dist/policies/anti-sycophancy.js.map +1 -0
  127. package/dist/policies/dark-pattern.d.ts +14 -0
  128. package/dist/policies/dark-pattern.d.ts.map +1 -0
  129. package/dist/policies/dark-pattern.js +44 -0
  130. package/dist/policies/dark-pattern.js.map +1 -0
  131. package/dist/policies/destructive-needs-approval.d.ts +14 -0
  132. package/dist/policies/destructive-needs-approval.d.ts.map +1 -0
  133. package/dist/policies/destructive-needs-approval.js +31 -0
  134. package/dist/policies/destructive-needs-approval.js.map +1 -0
  135. package/dist/policies/discovery.d.ts +12 -0
  136. package/dist/policies/discovery.d.ts.map +1 -0
  137. package/dist/policies/discovery.js +130 -0
  138. package/dist/policies/discovery.js.map +1 -0
  139. package/dist/policies/high-risk.d.ts +25 -0
  140. package/dist/policies/high-risk.d.ts.map +1 -0
  141. package/dist/policies/high-risk.js +105 -0
  142. package/dist/policies/high-risk.js.map +1 -0
  143. package/dist/policies/human-only-decisions.d.ts +14 -0
  144. package/dist/policies/human-only-decisions.d.ts.map +1 -0
  145. package/dist/policies/human-only-decisions.js +33 -0
  146. package/dist/policies/human-only-decisions.js.map +1 -0
  147. package/dist/policies/index.d.ts +29 -0
  148. package/dist/policies/index.d.ts.map +1 -0
  149. package/dist/policies/index.js +82 -0
  150. package/dist/policies/index.js.map +1 -0
  151. package/dist/policies/no-skip-git-hooks.d.ts +14 -0
  152. package/dist/policies/no-skip-git-hooks.d.ts.map +1 -0
  153. package/dist/policies/no-skip-git-hooks.js +31 -0
  154. package/dist/policies/no-skip-git-hooks.js.map +1 -0
  155. package/dist/policies/package-manager.d.ts +12 -0
  156. package/dist/policies/package-manager.d.ts.map +1 -0
  157. package/dist/policies/package-manager.js +29 -0
  158. package/dist/policies/package-manager.js.map +1 -0
  159. package/dist/policies/patterns.d.ts +17 -0
  160. package/dist/policies/patterns.d.ts.map +1 -0
  161. package/dist/policies/patterns.js +30 -0
  162. package/dist/policies/patterns.js.map +1 -0
  163. package/dist/policies/policies.test.d.ts +2 -0
  164. package/dist/policies/policies.test.d.ts.map +1 -0
  165. package/dist/policies/policies.test.js +210 -0
  166. package/dist/policies/policies.test.js.map +1 -0
  167. package/dist/policies/privacy-transparency.d.ts +14 -0
  168. package/dist/policies/privacy-transparency.d.ts.map +1 -0
  169. package/dist/policies/privacy-transparency.js +50 -0
  170. package/dist/policies/privacy-transparency.js.map +1 -0
  171. package/dist/policies/professional-displacement.d.ts +15 -0
  172. package/dist/policies/professional-displacement.d.ts.map +1 -0
  173. package/dist/policies/professional-displacement.js +45 -0
  174. package/dist/policies/professional-displacement.js.map +1 -0
  175. package/dist/policies/protect-policy.d.ts +14 -0
  176. package/dist/policies/protect-policy.d.ts.map +1 -0
  177. package/dist/policies/protect-policy.js +35 -0
  178. package/dist/policies/protect-policy.js.map +1 -0
  179. package/dist/policies/scope-enforcement.d.ts +14 -0
  180. package/dist/policies/scope-enforcement.d.ts.map +1 -0
  181. package/dist/policies/scope-enforcement.js +34 -0
  182. package/dist/policies/scope-enforcement.js.map +1 -0
  183. package/dist/policies/secret-scan-writes.d.ts +13 -0
  184. package/dist/policies/secret-scan-writes.d.ts.map +1 -0
  185. package/dist/policies/secret-scan-writes.js +38 -0
  186. package/dist/policies/secret-scan-writes.js.map +1 -0
  187. package/dist/policies/selection.d.ts +20 -0
  188. package/dist/policies/selection.d.ts.map +1 -0
  189. package/dist/policies/selection.js +93 -0
  190. package/dist/policies/selection.js.map +1 -0
  191. package/dist/policies/structural-bias.d.ts +14 -0
  192. package/dist/policies/structural-bias.d.ts.map +1 -0
  193. package/dist/policies/structural-bias.js +41 -0
  194. package/dist/policies/structural-bias.js.map +1 -0
  195. package/dist/policies/third-party-impact.d.ts +13 -0
  196. package/dist/policies/third-party-impact.d.ts.map +1 -0
  197. package/dist/policies/third-party-impact.js +38 -0
  198. package/dist/policies/third-party-impact.js.map +1 -0
  199. package/dist/policies/tool-call.d.ts +38 -0
  200. package/dist/policies/tool-call.d.ts.map +1 -0
  201. package/dist/policies/tool-call.js +53 -0
  202. package/dist/policies/tool-call.js.map +1 -0
  203. package/dist/policies/truthfulness-uncertainty.d.ts +13 -0
  204. package/dist/policies/truthfulness-uncertainty.d.ts.map +1 -0
  205. package/dist/policies/truthfulness-uncertainty.js +45 -0
  206. package/dist/policies/truthfulness-uncertainty.js.map +1 -0
  207. package/dist/policies/workspace-writes-only.d.ts +25 -0
  208. package/dist/policies/workspace-writes-only.d.ts.map +1 -0
  209. package/dist/policies/workspace-writes-only.js +54 -0
  210. package/dist/policies/workspace-writes-only.js.map +1 -0
  211. package/dist/policy-engine.d.ts +69 -0
  212. package/dist/policy-engine.d.ts.map +1 -0
  213. package/dist/policy-engine.js +145 -0
  214. package/dist/policy-engine.js.map +1 -0
  215. package/dist/policy-registry.d.ts +62 -0
  216. package/dist/policy-registry.d.ts.map +1 -0
  217. package/dist/policy-registry.js +63 -0
  218. package/dist/policy-registry.js.map +1 -0
  219. package/dist/policy-registry.test.d.ts +2 -0
  220. package/dist/policy-registry.test.d.ts.map +1 -0
  221. package/dist/policy-registry.test.js +79 -0
  222. package/dist/policy-registry.test.js.map +1 -0
  223. package/dist/policy-release.d.ts +44 -0
  224. package/dist/policy-release.d.ts.map +1 -0
  225. package/dist/policy-release.js +65 -0
  226. package/dist/policy-release.js.map +1 -0
  227. package/dist/policy.d.ts +141 -0
  228. package/dist/policy.d.ts.map +1 -0
  229. package/dist/policy.js +22 -0
  230. package/dist/policy.js.map +1 -0
  231. package/dist/quality/audit.d.ts +56 -0
  232. package/dist/quality/audit.d.ts.map +1 -0
  233. package/dist/quality/audit.js +52 -0
  234. package/dist/quality/audit.js.map +1 -0
  235. package/dist/quality/findings.d.ts +34 -0
  236. package/dist/quality/findings.d.ts.map +1 -0
  237. package/dist/quality/findings.js +121 -0
  238. package/dist/quality/findings.js.map +1 -0
  239. package/dist/quality/findings.test.d.ts +2 -0
  240. package/dist/quality/findings.test.d.ts.map +1 -0
  241. package/dist/quality/findings.test.js +79 -0
  242. package/dist/quality/findings.test.js.map +1 -0
  243. package/dist/quality/index.d.ts +20 -0
  244. package/dist/quality/index.d.ts.map +1 -0
  245. package/dist/quality/index.js +20 -0
  246. package/dist/quality/index.js.map +1 -0
  247. package/dist/quality/rule.d.ts +43 -0
  248. package/dist/quality/rule.d.ts.map +1 -0
  249. package/dist/quality/rule.js +162 -0
  250. package/dist/quality/rule.js.map +1 -0
  251. package/dist/quality/rule.test.d.ts +2 -0
  252. package/dist/quality/rule.test.d.ts.map +1 -0
  253. package/dist/quality/rule.test.js +187 -0
  254. package/dist/quality/rule.test.js.map +1 -0
  255. package/dist/quality/tools.d.ts +30 -0
  256. package/dist/quality/tools.d.ts.map +1 -0
  257. package/dist/quality/tools.js +33 -0
  258. package/dist/quality/tools.js.map +1 -0
  259. package/dist/quality/tools.test.d.ts +2 -0
  260. package/dist/quality/tools.test.d.ts.map +1 -0
  261. package/dist/quality/tools.test.js +41 -0
  262. package/dist/quality/tools.test.js.map +1 -0
  263. package/dist/quality/waive.d.ts +37 -0
  264. package/dist/quality/waive.d.ts.map +1 -0
  265. package/dist/quality/waive.js +39 -0
  266. package/dist/quality/waive.js.map +1 -0
  267. package/dist/quality/waivers.d.ts +63 -0
  268. package/dist/quality/waivers.d.ts.map +1 -0
  269. package/dist/quality/waivers.js +132 -0
  270. package/dist/quality/waivers.js.map +1 -0
  271. package/dist/quality/waivers.test.d.ts +2 -0
  272. package/dist/quality/waivers.test.d.ts.map +1 -0
  273. package/dist/quality/waivers.test.js +138 -0
  274. package/dist/quality/waivers.test.js.map +1 -0
  275. package/dist/registry.d.ts +86 -0
  276. package/dist/registry.d.ts.map +1 -0
  277. package/dist/registry.js +92 -0
  278. package/dist/registry.js.map +1 -0
  279. package/dist/registry.test.d.ts +2 -0
  280. package/dist/registry.test.d.ts.map +1 -0
  281. package/dist/registry.test.js +117 -0
  282. package/dist/registry.test.js.map +1 -0
  283. package/dist/rules.d.ts +107 -0
  284. package/dist/rules.d.ts.map +1 -0
  285. package/dist/rules.js +632 -0
  286. package/dist/rules.js.map +1 -0
  287. package/dist/rules.test.d.ts +2 -0
  288. package/dist/rules.test.d.ts.map +1 -0
  289. package/dist/rules.test.js +488 -0
  290. package/dist/rules.test.js.map +1 -0
  291. package/dist/secrets.d.ts +17 -0
  292. package/dist/secrets.d.ts.map +1 -0
  293. package/dist/secrets.js +17 -0
  294. package/dist/secrets.js.map +1 -0
  295. package/dist/secrets.test.d.ts +2 -0
  296. package/dist/secrets.test.d.ts.map +1 -0
  297. package/dist/secrets.test.js +20 -0
  298. package/dist/secrets.test.js.map +1 -0
  299. package/dist/shell-env.d.ts +23 -0
  300. package/dist/shell-env.d.ts.map +1 -0
  301. package/dist/shell-env.js +34 -0
  302. package/dist/shell-env.js.map +1 -0
  303. package/dist/shell-env.test.d.ts +2 -0
  304. package/dist/shell-env.test.d.ts.map +1 -0
  305. package/dist/shell-env.test.js +45 -0
  306. package/dist/shell-env.test.js.map +1 -0
  307. package/package.json +49 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/eval/runner.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,YAAY,EAGlB,MAAM,YAAY,CAAC;AAqDpB,qEAAqE;AACrE,wBAAgB,QAAQ,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOrF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,MAAM,EAAE,CA2BxE;AAED,0EAA0E;AAC1E,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,2BAA2B;AAC3B,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE9D;AAED,2BAA2B;AAC3B,MAAM,MAAM,UAAU,GAAG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AAU,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,GAAG,OAAO,CAAC,eAAe,CAAC,CA+C3B"}
@@ -0,0 +1,616 @@
1
+ import { spawn } from 'node:child_process';
2
+ import { createHash } from 'node:crypto';
3
+ import { constants } from 'node:fs';
4
+ import { chmod, lstat, mkdir, mkdtemp, open, readFile, realpath, rm } from 'node:fs/promises';
5
+ import { tmpdir } from 'node:os';
6
+ import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
7
+ import { isLessonId } from '../lessons/id.js';
8
+ import { isInside, projectName, worktreeRoot } from '../paths.js';
9
+ import { EvalArtifact, ProofError, } from './types.js';
10
+ /**
11
+ * The eval runner.
12
+ *
13
+ * A lesson is only worth applying when something shows it works. The proof
14
+ * is an artifact: a list of scenarios, each a command and what it must show.
15
+ * The runner executes them under four rules, and every one of them is a
16
+ * boundary rather than a preference:
17
+ *
18
+ * - the command is an argv, spawned without a shell;
19
+ * - the child sees only PATH, HOME, TMPDIR and the locale, so a token in the
20
+ * parent's environment never reaches a proof;
21
+ * - the working directory is inside the workspace or an OpenAgentsy worktree,
22
+ * and it is the real path that has to be inside it;
23
+ * - the process is killed at the timeout.
24
+ *
25
+ * The result holds the verdicts and the hashes. It never holds what a
26
+ * scenario printed, because a result is kept and a printout is not.
27
+ */
28
+ /**
29
+ * The environment a proof may see.
30
+ *
31
+ * The list is an allowlist, not a denylist: a variable that is not named
32
+ * here is not in the child's environment at all, so a token that a session
33
+ * happened to hold cannot leak into a proof.
34
+ */
35
+ const ENV_ALLOWLIST = [
36
+ 'PATH',
37
+ 'HOME',
38
+ 'TMPDIR',
39
+ 'LANG',
40
+ 'LANGUAGE',
41
+ 'LC_ALL',
42
+ 'LC_CTYPE',
43
+ 'LC_COLLATE',
44
+ 'LC_MESSAGES',
45
+ 'LC_NUMERIC',
46
+ 'LC_TIME',
47
+ ];
48
+ /**
49
+ * The characters that make a string a shell string.
50
+ *
51
+ * A command that is one element and holds one of these is a shell line that
52
+ * was wrapped in an array, and the runner refuses it rather than run it.
53
+ */
54
+ const SHELL_STRING = /[\s;&|<>`$(){}[\]!*?"'\\]/;
55
+ /** The most of a run's output the runner keeps, per stream. */
56
+ const MAX_CAPTURE_BYTES = 1024 * 1024;
57
+ /** The environment a proof gets: the allowlist, and nothing else. */
58
+ export function childEnv(env = process.env) {
59
+ const out = {};
60
+ for (const key of ENV_ALLOWLIST) {
61
+ const value = env[key];
62
+ if (value !== undefined)
63
+ out[key] = value;
64
+ }
65
+ return out;
66
+ }
67
+ /**
68
+ * The command, checked.
69
+ *
70
+ * The schema already holds an array, and this says why: a string is a shell
71
+ * line, and a shell line is a program the runner does not choose.
72
+ */
73
+ export function assertArgv(command) {
74
+ if (!Array.isArray(command) || command.length === 0) {
75
+ throw new ProofError('the command must be an argv array', 'write the program and its arguments as separate elements, never as one shell string');
76
+ }
77
+ for (const part of command) {
78
+ if (typeof part !== 'string' || part.length === 0) {
79
+ throw new ProofError('every element of the command must be a non-empty string', 'write the program and its arguments as separate elements, never as one shell string');
80
+ }
81
+ if (part.includes('\n')) {
82
+ throw new ProofError('an argument holds a newline', 'a newline in an argument is a shell line in disguise; pass the argument as one element without it');
83
+ }
84
+ }
85
+ if (command.length === 1 && SHELL_STRING.test(command[0])) {
86
+ throw new ProofError('the command looks like a shell string', 'write the program and its arguments as separate elements, never as one shell string');
87
+ }
88
+ }
89
+ /** The hash of a command, so a result can name it without carrying it. */
90
+ export function hashOf(text) {
91
+ return createHash('sha256').update(text).digest('hex');
92
+ }
93
+ /** The hash of an argv. */
94
+ export function commandHash(command) {
95
+ return hashOf(JSON.stringify(command));
96
+ }
97
+ /**
98
+ * Kill the process and everything it started.
99
+ *
100
+ * The child is its own process group, so the group is what dies: a proof that
101
+ * starts a server must not leave the server behind at the timeout.
102
+ */
103
+ function killGroup(child) {
104
+ const pid = child.pid;
105
+ if (pid === undefined) {
106
+ child.kill('SIGKILL');
107
+ return;
108
+ }
109
+ try {
110
+ process.kill(-pid, 'SIGKILL');
111
+ }
112
+ catch {
113
+ child.kill('SIGKILL');
114
+ }
115
+ }
116
+ /**
117
+ * Run one command.
118
+ *
119
+ * The spawn has no shell, the environment is the allowlist, and the timeout
120
+ * kills the group. The output is kept in memory for the assertions and is
121
+ * never written anywhere.
122
+ */
123
+ export function runCommand(command, cwd, timeoutMs) {
124
+ assertArgv(command);
125
+ return new Promise((resolveOutcome) => {
126
+ const child = spawn(command[0], command.slice(1), {
127
+ cwd,
128
+ env: childEnv(),
129
+ shell: false,
130
+ detached: true,
131
+ stdio: ['ignore', 'pipe', 'pipe'],
132
+ });
133
+ let stdout = '';
134
+ let stderr = '';
135
+ let timedOut = false;
136
+ let settled = false;
137
+ const timer = setTimeout(() => {
138
+ timedOut = true;
139
+ killGroup(child);
140
+ }, timeoutMs);
141
+ const finish = (outcome) => {
142
+ if (settled)
143
+ return;
144
+ settled = true;
145
+ clearTimeout(timer);
146
+ resolveOutcome(outcome);
147
+ };
148
+ child.stdout?.on('data', (chunk) => {
149
+ if (stdout.length < MAX_CAPTURE_BYTES)
150
+ stdout += chunk.toString('utf8');
151
+ });
152
+ child.stderr?.on('data', (chunk) => {
153
+ if (stderr.length < MAX_CAPTURE_BYTES)
154
+ stderr += chunk.toString('utf8');
155
+ });
156
+ child.on('error', (error) => {
157
+ finish({ exitCode: null, timedOut, stdout, stderr: `${stderr}${error.message}` });
158
+ });
159
+ child.on('close', (code) => {
160
+ finish({ exitCode: code, timedOut, stdout, stderr });
161
+ });
162
+ });
163
+ }
164
+ /**
165
+ * The verdicts of one scenario.
166
+ *
167
+ * A scenario that only names an exit code does not care what was printed, so
168
+ * only the named assertions are recorded. The spawn itself is always one:
169
+ * a command that could not start has not passed.
170
+ */
171
+ export function assertionsOf(scenario, outcome) {
172
+ const assertions = {
173
+ spawned: outcome.exitCode !== null || outcome.timedOut,
174
+ };
175
+ const expect = scenario.expect;
176
+ if (expect.exit_code !== undefined) {
177
+ assertions['exit_code'] = outcome.exitCode === expect.exit_code;
178
+ }
179
+ (expect.stdout_includes ?? []).forEach((needle, index) => {
180
+ assertions[`stdout_includes[${index}]`] = outcome.stdout.includes(needle);
181
+ });
182
+ (expect.stdout_excludes ?? []).forEach((needle, index) => {
183
+ assertions[`stdout_excludes[${index}]`] = !outcome.stdout.includes(needle);
184
+ });
185
+ (expect.stderr_includes ?? []).forEach((needle, index) => {
186
+ assertions[`stderr_includes[${index}]`] = outcome.stderr.includes(needle);
187
+ });
188
+ (expect.stderr_excludes ?? []).forEach((needle, index) => {
189
+ assertions[`stderr_excludes[${index}]`] = !outcome.stderr.includes(needle);
190
+ });
191
+ return assertions;
192
+ }
193
+ /** Whether every assertion held. */
194
+ export function allPassed(assertions) {
195
+ return Object.values(assertions).every((value) => value === true);
196
+ }
197
+ /**
198
+ * The directory the results live in.
199
+ */
200
+ export function evalResultsDir(stateRoot) {
201
+ return join(stateRoot, '.openagentsy', 'lessons', 'evals');
202
+ }
203
+ /**
204
+ * The path a result is written to.
205
+ *
206
+ * The lesson id names the file, so it is checked before it names anything:
207
+ * an id that is really a path would write the result outside the directory
208
+ * the results belong in.
209
+ */
210
+ export function evalResultPath(stateRoot, lessonId, at) {
211
+ if (!isLessonId(lessonId)) {
212
+ throw new ProofError(`"${lessonId}" is not a lesson id`, 'a lesson id looks like oa-lesson-abcd1234');
213
+ }
214
+ const dir = evalResultsDir(stateRoot);
215
+ const stamp = at.toISOString().replace(/[:.]/g, '-');
216
+ const path = join(dir, `${lessonId}-${stamp}.json`);
217
+ if (!isInside(path, [dir])) {
218
+ throw new ProofError('the result path leaves the evaluations directory', 'a result belongs to the lesson it is about, and the lesson id is not a path');
219
+ }
220
+ return path;
221
+ }
222
+ /**
223
+ * Refuse a state path that is a symlink.
224
+ *
225
+ * The result is written under the state root, and every part of that path
226
+ * has to be a real directory: a symlinked `.openagentsy` or `lessons` would
227
+ * put the result somewhere else entirely, and the runner cannot know where.
228
+ */
229
+ async function assertRealStatePath(stateRoot, dir) {
230
+ const rest = relative(stateRoot, dir);
231
+ if (rest.startsWith('..')) {
232
+ throw new ProofError('the results directory is not under the state root', 'a result belongs to the project it was run in');
233
+ }
234
+ const realRoot = await realpath(stateRoot);
235
+ let current = realRoot;
236
+ for (const segment of rest.split('/').filter((part) => part.length > 0)) {
237
+ current = join(current, segment);
238
+ let info;
239
+ try {
240
+ info = await lstat(current);
241
+ }
242
+ catch {
243
+ return;
244
+ }
245
+ if (info.isSymbolicLink()) {
246
+ throw new ProofError(`the state path ${current} is a symlink`, 'the runner refuses to write a result through a symlink');
247
+ }
248
+ }
249
+ }
250
+ /**
251
+ * Write a result.
252
+ *
253
+ * The mode is 0600, because a result says what a proof did in a project and
254
+ * nobody else has a reason to read it. The file is opened with
255
+ * O_NOFOLLOW, so a symlink at the path is not followed, and with O_EXCL, so
256
+ * an existing file is never replaced: a result is evidence and evidence is
257
+ * not overwritten.
258
+ */
259
+ export async function writeEvalResult(path, result, stateRoot) {
260
+ const dir = dirname(path);
261
+ await assertRealStatePath(stateRoot, dir);
262
+ await mkdir(dir, { recursive: true });
263
+ const realRoot = await realpath(stateRoot);
264
+ const realDir = await realpath(dir);
265
+ if (!isInside(realDir, [join(realRoot, '.openagentsy')])) {
266
+ throw new ProofError('the results directory is not inside the state root', 'the runner refuses to write a result outside the state root');
267
+ }
268
+ let target = path;
269
+ let counter = 1;
270
+ while (await exists(target)) {
271
+ const info = await lstat(target);
272
+ if (info.isSymbolicLink()) {
273
+ throw new ProofError('the result path is a symlink', 'the runner refuses to write a result through a symlink');
274
+ }
275
+ counter += 1;
276
+ target = path.replace(/\.json$/, '').concat(`-${counter}.json`);
277
+ }
278
+ const handle = await open(target, constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY | constants.O_NOFOLLOW, 0o600);
279
+ try {
280
+ await handle.writeFile(`${JSON.stringify(result, null, 2)}\n`, 'utf8');
281
+ }
282
+ finally {
283
+ await handle.close();
284
+ }
285
+ await chmod(target, 0o600);
286
+ return target;
287
+ }
288
+ /**
289
+ * Whether a path is there.
290
+ */
291
+ async function exists(path) {
292
+ try {
293
+ await lstat(path);
294
+ return true;
295
+ }
296
+ catch {
297
+ return false;
298
+ }
299
+ }
300
+ /**
301
+ * Check that the verdicts agree with the assertions.
302
+ *
303
+ * The result is recomputed from the assertions and compared with what was
304
+ * recorded. A result that disagrees with its own evidence is not written,
305
+ * because a proof nobody can reconcile is not a proof.
306
+ */
307
+ export function assertConsistent(result) {
308
+ if (!Array.isArray(result.scenarios) || result.scenarios.length === 0) {
309
+ throw new ProofError('the result carries no scenario', 'a result has to hold the scenarios that ran; a result with none was never run');
310
+ }
311
+ for (const scenario of result.scenarios) {
312
+ if (allPassed(scenario.assertions) !== scenario.passed) {
313
+ throw new ProofError('a scenario verdict disagrees with its assertions', 'the result was not written; the run and the assertions must be computed the same way');
314
+ }
315
+ }
316
+ if (result.scenarios.every((scenario) => scenario.passed) !== result.passed) {
317
+ throw new ProofError('the run verdict disagrees with the scenario verdicts', 'the result was not written; the run and the scenarios must be computed the same way');
318
+ }
319
+ }
320
+ /**
321
+ * The roots a working directory may sit in.
322
+ *
323
+ * The workspace, the OpenAgentsy worktrees of the same project, and whatever
324
+ * the caller adds.
325
+ */
326
+ export function allowedRoots(options) {
327
+ const roots = [options.workspace, worktreeRoot(projectName(options.workspace))];
328
+ return [...roots, ...(options.allowedRoots ?? [])];
329
+ }
330
+ /**
331
+ * The real path of a root, or the root itself when it is not there.
332
+ */
333
+ async function realPathOrSelf(path) {
334
+ try {
335
+ return await realpath(path);
336
+ }
337
+ catch {
338
+ return path;
339
+ }
340
+ }
341
+ /**
342
+ * The working directory of a scenario, checked.
343
+ *
344
+ * A relative one resolves against the base and has to land inside one of the
345
+ * roots. An absolute one has to land inside one of them as well, so a proof
346
+ * cannot ask for `/etc` or for a directory that only looks close.
347
+ *
348
+ * The check is made on the real paths, because a link inside the workspace
349
+ * can point out of it: a scenario that names a link would otherwise run
350
+ * somewhere the workspace does not cover.
351
+ */
352
+ export async function resolveScenarioCwd(scenario, base, roots) {
353
+ const cwd = isAbsolute(scenario.cwd) ? resolve(scenario.cwd) : resolve(base, scenario.cwd);
354
+ if (!isInside(cwd, roots)) {
355
+ throw new ProofError(`the working directory of the scenario ${scenario.id} is outside the workspace`, 'point the scenario at a directory inside the workspace or an OpenAgentsy worktree');
356
+ }
357
+ let realCwd;
358
+ try {
359
+ realCwd = await realpath(cwd);
360
+ }
361
+ catch {
362
+ throw new ProofError(`the working directory of the scenario ${scenario.id} does not exist`, 'point the scenario at a directory that is there');
363
+ }
364
+ const realRoots = await Promise.all(roots.map(realPathOrSelf));
365
+ if (!isInside(realCwd, realRoots)) {
366
+ throw new ProofError(`the working directory of the scenario ${scenario.id} leaves the workspace through a symlink`, 'point the scenario at a real directory inside the workspace or an OpenAgentsy worktree');
367
+ }
368
+ return realCwd;
369
+ }
370
+ /**
371
+ * The artifact, read and checked.
372
+ *
373
+ * The schema is the contract: an artifact that does not match it is not a
374
+ * proof, and the issues say what is wrong with it.
375
+ */
376
+ function parseArtifact(text) {
377
+ let parsedJson;
378
+ try {
379
+ parsedJson = JSON.parse(text);
380
+ }
381
+ catch (error) {
382
+ throw new ProofError('the eval artifact is not JSON', error instanceof Error ? error.message : 'the proof is malformed');
383
+ }
384
+ const parsed = EvalArtifact.safeParse(parsedJson);
385
+ if (!parsed.success) {
386
+ throw new ProofError('the eval artifact does not match the schema', parsed.error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; '));
387
+ }
388
+ return parsed.data;
389
+ }
390
+ /**
391
+ * The artifact, read and checked.
392
+ *
393
+ * The schema is the contract: an artifact that does not match it is not a
394
+ * proof, and the issues say what is wrong with it.
395
+ */
396
+ export async function readArtifact(path) {
397
+ let text;
398
+ try {
399
+ text = await readFile(path, 'utf8');
400
+ }
401
+ catch (error) {
402
+ throw new ProofError('the eval artifact could not be read', error instanceof Error ? error.message : 'the proof is missing');
403
+ }
404
+ return parseArtifact(text);
405
+ }
406
+ /**
407
+ * Run an artifact and write the result.
408
+ *
409
+ * The result is written whatever the verdicts are: a failing run is the
410
+ * evidence that a lesson is not real, and it is worth keeping.
411
+ */
412
+ export async function runEvalArtifact(options) {
413
+ const now = options.now ?? (() => new Date());
414
+ const startedAt = now();
415
+ let text;
416
+ try {
417
+ text = await readFile(options.artifactPath, 'utf8');
418
+ }
419
+ catch (error) {
420
+ throw new ProofError('the eval artifact could not be read', error instanceof Error ? error.message : 'the proof is missing');
421
+ }
422
+ const artifact = parseArtifact(text);
423
+ const lessonId = options.lessonId ?? artifact.lesson_id;
424
+ if (!isLessonId(lessonId)) {
425
+ throw new ProofError(`"${lessonId}" is not a lesson id`, 'a lesson id looks like oa-lesson-abcd1234');
426
+ }
427
+ const base = options.base ?? dirname(resolve(options.artifactPath));
428
+ const roots = allowedRoots(options);
429
+ const scenarios = [];
430
+ for (const scenario of artifact.scenarios) {
431
+ const cwd = await resolveScenarioCwd(scenario, base, roots);
432
+ const before = now();
433
+ const outcome = await runCommand(scenario.command, cwd, scenario.timeout_ms);
434
+ const after = now();
435
+ const assertions = assertionsOf(scenario, outcome);
436
+ scenarios.push({
437
+ id: scenario.id,
438
+ phase: scenario.phase,
439
+ command_sha256: commandHash(scenario.command),
440
+ exit_code: outcome.exitCode,
441
+ timed_out: outcome.timedOut,
442
+ duration_ms: Math.max(0, after.getTime() - before.getTime()),
443
+ assertions,
444
+ passed: allPassed(assertions),
445
+ });
446
+ }
447
+ const result = {
448
+ schema_version: '1',
449
+ lesson_id: lessonId,
450
+ artifact_sha256: hashOf(text),
451
+ started_at: startedAt.toISOString(),
452
+ finished_at: now().toISOString(),
453
+ passed: scenarios.every((scenario) => scenario.passed),
454
+ runs: 1,
455
+ scenarios,
456
+ };
457
+ assertConsistent(result);
458
+ const stateRoot = options.stateRoot ?? options.workspace;
459
+ const path = evalResultPath(stateRoot, lessonId, startedAt);
460
+ await writeEvalResult(path, result, stateRoot);
461
+ return result;
462
+ }
463
+ /**
464
+ * The git settings that keep a throwaway commit unsigned.
465
+ *
466
+ * The machine's own config may sign every commit, and the signing agent is
467
+ * not in the environment a child gets: the commit then fails, and the run
468
+ * fails with it (measured 2026-10-27: the 1Password agent was not reachable
469
+ * from the narrow environment, the commit was refused, and the worktree
470
+ * that followed it was made from a HEAD that did not exist). A throwaway
471
+ * commit buys nothing from a signature, so the runner turns the signing off
472
+ * on the git commands it spawns. The setting is on the command and not in
473
+ * the environment, because the environment stays narrow.
474
+ */
475
+ const GIT_NO_SIGN = ['-c', 'commit.gpgsign=false'];
476
+ /**
477
+ * The argv of a git command, with the runner's own settings in front of it.
478
+ *
479
+ * A git option only counts before the subcommand it belongs to, so the
480
+ * settings come first.
481
+ */
482
+ export function gitCommand(args) {
483
+ return ['git', ...GIT_NO_SIGN, ...args];
484
+ }
485
+ /**
486
+ * Run a git command and wait for it.
487
+ *
488
+ * The worktree is made with git, so git is run with an argv and with the
489
+ * same narrow environment a proof gets. The command carries the runner's own
490
+ * settings, so a git that signs every commit does not decide whether the
491
+ * runner's work happens.
492
+ */
493
+ async function git(cwd, args) {
494
+ const outcome = await runCommand(gitCommand(args), cwd, 60_000);
495
+ if (outcome.exitCode !== 0) {
496
+ throw new ProofError(`git ${args[0] ?? ''} failed`, outcome.stderr.trim() === '' ? 'the worktree could not be made' : outcome.stderr.trim());
497
+ }
498
+ }
499
+ /**
500
+ * Take the worktree and the directory it was made in back.
501
+ *
502
+ * A cleanup that fails is reported, because a directory left behind holds a
503
+ * whole checkout of the project.
504
+ */
505
+ async function removeWorktree(repo, worktree, dir, added) {
506
+ const problems = [];
507
+ if (added) {
508
+ try {
509
+ await git(repo, ['worktree', 'remove', '--force', worktree]);
510
+ }
511
+ catch (error) {
512
+ problems.push(error instanceof Error ? error.message : String(error));
513
+ }
514
+ }
515
+ try {
516
+ await rm(dir, { recursive: true, force: true });
517
+ }
518
+ catch (error) {
519
+ problems.push(error instanceof Error ? error.message : String(error));
520
+ }
521
+ return problems.length === 0 ? undefined : problems.join('; ');
522
+ }
523
+ /**
524
+ * A temporary worktree, and what to do in it.
525
+ *
526
+ * The worktree is where the candidate change is applied: the baseline
527
+ * scenario has to fail on the current owner and pass with the change, and
528
+ * the change lives in a commit, so the commit is checked out apart from the
529
+ * tree that is being worked in.
530
+ *
531
+ * The directory is made before the worktree is added, so the cleanup has to
532
+ * run whether the add worked or not: a directory left behind holds a
533
+ * checkout of the project.
534
+ */
535
+ export async function withTemporaryWorktree(options) {
536
+ const dir = await mkdtemp(join(tmpdir(), 'openagentsy-lesson-'));
537
+ const worktree = join(dir, 'worktree');
538
+ let added = false;
539
+ let cleaned = false;
540
+ const cleanup = async () => {
541
+ if (cleaned)
542
+ return undefined;
543
+ cleaned = true;
544
+ return removeWorktree(options.repo, worktree, dir, added);
545
+ };
546
+ try {
547
+ await git(options.repo, ['worktree', 'add', '--detach', worktree, options.ref]);
548
+ added = true;
549
+ const result = await options.run(worktree);
550
+ const problem = await cleanup();
551
+ if (problem !== undefined) {
552
+ throw new ProofError('the temporary worktree could not be removed', `the directory ${dir} is still there: ${problem}`);
553
+ }
554
+ return result;
555
+ }
556
+ catch (error) {
557
+ const problem = await cleanup();
558
+ const message = error instanceof Error ? error.message : String(error);
559
+ if (problem !== undefined) {
560
+ throw new ProofError(message, `the temporary worktree could not be removed either: ${problem}`);
561
+ }
562
+ throw error instanceof Error ? error : new Error(message);
563
+ }
564
+ }
565
+ /**
566
+ * Reproduce the baseline.
567
+ *
568
+ * The baseline scenario has to fail on the current owner and pass with the
569
+ * change applied in a temporary worktree. A baseline that passes on the
570
+ * current owner proves nothing: the behaviour was already there.
571
+ */
572
+ export async function reproduceBaseline(options) {
573
+ const text = await readFile(options.artifactPath, 'utf8');
574
+ const artifact = parseArtifact(text);
575
+ const baselines = artifact.scenarios.filter((scenario) => scenario.phase === 'baseline');
576
+ if (baselines.length === 0) {
577
+ return {
578
+ baseline_failed: false,
579
+ with_change_passed: false,
580
+ passed: false,
581
+ reason: 'the artifact has no baseline scenario, so the baseline cannot be reproduced',
582
+ };
583
+ }
584
+ const before = await runEvalArtifact({
585
+ artifactPath: options.artifactPath,
586
+ workspace: options.workspace,
587
+ ...(options.lessonId === undefined ? {} : { lessonId: options.lessonId }),
588
+ ...(options.now === undefined ? {} : { now: options.now }),
589
+ });
590
+ const baselineFailed = before.scenarios
591
+ .filter((scenario) => scenario.phase === 'baseline')
592
+ .every((scenario) => !scenario.passed);
593
+ const withChange = await withTemporaryWorktree({
594
+ repo: options.repo,
595
+ ref: options.changeRef,
596
+ run: async (worktree) => runEvalArtifact({
597
+ artifactPath: options.artifactPath,
598
+ workspace: options.workspace,
599
+ base: worktree,
600
+ allowedRoots: [worktree],
601
+ ...(options.lessonId === undefined ? {} : { lessonId: options.lessonId }),
602
+ ...(options.now === undefined ? {} : { now: options.now }),
603
+ }),
604
+ });
605
+ const changePassed = withChange.scenarios
606
+ .filter((scenario) => scenario.phase === 'baseline')
607
+ .every((scenario) => scenario.passed);
608
+ return {
609
+ baseline_failed: baselineFailed,
610
+ with_change_passed: changePassed,
611
+ passed: baselineFailed && changePassed,
612
+ before,
613
+ after: withChange,
614
+ };
615
+ }
616
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/eval/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,Q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