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,176 @@
1
+ /**
2
+ * The committed log as an external witness (APRV-219).
3
+ *
4
+ * ## Why this exists
5
+ *
6
+ * The chain in `.approval/log/events.jsonl` is unkeyed. `docs/proposals/
7
+ * incremental-prefix-proof.md` §3 states the consequence plainly: a process
8
+ * with write access to that file can truncate it and recompute a chain that is
9
+ * self-consistent from genesis, and no cold walk of the file will ever say
10
+ * otherwise, because nothing INSIDE the file contradicts it. The conformance
11
+ * suite says the same thing from the other side — `chain-verification/
12
+ * truncation-unanchored` is a boundary vector: records dropped off the tail with
13
+ * no external anchor leave a valid chain, and an implementation that reports
14
+ * corruption there is wrong.
15
+ *
16
+ * The word in that vector's name is the whole design of this module. What the
17
+ * same-user process cannot rewrite is the copy of the log that is already
18
+ * COMMITTED: a records branch pushed by the advance cadence (APRV-204), a log
19
+ * sync's fast-forward (APRV-125), the trunk behind a protected branch on
20
+ * GitHub. Those bytes are an anchor. Comparing the working log's prefix against
21
+ * them turns "the chain is self-consistent" into "the chain is self-consistent
22
+ * AND it still carries the records somebody else has a copy of".
23
+ *
24
+ * ## What this module does and does not do
25
+ *
26
+ * It READS git. `git rev-parse <rev>:<path>` for a blob id and `git show` for
27
+ * its bytes, both run from the checkout root, never a fetch and never a write.
28
+ * Fetching is the advance verb's job (APRV-203); a verification path that went
29
+ * to the network would be a verification path that fails when the network does.
30
+ *
31
+ * It writes nothing: not the log, not the anchor, not a cache file. The only
32
+ * state it keeps is a process-local map from a git blob id to the facts about
33
+ * that blob, which is safe precisely because a blob id IS the hash of the bytes:
34
+ * two repositories cannot disagree about what one oid holds.
35
+ *
36
+ * A missing anchor is a SKIP with a reason and never a pass. A repository with
37
+ * no committed copy of the log has not proved the working log is honest; it has
38
+ * failed to say anything about it, and those are different answers.
39
+ */
40
+ import type { EventRecord } from "../core/log.js";
41
+ import type { LogHead } from "../core/verify.js";
42
+ /**
43
+ * The refusal this check can produce. A closed union, per SPEC.md §11.1
44
+ * invariant 6, frozen the way every other union in this runtime is frozen:
45
+ * callers branch on the string.
46
+ *
47
+ * One code, deliberately. Everything else this check can conclude is a state
48
+ * rather than a refusal: no anchor at all is a skip, a working log that is a
49
+ * strict prefix of the anchor is `behind` (the ordinary state of a checkout
50
+ * that has just pulled), and only a working log whose bytes CONTRADICT the
51
+ * anchored ones is a refusal.
52
+ */
53
+ export declare const ANCHOR_REFUSAL_CODES: readonly ["anchor-diverged"];
54
+ export type AnchorRefusalCode = (typeof ANCHOR_REFUSAL_CODES)[number];
55
+ /** `YYYY-MM-DD`, the shape the default records branch name carries. */
56
+ export declare function defaultRecordsBranch(today: string): string;
57
+ /** Every local anchor a previous advance left behind. Order is irrelevant. */
58
+ export declare function advanceAnchors(root: string): string[];
59
+ /** Where an anchor may be looked for. */
60
+ export interface AnchorWhere {
61
+ remote?: string;
62
+ base?: string | null;
63
+ /** An ISO timestamp; only its date half is read, for the day's records branch. */
64
+ today?: string;
65
+ }
66
+ /**
67
+ * The revs a committed copy of the log may live at, newest evidence first.
68
+ *
69
+ * This is `cli/log-advance.ts`'s `publishedState` resolution, lifted here so
70
+ * that the anchor check and the "what is not yet published" count read the same
71
+ * list. Two lists would be two chances to disagree about which copies of the log
72
+ * this repository can see, and the doctor prints both answers on adjacent rows.
73
+ *
74
+ * `HEAD` is last and is still a candidate: a checkout whose current commit
75
+ * carries the log HAS a committed copy of it, and a check that ignored that
76
+ * would report "never committed" about a log with thousands of committed
77
+ * records — which is exactly the misread APRV-210 recorded.
78
+ */
79
+ export declare function anchorRevs(root: string, where?: AnchorWhere): string[];
80
+ /** One committed copy of the log, and everything a comparison needs from it. */
81
+ export interface Anchor {
82
+ /** The rev it was read at, as the check names it in its own messages. */
83
+ rev: string;
84
+ /** Git's object id for the blob. Content-addressed, so it is also the cache key. */
85
+ oid: string;
86
+ /** Byte length of the anchored copy. */
87
+ byteLength: number;
88
+ /** SHA-256 of those bytes, hex. Not a chain hash: a digest of the file. */
89
+ digest: string;
90
+ /** The anchored chain's head. Never null — an empty copy anchors nothing. */
91
+ head: LogHead;
92
+ /** How many records the anchored copy carries. */
93
+ records: number;
94
+ }
95
+ /** Drop the cache. Exported for tests, which build a new repository per case. */
96
+ export declare function forgetAnchorBlobs(): void;
97
+ /** What {@link resolveAnchor} found. A skip carries the reason, always. */
98
+ export type AnchorResolution = {
99
+ ok: true;
100
+ anchor: Anchor;
101
+ } | {
102
+ ok: false;
103
+ reason: string;
104
+ revs: readonly string[];
105
+ };
106
+ /**
107
+ * The newest committed copy of the log this repository can see.
108
+ *
109
+ * "Newest" is the highest chain head among the candidate revs, not the newest
110
+ * commit: the question is how much of the log somebody else already holds, and
111
+ * a records branch that is one commit older but carries more records is the
112
+ * better witness. Ties keep the first rev in {@link anchorRevs} order, which
113
+ * puts an advance anchor ahead of the trunk ahead of `HEAD`.
114
+ */
115
+ export declare function resolveAnchor(root: string, logPath: string, options?: {
116
+ rev?: string;
117
+ schemaDir?: string;
118
+ } & AnchorWhere): AnchorResolution;
119
+ /** How the working log stands against the anchor. */
120
+ export type AnchorCheck = {
121
+ status: "pass";
122
+ anchor: Anchor;
123
+ /** Working records beyond the anchored head. Zero when the two are equal. */
124
+ ahead: number;
125
+ workingBytes: number;
126
+ detail: string;
127
+ } | {
128
+ status: "behind";
129
+ anchor: Anchor;
130
+ /** Anchored records the working log does not carry. Always above zero. */
131
+ behind: number;
132
+ workingBytes: number;
133
+ detail: string;
134
+ } | {
135
+ status: "skip";
136
+ reason: string;
137
+ } | {
138
+ status: "diverged";
139
+ code: AnchorRefusalCode;
140
+ anchor: Anchor;
141
+ workingBytes: number;
142
+ message: string;
143
+ };
144
+ /** What {@link checkLogAnchor} is asked. `records` is the VERIFIED working log. */
145
+ export interface AnchorCheckOptions extends AnchorWhere {
146
+ logPath: string;
147
+ /**
148
+ * The working log's records, already verified by the caller.
149
+ *
150
+ * Required rather than re-derived, for SPEC.md §11.1 invariant 1: this check
151
+ * reads only verified records, and a check that walked the chain itself would
152
+ * be a second opinion about a question its caller has already answered.
153
+ */
154
+ records: readonly EventRecord[];
155
+ /** An explicit rev, instead of the default resolution. */
156
+ rev?: string;
157
+ schemaDir?: string;
158
+ }
159
+ /**
160
+ * Compare the working log's prefix against the newest committed copy of it.
161
+ *
162
+ * Two facts are checked, and they are checked separately on purpose:
163
+ *
164
+ * 1. **The bytes.** The working log's first `anchor.byteLength` bytes must hash
165
+ * to the anchor's digest. This is a claim about the FILE, stricter than any
166
+ * claim about the chain: a rewrite that preserves every record hash while
167
+ * changing the bytes around them (whitespace, key order in a re-serialized
168
+ * line) still fails here.
169
+ * 2. **The head.** The working log's record at the anchor's head seq must carry
170
+ * the anchor's hash. Implied by (1) whenever (1) holds, and stated anyway,
171
+ * because it is the fact a human reads in the message and the one that names
172
+ * which record the two copies stopped agreeing at.
173
+ */
174
+ export declare function checkLogAnchor(options: AnchorCheckOptions): AnchorCheck;
175
+ /** One anchor, as messages and rows spell one. */
176
+ export declare function describeAnchor(anchor: Anchor): string;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The CLI edge of `approval log checkpoint` (APRV-220).
3
+ *
4
+ * As everywhere else in this CLI, no logic lives here: `core/checkpoint.ts`
5
+ * signs and appends, and this file splits argv, decides WHERE the private key
6
+ * may come from, maps the result onto the frozen exit table, and decides what a
7
+ * terminal sees.
8
+ *
9
+ * ## Where the key may come from, and why that decision is NOT here any more
10
+ *
11
+ * `core/checkpoint.ts` takes the private key as a value and reads it from
12
+ * nowhere. That is deliberate: custody is a policy question, and answering it in
13
+ * one place means there is one file to read to learn every way a checkpoint key
14
+ * can reach a signature. Until APRV-257 that file was this one, because a
15
+ * terminal was the only place a checkpoint could be signed. The channel tap
16
+ * added two more callers, so the decision MOVED to `cli/checkpoint-tap.ts`
17
+ * rather than being copied into them, and this verb resolves its key with
18
+ * everyone else's function. The property is unchanged; the file holding it is
19
+ * not.
20
+ */
21
+ import type { Streams } from "./main.js";
22
+ export declare function commandLogCheckpoint(argv: string[], streams: Streams, cwd: string): number;
@@ -0,0 +1,243 @@
1
+ /**
2
+ * `approval log sync` (APRV-125) — the pull half of the log ritual, as a verb.
3
+ *
4
+ * ## The ritual this replaces
5
+ *
6
+ * Bringing the committed log up to date used to be a hand-run sequence: stash
7
+ * the working `events.jsonl`, pull, pop the stash, hope. It was our own
8
+ * sanctioned runbook and it was dangerous three ways.
9
+ *
10
+ * 1. It rewound the working log through git while a daemon held it open for
11
+ * append. That is fork 2 of 2026-08-20 (APRV-104's notes): a rewound file
12
+ * under a live appender, and two chains where there was one.
13
+ * 2. It reached the approver's phone as `policy.edit` over a protected path —
14
+ * a true label that told the human nothing about what was happening.
15
+ * 3. `git stash pop` can conflict, and on the day it did, it left conflict
16
+ * markers inside the log file mid-ceremony.
17
+ *
18
+ * The precedent for turning it into a verb is `policy amend` after the seq 2
19
+ * incident: when a hand-ritual proves dangerous, it becomes deterministic code
20
+ * the gate can read.
21
+ *
22
+ * ## The sequence, and why each step is where it is
23
+ *
24
+ * Everything below runs inside ONE hold of the append lockfile. The lock is
25
+ * usually taken per-append; here it spans the whole operation, because an
26
+ * append landing between the snapshot and the restore is precisely the
27
+ * interleaving that forks a chain.
28
+ *
29
+ * 1. **Primary checkout only.** The committed log has one home. A worktree has
30
+ * no business synchronizing it, and `log-sync-not-primary` says so.
31
+ * 2. **Verify before touching anything.** The working chain is walked and its
32
+ * head recorded. Nothing is decided from a log that does not verify.
33
+ * 3. **Snapshot, not stash.** The working log is copied aside, atomically, to
34
+ * a file inside `.approval/`. `git stash` is never used, and the log never
35
+ * routes through git state mutation.
36
+ * 4. **Baseline.** The working LOG is set to the bytes git has at `HEAD`, so
37
+ * the path is clean and a fast-forward merge can move over it. This is a
38
+ * plain write of bytes we already hold, not a checkout: the snapshot from
39
+ * step 3 is the only copy that matters and it is already safe. The queue
40
+ * projection is deliberately NOT baselined here; see the section below.
41
+ * 5. **Fetch, then a fast-forward CHECK, then the projections are discarded,
42
+ * then the merge.** A non-fast-forward is named and refused rather than
43
+ * merged; a merge commit over a log is a merge of two hash chains, which is
44
+ * not a thing that exists.
45
+ * 6. **Payload reconciliation, between the check and the merge.** See the
46
+ * section below: untracked payload files the incoming tree also carries are
47
+ * proved byte-identical and then removed, so the fast-forward has a clean
48
+ * path to write them onto.
49
+ * 7. **Reconcile.** The committed chain must be a prefix of the snapshot, or
50
+ * equal to it, or an extension of it. Anything else is a fork:
51
+ * `log-diverged`, both heads, the first divergent seq, snapshot restored,
52
+ * nothing else touched. The comparison is `core/log-reconcile.ts`, shared
53
+ * with doctor's `log-drift` check.
54
+ * 8. **Projections are REBUILT, never copied back.** QUEUE.md is re-rendered
55
+ * from the reconciled log and the index is reindexed from it. The direction
56
+ * is load-bearing: a projection restored from before the pull would be a
57
+ * screenshot asserting something the log no longer says.
58
+ * 9. **Post-verify**, and only then is the snapshot removed.
59
+ *
60
+ * Any failure at any step restores the snapshot before returning. The working
61
+ * log is never left in a half state, and the snapshot outlives every failure
62
+ * path that could need it.
63
+ *
64
+ * ## Untracked payload files, and why the merge used to stop on them (APRV-225)
65
+ *
66
+ * On 2026-09-02, after a records advance to seq 11361 merged, `log sync` in the
67
+ * primary checkout refused `log-sync-git-failed`: `git merge --ff-only` will not
68
+ * write over an untracked working-tree file, and the advance had committed 33
69
+ * payload files that this checkout already held untracked. Every one of them was
70
+ * byte-identical to the incoming blob — they are content-addressed, so identical
71
+ * by construction — and the only way forward was a hand step: move them aside,
72
+ * sync, put them back.
73
+ *
74
+ * That hand step is now step 6, on the same reasoning as the whole verb: when a
75
+ * hand-ritual is provably safe, it becomes deterministic code, and when it is
76
+ * NOT provably safe it refuses rather than guessing. The proof is per file, and
77
+ * every part of it runs before a single byte is removed:
78
+ *
79
+ * - the local file is **self-addressed** — SHA-256 of its bytes is its own name
80
+ * (the store writes RFC 8785 canonical bytes, so this holds for anything
81
+ * `storePayload` wrote); the `{"$ref": …}` reference form is the store's
82
+ * documented exception and is carried on byte equality alone.
83
+ * - the local bytes **equal the incoming blob**, compared as bytes read through
84
+ * `git show`. Not git's blob id: that is SHA-1 over a header plus the content
85
+ * and has nothing to do with the SHA-256 content address the store uses, so
86
+ * comparing names to blob ids would be comparing two different hashes of two
87
+ * different things and calling the disagreement a fork.
88
+ *
89
+ * A payload that fails either test refuses `log-sync-payload-mismatch`, naming
90
+ * the file. A payload is the material evidence an approval bound to: two
91
+ * different versions of one is not a merge conflict to be resolved, it is a
92
+ * question about which bytes a human said yes to. Nothing is merged, nothing is
93
+ * appended, and the working tree is left as it was found.
94
+ *
95
+ * A local payload the incoming tree does **not** carry is not this verb's
96
+ * business and is not touched: it blocks nothing, and it is very likely a
97
+ * payload this checkout has recorded and not yet advanced.
98
+ *
99
+ * ## The queue projection is disposable, and discarded LATE (APRV-292)
100
+ *
101
+ * On 2026-09-07, after a records pull request that carried `.approval/QUEUE.md`
102
+ * as well as the log, `log sync` refused twice with git's "local changes to
103
+ * .approval/QUEUE.md would be overwritten", the second time immediately after a
104
+ * hand-run `git checkout -- .approval/QUEUE.md`. The hand step was not wrong,
105
+ * it was just early: the running daemon re-rendered the projection again before
106
+ * the fast-forward reached it.
107
+ *
108
+ * The two files are exposed to different writers, which is why they are handled
109
+ * differently. Nothing can append to the log while this verb runs — sync holds
110
+ * the append lock for the whole ceremony, and every appender takes it. Nothing
111
+ * at all holds the projection: `channels/render-queue.ts`'s `writeQueue` renders
112
+ * and renames `QUEUE.md` on every daemon tick, under no lock, by design (the
113
+ * TTL countdowns in it move even when the log does not, so the file is rewritten
114
+ * whether or not anything was appended). A
115
+ * projection baselined at step 4 can therefore be dirty again by the time `git
116
+ * merge --ff-only` looks at it, and a stale render is enough to stop a pull of
117
+ * the log.
118
+ *
119
+ * So the projection is not baselined with the log. It is **discarded** as the
120
+ * last statement before the merge, which is the narrowest window this verb can
121
+ * offer, and when the merge fails with a projection dirty again the discard and
122
+ * the merge are retried exactly once. What is discarded is a rendering of the
123
+ * log, rebuilt at step 8 from the reconciled log, so there is nothing here to
124
+ * weigh: a projection carries no truth of its own and losing the last render
125
+ * costs nothing but the render. A projection git neither has at `HEAD` nor
126
+ * carries in the incoming tree is left alone, because it can stop no merge —
127
+ * `.approval/index.sqlite` is gitignored, and clearing a cache that blocks
128
+ * nothing would only make the next reader rebuild it.
129
+ *
130
+ * The snapshot the queue still gets is for the REFUSAL path alone: a refusal
131
+ * leaves the whole working tree as it was found, log and projection together.
132
+ * No success path ever copies it back — see step 8.
133
+ *
134
+ * ## This verb appends no event
135
+ *
136
+ * The log records decisions with real-world consequence. A fast-forward pull of
137
+ * the file the log lives in is housekeeping on the container, not a decision
138
+ * about the world, and an event for it would be the log narrating its own
139
+ * filesystem. Nothing here calls `appendEvent`, and the tests pin that the head
140
+ * seq is unchanged by a successful sync (SPEC §10.1, amended APRV-125).
141
+ */
142
+ import { type LogDrift, type LogRelation } from "../core/log-reconcile.js";
143
+ import type { LogHead } from "../core/verify.js";
144
+ /**
145
+ * The steps, named. They are a public shape because the failure-injection hook
146
+ * takes one, and because a refusal says which step it stopped at.
147
+ */
148
+ export declare const LOG_SYNC_STEPS: readonly ["primary", "verify", "snapshot", "baseline", "fetch", "ff-check", "payloads", "merge", "reconcile", "projections", "post-verify"];
149
+ export type LogSyncStep = (typeof LOG_SYNC_STEPS)[number];
150
+ /**
151
+ * Machine-readable refusal codes. Frozen public API, printed in the help.
152
+ *
153
+ * `log-diverged` is the one that matters and the one the runbook is written
154
+ * for: it is the only outcome here that means a human has to reconcile two
155
+ * chains by hand, because nothing in this codebase may do it for them.
156
+ */
157
+ export declare const LOG_SYNC_REFUSAL_CODES: readonly ["log-sync-not-primary", "log-sync-no-branch", "log-sync-unverified", "log-sync-not-fast-forward", "log-sync-payload-mismatch", "log-diverged", "log-sync-locked", "log-sync-git-failed", "log-sync-projection-failed", "log-sync-restore-failed", "log-sync-io"];
158
+ export type LogSyncRefusalCode = (typeof LOG_SYNC_REFUSAL_CODES)[number];
159
+ /** Test-only seams. Nothing in the CLI sets these; the suites do. */
160
+ export interface LogSyncHooks {
161
+ /**
162
+ * Fail just before this step runs, as an injected I/O error would.
163
+ *
164
+ * This exists so the snapshot-restore guarantee can be tested per step
165
+ * rather than argued for. It is a parameter of the FUNCTION and not a CLI
166
+ * flag on purpose: the shipped surface has no way to ask for a failure.
167
+ */
168
+ failBefore?: LogSyncStep;
169
+ /**
170
+ * Run `run` just before `step`, as a concurrent writer would (APRV-292).
171
+ *
172
+ * The daemon rewrites `QUEUE.md` under no lock, so "the projection is dirty
173
+ * again between the baseline and the merge" is a real interleaving and not a
174
+ * hypothesis. A test that cannot produce it can only assert that the code
175
+ * looks right. Like {@link failBefore} this is a parameter of the function and
176
+ * never a CLI flag: the shipped surface has no way to ask for interference.
177
+ */
178
+ interfere?: {
179
+ step: LogSyncStep;
180
+ run: () => void;
181
+ };
182
+ }
183
+ export interface LogSyncOptions {
184
+ cwd: string;
185
+ /** Remote to fetch from. Default `origin`. */
186
+ remote?: string;
187
+ /** Branch to fast-forward onto. Default: the checked-out branch. */
188
+ branch?: string | null;
189
+ hooks?: LogSyncHooks;
190
+ }
191
+ /** What a successful sync did. The `--json` success shape is built from this. */
192
+ export interface LogSyncReport {
193
+ root: string;
194
+ logPath: string;
195
+ remote: string;
196
+ branch: string;
197
+ commitBefore: string;
198
+ commitAfter: string;
199
+ /** How many commits the fast-forward brought in. */
200
+ pulled: number;
201
+ headBefore: LogHead | null;
202
+ headAfter: LogHead | null;
203
+ relation: LogRelation;
204
+ ahead: number;
205
+ behind: number;
206
+ /** True when the snapshot was written back (the working chain was ahead). */
207
+ restored: boolean;
208
+ /**
209
+ * How many untracked payload files were proved byte-identical to the incoming
210
+ * tree and stood aside so the fast-forward could write them (APRV-225).
211
+ */
212
+ payloadsReconciled: number;
213
+ queue: {
214
+ path: string;
215
+ bytes: number;
216
+ };
217
+ index: "rebuilt" | "absent";
218
+ }
219
+ export type LogSyncResult = {
220
+ ok: true;
221
+ report: LogSyncReport;
222
+ } | {
223
+ ok: false;
224
+ code: LogSyncRefusalCode;
225
+ message: string;
226
+ /** The step that refused, for the report and the tests. */
227
+ step: LogSyncStep;
228
+ /** Present on `log-diverged`: the whole comparison. */
229
+ drift?: LogDrift;
230
+ /** Verbatim git output, for a runbook's quote block. */
231
+ quote?: readonly string[];
232
+ /** True when the working log is back exactly as it was found. */
233
+ restored: boolean;
234
+ };
235
+ /**
236
+ * `approval log sync`, as a function.
237
+ *
238
+ * The CLI wrapper does argv, exit codes, and formatting; everything that could
239
+ * damage a log is here, in one sequence, with one restore path.
240
+ */
241
+ export declare function logSync(options: LogSyncOptions): LogSyncResult;
242
+ /** A commit, as a human reads one. */
243
+ export declare function short(commit: string): string;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The CLI edge of `approval log sync` and `approval log advance` (APRV-125).
3
+ *
4
+ * As everywhere else in this CLI, no logic lives here. The ceremonies are
5
+ * `cli/log-sync.ts` and `cli/log-advance.ts`; this file splits argv, reads the
6
+ * clock once at the edge, maps a result onto the frozen exit table, and decides
7
+ * what a terminal sees.
8
+ *
9
+ * The refusals that a human has to ACT on are rendered as runbooks (APRV-129):
10
+ * `log-diverged` above all, because it is the one outcome that ends with a
11
+ * person deciding which of two chains is the log, and a paragraph is the wrong
12
+ * shape for that.
13
+ */
14
+ import type { Streams } from "./main.js";
15
+ export declare function commandLogSync(argv: string[], streams: Streams, cwd: string): number;
16
+ export declare function commandLogAdvance(argv: string[], streams: Streams, cwd: string): number;
@@ -14,7 +14,7 @@
14
14
  import { boolFlag, parseFlags, stringFlag } from "./args.js";
15
15
  import { EXIT_INTEGRITY, EXIT_IO, EXIT_OK, EXIT_USAGE } from "./exit-codes.js";
16
16
  import { LOG_ADVANCE_HELP, LOG_SYNC_HELP } from "./help.js";
17
- import { logAdvance } from "./log-advance.js";
17
+ import { logAdvance, validateCoAuthor, } from "./log-advance.js";
18
18
  import { logSync, short } from "./log-sync.js";
19
19
  import { createProgress, silentProgress } from "./progress.js";
20
20
  import { describeHead } from "../core/log-reconcile.js";
@@ -33,6 +33,7 @@ const ADVANCE_FLAGS = {
33
33
  "--base": "string",
34
34
  "--pr": "boolean",
35
35
  "--no-auto-merge": "boolean",
36
+ "--co-author": "string",
36
37
  "--dry-run": "boolean",
37
38
  "--json": "boolean",
38
39
  "--help": "boolean",
@@ -204,6 +205,10 @@ export function commandLogAdvance(argv, streams, cwd) {
204
205
  if (base !== null && base.trim().length === 0) {
205
206
  return usageError(streams, json, "--base expects a branch name", LOG_ADVANCE_HELP);
206
207
  }
208
+ const requestedCoAuthor = stringFlag(parsed.flags, "--co-author");
209
+ const coAuthor = validateCoAuthor(requestedCoAuthor ?? undefined);
210
+ if (!coAuthor.ok)
211
+ return usageError(streams, json, coAuthor.message, LOG_ADVANCE_HELP);
207
212
  const result = logAdvance({
208
213
  cwd,
209
214
  today: new Date().toISOString(),
@@ -212,6 +217,7 @@ export function commandLogAdvance(argv, streams, cwd) {
212
217
  ...(remote === null ? {} : { remote }),
213
218
  ...(branch === null ? {} : { branch }),
214
219
  ...(base === null ? {} : { base }),
220
+ ...(coAuthor.value === null ? {} : { coAuthor: coAuthor.value }),
215
221
  ...(boolFlag(parsed.flags, "--pr") ? { pr: true } : {}),
216
222
  // APRV-284. Armed unless the operator says otherwise, and the flag is read
217
223
  // whether or not `--pr` was passed: `logAdvance` ignores it without a pull
@@ -1 +1 @@
1
- {"version":3,"file":"log-verbs.js","sourceRoot":"","sources":["../../../src/cli/log-verbs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,UAAU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,IAAI,CAAC,IAAI,CAAC,EAAE;gBACxD,qDAAqD;aACtD;YACD,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,wBAAwB,IAAI,EAAE,EAAE,CAAC,CAAC;YACpF,MAAM,EAAE;gBACN,wEAAwE;gBACxE,wCAAwC;aACzC;SACF,CAAC,IAAI,CACP,CAAC;QACF,OAAO,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,IAAI,EAAE;QAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9E,OAAO,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC;AAChE,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * `--help --long`: the short help plus the reasoning behind it (APRV-91 #16).
3
+ *
4
+ * APRV-91 split every per-verb help in two. What is left in `src/cli/help.ts`
5
+ * is the SHORT form, capped at 25 lines: usage, one paragraph of intent, the
6
+ * flags, a footer. The prose that used to sit under it — the threat models, the
7
+ * design points that surprise people, the alternatives that were rejected — was
8
+ * MOVED to `docs/cli-reference.md`, and every short help ends with the anchor it
9
+ * was moved to. This module is the other half of that bargain: `--long` follows
10
+ * the anchor and prints the section inline, so the reader who wants the
11
+ * reasoning never has to leave the terminal to find it.
12
+ *
13
+ * WHERE THE LONG FORM COMES FROM, and why it is not a constant.
14
+ *
15
+ * The alternatives were to keep a `*_LONG_HELP` constant beside every short one,
16
+ * to generate an embedded module from the docs at build time, or to read the
17
+ * docs file at runtime. Constants lose immediately: the same prose would exist
18
+ * twice, in the help module and in the reference a `why:` footer points at, and
19
+ * two copies of grandfathered prose drift the first time someone edits one.
20
+ * Build-time embedding fixes the drift but buys a generated file, a codegen
21
+ * step and a staleness guard to protect a file the package already ships.
22
+ *
23
+ * So: read `docs/cli-reference.md` at runtime, and SHIP IT. `package.json`
24
+ * `files` now names it, and the path below resolves the same way in the repo
25
+ * (`dist/src/cli/` to the root) and in an installed package, because the
26
+ * published layout keeps that relationship. There is exactly one copy of the
27
+ * prose and it is the one a reader on GitHub sees.
28
+ *
29
+ * The failure mode is handled rather than thrown: a missing or unreadable
30
+ * reference makes `--long` print the short help and a plain line saying where
31
+ * the prose should have been. `--long` is a documentation flag, and a
32
+ * documentation flag that exits non-zero because a doc file moved would be a
33
+ * worse bug than the missing prose.
34
+ */
35
+ import { type Style } from "./style.js";
36
+ /**
37
+ * The help text for a command line, by longest matching title line.
38
+ *
39
+ * The mapping is DERIVED rather than declared: every help constant opens with
40
+ * `approval <verb path> — …`, which `verbOf` already parses for the usage-error
41
+ * pointer. Longest match wins, so `log tail` finds TAIL_HELP rather than
42
+ * LOG_HELP. A declared table would be a second list of verbs to forget to
43
+ * update; this one cannot fall out of step with the constants it indexes.
44
+ */
45
+ export declare function helpFor(words: readonly string[]): string | null;
46
+ /** The `why: docs/cli-reference.md#anchor` footer's anchor, when there is one. */
47
+ export declare function anchorOf(helpText: string): string | null;
48
+ /**
49
+ * The body of the section `anchor` names, headings included, trimmed.
50
+ *
51
+ * A section runs to the next heading AT THE SAME LEVEL OR SHALLOWER, so a `##`
52
+ * section keeps its own `###` subsections and a `###` section stops at its
53
+ * sibling. That is what makes one anchor able to carry a whole verb family.
54
+ */
55
+ export declare function referenceSection(anchor: string, markdown: string): string | null;
56
+ /** Read the shipped reference, or null when it is not there. */
57
+ export declare function readReference(path?: string): string | null;
58
+ export interface LongHelpOptions {
59
+ /** Override the reference text. Tests use it; the CLI never passes it. */
60
+ reference?: string | null;
61
+ style?: Style;
62
+ }
63
+ /**
64
+ * The whole `--help --long` output: the short help, a rule, and the reasoning.
65
+ *
66
+ * The short form is printed VERBATIM and first. `--long` is additive by
67
+ * definition: an operator who has learned to read the short help must not have
68
+ * to re-find their bearings in a different layout because they asked for more.
69
+ */
70
+ export declare function longHelp(helpText: string, options?: LongHelpOptions): string;