@quickchatai/pi-quickreview 0.0.0-stage → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (697) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +75 -2
  3. package/assets/agents/pass-abstraction.md +64 -0
  4. package/assets/agents/pass-ask-human.md +134 -0
  5. package/assets/agents/pass-backcompat.md +67 -0
  6. package/assets/agents/pass-baseline.md +61 -0
  7. package/assets/agents/pass-behaviour-delta.md +64 -0
  8. package/assets/agents/pass-bounds.md +36 -0
  9. package/assets/agents/pass-claims.md +31 -0
  10. package/assets/agents/pass-concurrency.md +168 -0
  11. package/assets/agents/pass-consistency.md +57 -0
  12. package/assets/agents/pass-contracts.md +30 -0
  13. package/assets/agents/pass-data-safety.md +54 -0
  14. package/assets/agents/pass-deferred.md +35 -0
  15. package/assets/agents/pass-delivery.md +37 -0
  16. package/assets/agents/pass-duplication.md +60 -0
  17. package/assets/agents/pass-intent.md +63 -0
  18. package/assets/agents/pass-lint-conformance.md +46 -0
  19. package/assets/agents/pass-maintainability.md +67 -0
  20. package/assets/agents/pass-placement.md +68 -0
  21. package/assets/agents/pass-prod-risk.md +24 -0
  22. package/assets/agents/pass-rollout.md +32 -0
  23. package/assets/agents/pass-roundtrip.md +46 -0
  24. package/assets/agents/pass-security.md +31 -0
  25. package/assets/agents/pass-simplicity.md +68 -0
  26. package/assets/agents/pass-statelessness.md +27 -0
  27. package/assets/agents/pass-style.md +37 -0
  28. package/assets/agents/pass-sweep.md +57 -0
  29. package/assets/agents/pass-tests.md +58 -0
  30. package/assets/agents/pass-ui.md +23 -0
  31. package/assets/agents/pass-validate.md +50 -0
  32. package/assets/agents/pass-widened.md +46 -0
  33. package/assets/agents/scan/pass-scan.md +86 -0
  34. package/assets/config.example.toml +1099 -0
  35. package/assets/deploy/reviewer/AGENTS.override.md +12 -0
  36. package/assets/profiles/default/README.md +21 -0
  37. package/assets/profiles/default/addenda/.gitkeep +0 -0
  38. package/assets/profiles/default/profile.toml +17 -0
  39. package/assets/profiles/example-django/README.md +21 -0
  40. package/assets/profiles/example-django/addenda/10-migration-discipline.md +13 -0
  41. package/assets/profiles/example-django/addenda/20-new-column-nullability.md +12 -0
  42. package/assets/profiles/example-django/addenda/30-test-doctrine.md +12 -0
  43. package/assets/profiles/example-django/addenda/40-orm-usage.md +19 -0
  44. package/assets/profiles/example-django/addenda/50-declared-shape.md +10 -0
  45. package/assets/profiles/example-django/addenda/60-config-placement.md +14 -0
  46. package/assets/profiles/example-django/heuristics.toml +24 -0
  47. package/assets/profiles/example-django/profile.toml +9 -0
  48. package/assets/profiles/fast/README.md +24 -0
  49. package/assets/profiles/fast/profile.toml +59 -0
  50. package/assets/profiles/minimal/README.md +17 -0
  51. package/assets/profiles/minimal/addenda/.gitkeep +0 -0
  52. package/assets/profiles/minimal/profile.toml +8 -0
  53. package/assets/profiles/snappy/README.md +24 -0
  54. package/assets/profiles/snappy/addenda/10-race-as-question.md +6 -0
  55. package/assets/profiles/snappy/profile.toml +46 -0
  56. package/assets/prompts/companion-day-open.md +46 -0
  57. package/assets/prompts/companion-first-run.md +104 -0
  58. package/assets/prompts/companion.md +821 -0
  59. package/assets/prompts/conversation-system.md +117 -0
  60. package/assets/prompts/eod-sweep.md +120 -0
  61. package/assets/prompts/onboarding.md +113 -0
  62. package/assets/prompts/pass-common.md +52 -0
  63. package/assets/prompts/pass-quality-common.md +22 -0
  64. package/assets/prompts/round-first.md +874 -0
  65. package/assets/prompts/round-follow-up.md +991 -0
  66. package/assets/prompts/round-re-review.md +889 -0
  67. package/assets/prompts/round-recheck.md +196 -0
  68. package/assets/prompts/round-staleness.md +856 -0
  69. package/assets/schemas/review-result.v1.json +391 -0
  70. package/assets/schemas/scan-result.v1.json +421 -0
  71. package/assets/schemas/version.v1.json +57 -0
  72. package/assets/seed-manifest.json +19 -0
  73. package/assets/seeds/agents/pass-baseline.md +61 -0
  74. package/assets/seeds/agents/pass-contracts.md +30 -0
  75. package/assets/seeds/agents/pass-data-safety.md +54 -0
  76. package/assets/seeds/agents/pass-delivery.md +37 -0
  77. package/assets/seeds/agents/pass-prod-risk.md +24 -0
  78. package/assets/seeds/agents/pass-security.md +31 -0
  79. package/assets/seeds/agents/pass-statelessness.md +27 -0
  80. package/assets/seeds/agents/pass-ui.md +23 -0
  81. package/assets/seeds/agents/pass-validate.md +50 -0
  82. package/assets/seeds/prompts/conversation-system.md +117 -0
  83. package/assets/seeds/prompts/eod-sweep.md +120 -0
  84. package/assets/seeds/prompts/pass-common.md +52 -0
  85. package/dist/extensions/bash-guard.d.ts +467 -0
  86. package/dist/extensions/bash-guard.d.ts.map +1 -0
  87. package/dist/extensions/bash-guard.js +3058 -0
  88. package/dist/extensions/bash-guard.js.map +1 -0
  89. package/dist/extensions/finding-clusters.d.ts +33 -0
  90. package/dist/extensions/finding-clusters.d.ts.map +1 -0
  91. package/dist/extensions/finding-clusters.js +218 -0
  92. package/dist/extensions/finding-clusters.js.map +1 -0
  93. package/dist/extensions/ledger-pin.d.ts +76 -0
  94. package/dist/extensions/ledger-pin.d.ts.map +1 -0
  95. package/dist/extensions/ledger-pin.js +331 -0
  96. package/dist/extensions/ledger-pin.js.map +1 -0
  97. package/dist/extensions/lens.d.ts +43 -0
  98. package/dist/extensions/lens.d.ts.map +1 -0
  99. package/dist/extensions/lens.js +150 -0
  100. package/dist/extensions/lens.js.map +1 -0
  101. package/dist/extensions/pi-tool.d.ts +22 -0
  102. package/dist/extensions/pi-tool.d.ts.map +1 -0
  103. package/dist/extensions/pi-tool.js +20 -0
  104. package/dist/extensions/pi-tool.js.map +1 -0
  105. package/dist/extensions/quickreview.d.ts +21 -0
  106. package/dist/extensions/quickreview.d.ts.map +1 -0
  107. package/dist/extensions/quickreview.js +132 -0
  108. package/dist/extensions/quickreview.js.map +1 -0
  109. package/dist/src/anchors.d.ts +54 -0
  110. package/dist/src/anchors.d.ts.map +1 -0
  111. package/dist/src/anchors.js +127 -0
  112. package/dist/src/anchors.js.map +1 -0
  113. package/dist/src/assetroot.d.ts +16 -0
  114. package/dist/src/assetroot.d.ts.map +1 -0
  115. package/dist/src/assetroot.js +77 -0
  116. package/dist/src/assetroot.js.map +1 -0
  117. package/dist/src/authwatch.d.ts +61 -0
  118. package/dist/src/authwatch.d.ts.map +1 -0
  119. package/dist/src/authwatch.js +210 -0
  120. package/dist/src/authwatch.js.map +1 -0
  121. package/dist/src/budget.d.ts +15 -0
  122. package/dist/src/budget.d.ts.map +1 -0
  123. package/dist/src/budget.js +32 -0
  124. package/dist/src/budget.js.map +1 -0
  125. package/dist/src/casebudget.d.ts +3 -0
  126. package/dist/src/casebudget.d.ts.map +1 -0
  127. package/dist/src/casebudget.js +3 -0
  128. package/dist/src/casebudget.js.map +1 -0
  129. package/dist/src/cigate.d.ts +116 -0
  130. package/dist/src/cigate.d.ts.map +1 -0
  131. package/dist/src/cigate.js +176 -0
  132. package/dist/src/cigate.js.map +1 -0
  133. package/dist/src/codespan.d.ts +46 -0
  134. package/dist/src/codespan.d.ts.map +1 -0
  135. package/dist/src/codespan.js +75 -0
  136. package/dist/src/codespan.js.map +1 -0
  137. package/dist/src/contextpack.d.ts +56 -0
  138. package/dist/src/contextpack.d.ts.map +1 -0
  139. package/dist/src/contextpack.js +195 -0
  140. package/dist/src/contextpack.js.map +1 -0
  141. package/dist/src/contract.d.ts +8 -0
  142. package/dist/src/contract.d.ts.map +1 -0
  143. package/dist/src/contract.js +21 -0
  144. package/dist/src/contract.js.map +1 -0
  145. package/dist/src/coverage.d.ts +32 -0
  146. package/dist/src/coverage.d.ts.map +1 -0
  147. package/dist/src/coverage.js +85 -0
  148. package/dist/src/coverage.js.map +1 -0
  149. package/dist/src/datafence.d.ts +19 -0
  150. package/dist/src/datafence.d.ts.map +1 -0
  151. package/dist/src/datafence.js +60 -0
  152. package/dist/src/datafence.js.map +1 -0
  153. package/dist/src/dedup.d.ts +65 -0
  154. package/dist/src/dedup.d.ts.map +1 -0
  155. package/dist/src/dedup.js +459 -0
  156. package/dist/src/dedup.js.map +1 -0
  157. package/dist/src/depsources.d.ts +304 -0
  158. package/dist/src/depsources.d.ts.map +1 -0
  159. package/dist/src/depsources.js +3367 -0
  160. package/dist/src/depsources.js.map +1 -0
  161. package/dist/src/diffinput.d.ts +10 -0
  162. package/dist/src/diffinput.d.ts.map +1 -0
  163. package/dist/src/diffinput.js +172 -0
  164. package/dist/src/diffinput.js.map +1 -0
  165. package/dist/src/doubtwords.d.ts +10 -0
  166. package/dist/src/doubtwords.d.ts.map +1 -0
  167. package/dist/src/doubtwords.js +13 -0
  168. package/dist/src/doubtwords.js.map +1 -0
  169. package/dist/src/ecosystem.d.ts +148 -0
  170. package/dist/src/ecosystem.d.ts.map +1 -0
  171. package/dist/src/ecosystem.js +338 -0
  172. package/dist/src/ecosystem.js.map +1 -0
  173. package/dist/src/engine/agentdir.d.ts +5 -0
  174. package/dist/src/engine/agentdir.d.ts.map +1 -0
  175. package/dist/src/engine/agentdir.js +21 -0
  176. package/dist/src/engine/agentdir.js.map +1 -0
  177. package/dist/src/engine/auth.d.ts +214 -0
  178. package/dist/src/engine/auth.d.ts.map +1 -0
  179. package/dist/src/engine/auth.js +374 -0
  180. package/dist/src/engine/auth.js.map +1 -0
  181. package/dist/src/engine/budget.d.ts +60 -0
  182. package/dist/src/engine/budget.d.ts.map +1 -0
  183. package/dist/src/engine/budget.js +113 -0
  184. package/dist/src/engine/budget.js.map +1 -0
  185. package/dist/src/engine/capfd.d.ts +6 -0
  186. package/dist/src/engine/capfd.d.ts.map +1 -0
  187. package/dist/src/engine/capfd.js +21 -0
  188. package/dist/src/engine/capfd.js.map +1 -0
  189. package/dist/src/engine/caseout.d.ts +66 -0
  190. package/dist/src/engine/caseout.d.ts.map +1 -0
  191. package/dist/src/engine/caseout.js +107 -0
  192. package/dist/src/engine/caseout.js.map +1 -0
  193. package/dist/src/engine/context.d.ts +57 -0
  194. package/dist/src/engine/context.d.ts.map +1 -0
  195. package/dist/src/engine/context.js +212 -0
  196. package/dist/src/engine/context.js.map +1 -0
  197. package/dist/src/engine/envmap.d.ts +13 -0
  198. package/dist/src/engine/envmap.d.ts.map +1 -0
  199. package/dist/src/engine/envmap.js +377 -0
  200. package/dist/src/engine/envmap.js.map +1 -0
  201. package/dist/src/engine/extfiles.d.ts +7 -0
  202. package/dist/src/engine/extfiles.d.ts.map +1 -0
  203. package/dist/src/engine/extfiles.js +23 -0
  204. package/dist/src/engine/extfiles.js.map +1 -0
  205. package/dist/src/engine/keyroute.d.ts +21 -0
  206. package/dist/src/engine/keyroute.d.ts.map +1 -0
  207. package/dist/src/engine/keyroute.js +58 -0
  208. package/dist/src/engine/keyroute.js.map +1 -0
  209. package/dist/src/engine/lens/cache-group.d.ts +20 -0
  210. package/dist/src/engine/lens/cache-group.d.ts.map +1 -0
  211. package/dist/src/engine/lens/cache-group.js +31 -0
  212. package/dist/src/engine/lens/cache-group.js.map +1 -0
  213. package/dist/src/engine/lens/cache-run.d.ts +65 -0
  214. package/dist/src/engine/lens/cache-run.d.ts.map +1 -0
  215. package/dist/src/engine/lens/cache-run.js +159 -0
  216. package/dist/src/engine/lens/cache-run.js.map +1 -0
  217. package/dist/src/engine/lens/deadline.d.ts +54 -0
  218. package/dist/src/engine/lens/deadline.d.ts.map +1 -0
  219. package/dist/src/engine/lens/deadline.js +111 -0
  220. package/dist/src/engine/lens/deadline.js.map +1 -0
  221. package/dist/src/engine/lens/engine-tools.d.ts +13 -0
  222. package/dist/src/engine/lens/engine-tools.d.ts.map +1 -0
  223. package/dist/src/engine/lens/engine-tools.js +37 -0
  224. package/dist/src/engine/lens/engine-tools.js.map +1 -0
  225. package/dist/src/engine/lens/env.d.ts +23 -0
  226. package/dist/src/engine/lens/env.d.ts.map +1 -0
  227. package/dist/src/engine/lens/env.js +42 -0
  228. package/dist/src/engine/lens/env.js.map +1 -0
  229. package/dist/src/engine/lens/launch-plan.d.ts +63 -0
  230. package/dist/src/engine/lens/launch-plan.d.ts.map +1 -0
  231. package/dist/src/engine/lens/launch-plan.js +203 -0
  232. package/dist/src/engine/lens/launch-plan.js.map +1 -0
  233. package/dist/src/engine/lens/leaf-cache.d.ts +22 -0
  234. package/dist/src/engine/lens/leaf-cache.d.ts.map +1 -0
  235. package/dist/src/engine/lens/leaf-cache.js +115 -0
  236. package/dist/src/engine/lens/leaf-cache.js.map +1 -0
  237. package/dist/src/engine/lens/permits.d.ts +14 -0
  238. package/dist/src/engine/lens/permits.d.ts.map +1 -0
  239. package/dist/src/engine/lens/permits.js +18 -0
  240. package/dist/src/engine/lens/permits.js.map +1 -0
  241. package/dist/src/engine/lens/registry.d.ts +55 -0
  242. package/dist/src/engine/lens/registry.d.ts.map +1 -0
  243. package/dist/src/engine/lens/registry.js +140 -0
  244. package/dist/src/engine/lens/registry.js.map +1 -0
  245. package/dist/src/engine/lens/round-lens.d.ts +16 -0
  246. package/dist/src/engine/lens/round-lens.d.ts.map +1 -0
  247. package/dist/src/engine/lens/round-lens.js +46 -0
  248. package/dist/src/engine/lens/round-lens.js.map +1 -0
  249. package/dist/src/engine/lens/runlens.d.ts +103 -0
  250. package/dist/src/engine/lens/runlens.d.ts.map +1 -0
  251. package/dist/src/engine/lens/runlens.js +538 -0
  252. package/dist/src/engine/lens/runlens.js.map +1 -0
  253. package/dist/src/engine/lens/section.d.ts +19 -0
  254. package/dist/src/engine/lens/section.d.ts.map +1 -0
  255. package/dist/src/engine/lens/section.js +40 -0
  256. package/dist/src/engine/lens/section.js.map +1 -0
  257. package/dist/src/engine/lens/semaphore.d.ts +13 -0
  258. package/dist/src/engine/lens/semaphore.d.ts.map +1 -0
  259. package/dist/src/engine/lens/semaphore.js +44 -0
  260. package/dist/src/engine/lens/semaphore.js.map +1 -0
  261. package/dist/src/engine/lens/tool.d.ts +34 -0
  262. package/dist/src/engine/lens/tool.d.ts.map +1 -0
  263. package/dist/src/engine/lens/tool.js +345 -0
  264. package/dist/src/engine/lens/tool.js.map +1 -0
  265. package/dist/src/engine/lens/wave.d.ts +63 -0
  266. package/dist/src/engine/lens/wave.d.ts.map +1 -0
  267. package/dist/src/engine/lens/wave.js +95 -0
  268. package/dist/src/engine/lens/wave.js.map +1 -0
  269. package/dist/src/engine/livesessions.d.ts +21 -0
  270. package/dist/src/engine/livesessions.d.ts.map +1 -0
  271. package/dist/src/engine/livesessions.js +57 -0
  272. package/dist/src/engine/livesessions.js.map +1 -0
  273. package/dist/src/engine/livewire.d.ts +18 -0
  274. package/dist/src/engine/livewire.d.ts.map +1 -0
  275. package/dist/src/engine/livewire.js +31 -0
  276. package/dist/src/engine/livewire.js.map +1 -0
  277. package/dist/src/engine/openable.d.ts +37 -0
  278. package/dist/src/engine/openable.d.ts.map +1 -0
  279. package/dist/src/engine/openable.js +120 -0
  280. package/dist/src/engine/openable.js.map +1 -0
  281. package/dist/src/engine/pisdk.d.ts +235 -0
  282. package/dist/src/engine/pisdk.d.ts.map +1 -0
  283. package/dist/src/engine/pisdk.js +577 -0
  284. package/dist/src/engine/pisdk.js.map +1 -0
  285. package/dist/src/engine/port.d.ts +144 -0
  286. package/dist/src/engine/port.d.ts.map +1 -0
  287. package/dist/src/engine/port.js +16 -0
  288. package/dist/src/engine/port.js.map +1 -0
  289. package/dist/src/engine/prompts.d.ts +159 -0
  290. package/dist/src/engine/prompts.d.ts.map +1 -0
  291. package/dist/src/engine/prompts.js +339 -0
  292. package/dist/src/engine/prompts.js.map +1 -0
  293. package/dist/src/engine/render.d.ts +10 -0
  294. package/dist/src/engine/render.d.ts.map +1 -0
  295. package/dist/src/engine/render.js +23 -0
  296. package/dist/src/engine/render.js.map +1 -0
  297. package/dist/src/engine/reviewruntime.d.ts +13 -0
  298. package/dist/src/engine/reviewruntime.d.ts.map +1 -0
  299. package/dist/src/engine/reviewruntime.js +35 -0
  300. package/dist/src/engine/reviewruntime.js.map +1 -0
  301. package/dist/src/engine/reviewsdk.d.ts +75 -0
  302. package/dist/src/engine/reviewsdk.d.ts.map +1 -0
  303. package/dist/src/engine/reviewsdk.js +180 -0
  304. package/dist/src/engine/reviewsdk.js.map +1 -0
  305. package/dist/src/engine/round.d.ts +166 -0
  306. package/dist/src/engine/round.d.ts.map +1 -0
  307. package/dist/src/engine/round.js +543 -0
  308. package/dist/src/engine/round.js.map +1 -0
  309. package/dist/src/engine/roundagents.d.ts +17 -0
  310. package/dist/src/engine/roundagents.d.ts.map +1 -0
  311. package/dist/src/engine/roundagents.js +49 -0
  312. package/dist/src/engine/roundagents.js.map +1 -0
  313. package/dist/src/engine/roundevents.d.ts +110 -0
  314. package/dist/src/engine/roundevents.d.ts.map +1 -0
  315. package/dist/src/engine/roundevents.js +276 -0
  316. package/dist/src/engine/roundevents.js.map +1 -0
  317. package/dist/src/engine/roundsdk.d.ts +33 -0
  318. package/dist/src/engine/roundsdk.d.ts.map +1 -0
  319. package/dist/src/engine/roundsdk.js +76 -0
  320. package/dist/src/engine/roundsdk.js.map +1 -0
  321. package/dist/src/engine/sdkruntime.d.ts +23 -0
  322. package/dist/src/engine/sdkruntime.d.ts.map +1 -0
  323. package/dist/src/engine/sdkruntime.js +340 -0
  324. package/dist/src/engine/sdkruntime.js.map +1 -0
  325. package/dist/src/engine/select.d.ts +16 -0
  326. package/dist/src/engine/select.d.ts.map +1 -0
  327. package/dist/src/engine/select.js +32 -0
  328. package/dist/src/engine/select.js.map +1 -0
  329. package/dist/src/engine/sessionwrap.d.ts +4 -0
  330. package/dist/src/engine/sessionwrap.d.ts.map +1 -0
  331. package/dist/src/engine/sessionwrap.js +31 -0
  332. package/dist/src/engine/sessionwrap.js.map +1 -0
  333. package/dist/src/engine/toolfence.d.ts +90 -0
  334. package/dist/src/engine/toolfence.d.ts.map +1 -0
  335. package/dist/src/engine/toolfence.js +378 -0
  336. package/dist/src/engine/toolfence.js.map +1 -0
  337. package/dist/src/engine/tooluid.d.ts +128 -0
  338. package/dist/src/engine/tooluid.d.ts.map +1 -0
  339. package/dist/src/engine/tooluid.js +401 -0
  340. package/dist/src/engine/tooluid.js.map +1 -0
  341. package/dist/src/envstrip.d.ts +10 -0
  342. package/dist/src/envstrip.d.ts.map +1 -0
  343. package/dist/src/envstrip.js +15 -0
  344. package/dist/src/envstrip.js.map +1 -0
  345. package/dist/src/escalationprompt.d.ts +22 -0
  346. package/dist/src/escalationprompt.d.ts.map +1 -0
  347. package/dist/src/escalationprompt.js +54 -0
  348. package/dist/src/escalationprompt.js.map +1 -0
  349. package/dist/src/execfn.d.ts +29 -0
  350. package/dist/src/execfn.d.ts.map +1 -0
  351. package/dist/src/execfn.js +55 -0
  352. package/dist/src/execfn.js.map +1 -0
  353. package/dist/src/finding-chain.d.ts +40 -0
  354. package/dist/src/finding-chain.d.ts.map +1 -0
  355. package/dist/src/finding-chain.js +76 -0
  356. package/dist/src/finding-chain.js.map +1 -0
  357. package/dist/src/finding-row.d.ts +24 -0
  358. package/dist/src/finding-row.d.ts.map +1 -0
  359. package/dist/src/finding-row.js +26 -0
  360. package/dist/src/finding-row.js.map +1 -0
  361. package/dist/src/findingkey.d.ts +99 -0
  362. package/dist/src/findingkey.d.ts.map +1 -0
  363. package/dist/src/findingkey.js +210 -0
  364. package/dist/src/findingkey.js.map +1 -0
  365. package/dist/src/findingsrecord.d.ts +175 -0
  366. package/dist/src/findingsrecord.d.ts.map +1 -0
  367. package/dist/src/findingsrecord.js +410 -0
  368. package/dist/src/findingsrecord.js.map +1 -0
  369. package/dist/src/followup-mode.d.ts +4 -0
  370. package/dist/src/followup-mode.d.ts.map +1 -0
  371. package/dist/src/followup-mode.js +6 -0
  372. package/dist/src/followup-mode.js.map +1 -0
  373. package/dist/src/gate.d.ts +199 -0
  374. package/dist/src/gate.d.ts.map +1 -0
  375. package/dist/src/gate.js +315 -0
  376. package/dist/src/gate.js.map +1 -0
  377. package/dist/src/ghcred.d.ts +58 -0
  378. package/dist/src/ghcred.d.ts.map +1 -0
  379. package/dist/src/ghcred.js +139 -0
  380. package/dist/src/ghcred.js.map +1 -0
  381. package/dist/src/githubAuth.d.ts +70 -0
  382. package/dist/src/githubAuth.d.ts.map +1 -0
  383. package/dist/src/githubAuth.js +183 -0
  384. package/dist/src/githubAuth.js.map +1 -0
  385. package/dist/src/githubcore.d.ts +20 -0
  386. package/dist/src/githubcore.d.ts.map +1 -0
  387. package/dist/src/githubcore.js +20 -0
  388. package/dist/src/githubcore.js.map +1 -0
  389. package/dist/src/glob.d.ts +11 -0
  390. package/dist/src/glob.d.ts.map +1 -0
  391. package/dist/src/glob.js +69 -0
  392. package/dist/src/glob.js.map +1 -0
  393. package/dist/src/guards.d.ts +106 -0
  394. package/dist/src/guards.d.ts.map +1 -0
  395. package/dist/src/guards.js +365 -0
  396. package/dist/src/guards.js.map +1 -0
  397. package/dist/src/heartbeat.d.ts +29 -0
  398. package/dist/src/heartbeat.d.ts.map +1 -0
  399. package/dist/src/heartbeat.js +87 -0
  400. package/dist/src/heartbeat.js.map +1 -0
  401. package/dist/src/heuristics.d.ts +247 -0
  402. package/dist/src/heuristics.d.ts.map +1 -0
  403. package/dist/src/heuristics.js +927 -0
  404. package/dist/src/heuristics.js.map +1 -0
  405. package/dist/src/homes.d.ts +181 -0
  406. package/dist/src/homes.d.ts.map +1 -0
  407. package/dist/src/homes.js +242 -0
  408. package/dist/src/homes.js.map +1 -0
  409. package/dist/src/hunkheader.d.ts +11 -0
  410. package/dist/src/hunkheader.d.ts.map +1 -0
  411. package/dist/src/hunkheader.js +18 -0
  412. package/dist/src/hunkheader.js.map +1 -0
  413. package/dist/src/identity.d.ts +34 -0
  414. package/dist/src/identity.d.ts.map +1 -0
  415. package/dist/src/identity.js +67 -0
  416. package/dist/src/identity.js.map +1 -0
  417. package/dist/src/include.d.ts +435 -0
  418. package/dist/src/include.d.ts.map +1 -0
  419. package/dist/src/include.js +1692 -0
  420. package/dist/src/include.js.map +1 -0
  421. package/dist/src/launchvocab.d.ts +36 -0
  422. package/dist/src/launchvocab.d.ts.map +1 -0
  423. package/dist/src/launchvocab.js +59 -0
  424. package/dist/src/launchvocab.js.map +1 -0
  425. package/dist/src/ledgercarry.d.ts +24 -0
  426. package/dist/src/ledgercarry.d.ts.map +1 -0
  427. package/dist/src/ledgercarry.js +109 -0
  428. package/dist/src/ledgercarry.js.map +1 -0
  429. package/dist/src/lensids.d.ts +7 -0
  430. package/dist/src/lensids.d.ts.map +1 -0
  431. package/dist/src/lensids.js +53 -0
  432. package/dist/src/lensids.js.map +1 -0
  433. package/dist/src/lensplanning.d.ts +8 -0
  434. package/dist/src/lensplanning.d.ts.map +1 -0
  435. package/dist/src/lensplanning.js +126 -0
  436. package/dist/src/lensplanning.js.map +1 -0
  437. package/dist/src/lensresult.d.ts +94 -0
  438. package/dist/src/lensresult.d.ts.map +1 -0
  439. package/dist/src/lensresult.js +162 -0
  440. package/dist/src/lensresult.js.map +1 -0
  441. package/dist/src/lenstuning.d.ts +97 -0
  442. package/dist/src/lenstuning.d.ts.map +1 -0
  443. package/dist/src/lenstuning.js +326 -0
  444. package/dist/src/lenstuning.js.map +1 -0
  445. package/dist/src/lintconfig.d.ts +31 -0
  446. package/dist/src/lintconfig.d.ts.map +1 -0
  447. package/dist/src/lintconfig.js +543 -0
  448. package/dist/src/lintconfig.js.map +1 -0
  449. package/dist/src/live/events.d.ts +188 -0
  450. package/dist/src/live/events.d.ts.map +1 -0
  451. package/dist/src/live/events.js +136 -0
  452. package/dist/src/live/events.js.map +1 -0
  453. package/dist/src/live/writer.d.ts +54 -0
  454. package/dist/src/live/writer.d.ts.map +1 -0
  455. package/dist/src/live/writer.js +516 -0
  456. package/dist/src/live/writer.js.map +1 -0
  457. package/dist/src/localreview.d.ts +128 -0
  458. package/dist/src/localreview.d.ts.map +1 -0
  459. package/dist/src/localreview.js +426 -0
  460. package/dist/src/localreview.js.map +1 -0
  461. package/dist/src/loosenedtests.d.ts +13 -0
  462. package/dist/src/loosenedtests.d.ts.map +1 -0
  463. package/dist/src/loosenedtests.js +188 -0
  464. package/dist/src/loosenedtests.js.map +1 -0
  465. package/dist/src/memoryport.d.ts +264 -0
  466. package/dist/src/memoryport.d.ts.map +1 -0
  467. package/dist/src/memoryport.js +445 -0
  468. package/dist/src/memoryport.js.map +1 -0
  469. package/dist/src/migrations.d.ts +106 -0
  470. package/dist/src/migrations.d.ts.map +1 -0
  471. package/dist/src/migrations.js +373 -0
  472. package/dist/src/migrations.js.map +1 -0
  473. package/dist/src/modelroute.d.ts +38 -0
  474. package/dist/src/modelroute.d.ts.map +1 -0
  475. package/dist/src/modelroute.js +105 -0
  476. package/dist/src/modelroute.js.map +1 -0
  477. package/dist/src/oneshot.d.ts +12 -0
  478. package/dist/src/oneshot.d.ts.map +1 -0
  479. package/dist/src/oneshot.js +8 -0
  480. package/dist/src/oneshot.js.map +1 -0
  481. package/dist/src/packing.d.ts +11 -0
  482. package/dist/src/packing.d.ts.map +1 -0
  483. package/dist/src/packing.js +31 -0
  484. package/dist/src/packing.js.map +1 -0
  485. package/dist/src/passes.d.ts +16 -0
  486. package/dist/src/passes.d.ts.map +1 -0
  487. package/dist/src/passes.js +104 -0
  488. package/dist/src/passes.js.map +1 -0
  489. package/dist/src/passtasks.d.ts +68 -0
  490. package/dist/src/passtasks.d.ts.map +1 -0
  491. package/dist/src/passtasks.js +360 -0
  492. package/dist/src/passtasks.js.map +1 -0
  493. package/dist/src/pathinside.d.ts +5 -0
  494. package/dist/src/pathinside.d.ts.map +1 -0
  495. package/dist/src/pathinside.js +9 -0
  496. package/dist/src/pathinside.js.map +1 -0
  497. package/dist/src/pibuiltins.d.ts +36 -0
  498. package/dist/src/pibuiltins.d.ts.map +1 -0
  499. package/dist/src/pibuiltins.js +83 -0
  500. package/dist/src/pibuiltins.js.map +1 -0
  501. package/dist/src/plankey.d.ts +4 -0
  502. package/dist/src/plankey.d.ts.map +1 -0
  503. package/dist/src/plankey.js +10 -0
  504. package/dist/src/plankey.js.map +1 -0
  505. package/dist/src/planner.d.ts +375 -0
  506. package/dist/src/planner.d.ts.map +1 -0
  507. package/dist/src/planner.js +722 -0
  508. package/dist/src/planner.js.map +1 -0
  509. package/dist/src/plugin/args.d.ts +19 -0
  510. package/dist/src/plugin/args.d.ts.map +1 -0
  511. package/dist/src/plugin/args.js +107 -0
  512. package/dist/src/plugin/args.js.map +1 -0
  513. package/dist/src/plugin/index.d.ts +3 -0
  514. package/dist/src/plugin/index.d.ts.map +1 -0
  515. package/dist/src/plugin/index.js +14 -0
  516. package/dist/src/plugin/index.js.map +1 -0
  517. package/dist/src/plugin/login.d.ts +42 -0
  518. package/dist/src/plugin/login.d.ts.map +1 -0
  519. package/dist/src/plugin/login.js +82 -0
  520. package/dist/src/plugin/login.js.map +1 -0
  521. package/dist/src/plugin/review.d.ts +27 -0
  522. package/dist/src/plugin/review.d.ts.map +1 -0
  523. package/dist/src/plugin/review.js +302 -0
  524. package/dist/src/plugin/review.js.map +1 -0
  525. package/dist/src/plugin/runner.d.ts +6 -0
  526. package/dist/src/plugin/runner.d.ts.map +1 -0
  527. package/dist/src/plugin/runner.js +65 -0
  528. package/dist/src/plugin/runner.js.map +1 -0
  529. package/dist/src/plugin/scan.d.ts +79 -0
  530. package/dist/src/plugin/scan.d.ts.map +1 -0
  531. package/dist/src/plugin/scan.js +348 -0
  532. package/dist/src/plugin/scan.js.map +1 -0
  533. package/dist/src/plugin/session.d.ts +56 -0
  534. package/dist/src/plugin/session.d.ts.map +1 -0
  535. package/dist/src/plugin/session.js +2 -0
  536. package/dist/src/plugin/session.js.map +1 -0
  537. package/dist/src/plugin/setup.d.ts +19 -0
  538. package/dist/src/plugin/setup.d.ts.map +1 -0
  539. package/dist/src/plugin/setup.js +142 -0
  540. package/dist/src/plugin/setup.js.map +1 -0
  541. package/dist/src/plugin/versiongate.d.ts +26 -0
  542. package/dist/src/plugin/versiongate.d.ts.map +1 -0
  543. package/dist/src/plugin/versiongate.js +83 -0
  544. package/dist/src/plugin/versiongate.js.map +1 -0
  545. package/dist/src/postingkey.d.ts +8 -0
  546. package/dist/src/postingkey.d.ts.map +1 -0
  547. package/dist/src/postingkey.js +25 -0
  548. package/dist/src/postingkey.js.map +1 -0
  549. package/dist/src/postingpolicy.d.ts +108 -0
  550. package/dist/src/postingpolicy.d.ts.map +1 -0
  551. package/dist/src/postingpolicy.js +341 -0
  552. package/dist/src/postingpolicy.js.map +1 -0
  553. package/dist/src/pr-identity.d.ts +3 -0
  554. package/dist/src/pr-identity.d.ts.map +1 -0
  555. package/dist/src/pr-identity.js +9 -0
  556. package/dist/src/pr-identity.js.map +1 -0
  557. package/dist/src/prdelta.d.ts +181 -0
  558. package/dist/src/prdelta.d.ts.map +1 -0
  559. package/dist/src/prdelta.js +501 -0
  560. package/dist/src/prdelta.js.map +1 -0
  561. package/dist/src/pricing.d.ts +94 -0
  562. package/dist/src/pricing.d.ts.map +1 -0
  563. package/dist/src/pricing.js +209 -0
  564. package/dist/src/pricing.js.map +1 -0
  565. package/dist/src/priorfindings.d.ts +167 -0
  566. package/dist/src/priorfindings.d.ts.map +1 -0
  567. package/dist/src/priorfindings.js +445 -0
  568. package/dist/src/priorfindings.js.map +1 -0
  569. package/dist/src/priortasks.d.ts +31 -0
  570. package/dist/src/priortasks.d.ts.map +1 -0
  571. package/dist/src/priortasks.js +119 -0
  572. package/dist/src/priortasks.js.map +1 -0
  573. package/dist/src/profilelookup.d.ts +59 -0
  574. package/dist/src/profilelookup.d.ts.map +1 -0
  575. package/dist/src/profilelookup.js +98 -0
  576. package/dist/src/profilelookup.js.map +1 -0
  577. package/dist/src/profileoverrides.d.ts +91 -0
  578. package/dist/src/profileoverrides.d.ts.map +1 -0
  579. package/dist/src/profileoverrides.js +313 -0
  580. package/dist/src/profileoverrides.js.map +1 -0
  581. package/dist/src/profiles.d.ts +144 -0
  582. package/dist/src/profiles.d.ts.map +1 -0
  583. package/dist/src/profiles.js +604 -0
  584. package/dist/src/profiles.js.map +1 -0
  585. package/dist/src/promptdoc.d.ts +3 -0
  586. package/dist/src/promptdoc.d.ts.map +1 -0
  587. package/dist/src/promptdoc.js +18 -0
  588. package/dist/src/promptdoc.js.map +1 -0
  589. package/dist/src/prtarget.d.ts +70 -0
  590. package/dist/src/prtarget.d.ts.map +1 -0
  591. package/dist/src/prtarget.js +181 -0
  592. package/dist/src/prtarget.js.map +1 -0
  593. package/dist/src/recheckorder.d.ts +32 -0
  594. package/dist/src/recheckorder.d.ts.map +1 -0
  595. package/dist/src/recheckorder.js +5 -0
  596. package/dist/src/recheckorder.js.map +1 -0
  597. package/dist/src/reviewapi.d.ts +207 -0
  598. package/dist/src/reviewapi.d.ts.map +1 -0
  599. package/dist/src/reviewapi.js +939 -0
  600. package/dist/src/reviewapi.js.map +1 -0
  601. package/dist/src/reviewbotfindings.d.ts +33 -0
  602. package/dist/src/reviewbotfindings.d.ts.map +1 -0
  603. package/dist/src/reviewbotfindings.js +80 -0
  604. package/dist/src/reviewbotfindings.js.map +1 -0
  605. package/dist/src/reviewconfig.d.ts +753 -0
  606. package/dist/src/reviewconfig.d.ts.map +1 -0
  607. package/dist/src/reviewconfig.js +805 -0
  608. package/dist/src/reviewconfig.js.map +1 -0
  609. package/dist/src/reviewdelta.d.ts +51 -0
  610. package/dist/src/reviewdelta.d.ts.map +1 -0
  611. package/dist/src/reviewdelta.js +119 -0
  612. package/dist/src/reviewdelta.js.map +1 -0
  613. package/dist/src/reviewdest.d.ts +86 -0
  614. package/dist/src/reviewdest.d.ts.map +1 -0
  615. package/dist/src/reviewdest.js +142 -0
  616. package/dist/src/reviewdest.js.map +1 -0
  617. package/dist/src/reviewerstub.d.ts +12 -0
  618. package/dist/src/reviewerstub.d.ts.map +1 -0
  619. package/dist/src/reviewerstub.js +28 -0
  620. package/dist/src/reviewerstub.js.map +1 -0
  621. package/dist/src/reviewhost.d.ts +58 -0
  622. package/dist/src/reviewhost.d.ts.map +1 -0
  623. package/dist/src/reviewhost.js +135 -0
  624. package/dist/src/reviewhost.js.map +1 -0
  625. package/dist/src/reviewpost.d.ts +79 -0
  626. package/dist/src/reviewpost.d.ts.map +1 -0
  627. package/dist/src/reviewpost.js +233 -0
  628. package/dist/src/reviewpost.js.map +1 -0
  629. package/dist/src/reviewrender.d.ts +154 -0
  630. package/dist/src/reviewrender.d.ts.map +1 -0
  631. package/dist/src/reviewrender.js +480 -0
  632. package/dist/src/reviewrender.js.map +1 -0
  633. package/dist/src/reviewstate.d.ts +62 -0
  634. package/dist/src/reviewstate.d.ts.map +1 -0
  635. package/dist/src/reviewstate.js +167 -0
  636. package/dist/src/reviewstate.js.map +1 -0
  637. package/dist/src/reviewstore.d.ts +17 -0
  638. package/dist/src/reviewstore.d.ts.map +1 -0
  639. package/dist/src/reviewstore.js +105 -0
  640. package/dist/src/reviewstore.js.map +1 -0
  641. package/dist/src/round-progress.d.ts +120 -0
  642. package/dist/src/round-progress.d.ts.map +1 -0
  643. package/dist/src/round-progress.js +172 -0
  644. package/dist/src/round-progress.js.map +1 -0
  645. package/dist/src/round-stage-deadlines.d.ts +12 -0
  646. package/dist/src/round-stage-deadlines.d.ts.map +1 -0
  647. package/dist/src/round-stage-deadlines.js +10 -0
  648. package/dist/src/round-stage-deadlines.js.map +1 -0
  649. package/dist/src/session-command.d.ts +19 -0
  650. package/dist/src/session-command.d.ts.map +1 -0
  651. package/dist/src/session-command.js +20 -0
  652. package/dist/src/session-command.js.map +1 -0
  653. package/dist/src/settledread.d.ts +61 -0
  654. package/dist/src/settledread.d.ts.map +1 -0
  655. package/dist/src/settledread.js +135 -0
  656. package/dist/src/settledread.js.map +1 -0
  657. package/dist/src/severity.d.ts +167 -0
  658. package/dist/src/severity.d.ts.map +1 -0
  659. package/dist/src/severity.js +364 -0
  660. package/dist/src/severity.js.map +1 -0
  661. package/dist/src/severityrank.d.ts +8 -0
  662. package/dist/src/severityrank.d.ts.map +1 -0
  663. package/dist/src/severityrank.js +16 -0
  664. package/dist/src/severityrank.js.map +1 -0
  665. package/dist/src/standing-review.d.ts +45 -0
  666. package/dist/src/standing-review.d.ts.map +1 -0
  667. package/dist/src/standing-review.js +43 -0
  668. package/dist/src/standing-review.js.map +1 -0
  669. package/dist/src/storerows.d.ts +225 -0
  670. package/dist/src/storerows.d.ts.map +1 -0
  671. package/dist/src/storerows.js +7 -0
  672. package/dist/src/storerows.js.map +1 -0
  673. package/dist/src/styleguide.d.ts +25 -0
  674. package/dist/src/styleguide.d.ts.map +1 -0
  675. package/dist/src/styleguide.js +272 -0
  676. package/dist/src/styleguide.js.map +1 -0
  677. package/dist/src/sweepstatus.d.ts +42 -0
  678. package/dist/src/sweepstatus.d.ts.map +1 -0
  679. package/dist/src/sweepstatus.js +97 -0
  680. package/dist/src/sweepstatus.js.map +1 -0
  681. package/dist/src/templates.d.ts +243 -0
  682. package/dist/src/templates.d.ts.map +1 -0
  683. package/dist/src/templates.js +847 -0
  684. package/dist/src/templates.js.map +1 -0
  685. package/dist/src/types.d.ts +639 -0
  686. package/dist/src/types.d.ts.map +1 -0
  687. package/dist/src/types.js +90 -0
  688. package/dist/src/types.js.map +1 -0
  689. package/dist/src/unifieddiff.d.ts +22 -0
  690. package/dist/src/unifieddiff.d.ts.map +1 -0
  691. package/dist/src/unifieddiff.js +176 -0
  692. package/dist/src/unifieddiff.js.map +1 -0
  693. package/dist/src/yieldloop.d.ts +2 -0
  694. package/dist/src/yieldloop.d.ts.map +1 -0
  695. package/dist/src/yieldloop.js +14 -0
  696. package/dist/src/yieldloop.js.map +1 -0
  697. package/package.json +60 -4
@@ -0,0 +1,199 @@
1
+ export type MutationKind = "add_label" | "remove_label" | "delete_team_review_request" | "request_reviewer" | "create_review" | "create_review_comment_reply" | "create_issue_comment" | "resolve_own_review_thread" | "create_issue" | "create_pull" | "push_branch" | "supersede_own_review" | "update_own_webhook_url";
2
+ /**
3
+ * The same set at RUNTIME. The union above is erased at compile time, so on
4
+ * its own it stops honest call sites and nothing else — a hand-rolled intent
5
+ * (or one that crosses a JSON boundary) would pass. Every intent is checked
6
+ * against this list, which makes a kind that is not on it — a review
7
+ * dismissal, say — unreachable in fact and not merely in the type system.
8
+ */
9
+ export declare const MUTATION_KINDS: readonly MutationKind[];
10
+ /**
11
+ * The app-self-config gate class (AGENTS.md invariant 6): mutations that touch
12
+ * ONLY the GitHub App's own configuration and can never reach the reviewed
13
+ * repo. The gate EXECUTES this class even when `dry_run = true`, loudly
14
+ * logged every time, because new users run dry-run during exactly the window
15
+ * the webhook self-heal matters.
16
+ *
17
+ * The class is a CLOSED SET, pinned exactly like the forceLive bypass: it
18
+ * contains exactly `update_own_webhook_url`, and tests/gate.test.ts asserts
19
+ * deep equality against that one-element list, so adding a second kind fails
20
+ * a test. Widening it is the owner's call, never an in-flight improvement.
21
+ * `forceLive` semantics are untouched — the gate still throws on forceLive
22
+ * for anything but `supersede_own_review`, this kind included.
23
+ */
24
+ export declare const APP_SELF_CONFIG_KINDS: readonly ["update_own_webhook_url"];
25
+ /** The class as a TYPE, so a `Record<MutationKind, …>` elsewhere can exclude
26
+ * it deliberately (the App-manifest permission map: these are JWT-authed and
27
+ * need no installation permission at all) instead of forgetting it. */
28
+ export type AppSelfConfigKind = (typeof APP_SELF_CONFIG_KINDS)[number];
29
+ /**
30
+ * Provenance of a MECHANICALLY-authored review — one the daemon composed
31
+ * itself, as opposed to the round's substantive review, which the session
32
+ * writes. Absent means substantive.
33
+ *
34
+ * Both members are COMMENT-event reviews that state a fact and ask for
35
+ * nothing: the migration-number collision remedy, and the escalation note
36
+ * pointing one named person at one named thing. Neither carries a verdict, so
37
+ * neither may claim the head (guards.ts `after`).
38
+ *
39
+ * That is enforced, not described. A `reviewPurpose` buys two
40
+ * exemptions — it never claims the head, and the escalation purpose is exempt
41
+ * from guard 2 — so a purpose riding an APPROVE would be an approval that
42
+ * never marks the head it approved.
43
+ * `execute()` therefore refuses any purposed intent that is not a
44
+ * `create_review` with `event: "COMMENT"` — on the detached snapshot of the
45
+ * caller's intent at entry, and again on the detached copy of what the guard
46
+ * hands back (see `snapshot`), so the `event` this check reads is the
47
+ * `event` the executor sends.
48
+ */
49
+ export type ReviewPurpose = "migration_precheck" | "escalation";
50
+ /**
51
+ * Every field is `readonly` because every object the gate hands on is frozen
52
+ * (see `snapshot` and `execute`): the type is honest about the runtime object.
53
+ * A guard rewrites by RETURNING a new object — a spread with `body` and/or
54
+ * `note` replaced, which is what the shipped guards do; those two are the
55
+ * whole of a guard's authority (GUARD_REWRITABLE_FIELDS). A first-party guard
56
+ * that assigns to `intent.kind` — or to `intent.note`, the field it is most
57
+ * invited to touch — fails to compile instead of failing inside the guard
58
+ * with a bare TypeError that names no kind. (The freeze is shallow: an
59
+ * assignment INSIDE `body` lands on the guard's own copy — see `snapshot`.)
60
+ */
61
+ export interface MutationIntent {
62
+ readonly kind: MutationKind;
63
+ /** REST method+path for API intents; "git" for pushes. */
64
+ readonly method: "POST" | "PATCH" | "PUT" | "DELETE" | "git";
65
+ readonly path: string;
66
+ readonly body?: unknown;
67
+ /** Human-readable one-liner for the dry-run record / event log. */
68
+ readonly note: string;
69
+ readonly pr?: number;
70
+ /** Internal provenance for a mechanically-authored review. Absent means a
71
+ * substantive review. It never enters the GitHub body; posting guards use
72
+ * it only to keep mechanical pre-check output from claiming the head. */
73
+ readonly reviewPurpose?: ReviewPurpose;
74
+ /** The posting key of a
75
+ * deferred SESSION review the daemon is delivering after GitHub failed to
76
+ * answer the session's own POST. It buys exactly one exemption — guard 5
77
+ * (head drift): the review is posted at its ORIGINAL `commit_id` even if
78
+ * the PR has moved on since. Every other guard binds (merged/closed, CI,
79
+ * human approval, no-new-evidence) and dry-run suppresses it like anything
80
+ * else. Admission confines it to a substantive `create_review` whose body
81
+ * carries this key's marker and whose `commit_id` is this key's head
82
+ * (`postingRetryCheck`). It never enters the GitHub body. */
83
+ readonly postingRetry?: string;
84
+ /** Execute even in dry-run. Only `supersede_own_review` may set this: the
85
+ * session-side posting leakage is accepted, so the cleanup of that leakage
86
+ * must be real too. Noise-reducing only. */
87
+ readonly forceLive?: boolean;
88
+ }
89
+ export interface GateResult {
90
+ executed: boolean;
91
+ dryRunFile?: string;
92
+ response?: unknown;
93
+ /** Set when a guard refused the mutation. Nothing was executed and
94
+ * nothing was recorded — the reason is a short tag ("pr-merged", …). */
95
+ blocked?: string;
96
+ }
97
+ export type MutationExecutor = (intent: MutationIntent) => Promise<unknown>;
98
+ /**
99
+ * How a `method: "git"` intent is actually performed.
100
+ *
101
+ * A git push cannot go through the REST executor — `GitHubAdapter.executeMutation`
102
+ * throws on `method === "git"` — yet it must still be gated in live mode
103
+ * (AGENTS.md invariant 1). So the gate mediates the push: the caller — which is
104
+ * the only thing that knows which clone the push must run in — hands the gate
105
+ * a performer, and the
106
+ * GATE, never the call site, decides whether it runs: the kind check, the
107
+ * `forceLive` check, the guards and the dry-run branch all run first, exactly
108
+ * as they do for a REST mutation.
109
+ *
110
+ * The seam cannot widen. `execute` throws if a performer accompanies any method
111
+ * other than `"git"` OR any kind other than `push_branch` — `method` is a free
112
+ * field with no relation to `kind`, so the method check alone would let any
113
+ * kind ride the performer. Both are checked again on the intent that comes out
114
+ * of the guard step (`admit` runs twice), and that intent is compared field by
115
+ * field against the frozen snapshot the guard was handed
116
+ * (`GUARD_REWRITABLE_FIELDS`), so a guard has no way to change either.
117
+ */
118
+ export type GitPerformer = () => Promise<unknown>;
119
+ /** A guard's answer: refuse (`block`), or let it through — optionally with a
120
+ * rewritten intent (the human-approval downgrade posts a COMMENT instead of a
121
+ * REQUEST_CHANGES). Returning `{}` means "no opinion". The intent a guard
122
+ * receives is a FROZEN snapshot: an in-place edit to a top-level field throws,
123
+ * and an edit inside `body` lands on the guard's copy, never the caller's. The
124
+ * intent that goes on is a fresh copy (`snapshot`) of whatever the guard
125
+ * returned — or of the snapshot it was handed, body included, when it returned
126
+ * none — and it may differ from that snapshot in `body` and `note` ONLY
127
+ * (GUARD_REWRITABLE_FIELDS); the gate refuses any other difference. */
128
+ export interface GuardDecision {
129
+ block?: string;
130
+ intent?: MutationIntent;
131
+ }
132
+ /**
133
+ * The ONLY fields a guard may rewrite. Everything else on a
134
+ * MutationIntent is the mutation's IDENTITY — `kind` selects the gate's policy
135
+ * (the kind list, the forceLive exception, the app-self-config class),
136
+ * `method` + `path` are what the executor actually sends, `pr` is what the
137
+ * `after` hooks stamp, and `reviewPurpose` and `forceLive` each buy an
138
+ * exemption — and a guard has no business with any of it.
139
+ *
140
+ * Why a closed list of what MAY change, rather than checks on what must not:
141
+ * the gate admits an intent, lets the guards rewrite it, then executes what
142
+ * came back. A re-check that enumerates only the fields it thought of would
143
+ * let a guard return `kind: "dismiss_review"`, or turn a review into
144
+ * `update_own_webhook_url` (which executes for real in dry-run), or add
145
+ * `forceLive`. Guards 1 and 4 rewrite `body` and `note` and nothing else,
146
+ * which is the whole of what a guard is for: it may change the PAYLOAD
147
+ * (`body` — and for a review, a label, a reviewer request or a pull that IS
148
+ * the verdict, the labels, the logins, the branches; softening is the shipped
149
+ * use, not the limit) and the RECORD (`note`), never the ROUTE — `kind`,
150
+ * `method`, `path`, `pr` — nor the two exemptions. Rule 2 is meant to be
151
+ * structural, so a guard's authority is stated positively and exhaustively.
152
+ * A field added to MutationIntent later is identity by default and stays
153
+ * un-rewritable until someone puts it here on purpose.
154
+ *
155
+ * How the comparison is made to mean something: a check on what a guard
156
+ * RETURNS is only a check if the guard cannot change the
157
+ * object it was HANDED — `MutationIntent` is a plain object, and a guard that
158
+ * assigned `intent.kind = …` and returned `{}` (or returned that same object)
159
+ * would execute the assigned kind. So `execute` hands the
160
+ * guard a `snapshot` of the admitted intent — frozen, with its own copy of
161
+ * `body` (strict-mode ESM: an assignment to an identity field throws inside
162
+ * the guard, and an edit to the body reaches the guard's copy, never the
163
+ * caller's) — takes a second `snapshot` of what came back (so a getter on any
164
+ * field, `body`'s contents included, is read exactly once and cannot answer
165
+ * one thing to this check and another to the executor), compares the two, and
166
+ * re-admits the copy that will execute — unconditionally, whether or not the
167
+ * guard returned an intent.
168
+ */
169
+ export declare const GUARD_REWRITABLE_FIELDS: readonly ["body", "note"];
170
+ /**
171
+ * Posting-time guards, attached to the ONE gate so that no posting
172
+ * route can reach GitHub around them. `before` runs ahead of the dry-run
173
+ * branch and of the executor; `after` sees what actually happened.
174
+ */
175
+ export interface MutationGuard {
176
+ before(intent: MutationIntent): Promise<GuardDecision>;
177
+ after?(intent: MutationIntent, result: GateResult): void | Promise<void>;
178
+ }
179
+ export declare class MutationGate {
180
+ private readonly dryRun;
181
+ private readonly dryrunDir;
182
+ private readonly executor;
183
+ private readonly now;
184
+ private guard?;
185
+ private logFn;
186
+ constructor(dryRun: boolean, dryrunDir: string, executor: MutationExecutor, now?: () => Date, guard?: MutationGuard | undefined, logFn?: (msg: string, extra?: unknown) => void);
187
+ get isDryRun(): boolean;
188
+ /** Attach the posting guards. Production wiring needs the store and the
189
+ * adapter, which only exist after the gate itself does — hence a setter
190
+ * rather than a constructor-only dependency. */
191
+ setGuard(guard: MutationGuard): void;
192
+ /** Attach the production logger (same late-binding shape as setGuard). The
193
+ * core has no console of its own, so the app-self-config loud line goes
194
+ * where the host says: every production gate is wired (src/wire.ts to the
195
+ * daemon log; src/daemon.ts, src/cli.ts and packages/pi-plugin/src/reviewpost.ts to stdout). */
196
+ setLog(logFn: (msg: string, extra?: unknown) => void): void;
197
+ execute(intentIn: MutationIntent, perform?: GitPerformer): Promise<GateResult>;
198
+ }
199
+ //# sourceMappingURL=gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/gate.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,cAAc,GACd,4BAA4B,GAW5B,kBAAkB,GAClB,eAAe,GACf,6BAA6B,GAC7B,sBAAsB,GAGtB,2BAA2B,GAC3B,cAAc,GACd,aAAa,GACb,aAAa,GAMb,sBAAsB,GAKtB,wBAAwB,CAAC;AAE7B;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAcjD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,qCAEU,CAAC;AAE7C;;uEAEuE;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OA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cAAc,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,uBAAuB,2BAGkB,CAAC;AAuDvD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACvD,KAAK,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E;AAwFD,qBAAa,YAAY;IAErB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,KAAK,CAAC;IACd,OAAO,CAAC,KAAK;gBALI,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,gBAAgB,EAC1B,GAAG,GAAE,MAAM,IAAuB,EAC3C,KAAK,CAAC,EAAE,aAAa,YAAA,EACrB,KAAK,GAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAe;IAGlE,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;oDAEgD;IAChD,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAIpC;;;oGAGgG;IAChG,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IAIrD,OAAO,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC;CAgFrF"}
@@ -0,0 +1,315 @@
1
+ // The single GitHub mutation gate. Every write to GitHub — REST, GraphQL or
2
+ // git push — is described as a MutationIntent and passed through execute().
3
+ // In dry-run (config.dry_run) the intent is written to state/dryrun/ instead
4
+ // of being executed. There is deliberately no review-dismissal intent kind:
5
+ // the never-dismiss invariant is structural (AGENTS.md invariant 2).
6
+ //
7
+ // A git push is gated too: a git intent carries a `GitPerformer` (see below)
8
+ // and the gate, not the call site, decides whether it runs.
9
+ import { mkdirSync, writeFileSync } from "node:fs";
10
+ import { join } from "node:path";
11
+ import { postingMarker } from "./postingkey.js";
12
+ /**
13
+ * The same set at RUNTIME. The union above is erased at compile time, so on
14
+ * its own it stops honest call sites and nothing else — a hand-rolled intent
15
+ * (or one that crosses a JSON boundary) would pass. Every intent is checked
16
+ * against this list, which makes a kind that is not on it — a review
17
+ * dismissal, say — unreachable in fact and not merely in the type system.
18
+ */
19
+ export const MUTATION_KINDS = [
20
+ "add_label",
21
+ "remove_label",
22
+ "delete_team_review_request",
23
+ "request_reviewer",
24
+ "create_review",
25
+ "create_review_comment_reply",
26
+ "create_issue_comment",
27
+ "resolve_own_review_thread",
28
+ "create_issue",
29
+ "create_pull",
30
+ "push_branch",
31
+ "supersede_own_review",
32
+ "update_own_webhook_url",
33
+ ];
34
+ /**
35
+ * The app-self-config gate class (AGENTS.md invariant 6): mutations that touch
36
+ * ONLY the GitHub App's own configuration and can never reach the reviewed
37
+ * repo. The gate EXECUTES this class even when `dry_run = true`, loudly
38
+ * logged every time, because new users run dry-run during exactly the window
39
+ * the webhook self-heal matters.
40
+ *
41
+ * The class is a CLOSED SET, pinned exactly like the forceLive bypass: it
42
+ * contains exactly `update_own_webhook_url`, and tests/gate.test.ts asserts
43
+ * deep equality against that one-element list, so adding a second kind fails
44
+ * a test. Widening it is the owner's call, never an in-flight improvement.
45
+ * `forceLive` semantics are untouched — the gate still throws on forceLive
46
+ * for anything but `supersede_own_review`, this kind included.
47
+ */
48
+ export const APP_SELF_CONFIG_KINDS = [
49
+ "update_own_webhook_url",
50
+ ];
51
+ /**
52
+ * The ONLY fields a guard may rewrite. Everything else on a
53
+ * MutationIntent is the mutation's IDENTITY — `kind` selects the gate's policy
54
+ * (the kind list, the forceLive exception, the app-self-config class),
55
+ * `method` + `path` are what the executor actually sends, `pr` is what the
56
+ * `after` hooks stamp, and `reviewPurpose` and `forceLive` each buy an
57
+ * exemption — and a guard has no business with any of it.
58
+ *
59
+ * Why a closed list of what MAY change, rather than checks on what must not:
60
+ * the gate admits an intent, lets the guards rewrite it, then executes what
61
+ * came back. A re-check that enumerates only the fields it thought of would
62
+ * let a guard return `kind: "dismiss_review"`, or turn a review into
63
+ * `update_own_webhook_url` (which executes for real in dry-run), or add
64
+ * `forceLive`. Guards 1 and 4 rewrite `body` and `note` and nothing else,
65
+ * which is the whole of what a guard is for: it may change the PAYLOAD
66
+ * (`body` — and for a review, a label, a reviewer request or a pull that IS
67
+ * the verdict, the labels, the logins, the branches; softening is the shipped
68
+ * use, not the limit) and the RECORD (`note`), never the ROUTE — `kind`,
69
+ * `method`, `path`, `pr` — nor the two exemptions. Rule 2 is meant to be
70
+ * structural, so a guard's authority is stated positively and exhaustively.
71
+ * A field added to MutationIntent later is identity by default and stays
72
+ * un-rewritable until someone puts it here on purpose.
73
+ *
74
+ * How the comparison is made to mean something: a check on what a guard
75
+ * RETURNS is only a check if the guard cannot change the
76
+ * object it was HANDED — `MutationIntent` is a plain object, and a guard that
77
+ * assigned `intent.kind = …` and returned `{}` (or returned that same object)
78
+ * would execute the assigned kind. So `execute` hands the
79
+ * guard a `snapshot` of the admitted intent — frozen, with its own copy of
80
+ * `body` (strict-mode ESM: an assignment to an identity field throws inside
81
+ * the guard, and an edit to the body reaches the guard's copy, never the
82
+ * caller's) — takes a second `snapshot` of what came back (so a getter on any
83
+ * field, `body`'s contents included, is read exactly once and cannot answer
84
+ * one thing to this check and another to the executor), compares the two, and
85
+ * re-admits the copy that will execute — unconditionally, whether or not the
86
+ * guard returned an intent.
87
+ */
88
+ export const GUARD_REWRITABLE_FIELDS = [
89
+ "body",
90
+ "note",
91
+ ];
92
+ /** See GUARD_REWRITABLE_FIELDS: every field outside that list must be the
93
+ * same value (`Object.is`, so a `NaN` the guard never touched is not blamed on
94
+ * it) before and after the guard, presence included — a guard that ADDS
95
+ * `forceLive: true` differs from one that left it absent. The walk is over
96
+ * every OWN key of both objects — string and symbol, whatever the type
97
+ * declares — because that is exactly the set `snapshot`'s spread copies onto
98
+ * the object that executes: a field the type does not declare, or a
99
+ * symbol-keyed one, is exactly what this check must not assume away. */
100
+ function guardRewriteCheck(before, after) {
101
+ // Viewed as bags of fields, deliberately: `keyof MutationIntent` is the one
102
+ // thing an unknown added key is not.
103
+ const b = before;
104
+ const a = after;
105
+ for (const field of new Set([...Reflect.ownKeys(b), ...Reflect.ownKeys(a)])) {
106
+ if (typeof field === "string" && GUARD_REWRITABLE_FIELDS.includes(field))
107
+ continue;
108
+ if (!Object.is(b[field], a[field])) {
109
+ throw new Error(`gate: a guard may rewrite only ${GUARD_REWRITABLE_FIELDS.join(" and ")}; it changed "${String(field)}" on ${before.kind} ` +
110
+ `(${JSON.stringify(b[field])} → ${JSON.stringify(a[field])}) — refusing to execute or record it`);
111
+ }
112
+ }
113
+ }
114
+ /**
115
+ * A frozen copy of an intent with its OWN `body` — the object `execute`
116
+ * admits, hands a guard, and then compares, re-admits and executes. Every
117
+ * field is read exactly once, here, by the spread; nothing downstream ever
118
+ * reads the object it was given. Shallow everywhere but `body`, because
119
+ * `body` is the one nested field: a body is plain data (the REST executor
120
+ * JSON-encodes it; the push body is three strings), so `structuredClone`
121
+ * detaches it and reads any getter in it once. A body that is not plain data
122
+ * (a function, a URL, …) is one the executor could not have sent faithfully
123
+ * either; it is refused — with the gate's name and the kind on the refusal,
124
+ * so the log line says which mutation went nowhere and why, rather than a
125
+ * bare DataCloneError.
126
+ */
127
+ function snapshot(intent) {
128
+ const copy = { ...intent };
129
+ if (copy.body !== undefined) {
130
+ try {
131
+ copy.body = structuredClone(copy.body);
132
+ }
133
+ catch (err) {
134
+ throw new Error(`gate: intent body for ${copy.kind} is not plain data (${err instanceof Error ? err.message : String(err)}) — refusing to execute or record it`, { cause: err });
135
+ }
136
+ }
137
+ return Object.freeze(copy);
138
+ }
139
+ /** See ReviewPurpose: a purposed intent is a `create_review` COMMENT or it is
140
+ * refused. Free function called from `admit`, which `execute` runs twice —
141
+ * on the entry snapshot, and again on the post-guard copy. */
142
+ function reviewPurposeCheck(intent) {
143
+ if (!intent.reviewPurpose)
144
+ return;
145
+ const event = String(intent.body?.event ?? "").toUpperCase();
146
+ if (intent.kind !== "create_review" || event !== "COMMENT") {
147
+ throw new Error(`gate: reviewPurpose "${intent.reviewPurpose}" is only allowed on a create_review with event COMMENT, not ${intent.kind}/${event || "(no event)"}`);
148
+ }
149
+ }
150
+ /** See MutationIntent.postingRetry: a substantive create_review carrying
151
+ * the key's own marker at the key's own head, or it is refused. */
152
+ function postingRetryCheck(intent) {
153
+ if (intent.postingRetry === undefined)
154
+ return;
155
+ const key = intent.postingRetry;
156
+ const body = (intent.body ?? {});
157
+ const m = typeof key === "string" ? /^v1:\d+:\d+:([0-9a-f]+)$/.exec(key) : null;
158
+ if (intent.kind !== "create_review" ||
159
+ intent.reviewPurpose !== undefined ||
160
+ !m ||
161
+ typeof body.commit_id !== "string" ||
162
+ body.commit_id.toLowerCase() !== m[1] ||
163
+ typeof body.body !== "string" ||
164
+ !body.body.includes(postingMarker(key))) {
165
+ throw new Error(`gate: postingRetry is only allowed on a substantive create_review at its key's head carrying its key's marker (${intent.kind})`);
166
+ }
167
+ }
168
+ /**
169
+ * Admission: what the gate demands of ANY intent before it may execute or be
170
+ * recorded. It runs on the entry `snapshot` of the caller's intent — never on
171
+ * the caller's object itself, whose fields (a getter on `kind`, say) could
172
+ * answer this check one way and the snapshot's spread another — and again on
173
+ * the snapshot of whatever a guard hands back. Each
174
+ * run is the invariant "only an admitted intent executes", checked on the
175
+ * very object that goes on rather than inferred from GUARD_REWRITABLE_FIELDS.
176
+ * The field list and admission are deliberately independent belts: the list
177
+ * says what a guard MAY change, admission says what may run at all — so
178
+ * widening the list (should a guard ever need to) does not loosen what runs.
179
+ */
180
+ function admit(intent, perform) {
181
+ // Checked before anything else — an unknown kind is never recorded to
182
+ // state/dryrun/ either, so it cannot leave evidence suggesting the daemon
183
+ // performs it.
184
+ if (!MUTATION_KINDS.includes(intent.kind)) {
185
+ throw new Error(`gate: unknown mutation kind "${intent.kind}" — refusing to execute or record it`);
186
+ }
187
+ // The git performer exists for `method: "git"` and nothing else:
188
+ // otherwise it would be a second executor, i.e. a way to run an arbitrary
189
+ // mutation the REST executor never saw. Refused regardless of what any guard
190
+ // says — admission is not a guard's to soften.
191
+ if (perform && intent.method !== "git") {
192
+ throw new Error(`gate: a git performer is only allowed for method "git", not ${intent.method} (${intent.kind})`);
193
+ }
194
+ // `method` is a free field with no relation to `kind`, so the method check
195
+ // alone would let any kind ride the performer. `push_branch` is the only
196
+ // kind this system ever performs with git — and rule 4 already says the
197
+ // only branches it pushes are `bot/improve-*`.
198
+ if (perform && intent.kind !== "push_branch") {
199
+ throw new Error(`gate: a git performer is only allowed for kind "push_branch", not ${intent.kind}`);
200
+ }
201
+ if (intent.forceLive && intent.kind !== "supersede_own_review") {
202
+ throw new Error(`forceLive is not allowed for kind ${intent.kind}`);
203
+ }
204
+ // A reviewPurpose marks a MECHANICALLY-authored COMMENT (see ReviewPurpose):
205
+ // it buys two exemptions, so it is confined to the one shape those
206
+ // exemptions are safe for.
207
+ reviewPurposeCheck(intent);
208
+ postingRetryCheck(intent);
209
+ }
210
+ let seq = 0;
211
+ export class MutationGate {
212
+ dryRun;
213
+ dryrunDir;
214
+ executor;
215
+ now;
216
+ guard;
217
+ logFn;
218
+ constructor(dryRun, dryrunDir, executor, now = () => new Date(), guard, logFn = () => { }) {
219
+ this.dryRun = dryRun;
220
+ this.dryrunDir = dryrunDir;
221
+ this.executor = executor;
222
+ this.now = now;
223
+ this.guard = guard;
224
+ this.logFn = logFn;
225
+ }
226
+ get isDryRun() {
227
+ return this.dryRun;
228
+ }
229
+ /** Attach the posting guards. Production wiring needs the store and the
230
+ * adapter, which only exist after the gate itself does — hence a setter
231
+ * rather than a constructor-only dependency. */
232
+ setGuard(guard) {
233
+ this.guard = guard;
234
+ }
235
+ /** Attach the production logger (same late-binding shape as setGuard). The
236
+ * core has no console of its own, so the app-self-config loud line goes
237
+ * where the host says: every production gate is wired (src/wire.ts to the
238
+ * daemon log; src/daemon.ts, src/cli.ts and packages/pi-plugin/src/reviewpost.ts to stdout). */
239
+ setLog(logFn) {
240
+ this.logFn = logFn;
241
+ }
242
+ async execute(intentIn, perform) {
243
+ // The caller's object is read ONCE, by this spread, and never again: what
244
+ // is admitted, handed to the guards and (with no guard installed) executed
245
+ // is this frozen snapshot with its own body — so the object that executes
246
+ // is the object that was checked. An assignment to one of its top-level
247
+ // fields throws inside a guard (strict-mode ESM); an edit inside its body
248
+ // lands on the snapshot's copy, never the caller's.
249
+ let intent = snapshot(intentIn);
250
+ admit(intent, perform);
251
+ // Posting-time guards run BEFORE the dry-run branch: a mutation a guard
252
+ // refuses is neither executed nor recorded, so the dry-run evidence shows
253
+ // the same behaviour the live path would have had.
254
+ if (this.guard) {
255
+ const decision = await this.guard.before(intent);
256
+ if (decision.block) {
257
+ const blocked = { executed: false, blocked: decision.block };
258
+ await this.guard.after?.(intent, blocked);
259
+ return blocked;
260
+ }
261
+ // Whatever came back — a rewrite, or the snapshot itself when the guard
262
+ // had no opinion — is snapshotted ONCE, body included, and that copy is
263
+ // what is compared, admitted and executed. Copying is what makes both
264
+ // checks final: a getter on a returned field, or inside its body, is
265
+ // read here and never again, so it cannot answer this check with one
266
+ // value (`event: COMMENT` to the reviewPurpose leg) and the executor
267
+ // with another. Both checks run unconditionally; `return {}` is not a
268
+ // way around them.
269
+ const post = snapshot(decision.intent ?? intent);
270
+ // A guard may soften the mutation (guards 1 and 4 rewrite the review
271
+ // body and the note), never change which mutation it is: every field
272
+ // outside GUARD_REWRITABLE_FIELDS must be identical to the snapshot.
273
+ guardRewriteCheck(intent, post);
274
+ // And what executes is re-admitted IN FULL — kind against
275
+ // MUTATION_KINDS, forceLive against its single permitted kind, the
276
+ // performer's method/kind, reviewPurpose against the rewritten body —
277
+ // on the object that will execute, not inferred from the check above.
278
+ // Only the reviewPurpose leg can still fail here today (guard 1 really
279
+ // does rewrite the event); the rest is what keeps that true if the
280
+ // field list is ever widened.
281
+ admit(post, perform);
282
+ intent = post;
283
+ }
284
+ // The app-self-config class (see APP_SELF_CONFIG_KINDS): executes for real
285
+ // even in dry-run (AGENTS.md invariant 6), and every execution is loud. The
286
+ // intent's `note` names old and new URL, so the line does too.
287
+ if (APP_SELF_CONFIG_KINDS.includes(intent.kind)) {
288
+ this.logFn(`gate: APP-SELF-CONFIG "${intent.kind}" executing FOR REAL${this.dryRun ? " despite dry_run (the app-self-config exception)" : ""} — ${intent.note}`);
289
+ const response = await this.executor(intent);
290
+ const executed = { executed: true, response };
291
+ await this.guard?.after?.(intent, executed);
292
+ return executed;
293
+ }
294
+ if (this.dryRun && !intent.forceLive) {
295
+ mkdirSync(this.dryrunDir, { recursive: true });
296
+ const ts = this.now().toISOString().replace(/[:.]/g, "-");
297
+ const file = join(this.dryrunDir, `${ts}-${String(seq++).padStart(4, "0")}-${intent.kind}.json`);
298
+ writeFileSync(file, JSON.stringify({ recorded_at: this.now().toISOString(), ...intent }, null, 2));
299
+ const recorded = { executed: false, dryRunFile: file };
300
+ await this.guard?.after?.(intent, recorded);
301
+ return recorded;
302
+ }
303
+ // A `method: "git"` intent runs its performer; everything else runs the
304
+ // REST executor (which still throws on "git", so a git intent that arrives
305
+ // without a performer cannot execute). By this line `intent` is a frozen
306
+ // copy that has passed admission — twice, if a guard was installed — and
307
+ // that matched the admitted snapshot on `method` and `kind`, so the
308
+ // performer only ever runs against the push_branch it was handed in for.
309
+ const response = perform ? await perform() : await this.executor(intent);
310
+ const executed = { executed: true, response };
311
+ await this.guard?.after?.(intent, executed);
312
+ return executed;
313
+ }
314
+ }
315
+ //# sourceMappingURL=gate.js.map
@@ -0,0 +1 @@
1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AAG,CAAC,IAAI,MAAM,CAAC,IAAI,OAAO,CAC9D,CAAC;YACF,aAAa,CACX,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAC9E,CAAC;YACF,MAAM,QAAQ,GAAe,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;YACnE,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC5C,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,wEAAwE;QACxE,2EAA2E;QAC3E,yEAAyE;QACzE,yEAAyE;QACzE,oEAAoE;QACpE,yEAAyE;QACzE,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC1D,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
@@ -0,0 +1,58 @@
1
+ export declare const CREDENTIAL_SOURCES: readonly ["app", "handoff", "gh", "env:GITHUB_TOKEN", "env:GH_TOKEN"];
2
+ export type CredentialSource = (typeof CREDENTIAL_SOURCES)[number];
3
+ /** The variable that names the handed-over token file. */
4
+ export declare const HANDOFF_FILE_ENV = "QCR_GH_TOKEN_FILE";
5
+ /** Where the container sees the handoff dir. */
6
+ export declare const HANDOFF_MOUNT = "/run/qcr-in";
7
+ /**
8
+ * Read the handed-over token file once and unlink it. Returns the token (also
9
+ * kept for `handedToken()`), or null when no file was named. Throws, leaving
10
+ * nothing in memory, when the file is named but unreadable, empty, or cannot
11
+ * be removed: a token that stays on disk beside a model's tools is refused,
12
+ * never used. The variable is deleted from `env` either way, so no child
13
+ * inherits the path.
14
+ */
15
+ export declare function takeHandoffToken(env?: Record<string, string | undefined>): string | null;
16
+ /** The token `takeHandoffToken` read, or null. */
17
+ export declare const handedToken: () => string | null;
18
+ /** Forget the handed-over token (tests; a long-lived host after its last use). */
19
+ export declare function dropHandedToken(): void;
20
+ export interface StagedHandoff {
21
+ /** The host dir to bind-mount at HANDOFF_MOUNT (mode 0700). */
22
+ dir: string;
23
+ /** The value for QCR_GH_TOKEN_FILE inside the container. */
24
+ containerFile: string;
25
+ /** Remove the host dir; call on exit, whatever happened. */
26
+ remove: () => void;
27
+ }
28
+ /**
29
+ * The caller's half: write `token` to a 0600 file in a fresh 0700 dir. On
30
+ * Linux the dir is under an absolute $XDG_RUNTIME_DIR (normally a tmpfs);
31
+ * without one, and elsewhere (macOS), it comes from mkdtemp under the OS
32
+ * temp dir ($TMPDIR), which may be disk-backed. The token is never put in env or argv.
33
+ */
34
+ export declare function stageHandoffToken(token: string, env?: Record<string, string | undefined>, platform?: NodeJS.Platform): StagedHandoff;
35
+ export type CredentialResolution = {
36
+ ok: true;
37
+ source: CredentialSource;
38
+ token: string;
39
+ } | {
40
+ ok: false;
41
+ error: string;
42
+ };
43
+ export declare const MISSING_CREDENTIAL_HELP: string;
44
+ export interface CredentialDeps {
45
+ /** `[github].secrets_dir`: where the App's app_id and app.pem live. */
46
+ secretsDir: string;
47
+ env: Record<string, string | undefined>;
48
+ /** Mint an installation token from the App in `secretsDir`. */
49
+ mintApp: (secretsDir: string) => Promise<string>;
50
+ /** The token `gh auth token` prints, or null when gh is absent or logged out. */
51
+ ghAuthToken: () => string | null;
52
+ /** The token handed to this container as a file, if one was (`handedToken()`). */
53
+ handoff?: string | null;
54
+ }
55
+ /** The real `gh auth token`. */
56
+ export declare function ghAuthTokenFromCli(): string | null;
57
+ export declare function resolveGithubCredential(d: CredentialDeps): Promise<CredentialResolution>;
58
+ //# sourceMappingURL=ghcred.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ghcred.d.ts","sourceRoot":"","sources":["../../src/ghcred.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,kBAAkB,uEAMrB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,gDAAgD;AAChD,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAI3C;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,MAAM,GAAG,IAAI,CAgBf;AAED,kDAAkD;AAClD,eAAO,MAAM,WAAW,QAAO,MAAM,GAAG,IAAc,CAAC;AAEvD,kFAAkF;AAClF,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC3C,aAAa,CAgBf;AAED,MAAM,MAAM,oBAAoB,GAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AA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