@vibe-agent-toolkit/cli 0.2.0-rc.6 → 0.2.0-rc.8

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 (422) hide show
  1. package/README.md +4 -5
  2. package/dist/bin/vat +34 -19
  3. package/dist/bin/vat.js +34 -19
  4. package/dist/bin/vat.js.map +1 -1
  5. package/dist/bin.js +44 -158
  6. package/dist/bin.js.map +1 -1
  7. package/dist/command-loaders.d.ts +2 -2
  8. package/dist/command-loaders.d.ts.map +1 -1
  9. package/dist/command-loaders.js +4 -2
  10. package/dist/command-loaders.js.map +1 -1
  11. package/dist/commands/agent/build.d.ts.map +1 -1
  12. package/dist/commands/agent/build.js +2 -1
  13. package/dist/commands/agent/build.js.map +1 -1
  14. package/dist/commands/agent/import.d.ts.map +1 -1
  15. package/dist/commands/agent/import.js +3 -2
  16. package/dist/commands/agent/import.js.map +1 -1
  17. package/dist/commands/agent/install-path.d.ts +36 -0
  18. package/dist/commands/agent/install-path.d.ts.map +1 -0
  19. package/dist/commands/agent/install-path.js +44 -0
  20. package/dist/commands/agent/install-path.js.map +1 -0
  21. package/dist/commands/agent/install.d.ts.map +1 -1
  22. package/dist/commands/agent/install.js +22 -10
  23. package/dist/commands/agent/install.js.map +1 -1
  24. package/dist/commands/agent/installed.d.ts.map +1 -1
  25. package/dist/commands/agent/installed.js +22 -12
  26. package/dist/commands/agent/installed.js.map +1 -1
  27. package/dist/commands/agent/list.d.ts.map +1 -1
  28. package/dist/commands/agent/list.js +2 -1
  29. package/dist/commands/agent/list.js.map +1 -1
  30. package/dist/commands/agent/run.d.ts.map +1 -1
  31. package/dist/commands/agent/run.js +2 -1
  32. package/dist/commands/agent/run.js.map +1 -1
  33. package/dist/commands/agent/uninstall.d.ts.map +1 -1
  34. package/dist/commands/agent/uninstall.js +13 -6
  35. package/dist/commands/agent/uninstall.js.map +1 -1
  36. package/dist/commands/agent/validate.d.ts.map +1 -1
  37. package/dist/commands/agent/validate.js +3 -2
  38. package/dist/commands/agent/validate.js.map +1 -1
  39. package/dist/commands/ard/emit.d.ts +153 -0
  40. package/dist/commands/ard/emit.d.ts.map +1 -0
  41. package/dist/commands/ard/emit.js +276 -0
  42. package/dist/commands/ard/emit.js.map +1 -0
  43. package/dist/commands/ard/index.d.ts +12 -0
  44. package/dist/commands/ard/index.d.ts.map +1 -0
  45. package/dist/commands/ard/index.js +80 -0
  46. package/dist/commands/ard/index.js.map +1 -0
  47. package/dist/commands/ard/surfaces.d.ts +56 -0
  48. package/dist/commands/ard/surfaces.d.ts.map +1 -0
  49. package/dist/commands/ard/surfaces.js +150 -0
  50. package/dist/commands/ard/surfaces.js.map +1 -0
  51. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  52. package/dist/commands/audit/distributed-tree.js +9 -6
  53. package/dist/commands/audit/distributed-tree.js.map +1 -1
  54. package/dist/commands/audit/scan-population.d.ts +158 -0
  55. package/dist/commands/audit/scan-population.d.ts.map +1 -0
  56. package/dist/commands/audit/scan-population.js +292 -0
  57. package/dist/commands/audit/scan-population.js.map +1 -0
  58. package/dist/commands/audit-settings.d.ts.map +1 -1
  59. package/dist/commands/audit-settings.js +6 -5
  60. package/dist/commands/audit-settings.js.map +1 -1
  61. package/dist/commands/audit.d.ts +78 -9
  62. package/dist/commands/audit.d.ts.map +1 -1
  63. package/dist/commands/audit.js +853 -473
  64. package/dist/commands/audit.js.map +1 -1
  65. package/dist/commands/build.d.ts.map +1 -1
  66. package/dist/commands/build.js +24 -24
  67. package/dist/commands/build.js.map +1 -1
  68. package/dist/commands/cache/clear.d.ts.map +1 -1
  69. package/dist/commands/cache/clear.js +17 -10
  70. package/dist/commands/cache/clear.js.map +1 -1
  71. package/dist/commands/claude/budget.d.ts +136 -24
  72. package/dist/commands/claude/budget.d.ts.map +1 -1
  73. package/dist/commands/claude/budget.js +152 -57
  74. package/dist/commands/claude/budget.js.map +1 -1
  75. package/dist/commands/claude/context.d.ts.map +1 -1
  76. package/dist/commands/claude/context.js +4 -3
  77. package/dist/commands/claude/context.js.map +1 -1
  78. package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
  79. package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
  80. package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
  81. package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
  82. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  83. package/dist/commands/claude/marketplace/git-publish.js +3 -2
  84. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  85. package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
  86. package/dist/commands/claude/marketplace/license-utils.js +0 -1
  87. package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
  88. package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
  89. package/dist/commands/claude/marketplace/publish-tree.js +0 -6
  90. package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
  91. package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
  92. package/dist/commands/claude/marketplace/publish.js +2 -1
  93. package/dist/commands/claude/marketplace/publish.js.map +1 -1
  94. package/dist/commands/claude/marketplace/validate.d.ts +55 -22
  95. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  96. package/dist/commands/claude/marketplace/validate.js +392 -77
  97. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  98. package/dist/commands/claude/org/api-keys.d.ts +0 -3
  99. package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
  100. package/dist/commands/claude/org/api-keys.js +2 -1
  101. package/dist/commands/claude/org/api-keys.js.map +1 -1
  102. package/dist/commands/claude/org/helpers.d.ts +17 -22
  103. package/dist/commands/claude/org/helpers.d.ts.map +1 -1
  104. package/dist/commands/claude/org/helpers.js +6 -22
  105. package/dist/commands/claude/org/helpers.js.map +1 -1
  106. package/dist/commands/claude/org/invites.d.ts +0 -3
  107. package/dist/commands/claude/org/invites.d.ts.map +1 -1
  108. package/dist/commands/claude/org/invites.js +3 -2
  109. package/dist/commands/claude/org/invites.js.map +1 -1
  110. package/dist/commands/claude/org/skills.d.ts +103 -4
  111. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  112. package/dist/commands/claude/org/skills.js +331 -123
  113. package/dist/commands/claude/org/skills.js.map +1 -1
  114. package/dist/commands/claude/org/users.d.ts +0 -3
  115. package/dist/commands/claude/org/users.d.ts.map +1 -1
  116. package/dist/commands/claude/org/users.js +3 -2
  117. package/dist/commands/claude/org/users.js.map +1 -1
  118. package/dist/commands/claude/org/workspaces.d.ts +0 -3
  119. package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
  120. package/dist/commands/claude/org/workspaces.js +6 -5
  121. package/dist/commands/claude/org/workspaces.js.map +1 -1
  122. package/dist/commands/claude/plugin/build.d.ts +8 -0
  123. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  124. package/dist/commands/claude/plugin/build.js +28 -33
  125. package/dist/commands/claude/plugin/build.js.map +1 -1
  126. package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
  127. package/dist/commands/claude/plugin/helpers.js +0 -6
  128. package/dist/commands/claude/plugin/helpers.js.map +1 -1
  129. package/dist/commands/claude/plugin/install.d.ts +12 -0
  130. package/dist/commands/claude/plugin/install.d.ts.map +1 -1
  131. package/dist/commands/claude/plugin/install.js +71 -60
  132. package/dist/commands/claude/plugin/install.js.map +1 -1
  133. package/dist/commands/claude/plugin/list.d.ts.map +1 -1
  134. package/dist/commands/claude/plugin/list.js +3 -2
  135. package/dist/commands/claude/plugin/list.js.map +1 -1
  136. package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
  137. package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
  138. package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
  139. package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
  140. package/dist/commands/claude/plugin/plugin-files.js +0 -3
  141. package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
  142. package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
  143. package/dist/commands/claude/plugin/plugin-validators.js +3 -6
  144. package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
  145. package/dist/commands/claude/plugin/tree-copy.d.ts +73 -0
  146. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  147. package/dist/commands/claude/plugin/tree-copy.js +221 -15
  148. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  149. package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
  150. package/dist/commands/claude/plugin/uninstall.js +4 -4
  151. package/dist/commands/claude/plugin/uninstall.js.map +1 -1
  152. package/dist/commands/consistency-check.d.ts +9 -13
  153. package/dist/commands/consistency-check.d.ts.map +1 -1
  154. package/dist/commands/consistency-check.js +91 -81
  155. package/dist/commands/consistency-check.js.map +1 -1
  156. package/dist/commands/corpus/index.d.ts.map +1 -1
  157. package/dist/commands/corpus/index.js +3 -0
  158. package/dist/commands/corpus/index.js.map +1 -1
  159. package/dist/commands/corpus/report.d.ts +0 -1
  160. package/dist/commands/corpus/report.d.ts.map +1 -1
  161. package/dist/commands/corpus/report.js +1 -3
  162. package/dist/commands/corpus/report.js.map +1 -1
  163. package/dist/commands/corpus/runner.d.ts +58 -1
  164. package/dist/commands/corpus/runner.d.ts.map +1 -1
  165. package/dist/commands/corpus/runner.js +92 -21
  166. package/dist/commands/corpus/runner.js.map +1 -1
  167. package/dist/commands/corpus/scan.d.ts.map +1 -1
  168. package/dist/commands/corpus/scan.js +2 -4
  169. package/dist/commands/corpus/scan.js.map +1 -1
  170. package/dist/commands/corpus/seed.d.ts +4 -4
  171. package/dist/commands/corpus/seed.d.ts.map +1 -1
  172. package/dist/commands/corpus/seed.js +1 -3
  173. package/dist/commands/corpus/seed.js.map +1 -1
  174. package/dist/commands/doctor.d.ts +14 -0
  175. package/dist/commands/doctor.d.ts.map +1 -1
  176. package/dist/commands/doctor.js +147 -51
  177. package/dist/commands/doctor.js.map +1 -1
  178. package/dist/commands/inventory.d.ts.map +1 -1
  179. package/dist/commands/inventory.js +6 -7
  180. package/dist/commands/inventory.js.map +1 -1
  181. package/dist/commands/mcp/list-collections.d.ts.map +1 -1
  182. package/dist/commands/mcp/list-collections.js +2 -1
  183. package/dist/commands/mcp/list-collections.js.map +1 -1
  184. package/dist/commands/mcp/serve.d.ts.map +1 -1
  185. package/dist/commands/mcp/serve.js +3 -2
  186. package/dist/commands/mcp/serve.js.map +1 -1
  187. package/dist/commands/okf/index.d.ts +11 -0
  188. package/dist/commands/okf/index.d.ts.map +1 -0
  189. package/dist/commands/okf/index.js +114 -0
  190. package/dist/commands/okf/index.js.map +1 -0
  191. package/dist/commands/okf/validate.d.ts +191 -0
  192. package/dist/commands/okf/validate.d.ts.map +1 -0
  193. package/dist/commands/okf/validate.js +190 -0
  194. package/dist/commands/okf/validate.js.map +1 -0
  195. package/dist/commands/phase-utils.d.ts +30 -13
  196. package/dist/commands/phase-utils.d.ts.map +1 -1
  197. package/dist/commands/phase-utils.js +56 -19
  198. package/dist/commands/phase-utils.js.map +1 -1
  199. package/dist/commands/positional-args.d.ts.map +1 -1
  200. package/dist/commands/positional-args.js +2 -1
  201. package/dist/commands/positional-args.js.map +1 -1
  202. package/dist/commands/rag/clear-command.d.ts.map +1 -1
  203. package/dist/commands/rag/clear-command.js +2 -1
  204. package/dist/commands/rag/clear-command.js.map +1 -1
  205. package/dist/commands/rag/index-command.d.ts +27 -2
  206. package/dist/commands/rag/index-command.d.ts.map +1 -1
  207. package/dist/commands/rag/index-command.js +48 -8
  208. package/dist/commands/rag/index-command.js.map +1 -1
  209. package/dist/commands/rag/index.d.ts.map +1 -1
  210. package/dist/commands/rag/index.js +2 -0
  211. package/dist/commands/rag/index.js.map +1 -1
  212. package/dist/commands/rag/query-command.d.ts.map +1 -1
  213. package/dist/commands/rag/query-command.js +2 -1
  214. package/dist/commands/rag/query-command.js.map +1 -1
  215. package/dist/commands/rag/stats-command.d.ts.map +1 -1
  216. package/dist/commands/rag/stats-command.js +2 -1
  217. package/dist/commands/rag/stats-command.js.map +1 -1
  218. package/dist/commands/resources/check-progress.d.ts +3 -0
  219. package/dist/commands/resources/check-progress.d.ts.map +1 -1
  220. package/dist/commands/resources/check-progress.js +11 -2
  221. package/dist/commands/resources/check-progress.js.map +1 -1
  222. package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
  223. package/dist/commands/resources/check-supervisor.js +14 -7
  224. package/dist/commands/resources/check-supervisor.js.map +1 -1
  225. package/dist/commands/resources/check.d.ts +168 -8
  226. package/dist/commands/resources/check.d.ts.map +1 -1
  227. package/dist/commands/resources/check.js +222 -118
  228. package/dist/commands/resources/check.js.map +1 -1
  229. package/dist/commands/resources/index.d.ts.map +1 -1
  230. package/dist/commands/resources/index.js +64 -29
  231. package/dist/commands/resources/index.js.map +1 -1
  232. package/dist/commands/resources/query.d.ts +18 -1
  233. package/dist/commands/resources/query.d.ts.map +1 -1
  234. package/dist/commands/resources/query.js +33 -12
  235. package/dist/commands/resources/query.js.map +1 -1
  236. package/dist/commands/resources/scan.d.ts.map +1 -1
  237. package/dist/commands/resources/scan.js +4 -8
  238. package/dist/commands/resources/scan.js.map +1 -1
  239. package/dist/commands/resources/validate.d.ts +30 -1
  240. package/dist/commands/resources/validate.d.ts.map +1 -1
  241. package/dist/commands/resources/validate.js +116 -14
  242. package/dist/commands/resources/validate.js.map +1 -1
  243. package/dist/commands/skill/review-checklist.d.ts +3 -2
  244. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  245. package/dist/commands/skill/review-checklist.js +4 -2
  246. package/dist/commands/skill/review-checklist.js.map +1 -1
  247. package/dist/commands/skill/review.d.ts +247 -0
  248. package/dist/commands/skill/review.d.ts.map +1 -1
  249. package/dist/commands/skill/review.js +98 -61
  250. package/dist/commands/skill/review.js.map +1 -1
  251. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  252. package/dist/commands/skill/test/configure.js +0 -1
  253. package/dist/commands/skill/test/configure.js.map +1 -1
  254. package/dist/commands/skill/test/run.d.ts +12 -6
  255. package/dist/commands/skill/test/run.d.ts.map +1 -1
  256. package/dist/commands/skill/test/run.js +137 -67
  257. package/dist/commands/skill/test/run.js.map +1 -1
  258. package/dist/commands/skills/build.d.ts +69 -2
  259. package/dist/commands/skills/build.d.ts.map +1 -1
  260. package/dist/commands/skills/build.js +128 -42
  261. package/dist/commands/skills/build.js.map +1 -1
  262. package/dist/commands/skills/install.d.ts +2 -1
  263. package/dist/commands/skills/install.d.ts.map +1 -1
  264. package/dist/commands/skills/install.js +20 -30
  265. package/dist/commands/skills/install.js.map +1 -1
  266. package/dist/commands/skills/list.d.ts +2 -1
  267. package/dist/commands/skills/list.d.ts.map +1 -1
  268. package/dist/commands/skills/list.js +44 -26
  269. package/dist/commands/skills/list.js.map +1 -1
  270. package/dist/commands/skills/package.d.ts +1 -1
  271. package/dist/commands/skills/package.d.ts.map +1 -1
  272. package/dist/commands/skills/package.js +6 -8
  273. package/dist/commands/skills/package.js.map +1 -1
  274. package/dist/commands/skills/scope-guard.d.ts.map +1 -1
  275. package/dist/commands/skills/scope-guard.js +2 -4
  276. package/dist/commands/skills/scope-guard.js.map +1 -1
  277. package/dist/commands/skills/shared.d.ts.map +1 -1
  278. package/dist/commands/skills/shared.js +2 -4
  279. package/dist/commands/skills/shared.js.map +1 -1
  280. package/dist/commands/skills/skill-discovery.d.ts +40 -1
  281. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  282. package/dist/commands/skills/skill-discovery.js +32 -4
  283. package/dist/commands/skills/skill-discovery.js.map +1 -1
  284. package/dist/commands/skills/source-resolvers.d.ts +15 -0
  285. package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
  286. package/dist/commands/skills/source-resolvers.js +25 -4
  287. package/dist/commands/skills/source-resolvers.js.map +1 -1
  288. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  289. package/dist/commands/skills/validate-command.js +11 -3
  290. package/dist/commands/skills/validate-command.js.map +1 -1
  291. package/dist/commands/skills/validate.d.ts +66 -7
  292. package/dist/commands/skills/validate.d.ts.map +1 -1
  293. package/dist/commands/skills/validate.js +133 -29
  294. package/dist/commands/skills/validate.js.map +1 -1
  295. package/dist/commands/validate.d.ts +1 -1
  296. package/dist/commands/validate.js +8 -6
  297. package/dist/commands/validate.js.map +1 -1
  298. package/dist/commands/verify.d.ts +102 -5
  299. package/dist/commands/verify.d.ts.map +1 -1
  300. package/dist/commands/verify.js +246 -69
  301. package/dist/commands/verify.js.map +1 -1
  302. package/dist/index.d.ts +0 -1
  303. package/dist/index.d.ts.map +1 -1
  304. package/dist/index.js +5 -1
  305. package/dist/index.js.map +1 -1
  306. package/dist/report-schemas.d.ts +45 -0
  307. package/dist/report-schemas.d.ts.map +1 -0
  308. package/dist/report-schemas.js +102 -0
  309. package/dist/report-schemas.js.map +1 -0
  310. package/dist/skill-resolution/packaging-config.d.ts +49 -5
  311. package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
  312. package/dist/skill-resolution/packaging-config.js +59 -19
  313. package/dist/skill-resolution/packaging-config.js.map +1 -1
  314. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
  315. package/dist/skill-resolution/resolve-skill-reference.js +8 -6
  316. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
  317. package/dist/utils/agent-discovery.d.ts.map +1 -1
  318. package/dist/utils/agent-discovery.js +22 -11
  319. package/dist/utils/agent-discovery.js.map +1 -1
  320. package/dist/utils/agent-runner.d.ts.map +1 -1
  321. package/dist/utils/agent-runner.js +0 -1
  322. package/dist/utils/agent-runner.js.map +1 -1
  323. package/dist/utils/command-error.d.ts +87 -55
  324. package/dist/utils/command-error.d.ts.map +1 -1
  325. package/dist/utils/command-error.js +113 -64
  326. package/dist/utils/command-error.js.map +1 -1
  327. package/dist/utils/config-loader.d.ts +2 -1
  328. package/dist/utils/config-loader.d.ts.map +1 -1
  329. package/dist/utils/config-loader.js +3 -6
  330. package/dist/utils/config-loader.js.map +1 -1
  331. package/dist/utils/context-budget-issues.d.ts +1 -1
  332. package/dist/utils/context-budget-issues.js +1 -1
  333. package/dist/utils/corpus-target.d.ts +5 -27
  334. package/dist/utils/corpus-target.d.ts.map +1 -1
  335. package/dist/utils/corpus-target.js +7 -33
  336. package/dist/utils/corpus-target.js.map +1 -1
  337. package/dist/utils/edge-lens-evaluation.d.ts +83 -0
  338. package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
  339. package/dist/utils/edge-lens-evaluation.js +110 -0
  340. package/dist/utils/edge-lens-evaluation.js.map +1 -0
  341. package/dist/utils/help-loader.d.ts.map +1 -1
  342. package/dist/utils/help-loader.js +0 -1
  343. package/dist/utils/help-loader.js.map +1 -1
  344. package/dist/utils/issue-rendering.d.ts +2 -2
  345. package/dist/utils/issue-rendering.js +2 -2
  346. package/dist/utils/optional-backend.d.ts +5 -4
  347. package/dist/utils/optional-backend.d.ts.map +1 -1
  348. package/dist/utils/optional-backend.js +7 -5
  349. package/dist/utils/optional-backend.js.map +1 -1
  350. package/dist/utils/output.d.ts +9 -0
  351. package/dist/utils/output.d.ts.map +1 -1
  352. package/dist/utils/output.js +16 -0
  353. package/dist/utils/output.js.map +1 -1
  354. package/dist/utils/package-json.d.ts +24 -0
  355. package/dist/utils/package-json.d.ts.map +1 -0
  356. package/dist/utils/package-json.js +49 -0
  357. package/dist/utils/package-json.js.map +1 -0
  358. package/dist/utils/project-root-policy.d.ts +20 -0
  359. package/dist/utils/project-root-policy.d.ts.map +1 -1
  360. package/dist/utils/project-root-policy.js +30 -0
  361. package/dist/utils/project-root-policy.js.map +1 -1
  362. package/dist/utils/projection-query.d.ts +41 -4
  363. package/dist/utils/projection-query.d.ts.map +1 -1
  364. package/dist/utils/projection-query.js +44 -10
  365. package/dist/utils/projection-query.js.map +1 -1
  366. package/dist/utils/projection-store.d.ts +41 -15
  367. package/dist/utils/projection-store.d.ts.map +1 -1
  368. package/dist/utils/projection-store.js +65 -18
  369. package/dist/utils/projection-store.js.map +1 -1
  370. package/dist/utils/repeatable-option.d.ts +37 -0
  371. package/dist/utils/repeatable-option.d.ts.map +1 -0
  372. package/dist/utils/repeatable-option.js +39 -0
  373. package/dist/utils/repeatable-option.js.map +1 -0
  374. package/dist/utils/resource-loader.d.ts +4 -3
  375. package/dist/utils/resource-loader.d.ts.map +1 -1
  376. package/dist/utils/resource-loader.js +63 -32
  377. package/dist/utils/resource-loader.js.map +1 -1
  378. package/dist/utils/root-argv.d.ts +53 -0
  379. package/dist/utils/root-argv.d.ts.map +1 -0
  380. package/dist/utils/root-argv.js +215 -0
  381. package/dist/utils/root-argv.js.map +1 -0
  382. package/dist/utils/run-integrity.d.ts +95 -0
  383. package/dist/utils/run-integrity.d.ts.map +1 -0
  384. package/dist/utils/run-integrity.js +102 -0
  385. package/dist/utils/run-integrity.js.map +1 -0
  386. package/dist/utils/skill-packaging-config.d.ts +27 -0
  387. package/dist/utils/skill-packaging-config.d.ts.map +1 -1
  388. package/dist/utils/skill-packaging-config.js +30 -0
  389. package/dist/utils/skill-packaging-config.js.map +1 -1
  390. package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
  391. package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
  392. package/dist/utils/sqlite-experimental-warning.js +144 -0
  393. package/dist/utils/sqlite-experimental-warning.js.map +1 -0
  394. package/dist/utils/url-redact.d.ts.map +1 -1
  395. package/dist/utils/url-redact.js +4 -6
  396. package/dist/utils/url-redact.js.map +1 -1
  397. package/dist/utils/user-context-scanner.d.ts +8 -0
  398. package/dist/utils/user-context-scanner.d.ts.map +1 -1
  399. package/dist/utils/user-context-scanner.js +4 -2
  400. package/dist/utils/user-context-scanner.js.map +1 -1
  401. package/dist/utils/validate-help-files.d.ts.map +1 -1
  402. package/dist/utils/validate-help-files.js +12 -6
  403. package/dist/utils/validate-help-files.js.map +1 -1
  404. package/dist/utils/vat-bin-path.d.ts.map +1 -1
  405. package/dist/utils/vat-bin-path.js +0 -1
  406. package/dist/utils/vat-bin-path.js.map +1 -1
  407. package/dist/version.d.ts.map +1 -1
  408. package/dist/version.js +1 -3
  409. package/dist/version.js.map +1 -1
  410. package/docs/audit.md +141 -37
  411. package/docs/doctor.md +7 -6
  412. package/docs/index.md +19 -11
  413. package/docs/rag.md +3 -2
  414. package/docs/resources.md +5 -2
  415. package/docs/skill-test.md +10 -9
  416. package/docs/skills.md +53 -69
  417. package/package.json +24 -29
  418. package/schemas/ard-emit.json +149 -0
  419. package/schemas/claude-budget.json +197 -0
  420. package/schemas/okf-validate.json +170 -0
  421. package/schemas/resources-check.json +186 -0
  422. package/schemas/skill-review.json +230 -0
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Reading the project config for the surfaces an ARD manifest can advertise.
3
+ *
4
+ * Everything here is pure — config in, surfaces out — so the derivation rules
5
+ * are unit-testable without touching a filesystem or a manifest.
6
+ *
7
+ * ## Two collectors, because two rules
8
+ *
9
+ * A **skill** derives its media type from the surface kind alone, so every
10
+ * published skill becomes an entry with no author action. A **marketplace**, an
11
+ * **OKF bundle** and an MCP server derive nothing: the ARD specification names
12
+ * no media type for any of them (see `deriveArdMediaType`), so they are emitted
13
+ * only when the author supplies `ard.entries.<name>.type`, and are otherwise
14
+ * *reported as skipped* — never silently dropped, and never guessed at.
15
+ */
16
+ import { ardEntryOverrideKey, defaultArdNamespace, findArdEntryOverride, } from '@vibe-agent-toolkit/resources';
17
+ /**
18
+ * The path appended to `ard.baseUrl`, mirroring the URN's namespace segment.
19
+ *
20
+ * A convention, not a discovered fact: VAT knows what it publishes but not how
21
+ * an adopter hosts it. `ard.baseUrl` is the knob that makes it right, and it is
22
+ * the one field an author must set for URLs to be derivable at all.
23
+ */
24
+ function urlPathFor(kind, name, ard) {
25
+ return `${ard.namespace ?? defaultArdNamespace(kind)}/${name}`;
26
+ }
27
+ /**
28
+ * Build one surface.
29
+ *
30
+ * ⚠️ `displayName` is the config key **verbatim**. De-slugging it into
31
+ * `Vat Skill Authoring` would invent capitalisation VAT has no source for, and
32
+ * this lane's whole discipline is that a plausible fabrication is worse than an
33
+ * honest plain value. A richer caller that has read a `SKILL.md` title should
34
+ * pass a better one — `buildArdEntry` takes whatever it is given.
35
+ */
36
+ function makeSurface(kind, name, ard, defaults) {
37
+ return {
38
+ kind,
39
+ name,
40
+ displayName: name,
41
+ urlPath: urlPathFor(kind, name, ard),
42
+ ...(defaults.version === undefined ? {} : { version: defaults.version }),
43
+ };
44
+ }
45
+ /** Skills the project actually publishes, in config order. */
46
+ function collectSkillSurfaces(config, ard, defaults, surfaces, skipped) {
47
+ const skills = config.skills;
48
+ if (skills === undefined)
49
+ return;
50
+ // 🪤 `skills.config` is OPTIONAL in VAT — glob discovery via `skills.include`
51
+ // is the ordinary way to declare skills, and this repo's own config uses it.
52
+ // Returning quietly here meant a project with discovered-but-unconfigured
53
+ // skills emitted `{"entries": []}` and exited 0, saying nothing: the headline
54
+ // use case producing nothing, silently, for the common shape. Found by
55
+ // running the command, not by reading it.
56
+ //
57
+ // Reported through the existing `skipped` channel rather than as an error,
58
+ // because an empty manifest is a legal artifact and the run did not fail —
59
+ // what was wrong was the silence. Absence of a `skills` block entirely is NOT
60
+ // reported: there is nothing to advertise and no mistake to point at, and a
61
+ // warning there would train people to ignore this one.
62
+ if (skills.config === undefined || Object.keys(skills.config).length === 0) {
63
+ skipped.push({
64
+ name: '(discovered skills)',
65
+ kind: 'skill',
66
+ reason: 'skills.config is empty, so no skill was advertised. ARD entries are derived per named skill; add `skills.config.<name>` for each skill you want announced. Discovery globs alone (`skills.include`) do not name them.',
67
+ });
68
+ return;
69
+ }
70
+ const fallbackPublish = skills.defaults?.publish ?? true;
71
+ // `undefined` means discovery did not run, which is NOT the same claim as
72
+ // "discovery found nothing" — see `ArdSurfaceDefaults.discoveredSkills`.
73
+ const discovered = defaults.discoveredSkills === undefined ? undefined : new Set(defaults.discoveredSkills);
74
+ for (const [name, packaging] of Object.entries(skills.config)) {
75
+ if ((packaging.publish ?? fallbackPublish) === false) {
76
+ skipped.push({
77
+ name,
78
+ kind: 'skill',
79
+ reason: 'skills.config.' + name + '.publish is false — an unpublished skill is not advertised.',
80
+ });
81
+ continue;
82
+ }
83
+ // Checked AFTER the publish opt-out, so an unpublished skill is reported
84
+ // once, for the reason its author chose, rather than twice.
85
+ if (discovered !== undefined && !discovered.has(name)) {
86
+ skipped.push({
87
+ name,
88
+ kind: 'skill',
89
+ reason: `skills.config.${name} names a skill that \`skills.include\` discovery did not find, so ` +
90
+ 'VAT will not advertise a URL for it — a discovery document must not publish a 404. ' +
91
+ 'Either add the SKILL.md the globs reach, or remove the config key.',
92
+ });
93
+ continue;
94
+ }
95
+ surfaces.push(makeSurface('skill', name, ard, defaults));
96
+ }
97
+ }
98
+ /**
99
+ * Surfaces the specification names no media type for.
100
+ *
101
+ * Emitted only on an explicit `ard.entries.<name>.type`. The skip reason names
102
+ * the config key, so the fix is readable from the terminal without opening
103
+ * documentation.
104
+ */
105
+ function collectOverrideOnlySurfaces(names, kind, ard, defaults, surfaces, skipped) {
106
+ for (const name of names) {
107
+ // Looked up through the builder's OWN function, not a second copy of the
108
+ // rule. 🚨 This site used to restate `qualified ?? bare` inline, and neither
109
+ // copy was pinned — two mutations reversing them to bare-first stayed green
110
+ // — so the two could disagree about which block a surface gets while every
111
+ // test passed. Here the answer decides EMITTABILITY: a lookup that read the
112
+ // bare key first would advertise a marketplace on the strength of a SKILL's
113
+ // override.
114
+ const overrides = findArdEntryOverride(ard, kind, name);
115
+ if (overrides?.type === undefined) {
116
+ skipped.push({
117
+ name,
118
+ kind,
119
+ reason:
120
+ // No indefinite article: `kind` interpolates to `mcp-server` and
121
+ // `okf-bundle` as well as `skill`, so a hardcoded "a" is wrong for
122
+ // half the vocabulary and "a/an" cannot be chosen from the kind
123
+ // without a rule this message does not deserve.
124
+ `the ARD specification names no media type for surface kind "${kind}", so VAT derives none. ` +
125
+ `Set \`ard.entries."${ardEntryOverrideKey(kind, name)}".type\` to advertise it.`,
126
+ });
127
+ continue;
128
+ }
129
+ surfaces.push(makeSurface(kind, name, ard, defaults));
130
+ }
131
+ }
132
+ /**
133
+ * Every surface the project config declares, split into what VAT will emit and
134
+ * what it declined to.
135
+ *
136
+ * @throws never — a config with no `ard` block yields an empty collection; the
137
+ * caller decides whether that is a failure (`runArdEmit` does).
138
+ */
139
+ export function collectArdSurfaces(config, defaults) {
140
+ const surfaces = [];
141
+ const skipped = [];
142
+ const ard = config.ard;
143
+ if (ard === undefined)
144
+ return { surfaces, skipped };
145
+ collectSkillSurfaces(config, ard, defaults, surfaces, skipped);
146
+ collectOverrideOnlySurfaces(Object.keys(config.claude?.marketplaces ?? {}), 'marketplace', ard, defaults, surfaces, skipped);
147
+ collectOverrideOnlySurfaces(Object.keys(config.okf?.bundles ?? {}), 'okf-bundle', ard, defaults, surfaces, skipped);
148
+ return { surfaces, skipped };
149
+ }
150
+ //# sourceMappingURL=surfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaces.js","sourceRoot":"","sources":["../../../src/commands/ard/surfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,GAKrB,MAAM,+BAA+B,CAAC;AAoCvC;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,IAAoB,EAAE,IAAY,EAAE,GAAc;IACpE,OAAO,GAAG,GAAG,CAAC,SAAS,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;AACjE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,WAAW,CAClB,IAAoB,EACpB,IAAY,EACZ,GAAc,EACd,QAA4B;IAE5B,OAAO;QACL,IAAI;QACJ,IAAI;QACJ,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC;QACpC,GAAG,CAAC,QAAQ,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO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ACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAShF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBActC,CAAC;AAcF,iEAAiE;AACjE,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,aAAa,GAAG,eAAe,CAAC;AAmClF;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAIpE;AAkBD;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAShG;AA0BD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE5E;AA+BD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,eAAe,EAAE,CAAC,CAuB5B"}
@@ -173,12 +173,15 @@ export const gitTrackerForProjectRoot = async (projectRoot) => {
173
173
  if (gitRoot === null) {
174
174
  return undefined;
175
175
  }
176
- try {
177
- return await getOrCreateGitTracker(gitRoot);
178
- }
179
- catch {
180
- return undefined;
181
- }
176
+ // No catch, deliberately. "Not a repository" and "git did not answer" are
177
+ // both absorbed INSIDE `GitTracker.initialize()` (a null listing, a tracker
178
+ // that says so), and a refused directory is recorded on the tracker under the
179
+ // degrade policy it is handed — so nothing environmental can throw from here.
180
+ // A throw is a defect, and the `catch { return undefined }` that used to sit
181
+ // here turned it into "no tracker": every gitignore question then fell back
182
+ // to a `git check-ignore` subprocess per file, silently, in the one lane
183
+ // measured at 786 of 786 such spawns.
184
+ return getOrCreateGitTracker(gitRoot);
182
185
  };
183
186
  /**
184
187
  * Cache of (canonical SKILL.md path → verdict).
@@ -1 +1 @@
1
- {"version":3,"file":"distributed-tree.js","sourceRoot":"","sources":["../../../src/commands/audit/distributed-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AAEH,OAAO,EAAE,mCAAmC,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAyB,MAAM,wCAAwC,CAAC;AAEnG,OAAO,EACL,aAAa,EACb,aAAa,EACb,QAAQ,EACR,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,WAAW,EACX,UAAU,GACX,MAAM,+BAA+B,CAAC;AAEvC,iFAAiF;AACjF,MAAM,eAAe,GAA4B,IAAI,GAAG,EAAE,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAe;IACzD,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC5C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;IAC3B,eAAe,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACtC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAqB,KAAK,EAAE,WAAW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CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAS,YAAY,CAAC,QAAgB,EAAE,YAAoB;IAC1D,OAAO,aAAa,CAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,GAAG,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,SAAiB,EACjB,YAAoB,EACpB,SAAkB;IAElB,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAC1B,MAAM,UAAU,GAAG,MAAM,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAC7D,IAAI,UAAU,KAAK,WAAW;QAAE,OAAO,EAAE,CAAC;IAE1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,mCAAmC,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;IAChF,IAAI,UAAU,KAAK,aAAa;QAAE,OAAO,OAAO,CAAC;IAEjD,yEAAyE;IACzE,gFAAgF;IAChF,iFAAiF;IACjF,+EAA+E;IAC/E,8EAA8E;IAC9E,2EAA2E;IAC3E,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACtD,OAAO;QACL,gBAAgB,CAAC,+BAA+B,EAAE;YAChD,QAAQ;YACR,MAAM,EAAE,GAAG,QAAQ,KAAK,OAAO,CAAC,MAAM,iDAAiD;SACxF,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,158 @@
1
+ /**
2
+ * The population `vat audit <directory>` validates, enumerated through the
3
+ * `crawl` lane.
4
+ *
5
+ * This module replaced a ~700-line recursive `fs.readdir` walk that lived in
6
+ * `audit.ts` with its own gitignore map, its own skip reasons and its own
7
+ * unreadable-directory handling — a fifth enumeration lane
8
+ * `docs/contributing/command-lane-table.md` used to deny existed. The audit's
9
+ * population is now what `crawlDirectory` returns, narrowed to the four file
10
+ * shapes the audit knows how to validate, so a change to the lane's narrowings
11
+ * (`NEVER_CRAWL_GLOBS`, the git route, the refusal policy) reaches `vat audit`
12
+ * like every other row of that table.
13
+ *
14
+ * Two halves, deliberately: {@link enumerateAuditPopulation} asks the lane and
15
+ * is exercised by an integration test over a real tree;
16
+ * {@link classifyScanPopulation} turns a flat listing into ordered subjects and
17
+ * is pure, so the part that used to be interleaved with `readdir` has unit
18
+ * tests of its own.
19
+ */
20
+ import { type DirectoryRefusal } from '@vibe-agent-toolkit/utils/crawl';
21
+ /** The project config the audit walks UP to, and announces when it meets one NESTED in the tree. */
22
+ export declare const VAT_CONFIG_FILENAME = "vibe-agent-toolkit.config.yaml";
23
+ /** One thing the audit validates, found by the directory lane. */
24
+ export type AuditScanSubject =
25
+ /** A directory holding `.claude-plugin/` — a plugin or a marketplace. */
26
+ {
27
+ readonly kind: 'plugin';
28
+ readonly dir: string;
29
+ }
30
+ /** A `SKILL.md`; `dir` is the skill directory. */
31
+ | {
32
+ readonly kind: 'skill';
33
+ readonly dir: string;
34
+ readonly path: string;
35
+ }
36
+ /** An `installed_plugins.json` / `known_marketplaces.json`. */
37
+ | {
38
+ readonly kind: 'registry';
39
+ readonly dir: string;
40
+ readonly path: string;
41
+ };
42
+ /**
43
+ * A compiled exclude rule plus the base its patterns are relative to.
44
+ *
45
+ * Audit applies two exclude sources with DIFFERENT bases, which is why the base
46
+ * travels with the matcher instead of being assumed. `--exclude` is typed at the
47
+ * command line about the directory the operator named, so it is relative to the
48
+ * scan base. `resources.exclude` is written in a config file about that config's
49
+ * own project, so it is relative to the project root — matching it against
50
+ * scan-relative paths makes one config mean different things depending on which
51
+ * subdirectory you happened to name.
52
+ */
53
+ export interface ExcludeMatcher {
54
+ readonly isMatch: (relativePath: string) => boolean;
55
+ /** The directory the patterns are relative to — the scan root for `--exclude`, the project root for `resources.exclude`. */
56
+ readonly base: string;
57
+ }
58
+ /** The two channels the population's own diagnostics go out on. */
59
+ export interface ScanLogger {
60
+ warn(message: string): void;
61
+ debug(message: string): void;
62
+ }
63
+ /**
64
+ * Compile the governing project's `resources.exclude` for a scan.
65
+ *
66
+ * The config is found by walking UP from the scan directory ({@link findProjectRoot}),
67
+ * not by looking in it. Looking only in the scan directory is how a path argument
68
+ * silently voided every exclude the project had declared: `vat audit
69
+ * packages/x/resources/skills/` found no config there, so a package that excludes
70
+ * its deliberately-broken eval fixtures had them audited as production skills the
71
+ * moment anyone named a subdirectory. The rule: a path argument says WHICH tree
72
+ * to audit, and `exclude` applies either way.
73
+ *
74
+ * With one deliberate exception, mirroring the gitignore rule the scan context
75
+ * applies: when the operator points the scan AT an excluded tree, their explicit
76
+ * intent wins and the excludes are dropped for that run. Otherwise naming an
77
+ * excluded directory would report `filesScanned: 0, status: success` — a green
78
+ * run that scanned nothing.
79
+ *
80
+ * @param scanDir - The audited directory
81
+ * @param logger - `warn` for a config that would not load, `debug` for the scan-root exception
82
+ * @returns The compiled matcher, or `null` when nothing applies
83
+ */
84
+ export declare function resolveProjectExcludes(scanDir: string, logger: ScanLogger): ExcludeMatcher | null;
85
+ export interface AuditScanPopulation {
86
+ /**
87
+ * Every subject, in the order the recursive walk used to produce them: a
88
+ * directory's own subjects (its plugin marker first, then its files by
89
+ * name) before its subdirectories', subdirectories by name.
90
+ */
91
+ readonly subjects: readonly AuditScanSubject[];
92
+ /**
93
+ * Directories the lane could not list. Each is a gap — whatever was beneath
94
+ * it is absent from `subjects` — and owes the reader a finding of its own.
95
+ */
96
+ readonly refusals: readonly DirectoryRefusal[];
97
+ /** `vibe-agent-toolkit.config.yaml` files strictly beneath the scan root, in path order. */
98
+ readonly nestedConfigs: readonly string[];
99
+ }
100
+ export interface AuditScanOptions {
101
+ readonly scanDir: string;
102
+ readonly recursive: boolean;
103
+ /**
104
+ * `true` answers from git (tracked + untracked-not-ignored) when the root is
105
+ * inside a repository. `false` — `--include-artifacts`, or a scan root that
106
+ * is itself gitignored — walks the tree and sees ignored files too; the
107
+ * lane's own never-crawl list still applies on that route.
108
+ */
109
+ readonly respectGitignore: boolean;
110
+ /** The operator's `--exclude` patterns, relative to `scanDir`. */
111
+ readonly userExcludes: readonly string[];
112
+ /** The governing project's `resources.exclude`, compiled against ITS root; `null` when there is none. */
113
+ readonly projectExcludes: ExcludeMatcher | null;
114
+ }
115
+ /**
116
+ * Is `absolutePath` dropped by `matcher` — by its own path, or by a directory
117
+ * between the scan root and it?
118
+ *
119
+ * The walk this replaced pruned a directory the moment its base-relative path
120
+ * matched (with the `+ '/'` retry that lets `dist/**` match the directory
121
+ * `dist`), so nothing beneath it was ever listed. A flat listing has to ask the
122
+ * same question of every ancestor, or a bare `vendor` pattern that used to
123
+ * prune the directory stops excluding the files inside it. Ancestors strictly
124
+ * below the scan root only: the scan root was cleared by the caller (naming an
125
+ * excluded directory is the operator's intent), and anything above it was
126
+ * never walked.
127
+ *
128
+ * @param matcher - The compiled patterns and the base they are relative to
129
+ * @param scanDir - The audited directory; nothing at or above it is tested
130
+ * @param absolutePath - The file to decide
131
+ * @returns True when the file or one of its scan-relative ancestors matches
132
+ */
133
+ export declare function isExcludedByMatcher(matcher: ExcludeMatcher, scanDir: string, absolutePath: string): boolean;
134
+ /**
135
+ * Turn a flat enumeration into the audit's subjects.
136
+ *
137
+ * @param scanDir - The audited directory, absolute
138
+ * @param relativePaths - Files the lane returned, scan-relative, forward-slashed
139
+ * @param recursive - `false` keeps only the root's files and immediate subdirectories' plugin markers
140
+ * @returns Ordered subjects and the nested configs the walk used to announce
141
+ */
142
+ export declare function classifyScanPopulation(scanDir: string, relativePaths: readonly string[], recursive: boolean): {
143
+ subjects: AuditScanSubject[];
144
+ nestedConfigs: string[];
145
+ };
146
+ /**
147
+ * Enumerate the audit's population through the `crawl` lane.
148
+ *
149
+ * A refused directory is not thrown: `vat audit` is a bulk linter over trees it
150
+ * does not own, and one root-owned directory under `~/.claude/plugins` must not
151
+ * cost the run every finding beside it. It is handed back on `refusals`, and the
152
+ * caller files it (the audit degrades, it never refuses the run).
153
+ *
154
+ * @param options - Where to look and what to leave out
155
+ * @returns The ordered subjects, the refusals, and the nested configs
156
+ */
157
+ export declare function enumerateAuditPopulation(options: AuditScanOptions): Promise<AuditScanPopulation>;
158
+ //# sourceMappingURL=scan-population.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scan-population.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/scan-population.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAkB,KAAK,gBAAgB,EAAqB,MAAM,iCAAiC,CAAC;AAK3G,oGAAoG;AACpG,eAAO,MAAM,mBAAmB,mCAAmC,CAAC;AA6BpE,kEAAkE;AAClE,MAAM,MAAM,gBAAgB;AAC1B,yEAAyE;AACvE;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE;AACnD,kDAAkD;GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACzE,+DAA+D;GAC7D;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;IACpD,4HAA4H;IAC5H,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,mEAAmE;AACnE,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,OAAO,EA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