approval-md 0.1.0 → 0.3.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 (416) hide show
  1. package/README.md +629 -559
  2. package/SPEC.md +99 -24
  3. package/dist/src/adapters/agentmail.d.ts +426 -0
  4. package/dist/src/adapters/agentmail.js +2 -2
  5. package/dist/src/adapters/conformance.d.ts +149 -0
  6. package/dist/src/adapters/contract.d.ts +628 -0
  7. package/dist/src/adapters/contract.js +110 -16
  8. package/dist/src/adapters/contract.js.map +1 -1
  9. package/dist/src/adapters/email.d.ts +324 -0
  10. package/dist/src/adapters/env-passphrase.d.ts +93 -0
  11. package/dist/src/adapters/public.d.ts +11 -0
  12. package/dist/src/adapters/public.js +11 -0
  13. package/dist/src/adapters/public.js.map +1 -0
  14. package/dist/src/adapters/registry.d.ts +59 -0
  15. package/dist/src/adapters/registry.js +2 -1
  16. package/dist/src/adapters/registry.js.map +1 -1
  17. package/dist/src/adapters/smtp.d.ts +213 -0
  18. package/dist/src/adapters/vault-provider.d.ts +114 -0
  19. package/dist/src/adapters/vault-provider.js +3 -3
  20. package/dist/src/adapters/zzz.d.ts +66 -0
  21. package/dist/src/adapters/zzz.js +299 -0
  22. package/dist/src/adapters/zzz.js.map +1 -0
  23. package/dist/src/channels/batch.d.ts +109 -0
  24. package/dist/src/channels/cli.d.ts +193 -0
  25. package/dist/src/channels/conformance.d.ts +92 -0
  26. package/dist/src/channels/contract.d.ts +656 -0
  27. package/dist/src/channels/contract.js +200 -7
  28. package/dist/src/channels/contract.js.map +1 -1
  29. package/dist/src/channels/payload-view.d.ts +35 -0
  30. package/dist/src/channels/render-queue.d.ts +149 -0
  31. package/dist/src/channels/tagging.d.ts +196 -0
  32. package/dist/src/channels/telegram.d.ts +1944 -0
  33. package/dist/src/channels/telegram.js +218 -23
  34. package/dist/src/channels/telegram.js.map +1 -1
  35. package/dist/src/channels/web.d.ts +350 -0
  36. package/dist/src/channels/web.js +17 -0
  37. package/dist/src/channels/web.js.map +1 -1
  38. package/dist/src/cli/adapter.d.ts +90 -0
  39. package/dist/src/cli/adapter.js +25 -15
  40. package/dist/src/cli/adapter.js.map +1 -1
  41. package/dist/src/cli/amend.d.ts +59 -0
  42. package/dist/src/cli/amend.js +214 -30
  43. package/dist/src/cli/amend.js.map +1 -1
  44. package/dist/src/cli/args.d.ts +43 -0
  45. package/dist/src/cli/attest.d.ts +50 -0
  46. package/dist/src/cli/attest.js +134 -7
  47. package/dist/src/cli/attest.js.map +1 -1
  48. package/dist/src/cli/audit-card.d.ts +62 -0
  49. package/dist/src/cli/audit.d.ts +59 -0
  50. package/dist/src/cli/channel-telegram.d.ts +879 -0
  51. package/dist/src/cli/channel-telegram.js +311 -13
  52. package/dist/src/cli/channel-telegram.js.map +1 -1
  53. package/dist/src/cli/channel-web.d.ts +131 -0
  54. package/dist/src/cli/channel.d.ts +80 -0
  55. package/dist/src/cli/channel.js +9 -0
  56. package/dist/src/cli/channel.js.map +1 -1
  57. package/dist/src/cli/checkpoint-tap.d.ts +169 -0
  58. package/dist/src/cli/codex-bridge.d.ts +819 -0
  59. package/dist/src/cli/codex-bridge.js +1607 -0
  60. package/dist/src/cli/codex-bridge.js.map +1 -0
  61. package/dist/src/cli/codex.d.ts +2 -0
  62. package/dist/src/cli/codex.js +469 -0
  63. package/dist/src/cli/codex.js.map +1 -0
  64. package/dist/src/cli/coverage.d.ts +61 -0
  65. package/dist/src/cli/daemon.d.ts +120 -0
  66. package/dist/src/cli/daemon.js +4 -1
  67. package/dist/src/cli/daemon.js.map +1 -1
  68. package/dist/src/cli/doctor.d.ts +129 -0
  69. package/dist/src/cli/doctor.js +586 -17
  70. package/dist/src/cli/doctor.js.map +1 -1
  71. package/dist/src/cli/env.d.ts +65 -0
  72. package/dist/src/cli/execute.d.ts +202 -0
  73. package/dist/src/cli/execute.js +25 -2
  74. package/dist/src/cli/execute.js.map +1 -1
  75. package/dist/src/cli/exit-codes.d.ts +73 -0
  76. package/dist/src/cli/feedback.d.ts +60 -0
  77. package/dist/src/cli/gate-window.d.ts +40 -0
  78. package/dist/src/cli/gate.d.ts +68 -0
  79. package/dist/src/cli/git-scope.d.ts +190 -0
  80. package/dist/src/cli/gloss-attach.d.ts +85 -0
  81. package/dist/src/cli/gloss-codex-child.d.ts +9 -0
  82. package/dist/src/cli/gloss-codex.d.ts +24 -0
  83. package/dist/src/cli/gloss-options.d.ts +42 -0
  84. package/dist/src/cli/gloss.d.ts +265 -0
  85. package/dist/src/cli/help.d.ts +107 -0
  86. package/dist/src/cli/help.js +320 -93
  87. package/dist/src/cli/help.js.map +1 -1
  88. package/dist/src/cli/hook-codex.d.ts +126 -0
  89. package/dist/src/cli/hook-codex.js +226 -0
  90. package/dist/src/cli/hook-codex.js.map +1 -0
  91. package/dist/src/cli/hook.d.ts +787 -0
  92. package/dist/src/cli/hook.js +1235 -181
  93. package/dist/src/cli/hook.js.map +1 -1
  94. package/dist/src/cli/import.d.ts +35 -0
  95. package/dist/src/cli/import.js +1 -1
  96. package/dist/src/cli/import.js.map +1 -1
  97. package/dist/src/cli/init.d.ts +84 -0
  98. package/dist/src/cli/init.js +2 -2
  99. package/dist/src/cli/init.js.map +1 -1
  100. package/dist/src/cli/instructions.d.ts +23 -0
  101. package/dist/src/cli/journal.d.ts +41 -0
  102. package/dist/src/cli/log-advance.d.ts +287 -0
  103. package/dist/src/cli/log-advance.js +102 -11
  104. package/dist/src/cli/log-advance.js.map +1 -1
  105. package/dist/src/cli/log-anchor.d.ts +176 -0
  106. package/dist/src/cli/log-checkpoint.d.ts +22 -0
  107. package/dist/src/cli/log-sync.d.ts +243 -0
  108. package/dist/src/cli/log-verbs.d.ts +16 -0
  109. package/dist/src/cli/log-verbs.js +7 -1
  110. package/dist/src/cli/log-verbs.js.map +1 -1
  111. package/dist/src/cli/long-help.d.ts +70 -0
  112. package/dist/src/cli/main.d.ts +77 -0
  113. package/dist/src/cli/main.js +159 -7
  114. package/dist/src/cli/main.js.map +1 -1
  115. package/dist/src/cli/mcp.d.ts +52 -0
  116. package/dist/src/cli/paths.d.ts +56 -0
  117. package/dist/src/cli/payload.d.ts +58 -0
  118. package/dist/src/cli/policy-apply.d.ts +195 -0
  119. package/dist/src/cli/policy-apply.js +573 -0
  120. package/dist/src/cli/policy-apply.js.map +1 -0
  121. package/dist/src/cli/policy.d.ts +43 -0
  122. package/dist/src/cli/policy.js +14 -1
  123. package/dist/src/cli/policy.js.map +1 -1
  124. package/dist/src/cli/preflight.d.ts +501 -0
  125. package/dist/src/cli/preflight.js +689 -45
  126. package/dist/src/cli/preflight.js.map +1 -1
  127. package/dist/src/cli/progress.d.ts +78 -0
  128. package/dist/src/cli/prompt.d.ts +209 -0
  129. package/dist/src/cli/quickstart.d.ts +46 -0
  130. package/dist/src/cli/quickstart.js +297 -0
  131. package/dist/src/cli/quickstart.js.map +1 -0
  132. package/dist/src/cli/records.d.ts +34 -0
  133. package/dist/src/cli/render.d.ts +22 -0
  134. package/dist/src/cli/sandbox.d.ts +51 -0
  135. package/dist/src/cli/sandbox.js +17 -1
  136. package/dist/src/cli/sandbox.js.map +1 -1
  137. package/dist/src/cli/scaffold.d.ts +79 -0
  138. package/dist/src/cli/scaffold.js +1 -1
  139. package/dist/src/cli/setup-adapter.d.ts +137 -0
  140. package/dist/src/cli/setup-adapter.js +38 -4
  141. package/dist/src/cli/setup-adapter.js.map +1 -1
  142. package/dist/src/cli/setup-channel.d.ts +126 -0
  143. package/dist/src/cli/setup-channel.js +28 -1
  144. package/dist/src/cli/setup-channel.js.map +1 -1
  145. package/dist/src/cli/setup-checkpoint.d.ts +57 -0
  146. package/dist/src/cli/setup-common.d.ts +277 -0
  147. package/dist/src/cli/setup-common.js +3 -2
  148. package/dist/src/cli/setup-common.js.map +1 -1
  149. package/dist/src/cli/setup-flow.d.ts +287 -0
  150. package/dist/src/cli/setup-service.d.ts +96 -0
  151. package/dist/src/cli/setup.d.ts +204 -0
  152. package/dist/src/cli/setup.js +94 -2
  153. package/dist/src/cli/setup.js.map +1 -1
  154. package/dist/src/cli/style.d.ts +320 -0
  155. package/dist/src/cli/token.d.ts +39 -0
  156. package/dist/src/cli/up.d.ts +155 -0
  157. package/dist/src/cli/up.js +119 -53
  158. package/dist/src/cli/up.js.map +1 -1
  159. package/dist/src/cli/usage.d.ts +37 -0
  160. package/dist/src/cli/values.d.ts +40 -0
  161. package/dist/src/cli/values.js +3 -4
  162. package/dist/src/cli/values.js.map +1 -1
  163. package/dist/src/cli/vault.d.ts +59 -0
  164. package/dist/src/cli/vault.js +2 -2
  165. package/dist/src/cli/vault.js.map +1 -1
  166. package/dist/src/cli/verb-registry.d.ts +76 -0
  167. package/dist/src/cli/verb-registry.js +344 -11
  168. package/dist/src/cli/verb-registry.js.map +1 -1
  169. package/dist/src/cli/wordmark.d.ts +31 -0
  170. package/dist/src/cli/wordmark.js +2 -2
  171. package/dist/src/codex/broker.d.ts +229 -0
  172. package/dist/src/codex/broker.js +548 -0
  173. package/dist/src/codex/broker.js.map +1 -0
  174. package/dist/src/codex/doctor.d.ts +13 -0
  175. package/dist/src/codex/doctor.js +41 -0
  176. package/dist/src/codex/doctor.js.map +1 -0
  177. package/dist/src/codex/manifest.d.ts +49 -0
  178. package/dist/src/codex/manifest.js +103 -0
  179. package/dist/src/codex/manifest.js.map +1 -0
  180. package/dist/src/codex/runner.d.ts +178 -0
  181. package/dist/src/codex/runner.js +231 -0
  182. package/dist/src/codex/runner.js.map +1 -0
  183. package/dist/src/codex/serve.d.ts +56 -0
  184. package/dist/src/codex/serve.js +98 -0
  185. package/dist/src/codex/serve.js.map +1 -0
  186. package/dist/src/codex/templates.d.ts +41 -0
  187. package/dist/src/codex/templates.js +319 -0
  188. package/dist/src/codex/templates.js.map +1 -0
  189. package/dist/src/codex/trust.d.ts +19 -0
  190. package/dist/src/codex/trust.js +183 -0
  191. package/dist/src/codex/trust.js.map +1 -0
  192. package/dist/src/codex/workspace-commit.d.ts +219 -0
  193. package/dist/src/codex/workspace-commit.js +549 -0
  194. package/dist/src/codex/workspace-commit.js.map +1 -0
  195. package/dist/src/codex/workspace-plan.d.ts +131 -0
  196. package/dist/src/codex/workspace-plan.js +561 -0
  197. package/dist/src/codex/workspace-plan.js.map +1 -0
  198. package/dist/src/core/actor.d.ts +2 -0
  199. package/dist/src/core/actor.js +5 -0
  200. package/dist/src/core/actor.js.map +1 -0
  201. package/dist/src/core/advance-cycle.d.ts +221 -0
  202. package/dist/src/core/advance-cycle.js +66 -2
  203. package/dist/src/core/advance-cycle.js.map +1 -1
  204. package/dist/src/core/agents-md.d.ts +278 -0
  205. package/dist/src/core/agents-md.js +33 -31
  206. package/dist/src/core/agents-md.js.map +1 -1
  207. package/dist/src/core/apply-patch.d.ts +49 -0
  208. package/dist/src/core/apply-patch.js +266 -0
  209. package/dist/src/core/apply-patch.js.map +1 -0
  210. package/dist/src/core/attest.d.ts +635 -0
  211. package/dist/src/core/attest.js +326 -4
  212. package/dist/src/core/attest.js.map +1 -1
  213. package/dist/src/core/audit.d.ts +510 -0
  214. package/dist/src/core/audit.js +13 -0
  215. package/dist/src/core/audit.js.map +1 -1
  216. package/dist/src/core/budgets.d.ts +238 -0
  217. package/dist/src/core/channel-owner.d.ts +213 -0
  218. package/dist/src/core/channel-owner.js +358 -0
  219. package/dist/src/core/channel-owner.js.map +1 -0
  220. package/dist/src/core/checkpoint.d.ts +500 -0
  221. package/dist/src/core/child-env.d.ts +88 -0
  222. package/dist/src/core/clock.d.ts +52 -0
  223. package/dist/src/core/command-class.d.ts +697 -0
  224. package/dist/src/core/command-class.js +713 -25
  225. package/dist/src/core/command-class.js.map +1 -1
  226. package/dist/src/core/commit-guard.d.ts +272 -0
  227. package/dist/src/core/commit-guard.js +424 -0
  228. package/dist/src/core/commit-guard.js.map +1 -0
  229. package/dist/src/core/coverage-sources/adapter.d.ts +40 -0
  230. package/dist/src/core/coverage-sources/gh.d.ts +48 -0
  231. package/dist/src/core/coverage-sources/git.d.ts +101 -0
  232. package/dist/src/core/coverage.d.ts +217 -0
  233. package/dist/src/core/credential-spec.d.ts +72 -0
  234. package/dist/src/core/daemon-actor.d.ts +45 -0
  235. package/dist/src/core/daemon-actor.js +54 -0
  236. package/dist/src/core/daemon-actor.js.map +1 -0
  237. package/dist/src/core/dark-session.d.ts +432 -0
  238. package/dist/src/core/dark-session.js +266 -82
  239. package/dist/src/core/dark-session.js.map +1 -1
  240. package/dist/src/core/decision-refusal.d.ts +206 -0
  241. package/dist/src/core/decision-refusal.js +24 -2
  242. package/dist/src/core/decision-refusal.js.map +1 -1
  243. package/dist/src/core/env-file.d.ts +455 -0
  244. package/dist/src/core/env-file.js +60 -1
  245. package/dist/src/core/env-file.js.map +1 -1
  246. package/dist/src/core/execute.d.ts +871 -0
  247. package/dist/src/core/execute.js +59 -8
  248. package/dist/src/core/execute.js.map +1 -1
  249. package/dist/src/core/frontmatter.d.ts +78 -0
  250. package/dist/src/core/gate-window.d.ts +312 -0
  251. package/dist/src/core/gate.d.ts +1449 -0
  252. package/dist/src/core/gate.js +149 -14
  253. package/dist/src/core/gate.js.map +1 -1
  254. package/dist/src/core/gesture-refusal.d.ts +166 -0
  255. package/dist/src/core/gesture-refusal.js +188 -0
  256. package/dist/src/core/gesture-refusal.js.map +1 -0
  257. package/dist/src/core/git-run.d.ts +73 -0
  258. package/dist/src/core/harness-version.d.ts +157 -0
  259. package/dist/src/core/harness-version.js +4 -1
  260. package/dist/src/core/harness-version.js.map +1 -1
  261. package/dist/src/core/harness-wait.d.ts +55 -0
  262. package/dist/src/core/head-retry.d.ts +107 -0
  263. package/dist/src/core/instance.d.ts +310 -0
  264. package/dist/src/core/instance.js +113 -0
  265. package/dist/src/core/instance.js.map +1 -1
  266. package/dist/src/core/intake-limits.d.ts +247 -0
  267. package/dist/src/core/jcs.d.ts +52 -0
  268. package/dist/src/core/journal.d.ts +144 -0
  269. package/dist/src/core/live-draw.d.ts +436 -0
  270. package/dist/src/core/log-reconcile.d.ts +89 -0
  271. package/dist/src/core/log-subscribe.d.ts +36 -0
  272. package/dist/src/core/log-subscribe.js +162 -0
  273. package/dist/src/core/log-subscribe.js.map +1 -0
  274. package/dist/src/core/log.d.ts +316 -0
  275. package/dist/src/core/log.js.map +1 -1
  276. package/dist/src/core/loop.d.ts +274 -0
  277. package/dist/src/core/loop.js +11 -0
  278. package/dist/src/core/loop.js.map +1 -1
  279. package/dist/src/core/md-fence.d.ts +41 -0
  280. package/dist/src/core/money.d.ts +147 -0
  281. package/dist/src/core/payload-census.d.ts +74 -0
  282. package/dist/src/core/payload-store.d.ts +175 -0
  283. package/dist/src/core/payload.d.ts +71 -0
  284. package/dist/src/core/policy-diff.d.ts +292 -0
  285. package/dist/src/core/policy-diff.js +27 -4
  286. package/dist/src/core/policy-diff.js.map +1 -1
  287. package/dist/src/core/policy-expectations.d.ts +199 -0
  288. package/dist/src/core/policy-explain.d.ts +160 -0
  289. package/dist/src/core/policy-explain.js +63 -3
  290. package/dist/src/core/policy-explain.js.map +1 -1
  291. package/dist/src/core/policy-load.d.ts +567 -0
  292. package/dist/src/core/policy-load.js +36 -6
  293. package/dist/src/core/policy-load.js.map +1 -1
  294. package/dist/src/core/policy-match.d.ts +324 -0
  295. package/dist/src/core/policy-match.js +72 -9
  296. package/dist/src/core/policy-match.js.map +1 -1
  297. package/dist/src/core/policy-proposal.d.ts +317 -0
  298. package/dist/src/core/policy-proposal.js +102 -2
  299. package/dist/src/core/policy-proposal.js.map +1 -1
  300. package/dist/src/core/prompt-layout.d.ts +221 -0
  301. package/dist/src/core/protected-path-guard.d.ts +566 -0
  302. package/dist/src/core/protected-path-guard.js +848 -55
  303. package/dist/src/core/protected-path-guard.js.map +1 -1
  304. package/dist/src/core/question-preempted.d.ts +141 -0
  305. package/dist/src/core/question-preempted.js +152 -0
  306. package/dist/src/core/question-preempted.js.map +1 -0
  307. package/dist/src/core/read-scope.d.ts +172 -0
  308. package/dist/src/core/read-scope.js +252 -0
  309. package/dist/src/core/read-scope.js.map +1 -0
  310. package/dist/src/core/registration.d.ts +25 -0
  311. package/dist/src/core/reindex.d.ts +99 -0
  312. package/dist/src/core/sampler.d.ts +313 -0
  313. package/dist/src/core/sandbox.d.ts +371 -0
  314. package/dist/src/core/sandbox.js +190 -1
  315. package/dist/src/core/sandbox.js.map +1 -1
  316. package/dist/src/core/seal.d.ts +165 -0
  317. package/dist/src/core/sender-identity.d.ts +476 -0
  318. package/dist/src/core/sender-identity.js +572 -0
  319. package/dist/src/core/sender-identity.js.map +1 -0
  320. package/dist/src/core/shlex.d.ts +102 -0
  321. package/dist/src/core/shlex.js +159 -0
  322. package/dist/src/core/shlex.js.map +1 -0
  323. package/dist/src/core/state.d.ts +505 -0
  324. package/dist/src/core/task-file.d.ts +185 -0
  325. package/dist/src/core/telegram-config.d.ts +93 -0
  326. package/dist/src/core/token.d.ts +409 -0
  327. package/dist/src/core/token.js +21 -38
  328. package/dist/src/core/token.js.map +1 -1
  329. package/dist/src/core/validate.d.ts +138 -0
  330. package/dist/src/core/values.d.ts +147 -0
  331. package/dist/src/core/values.js +36 -1
  332. package/dist/src/core/values.js.map +1 -1
  333. package/dist/src/core/vault.d.ts +291 -0
  334. package/dist/src/core/verified-snapshot.d.ts +204 -0
  335. package/dist/src/core/verify.d.ts +336 -0
  336. package/dist/src/core/version.d.ts +8 -0
  337. package/dist/src/core/wysiwys.d.ts +370 -0
  338. package/dist/src/daemon/advance-child.d.ts +39 -0
  339. package/dist/src/daemon/advance.d.ts +476 -0
  340. package/dist/src/daemon/advance.js +25 -4
  341. package/dist/src/daemon/advance.js.map +1 -1
  342. package/dist/src/daemon/audit.d.ts +87 -0
  343. package/dist/src/daemon/daemon.d.ts +1180 -0
  344. package/dist/src/daemon/daemon.js +9 -0
  345. package/dist/src/daemon/daemon.js.map +1 -1
  346. package/dist/src/daemon/dark-session.d.ts +64 -0
  347. package/dist/src/daemon/draw-child.d.ts +36 -0
  348. package/dist/src/daemon/draw.d.ts +154 -0
  349. package/dist/src/daemon/git-evidence.d.ts +173 -0
  350. package/dist/src/daemon/git-evidence.js +1 -1
  351. package/dist/src/daemon/projection.d.ts +180 -0
  352. package/dist/src/daemon/prune.d.ts +207 -0
  353. package/dist/src/mcp/http.d.ts +113 -0
  354. package/dist/src/mcp/server.d.ts +265 -0
  355. package/dist/src/mcp/server.js +17 -1
  356. package/dist/src/mcp/server.js.map +1 -1
  357. package/docs/adapter-api.md +106 -0
  358. package/docs/cli-reference.md +1316 -63
  359. package/docs/codex-enforced-session.md +103 -0
  360. package/docs/codex-workspace-broker.md +118 -0
  361. package/package.json +14 -2
  362. package/schema/codex-instance.schema.json +82 -0
  363. package/schema/event.schema.json +539 -9
  364. package/schema/fixtures/codex-instance/invalid/unpinned-codex-version.json +40 -0
  365. package/schema/fixtures/codex-instance/valid/canonical.json +40 -0
  366. package/schema/fixtures/event/invalid/approval-granted-sender-hashed-false.json +20 -0
  367. package/schema/fixtures/event/invalid/approval-granted-sender-hashed-raw-id.json +20 -0
  368. package/schema/fixtures/event/invalid/audit-gesture-refused-human-actor.json +16 -0
  369. package/schema/fixtures/event/invalid/audit-gesture-refused-no-actor-no-sender.json +15 -0
  370. package/schema/fixtures/event/invalid/audit-gesture-refused-unknown-gesture.json +16 -0
  371. package/schema/fixtures/event/invalid/audit-question-preempted-agent-actor.json +16 -0
  372. package/schema/fixtures/event/invalid/audit-question-preempted-no-question-id.json +16 -0
  373. package/schema/fixtures/event/invalid/audit-question-preempted-unknown-source.json +15 -0
  374. package/schema/fixtures/event/invalid/gate-path-signed-off-absolute-path.json +14 -0
  375. package/schema/fixtures/event/invalid/gate-path-signed-off-agent-actor.json +14 -0
  376. package/schema/fixtures/event/invalid/gate-path-signed-off-missing-path.json +13 -0
  377. package/schema/fixtures/event/valid/approval-granted-sender-hashed.json +20 -0
  378. package/schema/fixtures/event/valid/audit-gesture-refused-review-note.json +21 -0
  379. package/schema/fixtures/event/valid/audit-gesture-refused-sender-key-unavailable.json +19 -0
  380. package/schema/fixtures/event/valid/audit-gesture-refused.json +19 -0
  381. package/schema/fixtures/event/valid/audit-question-preempted-no-verdict.json +16 -0
  382. package/schema/fixtures/event/valid/audit-question-preempted.json +20 -0
  383. package/schema/fixtures/event/valid/gate-path-signed-off.json +14 -0
  384. package/schema/fixtures/event/valid/harness-kind-claude-code.json +23 -0
  385. package/schema/fixtures/event/valid/harness-kind-codex.json +23 -0
  386. package/schema/fixtures/event/valid/harness-kind-cursor.json +23 -0
  387. package/schema/fixtures/event/valid/harness-kind-grok.json +23 -0
  388. package/schema/fixtures/event/valid/harness-kind-muse.json +23 -0
  389. package/schema/fixtures/policy/invalid/senders-half-keyed.json +20 -0
  390. package/schema/fixtures/policy/valid/canonical.json +1 -1
  391. package/schema/fixtures/policy/valid/senders-keyed.json +24 -0
  392. package/schema/fixtures/policy-md/valid/canonical.md +1 -1
  393. package/schema/fixtures/policy-md/valid/with-values.md +5 -7
  394. package/schema/fixtures/values/invalid/class-shaped.json +1 -1
  395. package/schema/fixtures/values/invalid/duplicate-entry.json +1 -1
  396. package/schema/fixtures/values/invalid/non-string-item.json +1 -1
  397. package/schema/fixtures/values/invalid/over-cap.json +1 -1
  398. package/schema/fixtures/values/invalid/unknown-key.json +1 -1
  399. package/schema/fixtures/values/invalid/version-float.json +1 -0
  400. package/schema/fixtures/values/invalid/version-integer.json +1 -0
  401. package/schema/fixtures/values/invalid/version-wrong-string.json +1 -0
  402. package/schema/fixtures/values/valid/empty-lists.json +2 -3
  403. package/schema/fixtures/values/valid/full.json +5 -7
  404. package/schema/fixtures/values/valid/minimal.json +1 -1
  405. package/schema/fixtures/values-md/invalid/schema-invalid.md +5 -3
  406. package/schema/fixtures/values-md/invalid/two-blocks.md +3 -3
  407. package/schema/fixtures/values-md/invalid/unterminated.md +2 -2
  408. package/schema/fixtures/values-md/invalid/version-1.md +69 -0
  409. package/schema/fixtures/values-md/invalid/version-unquoted.md +64 -0
  410. package/schema/fixtures/values-md/invalid/yaml-error.md +2 -2
  411. package/schema/fixtures/values-md/valid/absent.md +1 -1
  412. package/schema/fixtures/values-md/valid/with-values.md +5 -7
  413. package/schema/policy.schema.json +75 -3
  414. package/schema/values.schema.json +7 -11
  415. package/templates/codex/README.md +9 -0
  416. package/schema/fixtures/values/invalid/version-string.json +0 -1
@@ -0,0 +1,166 @@
1
+ /**
2
+ * What the log says when a decision surface refused a gesture that is not a
3
+ * decision (APRV-355, amended SPEC.md §8).
4
+ *
5
+ * ## The fact this module is about
6
+ *
7
+ * Found while landing APRV-324 (PR #427, 2026-09-17). Once the policy maps
8
+ * Telegram senders, a tap on a CHECKPOINT signature or on a REVIEW from an
9
+ * account the attested policy names nobody for is refused before any verb runs
10
+ * — and records nothing. The only refusal record in the system is
11
+ * `audit.decision_refused`, and it requires a record-level `action_key` and a
12
+ * `payload.decision` of grant, reject or revoke. A signature answers for a
13
+ * chain head and a review answers for a sampled record; neither has either
14
+ * field, so writing one of these there would mean manufacturing both. The lane
15
+ * that found it declined to, correctly.
16
+ *
17
+ * The cost of recording nothing is the same cost `core/decision-refusal.ts`
18
+ * exists to end. Somebody's attention was spent — SPEC.md §11 calls human
19
+ * attention the audit budget — and an attempt was made from an account the
20
+ * operator did not map, and the only trace is a line on a terminal and an
21
+ * answer in a chat. An operator deciding whether to map that account has
22
+ * nothing in the log to read.
23
+ *
24
+ * ## What this record is, and what it is not
25
+ *
26
+ * `audit.gesture_refused` is an AUDIT-TIER record on the strict terms
27
+ * `audit.decision_refused` set, and the terms are the whole of its safety:
28
+ *
29
+ * - it grants nothing and mints no token;
30
+ * - `core/state.ts` settles nothing on it, so no verdict moves;
31
+ * - `core/budgets.ts` charges nothing for it, so no budget moves;
32
+ * - `core/audit.ts` does not sample it and no streak counts it;
33
+ * - NO ENFORCEMENT PATH READS IT. `tests/gesture-refusal.test.ts` pins that by
34
+ * reading the module graph rather than by asserting an intention.
35
+ *
36
+ * The record's own actor is `system:`, for the reason `audit.dark_session`'s
37
+ * and `audit.decision_refused`'s are: this is the runtime's statement about a
38
+ * refusal the runtime made, and a record of a refusal authored by either party
39
+ * to it is a record neither party can be held to. The person, when the runtime
40
+ * can name one, is the SUBJECT and sits in the payload.
41
+ *
42
+ * ## The asymmetry it inherits
43
+ *
44
+ * Refusals handed to AGENTS stay unlogged here too. An agent that is refused
45
+ * reads the code, stops or asks again, and nothing was spent that a record
46
+ * could account for. And a gesture is human by construction: an agent has no
47
+ * checkpoint to sign and no review to give.
48
+ *
49
+ * ## No attestation check, deliberately
50
+ *
51
+ * Nothing here asks whether the policy is attested, for the reason
52
+ * `core/decision-refusal.ts` does not: this write confers no authority.
53
+ * Refusing to record a refusal because a file changed would be the strict
54
+ * direction pointing the wrong way, and the case where it would bite hardest is
55
+ * `policy-not-attested` itself — exactly the refusal an operator most needs the
56
+ * log to remember. The write boundary still validates every record.
57
+ *
58
+ * ## Invariants
59
+ *
60
+ * - **Gate-typed events never accept caller timestamps** (§11.1). `ts` comes
61
+ * from the injected clock at the write boundary; there is no parameter.
62
+ * - **Every check-then-append passes through compare-and-append** (§11.1(5)).
63
+ * The write states the head it was derived against and the whole cycle
64
+ * re-enters from a fresh read on `head-moved` through {@link withHeadRetry}.
65
+ * - **Self-reported fields never reduce scrutiny** (§11.1). Everything here
66
+ * only ADDS to what a reviewer sees. The sender is the transport's own
67
+ * attribution, never anything the message claimed about itself.
68
+ * - **Refusals stay machine-readable and distinct** (§11.1). The surface's code
69
+ * is copied verbatim; nothing here invents, merges or softens one.
70
+ */
71
+ import { type AppendError, type EventRecord } from "./log.js";
72
+ import type { GateOptions } from "./gate.js";
73
+ import type { RecordedSender, SenderSource } from "./sender-identity.js";
74
+ /** The actor every record here carries: the gate stating what the gate did. */
75
+ export declare const GESTURE_REFUSAL_ACTOR = "system:gate";
76
+ /**
77
+ * The gestures this record can be about. **Closed and additive-only** (§11.1
78
+ * invariant 6), and pinned against the event schema's own enum by
79
+ * `tests/gesture-refusal.test.ts`: a kind the sweep can produce and the write
80
+ * boundary refuses is an observation that never reaches a human, which is the
81
+ * failure APRV-358 named a few hours before this task.
82
+ *
83
+ * `review` and `review-note` are two members rather than one because a note is
84
+ * attention spent WRITING rather than attention spent tapping, and an operator
85
+ * reading this record to decide whether to map an account wants to know which
86
+ * they lost.
87
+ */
88
+ export declare const REFUSED_GESTURES: readonly ["checkpoint-signature", "review", "review-note"];
89
+ export type RefusedGestureKind = (typeof REFUSED_GESTURES)[number];
90
+ /**
91
+ * The refusals a gesture can meet before any verb runs. **Closed**, and exactly
92
+ * what sender resolution can answer: `sender-unmapped`, `sender-ambiguous` and
93
+ * `sender-key-unavailable` from `core/sender-identity.ts`'s own union, and
94
+ * `policy-not-attested` from `core/attest.ts`, which fires when the policy
95
+ * declaring the mapping is not the attested one and is therefore not in force.
96
+ *
97
+ * `attest-requires-terminal` is deliberately absent: it belongs to an
98
+ * attestation tap, which is a decision and is recorded as one.
99
+ */
100
+ export declare const REFUSED_GESTURE_CODES: readonly ["sender-unmapped", "sender-ambiguous", "sender-key-unavailable", "policy-not-attested"];
101
+ export type RefusedGestureCode = (typeof REFUSED_GESTURE_CODES)[number];
102
+ /** Is `code` one this record can carry? Used where a code arrives as a string. */
103
+ export declare function isRefusedGestureCode(code: string): code is RefusedGestureCode;
104
+ /** What was attempted, by whom, on which surface. */
105
+ export interface RefusedGesture {
106
+ /** Which gesture. */
107
+ gesture: RefusedGestureKind;
108
+ /**
109
+ * The person, `human:<id>`, when the surface could name one.
110
+ *
111
+ * `null` for the refusal where it could not: a transport authenticated an
112
+ * account the attested policy binds to nobody. The record then carries
113
+ * {@link RefusedGesture.sender} and no `actor`, and the event schema requires
114
+ * one or the other.
115
+ */
116
+ actor: string | null;
117
+ /** The surface that collected the gesture: `telegram`, `web`, `cli`. */
118
+ channel: string;
119
+ /**
120
+ * The authenticated sender it arrived from, when the surface observed one,
121
+ * in the form the record carries it (APRV-370: raw, or the keyed digest).
122
+ */
123
+ sender?: RecordedSender;
124
+ /** How the sender became the actor, when one did. */
125
+ senderSource?: SenderSource;
126
+ }
127
+ /** The refusal being recorded. Only these fields are ever read. */
128
+ export interface GestureRefusalFacts {
129
+ /** The surface's code, verbatim. */
130
+ code: string;
131
+ /** The surface's message, verbatim. */
132
+ message: string;
133
+ }
134
+ /** What the module could not do. Never thrown; the caller carries on regardless. */
135
+ export interface GestureRefusalFailure {
136
+ ok: false;
137
+ code: "log-unreadable" | "append-failed";
138
+ message: string;
139
+ append?: AppendError;
140
+ }
141
+ export type RecordRefusedGestureResult = {
142
+ ok: true;
143
+ /** The record, or `null` when there was nothing to record. */
144
+ audit: EventRecord | null;
145
+ } | GestureRefusalFailure;
146
+ /**
147
+ * Record that a human's gesture was refused.
148
+ *
149
+ * Called by the surface that collected the gesture, on the branch where it
150
+ * refused — never from inside the verb the gesture would have reached, which is
151
+ * never called at all on this path.
152
+ *
153
+ * Best-effort by design: a failure here is returned, never thrown, and the
154
+ * caller shows the refusal either way. The gesture was already refused before
155
+ * this ran, and nothing about that outcome depends on this write landing.
156
+ *
157
+ * Two cases append nothing, and both are the honest answer rather than a
158
+ * silence:
159
+ *
160
+ * - a non-human actor, which is the misconfigured-surface case: nobody's
161
+ * attention was spent, so there is no spend for a record to account for;
162
+ * - a code this record cannot carry, which means a surface refused for a reason
163
+ * this vocabulary does not name. Minting a member here to fit it would widen
164
+ * a closed union at the write boundary from inside a best-effort path.
165
+ */
166
+ export declare function recordRefusedGesture(logPath: string, gesture: RefusedGesture, refusal: GestureRefusalFacts, options?: GateOptions): RecordRefusedGestureResult;
@@ -0,0 +1,188 @@
1
+ /**
2
+ * What the log says when a decision surface refused a gesture that is not a
3
+ * decision (APRV-355, amended SPEC.md §8).
4
+ *
5
+ * ## The fact this module is about
6
+ *
7
+ * Found while landing APRV-324 (PR #427, 2026-09-17). Once the policy maps
8
+ * Telegram senders, a tap on a CHECKPOINT signature or on a REVIEW from an
9
+ * account the attested policy names nobody for is refused before any verb runs
10
+ * — and records nothing. The only refusal record in the system is
11
+ * `audit.decision_refused`, and it requires a record-level `action_key` and a
12
+ * `payload.decision` of grant, reject or revoke. A signature answers for a
13
+ * chain head and a review answers for a sampled record; neither has either
14
+ * field, so writing one of these there would mean manufacturing both. The lane
15
+ * that found it declined to, correctly.
16
+ *
17
+ * The cost of recording nothing is the same cost `core/decision-refusal.ts`
18
+ * exists to end. Somebody's attention was spent — SPEC.md §11 calls human
19
+ * attention the audit budget — and an attempt was made from an account the
20
+ * operator did not map, and the only trace is a line on a terminal and an
21
+ * answer in a chat. An operator deciding whether to map that account has
22
+ * nothing in the log to read.
23
+ *
24
+ * ## What this record is, and what it is not
25
+ *
26
+ * `audit.gesture_refused` is an AUDIT-TIER record on the strict terms
27
+ * `audit.decision_refused` set, and the terms are the whole of its safety:
28
+ *
29
+ * - it grants nothing and mints no token;
30
+ * - `core/state.ts` settles nothing on it, so no verdict moves;
31
+ * - `core/budgets.ts` charges nothing for it, so no budget moves;
32
+ * - `core/audit.ts` does not sample it and no streak counts it;
33
+ * - NO ENFORCEMENT PATH READS IT. `tests/gesture-refusal.test.ts` pins that by
34
+ * reading the module graph rather than by asserting an intention.
35
+ *
36
+ * The record's own actor is `system:`, for the reason `audit.dark_session`'s
37
+ * and `audit.decision_refused`'s are: this is the runtime's statement about a
38
+ * refusal the runtime made, and a record of a refusal authored by either party
39
+ * to it is a record neither party can be held to. The person, when the runtime
40
+ * can name one, is the SUBJECT and sits in the payload.
41
+ *
42
+ * ## The asymmetry it inherits
43
+ *
44
+ * Refusals handed to AGENTS stay unlogged here too. An agent that is refused
45
+ * reads the code, stops or asks again, and nothing was spent that a record
46
+ * could account for. And a gesture is human by construction: an agent has no
47
+ * checkpoint to sign and no review to give.
48
+ *
49
+ * ## No attestation check, deliberately
50
+ *
51
+ * Nothing here asks whether the policy is attested, for the reason
52
+ * `core/decision-refusal.ts` does not: this write confers no authority.
53
+ * Refusing to record a refusal because a file changed would be the strict
54
+ * direction pointing the wrong way, and the case where it would bite hardest is
55
+ * `policy-not-attested` itself — exactly the refusal an operator most needs the
56
+ * log to remember. The write boundary still validates every record.
57
+ *
58
+ * ## Invariants
59
+ *
60
+ * - **Gate-typed events never accept caller timestamps** (§11.1). `ts` comes
61
+ * from the injected clock at the write boundary; there is no parameter.
62
+ * - **Every check-then-append passes through compare-and-append** (§11.1(5)).
63
+ * The write states the head it was derived against and the whole cycle
64
+ * re-enters from a fresh read on `head-moved` through {@link withHeadRetry}.
65
+ * - **Self-reported fields never reduce scrutiny** (§11.1). Everything here
66
+ * only ADDS to what a reviewer sees. The sender is the transport's own
67
+ * attribution, never anything the message claimed about itself.
68
+ * - **Refusals stay machine-readable and distinct** (§11.1). The surface's code
69
+ * is copied verbatim; nothing here invents, merges or softens one.
70
+ */
71
+ import { tick } from "./clock.js";
72
+ import { attemptsOf, withHeadRetry } from "./head-retry.js";
73
+ import { appendEvent } from "./log.js";
74
+ import { readVerifiedRecords } from "./state.js";
75
+ /** The actor every record here carries: the gate stating what the gate did. */
76
+ export const GESTURE_REFUSAL_ACTOR = "system:gate";
77
+ /**
78
+ * The gestures this record can be about. **Closed and additive-only** (§11.1
79
+ * invariant 6), and pinned against the event schema's own enum by
80
+ * `tests/gesture-refusal.test.ts`: a kind the sweep can produce and the write
81
+ * boundary refuses is an observation that never reaches a human, which is the
82
+ * failure APRV-358 named a few hours before this task.
83
+ *
84
+ * `review` and `review-note` are two members rather than one because a note is
85
+ * attention spent WRITING rather than attention spent tapping, and an operator
86
+ * reading this record to decide whether to map an account wants to know which
87
+ * they lost.
88
+ */
89
+ export const REFUSED_GESTURES = ["checkpoint-signature", "review", "review-note"];
90
+ /**
91
+ * The refusals a gesture can meet before any verb runs. **Closed**, and exactly
92
+ * what sender resolution can answer: `sender-unmapped`, `sender-ambiguous` and
93
+ * `sender-key-unavailable` from `core/sender-identity.ts`'s own union, and
94
+ * `policy-not-attested` from `core/attest.ts`, which fires when the policy
95
+ * declaring the mapping is not the attested one and is therefore not in force.
96
+ *
97
+ * `attest-requires-terminal` is deliberately absent: it belongs to an
98
+ * attestation tap, which is a decision and is recorded as one.
99
+ */
100
+ export const REFUSED_GESTURE_CODES = [
101
+ "sender-unmapped",
102
+ "sender-ambiguous",
103
+ // APRV-370. A keyed mapping this process holds no key for: the runtime could
104
+ // resolve no account at all, which is a different fact from "this account is
105
+ // not mapped" and wants a different repair.
106
+ "sender-key-unavailable",
107
+ "policy-not-attested",
108
+ ];
109
+ /** Is `code` one this record can carry? Used where a code arrives as a string. */
110
+ export function isRefusedGestureCode(code) {
111
+ return REFUSED_GESTURE_CODES.includes(code);
112
+ }
113
+ /** The gestures this module records: a person's, and nobody else's. */
114
+ const HUMAN_ACTOR = /^human:.+/u;
115
+ /**
116
+ * Record that a human's gesture was refused.
117
+ *
118
+ * Called by the surface that collected the gesture, on the branch where it
119
+ * refused — never from inside the verb the gesture would have reached, which is
120
+ * never called at all on this path.
121
+ *
122
+ * Best-effort by design: a failure here is returned, never thrown, and the
123
+ * caller shows the refusal either way. The gesture was already refused before
124
+ * this ran, and nothing about that outcome depends on this write landing.
125
+ *
126
+ * Two cases append nothing, and both are the honest answer rather than a
127
+ * silence:
128
+ *
129
+ * - a non-human actor, which is the misconfigured-surface case: nobody's
130
+ * attention was spent, so there is no spend for a record to account for;
131
+ * - a code this record cannot carry, which means a surface refused for a reason
132
+ * this vocabulary does not name. Minting a member here to fit it would widen
133
+ * a closed union at the write boundary from inside a best-effort path.
134
+ */
135
+ export function recordRefusedGesture(logPath, gesture, refusal, options = {}) {
136
+ if (gesture.actor !== null && !HUMAN_ACTOR.test(gesture.actor)) {
137
+ return { ok: true, audit: null };
138
+ }
139
+ // No person and no account is nothing to say: the record would name neither
140
+ // the subject nor the reason it could not, and the schema refuses it.
141
+ if (gesture.actor === null && gesture.sender === undefined) {
142
+ return { ok: true, audit: null };
143
+ }
144
+ if (!isRefusedGestureCode(refusal.code))
145
+ return { ok: true, audit: null };
146
+ const appended = withHeadRetry(attemptsOf(options.retryOnHeadMoved), () => appendAudit(logPath, gesture, refusal, options));
147
+ return appended.ok ? { ok: true, audit: appended.record } : appended;
148
+ }
149
+ /** The whole cycle: a fresh read for the head, then one append against it. */
150
+ function appendAudit(logPath, gesture, refusal, options) {
151
+ const ts = tick(options);
152
+ const read = readVerifiedRecords(logPath, options.schemaDir === undefined ? {} : { schemaDir: options.schemaDir });
153
+ if (!read.ok) {
154
+ return { ok: false, code: "log-unreadable", message: read.message };
155
+ }
156
+ const payload = {
157
+ ...(gesture.actor === null ? {} : { actor: gesture.actor }),
158
+ gesture: gesture.gesture,
159
+ code: refusal.code,
160
+ message: refusal.message,
161
+ };
162
+ if (gesture.sender !== undefined) {
163
+ payload["sender"] = {
164
+ channel: gesture.sender.channel,
165
+ id: gesture.sender.id,
166
+ // APRV-370: only when true, so a raw record does not change shape.
167
+ ...(gesture.sender.hashed === true ? { hashed: true } : {}),
168
+ };
169
+ if (gesture.senderSource !== undefined)
170
+ payload["sender_source"] = gesture.senderSource;
171
+ }
172
+ return appendOne(logPath, { ts, actor: GESTURE_REFUSAL_ACTOR, channel: gesture.channel, payload }, options, read.head);
173
+ }
174
+ function appendOne(logPath, input, options, expectedHead) {
175
+ const append = { ...options.append };
176
+ if (options.schemaDir !== undefined)
177
+ append.schemaDir = options.schemaDir;
178
+ const result = appendEvent(logPath, { ...input, event: "audit.gesture_refused" }, { ...append, expectedHead });
179
+ if (result.ok)
180
+ return { ok: true, record: result.record };
181
+ return {
182
+ ok: false,
183
+ code: "append-failed",
184
+ message: `audit.gesture_refused could not be appended: ${result.error.message}`,
185
+ append: result.error,
186
+ };
187
+ }
188
+ //# sourceMappingURL=gesture-refusal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gesture-refusal.js","sourceRoot":"","sources":["../../../src/core/gesture-refusal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,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AAC;AACJ,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Running `git` and `gh` as values rather than as exceptions.
3
+ *
4
+ * This used to live in `cli/git-scope.ts`, which is the wrong home for it since
5
+ * APRV-245: the coverage sources under `core/coverage-sources/` shell out to git
6
+ * to learn what actually happened in a repository, and core code that imported a
7
+ * CLI module would invert the direction `tests/layering.test.ts` exists to keep.
8
+ * So the two runners moved down here and `cli/git-scope.ts` re-exports them; its
9
+ * callers are unchanged and there is still exactly one spelling of "run git".
10
+ *
11
+ * Nothing here decides anything. `ok` means "exit status 0", a process that did
12
+ * not start is `ok: false` with the reason in `stderr`, and no call throws.
13
+ */
14
+ /**
15
+ * How much of a child's output this runtime will hold, in bytes.
16
+ *
17
+ * `spawnSync` defaults `maxBuffer` to one mebibyte, and a child that writes
18
+ * more than that is KILLED: `error` is set to `ENOBUFS`, `status` comes back
19
+ * null, and `stdout` holds a truncated prefix. Nothing about that is loud. The
20
+ * caller sees a failed run with no exit code and, if it only checks whether it
21
+ * got bytes, sees nothing at all.
22
+ *
23
+ * That default cost this project a live regression. `git show <rev>:<log>` is
24
+ * how every committed copy of `events.jsonl` is read (the anchor check, the
25
+ * published-seq count, the sync's incoming blob), and the committed log passed
26
+ * a megabyte long ago. Every one of those reads had been failing, silently, for
27
+ * as long as the log had been over the ceiling: `approval log verify --anchor`
28
+ * reported no committed copy in a checkout where `git show` printed one, the
29
+ * daemon's started line said anchor none, the doctor's log-drift row misread,
30
+ * and the advance cadence put the highest published seq at 0.
31
+ *
32
+ * A cap is still a cap and this one can still be reached. Two things make that
33
+ * survivable rather than silent: it is not preallocated, so naming a large
34
+ * number costs nothing until a child actually produces that much; and every
35
+ * caller that reads a blob now reports the command it ran and what the runner
36
+ * said when it comes back empty-handed, so the next ceiling arrives as a
37
+ * sentence naming the command rather than as a wrong answer.
38
+ */
39
+ export declare const GIT_OUTPUT_LIMIT_BYTES: number;
40
+ /** One process invocation's result. `ok` is "exit status 0", nothing more. */
41
+ export interface GitRun {
42
+ ok: boolean;
43
+ stdout: string;
44
+ stderr: string;
45
+ /**
46
+ * The child's exit status, or `null` when it never got one — it failed to
47
+ * start, was killed by a signal, or outran {@link GIT_OUTPUT_LIMIT_BYTES}.
48
+ *
49
+ * `ok` cannot carry that distinction and a diagnostic needs it: "exited 128"
50
+ * is a git that answered, and `null` is a git that was stopped mid-sentence.
51
+ */
52
+ status: number | null;
53
+ }
54
+ /**
55
+ * Run git in `cwd`. Never throws: a git that did not run is `ok: false`.
56
+ *
57
+ * `env` is merged over `process.env`, and exists for exactly one caller:
58
+ * `commitOnBase` points `GIT_INDEX_FILE` at a scratch index so that a commit can
59
+ * be assembled without going anywhere near the operator's own.
60
+ */
61
+ export declare function git(args: string[], cwd: string, env?: Record<string, string>): GitRun;
62
+ /** `gh`, run the way {@link git} runs git: never throws, always answers. */
63
+ export declare function gh(args: string[], cwd: string): GitRun;
64
+ /**
65
+ * Is `bin` reachable on this process's PATH?
66
+ *
67
+ * Asked with the tool's own `--version`, because `which` is one more program
68
+ * that may be absent and a PATH walk would have to reimplement the platform's
69
+ * lookup rules. A binary that is present and refuses `--version` is reported
70
+ * absent, which is the fail-quiet direction for a reporting verb: the coverage
71
+ * report says the source is unavailable rather than inventing a gap.
72
+ */
73
+ export declare function onPath(bin: string, cwd: string): boolean;
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Which harness binary issued a hook-written record (APRV-227).
3
+ *
4
+ * ## The hole
5
+ *
6
+ * A harness upgrade — `claude update`, a global npm install, an unattended
7
+ * updater on a launchd timer — swaps the binary that hosts the PreToolUse hook
8
+ * without a line anywhere. A new harness release can change the hook envelope
9
+ * semantics and quietly stop the gate firing, and the first evidence would be
10
+ * an action nobody was asked about. The gate cannot stop a person upgrading
11
+ * their own machine, and should not. What it can do is notice the effect: the
12
+ * records the hook writes name the harness that issued them, and `approval
13
+ * doctor` says so when the installed binary no longer matches the last one the
14
+ * log saw.
15
+ *
16
+ * ## What this field is, and what it is emphatically not
17
+ *
18
+ * It is INFORMATIONAL. Nothing in the runtime reads it back as an input:
19
+ * no class resolution, no irreversibility floor, no loop-escalation streak, no
20
+ * budget arithmetic, no sampling draw. SPEC.md §11.1 invariant 4 says a
21
+ * self-reported field never reduces scrutiny, and the discipline that keeps
22
+ * that true here is that the value has exactly one reader — a doctor row that
23
+ * can only ADD a red line — and exactly one direction it can move a human's
24
+ * attention, which is toward the log rather than away from it. A harness that
25
+ * lies about its own version buys itself nothing: the row it defeats is a row
26
+ * that would have asked for a look.
27
+ *
28
+ * It is also OPTIONAL and additive. A record written before the field existed
29
+ * carries neither half and still validates and still verifies; a hook that
30
+ * cannot establish a version writes neither half rather than a guess.
31
+ *
32
+ * ## Where the value comes from, in order
33
+ *
34
+ * 1. The hook event's own version field, where the harness supplies one.
35
+ * Claude Code's PreToolUse event may carry it; Cursor's does not.
36
+ * 2. `<binary> --version`, read at most ONCE per process ({@link
37
+ * installedHarnessVersion} memoizes, including the failures) with a short
38
+ * hard timeout.
39
+ * 3. Absent.
40
+ *
41
+ * Step 2 is why this module is careful about cost. A hook process exists per
42
+ * gated tool call, and APRV-186/188/212 each removed a term from what that
43
+ * process pays. So the probe is reached only on a path that is about to WRITE a
44
+ * record — a registration or a bypass — and never on the pass-through path that
45
+ * answers `cat README.md`. The memo makes a multi-class command pay once.
46
+ *
47
+ * ## Why the binary name is not configurable
48
+ *
49
+ * `cli/gloss.ts` already settled this: a runtime that let a policy or an
50
+ * environment variable name the executable it runs would have invented a new
51
+ * way to be told what to execute. The map below is the whole list, PATH is the
52
+ * only seam, and a test puts a stub binary in front of it.
53
+ */
54
+ /** The harnesses this runtime speaks a hook protocol for. */
55
+ export declare const HARNESS_KINDS: readonly ["claude-code", "cursor", "codex", "grok", "muse"];
56
+ export type HarnessKind = (typeof HARNESS_KINDS)[number];
57
+ /** Is `value` one of the harnesses this runtime knows? */
58
+ export declare function isHarnessKind(value: unknown): value is HarnessKind;
59
+ /**
60
+ * The executable each harness installs on PATH.
61
+ *
62
+ * Not configurable, deliberately (see the header). A harness whose binary is
63
+ * not one of these has no version to read here, and the field is simply absent.
64
+ */
65
+ export declare const HARNESS_BINARY: Readonly<Record<HarnessKind, string>>;
66
+ /**
67
+ * How long a version string may be, and the reason there is a cap at all.
68
+ *
69
+ * `<binary> --version` is the output of a third-party process, and this value
70
+ * is appended to an append-only log. SPEC.md §11.1 invariant 3 has no exception
71
+ * for provenance: a field that accepted arbitrary bytes is a field where a
72
+ * banner, a stack trace, or the credential quoted inside one arrives and stays
73
+ * forever. So the write boundary takes one line, printable ASCII only, capped.
74
+ */
75
+ export declare const HARNESS_VERSION_LIMIT = 64;
76
+ /**
77
+ * The one spelling of a harness version this runtime ever writes or compares.
78
+ *
79
+ * First line, trimmed, and nothing else: `claude --version` prints
80
+ * `2.0.14 (Claude Code)` and a future release may add a second line of banner.
81
+ * Both the hook (which records) and doctor (which compares) call this, so the
82
+ * comparison is between two values normalized identically — a row that failed
83
+ * because one side kept a trailing newline would be a false alarm, and a false
84
+ * alarm in a health check trains an operator to ignore it.
85
+ *
86
+ * Returns `null` for anything that is not a usable version: empty output, a
87
+ * line that is not printable ASCII, or one longer than the cap. Absence is
88
+ * always available and always honest.
89
+ */
90
+ export declare function normalizeHarnessVersion(raw: unknown): string | null;
91
+ /**
92
+ * How long the probe may take before it is killed and reported as absent.
93
+ *
94
+ * A bound against a HUNG binary, not a latency target: `<binary> --version`
95
+ * answers in milliseconds on any machine that is not already in trouble, and
96
+ * this number is only ever reached by one that is. It is generous for the same
97
+ * reason `cli/gloss.ts`'s is (20s there): a timeout tuned to a healthy machine
98
+ * turns a loaded one into a silent, intermittent absence, and an absence that
99
+ * appears under load is the least useful failure a provenance field could have.
100
+ * The cost is bounded by the fact that this runs only where a record is being
101
+ * written, and at most once per process.
102
+ */
103
+ export declare const HARNESS_PROBE_TIMEOUT_MS = 10000;
104
+ /**
105
+ * Run `<binary> --version` once, uncached, and normalize what came back.
106
+ *
107
+ * Every failure is a value rather than an exception, in the manner of
108
+ * {@link spawnGloss}: a missing binary, a non-zero exit and a timeout kill are
109
+ * all reported on the result object, and all of them are simply "no version".
110
+ *
111
+ * The child is STARVED, for the reason the gloss runner is: this is a
112
+ * third-party CLI spawned by a process that may be holding a bot token and a
113
+ * vault passphrase, and it has no use for either. Nothing is declared, because
114
+ * reading a version is not a granted action.
115
+ */
116
+ export declare function probeHarnessVersion(kind: HarnessKind): string | null;
117
+ /**
118
+ * The installed version of `kind`, read at most once per process.
119
+ *
120
+ * This is the only entry point callers should use. `probeHarnessVersion` is
121
+ * exported for the test that proves the memo is a memo.
122
+ */
123
+ export declare function installedHarnessVersion(kind: HarnessKind): string | null;
124
+ /** Drop the memo. TEST ONLY: a process reads a version once, by design. */
125
+ export declare function resetHarnessVersionCache(): void;
126
+ /**
127
+ * The provenance pair a hook-written record carries, or `null` when this
128
+ * process could not establish one.
129
+ *
130
+ * Both halves or neither. A version with no harness beside it is a string
131
+ * doctor cannot attribute to a binary — one log holds the records of every
132
+ * harness that ever wrote to it — and a harness with no version is a field that
133
+ * says nothing.
134
+ */
135
+ export interface HarnessProvenance {
136
+ harness: HarnessKind;
137
+ harness_version: string;
138
+ }
139
+ /**
140
+ * Build the pair for `kind`, preferring the version the hook event supplied.
141
+ *
142
+ * `eventVersion` is whatever the harness put in its own event, unvalidated:
143
+ * it goes through {@link normalizeHarnessVersion} exactly as the probe's
144
+ * output does, because it arrives from the same untrusted side of the boundary
145
+ * and the write boundary does not have two standards.
146
+ */
147
+ export declare function harnessProvenance(kind: HarnessKind, eventVersion?: unknown): HarnessProvenance | null;
148
+ /**
149
+ * The provenance pair carried by an already-written record's payload, or
150
+ * `null` when it carries none (or carries half of one).
151
+ *
152
+ * The read side of the same contract, used by `approval doctor`. Strict on
153
+ * purpose: a record whose `harness` is a string this runtime does not know is a
154
+ * record from a harness this build cannot probe, so it is not evidence about
155
+ * any binary here and is skipped rather than guessed at.
156
+ */
157
+ export declare function readHarnessProvenance(payload: unknown): HarnessProvenance | null;
@@ -54,7 +54,7 @@
54
54
  import { spawnSync } from "node:child_process";
55
55
  import { childEnvironment } from "./child-env.js";
56
56
  /** The harnesses this runtime speaks a hook protocol for. */
57
- export const HARNESS_KINDS = ["claude-code", "cursor"];
57
+ export const HARNESS_KINDS = ["claude-code", "cursor", "codex", "grok", "muse"];
58
58
  /** Is `value` one of the harnesses this runtime knows? */
59
59
  export function isHarnessKind(value) {
60
60
  return typeof value === "string" && HARNESS_KINDS.includes(value);
@@ -68,6 +68,9 @@ export function isHarnessKind(value) {
68
68
  export const HARNESS_BINARY = {
69
69
  "claude-code": "claude",
70
70
  cursor: "cursor-agent",
71
+ codex: "codex",
72
+ grok: "grok",
73
+ muse: "muse",
71
74
  };
72
75
  /**
73
76
  * How long a version string may be, and the reason there is a cap at all.
@@ -1 +1 @@
1
- {"version":3,"file":"harness-version.js","sourceRoot":"","sources":["../../../src/core/harness-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAU,CAAC;AAIhE,0DAA0D;AAC1D,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3F,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAA0C;IACnE,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC,oFAAoF;AACpF,MAAM,SAAS,GAAG,iBAAiB,CAAC;AAEpC;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