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