@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,753 @@
1
+ import type { LensTuningMap } from "./lenstuning.js";
2
+ import type { PostingPolicy } from "./postingpolicy.js";
3
+ import { type PassTier } from "./types.js";
4
+ /** `[github] auth`: whose credential the daemon runs on. `app` (the default)
5
+ * is a GitHub App's installation token; `user` is the person's own GitHub
6
+ * token, read from the `github_token` file in the secrets dir. `user` is
7
+ * polling-only: no webhooks, no App self-config, every review a COMMENT. */
8
+ export type GithubAuthMode = "app" | "user";
9
+ export declare const GITHUB_AUTH_MODES: readonly GithubAuthMode[];
10
+ export interface GithubConfig {
11
+ repo: string;
12
+ /** Always set after parse; absent (a hand-built config) means "app". */
13
+ auth?: GithubAuthMode;
14
+ /** The App's slug. May be "" under `auth = "user"`, where no App exists. */
15
+ app_slug: string;
16
+ /** The login the system posts as: the App's `<slug>[bot]`, or under
17
+ * `auth = "user"` the person's own login (onboarding reads it from
18
+ * `GET /user`). */
19
+ bot_login: string;
20
+ review_team: string;
21
+ trigger_label: string;
22
+ in_progress_label: string;
23
+ reviewed_label: string;
24
+ improvement_label: string;
25
+ issue_label: string;
26
+ /** Always an absolute-or-given path after parse: an empty (or the legacy
27
+ * default `~/.config/quickreview-bot`) value is resolved by the install
28
+ * locator to `<config home>/secrets` (the legacy dir itself is never read).
29
+ * A value the operator set is taken as given. */
30
+ secrets_dir: string;
31
+ /** The reviewed repo's default branch: the base the improvement
32
+ * filer targets, the branch replay diffs against, and the fixture base for
33
+ * CLI ops. Default "main"; a repo whose default is "master" sets it. PR rounds do NOT
34
+ * read this — a round's base is always the PR's own `base_ref` from the
35
+ * GitHub API. */
36
+ base_branch: string;
37
+ /** Directory name of the base clone under the sandbox root.
38
+ * "" (the default) derives from the repo slug's basename via
39
+ * `githubCloneDir` — "owner/name" ⇒ "name". */
40
+ clone_dir: string;
41
+ }
42
+ /**
43
+ * [guards] — the posting-time guards. Every one but `no_checks_is_red` is on
44
+ * by default; a knob exists only so a guard can be taken out of the path
45
+ * deliberately, in one place, rather than by editing the gate.
46
+ */
47
+ export interface GuardsConfig {
48
+ /** A non-author human APPROVED at the head ⇒ post COMMENT, not REQUEST_CHANGES. */
49
+ downgrade_on_human_approval: boolean;
50
+ /** Same head as the last review and no author reply since ⇒ post nothing. */
51
+ skip_unchanged_head: boolean;
52
+ /** Re-read the PR immediately before every posting mutation; merged/closed ⇒ refuse. */
53
+ recheck_pr_state_before_post: boolean;
54
+ /** No green CI at this head ⇒ APPROVE is unavailable; the review posts as a
55
+ * COMMENT with approval withheld. */
56
+ block_approve_on_red_ci: boolean;
57
+ /** A head with ZERO check-runs also withholds approval: in a CI-running
58
+ * repo that is a conflicted PR or CI that has not started — no execution
59
+ * evidence. Off by default so a repo with no CI at all is never wedged (the
60
+ * `none` exemption). */
61
+ no_checks_is_red: boolean;
62
+ /** The head the review is ABOUT must still be the PR's live head at posting
63
+ * time: a push landing between the round's validation and
64
+ * its posting step otherwise lands a stale review against the new head. */
65
+ refuse_on_head_drift: boolean;
66
+ }
67
+ export declare const GUARDS_DEFAULTS: GuardsConfig;
68
+ /**
69
+ * [review.directives] — EXTENSIONS to the first-party directive-path
70
+ * vocabulary (`packages/pi-plugin/src/severity.ts DEFAULT_DIRECTIVE_VOCABULARY`). Extend-only by
71
+ * design: config ADDS names, nothing can remove a built-in — dropping, say,
72
+ * `CLAUDE.md` would silently re-enable auto-blocking on first-party directive
73
+ * edits by config typo. The shape mirrors
74
+ * `severity.ts DirectiveVocabularyExtras`.
75
+ */
76
+ export interface ReviewDirectivesConfig {
77
+ /** Extra vendored/third-party path segments (matched case-insensitively). */
78
+ extra_vendored_segments: string[];
79
+ /** Extra directive-file basenames (any depth), e.g. "COPILOT.md". */
80
+ extra_basenames: string[];
81
+ /** Extra directory segments whose whole subtree is directive content. */
82
+ extra_dir_segments: string[];
83
+ /** Extra ROOT-level directory names (bind at the repo root only). */
84
+ extra_root_dirs: string[];
85
+ /** Extra exact repo-relative directive file paths. */
86
+ extra_files: string[];
87
+ }
88
+ export declare const REVIEW_DIRECTIVES_DEFAULTS: ReviewDirectivesConfig;
89
+ /**
90
+ * [review] — review-content knobs. Distinct from [guards] (posting-time
91
+ * refusals) and [recheck] (post-approval triggers): these shape what a review
92
+ * says, not whether it posts.
93
+ */
94
+ export interface ReviewConfig {
95
+ /**
96
+ * Fallback @-mention for the first-party-directive escalation comment when
97
+ * git history yields no attributable human author login for the touched
98
+ * directive files. "" ⇒ the comment renders without an @ (addressed to
99
+ * "a maintainer") — it still posts.
100
+ */
101
+ escalation_mention_default: string;
102
+ /**
103
+ * Repo profile: names a directory under `profiles/` — the install's config
104
+ * home first, then the checkout's generic examples
105
+ * (`src/install.ts locateProfile`; a non-plain name is refused) — whose
106
+ * house-rule addenda pack (`profiles/<name>/addenda/*.md`) is composed onto
107
+ * the built pass bodies AFTER the built-in generic registry and BEFORE the
108
+ * dynamic same-day feedback addendum — and whose optional
109
+ * `heuristics.toml` extends lens selection with repo-shaped predicates.
110
+ * "" ⇒ no profile: exactly the generic addenda set and the generic
111
+ * selection core. Loaded once at daemon assembly (src/wire.ts) — a
112
+ * malformed pack or heuristics file fails the boot loudly, never a silent
113
+ * skip.
114
+ */
115
+ profile: string;
116
+ /** Directive-path vocabulary extensions — see the type above. */
117
+ directives: ReviewDirectivesConfig;
118
+ /** The named review configuration (`REVIEW_PRESETS`): the reasoning level
119
+ * and every lever below in one word. A key set explicitly in `[review]` (or
120
+ * `[models] effort`) overrides what the preset would give it. */
121
+ preset: ReviewPreset;
122
+ /** Content-triggered sub-lenses (`SUBLENS_TRIGGERS` in packages/pi-plugin/src/heuristics.ts):
123
+ * narrow passes, each a fixed procedure, planned when the diff or the PR
124
+ * text shows the shape its procedure exists for. Off ⇒ the path-shaped
125
+ * plan alone. */
126
+ sublenses: boolean;
127
+ /** The per-file sweep (`agents/pass-sweep.md`): changed files are grouped
128
+ * into a few small batches and each batch gets its own line-by-line pass —
129
+ * the local slips a whole-PR reading skims past. */
130
+ sweep: boolean;
131
+ /** At most this many sweep passes per round; files beyond them are listed
132
+ * as not swept. */
133
+ sweep_max_groups: number;
134
+ /** Files and changed lines per sweep group (heuristics.ts sweepGroups). */
135
+ sweep_group_files: number;
136
+ sweep_group_lines: number;
137
+ /** Files per sweep group on a WIDE change — more files than
138
+ * `sweep_group_files × sweep_max_groups` — packed by `sweep_group_lines`
139
+ * instead (heuristics.ts SWEEP_WIDE_FILES_PER_GROUP). 0 = off. */
140
+ sweep_wide_files: number;
141
+ /** The behaviour-delta lens (`agents/pass-behaviour-delta.md`): base versus
142
+ * head on every modified or deleted line of non-test code, one row per group
143
+ * of modifying files packed by `sweep_group_lines` changed lines, at most
144
+ * `behaviour_delta_max_groups` rows (heuristics.ts behaviourDeltaGroups). */
145
+ behaviour_delta: boolean;
146
+ behaviour_delta_max_groups: number;
147
+ /** Over this many changed lines (heuristics.ts `baselineSplitLines` — the
148
+ * sweep's sizing: prose half, lockfiles, generated and vendored files
149
+ * nothing) pass-baseline is planned as 2–3 rows, each STARTING from one
150
+ * group of the change's files with the whole PR as its charter
151
+ * (heuristics.ts `baselineGroups`). 0 ⇒ never: one row. At 2000 only the
152
+ * largest PRs split — those where a lone baseline row sets the round's
153
+ * critical path; every PR under it plans as one row. */
154
+ baseline_split_lines: number;
155
+ /** The loosened-test hint (packages/pi-plugin/src/loosenedtests.ts): weakened assertions in
156
+ * the PR's test files are found deterministically and named in pass-tests'
157
+ * plan reason; their presence also plans pass-tests. Off ⇒ neither. */
158
+ loosened_test_hint: boolean;
159
+ /** Selection cost knobs (heuristics.ts SelectionTuning): pass-intent's
160
+ * substance bar in words, and when pass-placement runs — this many code
161
+ * files, or a new code file with this many added lines. */
162
+ intent_min_words: number;
163
+ placement_min_code_files: number;
164
+ placement_min_new_file_lines: number;
165
+ /** Unpack the sources of the third-party packages this PR touches, at
166
+ * their locked versions, so passes can read what a library actually does
167
+ * (packages/pi-plugin/src/depsources.ts). Download-and-unpack only — nothing is installed or
168
+ * run. */
169
+ dependency_sources: boolean;
170
+ /** The tests lens (`agents/pass-tests.md`) on every PR that
171
+ * changes code — which existing tests the change breaks, and whether the
172
+ * PR's own tests exercise the code or mock the failure point away. */
173
+ tests_lens: boolean;
174
+ /** The code-quality lenses (`agents/pass-maintainability.md`,
175
+ * `pass-duplication.md`, `pass-abstraction.md`; heuristics.ts
176
+ * QUALITY_PASSES) on every PR whose non-test code adds at least
177
+ * `quality_min_added_lines` lines. Style is none of them. */
178
+ quality_lenses: boolean;
179
+ quality_min_added_lines: number;
180
+ /** The style lens (`agents/pass-style.md`) — planned only when the repo has
181
+ * a written style guide (packages/pi-plugin/src/styleguide.ts), and judging only against it. */
182
+ style_lens: boolean;
183
+ /** The lint-conformance sub-lens (`agents/pass-lint-conformance.md`) —
184
+ * planned only when a CI job of the repo runs a linter or formatter whose
185
+ * rules cover a changed file (packages/pi-plugin/src/lintconfig.ts), reporting only changed
186
+ * lines that would fail that job. */
187
+ lint_conformance: boolean;
188
+ /** How many nits a review may post. `strict` (the default, production's
189
+ * behaviour): the validator drops true-but-trivial candidates (`below-bar`),
190
+ * a nit must name the change it asks for, and review volume comes
191
+ * out of nits. `open`: none of those limits — every true nit posts. Meant
192
+ * for benchmarks whose references reward nits; a repo that wants every nit
193
+ * can set it too. Style still needs the repo's written guide either way. */
194
+ nits: NitPolicy;
195
+ /** The validator demotes a confirmed, actionable observation instead of
196
+ * killing it for a small consequence (`validate-demote-not-kill`).
197
+ * On by default; off reproduces the earlier validator for a benchmark. */
198
+ validate_demote: boolean;
199
+ /** Passes never planned and never addable this round (cost tuning). `[]`
200
+ * (the default) plans every lens selection picks. Names must be known
201
+ * passes; `pass-validate` is refused here — switching the validator off is
202
+ * the profile's `enabled = false`. Not a preset lever. */
203
+ skip_lenses: string[];
204
+ /** The validator's consequence rules (`validate-consequence-rule`):
205
+ * intent/contract appeals, dead code, CI-enabled lint rules and
206
+ * merges judged by consequence. Off by default; opt-in for a benchmark arm. */
207
+ validate_consequence_rule: boolean;
208
+ /** Review latency levers (bench/aacr/PERF.md §6). None changes
209
+ * which lenses run or what they are asked; each removes serial time.
210
+ *
211
+ * `wide_lens_fanout`: a batched `tasks:[…]` lens launch runs as wide as
212
+ * `[engine] lens_max_concurrency`.
213
+ * Deprecated: it steered only the retired native glue, and is a no-op on an
214
+ * SDK session, where our lens tool sets its own width. */
215
+ wide_lens_fanout: boolean;
216
+ /** `task_files`: the daemon (or the bench) writes each plan row's complete
217
+ * lens task to a file (packages/pi-plugin/src/passtasks.ts), so the session launches a lens
218
+ * with a short pointer instead of generating its whole task string. */
219
+ task_files: boolean;
220
+ /** `render_outputs`: the posted review body and inline-comments JSON are
221
+ * rendered deterministically from the findings record (packages/pi-plugin/src/reviewrender.ts)
222
+ * instead of being written out by the session a second time. */
223
+ render_outputs: boolean;
224
+ /** `validator_shards`: how many `pass-validate` children split the
225
+ * candidates (by file); 1 = one validator. */
226
+ validator_shards: number;
227
+ /** `dedup_merge` (docs/duplicate-merge.md): candidates are grouped
228
+ * deterministically before the validator (the `cluster_findings` tool,
229
+ * packages/pi-plugin/src/dedup.ts), the validator judges each group as one root cause or
230
+ * splits it, and a post-check at render time merges two posted findings
231
+ * that are one root cause posted twice. Off ⇒ none of that: no grouping,
232
+ * no merge. */
233
+ dedup_merge: boolean;
234
+ /** `coverage_check` (packages/pi-plugin/src/coverage.ts): after the lenses return, every
235
+ * changed non-test source file no lens raised a finding on gets a targeted
236
+ * pass-sweep row (at most two, packed by line budget), each saying why. Off
237
+ * ⇒ no coverage rows. */
238
+ coverage_check: boolean;
239
+ /** `follow_up` (docs/follow-up-rounds.md): `"delta"` ⇒ every round after
240
+ * the first is a FOLLOW-UP round — prior findings verified, the PR-owned
241
+ * change since the last reviewed head reviewed, one pre-approval sweep when
242
+ * owed — falling back to a full re-review on any doubt. `"full"` ⇒ every
243
+ * later round is a full re-review. */
244
+ follow_up: "delta" | "full";
245
+ /** Above this share of the PR's diff lines (additions + deletions), the
246
+ * delta is too large to be worth a follow-up round: the round runs in full. */
247
+ follow_up_max_delta_ratio: number;
248
+ /** false ⇒ a follow-up round never plans the pre-approval sweep. */
249
+ follow_up_sweep: boolean;
250
+ /** After a POSTED approval the sweep is owed only when the PR-owned change
251
+ * since it reaches this many lines (additions + deletions); 0 ⇒ never.
252
+ * The default of 500 reflects measurement: post-approval blockers outside
253
+ * the change sat behind 600+-line pushes, while most post-approval rounds
254
+ * change fewer than 500 lines. */
255
+ follow_up_post_approval_sweep_lines: number;
256
+ /** A follow-up delta of at most this many lines (additions + deletions)
257
+ * gets a LEAN plan: no per-file pass-sweep rows (pass-baseline reads a small
258
+ * change whole) and the quality and style lenses offered as addable instead
259
+ * of planned (they judged the PR in round 1; on a fix push they mostly
260
+ * re-raise nits). 0 ⇒ never lean. A follow-up round's time tracks its
261
+ * agent count, and small deltas otherwise fan out to 15–20 agents. */
262
+ follow_up_small_delta_lines: number;
263
+ /** `context_pack` (packages/pi-plugin/src/contextpack.ts): `"pack-first"` ⇒ the
264
+ * daemon writes the round's CONTEXT PACK (the diff, the change since the
265
+ * last review, the most-changed files' full text) beside its task files, and
266
+ * every lens session carries it at the very start of its prompt, ahead of its
267
+ * lens instructions (packages/pi-plugin/src/engine/lens/leaf-cache.ts) — one shared, cached prefix
268
+ * instead of every lens re-reading the same text uncached. `"off"` ⇒ no
269
+ * pack. Takes effect only with `[engine] lens_cache_group` > 0 (an unshared
270
+ * pack would cost more, not less). On by default: measured ~40% cheaper,
271
+ * with verdicts and recall unchanged. */
272
+ context_pack: "off" | "pack-first";
273
+ /** The pack's size cap in tokens (≈4 characters each). */
274
+ context_pack_max_tokens: number;
275
+ /** A benchmark lever until measured: a pass-sweep row whose files are ALL
276
+ * tests, prose or config/data (heuristics.ts `isLightSweepFile`) runs at
277
+ * this tier instead of the sweep's own. `""` ⇒ off: every sweep row at the
278
+ * sweep's tier. A profile `min_tier`
279
+ * for pass-sweep still floors it, and a tier at or above the sweep's own
280
+ * changes nothing. */
281
+ sweep_light_tier: "" | PassTier;
282
+ /** The validator answers with a DECISION TABLE keyed by
283
+ * candidate id instead of restating every survivor — only a finding whose
284
+ * text it changed is written out in full (`validate-compact-output`
285
+ * addendum; the session's half is `{{validator_output_note}}`). What it
286
+ * decides is unchanged. `false` ⇒ the frozen output format. */
287
+ validate_compact: boolean;
288
+ /** Who sizes a FOLLOW-UP round.
289
+ * `"session"` ⇒ every follow-up round plans the lean core (pass-baseline,
290
+ * the risk lenses, behaviour-delta, the validator) and offers the full
291
+ * plan's per-file sweep rows and quality/style lenses as OPTIONAL rows the
292
+ * main session runs, partly runs or skips — and it decides whether an owed
293
+ * pre-approval sweep is needed — each with a stated reason, logged.
294
+ * `"rules"` ⇒ fixed rules: the lean plan only at or under
295
+ * `follow_up_small_delta_lines`, the pre-approval sweep always run when
296
+ * owed and the round would approve. */
297
+ follow_up_extent: "session" | "rules";
298
+ }
299
+ export type NitPolicy = "strict" | "open";
300
+ /**
301
+ * `[review] preset` — three named review configurations, measured on the
302
+ * defect benchmark (bench/aacr/RESULTS.md):
303
+ *
304
+ * - `default` — the measured best value. Every lever on with the lean plan:
305
+ * on ten PRs no change was designed from it found 81% of the real defects
306
+ * (weighted 86%) against 71% before the levers, for $1.02 vs $0.90 a PR and
307
+ * the same ~6 minutes.
308
+ * - `max` — every model at its highest reasoning level and the full lever
309
+ * plan (every intent and placement pass, small sweep groups). Measured on
310
+ * smoke10 with the pre-lever plan: 72% of defects vs 44-51%, at ~$2 and ~18
311
+ * minutes a PR. For the PRs that warrant it.
312
+ * - `low` — every model at low reasoning, the default plan. Half the cost
313
+ * and time of `default` (~$0.52, ~3.5 min a PR on fresh10) for about the
314
+ * recall the review had BEFORE the levers (69% vs 71% of real defects),
315
+ * with fewer high-severity finds and less accurate comments (73%).
316
+ */
317
+ export type ReviewPreset = "low" | "default" | "max";
318
+ type PresetLevers = Pick<ReviewConfig, "sublenses" | "sweep" | "sweep_max_groups" | "sweep_group_files" | "sweep_group_lines" | "sweep_wide_files" | "behaviour_delta" | "behaviour_delta_max_groups" | "loosened_test_hint" | "intent_min_words" | "placement_min_code_files" | "placement_min_new_file_lines" | "dependency_sources" | "tests_lens" | "quality_lenses" | "quality_min_added_lines" | "style_lens" | "lint_conformance">;
319
+ export declare const REVIEW_PRESETS: Readonly<Record<ReviewPreset, {
320
+ effort: ReviewEffort;
321
+ levers: PresetLevers;
322
+ }>>;
323
+ export declare function parsePreset(raw: unknown): ReviewPreset;
324
+ export declare const REVIEW_DEFAULTS: ReviewConfig;
325
+ /**
326
+ * [escalation] — the optional, OFF-BY-DEFAULT escalation feature (the never-hand-to-a-human
327
+ * rule).
328
+ *
329
+ * Two invariants bound everything this table can express, and neither is a
330
+ * knob:
331
+ *
332
+ * 1. The reviewer STILL DECIDES. An escalation is additive notification
333
+ * posted BESIDE a finished verdict. Nothing here can withhold, defer or
334
+ * replace one — `src/escalation.ts` has no verdict in its return type and
335
+ * is called only after the verdict has been applied.
336
+ * 2. It escalates a QUESTION, never a review. Every escalation names one
337
+ * thing to look at (a file and line range, a migration, a named
338
+ * decision) and why that person. There is no way to configure "ask
339
+ * someone to review this PR" — the comment body is rendered from the
340
+ * scope, not written free-hand.
341
+ *
342
+ * With `enabled = false` (the default, and what every shipped config carries)
343
+ * nothing in this table is read and BEHAVIOUR is identical to a build without
344
+ * the feature. (Not byte-identical prompt text: the `{{escalation_note}}`
345
+ * placeholder renders empty and leaves a blank line, exactly as the sibling
346
+ * `{{directive_note}}` already does. `tests/escalation.test.ts` pins that
347
+ * whitespace is the ONLY difference.)
348
+ */
349
+ export type EscalationShape = "comment" | "review_request";
350
+ /** A severity threshold a rule may key on. Matches `packages/pi-plugin/src/severity.ts Severity`
351
+ * minus "nit", which is never worth a person's attention by definition. */
352
+ export type EscalationSeverityFloor = "P0" | "P1" | "P2" | "P3";
353
+ /**
354
+ * One operator-defined DETERMINISTIC trigger. No LLM judgement takes part in
355
+ * evaluating one: given the round's facts, `evaluateEscalationRules` is a pure
356
+ * function and `tests/escalation.test.ts` drives it directly.
357
+ *
358
+ * A rule fires when EVERY condition it declares is met (conditions AND
359
+ * together) — a rule that declares none never fires, and configuration
360
+ * validation refuses it rather than shipping a rule that silently does
361
+ * nothing.
362
+ */
363
+ export interface EscalationRule {
364
+ /** Stable name — it appears in the event log and in the posted note. */
365
+ name: string;
366
+ /** The GitHub login to escalate to. MUST be one of `targets`. */
367
+ to: string;
368
+ /** Why this person, in the operator's own words — rendered verbatim. */
369
+ why: string;
370
+ /** Glob-ish path patterns; fires when the PR touches a matching file. */
371
+ paths: string[];
372
+ /** PR labels; fires when the PR carries one of them. */
373
+ labels: string[];
374
+ /** Fires when the round posted a finding at or above this severity. */
375
+ min_severity: EscalationSeverityFloor | "";
376
+ /** Check-run names; fires when the LATEST run of one is not green. */
377
+ failing_checks: string[];
378
+ }
379
+ export declare const ESCALATION_RULE_DEFAULTS: EscalationRule;
380
+ export interface EscalationConfig {
381
+ /** OFF by default. False ⇒ no rule is evaluated, no note is rendered into
382
+ * any prompt, and no escalation mutation is ever built. */
383
+ enabled: boolean;
384
+ /**
385
+ * How an escalation is delivered. `comment` (the default) posts a gated
386
+ * COMMENT review @-mentioning the person with the narrow ask.
387
+ * `review_request` ALSO puts the PR in that person's review-requested queue
388
+ * (the `request_reviewer` gate kind) — GitHub's own UI frames that as
389
+ * "review this pull request", which is exactly the framing this feature
390
+ * rules out, so the accompanying comment is still posted and still carries
391
+ * the narrow ask. `comment` is the shape that matches the intent.
392
+ */
393
+ shape: EscalationShape;
394
+ /** The CLOSED set of logins any escalation may reach. A session-judgement
395
+ * escalation naming anyone else is dropped and logged; it is not an error
396
+ * the session can talk its way past. */
397
+ targets: string[];
398
+ /** May the PR's session ALSO escalate on its own judgement, bounded to
399
+ * `targets`? Off by default — the deterministic rules stand alone. */
400
+ session_judgement: boolean;
401
+ /** Hard cap on escalations delivered per PR, across all rounds. */
402
+ max_per_pr: number;
403
+ /** The deterministic triggers. */
404
+ rules: EscalationRule[];
405
+ }
406
+ export declare const ESCALATION_DEFAULTS: EscalationConfig;
407
+ export declare const ESCALATION_SEVERITY_FLOORS: readonly string[];
408
+ /** A GitHub login: letters, digits and single inner dashes, at most 39. */
409
+ export declare const ESCALATION_LOGIN_RE: RegExp;
410
+ /**
411
+ * Parse and VALIDATE `[escalation]`.
412
+ *
413
+ * A half-configured live state is made unrepresentable here
414
+ * rather than only in the wizard: a config with the feature on and no target,
415
+ * or with a rule pointing at a login that is not a target, or with a rule that
416
+ * declares no condition, fails to LOAD. A hand-edited config gets the same
417
+ * refusal the interview does.
418
+ *
419
+ * With `enabled = false` NOTHING below the early return is checked, so a
420
+ * half-filled table that is switched off really is a draft — it cannot wedge
421
+ * daemon startup. The whole validation set fires the moment the operator
422
+ * flips the switch.
423
+ */
424
+ export declare function parseEscalation(raw: Record<string, any>): EscalationConfig;
425
+ /**
426
+ * [owner] — the system's ONE accountable human, as a configured role. Every
427
+ * identity surface renders from here: Slack fallback prose,
428
+ * the companion day-open role label, the pinned-memory head framing, and the
429
+ * escalation-mention fallback. Empty values degrade to neutral wording
430
+ * ("the owner" / "the operator"), never to a hardcoded personal name.
431
+ */
432
+ export interface OwnerConfig {
433
+ /** Display name for rendered prose. "" ⇒ neutral wording. */
434
+ name: string;
435
+ /**
436
+ * Slack member id (U…). When [slack] is enabled it must be non-empty and a
437
+ * key of [slack.users]. Legacy alias on INPUT only: a set
438
+ * `[slack] legacy_owner_slack_id` feeds this when it is empty; nothing reads the
439
+ * legacy key after load.
440
+ */
441
+ slack_id: string;
442
+ /** GitHub login; the fallback for [review] escalation_mention_default when
443
+ * that knob is unset. */
444
+ github_login: string;
445
+ }
446
+ export declare const OWNER_DEFAULTS: OwnerConfig;
447
+ /** Per-model spend rates, keyed by bare model id (e.g. "gpt-6-sol"). */
448
+ export interface ModelPricing {
449
+ input_per_mtok: number;
450
+ output_per_mtok: number;
451
+ }
452
+ /** [models] — role models plus the tiered pass-model scheme. */
453
+ export interface ModelsConfig {
454
+ default: string;
455
+ conversation: string;
456
+ /** PassTier → full model spec ("provider/model:thinking"). */
457
+ tiers: Record<PassTier, string>;
458
+ /** Passes always run at sol-high, single variant, not raisable. */
459
+ risk_passes: string[];
460
+ /** The tier pass-validate runs at — never raised to the round's highest
461
+ * lens tier, because a validity veto is a `doubted` mark, not a deletion.
462
+ * Only the profile's `min_tier` for the validator moves it, and only
463
+ * upward. */
464
+ validate_tier: PassTier;
465
+ /** Diffs under this many changed lines start at terra-med (heuristics). */
466
+ small_diff_lines: number;
467
+ /** Spend rates keyed by bare model id; consumed by spend accounting. */
468
+ pricing: Record<string, ModelPricing>;
469
+ /** ONE reasoning-effort setting for the whole review (`""` = off: every
470
+ * role and tier keeps the level its own spec names). When set, the thinking
471
+ * suffix of EVERY model spec above — default, conversation and all
472
+ * three tiers — is replaced: `low` → `:low`, `medium` → `:medium`, `high` →
473
+ * the model's highest level (`effort_max`). Applied once, at parse time, so
474
+ * every consumer (sessions, the agents build, the bench) sees the same
475
+ * specs. */
476
+ effort: ReviewEffort;
477
+ /** The level `effort = "high"` means — the highest a model accepts. pi
478
+ * 0.87.1 (and 0.99.1, also for gpt-6.1-sol) lists `minimal…high, xhigh, max` for gpt-6-sol (model catalog,
479
+ * VERIFY-ON-PIN); a model that tops out lower needs this set to its own
480
+ * ceiling. */
481
+ effort_max: ThinkingLevel;
482
+ /** Per-lens tier pins (`[models.pass_tiers]`): pass name → tier.
483
+ * A pinned lens runs at that tier on every PR whatever the diff size — the
484
+ * plan names that tier, the lens is not raisable, and every built variant
485
+ * of it carries that tier's spec. The default is `DEFAULT_PASS_TIERS`
486
+ * (baseline, sweep, behaviour-delta at sol-high); a config entry replaces
487
+ * a lens's default pin. Not
488
+ * for pass-validate (its knob is `validate_tier`) nor for a risk pass
489
+ * (always sol-high). A profile `min_tier` still floors a pin, and the
490
+ * validator never follows a pinned lens's tier. */
491
+ pass_tiers: Record<string, PassTier>;
492
+ /** Per-lens MODEL overrides (`[models.pass_models]`): pass name →
493
+ * model spec. Every built variant of that lens runs on that model, at the
494
+ * thinking level it would otherwise have had (its tier, a pin, the
495
+ * profile's `effort`) unless the spec names its own. Empty by default — a
496
+ * benchmark lever (a smaller model for the quality lenses) until measured.
497
+ * Never for pass-validate nor a risk pass. */
498
+ pass_models: Record<string, string>;
499
+ }
500
+ /** pi's thinking levels, ascending (pi 0.87.1, unchanged at 0.99.1 and 1.0.0 — VERIFY-ON-PIN). */
501
+ export declare const THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
502
+ export type ThinkingLevel = (typeof THINKING_LEVELS)[number];
503
+ /** `[models] effort` — `""` leaves every spec as written. */
504
+ export type ReviewEffort = "" | "low" | "medium" | "high";
505
+ /** "provider/model:thinking" → its model and its pi thinking level, or a
506
+ * null level when the spec carries no suffix. */
507
+ export declare function splitModelSpec(spec: string): {
508
+ model: string;
509
+ thinking: string | null;
510
+ };
511
+ /** Replace (or add) the `:thinking` suffix of one model spec. */
512
+ export declare function withThinking(spec: string, level: ThinkingLevel): string;
513
+ /** The thinking level an effort setting names: `high` is the model's
514
+ * ceiling (`[models] effort_max`) — the one reading of `[models] effort`, a
515
+ * lens's profile `effort` and `[scan] effort` alike. */
516
+ export declare function effortLevel(effort: Exclude<ReviewEffort, "">, effortMax: ThinkingLevel): ThinkingLevel;
517
+ /** Apply `[models] effort` to every spec the review runs on. Pure. */
518
+ export declare function applyReviewEffort(models: ModelsConfig): ModelsConfig;
519
+ export declare function parseEffort(raw: unknown): ReviewEffort;
520
+ /** The nonempty effort vocabulary every effort knob shares — `low`,
521
+ * `medium` (alias `med`) and `high`, case- and space-insensitive — or null for
522
+ * anything else. What an empty value means is each knob's own call. */
523
+ export declare function normalizeEffort(raw: unknown): "low" | "medium" | "high" | null;
524
+ /**
525
+ * The shipped per-lens tier pins (measured: high effort on these lenses found
526
+ * more defects with no high-severity loss, for ~18% more cost per PR). The
527
+ * three lenses that read the whole diff line by line run at
528
+ * the `sol-high` tier — gpt-6.1-sol at high effort — on every PR; every other
529
+ * lens keeps its planned tier. A config's own `[models.pass_tiers]` entry for
530
+ * one of them replaces its pin (e.g. `"pass-baseline" = "sol-med"`), and a
531
+ * profile lowers its thinking with `[lenses.<pass>] effort = "medium"`.
532
+ */
533
+ export declare const DEFAULT_PASS_TIERS: Readonly<Record<string, PassTier>>;
534
+ /** `[engine] lens_pass_deadline_min` when the file does not set it: a
535
+ * healthy pass takes 20-100 s and the slowest about 4 min, so 8 min only
536
+ * ever cuts a stalled one. */
537
+ export declare const DEFAULT_LENS_PASS_DEADLINE_MIN = 8;
538
+ /** `[engine] lens_cache_stagger_ms`'s default — every reader's fallback too
539
+ * (`packages/pi-plugin/src/engine/lens/env.ts` keeps the env reader's copy, pinned equal by a
540
+ * test). */
541
+ export declare const DEFAULT_LENS_CACHE_STAGGER_MS = 2500;
542
+ /** `[engine] lens_max_concurrency` when the file does not set it: the
543
+ * companion's desktop number. */
544
+ export declare const DEFAULT_LENS_MAX_CONCURRENCY = 4;
545
+ /** `[engine] lens_cache_group` when the file does not set it. */
546
+ export declare const DEFAULT_LENS_CACHE_GROUP = 5;
547
+ /** What hosts a pi session (`[engine] runtime`): the pi SDK, in-process
548
+ * (packages/pi-plugin/src/engine/sdkruntime.ts), the one adapter. The `proc` runtime, pi as a
549
+ * child process, is retired and refused (`parseEngine`). A route that has no
550
+ * SDK host yet refuses `sdk` (packages/pi-plugin/src/engine/select.ts). */
551
+ export type EngineRuntimeKind = "sdk";
552
+ export declare const ENGINE_RUNTIME_KINDS: readonly EngineRuntimeKind[];
553
+ /** Who launches the lenses (`[pi] lens_runtime`): `engine`, our lens tool and
554
+ * discovery wave, the only kind. pi's own subagent glue (`native`) is retired
555
+ * and refused (`parsePiLensRuntime`). */
556
+ export type LensRuntimeKind = "engine";
557
+ export declare const LENS_RUNTIME_KINDS: readonly LensRuntimeKind[];
558
+ /** `[engine]`: which runtime hosts pi sessions, and how its lens tool runs the
559
+ * passes (the width, the shared prompt cache and the per-pass deadline that
560
+ * `[pi] subagent_*` used to carry). */
561
+ export interface EngineConfig {
562
+ runtime: EngineRuntimeKind;
563
+ /** Process-wide cap on a round's concurrently running lens sessions
564
+ * (rides the lens tool's env as QCR_SUBAGENT_MAX_CONCURRENCY). */
565
+ lens_max_concurrency: number;
566
+ /** Lens sessions share a provider PROMPT CACHE in groups of this many (one
567
+ * pi session id, the provider's cache key, per group); 0 ⇒ a random id per
568
+ * session, which gets no cache hits. */
569
+ lens_cache_group: number;
570
+ /** How long a group's later sessions wait after its first one started, so
571
+ * the cache is written before they ask. */
572
+ lens_cache_stagger_ms: number;
573
+ /** Per-pass deadline in minutes: a pass still running at the deadline is
574
+ * aborted and retried ONCE with a fresh deadline, and a second timeout fails
575
+ * that pass alone. 0 ⇒ no deadline. */
576
+ lens_pass_deadline_min: number;
577
+ }
578
+ export declare const ENGINE_DEFAULTS: EngineConfig;
579
+ export declare function parseEngine(raw: Record<string, unknown>): EngineConfig;
580
+ /** Defaults for the tiered [models] knobs — older configs keep parsing. */
581
+ export declare const MODELS_TIER_DEFAULTS: Pick<ModelsConfig, "tiers" | "risk_passes" | "validate_tier" | "small_diff_lines" | "pricing" | "effort" | "effort_max" | "pass_tiers" | "pass_models">;
582
+ /** The values `[memory] delivery` takes. */
583
+ export declare const MEMORY_DELIVERY_MODES: readonly ["off", "shadow", "on"];
584
+ export type MemoryDelivery = (typeof MEMORY_DELIVERY_MODES)[number];
585
+ /**
586
+ * `[scan]`: the companion's whole-repo scan. Read only by the scan
587
+ * engine inside the companion (src/setup/) — nothing on the VM reads it.
588
+ */
589
+ export interface ScanConfig {
590
+ /** Stage 1's reasoning level for `pass-scan` (`high` = the model's
591
+ * ceiling, `[models] effort_max`). */
592
+ effort: Exclude<ReviewEffort, "">;
593
+ /** Stage 1's tier — whose model `pass-scan` runs on, at `effort`. */
594
+ tier: PassTier;
595
+ /** Run the scan's SKEPTIC — `pass-validate` in scan mode — over each
596
+ * case's candidates, at the tier of the lens that raised them. ON by
597
+ * default; a profile may switch it off. It sorts every finding into a
598
+ * validity tier — confirmed / likely / doubtful — and kills none: a
599
+ * refuted finding is kept, marked doubtful. Its cost is part of every
600
+ * case's measured price. */
601
+ validator: boolean;
602
+ /** Repo-relative globs never scanned (packages/pi-plugin/src/glob.ts), on top of tests,
603
+ * migrations and what no pass reads (lockfiles, binaries, prose). */
604
+ exclude: string[];
605
+ /** Units the first-scan calibration run reads (spread across the size
606
+ * range), before any stage-1 estimate is offered. */
607
+ calibration_units: number;
608
+ /** The calibration run's hard stop — it has no estimate to stop at. */
609
+ calibration_max_usd: number;
610
+ /** Stage-1 cases in flight at once (background subagents). */
611
+ concurrency: number;
612
+ /** One case reads at most this much; a bigger unit splits, name kept. */
613
+ case_max_files: number;
614
+ case_max_lines: number;
615
+ /** Stage 2: a deep lens never measured at a row's tier, effort
616
+ * and validator setting — no other lens measured there either, and no
617
+ * factor learnable from a stage-2 measurement with the validator the other
618
+ * way (stage2.ts `priceStage2Row`) — is priced at stage 1's measured rate
619
+ * times this. A conservative stand-in
620
+ * until the first stage-2 run measures the real one; the hard stop holds
621
+ * whatever it says. */
622
+ unmeasured_rate_factor: number;
623
+ /** How hard the scan looks. `standard`: stage 1 is a cheap first look and
624
+ * stage 2 runs only the rows the companion proposes. `deep`: stage 1 names a
625
+ * deep lens for every focus file, every deep lens is told to dig past its
626
+ * row's files, and a stage-2 proposal adds the deterministic FLOOR — every
627
+ * `deep_lenses` lens over every file stage 1 reads. A deep reading is its own
628
+ * coverage: a file read only at `standard` is read again. */
629
+ depth: ScanDepth;
630
+ /** The deep floor's lenses, each a lens a scan may run
631
+ * (`SCAN_DEEP_LENSES`); one the profile switched off is skipped. */
632
+ deep_lenses: string[];
633
+ }
634
+ /** How hard a scan looks — `[scan] depth`. */
635
+ export declare const SCAN_DEPTHS: readonly ["standard", "deep"];
636
+ export type ScanDepth = (typeof SCAN_DEPTHS)[number];
637
+ export declare const SCAN_DEFAULTS: ScanConfig;
638
+ /** The `[scan]` keys a repo profile may override — what is about THIS repo
639
+ * (how hard to look, whether to validate, what is not worth reading), never
640
+ * the install's operating limits. */
641
+ export declare const SCAN_PROFILE_KEYS: readonly ["effort", "tier", "validator", "exclude", "depth", "deep_lenses"];
642
+ /**
643
+ * Validate one `[scan]` table — config.toml's (every key) or a profile's
644
+ * (`SCAN_PROFILE_KEYS` only). Returns just the keys it set; an unknown key or
645
+ * a bad value throws naming `where`.
646
+ */
647
+ export declare function parseScanTable(where: string, raw: unknown, allowed?: readonly string[]): Partial<ScanConfig>;
648
+ /** The `[scan]` keys that say where a run is driven, not how it scans. */
649
+ export declare const SCAN_SANDBOX_KEYS: readonly ["sandbox", "pihome_volume", "image"];
650
+ /** `[scan]` from config.toml: the defaults, overlaid by what it sets. The
651
+ * sandbox keys are parsed apart (`parseScanSandbox`). */
652
+ export declare function parseScan(raw: unknown): ScanConfig;
653
+ /** A key the table must have: its value, or a throw naming it. */
654
+ export declare function req(obj: Record<string, unknown>, key: string): unknown;
655
+ /** The overseer session is gone: its two knobs are still ACCEPTED so a
656
+ * live config does not break, read by nothing, and named here once at parse. */
657
+ export declare function configDeprecations(raw: Record<string, any>): string[];
658
+ export declare function parseModels(raw: Record<string, any>, presetEffort?: ReviewEffort): ModelsConfig;
659
+ /**
660
+ * Validate the per-lens knobs — `[review] skip_lenses`,
661
+ * `[review] validate_consequence_rule`, `[models.pass_tiers]` and
662
+ * `[models.pass_models]`. Called by
663
+ * `parseConfig` and again by the bench's `--config` overrides (which write
664
+ * past the parser), so both routes refuse the same things.
665
+ */
666
+ export declare function validateLensKnobs(cfg: Pick<CoreConfig, "review" | "models">): void;
667
+ /** Full model spec ("provider/model:thinking") for a pass tier. */
668
+ export declare function tierModel(cfg: Pick<CoreConfig, "models">, tier: PassTier): string;
669
+ /** `[pi]`: the pinned pi and where its sessions live, and who launches a
670
+ * round's lenses. */
671
+ export interface PiConfig {
672
+ package: string;
673
+ version: string;
674
+ session_dir: string;
675
+ /** Who launches a round's lenses: `engine`, our lens tool and discovery
676
+ * wave on an SDK session, the only kind. */
677
+ lens_runtime: LensRuntimeKind;
678
+ /** `lens_runtime = engine` only: the round's engine starts the planned
679
+ * discovery wave itself at round start (rule 9) and the main session joins
680
+ * it through `lens_wave`. On by default with `lens_runtime = engine`; off:
681
+ * the main session launches the wave, with the same tools. */
682
+ engine_wave: boolean;
683
+ }
684
+ /**
685
+ * The review config: the sections of config.toml the review core reads. The
686
+ * app's `Config` (src/config.ts) extends it with every other surface's, so
687
+ * whatever takes a `CoreConfig` takes the daemon's config as it is.
688
+ */
689
+ export interface CoreConfig {
690
+ dry_run: boolean;
691
+ /** The selected profile's resolved per-lens tuning
692
+ * (`[lenses.<pass>]` in profile.toml, packages/pi-plugin/src/lenstuning.ts). config.toml never
693
+ * sets it: `applyProfileTuning` overlays it after parsing, which is what
694
+ * makes the profile win over config.toml, the preset and the defaults.
695
+ * Absent or empty ⇒ untuned. */
696
+ lenses?: LensTuningMap;
697
+ /** The selected profile's posting policy (`[posting]` in profile.toml,
698
+ * packages/pi-plugin/src/postingpolicy.ts), overlaid by `applyProfilePosting`. Absent ⇒ the
699
+ * default posting behaviour; an all-default policy is never attached. */
700
+ posting?: PostingPolicy;
701
+ github: GithubConfig;
702
+ models: ModelsConfig;
703
+ engine: EngineConfig;
704
+ pi: PiConfig;
705
+ guards: GuardsConfig;
706
+ review: ReviewConfig;
707
+ escalation: EscalationConfig;
708
+ owner: OwnerConfig;
709
+ /** The whole-repo scan's defaults. The repo profile's `[scan]`
710
+ * table overrides the keys in `SCAN_PROFILE_KEYS` (`applyProfileScan`,
711
+ * packages/pi-plugin/src/profiles.ts) — the profile wins, as for per-lens tuning. */
712
+ scan: ScanConfig;
713
+ }
714
+ /** `[github]`: base_branch/clone_dir default so older configs keep parsing.
715
+ * `secrets_dir` is as written; the reader that needs the secrets locates
716
+ * them (src/homes.ts `locateSecrets`). */
717
+ export declare function parseGithubSection(raw: Record<string, any>): GithubConfig;
718
+ /** Refuse a `[github]` table that leaves out a key every config names. */
719
+ export declare function requireGithubKeys(github: GithubConfig): void;
720
+ /** `[review] preset`. It shapes both [models] (reasoning level) and [review]
721
+ * (the levers), so it is read before either is parsed. */
722
+ export declare function presetOf(raw: Record<string, any>): ReviewPreset;
723
+ /** `[pi]`, with the lens runtime defaulted and checked and the retired keys refused. */
724
+ export declare function parsePiSection(raw: Record<string, any>): PiConfig;
725
+ /** `[guards]` over its defaults. */
726
+ export declare function parseGuardsSection(raw: Record<string, any>): GuardsConfig;
727
+ /** `[owner]` over its defaults (the legacy Slack alias folds in later,
728
+ * `foldLegacyOwnerSlackId`). */
729
+ export declare function parseOwnerSection(raw: Record<string, any>): OwnerConfig;
730
+ /** `[review]`. [review.directives] merges under its own spread so a partial
731
+ * table extends the defaults instead of clobbering the sibling keys. The
732
+ * preset fills every lever the file does not set itself; an explicit key
733
+ * always wins, so `preset = "max"` + `sweep = false` means exactly that. */
734
+ export declare function parseReviewSection(raw: Record<string, any>, preset: ReviewPreset): ReviewConfig;
735
+ /** The checks on a parsed `[review]` (and the per-lens knobs), run once the
736
+ * whole config is built. */
737
+ export declare function validateReviewSection(cfg: Pick<CoreConfig, "review" | "models">): void;
738
+ /** Legacy alias: a set `[slack] legacy_owner_slack_id` feeds [owner] slack_id when
739
+ * that is empty; a conflicting pair is an error that names the NEW key. After
740
+ * this fold nothing reads the legacy key. */
741
+ export declare function foldLegacyOwnerSlackId(raw: Record<string, any>, owner: OwnerConfig): void;
742
+ /**
743
+ * The review sections of a config.toml, parsed and checked exactly as the
744
+ * whole-file parser (`parseConfig`, src/config.ts) parses them. The other
745
+ * sections are not read, so a file that only names the review's sections is
746
+ * a whole review config. `[github] secrets_dir` stays as written. `warn`
747
+ * hears each deprecated key once.
748
+ */
749
+ export declare function parseCoreConfig(toml: string, opts?: {
750
+ warn?: (line: string) => void;
751
+ }): CoreConfig;
752
+ export {};
753
+ //# sourceMappingURL=reviewconfig.d.ts.map