@delegance/claude-autopilot 5.0.0 → 5.0.2

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 (406) hide show
  1. package/dist/presets/go/rules/go-sql-injection.d.ts +4 -0
  2. package/dist/presets/nextjs-supabase/rules/supabase-rls-bypass.d.ts +4 -0
  3. package/dist/presets/python-fastapi/rules/fastapi-missing-auth.d.ts +4 -0
  4. package/dist/presets/rails-postgres/rules/rails-sql-injection.d.ts +4 -0
  5. package/dist/presets/t3/rules/t3-server-only.d.ts +4 -0
  6. package/dist/src/adapters/base.d.ts +11 -0
  7. package/dist/src/adapters/council/claude.d.ts +3 -0
  8. package/dist/src/adapters/council/openai.d.ts +3 -0
  9. package/dist/src/adapters/council/types.d.ts +5 -0
  10. package/dist/src/adapters/loader.d.ts +11 -0
  11. package/dist/src/adapters/migration-runner/supabase.d.ts +4 -0
  12. package/dist/src/adapters/migration-runner/types.d.ts +31 -0
  13. package/dist/src/adapters/review-bot-parser/cursor.d.ts +3 -0
  14. package/dist/src/adapters/review-bot-parser/declarative-base.d.ts +13 -0
  15. package/{src/adapters/review-bot-parser/types.ts → dist/src/adapters/review-bot-parser/types.d.ts} +4 -4
  16. package/dist/src/adapters/review-engine/auto.d.ts +4 -0
  17. package/dist/src/adapters/review-engine/claude.d.ts +4 -0
  18. package/dist/src/adapters/review-engine/codex.d.ts +4 -0
  19. package/dist/src/adapters/review-engine/gemini.d.ts +4 -0
  20. package/dist/src/adapters/review-engine/openai-compatible.d.ts +4 -0
  21. package/dist/src/adapters/review-engine/parse-output.d.ts +13 -0
  22. package/dist/src/adapters/review-engine/prompt-builder.d.ts +4 -0
  23. package/dist/src/adapters/review-engine/types.d.ts +28 -0
  24. package/dist/src/adapters/vcs-host/commit-status.d.ts +12 -0
  25. package/dist/src/adapters/vcs-host/github.d.ts +4 -0
  26. package/dist/src/adapters/vcs-host/types.d.ts +42 -0
  27. package/{src/cli/_pkg-root.ts → dist/src/cli/_pkg-root.d.ts} +4 -42
  28. package/dist/src/cli/autoregress-bridge.d.ts +3 -0
  29. package/dist/src/cli/baseline.d.ts +7 -0
  30. package/dist/src/cli/ci.d.ts +23 -0
  31. package/dist/src/cli/costs.d.ts +2 -0
  32. package/dist/src/cli/council.d.ts +8 -0
  33. package/dist/src/cli/detector.d.ts +8 -0
  34. package/dist/src/cli/explain.d.ts +8 -0
  35. package/dist/src/cli/fix.d.ts +10 -0
  36. package/dist/src/cli/hook.d.ts +9 -0
  37. package/dist/src/cli/ignore-helper.d.ts +7 -0
  38. package/dist/src/cli/index.d.ts +3 -0
  39. package/dist/src/cli/index.js +39 -1
  40. package/dist/src/cli/lsp.d.ts +29 -0
  41. package/dist/src/cli/mcp.d.ts +5 -0
  42. package/dist/src/cli/migrate-v4.d.ts +28 -0
  43. package/dist/src/cli/pr-comment.d.ts +13 -0
  44. package/dist/src/cli/pr-desc.d.ts +31 -0
  45. package/dist/src/cli/pr-review-comments.d.ts +12 -0
  46. package/dist/src/cli/pr.d.ts +9 -0
  47. package/dist/src/cli/preflight.d.ts +8 -0
  48. package/dist/src/cli/preflight.js +17 -4
  49. package/dist/src/cli/report.d.ts +7 -0
  50. package/dist/src/cli/run.d.ts +23 -0
  51. package/dist/src/cli/scan.d.ts +11 -0
  52. package/dist/src/cli/setup.d.ts +9 -0
  53. package/dist/src/cli/test-gen.d.ts +10 -0
  54. package/dist/src/cli/triage.d.ts +5 -0
  55. package/dist/src/cli/watch.d.ts +18 -0
  56. package/dist/src/cli/worker.d.ts +5 -0
  57. package/dist/src/core/cache/cached-engine.d.ts +8 -0
  58. package/dist/src/core/cache/review-cache.d.ts +21 -0
  59. package/dist/src/core/chunking/index.d.ts +18 -0
  60. package/dist/src/core/chunking/risk-ranker.d.ts +10 -0
  61. package/dist/src/core/config/loader.d.ts +3 -0
  62. package/dist/src/core/config/preset-resolver.d.ts +9 -0
  63. package/dist/src/core/config/schema.d.ts +342 -0
  64. package/dist/src/core/config/types.d.ts +115 -0
  65. package/dist/src/core/council/config.d.ts +3 -0
  66. package/dist/src/core/council/context.d.ts +2 -0
  67. package/dist/src/core/council/runner.d.ts +4 -0
  68. package/dist/src/core/council/types.d.ts +36 -0
  69. package/dist/src/core/detect/git-context.d.ts +12 -0
  70. package/dist/src/core/detect/llm-key.d.ts +38 -0
  71. package/dist/src/core/detect/protected-paths.d.ts +6 -0
  72. package/dist/src/core/detect/provider-usage.d.ts +17 -0
  73. package/dist/src/core/detect/stack.d.ts +6 -0
  74. package/dist/src/core/detect/workspaces.d.ts +11 -0
  75. package/dist/src/core/errors.d.ts +17 -0
  76. package/dist/src/core/findings/dedup.d.ts +4 -0
  77. package/dist/src/core/findings/types.d.ts +33 -0
  78. package/dist/src/core/fix/generator.d.ts +17 -0
  79. package/dist/src/core/git/diff-hunks.d.ts +22 -0
  80. package/dist/src/core/git/touched-files.d.ts +11 -0
  81. package/dist/src/core/ignore/index.d.ts +11 -0
  82. package/dist/src/core/index.d.ts +2 -0
  83. package/dist/src/core/logging/ndjson-writer.d.ts +16 -0
  84. package/dist/src/core/logging/redaction.d.ts +4 -0
  85. package/dist/src/core/mcp/concurrency.d.ts +2 -0
  86. package/dist/src/core/mcp/handlers/fix-finding.d.ts +17 -0
  87. package/dist/src/core/mcp/handlers/get-capabilities.d.ts +14 -0
  88. package/dist/src/core/mcp/handlers/get-findings.d.ts +13 -0
  89. package/dist/src/core/mcp/handlers/review-diff.d.ts +18 -0
  90. package/dist/src/core/mcp/handlers/scan-files.d.ts +15 -0
  91. package/dist/src/core/mcp/handlers/validate-fix.d.ts +12 -0
  92. package/dist/src/core/mcp/run-store.d.ts +12 -0
  93. package/dist/src/core/mcp/workspace.d.ts +3 -0
  94. package/dist/src/core/persist/baseline.d.ts +39 -0
  95. package/dist/src/core/persist/cost-log.d.ts +11 -0
  96. package/dist/src/core/persist/findings-cache.d.ts +9 -0
  97. package/dist/src/core/persist/triage.d.ts +30 -0
  98. package/dist/src/core/phases/static-rules.d.ts +24 -0
  99. package/dist/src/core/phases/tests.d.ts +15 -0
  100. package/dist/src/core/pipeline/review-phase.d.ts +27 -0
  101. package/dist/src/core/pipeline/run.d.ts +27 -0
  102. package/dist/src/core/runtime/idempotency.d.ts +2 -0
  103. package/dist/src/core/runtime/lock.d.ts +5 -0
  104. package/dist/src/core/runtime/state.d.ts +39 -0
  105. package/dist/src/core/schema-alignment/detector.d.ts +3 -0
  106. package/dist/src/core/schema-alignment/extractor/index.d.ts +3 -0
  107. package/dist/src/core/schema-alignment/extractor/prisma.d.ts +3 -0
  108. package/dist/src/core/schema-alignment/extractor/sql.d.ts +3 -0
  109. package/dist/src/core/schema-alignment/llm-check.d.ts +4 -0
  110. package/dist/src/core/schema-alignment/scanner.d.ts +3 -0
  111. package/dist/src/core/schema-alignment/types.d.ts +38 -0
  112. package/dist/src/core/shell.d.ts +15 -0
  113. package/dist/src/core/static-rules/registry.d.ts +5 -0
  114. package/dist/src/core/static-rules/rules/brand-tokens.d.ts +3 -0
  115. package/dist/src/core/static-rules/rules/console-log.d.ts +3 -0
  116. package/dist/src/core/static-rules/rules/hardcoded-secrets.d.ts +3 -0
  117. package/dist/src/core/static-rules/rules/insecure-redirect.d.ts +3 -0
  118. package/dist/src/core/static-rules/rules/large-file.d.ts +3 -0
  119. package/dist/src/core/static-rules/rules/missing-auth.d.ts +3 -0
  120. package/dist/src/core/static-rules/rules/missing-tests.d.ts +3 -0
  121. package/dist/src/core/static-rules/rules/npm-audit.d.ts +3 -0
  122. package/dist/src/core/static-rules/rules/package-lock-sync.d.ts +3 -0
  123. package/dist/src/core/static-rules/rules/schema-alignment.d.ts +3 -0
  124. package/dist/src/core/static-rules/rules/sql-injection.d.ts +3 -0
  125. package/dist/src/core/static-rules/rules/ssrf.d.ts +3 -0
  126. package/dist/src/core/static-rules/rules/todo-fixme.d.ts +3 -0
  127. package/dist/src/core/static-rules/tailwind-extractor.d.ts +7 -0
  128. package/dist/src/core/test-gen/coverage-analyzer.d.ts +7 -0
  129. package/dist/src/core/test-gen/framework-detector.d.ts +3 -0
  130. package/dist/src/core/test-gen/test-writer.d.ts +4 -0
  131. package/dist/src/core/ui/design-context-loader.d.ts +7 -0
  132. package/dist/src/core/worker/client.d.ts +23 -0
  133. package/dist/src/core/worker/lockfile.d.ts +12 -0
  134. package/dist/src/core/worker/server.d.ts +17 -0
  135. package/dist/src/formatters/github-annotations.d.ts +5 -0
  136. package/{src/formatters/index.ts → dist/src/formatters/index.d.ts} +1 -0
  137. package/dist/src/formatters/junit.d.ts +5 -0
  138. package/dist/src/formatters/sarif.d.ts +56 -0
  139. package/{src/index.ts → dist/src/index.d.ts} +1 -0
  140. package/package.json +7 -6
  141. package/dist/presets/go/rules/go-sql-injection.js.map +0 -1
  142. package/dist/presets/nextjs-supabase/rules/supabase-rls-bypass.js.map +0 -1
  143. package/dist/presets/python-fastapi/rules/fastapi-missing-auth.js.map +0 -1
  144. package/dist/presets/rails-postgres/rules/rails-sql-injection.js.map +0 -1
  145. package/dist/presets/t3/rules/t3-server-only.js.map +0 -1
  146. package/dist/src/adapters/base.js.map +0 -1
  147. package/dist/src/adapters/council/claude.js.map +0 -1
  148. package/dist/src/adapters/council/openai.js.map +0 -1
  149. package/dist/src/adapters/council/types.js.map +0 -1
  150. package/dist/src/adapters/loader.js.map +0 -1
  151. package/dist/src/adapters/migration-runner/supabase.js.map +0 -1
  152. package/dist/src/adapters/migration-runner/types.js.map +0 -1
  153. package/dist/src/adapters/review-bot-parser/cursor.js.map +0 -1
  154. package/dist/src/adapters/review-bot-parser/declarative-base.js.map +0 -1
  155. package/dist/src/adapters/review-bot-parser/types.js.map +0 -1
  156. package/dist/src/adapters/review-engine/auto.js.map +0 -1
  157. package/dist/src/adapters/review-engine/claude.js.map +0 -1
  158. package/dist/src/adapters/review-engine/codex.js.map +0 -1
  159. package/dist/src/adapters/review-engine/gemini.js.map +0 -1
  160. package/dist/src/adapters/review-engine/openai-compatible.js.map +0 -1
  161. package/dist/src/adapters/review-engine/parse-output.js.map +0 -1
  162. package/dist/src/adapters/review-engine/prompt-builder.js.map +0 -1
  163. package/dist/src/adapters/review-engine/types.js.map +0 -1
  164. package/dist/src/adapters/vcs-host/commit-status.js.map +0 -1
  165. package/dist/src/adapters/vcs-host/github.js.map +0 -1
  166. package/dist/src/adapters/vcs-host/types.js.map +0 -1
  167. package/dist/src/cli/_pkg-root.js.map +0 -1
  168. package/dist/src/cli/autoregress-bridge.js.map +0 -1
  169. package/dist/src/cli/baseline.js.map +0 -1
  170. package/dist/src/cli/ci.js.map +0 -1
  171. package/dist/src/cli/costs.js.map +0 -1
  172. package/dist/src/cli/council.js.map +0 -1
  173. package/dist/src/cli/detector.js.map +0 -1
  174. package/dist/src/cli/explain.js.map +0 -1
  175. package/dist/src/cli/fix.js.map +0 -1
  176. package/dist/src/cli/hook.js.map +0 -1
  177. package/dist/src/cli/ignore-helper.js.map +0 -1
  178. package/dist/src/cli/index.js.map +0 -1
  179. package/dist/src/cli/lsp.js.map +0 -1
  180. package/dist/src/cli/mcp.js.map +0 -1
  181. package/dist/src/cli/migrate-v4.js.map +0 -1
  182. package/dist/src/cli/pr-comment.js.map +0 -1
  183. package/dist/src/cli/pr-desc.js.map +0 -1
  184. package/dist/src/cli/pr-review-comments.js.map +0 -1
  185. package/dist/src/cli/pr.js.map +0 -1
  186. package/dist/src/cli/preflight.js.map +0 -1
  187. package/dist/src/cli/report.js.map +0 -1
  188. package/dist/src/cli/run.js.map +0 -1
  189. package/dist/src/cli/scan.js.map +0 -1
  190. package/dist/src/cli/setup.js.map +0 -1
  191. package/dist/src/cli/test-gen.js.map +0 -1
  192. package/dist/src/cli/triage.js.map +0 -1
  193. package/dist/src/cli/watch.js.map +0 -1
  194. package/dist/src/cli/worker.js.map +0 -1
  195. package/dist/src/core/cache/cached-engine.js.map +0 -1
  196. package/dist/src/core/cache/review-cache.js.map +0 -1
  197. package/dist/src/core/chunking/index.js.map +0 -1
  198. package/dist/src/core/chunking/risk-ranker.js.map +0 -1
  199. package/dist/src/core/config/loader.js.map +0 -1
  200. package/dist/src/core/config/preset-resolver.js.map +0 -1
  201. package/dist/src/core/config/schema.js.map +0 -1
  202. package/dist/src/core/config/types.js.map +0 -1
  203. package/dist/src/core/council/config.js.map +0 -1
  204. package/dist/src/core/council/context.js.map +0 -1
  205. package/dist/src/core/council/runner.js.map +0 -1
  206. package/dist/src/core/council/types.js.map +0 -1
  207. package/dist/src/core/detect/git-context.js.map +0 -1
  208. package/dist/src/core/detect/llm-key.js.map +0 -1
  209. package/dist/src/core/detect/protected-paths.js.map +0 -1
  210. package/dist/src/core/detect/provider-usage.js.map +0 -1
  211. package/dist/src/core/detect/stack.js.map +0 -1
  212. package/dist/src/core/detect/workspaces.js.map +0 -1
  213. package/dist/src/core/errors.js.map +0 -1
  214. package/dist/src/core/findings/dedup.js.map +0 -1
  215. package/dist/src/core/findings/types.js.map +0 -1
  216. package/dist/src/core/fix/generator.js.map +0 -1
  217. package/dist/src/core/git/diff-hunks.js.map +0 -1
  218. package/dist/src/core/git/touched-files.js.map +0 -1
  219. package/dist/src/core/ignore/index.js.map +0 -1
  220. package/dist/src/core/index.js.map +0 -1
  221. package/dist/src/core/logging/ndjson-writer.js.map +0 -1
  222. package/dist/src/core/logging/redaction.js.map +0 -1
  223. package/dist/src/core/mcp/concurrency.js.map +0 -1
  224. package/dist/src/core/mcp/handlers/fix-finding.js.map +0 -1
  225. package/dist/src/core/mcp/handlers/get-capabilities.js.map +0 -1
  226. package/dist/src/core/mcp/handlers/get-findings.js.map +0 -1
  227. package/dist/src/core/mcp/handlers/review-diff.js.map +0 -1
  228. package/dist/src/core/mcp/handlers/scan-files.js.map +0 -1
  229. package/dist/src/core/mcp/handlers/validate-fix.js.map +0 -1
  230. package/dist/src/core/mcp/run-store.js.map +0 -1
  231. package/dist/src/core/mcp/workspace.js.map +0 -1
  232. package/dist/src/core/persist/baseline.js.map +0 -1
  233. package/dist/src/core/persist/cost-log.js.map +0 -1
  234. package/dist/src/core/persist/findings-cache.js.map +0 -1
  235. package/dist/src/core/persist/triage.js.map +0 -1
  236. package/dist/src/core/phases/static-rules.js.map +0 -1
  237. package/dist/src/core/phases/tests.js.map +0 -1
  238. package/dist/src/core/pipeline/review-phase.js.map +0 -1
  239. package/dist/src/core/pipeline/run.js.map +0 -1
  240. package/dist/src/core/runtime/idempotency.js.map +0 -1
  241. package/dist/src/core/runtime/lock.js.map +0 -1
  242. package/dist/src/core/runtime/state.js.map +0 -1
  243. package/dist/src/core/schema-alignment/detector.js.map +0 -1
  244. package/dist/src/core/schema-alignment/extractor/index.js.map +0 -1
  245. package/dist/src/core/schema-alignment/extractor/prisma.js.map +0 -1
  246. package/dist/src/core/schema-alignment/extractor/sql.js.map +0 -1
  247. package/dist/src/core/schema-alignment/llm-check.js.map +0 -1
  248. package/dist/src/core/schema-alignment/scanner.js.map +0 -1
  249. package/dist/src/core/schema-alignment/types.js.map +0 -1
  250. package/dist/src/core/shell.js.map +0 -1
  251. package/dist/src/core/static-rules/registry.js.map +0 -1
  252. package/dist/src/core/static-rules/rules/brand-tokens.js.map +0 -1
  253. package/dist/src/core/static-rules/rules/console-log.js.map +0 -1
  254. package/dist/src/core/static-rules/rules/hardcoded-secrets.js.map +0 -1
  255. package/dist/src/core/static-rules/rules/insecure-redirect.js.map +0 -1
  256. package/dist/src/core/static-rules/rules/large-file.js.map +0 -1
  257. package/dist/src/core/static-rules/rules/missing-auth.js.map +0 -1
  258. package/dist/src/core/static-rules/rules/missing-tests.js.map +0 -1
  259. package/dist/src/core/static-rules/rules/npm-audit.js.map +0 -1
  260. package/dist/src/core/static-rules/rules/package-lock-sync.js.map +0 -1
  261. package/dist/src/core/static-rules/rules/schema-alignment.js.map +0 -1
  262. package/dist/src/core/static-rules/rules/sql-injection.js.map +0 -1
  263. package/dist/src/core/static-rules/rules/ssrf.js.map +0 -1
  264. package/dist/src/core/static-rules/rules/todo-fixme.js.map +0 -1
  265. package/dist/src/core/static-rules/tailwind-extractor.js.map +0 -1
  266. package/dist/src/core/test-gen/coverage-analyzer.js.map +0 -1
  267. package/dist/src/core/test-gen/framework-detector.js.map +0 -1
  268. package/dist/src/core/test-gen/test-writer.js.map +0 -1
  269. package/dist/src/core/ui/design-context-loader.js.map +0 -1
  270. package/dist/src/core/worker/client.js.map +0 -1
  271. package/dist/src/core/worker/lockfile.js.map +0 -1
  272. package/dist/src/core/worker/server.js.map +0 -1
  273. package/dist/src/formatters/github-annotations.js.map +0 -1
  274. package/dist/src/formatters/index.js.map +0 -1
  275. package/dist/src/formatters/junit.js.map +0 -1
  276. package/dist/src/formatters/sarif.js.map +0 -1
  277. package/dist/src/index.js.map +0 -1
  278. package/src/adapters/base.ts +0 -19
  279. package/src/adapters/council/claude.ts +0 -41
  280. package/src/adapters/council/openai.ts +0 -40
  281. package/src/adapters/council/types.ts +0 -7
  282. package/src/adapters/loader.ts +0 -108
  283. package/src/adapters/migration-runner/supabase.ts +0 -56
  284. package/src/adapters/migration-runner/types.ts +0 -36
  285. package/src/adapters/review-bot-parser/cursor.ts +0 -13
  286. package/src/adapters/review-bot-parser/declarative-base.ts +0 -64
  287. package/src/adapters/review-engine/auto.ts +0 -94
  288. package/src/adapters/review-engine/claude.ts +0 -100
  289. package/src/adapters/review-engine/codex.ts +0 -82
  290. package/src/adapters/review-engine/gemini.ts +0 -105
  291. package/src/adapters/review-engine/openai-compatible.ts +0 -100
  292. package/src/adapters/review-engine/parse-output.ts +0 -74
  293. package/src/adapters/review-engine/prompt-builder.ts +0 -19
  294. package/src/adapters/review-engine/types.ts +0 -19
  295. package/src/adapters/vcs-host/commit-status.ts +0 -39
  296. package/src/adapters/vcs-host/github.ts +0 -77
  297. package/src/adapters/vcs-host/types.ts +0 -44
  298. package/src/cli/autoregress-bridge.ts +0 -30
  299. package/src/cli/baseline.ts +0 -125
  300. package/src/cli/ci.ts +0 -45
  301. package/src/cli/costs.ts +0 -80
  302. package/src/cli/council.ts +0 -96
  303. package/src/cli/detector.ts +0 -92
  304. package/src/cli/explain.ts +0 -197
  305. package/src/cli/fix.ts +0 -249
  306. package/src/cli/hook.ts +0 -124
  307. package/src/cli/ignore-helper.ts +0 -116
  308. package/src/cli/index.ts +0 -612
  309. package/src/cli/lsp.ts +0 -200
  310. package/src/cli/mcp.ts +0 -206
  311. package/src/cli/migrate-v4.ts +0 -388
  312. package/src/cli/pr-comment.ts +0 -139
  313. package/src/cli/pr-desc.ts +0 -168
  314. package/src/cli/pr-review-comments.ts +0 -92
  315. package/src/cli/pr.ts +0 -76
  316. package/src/cli/preflight.ts +0 -235
  317. package/src/cli/report.ts +0 -186
  318. package/src/cli/run.ts +0 -425
  319. package/src/cli/scan.ts +0 -233
  320. package/src/cli/setup.ts +0 -191
  321. package/src/cli/test-gen.ts +0 -125
  322. package/src/cli/triage.ts +0 -137
  323. package/src/cli/watch.ts +0 -190
  324. package/src/cli/worker.ts +0 -109
  325. package/src/core/.gitkeep +0 -0
  326. package/src/core/cache/cached-engine.ts +0 -32
  327. package/src/core/cache/review-cache.ts +0 -70
  328. package/src/core/chunking/index.ts +0 -113
  329. package/src/core/chunking/risk-ranker.ts +0 -56
  330. package/src/core/config/loader.ts +0 -53
  331. package/src/core/config/preset-resolver.ts +0 -46
  332. package/src/core/config/schema.ts +0 -181
  333. package/src/core/config/types.ts +0 -98
  334. package/src/core/council/config.ts +0 -71
  335. package/src/core/council/context.ts +0 -17
  336. package/src/core/council/runner.ts +0 -83
  337. package/src/core/council/types.ts +0 -45
  338. package/src/core/detect/git-context.ts +0 -27
  339. package/src/core/detect/llm-key.ts +0 -89
  340. package/src/core/detect/protected-paths.ts +0 -63
  341. package/src/core/detect/provider-usage.ts +0 -74
  342. package/src/core/detect/stack.ts +0 -153
  343. package/src/core/detect/workspaces.ts +0 -103
  344. package/src/core/errors.ts +0 -37
  345. package/src/core/findings/dedup.ts +0 -14
  346. package/src/core/findings/types.ts +0 -39
  347. package/src/core/fix/generator.ts +0 -149
  348. package/src/core/git/diff-hunks.ts +0 -86
  349. package/src/core/git/touched-files.ts +0 -73
  350. package/src/core/ignore/index.ts +0 -54
  351. package/src/core/index.ts +0 -1
  352. package/src/core/logging/ndjson-writer.ts +0 -37
  353. package/src/core/logging/redaction.ts +0 -19
  354. package/src/core/mcp/concurrency.ts +0 -16
  355. package/src/core/mcp/handlers/fix-finding.ts +0 -126
  356. package/src/core/mcp/handlers/get-capabilities.ts +0 -62
  357. package/src/core/mcp/handlers/get-findings.ts +0 -36
  358. package/src/core/mcp/handlers/review-diff.ts +0 -65
  359. package/src/core/mcp/handlers/scan-files.ts +0 -65
  360. package/src/core/mcp/handlers/validate-fix.ts +0 -41
  361. package/src/core/mcp/run-store.ts +0 -85
  362. package/src/core/mcp/workspace.ts +0 -35
  363. package/src/core/persist/baseline.ts +0 -112
  364. package/src/core/persist/cost-log.ts +0 -30
  365. package/src/core/persist/findings-cache.ts +0 -43
  366. package/src/core/persist/triage.ts +0 -112
  367. package/src/core/phases/static-rules.ts +0 -93
  368. package/src/core/phases/tests.ts +0 -51
  369. package/src/core/pipeline/review-phase.ts +0 -182
  370. package/src/core/pipeline/run.ts +0 -116
  371. package/src/core/runtime/idempotency.ts +0 -6
  372. package/src/core/runtime/lock.ts +0 -29
  373. package/src/core/runtime/state.ts +0 -97
  374. package/src/core/schema-alignment/detector.ts +0 -59
  375. package/src/core/schema-alignment/extractor/index.ts +0 -24
  376. package/src/core/schema-alignment/extractor/prisma.ts +0 -21
  377. package/src/core/schema-alignment/extractor/sql.ts +0 -99
  378. package/src/core/schema-alignment/llm-check.ts +0 -91
  379. package/src/core/schema-alignment/scanner.ts +0 -107
  380. package/src/core/schema-alignment/types.ts +0 -43
  381. package/src/core/shell.ts +0 -48
  382. package/src/core/static-rules/registry.ts +0 -59
  383. package/src/core/static-rules/rules/brand-tokens.ts +0 -145
  384. package/src/core/static-rules/rules/console-log.ts +0 -42
  385. package/src/core/static-rules/rules/hardcoded-secrets.ts +0 -83
  386. package/src/core/static-rules/rules/insecure-redirect.ts +0 -67
  387. package/src/core/static-rules/rules/large-file.ts +0 -37
  388. package/src/core/static-rules/rules/missing-auth.ts +0 -70
  389. package/src/core/static-rules/rules/missing-tests.ts +0 -57
  390. package/src/core/static-rules/rules/npm-audit.ts +0 -38
  391. package/src/core/static-rules/rules/package-lock-sync.ts +0 -54
  392. package/src/core/static-rules/rules/schema-alignment.ts +0 -132
  393. package/src/core/static-rules/rules/sql-injection.ts +0 -71
  394. package/src/core/static-rules/rules/ssrf.ts +0 -63
  395. package/src/core/static-rules/rules/todo-fixme.ts +0 -40
  396. package/src/core/static-rules/tailwind-extractor.ts +0 -38
  397. package/src/core/test-gen/coverage-analyzer.ts +0 -93
  398. package/src/core/test-gen/framework-detector.ts +0 -21
  399. package/src/core/test-gen/test-writer.ts +0 -33
  400. package/src/core/ui/design-context-loader.ts +0 -87
  401. package/src/core/worker/client.ts +0 -46
  402. package/src/core/worker/lockfile.ts +0 -38
  403. package/src/core/worker/server.ts +0 -81
  404. package/src/formatters/github-annotations.ts +0 -36
  405. package/src/formatters/junit.ts +0 -52
  406. package/src/formatters/sarif.ts +0 -103
@@ -0,0 +1,115 @@
1
+ import type { SchemaAlignmentConfig } from '../schema-alignment/types.ts';
2
+ export interface AdapterReference {
3
+ adapter: string;
4
+ options?: Record<string, unknown>;
5
+ }
6
+ export type AdapterRef = string | AdapterReference;
7
+ export type StaticRuleReference = string | {
8
+ adapter: string;
9
+ options?: Record<string, unknown>;
10
+ };
11
+ export interface GuardrailConfig {
12
+ configVersion: 1;
13
+ preset?: string;
14
+ reviewEngine?: AdapterRef;
15
+ vcsHost?: AdapterRef;
16
+ migrationRunner?: AdapterRef;
17
+ reviewBot?: AdapterRef;
18
+ adapterAllowlist?: string[];
19
+ protectedPaths?: string[];
20
+ staticRules?: StaticRuleReference[];
21
+ staticRulesParallel?: boolean;
22
+ stack?: string;
23
+ testCommand?: string | null;
24
+ thresholds?: {
25
+ bugbotAutoFix?: number;
26
+ bugbotProposePatch?: number;
27
+ maxValidateRetries?: number;
28
+ maxCodexRetries?: number;
29
+ maxBugbotRounds?: number;
30
+ };
31
+ ignore?: Array<string | {
32
+ rule?: string;
33
+ path: string;
34
+ }>;
35
+ reviewStrategy?: 'auto' | 'single-pass' | 'file-level' | 'diff' | 'auto-diff';
36
+ chunking?: {
37
+ smallTierMaxTokens?: number;
38
+ partialReviewTokens?: number;
39
+ perFileMaxTokens?: number;
40
+ parallelism?: number;
41
+ rateLimitBackoff?: 'exp' | 'linear' | 'none';
42
+ };
43
+ policy?: {
44
+ /** Severity threshold for exit code 1. Default: 'critical'. Use 'none' to always pass. */
45
+ failOn?: 'critical' | 'warning' | 'note' | 'none';
46
+ /** Only report findings not present in the committed baseline. Default: false. */
47
+ newOnly?: boolean;
48
+ /** Path to baseline file relative to cwd. Default: .guardrail-baseline.json */
49
+ baselinePath?: string;
50
+ };
51
+ pipeline?: {
52
+ /**
53
+ * When true, run the LLM review phase even if the static-rules phase reports `fail`
54
+ * (i.e. finds a critical). Default: true. Set to false to skip only the review
55
+ * phase on static-fail — the tests phase still runs regardless.
56
+ *
57
+ * Users that explicitly configure a review engine typically expect it to run — the
58
+ * bugs the LLM is best at (IDOR, TOCTOU, CORS, off-by-one, rate limits) often sit
59
+ * in the same commit as something a static rule already flagged. This flag only
60
+ * gates the review phase, mirroring `runReviewOnTestFail`.
61
+ */
62
+ runReviewOnStaticFail?: boolean;
63
+ /**
64
+ * When true, run the LLM review phase even if the tests phase reports `fail`.
65
+ * Default: false — failing tests usually indicate broken code, not code to review.
66
+ * This flag only gates the review phase; the tests phase itself always runs.
67
+ */
68
+ runReviewOnTestFail?: boolean;
69
+ };
70
+ cost?: {
71
+ /** Abort review phase if estimated spend exceeds this amount (USD). */
72
+ maxPerRun?: number;
73
+ /** Print token estimate before starting LLM review. Default: false. */
74
+ estimateBeforeRun?: boolean;
75
+ /** Per-model token price overrides (input/output per 1M tokens). */
76
+ pricing?: Record<string, {
77
+ inputPer1M: number;
78
+ outputPer1M: number;
79
+ }>;
80
+ };
81
+ brand?: {
82
+ /** Path to tailwind.config.{ts,js} — auto-extracts theme.colors as canonical palette */
83
+ colorsFrom?: string;
84
+ /** Explicit canonical color values (hex/rgb/hsl). Merged with colorsFrom. */
85
+ colors?: string[];
86
+ /** Canonical font family names */
87
+ fonts?: string[];
88
+ /** Path to design system component library (informational, for future LLM review) */
89
+ componentLibrary?: string | {
90
+ tokens?: string;
91
+ guide?: string;
92
+ };
93
+ };
94
+ 'schema-alignment'?: SchemaAlignmentConfig;
95
+ cache?: Record<string, unknown>;
96
+ persistence?: Record<string, unknown>;
97
+ concurrency?: Record<string, unknown>;
98
+ council?: {
99
+ models: Array<{
100
+ adapter: string;
101
+ model: string;
102
+ label: string;
103
+ }>;
104
+ synthesizer: {
105
+ adapter: string;
106
+ model: string;
107
+ label: string;
108
+ };
109
+ timeout_ms?: number;
110
+ min_successful_responses?: number;
111
+ parallel_input_max_tokens?: number;
112
+ synthesis_input_max_tokens?: number;
113
+ };
114
+ }
115
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,3 @@
1
+ import type { CouncilConfig } from './types.ts';
2
+ export declare function parseCouncilConfig(raw: Record<string, unknown>): CouncilConfig;
3
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function windowContext(text: string, maxTokens: number): string;
2
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { CouncilConfig, CouncilResult } from './types.ts';
2
+ import type { CouncilAdapter } from '../../adapters/council/types.ts';
3
+ export declare function runCouncil(config: CouncilConfig, adapters: CouncilAdapter[], synthesizer: CouncilAdapter, prompt: string, contextDoc: string): Promise<CouncilResult>;
4
+ //# sourceMappingURL=runner.d.ts.map
@@ -0,0 +1,36 @@
1
+ export interface CouncilModelEntry {
2
+ adapter: 'claude' | 'openai';
3
+ model: string;
4
+ label: string;
5
+ }
6
+ export interface CouncilConfig {
7
+ models: CouncilModelEntry[];
8
+ synthesizer: CouncilModelEntry;
9
+ timeoutMs: number;
10
+ minSuccessfulResponses: number;
11
+ parallelInputMaxTokens: number;
12
+ synthesisInputMaxTokens: number;
13
+ }
14
+ export type ModelResponseStatus = 'ok' | 'timeout' | 'error';
15
+ export interface ModelResponse {
16
+ label: string;
17
+ status: ModelResponseStatus;
18
+ text?: string;
19
+ error?: string;
20
+ latencyMs: number;
21
+ }
22
+ export interface SynthesisResponse {
23
+ label: string;
24
+ text: string;
25
+ latencyMs: number;
26
+ }
27
+ export type CouncilStatus = 'success' | 'partial' | 'failed';
28
+ export interface CouncilResult {
29
+ schema_version: 1;
30
+ run_id: string;
31
+ status: CouncilStatus;
32
+ prompt: string;
33
+ responses: ModelResponse[];
34
+ synthesis?: SynthesisResponse;
35
+ }
36
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,12 @@
1
+ export interface GitContext {
2
+ branch: string | null;
3
+ commitMessage: string | null;
4
+ /** Short summary suitable for injecting into a review prompt */
5
+ summary: string | null;
6
+ }
7
+ /**
8
+ * Reads branch name and last commit message from git. Returns nulls gracefully
9
+ * if git is unavailable or the repo has no commits.
10
+ */
11
+ export declare function detectGitContext(cwd: string): GitContext;
12
+ //# sourceMappingURL=git-context.d.ts.map
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Shared LLM API key detection. Used by setup, doctor/preflight, scan, and run so
3
+ * every surface agrees on which env vars count as "have a key."
4
+ *
5
+ * Before this unified helper, doctor only checked ANTHROPIC_API_KEY + OPENAI_API_KEY
6
+ * while setup/scan/run checked all 5 providers — producing contradictory messages
7
+ * ("LLM API key: detected" from setup, "No LLM API key" from doctor moments later).
8
+ */
9
+ /** All env var names guardrail recognizes as LLM API keys, ordered by preference. */
10
+ export declare const LLM_KEY_NAMES: readonly ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GEMINI_API_KEY", "GOOGLE_API_KEY", "GROQ_API_KEY"];
11
+ export type LLMKeyName = typeof LLM_KEY_NAMES[number];
12
+ export interface KeyDetectionOptions {
13
+ /** Additional key→value map to check alongside process.env (e.g. parsed .env.local). */
14
+ extraEnv?: Record<string, string | undefined>;
15
+ }
16
+ export interface KeyDetectionResult {
17
+ /** True if any recognized LLM key is set to a non-empty value. */
18
+ hasKey: boolean;
19
+ /** Preferred key that was detected, or null. Follows LLM_KEY_NAMES order. */
20
+ preferred: LLMKeyName | null;
21
+ /** All keys that were detected, in LLM_KEY_NAMES order. */
22
+ detected: LLMKeyName[];
23
+ }
24
+ /** Load an env file into a plain object without mutating process.env. */
25
+ export declare function loadEnvFile(filePath: string): Record<string, string>;
26
+ /** Detect whether any recognized LLM API key is set. */
27
+ export declare function detectLLMKey(options?: KeyDetectionOptions): KeyDetectionResult;
28
+ /**
29
+ * Human-readable list of providers and signup URLs, used by every "no key" message.
30
+ * Must cover every entry in LLM_KEY_NAMES so users see the same set of options across
31
+ * preflight, setup, scan, and run.
32
+ */
33
+ export declare const LLM_KEY_HINTS: Array<{
34
+ name: LLMKeyName;
35
+ url: string;
36
+ note?: string;
37
+ }>;
38
+ //# sourceMappingURL=llm-key.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Scans the project for migration directories, schema files, and infra configs
3
+ * and returns glob patterns suitable for `protectedPaths`.
4
+ */
5
+ export declare function detectProtectedPaths(cwd: string): string[];
6
+ //# sourceMappingURL=protected-paths.d.ts.map
@@ -0,0 +1,17 @@
1
+ export type Provider = 'anthropic' | 'gemini' | 'openai' | 'groq';
2
+ export interface ProviderCounts {
3
+ anthropic: number;
4
+ gemini: number;
5
+ openai: number;
6
+ groq: number;
7
+ }
8
+ /**
9
+ * Scans source files under `cwd` and returns per-provider match counts.
10
+ * Counts are capped at 1 per file to avoid skewing on generated lock files.
11
+ */
12
+ export declare function detectProviderUsage(cwd: string): ProviderCounts;
13
+ /**
14
+ * Returns the provider with the highest usage count, or null if all zero.
15
+ */
16
+ export declare function dominantProvider(counts: ProviderCounts): Provider | null;
17
+ //# sourceMappingURL=provider-usage.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Infers a human-readable stack description from project files.
3
+ * Returns null if nothing definitive is found (caller should omit from prompt).
4
+ */
5
+ export declare function detectStack(cwd: string): string | null;
6
+ //# sourceMappingURL=stack.d.ts.map
@@ -0,0 +1,11 @@
1
+ export interface Workspace {
2
+ name: string;
3
+ dir: string;
4
+ rel: string;
5
+ testCommand?: string;
6
+ }
7
+ /** Detect npm/yarn/pnpm workspaces, Turborepo, Nx, Go multi-module. */
8
+ export declare function detectWorkspaces(cwd: string): Workspace[] | null;
9
+ /** Given a list of touched files, return which workspaces they belong to. */
10
+ export declare function mapFilesToWorkspaces(files: string[], workspaces: Workspace[], cwd: string): Map<Workspace, string[]>;
11
+ //# sourceMappingURL=workspaces.d.ts.map
@@ -0,0 +1,17 @@
1
+ export type ErrorCode = 'auth' | 'rate_limit' | 'transient_network' | 'invalid_config' | 'adapter_bug' | 'user_input' | 'budget_exceeded' | 'concurrency_lock' | 'superseded';
2
+ export interface GuardrailErrorOptions {
3
+ code: ErrorCode;
4
+ retryable?: boolean;
5
+ provider?: string;
6
+ step?: string;
7
+ details?: Record<string, unknown>;
8
+ }
9
+ export declare class GuardrailError extends Error {
10
+ code: ErrorCode;
11
+ retryable: boolean;
12
+ provider?: string;
13
+ step?: string;
14
+ details: Record<string, unknown>;
15
+ constructor(message: string, options: GuardrailErrorOptions);
16
+ }
17
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { Finding } from './types.ts';
2
+ export declare function findingContentKey(f: Finding): string;
3
+ export declare function dedupFindings(findings: Finding[]): Finding[];
4
+ //# sourceMappingURL=dedup.d.ts.map
@@ -0,0 +1,33 @@
1
+ export type FindingSource = 'static-rules' | 'review-engine' | 'pipeline' | `review-bot:${string}`;
2
+ export type Severity = 'critical' | 'warning' | 'note';
3
+ export interface Finding {
4
+ id: string;
5
+ source: FindingSource;
6
+ severity: Severity;
7
+ category: string;
8
+ file: string;
9
+ line?: number;
10
+ message: string;
11
+ suggestion?: string;
12
+ protectedPath: boolean;
13
+ createdAt: string;
14
+ }
15
+ export type TriageVerdict = 'real_bug' | 'false_positive' | 'low_value';
16
+ export type TriageAction = 'auto_fix' | 'propose_patch' | 'ask_question' | 'dismiss' | 'needs_human';
17
+ export interface TriageRecord {
18
+ findingId: string;
19
+ verdict: TriageVerdict;
20
+ confidence: number;
21
+ reason: string;
22
+ action: TriageAction;
23
+ recordedAt: string;
24
+ }
25
+ export type FixStatus = 'fixed' | 'reverted' | 'human_required' | 'skipped';
26
+ export interface FixAttempt {
27
+ findingId: string;
28
+ attemptedAt: string;
29
+ status: FixStatus;
30
+ commitSha?: string;
31
+ notes?: string;
32
+ }
33
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { Finding } from '../findings/types.ts';
2
+ import type { ReviewEngine } from '../../adapters/review-engine/types.ts';
3
+ export declare const CONTEXT_LINES = 20;
4
+ export interface GenerateResult {
5
+ status: 'ok' | 'cannot_fix' | 'rejected' | 'error';
6
+ reason?: string;
7
+ originalLines?: string[];
8
+ replacementLines?: string[];
9
+ startLine?: number;
10
+ endLine?: number;
11
+ }
12
+ export declare function validateReplacement(original: string[], replacement: string[], _finding: Finding): string | null;
13
+ export declare function buildUnifiedDiff(original: string[], replacement: string[], filePath: string, startLine: number, opts?: {
14
+ color?: boolean;
15
+ }): string;
16
+ export declare function generateFix(finding: Finding, engine: ReviewEngine, cwd: string): Promise<GenerateResult>;
17
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1,22 @@
1
+ export interface FileDiff {
2
+ file: string;
3
+ hunks: string;
4
+ additions: number;
5
+ deletions: number;
6
+ }
7
+ /**
8
+ * Returns per-file unified diffs for the given files between base and HEAD.
9
+ * Falls back to working-tree diff (unstaged) when base diff is empty for a file.
10
+ */
11
+ export declare function getFileDiffs(cwd: string, base: string, files: string[]): FileDiff[];
12
+ /**
13
+ * Parses unified diff output into per-file FileDiff entries.
14
+ * Only returns files that actually have diff content.
15
+ */
16
+ export declare function parseUnifiedDiff(raw: string, requestedFiles: string[]): FileDiff[];
17
+ /**
18
+ * Formats FileDiff entries into a review-ready string.
19
+ * Total size is bounded by maxChars (default 120K chars ≈ 30K tokens).
20
+ */
21
+ export declare function formatDiffContent(diffs: FileDiff[], maxChars?: number): string;
22
+ //# sourceMappingURL=diff-hunks.d.ts.map
@@ -0,0 +1,11 @@
1
+ export interface TouchedFilesOptions {
2
+ cwd?: string;
3
+ base?: string;
4
+ }
5
+ /**
6
+ * Returns the list of files changed relative to `base` (default HEAD~1).
7
+ * Falls back to `git status --short` unstaged/staged files if the diff fails
8
+ * (e.g. first commit, no parent).
9
+ */
10
+ export declare function resolveGitTouchedFiles(options?: TouchedFilesOptions): string[];
11
+ //# sourceMappingURL=touched-files.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type { Finding } from '../findings/types.ts';
2
+ import type { GuardrailConfig } from '../config/types.ts';
3
+ export interface IgnoreRule {
4
+ ruleId: string | '*';
5
+ pathGlob: string | null;
6
+ }
7
+ export declare function loadIgnoreRules(cwd: string): IgnoreRule[];
8
+ /** Convert `ignore:` entries from guardrail.config.yaml into IgnoreRules. */
9
+ export declare function parseConfigIgnore(entries: GuardrailConfig['ignore']): IgnoreRule[];
10
+ export declare function applyIgnoreRules(findings: Finding[], rules: IgnoreRule[]): Finding[];
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ export interface NdjsonLoggerOptions {
2
+ runId: string;
3
+ logsDir?: string;
4
+ redactionPatterns?: readonly string[];
5
+ }
6
+ export declare class NdjsonLogger {
7
+ private readonly runId;
8
+ private readonly filePath;
9
+ private readonly stream;
10
+ private readonly redactionPatterns;
11
+ constructor(options: NdjsonLoggerOptions);
12
+ log(event: string, fields?: Record<string, unknown>): void;
13
+ close(): Promise<void>;
14
+ getFilePath(): string;
15
+ }
16
+ //# sourceMappingURL=ndjson-writer.d.ts.map
@@ -0,0 +1,4 @@
1
+ export declare const DEFAULT_REDACTION_PATTERNS: readonly string[];
2
+ export declare function applyRedaction(text: string, patterns: readonly string[]): string;
3
+ export declare function containsSecret(text: string, patterns: readonly string[]): boolean;
4
+ //# sourceMappingURL=redaction.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function withWriteLock<T>(workspace: string, fn: () => Promise<T>): Promise<T>;
2
+ //# sourceMappingURL=concurrency.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { ReviewEngine } from '../../../adapters/review-engine/types.ts';
2
+ import type { GuardrailConfig } from '../../config/types.ts';
3
+ export interface FixFindingResult {
4
+ schema_version: 1;
5
+ status: 'fixed' | 'reverted' | 'human_required' | 'skipped';
6
+ reason?: string;
7
+ patch?: string;
8
+ commitSha?: string;
9
+ appliedFiles: string[];
10
+ }
11
+ export declare function handleFixFinding(input: {
12
+ run_id: string;
13
+ finding_id: string;
14
+ cwd?: string;
15
+ dry_run?: boolean;
16
+ }, config: GuardrailConfig, engine: ReviewEngine): Promise<FixFindingResult>;
17
+ //# sourceMappingURL=fix-finding.d.ts.map
@@ -0,0 +1,14 @@
1
+ import type { GuardrailConfig } from '../../config/types.ts';
2
+ export interface CapabilitiesResult {
3
+ schema_version: 1;
4
+ adapter: string;
5
+ enabledRules: string[];
6
+ writeable: boolean;
7
+ gitAvailable: boolean;
8
+ testCommandConfigured: boolean;
9
+ guardrailVersion: string;
10
+ }
11
+ export declare function handleGetCapabilities(input: {
12
+ cwd?: string;
13
+ }, config: GuardrailConfig, adapterName: string): Promise<CapabilitiesResult>;
14
+ //# sourceMappingURL=get-capabilities.d.ts.map
@@ -0,0 +1,13 @@
1
+ import type { Finding, Severity } from '../../findings/types.ts';
2
+ export interface GetFindingsResult {
3
+ schema_version: 1;
4
+ run_id: string;
5
+ findings: Finding[];
6
+ cachedAt: string;
7
+ }
8
+ export declare function handleGetFindings(input: {
9
+ run_id: string;
10
+ severity?: Severity;
11
+ cwd?: string;
12
+ }): Promise<GetFindingsResult>;
13
+ //# sourceMappingURL=get-findings.d.ts.map
@@ -0,0 +1,18 @@
1
+ import type { ReviewEngine } from '../../../adapters/review-engine/types.ts';
2
+ import type { GuardrailConfig } from '../../config/types.ts';
3
+ import type { Finding } from '../../findings/types.ts';
4
+ export interface ReviewDiffResult {
5
+ schema_version: 1;
6
+ run_id: string;
7
+ findings: Finding[];
8
+ human_summary: string;
9
+ usage?: {
10
+ costUSD?: number;
11
+ };
12
+ }
13
+ export declare function handleReviewDiff(input: {
14
+ base?: string;
15
+ cwd?: string;
16
+ static_only?: boolean;
17
+ }, config: GuardrailConfig, engine: ReviewEngine): Promise<ReviewDiffResult>;
18
+ //# sourceMappingURL=review-diff.d.ts.map
@@ -0,0 +1,15 @@
1
+ import type { ReviewEngine } from '../../../adapters/review-engine/types.ts';
2
+ import type { GuardrailConfig } from '../../config/types.ts';
3
+ import type { Finding } from '../../findings/types.ts';
4
+ export interface ScanFilesResult {
5
+ schema_version: 1;
6
+ run_id: string;
7
+ findings: Finding[];
8
+ human_summary: string;
9
+ }
10
+ export declare function handleScanFiles(input: {
11
+ files: string[];
12
+ cwd?: string;
13
+ ask?: string;
14
+ }, config: GuardrailConfig, engine: ReviewEngine): Promise<ScanFilesResult>;
15
+ //# sourceMappingURL=scan-files.d.ts.map
@@ -0,0 +1,12 @@
1
+ import type { GuardrailConfig } from '../../config/types.ts';
2
+ export interface ValidateFixResult {
3
+ schema_version: 1;
4
+ passed: boolean;
5
+ output: string;
6
+ durationMs: number;
7
+ }
8
+ export declare function handleValidateFix(input: {
9
+ cwd?: string;
10
+ files?: string[];
11
+ }, config: GuardrailConfig): Promise<ValidateFixResult>;
12
+ //# sourceMappingURL=validate-fix.d.ts.map
@@ -0,0 +1,12 @@
1
+ import type { Finding } from '../findings/types.ts';
2
+ export interface RunRecord {
3
+ run_id: string;
4
+ createdAt: string;
5
+ findings: Finding[];
6
+ fileChecksums: Record<string, string>;
7
+ }
8
+ export declare function saveRun(cwd: string, runId: string, findings: Finding[], fileChecksums: Record<string, string>): void;
9
+ export declare function loadRun(cwd: string, runId: string): RunRecord | null;
10
+ export declare function checksumFile(filePath: string): string;
11
+ export declare function pruneOldRuns(cwd: string, maxAgeMs: number): void;
12
+ //# sourceMappingURL=run-store.d.ts.map
@@ -0,0 +1,3 @@
1
+ export declare function resolveWorkspace(cwd?: string): string;
2
+ export declare function assertInWorkspace(workspace: string, filePath: string): string;
3
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1,39 @@
1
+ import type { Finding } from '../findings/types.ts';
2
+ export interface BaselineEntry {
3
+ id: string;
4
+ file: string;
5
+ line?: number;
6
+ severity: string;
7
+ message: string;
8
+ pinnedAt: string;
9
+ note?: string;
10
+ }
11
+ export interface Baseline {
12
+ version: 1;
13
+ createdAt: string;
14
+ updatedAt: string;
15
+ note?: string;
16
+ entries: BaselineEntry[];
17
+ }
18
+ export declare function baselineFilePath(cwd: string, overridePath?: string): string;
19
+ export declare function loadBaseline(cwd: string, overridePath?: string): Baseline | null;
20
+ export declare function saveBaseline(cwd: string, findings: Finding[], options?: {
21
+ note?: string;
22
+ overridePath?: string;
23
+ }): Baseline;
24
+ export declare function clearBaseline(cwd: string, overridePath?: string): void;
25
+ export interface BaselineFilterResult {
26
+ newFindings: Finding[];
27
+ baselinedFindings: Finding[];
28
+ baselinedCount: number;
29
+ }
30
+ /** Returns findings NOT present in the baseline (new findings only). */
31
+ export declare function filterBaselined(findings: Finding[], baseline: Baseline): BaselineFilterResult;
32
+ export interface BaselineDiff {
33
+ added: Finding[];
34
+ resolved: BaselineEntry[];
35
+ unchanged: Finding[];
36
+ }
37
+ /** Diff current findings against a baseline snapshot. */
38
+ export declare function diffAgainstBaseline(current: Finding[], baseline: Baseline): BaselineDiff;
39
+ //# sourceMappingURL=baseline.d.ts.map
@@ -0,0 +1,11 @@
1
+ export interface CostLogEntry {
2
+ timestamp: string;
3
+ files: number;
4
+ inputTokens: number;
5
+ outputTokens: number;
6
+ costUSD: number;
7
+ durationMs: number;
8
+ }
9
+ export declare function appendCostLog(cwd: string, entry: CostLogEntry): void;
10
+ export declare function readCostLog(cwd: string): CostLogEntry[];
11
+ //# sourceMappingURL=cost-log.d.ts.map
@@ -0,0 +1,9 @@
1
+ import type { Finding } from '../findings/types.ts';
2
+ export declare function loadCachedFindings(cwd: string): Finding[];
3
+ export declare function saveCachedFindings(cwd: string, findings: Finding[]): void;
4
+ /**
5
+ * Returns only findings not present in the cached baseline.
6
+ * Two findings are considered the same when id + file + line all match.
7
+ */
8
+ export declare function filterNewFindings(current: Finding[], cached: Finding[]): Finding[];
9
+ //# sourceMappingURL=findings-cache.d.ts.map
@@ -0,0 +1,30 @@
1
+ import type { Finding } from '../findings/types.ts';
2
+ export type TriageState = 'accepted-risk' | 'false-positive';
3
+ export interface TriageEntry {
4
+ id: string;
5
+ file: string;
6
+ line?: number;
7
+ state: TriageState;
8
+ reason?: string;
9
+ triagedAt: string;
10
+ expiresAt?: string;
11
+ }
12
+ export interface TriageStore {
13
+ version: 1;
14
+ entries: TriageEntry[];
15
+ }
16
+ export declare function loadTriage(cwd: string): TriageStore;
17
+ export declare function saveTriage(cwd: string, store: TriageStore): void;
18
+ export declare function addTriageEntry(cwd: string, finding: Finding, state: TriageState, options?: {
19
+ reason?: string;
20
+ expiresInDays?: number;
21
+ }): void;
22
+ export declare function removeTriageEntry(cwd: string, ids: string[]): number;
23
+ export declare function clearExpiredEntries(cwd: string): number;
24
+ export interface TriageFilterResult {
25
+ active: Finding[];
26
+ triaged: Finding[];
27
+ triageCount: number;
28
+ }
29
+ export declare function filterTriaged(findings: Finding[], store: TriageStore): TriageFilterResult;
30
+ //# sourceMappingURL=triage.d.ts.map