@cybedefend/vibedefend 1.8.2 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/README.md +185 -17
  2. package/dist/auth/auth-store.js +16 -0
  3. package/dist/auth/auth-store.js.map +1 -1
  4. package/dist/clients/antigravity.js +30 -6
  5. package/dist/clients/antigravity.js.map +1 -1
  6. package/dist/clients/claude-code.js +209 -17
  7. package/dist/clients/claude-code.js.map +1 -1
  8. package/dist/clients/codex.js +171 -11
  9. package/dist/clients/codex.js.map +1 -1
  10. package/dist/clients/cursor.js +149 -9
  11. package/dist/clients/cursor.js.map +1 -1
  12. package/dist/clients/dependency-check-wiring.js +24 -0
  13. package/dist/clients/dependency-check-wiring.js.map +1 -0
  14. package/dist/clients/opencode-plugin.js +905 -0
  15. package/dist/clients/opencode-plugin.js.map +1 -0
  16. package/dist/clients/opencode.js +653 -0
  17. package/dist/clients/opencode.js.map +1 -0
  18. package/dist/clients/registry.js +2 -0
  19. package/dist/clients/registry.js.map +1 -1
  20. package/dist/clients/vscode.js +106 -12
  21. package/dist/clients/vscode.js.map +1 -1
  22. package/dist/clients/windsurf.js +9 -1
  23. package/dist/clients/windsurf.js.map +1 -1
  24. package/dist/commands/mcp/index.js +11 -0
  25. package/dist/commands/mcp/index.js.map +1 -1
  26. package/dist/config.js +4 -1
  27. package/dist/config.js.map +1 -1
  28. package/dist/diagnostics.js +22 -3
  29. package/dist/diagnostics.js.map +1 -1
  30. package/dist/doctor.js +26 -1
  31. package/dist/doctor.js.map +1 -1
  32. package/dist/guards-evaluator/command-analysis.js +347 -86
  33. package/dist/guards-evaluator/command-analysis.js.map +1 -1
  34. package/dist/guards-evaluator/command-view.js +116 -16
  35. package/dist/guards-evaluator/command-view.js.map +1 -1
  36. package/dist/guards-evaluator/evaluate.js +185 -41
  37. package/dist/guards-evaluator/evaluate.js.map +1 -1
  38. package/dist/guards-evaluator/file-reads.js +202 -0
  39. package/dist/guards-evaluator/file-reads.js.map +1 -0
  40. package/dist/guards-evaluator/index.js +1 -1
  41. package/dist/guards-evaluator/index.js.map +1 -1
  42. package/dist/guards-evaluator/inline-danger.js +299 -0
  43. package/dist/guards-evaluator/inline-danger.js.map +1 -0
  44. package/dist/guards-evaluator/normalize.js +1186 -55
  45. package/dist/guards-evaluator/normalize.js.map +1 -1
  46. package/dist/guards-evaluator/regex.js +91 -4
  47. package/dist/guards-evaluator/regex.js.map +1 -1
  48. package/dist/guards-evaluator/shell-files.js +587 -0
  49. package/dist/guards-evaluator/shell-files.js.map +1 -0
  50. package/dist/guards-evaluator/triage.js +32 -2
  51. package/dist/guards-evaluator/triage.js.map +1 -1
  52. package/dist/hook-runner.js +25601 -5423
  53. package/dist/hooks/install.js +8 -3
  54. package/dist/hooks/install.js.map +1 -1
  55. package/dist/hooks/runtime/antigravity-session.js +109 -50
  56. package/dist/hooks/runtime/antigravity-session.js.map +1 -1
  57. package/dist/hooks/runtime/apply-patch.js +92 -0
  58. package/dist/hooks/runtime/apply-patch.js.map +1 -0
  59. package/dist/hooks/runtime/caller-gate.js +27 -0
  60. package/dist/hooks/runtime/caller-gate.js.map +1 -0
  61. package/dist/hooks/runtime/code-mode.js +259 -0
  62. package/dist/hooks/runtime/code-mode.js.map +1 -0
  63. package/dist/hooks/runtime/dependency-check/api.js +179 -0
  64. package/dist/hooks/runtime/dependency-check/api.js.map +1 -0
  65. package/dist/hooks/runtime/dependency-check/capabilities.js +99 -0
  66. package/dist/hooks/runtime/dependency-check/capabilities.js.map +1 -0
  67. package/dist/hooks/runtime/dependency-check/checked-packages.js +48 -0
  68. package/dist/hooks/runtime/dependency-check/checked-packages.js.map +1 -0
  69. package/dist/hooks/runtime/dependency-check/commands/cwd.js +154 -0
  70. package/dist/hooks/runtime/dependency-check/commands/cwd.js.map +1 -0
  71. package/dist/hooks/runtime/dependency-check/commands/env.js +99 -0
  72. package/dist/hooks/runtime/dependency-check/commands/env.js.map +1 -0
  73. package/dist/hooks/runtime/dependency-check/commands/flags.js +164 -0
  74. package/dist/hooks/runtime/dependency-check/commands/flags.js.map +1 -0
  75. package/dist/hooks/runtime/dependency-check/commands/managers.js +418 -0
  76. package/dist/hooks/runtime/dependency-check/commands/managers.js.map +1 -0
  77. package/dist/hooks/runtime/dependency-check/commands/peel.js +111 -0
  78. package/dist/hooks/runtime/dependency-check/commands/peel.js.map +1 -0
  79. package/dist/hooks/runtime/dependency-check/commands/shell.js +217 -0
  80. package/dist/hooks/runtime/dependency-check/commands/shell.js.map +1 -0
  81. package/dist/hooks/runtime/dependency-check/commands/types.js +4 -0
  82. package/dist/hooks/runtime/dependency-check/commands/types.js.map +1 -0
  83. package/dist/hooks/runtime/dependency-check/commands.js +34 -0
  84. package/dist/hooks/runtime/dependency-check/commands.js.map +1 -0
  85. package/dist/hooks/runtime/dependency-check/deadlines.js +69 -0
  86. package/dist/hooks/runtime/dependency-check/deadlines.js.map +1 -0
  87. package/dist/hooks/runtime/dependency-check/dispatch.js +344 -0
  88. package/dist/hooks/runtime/dependency-check/dispatch.js.map +1 -0
  89. package/dist/hooks/runtime/dependency-check/entering.js +63 -0
  90. package/dist/hooks/runtime/dependency-check/entering.js.map +1 -0
  91. package/dist/hooks/runtime/dependency-check/exec-cache.js +36 -0
  92. package/dist/hooks/runtime/dependency-check/exec-cache.js.map +1 -0
  93. package/dist/hooks/runtime/dependency-check/git-blob.js +116 -0
  94. package/dist/hooks/runtime/dependency-check/git-blob.js.map +1 -0
  95. package/dist/hooks/runtime/dependency-check/hook.js +418 -0
  96. package/dist/hooks/runtime/dependency-check/hook.js.map +1 -0
  97. package/dist/hooks/runtime/dependency-check/local-store.js +74 -0
  98. package/dist/hooks/runtime/dependency-check/local-store.js.map +1 -0
  99. package/dist/hooks/runtime/dependency-check/lockfile-walk.js +89 -0
  100. package/dist/hooks/runtime/dependency-check/lockfile-walk.js.map +1 -0
  101. package/dist/hooks/runtime/dependency-check/lockfiles/bun.js +153 -0
  102. package/dist/hooks/runtime/dependency-check/lockfiles/bun.js.map +1 -0
  103. package/dist/hooks/runtime/dependency-check/lockfiles/by-name.js +46 -0
  104. package/dist/hooks/runtime/dependency-check/lockfiles/by-name.js.map +1 -0
  105. package/dist/hooks/runtime/dependency-check/lockfiles/cargo.js +91 -0
  106. package/dist/hooks/runtime/dependency-check/lockfiles/cargo.js.map +1 -0
  107. package/dist/hooks/runtime/dependency-check/lockfiles/composer.js +98 -0
  108. package/dist/hooks/runtime/dependency-check/lockfiles/composer.js.map +1 -0
  109. package/dist/hooks/runtime/dependency-check/lockfiles/gemfile.js +88 -0
  110. package/dist/hooks/runtime/dependency-check/lockfiles/gemfile.js.map +1 -0
  111. package/dist/hooks/runtime/dependency-check/lockfiles/go-mod.js +154 -0
  112. package/dist/hooks/runtime/dependency-check/lockfiles/go-mod.js.map +1 -0
  113. package/dist/hooks/runtime/dependency-check/lockfiles/gradle-lockfile.js +27 -0
  114. package/dist/hooks/runtime/dependency-check/lockfiles/gradle-lockfile.js.map +1 -0
  115. package/dist/hooks/runtime/dependency-check/lockfiles/graph.js +131 -0
  116. package/dist/hooks/runtime/dependency-check/lockfiles/graph.js.map +1 -0
  117. package/dist/hooks/runtime/dependency-check/lockfiles/npm.js +107 -0
  118. package/dist/hooks/runtime/dependency-check/lockfiles/npm.js.map +1 -0
  119. package/dist/hooks/runtime/dependency-check/lockfiles/nuget-packages-lock.js +60 -0
  120. package/dist/hooks/runtime/dependency-check/lockfiles/nuget-packages-lock.js.map +1 -0
  121. package/dist/hooks/runtime/dependency-check/lockfiles/pins.js +105 -0
  122. package/dist/hooks/runtime/dependency-check/lockfiles/pins.js.map +1 -0
  123. package/dist/hooks/runtime/dependency-check/lockfiles/pip-report.js +34 -0
  124. package/dist/hooks/runtime/dependency-check/lockfiles/pip-report.js.map +1 -0
  125. package/dist/hooks/runtime/dependency-check/lockfiles/pnpm.js +109 -0
  126. package/dist/hooks/runtime/dependency-check/lockfiles/pnpm.js.map +1 -0
  127. package/dist/hooks/runtime/dependency-check/lockfiles/poetry.js +105 -0
  128. package/dist/hooks/runtime/dependency-check/lockfiles/poetry.js.map +1 -0
  129. package/dist/hooks/runtime/dependency-check/lockfiles/uv.js +181 -0
  130. package/dist/hooks/runtime/dependency-check/lockfiles/uv.js.map +1 -0
  131. package/dist/hooks/runtime/dependency-check/lockfiles/yaml.js +319 -0
  132. package/dist/hooks/runtime/dependency-check/lockfiles/yaml.js.map +1 -0
  133. package/dist/hooks/runtime/dependency-check/lockfiles/yarn-berry.js +71 -0
  134. package/dist/hooks/runtime/dependency-check/lockfiles/yarn-berry.js.map +1 -0
  135. package/dist/hooks/runtime/dependency-check/lockfiles/yarn1.js +144 -0
  136. package/dist/hooks/runtime/dependency-check/lockfiles/yarn1.js.map +1 -0
  137. package/dist/hooks/runtime/dependency-check/manifests/apply.js +110 -0
  138. package/dist/hooks/runtime/dependency-check/manifests/apply.js.map +1 -0
  139. package/dist/hooks/runtime/dependency-check/manifests/diff.js +127 -0
  140. package/dist/hooks/runtime/dependency-check/manifests/diff.js.map +1 -0
  141. package/dist/hooks/runtime/dependency-check/manifests/edit.js +259 -0
  142. package/dist/hooks/runtime/dependency-check/manifests/edit.js.map +1 -0
  143. package/dist/hooks/runtime/dependency-check/manifests/json.js +109 -0
  144. package/dist/hooks/runtime/dependency-check/manifests/json.js.map +1 -0
  145. package/dist/hooks/runtime/dependency-check/manifests/kind.js +40 -0
  146. package/dist/hooks/runtime/dependency-check/manifests/kind.js.map +1 -0
  147. package/dist/hooks/runtime/dependency-check/manifests/patch.js +179 -0
  148. package/dist/hooks/runtime/dependency-check/manifests/patch.js.map +1 -0
  149. package/dist/hooks/runtime/dependency-check/manifests/text.js +665 -0
  150. package/dist/hooks/runtime/dependency-check/manifests/text.js.map +1 -0
  151. package/dist/hooks/runtime/dependency-check/manifests/toml.js +350 -0
  152. package/dist/hooks/runtime/dependency-check/manifests/toml.js.map +1 -0
  153. package/dist/hooks/runtime/dependency-check/manifests.js +14 -0
  154. package/dist/hooks/runtime/dependency-check/manifests.js.map +1 -0
  155. package/dist/hooks/runtime/dependency-check/messages.js +270 -0
  156. package/dist/hooks/runtime/dependency-check/messages.js.map +1 -0
  157. package/dist/hooks/runtime/dependency-check/net-baseline.js +157 -0
  158. package/dist/hooks/runtime/dependency-check/net-baseline.js.map +1 -0
  159. package/dist/hooks/runtime/dependency-check/net-state.js +70 -0
  160. package/dist/hooks/runtime/dependency-check/net-state.js.map +1 -0
  161. package/dist/hooks/runtime/dependency-check/pending-forces.js +54 -0
  162. package/dist/hooks/runtime/dependency-check/pending-forces.js.map +1 -0
  163. package/dist/hooks/runtime/dependency-check/post-tool-use.js +108 -0
  164. package/dist/hooks/runtime/dependency-check/post-tool-use.js.map +1 -0
  165. package/dist/hooks/runtime/dependency-check/ranges.js +369 -0
  166. package/dist/hooks/runtime/dependency-check/ranges.js.map +1 -0
  167. package/dist/hooks/runtime/dependency-check/requirement-files.js +144 -0
  168. package/dist/hooks/runtime/dependency-check/requirement-files.js.map +1 -0
  169. package/dist/hooks/runtime/dependency-check/resolvers/bun.js +38 -0
  170. package/dist/hooks/runtime/dependency-check/resolvers/bun.js.map +1 -0
  171. package/dist/hooks/runtime/dependency-check/resolvers/bundler.js +218 -0
  172. package/dist/hooks/runtime/dependency-check/resolvers/bundler.js.map +1 -0
  173. package/dist/hooks/runtime/dependency-check/resolvers/cargo.js +303 -0
  174. package/dist/hooks/runtime/dependency-check/resolvers/cargo.js.map +1 -0
  175. package/dist/hooks/runtime/dependency-check/resolvers/composer.js +250 -0
  176. package/dist/hooks/runtime/dependency-check/resolvers/composer.js.map +1 -0
  177. package/dist/hooks/runtime/dependency-check/resolvers/config-files.js +27 -0
  178. package/dist/hooks/runtime/dependency-check/resolvers/config-files.js.map +1 -0
  179. package/dist/hooks/runtime/dependency-check/resolvers/direct-only-registry.js +409 -0
  180. package/dist/hooks/runtime/dependency-check/resolvers/direct-only-registry.js.map +1 -0
  181. package/dist/hooks/runtime/dependency-check/resolvers/direct-only.js +290 -0
  182. package/dist/hooks/runtime/dependency-check/resolvers/direct-only.js.map +1 -0
  183. package/dist/hooks/runtime/dependency-check/resolvers/gem.js +89 -0
  184. package/dist/hooks/runtime/dependency-check/resolvers/gem.js.map +1 -0
  185. package/dist/hooks/runtime/dependency-check/resolvers/go.js +313 -0
  186. package/dist/hooks/runtime/dependency-check/resolvers/go.js.map +1 -0
  187. package/dist/hooks/runtime/dependency-check/resolvers/npm.js +81 -0
  188. package/dist/hooks/runtime/dependency-check/resolvers/npm.js.map +1 -0
  189. package/dist/hooks/runtime/dependency-check/resolvers/pip.js +229 -0
  190. package/dist/hooks/runtime/dependency-check/resolvers/pip.js.map +1 -0
  191. package/dist/hooks/runtime/dependency-check/resolvers/pipx.js +8 -0
  192. package/dist/hooks/runtime/dependency-check/resolvers/pipx.js.map +1 -0
  193. package/dist/hooks/runtime/dependency-check/resolvers/pnpm.js +68 -0
  194. package/dist/hooks/runtime/dependency-check/resolvers/pnpm.js.map +1 -0
  195. package/dist/hooks/runtime/dependency-check/resolvers/poetry.js +70 -0
  196. package/dist/hooks/runtime/dependency-check/resolvers/poetry.js.map +1 -0
  197. package/dist/hooks/runtime/dependency-check/resolvers/project.js +208 -0
  198. package/dist/hooks/runtime/dependency-check/resolvers/project.js.map +1 -0
  199. package/dist/hooks/runtime/dependency-check/resolvers/python-index.js +270 -0
  200. package/dist/hooks/runtime/dependency-check/resolvers/python-index.js.map +1 -0
  201. package/dist/hooks/runtime/dependency-check/resolvers/python.js +229 -0
  202. package/dist/hooks/runtime/dependency-check/resolvers/python.js.map +1 -0
  203. package/dist/hooks/runtime/dependency-check/resolvers/registry.js +221 -0
  204. package/dist/hooks/runtime/dependency-check/resolvers/registry.js.map +1 -0
  205. package/dist/hooks/runtime/dependency-check/resolvers/shared.js +440 -0
  206. package/dist/hooks/runtime/dependency-check/resolvers/shared.js.map +1 -0
  207. package/dist/hooks/runtime/dependency-check/resolvers/tree.js +131 -0
  208. package/dist/hooks/runtime/dependency-check/resolvers/tree.js.map +1 -0
  209. package/dist/hooks/runtime/dependency-check/resolvers/uv.js +433 -0
  210. package/dist/hooks/runtime/dependency-check/resolvers/uv.js.map +1 -0
  211. package/dist/hooks/runtime/dependency-check/resolvers/xml-lite.js +132 -0
  212. package/dist/hooks/runtime/dependency-check/resolvers/xml-lite.js.map +1 -0
  213. package/dist/hooks/runtime/dependency-check/resolvers/yarn-berry.js +106 -0
  214. package/dist/hooks/runtime/dependency-check/resolvers/yarn-berry.js.map +1 -0
  215. package/dist/hooks/runtime/dependency-check/sandbox.js +328 -0
  216. package/dist/hooks/runtime/dependency-check/sandbox.js.map +1 -0
  217. package/dist/hooks/runtime/dependency-check/specs.js +171 -0
  218. package/dist/hooks/runtime/dependency-check/specs.js.map +1 -0
  219. package/dist/hooks/runtime/dependency-check/static-view.js +90 -0
  220. package/dist/hooks/runtime/dependency-check/static-view.js.map +1 -0
  221. package/dist/hooks/runtime/dependency-check/stop-net.js +278 -0
  222. package/dist/hooks/runtime/dependency-check/stop-net.js.map +1 -0
  223. package/dist/hooks/runtime/dependency-check/stop-wiring.js +94 -0
  224. package/dist/hooks/runtime/dependency-check/stop-wiring.js.map +1 -0
  225. package/dist/hooks/runtime/dependency-check/tool-call.js +130 -0
  226. package/dist/hooks/runtime/dependency-check/tool-call.js.map +1 -0
  227. package/dist/hooks/runtime/dependency-check/types.js +96 -0
  228. package/dist/hooks/runtime/dependency-check/types.js.map +1 -0
  229. package/dist/hooks/runtime/emit.js +240 -52
  230. package/dist/hooks/runtime/emit.js.map +1 -1
  231. package/dist/hooks/runtime/exit-deadlock-guard.js +24 -8
  232. package/dist/hooks/runtime/exit-deadlock-guard.js.map +1 -1
  233. package/dist/hooks/runtime/fetch-rules.js +78 -29
  234. package/dist/hooks/runtime/fetch-rules.js.map +1 -1
  235. package/dist/hooks/runtime/grep-include.js +228 -0
  236. package/dist/hooks/runtime/grep-include.js.map +1 -0
  237. package/dist/hooks/runtime/pre-compact.js +1 -1
  238. package/dist/hooks/runtime/pre-compact.js.map +1 -1
  239. package/dist/hooks/runtime/pre-invocation.js +3 -3
  240. package/dist/hooks/runtime/pre-invocation.js.map +1 -1
  241. package/dist/hooks/runtime/repo-registry.js +72 -0
  242. package/dist/hooks/runtime/repo-registry.js.map +1 -0
  243. package/dist/hooks/runtime/repo-scope.js +75 -0
  244. package/dist/hooks/runtime/repo-scope.js.map +1 -0
  245. package/dist/hooks/runtime/resolve.js +11 -2
  246. package/dist/hooks/runtime/resolve.js.map +1 -1
  247. package/dist/hooks/runtime/runner-args.js +17 -2
  248. package/dist/hooks/runtime/runner-args.js.map +1 -1
  249. package/dist/hooks/runtime/script-resolve.js +21 -5
  250. package/dist/hooks/runtime/script-resolve.js.map +1 -1
  251. package/dist/hooks/runtime/session-activation.js +71 -18
  252. package/dist/hooks/runtime/session-activation.js.map +1 -1
  253. package/dist/hooks/runtime/session-review.js +184 -88
  254. package/dist/hooks/runtime/session-review.js.map +1 -1
  255. package/dist/hooks/runtime/session-start.js +68 -13
  256. package/dist/hooks/runtime/session-start.js.map +1 -1
  257. package/dist/hooks/runtime/session-writes.js +11 -5
  258. package/dist/hooks/runtime/session-writes.js.map +1 -1
  259. package/dist/hooks/runtime/shell-writes.js +7 -88
  260. package/dist/hooks/runtime/shell-writes.js.map +1 -1
  261. package/dist/hooks/runtime/sniff.js +227 -2
  262. package/dist/hooks/runtime/sniff.js.map +1 -1
  263. package/dist/hooks/runtime/target-resolve.js +32 -17
  264. package/dist/hooks/runtime/target-resolve.js.map +1 -1
  265. package/dist/hooks/runtime/unmapped-tools.js +77 -1
  266. package/dist/hooks/runtime/unmapped-tools.js.map +1 -1
  267. package/dist/hooks/runtime/user-prompt-submit.js +1 -1
  268. package/dist/hooks/runtime/user-prompt-submit.js.map +1 -1
  269. package/dist/hooks/runtime/work-dir.js +3 -0
  270. package/dist/hooks/runtime/work-dir.js.map +1 -1
  271. package/dist/hooks/shim.js +27 -20
  272. package/dist/hooks/shim.js.map +1 -1
  273. package/dist/index.js +46 -10
  274. package/dist/index.js.map +1 -1
  275. package/dist/install-scope.js +12 -0
  276. package/dist/install-scope.js.map +1 -0
  277. package/dist/install.js +188 -78
  278. package/dist/install.js.map +1 -1
  279. package/dist/link.js +55 -5
  280. package/dist/link.js.map +1 -1
  281. package/dist/mcp/config/hook.js +25 -0
  282. package/dist/mcp/config/hook.js.map +1 -1
  283. package/dist/org.js +3 -1
  284. package/dist/org.js.map +1 -1
  285. package/dist/prompts.js +97 -13
  286. package/dist/prompts.js.map +1 -1
  287. package/dist/refresh-hooks.js +67 -15
  288. package/dist/refresh-hooks.js.map +1 -1
  289. package/dist/repo/exclude-block.js +112 -0
  290. package/dist/repo/exclude-block.js.map +1 -0
  291. package/dist/repo/footer.js +93 -0
  292. package/dist/repo/footer.js.map +1 -0
  293. package/dist/repo/git-repo.js +77 -0
  294. package/dist/repo/git-repo.js.map +1 -0
  295. package/dist/repo/guarded-write.js +45 -0
  296. package/dist/repo/guarded-write.js.map +1 -0
  297. package/dist/repo/install-repo.js +508 -0
  298. package/dist/repo/install-repo.js.map +1 -0
  299. package/dist/repo/machine-wiring.js +122 -0
  300. package/dist/repo/machine-wiring.js.map +1 -0
  301. package/dist/repo/mcp-json.js +57 -0
  302. package/dist/repo/mcp-json.js.map +1 -0
  303. package/dist/repo/registry.js +53 -0
  304. package/dist/repo/registry.js.map +1 -0
  305. package/dist/repo/repo-mode-guard.js +83 -0
  306. package/dist/repo/repo-mode-guard.js.map +1 -0
  307. package/dist/repo/repo-setups.js +123 -0
  308. package/dist/repo/repo-setups.js.map +1 -0
  309. package/dist/repo/repo-status.js +283 -0
  310. package/dist/repo/repo-status.js.map +1 -0
  311. package/dist/repo/uninstall-repo.js +56 -0
  312. package/dist/repo/uninstall-repo.js.map +1 -0
  313. package/dist/repo/unsupported.js +14 -0
  314. package/dist/repo/unsupported.js.map +1 -0
  315. package/dist/scan-diff.js +526 -0
  316. package/dist/scan-diff.js.map +1 -0
  317. package/dist/shim.js +9 -7
  318. package/dist/status.js +53 -11
  319. package/dist/status.js.map +1 -1
  320. package/dist/uninstall.js +51 -3
  321. package/dist/uninstall.js.map +1 -1
  322. package/dist/update-check-gate.js +17 -0
  323. package/dist/update-check-gate.js.map +1 -0
  324. package/dist/update.js +6 -1
  325. package/dist/update.js.map +1 -1
  326. package/dist/zip.js +95 -0
  327. package/dist/zip.js.map +1 -0
  328. package/package.json +6 -3
@@ -0,0 +1,283 @@
1
+ // Read-only view of the repository setups for `status`, and the repairs
2
+ // `doctor` derives from it. Nothing here edits a file unless a repair runs.
3
+ import { existsSync } from 'node:fs';
4
+ import kleur from 'kleur';
5
+ import { ALL_ADAPTERS } from '../clients/registry.js';
6
+ import { findRepo, loadRepoRegistry, repoRegistryPath, } from '../hooks/runtime/repo-registry.js';
7
+ import { readExcludeBlock, writeExcludeBlock } from './exclude-block.js';
8
+ import { repoModeOffList } from './footer.js';
9
+ import { listWorktreeRoots } from './git-repo.js';
10
+ import { isMachineWired, removeMachineWiring as removeMachineWiringImpl, SYNC_HOOK_LABEL, } from './machine-wiring.js';
11
+ import { pruneRegistry, saveRepoRegistry, upsertWorkingTree } from './registry.js';
12
+ import { defaultRepoIsTracked, registeredTree } from './repo-setups.js';
13
+ import { trustedMcpNames } from '../uninstall.js';
14
+ function treeStatus(repo, root, region, adapters, isTracked, exists) {
15
+ const entry = repo.workingTrees.find((t) => t.root === root);
16
+ // Nothing is claimed about a folder that is gone: it is never recreated.
17
+ if (!exists(root))
18
+ return { root, wired: entry !== undefined, gone: true, pieces: [] };
19
+ if (!entry)
20
+ return { root, wired: false, gone: false, pieces: [] };
21
+ const tree = registeredTree(repo, root);
22
+ const pieces = [];
23
+ for (const client of repo.clients) {
24
+ const adapter = adapters.find((a) => a.id === client);
25
+ if (!adapter?.repo)
26
+ continue;
27
+ let seen = null;
28
+ if (tree !== null) {
29
+ try {
30
+ seen = adapter.repo.inspect(tree, region);
31
+ }
32
+ catch {
33
+ seen = null;
34
+ }
35
+ }
36
+ for (const piece of ['hooks', 'mcp']) {
37
+ const off = entry.off.find((o) => o.client === client && o.piece === piece);
38
+ if (off) {
39
+ pieces.push({ client, piece, state: 'off', reason: off.reason });
40
+ continue;
41
+ }
42
+ // A folder that moved to another repository, or an unreadable file,
43
+ // cannot be inspected: nothing is claimed about it.
44
+ if (seen === null)
45
+ continue;
46
+ const present = piece === 'hooks' ? seen.hooksWired : seen.mcpRegistered;
47
+ pieces.push({ client, piece, state: present ? 'on' : 'missing' });
48
+ }
49
+ }
50
+ if (tree !== null) {
51
+ for (const file of entry.files) {
52
+ if (file.root === root && isTracked(root, file.rel)) {
53
+ pieces.push({
54
+ client: repo.clients[0],
55
+ piece: 'hooks',
56
+ state: 'tracked-now',
57
+ reason: `${file.rel} is now tracked by git: run "git rm --cached ${file.rel}"`,
58
+ rel: file.rel,
59
+ });
60
+ }
61
+ }
62
+ }
63
+ return { root, wired: true, gone: false, pieces };
64
+ }
65
+ export function collectRepoStatus(reg, region, deps = {}) {
66
+ const adapters = deps.adapters ?? ALL_ADAPTERS;
67
+ const isTracked = deps.isTracked ?? defaultRepoIsTracked;
68
+ const exists = deps.exists ?? existsSync;
69
+ return reg.repos.map((repo) => {
70
+ const base = {
71
+ gitCommonDir: repo.gitCommonDir,
72
+ clients: repo.clients,
73
+ excluded: repo.excluded,
74
+ };
75
+ if (!exists(repo.gitCommonDir)) {
76
+ return { ...base, trees: [], missing: true, excludeMissing: false };
77
+ }
78
+ let roots = [];
79
+ for (const { root } of repo.workingTrees) {
80
+ const tree = registeredTree(repo, root);
81
+ if (tree !== null) {
82
+ roots = listWorktreeRoots(tree);
83
+ break;
84
+ }
85
+ }
86
+ for (const { root } of repo.workingTrees)
87
+ if (!roots.includes(root))
88
+ roots.push(root);
89
+ const block = readExcludeBlock(repo.gitCommonDir);
90
+ return {
91
+ ...base,
92
+ trees: roots.map((root) => treeStatus(repo, root, region, adapters, isTracked, exists)),
93
+ missing: false,
94
+ excludeMissing: repo.excluded.some((p) => !block.includes(p)),
95
+ };
96
+ });
97
+ }
98
+ export function renderRepoStatus(statuses) {
99
+ const lines = [];
100
+ if (statuses.length === 0)
101
+ lines.push(' no repository set up: run `vibedefend install --repo`.');
102
+ for (const repo of statuses) {
103
+ lines.push(` Repository ${repo.gitCommonDir}`);
104
+ if (repo.missing) {
105
+ lines.push(' the git directory is gone: run `vibedefend uninstall --repo` there, or restore it.');
106
+ continue;
107
+ }
108
+ for (const tree of repo.trees) {
109
+ if (tree.gone) {
110
+ lines.push(tree.wired
111
+ ? ` ${tree.root} no longer exists: run \`vibedefend doctor\` to forget it`
112
+ : ` ${tree.root} no longer exists`);
113
+ continue;
114
+ }
115
+ if (!tree.wired) {
116
+ lines.push(` ${tree.root}: not wired: run vibedefend install --repo there`);
117
+ continue;
118
+ }
119
+ lines.push(` ${tree.root}: wired`);
120
+ for (const p of tree.pieces) {
121
+ if (p.state === 'tracked-now')
122
+ lines.push(` ${p.rel}: tracked-now`);
123
+ else {
124
+ lines.push(` ${p.client} ${p.piece}: ${p.state}${p.reason ? ` (${p.reason})` : ''}`);
125
+ }
126
+ }
127
+ }
128
+ if (repo.excludeMissing)
129
+ lines.push(' the exclude block is missing: run `vibedefend doctor`.');
130
+ }
131
+ return lines.join('\n');
132
+ }
133
+ /** Machine-wide wiring found, as one sentence naming what it is. */
134
+ function describeMachineWiring(w) {
135
+ const parts = w.agents.map((a) => a.label);
136
+ if (w.proxyServers > 0)
137
+ parts.push(`MCP proxy (${w.proxyServers} server${w.proxyServers === 1 ? '' : 's'})`);
138
+ if (w.syncHook)
139
+ parts.push(SYNC_HOOK_LABEL);
140
+ return parts.join(', ');
141
+ }
142
+ /** The `Not available in repo mode:` section of `status`, with a warning on machine-wide wiring. */
143
+ export function renderRepoModeSection(machine) {
144
+ const lines = [kleur.bold(' Not available in repo mode:')];
145
+ for (const item of repoModeOffList())
146
+ lines.push(` ${item.label}: ${item.reason}`);
147
+ if (machine && isMachineWired(machine)) {
148
+ lines.push(kleur.yellow(` Machine-wide setup found: ${describeMachineWiring(machine)}. Run \`vibedefend doctor\` to remove it.`));
149
+ }
150
+ return lines.join('\n');
151
+ }
152
+ /**
153
+ * Forget the working trees whose folder is gone, then rewrite the exclude
154
+ * block of `gitCommonDir` from what is left. Nothing is recreated.
155
+ */
156
+ function forgetGoneTrees(gitCommonDir, deps) {
157
+ const registryPath = deps.registryPath ?? repoRegistryPath();
158
+ const { registry } = pruneRegistry(loadRepoRegistry(registryPath), deps.exists ?? existsSync);
159
+ saveRepoRegistry(registry, registryPath);
160
+ const entry = findRepo(registry, gitCommonDir);
161
+ if (entry)
162
+ writeExcludeBlock(gitCommonDir, entry.excluded);
163
+ }
164
+ /** Wire one piece; an adapter that throws comes back `off`, with the error, like the installer. */
165
+ function wireOnePiece(adapter, piece, ctx) {
166
+ try {
167
+ return piece === 'hooks' ? adapter.repo.wireHooks(ctx) : adapter.repo.wireMcp(ctx);
168
+ }
169
+ catch (e) {
170
+ return {
171
+ client: adapter.id,
172
+ piece,
173
+ state: 'off',
174
+ files: [],
175
+ reason: e instanceof Error ? e.message : String(e),
176
+ };
177
+ }
178
+ }
179
+ /** Re-wire one missing piece, record its files and state like the installer, and fail when it stays off. */
180
+ function repairPiece(gitCommonDir, root, client, piece, deps) {
181
+ const registryPath = deps.registryPath ?? repoRegistryPath();
182
+ const registry = loadRepoRegistry(registryPath);
183
+ const entry = findRepo(registry, gitCommonDir);
184
+ const recorded = entry?.workingTrees.find((t) => t.root === root);
185
+ const tree = entry ? registeredTree(entry, root) : null;
186
+ if (!entry || !recorded || tree === null) {
187
+ throw new Error(`${root} no longer belongs to this repository`);
188
+ }
189
+ const adapter = (deps.adapters ?? ALL_ADAPTERS).find((a) => a.id === client);
190
+ if (!adapter?.repo)
191
+ throw new Error(`${client} has no repository setup`);
192
+ const result = wireOnePiece(adapter, piece, {
193
+ tree,
194
+ region: deps.region,
195
+ hooks: deps.hooks,
196
+ isTracked: deps.isTracked,
197
+ run: deps.run,
198
+ });
199
+ const files = [...recorded.files];
200
+ for (const f of result.files) {
201
+ if (!files.some((g) => g.root === f.root && g.rel === f.rel))
202
+ files.push(f);
203
+ }
204
+ const off = recorded.off.filter((o) => !(o.client === client && o.piece === piece));
205
+ if (result.state === 'off')
206
+ off.push({ client, piece, reason: result.reason ?? '' });
207
+ const next = upsertWorkingTree(registry, {
208
+ gitCommonDir: entry.gitCommonDir,
209
+ projectId: entry.projectId,
210
+ installedAt: entry.installedAt,
211
+ clients: entry.clients,
212
+ }, { root, files, off });
213
+ saveRepoRegistry(next, registryPath);
214
+ writeExcludeBlock(gitCommonDir, findRepo(next, gitCommonDir)?.excluded ?? ['/.cybedefend/']);
215
+ if (result.state === 'off') {
216
+ throw new Error(result.reason || `${client} ${piece} could not be wired in ${root}`);
217
+ }
218
+ }
219
+ export function deriveRepoRepairs(statuses, deps) {
220
+ const repairs = [];
221
+ const machine = deps.machineWiring;
222
+ if (machine && isMachineWired(machine)) {
223
+ repairs.push({
224
+ id: 'repo-machine-wiring',
225
+ description: `Remove the machine-wide setup (repo mode is on): ${describeMachineWiring(machine)}`,
226
+ fix: async () => {
227
+ const result = await (deps.removeMachineWiring ?? removeMachineWiringImpl)(machine, {
228
+ mcpNames: trustedMcpNames(),
229
+ });
230
+ if (result.errors.length > 0) {
231
+ throw new Error(result.errors.map((e) => `${e.label}: ${e.error}`).join('; '));
232
+ }
233
+ if (!result.proxyComplete)
234
+ throw new Error('Some MCP servers could not be restored from the proxy');
235
+ },
236
+ });
237
+ }
238
+ for (const repo of statuses) {
239
+ if (repo.missing) {
240
+ repairs.push({
241
+ id: `repo-gone:${repo.gitCommonDir}`,
242
+ description: `${repo.gitCommonDir} is gone: it is not recreated. Run "vibedefend uninstall --repo" there to forget it.`,
243
+ });
244
+ continue;
245
+ }
246
+ for (const tree of repo.trees) {
247
+ if (tree.gone && tree.wired) {
248
+ repairs.push({
249
+ id: `repo-tree-gone:${repo.gitCommonDir}:${tree.root}`,
250
+ description: `${tree.root} no longer exists: forget it.`,
251
+ fix: () => forgetGoneTrees(repo.gitCommonDir, deps),
252
+ });
253
+ continue;
254
+ }
255
+ if (!tree.wired)
256
+ continue;
257
+ for (const p of tree.pieces) {
258
+ if (p.state === 'missing') {
259
+ repairs.push({
260
+ id: `repo-wire:${repo.gitCommonDir}:${tree.root}:${p.client}:${p.piece}`,
261
+ description: `${p.client} ${p.piece} is no longer wired in ${tree.root}: re-wire it.`,
262
+ fix: () => repairPiece(repo.gitCommonDir, tree.root, p.client, p.piece, deps),
263
+ });
264
+ }
265
+ else if (p.state === 'tracked-now') {
266
+ repairs.push({
267
+ id: `repo-tracked:${tree.root}:${p.rel}`,
268
+ description: p.reason ?? '',
269
+ });
270
+ }
271
+ }
272
+ }
273
+ if (repo.excludeMissing) {
274
+ repairs.push({
275
+ id: `repo-exclude:${repo.gitCommonDir}`,
276
+ description: `The exclude block of ${repo.gitCommonDir} is missing: rewrite it.`,
277
+ fix: () => writeExcludeBlock(repo.gitCommonDir, repo.excluded),
278
+ });
279
+ }
280
+ }
281
+ return repairs;
282
+ }
283
+ //# sourceMappingURL=repo-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo-status.js","sourceRoot":"","sources":["../../src/repo/repo-status.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,4EAA4E;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,GAGjB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,cAAc,EACd,mBAAmB,IAAI,uBAAuB,EAC9C,eAAe,GA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CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,EAAE;wBACxE,WAAW,EAAE,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,0BAA0B,IAAI,CAAC,IAAI,eAAe;wBACrF,GAAG,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC;qBAC9E,CAAC,CAAC;gBACL,CAAC;qBAAM,IAAI,CAAC,CAAC,KAAK,KAAK,aAAa,EAAE,CAAC;oBACrC,OAAO,CAAC,IAAI,CAAC;wBACX,EAAE,EAAE,gBAAgB,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE;wBACxC,WAAW,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE;qBAC5B,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QACD,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,OAAO,CAAC,IAAI,CAAC;gBACX,EAAE,EAAE,gBAAgB,IAAI,CAAC,YAAY,EAAE;gBACvC,WAAW,EAAE,wBAAwB,IAAI,CAAC,YAAY,0BAA0B;gBAChF,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC;aAC/D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * `vibedefend uninstall --repo`: take VibeDefend out of one repository (every
3
+ * registered working tree) and nothing else. The sign-in, `runtime-config.json`
4
+ * and the other repositories stay.
5
+ */
6
+ import { confirm as confirmImpl } from '@inquirer/prompts';
7
+ import { findRepo, loadRepoRegistry, repoRegistryPath, } from '../hooks/runtime/repo-registry.js';
8
+ import { log } from '../utils.js';
9
+ import { removeExcludeBlock } from './exclude-block.js';
10
+ import { resolveWorkingTree } from './git-repo.js';
11
+ import { removeRepo, saveRepoRegistry } from './registry.js';
12
+ import { removeRepoSetup } from './repo-setups.js';
13
+ export async function runRepoUninstall(opts = {}, deps = {}) {
14
+ const confirm = deps.confirm ?? confirmImpl;
15
+ const registryPath = deps.registryPath ?? repoRegistryPath();
16
+ let gitCommonDir = null;
17
+ try {
18
+ gitCommonDir = resolveWorkingTree(opts.path ?? process.cwd()).gitCommonDir;
19
+ }
20
+ catch {
21
+ // Not a git folder: not set up either.
22
+ }
23
+ const registry = loadRepoRegistry(registryPath);
24
+ const repo = gitCommonDir === null ? null : findRepo(registry, gitCommonDir);
25
+ if (repo === null) {
26
+ log.info('This repository is not set up in repo mode.');
27
+ return { cancelled: false, removed: [] };
28
+ }
29
+ log.step('Uninstall VibeDefend from this repository');
30
+ for (const { root } of repo.workingTrees)
31
+ log.hint(root);
32
+ if (!opts.yes) {
33
+ const ok = await confirm({
34
+ message: `Remove VibeDefend from this repository (${repo.workingTrees.length} working tree(s))?`,
35
+ default: false,
36
+ });
37
+ if (!ok) {
38
+ log.info('Nothing removed.');
39
+ return { cancelled: true, removed: [] };
40
+ }
41
+ }
42
+ const removal = removeRepoSetup(repo, { run: deps.run });
43
+ for (const root of removal.skipped)
44
+ log.warn(`${root} no longer exists: skipped`);
45
+ // removeRepoSetup took the exclude block out; the entry goes with it.
46
+ try {
47
+ removeExcludeBlock(repo.gitCommonDir);
48
+ }
49
+ catch {
50
+ // Already gone.
51
+ }
52
+ saveRepoRegistry(removeRepo(registry, repo.gitCommonDir), registryPath);
53
+ log.ok(`VibeDefend removed from ${removal.trees.length} working tree(s).`);
54
+ return { cancelled: false, removed: removal.removed };
55
+ }
56
+ //# sourceMappingURL=uninstall-repo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uninstall-repo.js","sourceRoot":"","sources":["../../src/repo/uninstall-repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO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,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,YAAY;QAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QACd,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC;YACvB,OAAO,EAAE,2CAA2C,IAAI,CAAC,YAAY,CAAC,MAAM,oBAAoB;YAChG,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;QACH,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAC7B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACzD,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,OAAO;QAAE,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,4BAA4B,CAAC,CAAC;IAClF,sEAAsE;IACtE,IAAI,CAAC;QACH,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,gBAAgB;IAClB,CAAC;IACD,gBAAgB,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC;IACxE,GAAG,CAAC,EAAE,CAAC,2BAA2B,OAAO,CAAC,KAAK,CAAC,MAAM,mBAAmB,CAAC,CAAC;IAC3E,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;AACxD,CAAC"}
@@ -0,0 +1,14 @@
1
+ /** Why repo mode is off for a client, shown in the install summary. */
2
+ export const REPO_MODE_OFF_REASONS = {
3
+ antigravity: 'repo-level config is ignored by Antigravity today',
4
+ windsurf: 'Windsurf is now Devin Desktop; repo-level setup is not supported yet',
5
+ };
6
+ export const MCP_PROXY_OFF_REASON = 'machine-wide only: your other MCP servers are not checked in this mode';
7
+ /** Claude Desktop has no notion of a folder: VibeDefend reaches it only through the proxy. */
8
+ export const CLAUDE_DESKTOP_OFF_REASON = 'only reachable through the MCP proxy, which is off in this mode';
9
+ /** Clients documented to also read `.claude/settings*.json`, so they run the Claude Code hooks too. */
10
+ export const CLAUDE_HOOKS_SHARED_WITH = ['cursor', 'vscode'];
11
+ export function trackedReason(rel) {
12
+ return `${rel} is tracked by git: VibeDefend does not edit a file your team shares`;
13
+ }
14
+ //# sourceMappingURL=unsupported.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsupported.js","sourceRoot":"","sources":["../../src/repo/unsupported.ts"],"names":[],"mappings":"AAEA,uEAAuE;AACvE,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACtE,WAAW,EAAE,mDAAmD;IAChE,QAAQ,EAAE,sEAAsE;CACjF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAC/B,wEAAwE,CAAC;AAE3E,8FAA8F;AAC9F,MAAM,CAAC,MAAM,yBAAyB,GAAG,iEAAiE,CAAC;AAE3G,uGAAuG;AACvG,MAAM,CAAC,MAAM,wBAAwB,GAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAEzE,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,GAAG,GAAG,sEAAsE,CAAC;AACtF,CAAC"}