@vibecheckai/cli 2.5.1

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 (415) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +532 -0
  3. package/dist/autopatch/verified-autopatch.d.ts +111 -0
  4. package/dist/autopatch/verified-autopatch.d.ts.map +1 -0
  5. package/dist/autopatch/verified-autopatch.js +503 -0
  6. package/dist/autopatch/verified-autopatch.js.map +1 -0
  7. package/dist/bundles/guardrail-core.js +25799 -0
  8. package/dist/bundles/guardrail-security.js +208687 -0
  9. package/dist/bundles/guardrail-ship.js +2318 -0
  10. package/dist/bundles/index.js +8 -0
  11. package/dist/commands/autopilot-decision.d.ts +24 -0
  12. package/dist/commands/autopilot-decision.d.ts.map +1 -0
  13. package/dist/commands/autopilot-decision.js +304 -0
  14. package/dist/commands/autopilot-decision.js.map +1 -0
  15. package/dist/commands/autopilot.d.ts +33 -0
  16. package/dist/commands/autopilot.d.ts.map +1 -0
  17. package/dist/commands/autopilot.js +1539 -0
  18. package/dist/commands/autopilot.js.map +1 -0
  19. package/dist/commands/baseline.d.ts +7 -0
  20. package/dist/commands/baseline.d.ts.map +1 -0
  21. package/dist/commands/baseline.js +79 -0
  22. package/dist/commands/baseline.js.map +1 -0
  23. package/dist/commands/cache.d.ts +13 -0
  24. package/dist/commands/cache.d.ts.map +1 -0
  25. package/dist/commands/cache.js +165 -0
  26. package/dist/commands/cache.js.map +1 -0
  27. package/dist/commands/checkpoint.d.ts +8 -0
  28. package/dist/commands/checkpoint.d.ts.map +1 -0
  29. package/dist/commands/checkpoint.js +35 -0
  30. package/dist/commands/checkpoint.js.map +1 -0
  31. package/dist/commands/context.d.ts +8 -0
  32. package/dist/commands/context.d.ts.map +1 -0
  33. package/dist/commands/context.js +340 -0
  34. package/dist/commands/context.js.map +1 -0
  35. package/dist/commands/debug.d.ts +78 -0
  36. package/dist/commands/debug.d.ts.map +1 -0
  37. package/dist/commands/debug.js +381 -0
  38. package/dist/commands/debug.js.map +1 -0
  39. package/dist/commands/doctor.d.ts +17 -0
  40. package/dist/commands/doctor.d.ts.map +1 -0
  41. package/dist/commands/doctor.js +226 -0
  42. package/dist/commands/doctor.js.map +1 -0
  43. package/dist/commands/evidence.d.ts +45 -0
  44. package/dist/commands/evidence.d.ts.map +1 -0
  45. package/dist/commands/evidence.js +197 -0
  46. package/dist/commands/evidence.js.map +1 -0
  47. package/dist/commands/explain.d.ts +8 -0
  48. package/dist/commands/explain.d.ts.map +1 -0
  49. package/dist/commands/explain.js +52 -0
  50. package/dist/commands/explain.js.map +1 -0
  51. package/dist/commands/fix-consolidated.d.ts +19 -0
  52. package/dist/commands/fix-consolidated.d.ts.map +1 -0
  53. package/dist/commands/fix-consolidated.js +165 -0
  54. package/dist/commands/fix-consolidated.js.map +1 -0
  55. package/dist/commands/index.d.ts +8 -0
  56. package/dist/commands/index.d.ts.map +1 -0
  57. package/dist/commands/index.js +15 -0
  58. package/dist/commands/index.js.map +1 -0
  59. package/dist/commands/init.d.ts +8 -0
  60. package/dist/commands/init.d.ts.map +1 -0
  61. package/dist/commands/init.js +125 -0
  62. package/dist/commands/init.js.map +1 -0
  63. package/dist/commands/launcher.d.ts +10 -0
  64. package/dist/commands/launcher.d.ts.map +1 -0
  65. package/dist/commands/launcher.js +174 -0
  66. package/dist/commands/launcher.js.map +1 -0
  67. package/dist/commands/on.d.ts +8 -0
  68. package/dist/commands/on.d.ts.map +1 -0
  69. package/dist/commands/on.js +123 -0
  70. package/dist/commands/on.js.map +1 -0
  71. package/dist/commands/preview.d.ts +54 -0
  72. package/dist/commands/preview.d.ts.map +1 -0
  73. package/dist/commands/preview.js +352 -0
  74. package/dist/commands/preview.js.map +1 -0
  75. package/dist/commands/quality/check.d.ts +31 -0
  76. package/dist/commands/quality/check.d.ts.map +1 -0
  77. package/dist/commands/quality/check.js +242 -0
  78. package/dist/commands/quality/check.js.map +1 -0
  79. package/dist/commands/quality/index.d.ts +8 -0
  80. package/dist/commands/quality/index.d.ts.map +1 -0
  81. package/dist/commands/quality/index.js +14 -0
  82. package/dist/commands/quality/index.js.map +1 -0
  83. package/dist/commands/quality/setup-quality.d.ts +23 -0
  84. package/dist/commands/quality/setup-quality.d.ts.map +1 -0
  85. package/dist/commands/quality/setup-quality.js +452 -0
  86. package/dist/commands/quality/setup-quality.js.map +1 -0
  87. package/dist/commands/quality/tidy.d.ts +41 -0
  88. package/dist/commands/quality/tidy.d.ts.map +1 -0
  89. package/dist/commands/quality/tidy.js +466 -0
  90. package/dist/commands/quality/tidy.js.map +1 -0
  91. package/dist/commands/quality/utils.d.ts +73 -0
  92. package/dist/commands/quality/utils.d.ts.map +1 -0
  93. package/dist/commands/quality/utils.js +158 -0
  94. package/dist/commands/quality/utils.js.map +1 -0
  95. package/dist/commands/replay.d.ts +8 -0
  96. package/dist/commands/replay.d.ts.map +1 -0
  97. package/dist/commands/replay.js +52 -0
  98. package/dist/commands/replay.js.map +1 -0
  99. package/dist/commands/scan-consolidated.d.ts +61 -0
  100. package/dist/commands/scan-consolidated.d.ts.map +1 -0
  101. package/dist/commands/scan-consolidated.js +243 -0
  102. package/dist/commands/scan-consolidated.js.map +1 -0
  103. package/dist/commands/scan-secrets.d.ts +47 -0
  104. package/dist/commands/scan-secrets.d.ts.map +1 -0
  105. package/dist/commands/scan-secrets.js +225 -0
  106. package/dist/commands/scan-secrets.js.map +1 -0
  107. package/dist/commands/scan-vulnerabilities-enhanced.d.ts +41 -0
  108. package/dist/commands/scan-vulnerabilities-enhanced.d.ts.map +1 -0
  109. package/dist/commands/scan-vulnerabilities-enhanced.js +368 -0
  110. package/dist/commands/scan-vulnerabilities-enhanced.js.map +1 -0
  111. package/dist/commands/scan-vulnerabilities-osv.d.ts +58 -0
  112. package/dist/commands/scan-vulnerabilities-osv.d.ts.map +1 -0
  113. package/dist/commands/scan-vulnerabilities-osv.js +716 -0
  114. package/dist/commands/scan-vulnerabilities-osv.js.map +1 -0
  115. package/dist/commands/scan-vulnerabilities.d.ts +32 -0
  116. package/dist/commands/scan-vulnerabilities.d.ts.map +1 -0
  117. package/dist/commands/scan-vulnerabilities.js +283 -0
  118. package/dist/commands/scan-vulnerabilities.js.map +1 -0
  119. package/dist/commands/secrets-allowlist.d.ts +7 -0
  120. package/dist/commands/secrets-allowlist.d.ts.map +1 -0
  121. package/dist/commands/secrets-allowlist.js +85 -0
  122. package/dist/commands/secrets-allowlist.js.map +1 -0
  123. package/dist/commands/ship-consolidated.d.ts +58 -0
  124. package/dist/commands/ship-consolidated.d.ts.map +1 -0
  125. package/dist/commands/ship-consolidated.js +515 -0
  126. package/dist/commands/ship-consolidated.js.map +1 -0
  127. package/dist/commands/stats.d.ts +8 -0
  128. package/dist/commands/stats.d.ts.map +1 -0
  129. package/dist/commands/stats.js +134 -0
  130. package/dist/commands/stats.js.map +1 -0
  131. package/dist/commands/upgrade.d.ts +8 -0
  132. package/dist/commands/upgrade.d.ts.map +1 -0
  133. package/dist/commands/upgrade.js +30 -0
  134. package/dist/commands/upgrade.js.map +1 -0
  135. package/dist/fix/analytics.d.ts +121 -0
  136. package/dist/fix/analytics.d.ts.map +1 -0
  137. package/dist/fix/analytics.js +289 -0
  138. package/dist/fix/analytics.js.map +1 -0
  139. package/dist/fix/applicator.d.ts +44 -0
  140. package/dist/fix/applicator.d.ts.map +1 -0
  141. package/dist/fix/applicator.js +144 -0
  142. package/dist/fix/applicator.js.map +1 -0
  143. package/dist/fix/audit.d.ts +61 -0
  144. package/dist/fix/audit.d.ts.map +1 -0
  145. package/dist/fix/audit.js +149 -0
  146. package/dist/fix/audit.js.map +1 -0
  147. package/dist/fix/backup.d.ts +38 -0
  148. package/dist/fix/backup.d.ts.map +1 -0
  149. package/dist/fix/backup.js +154 -0
  150. package/dist/fix/backup.js.map +1 -0
  151. package/dist/fix/config.d.ts +78 -0
  152. package/dist/fix/config.d.ts.map +1 -0
  153. package/dist/fix/config.js +200 -0
  154. package/dist/fix/config.js.map +1 -0
  155. package/dist/fix/engine.d.ts +55 -0
  156. package/dist/fix/engine.d.ts.map +1 -0
  157. package/dist/fix/engine.js +285 -0
  158. package/dist/fix/engine.js.map +1 -0
  159. package/dist/fix/impact.d.ts +74 -0
  160. package/dist/fix/impact.d.ts.map +1 -0
  161. package/dist/fix/impact.js +281 -0
  162. package/dist/fix/impact.js.map +1 -0
  163. package/dist/fix/index.d.ts +5 -0
  164. package/dist/fix/index.d.ts.map +1 -0
  165. package/dist/fix/index.js +12 -0
  166. package/dist/fix/index.js.map +1 -0
  167. package/dist/fix/interactive.d.ts +22 -0
  168. package/dist/fix/interactive.d.ts.map +1 -0
  169. package/dist/fix/interactive.js +172 -0
  170. package/dist/fix/interactive.js.map +1 -0
  171. package/dist/fix/learning.d.ts +109 -0
  172. package/dist/fix/learning.d.ts.map +1 -0
  173. package/dist/fix/learning.js +296 -0
  174. package/dist/fix/learning.js.map +1 -0
  175. package/dist/fix/metrics.d.ts +106 -0
  176. package/dist/fix/metrics.d.ts.map +1 -0
  177. package/dist/fix/metrics.js +138 -0
  178. package/dist/fix/metrics.js.map +1 -0
  179. package/dist/fix/parallel.d.ts +69 -0
  180. package/dist/fix/parallel.d.ts.map +1 -0
  181. package/dist/fix/parallel.js +203 -0
  182. package/dist/fix/parallel.js.map +1 -0
  183. package/dist/fix/report.d.ts +40 -0
  184. package/dist/fix/report.d.ts.map +1 -0
  185. package/dist/fix/report.js +212 -0
  186. package/dist/fix/report.js.map +1 -0
  187. package/dist/fix/strategy.d.ts +53 -0
  188. package/dist/fix/strategy.d.ts.map +1 -0
  189. package/dist/fix/strategy.js +143 -0
  190. package/dist/fix/strategy.js.map +1 -0
  191. package/dist/fix/templates.d.ts +58 -0
  192. package/dist/fix/templates.d.ts.map +1 -0
  193. package/dist/fix/templates.js +259 -0
  194. package/dist/fix/templates.js.map +1 -0
  195. package/dist/fix/testing.d.ts +68 -0
  196. package/dist/fix/testing.d.ts.map +1 -0
  197. package/dist/fix/testing.js +245 -0
  198. package/dist/fix/testing.js.map +1 -0
  199. package/dist/fix/validation.d.ts +71 -0
  200. package/dist/fix/validation.d.ts.map +1 -0
  201. package/dist/fix/validation.js +267 -0
  202. package/dist/fix/validation.js.map +1 -0
  203. package/dist/fix/visualization.d.ts +73 -0
  204. package/dist/fix/visualization.d.ts.map +1 -0
  205. package/dist/fix/visualization.js +243 -0
  206. package/dist/fix/visualization.js.map +1 -0
  207. package/dist/formatters/index.d.ts +6 -0
  208. package/dist/formatters/index.d.ts.map +1 -0
  209. package/dist/formatters/index.js +11 -0
  210. package/dist/formatters/index.js.map +1 -0
  211. package/dist/formatters/sarif-enhanced.d.ts +78 -0
  212. package/dist/formatters/sarif-enhanced.d.ts.map +1 -0
  213. package/dist/formatters/sarif-enhanced.js +144 -0
  214. package/dist/formatters/sarif-enhanced.js.map +1 -0
  215. package/dist/formatters/sarif-v2.d.ts +121 -0
  216. package/dist/formatters/sarif-v2.d.ts.map +1 -0
  217. package/dist/formatters/sarif-v2.js +356 -0
  218. package/dist/formatters/sarif-v2.js.map +1 -0
  219. package/dist/formatters/sarif.d.ts +72 -0
  220. package/dist/formatters/sarif.d.ts.map +1 -0
  221. package/dist/formatters/sarif.js +146 -0
  222. package/dist/formatters/sarif.js.map +1 -0
  223. package/dist/index.d.ts +61 -0
  224. package/dist/index.d.ts.map +1 -0
  225. package/dist/index.js +4455 -0
  226. package/dist/index.js.map +1 -0
  227. package/dist/init/ci-generator.d.ts +18 -0
  228. package/dist/init/ci-generator.d.ts.map +1 -0
  229. package/dist/init/ci-generator.js +317 -0
  230. package/dist/init/ci-generator.js.map +1 -0
  231. package/dist/init/detect-framework.d.ts +15 -0
  232. package/dist/init/detect-framework.d.ts.map +1 -0
  233. package/dist/init/detect-framework.js +301 -0
  234. package/dist/init/detect-framework.js.map +1 -0
  235. package/dist/init/hooks-installer.d.ts +22 -0
  236. package/dist/init/hooks-installer.d.ts.map +1 -0
  237. package/dist/init/hooks-installer.js +310 -0
  238. package/dist/init/hooks-installer.js.map +1 -0
  239. package/dist/init/index.d.ts +8 -0
  240. package/dist/init/index.d.ts.map +1 -0
  241. package/dist/init/index.js +22 -0
  242. package/dist/init/index.js.map +1 -0
  243. package/dist/init/templates.d.ts +401 -0
  244. package/dist/init/templates.d.ts.map +1 -0
  245. package/dist/init/templates.js +240 -0
  246. package/dist/init/templates.js.map +1 -0
  247. package/dist/mcp/server.d.ts +12 -0
  248. package/dist/mcp/server.d.ts.map +1 -0
  249. package/dist/mcp/server.js +42 -0
  250. package/dist/mcp/server.js.map +1 -0
  251. package/dist/mcp/telemetry.d.ts +40 -0
  252. package/dist/mcp/telemetry.d.ts.map +1 -0
  253. package/dist/mcp/telemetry.js +98 -0
  254. package/dist/mcp/telemetry.js.map +1 -0
  255. package/dist/reality/no-dead-buttons/button-sweep-generator.d.ts +32 -0
  256. package/dist/reality/no-dead-buttons/button-sweep-generator.d.ts.map +1 -0
  257. package/dist/reality/no-dead-buttons/button-sweep-generator.js +236 -0
  258. package/dist/reality/no-dead-buttons/button-sweep-generator.js.map +1 -0
  259. package/dist/reality/no-dead-buttons/index.d.ts +11 -0
  260. package/dist/reality/no-dead-buttons/index.d.ts.map +1 -0
  261. package/dist/reality/no-dead-buttons/index.js +18 -0
  262. package/dist/reality/no-dead-buttons/index.js.map +1 -0
  263. package/dist/reality/no-dead-buttons/static-scanner.d.ts +34 -0
  264. package/dist/reality/no-dead-buttons/static-scanner.d.ts.map +1 -0
  265. package/dist/reality/no-dead-buttons/static-scanner.js +230 -0
  266. package/dist/reality/no-dead-buttons/static-scanner.js.map +1 -0
  267. package/dist/reality/reality-graph.d.ts +192 -0
  268. package/dist/reality/reality-graph.d.ts.map +1 -0
  269. package/dist/reality/reality-graph.js +600 -0
  270. package/dist/reality/reality-graph.js.map +1 -0
  271. package/dist/reality/reality-runner.d.ts +89 -0
  272. package/dist/reality/reality-runner.d.ts.map +1 -0
  273. package/dist/reality/reality-runner.js +540 -0
  274. package/dist/reality/reality-runner.js.map +1 -0
  275. package/dist/reality/receipt-generator.d.ts +152 -0
  276. package/dist/reality/receipt-generator.d.ts.map +1 -0
  277. package/dist/reality/receipt-generator.js +495 -0
  278. package/dist/reality/receipt-generator.js.map +1 -0
  279. package/dist/reality/runtime-tracer.d.ts +75 -0
  280. package/dist/reality/runtime-tracer.d.ts.map +1 -0
  281. package/dist/reality/runtime-tracer.js +109 -0
  282. package/dist/reality/runtime-tracer.js.map +1 -0
  283. package/dist/runtime/auth-utils.d.ts +43 -0
  284. package/dist/runtime/auth-utils.d.ts.map +1 -0
  285. package/dist/runtime/auth-utils.js +130 -0
  286. package/dist/runtime/auth-utils.js.map +1 -0
  287. package/dist/runtime/cli-errors.d.ts +38 -0
  288. package/dist/runtime/cli-errors.d.ts.map +1 -0
  289. package/dist/runtime/cli-errors.js +354 -0
  290. package/dist/runtime/cli-errors.js.map +1 -0
  291. package/dist/runtime/client.d.ts +74 -0
  292. package/dist/runtime/client.d.ts.map +1 -0
  293. package/dist/runtime/client.js +222 -0
  294. package/dist/runtime/client.js.map +1 -0
  295. package/dist/runtime/creds.d.ts +48 -0
  296. package/dist/runtime/creds.d.ts.map +1 -0
  297. package/dist/runtime/creds.js +245 -0
  298. package/dist/runtime/creds.js.map +1 -0
  299. package/dist/runtime/exit-codes.d.ts +49 -0
  300. package/dist/runtime/exit-codes.d.ts.map +1 -0
  301. package/dist/runtime/exit-codes.js +93 -0
  302. package/dist/runtime/exit-codes.js.map +1 -0
  303. package/dist/runtime/index.d.ts +9 -0
  304. package/dist/runtime/index.d.ts.map +1 -0
  305. package/dist/runtime/index.js +25 -0
  306. package/dist/runtime/index.js.map +1 -0
  307. package/dist/runtime/json-output.d.ts +42 -0
  308. package/dist/runtime/json-output.d.ts.map +1 -0
  309. package/dist/runtime/json-output.js +59 -0
  310. package/dist/runtime/json-output.js.map +1 -0
  311. package/dist/runtime/owner-mode.d.ts +48 -0
  312. package/dist/runtime/owner-mode.d.ts.map +1 -0
  313. package/dist/runtime/owner-mode.js +284 -0
  314. package/dist/runtime/owner-mode.js.map +1 -0
  315. package/dist/runtime/semver.d.ts +37 -0
  316. package/dist/runtime/semver.d.ts.map +1 -0
  317. package/dist/runtime/semver.js +110 -0
  318. package/dist/runtime/semver.js.map +1 -0
  319. package/dist/scan/dead-ui-detector.d.ts +48 -0
  320. package/dist/scan/dead-ui-detector.d.ts.map +1 -0
  321. package/dist/scan/dead-ui-detector.js +170 -0
  322. package/dist/scan/dead-ui-detector.js.map +1 -0
  323. package/dist/scan/playwright-sweep.d.ts +40 -0
  324. package/dist/scan/playwright-sweep.d.ts.map +1 -0
  325. package/dist/scan/playwright-sweep.js +216 -0
  326. package/dist/scan/playwright-sweep.js.map +1 -0
  327. package/dist/scan/proof-bundle.d.ts +25 -0
  328. package/dist/scan/proof-bundle.d.ts.map +1 -0
  329. package/dist/scan/proof-bundle.js +203 -0
  330. package/dist/scan/proof-bundle.js.map +1 -0
  331. package/dist/scan/proof-graph.d.ts +59 -0
  332. package/dist/scan/proof-graph.d.ts.map +1 -0
  333. package/dist/scan/proof-graph.js +64 -0
  334. package/dist/scan/proof-graph.js.map +1 -0
  335. package/dist/scan/reality-sniff.d.ts +56 -0
  336. package/dist/scan/reality-sniff.d.ts.map +1 -0
  337. package/dist/scan/reality-sniff.js +200 -0
  338. package/dist/scan/reality-sniff.js.map +1 -0
  339. package/dist/scan/structural-verifier.d.ts +20 -0
  340. package/dist/scan/structural-verifier.d.ts.map +1 -0
  341. package/dist/scan/structural-verifier.js +112 -0
  342. package/dist/scan/structural-verifier.js.map +1 -0
  343. package/dist/scan/verification-engine.d.ts +47 -0
  344. package/dist/scan/verification-engine.d.ts.map +1 -0
  345. package/dist/scan/verification-engine.js +141 -0
  346. package/dist/scan/verification-engine.js.map +1 -0
  347. package/dist/scanner/baseline.d.ts +52 -0
  348. package/dist/scanner/baseline.d.ts.map +1 -0
  349. package/dist/scanner/baseline.js +85 -0
  350. package/dist/scanner/baseline.js.map +1 -0
  351. package/dist/scanner/incremental.d.ts +30 -0
  352. package/dist/scanner/incremental.d.ts.map +1 -0
  353. package/dist/scanner/incremental.js +82 -0
  354. package/dist/scanner/incremental.js.map +1 -0
  355. package/dist/scanner/index.d.ts +8 -0
  356. package/dist/scanner/index.d.ts.map +1 -0
  357. package/dist/scanner/index.js +15 -0
  358. package/dist/scanner/index.js.map +1 -0
  359. package/dist/scanner/parallel.d.ts +43 -0
  360. package/dist/scanner/parallel.d.ts.map +1 -0
  361. package/dist/scanner/parallel.js +99 -0
  362. package/dist/scanner/parallel.js.map +1 -0
  363. package/dist/scanner/placeholder-detector.d.ts +56 -0
  364. package/dist/scanner/placeholder-detector.d.ts.map +1 -0
  365. package/dist/scanner/placeholder-detector.js +220 -0
  366. package/dist/scanner/placeholder-detector.js.map +1 -0
  367. package/dist/scanner/route-detector.d.ts +100 -0
  368. package/dist/scanner/route-detector.d.ts.map +1 -0
  369. package/dist/scanner/route-detector.js +455 -0
  370. package/dist/scanner/route-detector.js.map +1 -0
  371. package/dist/scanner/scoring.d.ts +67 -0
  372. package/dist/scanner/scoring.d.ts.map +1 -0
  373. package/dist/scanner/scoring.js +284 -0
  374. package/dist/scanner/scoring.js.map +1 -0
  375. package/dist/ship-baseline.d.ts +56 -0
  376. package/dist/ship-baseline.d.ts.map +1 -0
  377. package/dist/ship-baseline.js +194 -0
  378. package/dist/ship-baseline.js.map +1 -0
  379. package/dist/ship-config.d.ts +91 -0
  380. package/dist/ship-config.d.ts.map +1 -0
  381. package/dist/ship-config.js +133 -0
  382. package/dist/ship-config.js.map +1 -0
  383. package/dist/ship-data-loader.d.ts +70 -0
  384. package/dist/ship-data-loader.d.ts.map +1 -0
  385. package/dist/ship-data-loader.js +301 -0
  386. package/dist/ship-data-loader.js.map +1 -0
  387. package/dist/standalone.d.ts +1 -0
  388. package/dist/standalone.d.ts.map +1 -0
  389. package/dist/standalone.js +1 -0
  390. package/dist/standalone.js.map +1 -0
  391. package/dist/truth-pack/index.d.ts +102 -0
  392. package/dist/truth-pack/index.d.ts.map +1 -0
  393. package/dist/truth-pack/index.js +694 -0
  394. package/dist/truth-pack/index.js.map +1 -0
  395. package/dist/ui/frame.d.ts +68 -0
  396. package/dist/ui/frame.d.ts.map +1 -0
  397. package/dist/ui/frame.js +165 -0
  398. package/dist/ui/frame.js.map +1 -0
  399. package/dist/ui/index.d.ts +5 -0
  400. package/dist/ui/index.d.ts.map +1 -0
  401. package/dist/ui/index.js +16 -0
  402. package/dist/ui/index.js.map +1 -0
  403. package/dist/ui.d.ts +36 -0
  404. package/dist/ui.d.ts.map +1 -0
  405. package/dist/ui.js +45 -0
  406. package/dist/ui.js.map +1 -0
  407. package/dist/utils/ai-helpers.d.ts +72 -0
  408. package/dist/utils/ai-helpers.d.ts.map +1 -0
  409. package/dist/utils/ai-helpers.js +339 -0
  410. package/dist/utils/ai-helpers.js.map +1 -0
  411. package/dist/utils/validation.d.ts +34 -0
  412. package/dist/utils/validation.d.ts.map +1 -0
  413. package/dist/utils/validation.js +160 -0
  414. package/dist/utils/validation.js.map +1 -0
  415. package/package.json +66 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Guardrail
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,532 @@
1
+ # Guardrail CLI v2.5.0 🎉
2
+
3
+ The official command-line interface for Guardrail - AI-native code security and guardrail platform.
4
+
5
+ ## ✨ What's New in v2.5.0
6
+
7
+ - 🎮 **Interactive Menu** - Arrow key navigation, visual selection indicators
8
+ - 🎭 **Reality Mode** - Automatic Playwright installation for browser testing
9
+ - 📦 **Ship Check** - Plain English audit and deployment readiness
10
+ - 🛠️ **AI Fixes** - Enhanced guided suggestions and automated remediation
11
+ - 🧪 **Full Test Coverage** - 50+ integration tests ensuring reliability
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install -g guardrail-cli@latest
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```bash
22
+ # 🎮 Open the new interactive menu (recommended)
23
+ guardrail menu
24
+
25
+ # 🔐 Authenticate with your API key
26
+ guardrail auth --key gr_pro_your_api_key_here
27
+
28
+ # 🔍 Scan your project
29
+ guardrail scan --path ./your-project
30
+
31
+ # 🚀 Try Reality Mode (auto-installs Playwright)
32
+ guardrail reality --url https://your-site.com --flow user-journey
33
+
34
+ # 📦 Ship readiness check
35
+ guardrail ship --path ./your-project
36
+ ```
37
+
38
+ ## Authentication
39
+
40
+ The CLI uses enterprise-grade authentication with secure credential storage.
41
+
42
+ ### Commands
43
+
44
+ ```bash
45
+ # Authenticate with API key (validates against Guardrail API)
46
+ guardrail auth --key gr_pro_abc123xyz789
47
+
48
+ # Check current authentication status
49
+ # Shows masked key (gr_pro_****xyz9), tier, email, expiry
50
+ guardrail auth --status
51
+
52
+ # Force refresh cached entitlements
53
+ guardrail auth --refresh
54
+
55
+ # Logout and remove stored credentials
56
+ guardrail auth --logout
57
+ ```
58
+
59
+ ### Features
60
+
61
+ - **Real API Validation**: Keys are validated against `POST /v1/cli/auth/validate`
62
+ - **Secure Storage**: Credentials stored with 0600 permissions (Unix) or NTFS ACLs (Windows)
63
+ - **Local Caching**: Entitlements cached for 15 minutes to reduce API calls
64
+ - **Auto-Refresh**: Cache reused if > 5 minutes remaining; use `--refresh` to force
65
+ - **Key Masking**: API keys always displayed masked: `gr_pro_****abcd`
66
+ - **Expiry Warnings**: Yellow warning if entitlements expire within 72 hours
67
+
68
+ ### Credential Storage
69
+
70
+ | Platform | Location |
71
+ |----------|----------|
72
+ | macOS | `~/Library/Application Support/guardrail/state.json` |
73
+ | Linux | `~/.config/guardrail/state.json` |
74
+ | Windows | `%APPDATA%\guardrail\state.json` |
75
+
76
+ If `keytar` is available, sensitive tokens are stored in the OS keychain.
77
+
78
+ ## Commands
79
+
80
+ - `guardrail auth` - Authenticate with your API key
81
+ - `guardrail scan` - Run security scans
82
+ - `guardrail scan:secrets` - Scan for hardcoded secrets
83
+ - `guardrail scan:vulnerabilities` - Scan dependencies for CVEs (OSV integration)
84
+ - `guardrail scan:compliance` - Compliance assessment (Pro)
85
+ - `guardrail sbom:generate` - Generate SBOM (Pro)
86
+ - `guardrail ship` - Ship readiness checks (Starter+)
87
+ - `guardrail reality` - Browser testing for fake data (Starter+)
88
+ - `guardrail smells` - Code smell analysis
89
+ - `guardrail fix` - Manual fix suggestions (Starter+)
90
+ - `guardrail autopilot` - AI-powered batch remediation (Pro)
91
+ - `guardrail cache:clear` - Clear OSV vulnerability cache
92
+ - `guardrail cache:status` - Show cache statistics
93
+ - `guardrail init` - Initialize Guardrail in a project (see [Init Command](#init-command))
94
+ - `guardrail menu` - Interactive menu
95
+
96
+ ## Init Command
97
+
98
+ The `guardrail init` command provides enterprise-grade project initialization with automatic framework detection and template-based configuration.
99
+
100
+ ### Basic Usage
101
+
102
+ ```bash
103
+ # Initialize with interactive prompts (auto-detects framework)
104
+ guardrail init
105
+
106
+ # Initialize with a specific template
107
+ guardrail init --template enterprise
108
+
109
+ # Initialize with CI and git hooks
110
+ guardrail init --ci --hooks
111
+
112
+ # Non-interactive mode
113
+ guardrail init --template startup --no-interactive
114
+ ```
115
+
116
+ ### Options
117
+
118
+ | Option | Description |
119
+ |--------|-------------|
120
+ | `-p, --path <path>` | Project path (default: `.`) |
121
+ | `-t, --template <template>` | Template: `startup`, `enterprise`, or `oss` |
122
+ | `--ci` | Generate CI/CD workflow (GitHub Actions with SARIF upload) |
123
+ | `--hooks` | Install git hooks (husky or lefthook) |
124
+ | `--hook-runner <runner>` | Specify hook runner: `husky` or `lefthook` |
125
+ | `--no-interactive` | Disable interactive prompts |
126
+
127
+ ### Framework Detection
128
+
129
+ Guardrail automatically detects your project framework by inspecting `package.json` and file structure:
130
+
131
+ | Framework | Detection Signals |
132
+ |-----------|-------------------|
133
+ | **Next.js** | `next` dependency, `next.config.*`, `app/` or `pages/` directory |
134
+ | **Express** | `express` dependency, `src/server.*` patterns, `routes/` directory |
135
+ | **NestJS** | `@nestjs/core` dependency, `nest-cli.json`, `*.module.ts` files |
136
+ | **Fastify** | `fastify` dependency, `@fastify/*` packages |
137
+ | **Remix** | `@remix-run/*` packages, `remix.config.*`, `app/routes/` |
138
+ | **Vite+React** | `vite` + `react` dependencies, `@vitejs/plugin-react` |
139
+
140
+ Based on the detected framework, Guardrail recommends the most relevant scans:
141
+
142
+ - **Next.js/Remix**: secrets, vulnerabilities, ship readiness, reality mode (auth flows)
143
+ - **Express/NestJS/Fastify**: secrets, vulnerabilities, ship readiness, compliance (logging/rate limits)
144
+ - **Vite+React**: secrets, vulnerabilities, ship readiness
145
+
146
+ ### Templates
147
+
148
+ Templates configure `.guardrail/config.json` with different defaults:
149
+
150
+ #### Startup Template
151
+ - **Use case**: Early-stage teams, fast iteration
152
+ - **Scan thresholds**: High (fewer alerts)
153
+ - **Compliance**: Disabled
154
+ - **Gating**: Block on critical only
155
+ - **Output**: Table format
156
+ - **Noise reduction**: Suppress test files, low-confidence findings
157
+
158
+ ```bash
159
+ guardrail init --template startup
160
+ ```
161
+
162
+ #### Enterprise Template
163
+ - **Use case**: Regulated industries, strict security requirements
164
+ - **Scan thresholds**: Low (catch everything)
165
+ - **Compliance**: Enabled (SOC2 by default)
166
+ - **Gating**: Block on critical and high, baseline/allowlist enabled
167
+ - **Output**: SARIF format with upload
168
+ - **SBOM**: Enabled
169
+
170
+ ```bash
171
+ guardrail init --template enterprise
172
+ ```
173
+
174
+ #### OSS Template
175
+ - **Use case**: Open source projects, contributor-friendly
176
+ - **Focus**: Supply chain security (SBOM, vulnerabilities)
177
+ - **Gating**: Permissive, baseline/allowlist enabled
178
+ - **Output**: Markdown format (PR-friendly)
179
+ - **Noise reduction**: Suppress test files, examples
180
+
181
+ ```bash
182
+ guardrail init --template oss
183
+ ```
184
+
185
+ ### Generated Files
186
+
187
+ #### Configuration (`.guardrail/config.json`)
188
+
189
+ ```json
190
+ {
191
+ "version": "1.0.0",
192
+ "template": "enterprise",
193
+ "framework": "nextjs",
194
+ "scans": {
195
+ "secrets": { "enabled": true, "threshold": "low" },
196
+ "vulnerabilities": { "enabled": true, "threshold": "medium" },
197
+ "compliance": { "enabled": true, "frameworks": ["soc2"] },
198
+ "sbom": { "enabled": true }
199
+ },
200
+ "gating": {
201
+ "enabled": true,
202
+ "blockOnCritical": true,
203
+ "blockOnHigh": true,
204
+ "baselineEnabled": true,
205
+ "allowlistEnabled": true
206
+ },
207
+ "output": {
208
+ "format": "sarif",
209
+ "sarifUpload": true,
210
+ "badgeGeneration": true
211
+ }
212
+ }
213
+ ```
214
+
215
+ #### CI Workflow (`.github/workflows/guardrail.yml`)
216
+
217
+ When using `--ci`, generates a GitHub Actions workflow that:
218
+ - Runs secrets and vulnerability scans
219
+ - Runs compliance checks (if enabled)
220
+ - Generates SBOM (if enabled)
221
+ - Uploads SARIF results to GitHub Security tab
222
+ - Runs ship readiness check
223
+ - Fails the workflow on critical/high findings
224
+
225
+ **Required**: Add `GUARDRAIL_API_KEY` to your repository secrets.
226
+
227
+ #### Git Hooks (`.husky/` or `lefthook.yml`)
228
+
229
+ When using `--hooks`, installs:
230
+ - **pre-commit**: Secrets scan on staged files
231
+ - **pre-push**: Full secrets + vulnerability scan + ship check
232
+
233
+ ### Examples
234
+
235
+ ```bash
236
+ # Next.js project with enterprise security
237
+ guardrail init --template enterprise --ci --hooks
238
+
239
+ # Express API with startup defaults
240
+ guardrail init --path ./api --template startup
241
+
242
+ # OSS project with lefthook
243
+ guardrail init --template oss --hooks --hook-runner lefthook
244
+
245
+ # CI-only setup (no hooks)
246
+ guardrail init --template enterprise --ci --no-interactive
247
+ ```
248
+
249
+ ## Vulnerability Scanning (OSV Integration)
250
+
251
+ The `scan:vulnerabilities` command uses real-time data from the [Open Source Vulnerabilities (OSV)](https://osv.dev) database.
252
+
253
+ ### Features
254
+
255
+ - **Real-time OSV API queries** - Live vulnerability data from Google's OSV database
256
+ - **Multi-ecosystem support** - npm, PyPI, RubyGems, Go
257
+ - **Lockfile parsing** - package-lock.json, pnpm-lock.yaml, yarn.lock
258
+ - **24-hour caching** - Reduces API calls with local cache in `.guardrail/cache/osv.json`
259
+ - **CVSS scoring** - Severity levels with optional NVD enrichment
260
+ - **Remediation paths** - Upgrade suggestions with breaking change detection
261
+ - **SARIF output** - GitHub code scanning integration
262
+
263
+ ### Usage
264
+
265
+ ```bash
266
+ # Basic vulnerability scan
267
+ guardrail scan:vulnerabilities --path ./my-project
268
+
269
+ # Bypass cache for fresh data
270
+ guardrail scan:vulnerabilities --no-cache
271
+
272
+ # Enable NVD enrichment for CVSS scores (slower)
273
+ guardrail scan:vulnerabilities --nvd
274
+
275
+ # Output as SARIF for GitHub code scanning
276
+ guardrail scan:vulnerabilities --format sarif -o results.sarif
277
+
278
+ # Filter by ecosystem
279
+ guardrail scan:vulnerabilities --ecosystem npm
280
+
281
+ # Fail CI if critical vulnerabilities found
282
+ guardrail scan:vulnerabilities --fail-on-critical
283
+ ```
284
+
285
+ ### Options
286
+
287
+ | Option | Description |
288
+ |--------|-------------|
289
+ | `-p, --path <path>` | Project path to scan (default: `.`) |
290
+ | `-f, --format <format>` | Output format: `table`, `json`, `sarif` (default: `table`) |
291
+ | `-o, --output <file>` | Write report to file |
292
+ | `--no-cache` | Bypass 24h cache, fetch fresh data from OSV |
293
+ | `--nvd` | Enable NVD enrichment for CVSS scores (slower) |
294
+ | `--fail-on-critical` | Exit with error if critical vulnerabilities found |
295
+ | `--fail-on-high` | Exit with error if high+ vulnerabilities found |
296
+ | `--ecosystem <eco>` | Filter by ecosystem: `npm`, `PyPI`, `RubyGems`, `Go` |
297
+
298
+ ### Cache Management
299
+
300
+ Vulnerability data is cached for 24 hours in `.guardrail/cache/osv.json`.
301
+
302
+ ```bash
303
+ # View cache statistics
304
+ guardrail cache:status
305
+
306
+ # Clear the cache
307
+ guardrail cache:clear
308
+
309
+ # Clear global cache
310
+ guardrail cache:clear --global
311
+ ```
312
+
313
+ ### SARIF Output for GitHub
314
+
315
+ Generate SARIF v2.1.0 output for GitHub code scanning:
316
+
317
+ ```bash
318
+ # Generate SARIF report
319
+ guardrail scan:vulnerabilities --format sarif -o vuln-results.sarif
320
+
321
+ # In GitHub Actions workflow:
322
+ - name: Run Guardrail Vulnerability Scan
323
+ run: guardrail scan:vulnerabilities --format sarif -o results.sarif
324
+
325
+ - name: Upload SARIF to GitHub
326
+ uses: github/codeql-action/upload-sarif@v2
327
+ with:
328
+ sarif_file: results.sarif
329
+ ```
330
+
331
+ The SARIF output includes:
332
+ - Rule metadata with CVE/GHSA IDs
333
+ - CVSS scores and vectors
334
+ - Remediation suggestions
335
+ - Package.json line locations
336
+ - Direct vs transitive classification
337
+
338
+ ### Consistent Command Headers
339
+
340
+ All analysis commands (`scan`, `ship`, `smells`, etc.) display a consistent framed header with:
341
+ - **Title**: Command name with icon
342
+ - **Project**: Project name from directory
343
+ - **Path**: Project path (truncated for long paths)
344
+ - **Started**: Timestamp when command started
345
+ - **Mode**: Tier badge when authenticated (FREE/STARTER/PRO/ENTERPRISE)
346
+ - **Metadata**: Command-specific options (e.g., scan type, severity filter)
347
+
348
+ The header respects `NO_COLOR` environment variable and `--no-color` flag for CI/accessibility.
349
+
350
+ ## Tiers
351
+
352
+ - **Free**: Basic scanning and validation
353
+ - **Starter** ($29/mo): Ship checks, reality mode, fix suggestions
354
+ - **Pro** ($99/mo): Advanced analysis, autopilot, smells detection, compliance
355
+ - **Enterprise** ($499/mo): Custom policies, SSO, dedicated support
356
+
357
+ ## Environment Variables
358
+
359
+ | Variable | Description |
360
+ |----------|-------------|
361
+ | `GUARDRAIL_API_BASE_URL` | Override API endpoint (default: `https://api.guardrail.dev`) |
362
+ | `GUARDRAIL_NO_INTERACTIVE` | Disable interactive prompts (`1` to disable) |
363
+ | `GUARDRAIL_NO_UNICODE` | Disable Unicode output (`1` for ASCII-only) |
364
+
365
+ ## Reality Mode
366
+
367
+ Reality Mode detects fake data, mock backends, and placeholder content in your running application using Playwright browser automation.
368
+
369
+ ### Generate Only (default)
370
+
371
+ ```bash
372
+ # Generate a Playwright test for the auth flow
373
+ guardrail reality --flow auth
374
+
375
+ # Generate test for a custom URL
376
+ guardrail reality --url http://localhost:8080 --flow checkout
377
+ ```
378
+
379
+ ### Generate + Run
380
+
381
+ ```bash
382
+ # Generate and immediately execute the test
383
+ guardrail reality --run --flow auth
384
+
385
+ # Run in headed mode (show browser)
386
+ guardrail reality --run --flow auth --headless=false
387
+
388
+ # Custom timeout and workers
389
+ guardrail reality --run --timeout 60 --workers 2
390
+
391
+ # Use HTML reporter for detailed results
392
+ guardrail reality --run --reporter html,list
393
+
394
+ # Full configuration example
395
+ guardrail reality --run \
396
+ --url http://localhost:8080 \
397
+ --flow checkout \
398
+ --timeout 45 \
399
+ --workers 4 \
400
+ --reporter html,json \
401
+ --trace retain-on-failure \
402
+ --video retain-on-failure \
403
+ --screenshot only-on-failure
404
+ ```
405
+
406
+ **Exit Code**: Mirrors Playwright's exit code (0 = pass, non-zero = fail)
407
+
408
+ #### 3. Record Mode
409
+
410
+ Opens Playwright in interactive recording mode using `codegen` to capture user actions.
411
+
412
+ ```bash
413
+ # Start recording session
414
+ guardrail reality --record --url http://localhost:3000
415
+
416
+ # Record with custom flow name
417
+ guardrail reality --record --url http://localhost:8080 --flow signup
418
+ ```
419
+
420
+ **How it works**:
421
+ 1. Opens browser with Playwright Inspector
422
+ 2. Interact with your app (click, type, navigate)
423
+ 3. Playwright records all actions with robust selectors
424
+ 4. Generated test saved to `.guardrail/reality/<runId>/reality-<flow>.test.ts`
425
+ 5. Press Ctrl+C when done
426
+
427
+ ### Options
428
+
429
+ | Flag | Description | Default |
430
+ |------|-------------|---------|
431
+ | `-p, --path <path>` | Project path | `.` |
432
+ | `-u, --url <url>` | Base URL of running app | `http://localhost:3000` |
433
+ | `-f, --flow <flow>` | Flow to test: auth, checkout, dashboard | `auth` |
434
+ | `-t, --timeout <seconds>` | Test timeout in seconds | `30` |
435
+ | `--headless` | Run in headless mode | `false` |
436
+ | `--run` | Execute the generated test immediately | `false` |
437
+ | `--record` | Open Playwright codegen for recording | `false` |
438
+ | `--workers <n>` | Number of parallel workers | `1` |
439
+ | `--reporter <type>` | Test reporter: list, dot, html, json | `list` |
440
+ | `--trace <mode>` | Trace mode: on, off, retain-on-failure, on-first-retry | `retain-on-failure` |
441
+ | `--video <mode>` | Video mode: on, off, retain-on-failure, on-first-retry | `retain-on-failure` |
442
+ | `--screenshot <mode>` | Screenshot mode: on, off, only-on-failure | `only-on-failure` |
443
+
444
+ ### Artifacts
445
+
446
+ When using `--run`, artifacts are saved under `.guardrail/reality/<runId>/`:
447
+
448
+ ```
449
+ .guardrail/reality/auth-1704123456789-a1b2c3d4/
450
+ ├── reality-auth.test.ts # Generated test file
451
+ ├── output.log # Playwright console output
452
+ ├── result.json # Run result summary (success, exitCode, duration)
453
+ ├── run-metadata.json # Execution configuration
454
+ ├── screenshots/ # Failure screenshots (if --screenshot enabled)
455
+ │ ├── test-failed-1.png
456
+ │ └── test-failed-2.png
457
+ └── report/ # HTML report (if --reporter html)
458
+ └── index.html
459
+ ```
460
+
461
+ ### Viewing Results
462
+
463
+ **HTML Report** (if `--reporter html`):
464
+ ```bash
465
+ npx playwright show-report .guardrail/reality/<runId>/report
466
+ ```
467
+
468
+ **JSON Results**:
469
+ ```bash
470
+ cat .guardrail/reality/<runId>/result.json
471
+ ```
472
+
473
+ **Logs**:
474
+ ```bash
475
+ cat .guardrail/reality/<runId>/output.log
476
+ ```
477
+
478
+ ### Prerequisites
479
+
480
+ Reality Mode requires Playwright and browser binaries.
481
+
482
+ **Install Playwright**:
483
+ ```bash
484
+ npm install -D @playwright/test
485
+ npx playwright install
486
+ ```
487
+
488
+ The CLI automatically detects missing dependencies and provides exact install commands with exit code 2.
489
+
490
+ ### Exit Codes
491
+
492
+ | Code | Meaning |
493
+ |------|---------|
494
+ | 0 | Tests passed |
495
+ | 1 | Tests failed |
496
+ | 2 | Playwright or browsers not installed |
497
+
498
+ ### Examples
499
+
500
+ **Quick test in CI**:
501
+ ```bash
502
+ guardrail reality --run --flow auth --headless --timeout 30
503
+ ```
504
+
505
+ **Debug with full visibility**:
506
+ ```bash
507
+ guardrail reality --run --flow checkout \
508
+ --no-headless \
509
+ --trace on \
510
+ --video on \
511
+ --screenshot on
512
+ ```
513
+
514
+ **Record custom flow**:
515
+ ```bash
516
+ guardrail reality --record --url http://localhost:3000 --flow onboarding
517
+ ```
518
+
519
+ **Parallel execution**:
520
+ ```bash
521
+ guardrail reality --run --workers 4 --reporter html,json
522
+ ```
523
+
524
+ ## Support
525
+
526
+ - [Documentation](https://guardrail.dev/docs)
527
+ - [Discord](https://discord.gg/guardrail)
528
+ - [Support](mailto:support@guardrail.dev)
529
+
530
+ ## License
531
+
532
+ MIT
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Agent-Safe Autopatch: "Verified Fixes Only"
3
+ *
4
+ * Pipeline:
5
+ * 1. Generate patch
6
+ * 2. Apply in sandbox branch
7
+ * 3. Run proof suite (build, tests, flows, policy checks)
8
+ * 4. Only then: "Verified Fix" badge + one-click merge
9
+ *
10
+ * This is how you become the first tool that can honestly say:
11
+ * "We don't just suggest fixes. We prove they work."
12
+ */
13
+ export type VerificationGate = 'build' | 'tests' | 'flows' | 'policy' | 'lint' | 'type-check';
14
+ export type GateResult = {
15
+ gate: VerificationGate;
16
+ passed: boolean;
17
+ duration: number;
18
+ output?: string;
19
+ error?: string;
20
+ timestamp: string;
21
+ };
22
+ export type VerifiedFixStatus = 'pending' | 'verifying' | 'verified' | 'failed' | 'merged';
23
+ export interface VerifiedFix {
24
+ id: string;
25
+ findingId: string;
26
+ file: string;
27
+ line: number;
28
+ patch: string;
29
+ branchName: string;
30
+ status: VerifiedFixStatus;
31
+ gates: GateResult[];
32
+ createdAt: string;
33
+ verifiedAt?: string;
34
+ mergedAt?: string;
35
+ receiptPath?: string;
36
+ }
37
+ export interface VerifiedFixOptions {
38
+ projectPath: string;
39
+ findingId: string;
40
+ file: string;
41
+ line: number;
42
+ patch: string;
43
+ gates?: VerificationGate[];
44
+ generateReceipt?: boolean;
45
+ }
46
+ export declare class VerifiedAutopatch {
47
+ private projectPath;
48
+ private fixes;
49
+ constructor(projectPath: string);
50
+ /**
51
+ * Generate and verify a fix
52
+ */
53
+ createVerifiedFix(options: VerifiedFixOptions): Promise<VerifiedFix>;
54
+ /**
55
+ * Create sandbox branch
56
+ */
57
+ private createSandboxBranch;
58
+ /**
59
+ * Apply patch to file
60
+ */
61
+ private applyPatch;
62
+ /**
63
+ * Run verification gates
64
+ */
65
+ private runVerificationGates;
66
+ /**
67
+ * Build gate: Ensure project builds successfully
68
+ */
69
+ private runBuildGate;
70
+ /**
71
+ * Tests gate: Run test suite
72
+ */
73
+ private runTestsGate;
74
+ /**
75
+ * Flows gate: Run reality mode flows
76
+ */
77
+ private runFlowsGate;
78
+ /**
79
+ * Policy gate: Run policy checks
80
+ */
81
+ private runPolicyGate;
82
+ /**
83
+ * Lint gate: Run linter
84
+ */
85
+ private runLintGate;
86
+ /**
87
+ * Type check gate: Run TypeScript type checker
88
+ */
89
+ private runTypeCheckGate;
90
+ /**
91
+ * Generate fix receipt
92
+ */
93
+ private generateFixReceipt;
94
+ /**
95
+ * Merge verified fix
96
+ */
97
+ mergeFix(fixId: string, targetBranch?: string): Promise<void>;
98
+ /**
99
+ * Get fix status
100
+ */
101
+ getFix(fixId: string): VerifiedFix | undefined;
102
+ /**
103
+ * List all fixes
104
+ */
105
+ listFixes(): VerifiedFix[];
106
+ /**
107
+ * Cleanup sandbox branch
108
+ */
109
+ cleanup(fixId: string): Promise<void>;
110
+ }
111
+ //# sourceMappingURL=verified-autopatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verified-autopatch.d.ts","sourceRoot":"","sources":["../../src/autopatch/verified-autopatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,OAAO,GACP,OAAO,GACP,QAAQ,GACR,MAAM,GACN,YAAY,CAAC;AAEjB,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,WAAW,GACX,UAAU,GACV,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,KAAK,CAAuC;gBAExC,WAAW,EAAE,MAAM;IAI/B;;OAEG;IACG,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IA2D1E;;OAEG;YACW,mBAAmB;IA2BjC;;OAEG;YACW,UAAU;IAoBxB;;OAEG;YACW,oBAAoB;IAgDlC;;OAEG;YACW,YAAY;IA+B1B;;OAEG;YACW,YAAY;IA8B1B;;OAEG;YACW,YAAY;IAkC1B;;OAEG;YACW,aAAa;IA4B3B;;OAEG;YACW,WAAW;IA8BzB;;OAEG;YACW,gBAAgB;IA8B9B;;OAEG;YACW,kBAAkB;IAkChC;;OAEG;IACG,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,GAAE,MAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B3E;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAI9C;;OAEG;IACH,SAAS,IAAI,WAAW,EAAE;IAI1B;;OAEG;IACG,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAuB5C"}