@vibe-agent-toolkit/cli 0.2.0-rc.7 → 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 (353) hide show
  1. package/README.md +0 -1
  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 +5 -2
  6. package/dist/bin.js.map +1 -1
  7. package/dist/commands/agent/build.d.ts.map +1 -1
  8. package/dist/commands/agent/build.js +2 -1
  9. package/dist/commands/agent/build.js.map +1 -1
  10. package/dist/commands/agent/import.d.ts.map +1 -1
  11. package/dist/commands/agent/import.js +3 -2
  12. package/dist/commands/agent/import.js.map +1 -1
  13. package/dist/commands/agent/install-path.d.ts +36 -0
  14. package/dist/commands/agent/install-path.d.ts.map +1 -0
  15. package/dist/commands/agent/install-path.js +44 -0
  16. package/dist/commands/agent/install-path.js.map +1 -0
  17. package/dist/commands/agent/install.d.ts.map +1 -1
  18. package/dist/commands/agent/install.js +22 -10
  19. package/dist/commands/agent/install.js.map +1 -1
  20. package/dist/commands/agent/installed.d.ts.map +1 -1
  21. package/dist/commands/agent/installed.js +22 -12
  22. package/dist/commands/agent/installed.js.map +1 -1
  23. package/dist/commands/agent/list.d.ts.map +1 -1
  24. package/dist/commands/agent/list.js +2 -1
  25. package/dist/commands/agent/list.js.map +1 -1
  26. package/dist/commands/agent/run.d.ts.map +1 -1
  27. package/dist/commands/agent/run.js +2 -1
  28. package/dist/commands/agent/run.js.map +1 -1
  29. package/dist/commands/agent/uninstall.d.ts.map +1 -1
  30. package/dist/commands/agent/uninstall.js +13 -6
  31. package/dist/commands/agent/uninstall.js.map +1 -1
  32. package/dist/commands/agent/validate.d.ts.map +1 -1
  33. package/dist/commands/agent/validate.js +3 -2
  34. package/dist/commands/agent/validate.js.map +1 -1
  35. package/dist/commands/ard/emit.d.ts +72 -23
  36. package/dist/commands/ard/emit.d.ts.map +1 -1
  37. package/dist/commands/ard/emit.js +109 -56
  38. package/dist/commands/ard/emit.js.map +1 -1
  39. package/dist/commands/ard/index.d.ts +1 -1
  40. package/dist/commands/ard/index.d.ts.map +1 -1
  41. package/dist/commands/ard/index.js +4 -3
  42. package/dist/commands/ard/index.js.map +1 -1
  43. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  44. package/dist/commands/audit/distributed-tree.js +9 -6
  45. package/dist/commands/audit/distributed-tree.js.map +1 -1
  46. package/dist/commands/audit/scan-population.d.ts +158 -0
  47. package/dist/commands/audit/scan-population.d.ts.map +1 -0
  48. package/dist/commands/audit/scan-population.js +292 -0
  49. package/dist/commands/audit/scan-population.js.map +1 -0
  50. package/dist/commands/audit-settings.d.ts.map +1 -1
  51. package/dist/commands/audit-settings.js +6 -5
  52. package/dist/commands/audit-settings.js.map +1 -1
  53. package/dist/commands/audit.d.ts +16 -14
  54. package/dist/commands/audit.d.ts.map +1 -1
  55. package/dist/commands/audit.js +304 -389
  56. package/dist/commands/audit.js.map +1 -1
  57. package/dist/commands/build.d.ts.map +1 -1
  58. package/dist/commands/build.js +24 -24
  59. package/dist/commands/build.js.map +1 -1
  60. package/dist/commands/cache/clear.d.ts.map +1 -1
  61. package/dist/commands/cache/clear.js +17 -10
  62. package/dist/commands/cache/clear.js.map +1 -1
  63. package/dist/commands/claude/budget.d.ts +127 -28
  64. package/dist/commands/claude/budget.d.ts.map +1 -1
  65. package/dist/commands/claude/budget.js +76 -33
  66. package/dist/commands/claude/budget.js.map +1 -1
  67. package/dist/commands/claude/context.d.ts.map +1 -1
  68. package/dist/commands/claude/context.js +3 -2
  69. package/dist/commands/claude/context.js.map +1 -1
  70. package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
  71. package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
  72. package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
  73. package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
  74. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  75. package/dist/commands/claude/marketplace/git-publish.js +3 -2
  76. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  77. package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
  78. package/dist/commands/claude/marketplace/license-utils.js +0 -1
  79. package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
  80. package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
  81. package/dist/commands/claude/marketplace/publish-tree.js +0 -6
  82. package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
  83. package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
  84. package/dist/commands/claude/marketplace/publish.js +2 -1
  85. package/dist/commands/claude/marketplace/publish.js.map +1 -1
  86. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  87. package/dist/commands/claude/marketplace/validate.js +25 -15
  88. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  89. package/dist/commands/claude/org/api-keys.d.ts +0 -3
  90. package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
  91. package/dist/commands/claude/org/api-keys.js +2 -1
  92. package/dist/commands/claude/org/api-keys.js.map +1 -1
  93. package/dist/commands/claude/org/helpers.d.ts +17 -22
  94. package/dist/commands/claude/org/helpers.d.ts.map +1 -1
  95. package/dist/commands/claude/org/helpers.js +6 -22
  96. package/dist/commands/claude/org/helpers.js.map +1 -1
  97. package/dist/commands/claude/org/invites.d.ts +0 -3
  98. package/dist/commands/claude/org/invites.d.ts.map +1 -1
  99. package/dist/commands/claude/org/invites.js +3 -2
  100. package/dist/commands/claude/org/invites.js.map +1 -1
  101. package/dist/commands/claude/org/skills.d.ts +19 -1
  102. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  103. package/dist/commands/claude/org/skills.js +141 -105
  104. package/dist/commands/claude/org/skills.js.map +1 -1
  105. package/dist/commands/claude/org/users.d.ts +0 -3
  106. package/dist/commands/claude/org/users.d.ts.map +1 -1
  107. package/dist/commands/claude/org/users.js +3 -2
  108. package/dist/commands/claude/org/users.js.map +1 -1
  109. package/dist/commands/claude/org/workspaces.d.ts +0 -3
  110. package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
  111. package/dist/commands/claude/org/workspaces.js +6 -5
  112. package/dist/commands/claude/org/workspaces.js.map +1 -1
  113. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  114. package/dist/commands/claude/plugin/build.js +12 -31
  115. package/dist/commands/claude/plugin/build.js.map +1 -1
  116. package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
  117. package/dist/commands/claude/plugin/helpers.js +0 -6
  118. package/dist/commands/claude/plugin/helpers.js.map +1 -1
  119. package/dist/commands/claude/plugin/install.d.ts +12 -0
  120. package/dist/commands/claude/plugin/install.d.ts.map +1 -1
  121. package/dist/commands/claude/plugin/install.js +71 -60
  122. package/dist/commands/claude/plugin/install.js.map +1 -1
  123. package/dist/commands/claude/plugin/list.d.ts.map +1 -1
  124. package/dist/commands/claude/plugin/list.js +3 -2
  125. package/dist/commands/claude/plugin/list.js.map +1 -1
  126. package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
  127. package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
  128. package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
  129. package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
  130. package/dist/commands/claude/plugin/plugin-files.js +0 -3
  131. package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
  132. package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
  133. package/dist/commands/claude/plugin/plugin-validators.js +3 -6
  134. package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
  135. package/dist/commands/claude/plugin/tree-copy.d.ts +2 -1
  136. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  137. package/dist/commands/claude/plugin/tree-copy.js +15 -14
  138. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  139. package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
  140. package/dist/commands/claude/plugin/uninstall.js +4 -4
  141. package/dist/commands/claude/plugin/uninstall.js.map +1 -1
  142. package/dist/commands/consistency-check.d.ts +9 -13
  143. package/dist/commands/consistency-check.d.ts.map +1 -1
  144. package/dist/commands/consistency-check.js +91 -81
  145. package/dist/commands/consistency-check.js.map +1 -1
  146. package/dist/commands/corpus/report.d.ts.map +1 -1
  147. package/dist/commands/corpus/report.js +1 -2
  148. package/dist/commands/corpus/report.js.map +1 -1
  149. package/dist/commands/corpus/runner.d.ts.map +1 -1
  150. package/dist/commands/corpus/runner.js +2 -6
  151. package/dist/commands/corpus/runner.js.map +1 -1
  152. package/dist/commands/corpus/scan.d.ts.map +1 -1
  153. package/dist/commands/corpus/scan.js +2 -3
  154. package/dist/commands/corpus/scan.js.map +1 -1
  155. package/dist/commands/corpus/seed.d.ts +4 -4
  156. package/dist/commands/corpus/seed.d.ts.map +1 -1
  157. package/dist/commands/corpus/seed.js +1 -3
  158. package/dist/commands/corpus/seed.js.map +1 -1
  159. package/dist/commands/doctor.d.ts.map +1 -1
  160. package/dist/commands/doctor.js +55 -37
  161. package/dist/commands/doctor.js.map +1 -1
  162. package/dist/commands/inventory.d.ts.map +1 -1
  163. package/dist/commands/inventory.js +6 -7
  164. package/dist/commands/inventory.js.map +1 -1
  165. package/dist/commands/mcp/list-collections.d.ts.map +1 -1
  166. package/dist/commands/mcp/list-collections.js +2 -1
  167. package/dist/commands/mcp/list-collections.js.map +1 -1
  168. package/dist/commands/mcp/serve.d.ts.map +1 -1
  169. package/dist/commands/mcp/serve.js +3 -2
  170. package/dist/commands/mcp/serve.js.map +1 -1
  171. package/dist/commands/okf/index.d.ts.map +1 -1
  172. package/dist/commands/okf/index.js +14 -2
  173. package/dist/commands/okf/index.js.map +1 -1
  174. package/dist/commands/okf/validate.d.ts +157 -48
  175. package/dist/commands/okf/validate.d.ts.map +1 -1
  176. package/dist/commands/okf/validate.js +109 -76
  177. package/dist/commands/okf/validate.js.map +1 -1
  178. package/dist/commands/phase-utils.d.ts +11 -10
  179. package/dist/commands/phase-utils.d.ts.map +1 -1
  180. package/dist/commands/phase-utils.js +30 -14
  181. package/dist/commands/phase-utils.js.map +1 -1
  182. package/dist/commands/positional-args.d.ts.map +1 -1
  183. package/dist/commands/positional-args.js +2 -1
  184. package/dist/commands/positional-args.js.map +1 -1
  185. package/dist/commands/rag/clear-command.d.ts.map +1 -1
  186. package/dist/commands/rag/clear-command.js +2 -1
  187. package/dist/commands/rag/clear-command.js.map +1 -1
  188. package/dist/commands/rag/index-command.d.ts.map +1 -1
  189. package/dist/commands/rag/index-command.js +4 -1
  190. package/dist/commands/rag/index-command.js.map +1 -1
  191. package/dist/commands/rag/query-command.d.ts.map +1 -1
  192. package/dist/commands/rag/query-command.js +2 -1
  193. package/dist/commands/rag/query-command.js.map +1 -1
  194. package/dist/commands/rag/stats-command.d.ts.map +1 -1
  195. package/dist/commands/rag/stats-command.js +2 -1
  196. package/dist/commands/rag/stats-command.js.map +1 -1
  197. package/dist/commands/resources/check-progress.d.ts.map +1 -1
  198. package/dist/commands/resources/check-progress.js +5 -2
  199. package/dist/commands/resources/check-progress.js.map +1 -1
  200. package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
  201. package/dist/commands/resources/check-supervisor.js +14 -7
  202. package/dist/commands/resources/check-supervisor.js.map +1 -1
  203. package/dist/commands/resources/check.d.ts +135 -4
  204. package/dist/commands/resources/check.d.ts.map +1 -1
  205. package/dist/commands/resources/check.js +97 -80
  206. package/dist/commands/resources/check.js.map +1 -1
  207. package/dist/commands/resources/index.d.ts.map +1 -1
  208. package/dist/commands/resources/index.js +24 -21
  209. package/dist/commands/resources/index.js.map +1 -1
  210. package/dist/commands/resources/query.d.ts.map +1 -1
  211. package/dist/commands/resources/query.js +4 -8
  212. package/dist/commands/resources/query.js.map +1 -1
  213. package/dist/commands/resources/scan.d.ts.map +1 -1
  214. package/dist/commands/resources/scan.js +4 -8
  215. package/dist/commands/resources/scan.js.map +1 -1
  216. package/dist/commands/resources/validate.d.ts +1 -1
  217. package/dist/commands/resources/validate.d.ts.map +1 -1
  218. package/dist/commands/resources/validate.js +0 -1
  219. package/dist/commands/resources/validate.js.map +1 -1
  220. package/dist/commands/skill/review-checklist.d.ts +3 -2
  221. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  222. package/dist/commands/skill/review-checklist.js +4 -2
  223. package/dist/commands/skill/review-checklist.js.map +1 -1
  224. package/dist/commands/skill/review.d.ts +247 -0
  225. package/dist/commands/skill/review.d.ts.map +1 -1
  226. package/dist/commands/skill/review.js +90 -60
  227. package/dist/commands/skill/review.js.map +1 -1
  228. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  229. package/dist/commands/skill/test/configure.js +0 -1
  230. package/dist/commands/skill/test/configure.js.map +1 -1
  231. package/dist/commands/skill/test/run.d.ts +12 -6
  232. package/dist/commands/skill/test/run.d.ts.map +1 -1
  233. package/dist/commands/skill/test/run.js +118 -63
  234. package/dist/commands/skill/test/run.js.map +1 -1
  235. package/dist/commands/skills/build.d.ts +69 -2
  236. package/dist/commands/skills/build.d.ts.map +1 -1
  237. package/dist/commands/skills/build.js +112 -39
  238. package/dist/commands/skills/build.js.map +1 -1
  239. package/dist/commands/skills/install.d.ts +2 -1
  240. package/dist/commands/skills/install.d.ts.map +1 -1
  241. package/dist/commands/skills/install.js +20 -30
  242. package/dist/commands/skills/install.js.map +1 -1
  243. package/dist/commands/skills/list.d.ts.map +1 -1
  244. package/dist/commands/skills/list.js +14 -18
  245. package/dist/commands/skills/list.js.map +1 -1
  246. package/dist/commands/skills/package.d.ts +1 -1
  247. package/dist/commands/skills/package.d.ts.map +1 -1
  248. package/dist/commands/skills/package.js +6 -8
  249. package/dist/commands/skills/package.js.map +1 -1
  250. package/dist/commands/skills/scope-guard.d.ts.map +1 -1
  251. package/dist/commands/skills/scope-guard.js +2 -4
  252. package/dist/commands/skills/scope-guard.js.map +1 -1
  253. package/dist/commands/skills/shared.d.ts.map +1 -1
  254. package/dist/commands/skills/shared.js +2 -4
  255. package/dist/commands/skills/shared.js.map +1 -1
  256. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  257. package/dist/commands/skills/skill-discovery.js +0 -1
  258. package/dist/commands/skills/skill-discovery.js.map +1 -1
  259. package/dist/commands/skills/source-resolvers.d.ts +15 -0
  260. package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
  261. package/dist/commands/skills/source-resolvers.js +25 -4
  262. package/dist/commands/skills/source-resolvers.js.map +1 -1
  263. package/dist/commands/validate.d.ts +1 -1
  264. package/dist/commands/validate.js +8 -6
  265. package/dist/commands/validate.js.map +1 -1
  266. package/dist/commands/verify.d.ts +8 -2
  267. package/dist/commands/verify.d.ts.map +1 -1
  268. package/dist/commands/verify.js +86 -56
  269. package/dist/commands/verify.js.map +1 -1
  270. package/dist/index.d.ts +0 -1
  271. package/dist/index.d.ts.map +1 -1
  272. package/dist/index.js +5 -1
  273. package/dist/index.js.map +1 -1
  274. package/dist/report-schemas.d.ts +45 -0
  275. package/dist/report-schemas.d.ts.map +1 -0
  276. package/dist/report-schemas.js +102 -0
  277. package/dist/report-schemas.js.map +1 -0
  278. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
  279. package/dist/skill-resolution/resolve-skill-reference.js +2 -3
  280. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
  281. package/dist/utils/agent-discovery.d.ts.map +1 -1
  282. package/dist/utils/agent-discovery.js +22 -11
  283. package/dist/utils/agent-discovery.js.map +1 -1
  284. package/dist/utils/agent-runner.d.ts.map +1 -1
  285. package/dist/utils/agent-runner.js +0 -1
  286. package/dist/utils/agent-runner.js.map +1 -1
  287. package/dist/utils/command-error.d.ts +63 -62
  288. package/dist/utils/command-error.d.ts.map +1 -1
  289. package/dist/utils/command-error.js +80 -76
  290. package/dist/utils/command-error.js.map +1 -1
  291. package/dist/utils/config-loader.d.ts +2 -1
  292. package/dist/utils/config-loader.d.ts.map +1 -1
  293. package/dist/utils/config-loader.js +3 -6
  294. package/dist/utils/config-loader.js.map +1 -1
  295. package/dist/utils/context-budget-issues.d.ts +1 -1
  296. package/dist/utils/context-budget-issues.js +1 -1
  297. package/dist/utils/corpus-target.d.ts +5 -27
  298. package/dist/utils/corpus-target.d.ts.map +1 -1
  299. package/dist/utils/corpus-target.js +7 -33
  300. package/dist/utils/corpus-target.js.map +1 -1
  301. package/dist/utils/help-loader.d.ts.map +1 -1
  302. package/dist/utils/help-loader.js +0 -1
  303. package/dist/utils/help-loader.js.map +1 -1
  304. package/dist/utils/issue-rendering.d.ts +2 -2
  305. package/dist/utils/issue-rendering.js +2 -2
  306. package/dist/utils/optional-backend.d.ts.map +1 -1
  307. package/dist/utils/optional-backend.js +2 -1
  308. package/dist/utils/optional-backend.js.map +1 -1
  309. package/dist/utils/output.d.ts +9 -0
  310. package/dist/utils/output.d.ts.map +1 -1
  311. package/dist/utils/output.js +16 -0
  312. package/dist/utils/output.js.map +1 -1
  313. package/dist/utils/package-json.d.ts +24 -0
  314. package/dist/utils/package-json.d.ts.map +1 -0
  315. package/dist/utils/package-json.js +49 -0
  316. package/dist/utils/package-json.js.map +1 -0
  317. package/dist/utils/project-root-policy.d.ts.map +1 -1
  318. package/dist/utils/project-root-policy.js +0 -2
  319. package/dist/utils/project-root-policy.js.map +1 -1
  320. package/dist/utils/resource-loader.js +2 -2
  321. package/dist/utils/resource-loader.js.map +1 -1
  322. package/dist/utils/skill-packaging-config.d.ts +27 -0
  323. package/dist/utils/skill-packaging-config.d.ts.map +1 -1
  324. package/dist/utils/skill-packaging-config.js +30 -0
  325. package/dist/utils/skill-packaging-config.js.map +1 -1
  326. package/dist/utils/url-redact.d.ts.map +1 -1
  327. package/dist/utils/url-redact.js +4 -6
  328. package/dist/utils/url-redact.js.map +1 -1
  329. package/dist/utils/user-context-scanner.d.ts.map +1 -1
  330. package/dist/utils/user-context-scanner.js +0 -2
  331. package/dist/utils/user-context-scanner.js.map +1 -1
  332. package/dist/utils/validate-help-files.d.ts.map +1 -1
  333. package/dist/utils/validate-help-files.js +3 -4
  334. package/dist/utils/validate-help-files.js.map +1 -1
  335. package/dist/utils/vat-bin-path.d.ts.map +1 -1
  336. package/dist/utils/vat-bin-path.js +0 -1
  337. package/dist/utils/vat-bin-path.js.map +1 -1
  338. package/dist/version.d.ts.map +1 -1
  339. package/dist/version.js +1 -3
  340. package/dist/version.js.map +1 -1
  341. package/docs/audit.md +44 -53
  342. package/docs/doctor.md +1 -0
  343. package/docs/index.md +18 -10
  344. package/docs/rag.md +0 -1
  345. package/docs/resources.md +0 -1
  346. package/docs/skill-test.md +10 -9
  347. package/docs/skills.md +6 -7
  348. package/package.json +22 -27
  349. package/schemas/ard-emit.json +149 -0
  350. package/schemas/claude-budget.json +197 -0
  351. package/schemas/okf-validate.json +170 -0
  352. package/schemas/resources-check.json +186 -0
  353. package/schemas/skill-review.json +230 -0
@@ -6,13 +6,16 @@
6
6
  * v0.91, status Proposal, and wiring internals to a moving shape is the cost
7
7
  * this rule avoids.
8
8
  */
9
- import { existsSync, readFileSync } from 'node:fs';
9
+ import { existsSync } from 'node:fs';
10
10
  import { ArdDerivationError, buildArdEntries, buildArdManifest, findShadowedArdOverrideKeys, writeArdManifest, } from '@vibe-agent-toolkit/resources';
11
- import { safePath } from '@vibe-agent-toolkit/utils';
12
- import { handleCommandError, handleExpectedFailure } from '../../utils/command-error.js';
11
+ import { buildReport, ExitCode, reportSchema } from '@vibe-agent-toolkit/schema';
12
+ import { safePath, VatError } from '@vibe-agent-toolkit/utils';
13
+ import { z } from 'zod';
14
+ import { handleReportCommandError, handleReportExpectedFailure } from '../../utils/command-error.js';
13
15
  import { loadConfig } from '../../utils/config-loader.js';
14
16
  import { createLogger } from '../../utils/logger.js';
15
17
  import { writeJsonOutput } from '../../utils/output.js';
18
+ import { readPackageJsonOrAbsent } from '../../utils/package-json.js';
16
19
  import { discoverSkillsFromConfig } from '../skills/skill-discovery.js';
17
20
  import { collectArdSurfaces } from './surfaces.js';
18
21
  /** Default destination, relative to the project root — the path ARD publishes at. */
@@ -20,12 +23,11 @@ export const DEFAULT_ARD_OUTPUT = '.well-known/ard.json';
20
23
  /** The config filename every VAT project declares its surfaces in. */
21
24
  const CONFIG_FILENAME = 'vibe-agent-toolkit.config.yaml';
22
25
  /** No manifest could be built, and this says which absence caused it. */
23
- export class ArdConfigMissingError extends Error {
26
+ export class ArdConfigMissingError extends VatError {
24
27
  projectRoot;
25
28
  absence;
26
29
  constructor(projectRoot, absence) {
27
- super(ABSENCE_MESSAGES[absence](projectRoot));
28
- this.name = 'ArdConfigMissingError';
30
+ super('ARD_CONFIG_MISSING', ABSENCE_MESSAGES[absence](projectRoot));
29
31
  this.projectRoot = projectRoot;
30
32
  this.absence = absence;
31
33
  }
@@ -42,30 +44,22 @@ const ABSENCE_MESSAGES = {
42
44
  * The project's own package version, when it has one.
43
45
  *
44
46
  * The npm package version is the only version this project recognises, and an
45
- * adopter's is the only one VAT can honestly stamp on an entry. Absent or
46
- * unreadable, the field is simply omitted.
47
+ * adopter's is the only one VAT can honestly stamp on an entry. Absent, the
48
+ * field is simply omitted. A `package.json` that is there and is not JSON is
49
+ * refused by name instead: it used to be read as "no version" too, and a
50
+ * manifest emitted with no `version` from a tree npm itself cannot read is a
51
+ * manifest that hid the one fact worth reporting.
47
52
  */
48
53
  function readProjectVersion(projectRoot) {
49
- const packagePath = safePath.join(projectRoot, 'package.json');
50
- // eslint-disable-next-line security/detect-non-literal-fs-filename -- path derives from the caller's project root
51
- if (!existsSync(packagePath))
54
+ const parsed = readPackageJsonOrAbsent(safePath.join(projectRoot, 'package.json'));
55
+ const version = parsed?.['version'];
56
+ // `""` is ABSENT, not a version. A `package.json` carrying it emitted
57
+ // `"version": ""` on every entry at exit 0 — a field asserting a version
58
+ // that does not exist. The entry schema now refuses it too, so leaving this
59
+ // would turn a blank field into a hard emission failure instead.
60
+ if (typeof version !== 'string' || version === '')
52
61
  return undefined;
53
- try {
54
- // eslint-disable-next-line security/detect-non-literal-fs-filename -- existence just confirmed above; same path
55
- const parsed = JSON.parse(readFileSync(packagePath, 'utf-8'));
56
- // `""` is ABSENT, not a version. A `package.json` carrying it emitted
57
- // `"version": ""` on every entry at exit 0 — a field asserting a version
58
- // that does not exist. The entry schema now refuses it too, so leaving this
59
- // would turn a blank field into a hard emission failure instead.
60
- if (typeof parsed.version !== 'string' || parsed.version === '')
61
- return undefined;
62
- return parsed.version;
63
- }
64
- catch {
65
- // A package.json VAT cannot read is not a reason to refuse a manifest; the
66
- // entry is emitted without a `version`, which is a conformant entry.
67
- return undefined;
68
- }
62
+ return version;
69
63
  }
70
64
  /**
71
65
  * Build and write the manifest.
@@ -77,7 +71,6 @@ function readProjectVersion(projectRoot) {
77
71
  */
78
72
  export async function runArdEmit(options) {
79
73
  const projectRoot = options.projectRoot ?? process.cwd();
80
- // eslint-disable-next-line security/detect-non-literal-fs-filename -- projectRoot is the caller's declared root
81
74
  if (!existsSync(projectRoot)) {
82
75
  throw new ArdConfigMissingError(projectRoot, 'no-project-root');
83
76
  }
@@ -115,18 +108,81 @@ export async function runArdEmit(options) {
115
108
  shadowed: findShadowedArdOverrideKeys(surfaces, ard),
116
109
  };
117
110
  }
118
- /** Pure: the report a result becomes, so the status rule is unit-testable. */
119
- export function buildArdEmitReport(result) {
111
+ /**
112
+ * The codes this run's findings carry. Not registry codes: nothing here is a
113
+ * validation an adopter tunes through `validation.severity` — a skipped
114
+ * surface is a fact about what the manifest could not advertise, and its
115
+ * severity is the run's to decide.
116
+ */
117
+ export const ARD_EMIT_CODES = {
118
+ /** A configured surface that became no entry, and why — the thing `--strict` gates. */
119
+ SURFACE_SKIPPED: 'ARD_SURFACE_SKIPPED',
120
+ /**
121
+ * A bare `ard.entries` key a qualified key for the same surface outranked.
122
+ * Not a failure — the precedence is deterministic and documented — but the
123
+ * losing block is dead config, and an author cannot see that from the file.
124
+ */
125
+ OVERRIDE_KEY_SHADOWED: 'ARD_OVERRIDE_KEY_SHADOWED',
126
+ };
127
+ /**
128
+ * What the run reports beyond its findings.
129
+ *
130
+ * 🪤 `entryCount: 0` is the empty manifest. A run that wrote `{"entries":[]}`
131
+ * and one that wrote a full catalogue both used to end at exit 0 with a
132
+ * cheerful line on stdout, and nothing a machine could read told them apart —
133
+ * so a CI step that emits and publishes was green over a discovery document
134
+ * advertising nothing. The envelope's `examined` is every configured surface
135
+ * the run considered, so "nothing declared" (`examined: 0`) and "everything
136
+ * declared was skipped" (`examined: N`, `entryCount: 0`) read differently too.
137
+ */
138
+ export const ArdEmitDataSchema = z.object({
139
+ outputPath: z.string(),
140
+ entryCount: z.number().int().nonnegative(),
141
+ /**
142
+ * Counts BESIDE the findings. The count is what a CI step gates on without
143
+ * a JSON path into an array; the finding is what the human it pages then
144
+ * acts on. Publishing only one of them answers "how many" or "which", never
145
+ * both.
146
+ */
147
+ skippedCount: z.number().int().nonnegative(),
148
+ shadowedCount: z.number().int().nonnegative(),
149
+ }).strict();
150
+ /** The document `--format json` publishes. */
151
+ export const ARD_EMIT_REPORT_SCHEMA = reportSchema(ArdEmitDataSchema);
152
+ /** The finding one skipped surface becomes. Its text is the stderr line, so the two channels agree. */
153
+ function skippedFinding(item) {
154
+ return {
155
+ code: ARD_EMIT_CODES.SURFACE_SKIPPED,
156
+ severity: 'warning',
157
+ message: `skipped ${item.kind} "${item.name}": ${item.reason}`,
158
+ };
159
+ }
160
+ /** The finding one shadowed override key becomes, pointing at the dead config block. */
161
+ function shadowedFinding(item) {
120
162
  return {
121
- status: result.entryCount > 0 ? 'written' : 'empty',
122
- outputPath: result.outputPath,
123
- entryCount: result.entryCount,
124
- skippedCount: result.skipped.length,
125
- shadowedCount: result.shadowed.length,
126
- skipped: result.skipped,
127
- shadowed: result.shadowed,
163
+ code: ARD_EMIT_CODES.OVERRIDE_KEY_SHADOWED,
164
+ severity: 'info',
165
+ message: `ignored \`ard.entries.${item.shadowedKey}\`: the ${item.kind} "${item.name}" is also named ` +
166
+ `by \`ard.entries."${item.winningKey}"\`, and the kind-qualified key wins. Nothing in the ` +
167
+ 'bare block was read — fold it into the qualified one or delete it.',
168
+ field: `ard.entries.${item.shadowedKey}`,
128
169
  };
129
170
  }
171
+ /** Pure: the report a result becomes, so the status rule is unit-testable. */
172
+ export function buildArdEmitReport(result) {
173
+ return buildReport({
174
+ // Every configured surface the run considered: the ones that became
175
+ // entries and the ones it had to skip.
176
+ examined: result.entryCount + result.skipped.length,
177
+ findings: [...result.skipped.map(skippedFinding), ...result.shadowed.map(shadowedFinding)],
178
+ data: {
179
+ outputPath: result.outputPath,
180
+ entryCount: result.entryCount,
181
+ skippedCount: result.skipped.length,
182
+ shadowedCount: result.shadowed.length,
183
+ },
184
+ });
185
+ }
130
186
  /**
131
187
  * Why `--strict` fails this run, or `undefined` when it does not.
132
188
  *
@@ -137,36 +193,33 @@ export function buildArdEmitReport(result) {
137
193
  * see, and the empty document that is the limit case of that.
138
194
  */
139
195
  function strictFailure(report) {
140
- if (report.skippedCount > 0) {
141
- const surfaces = report.skippedCount === 1 ? '1 configured surface was' : `${report.skippedCount} configured surfaces were`;
196
+ const { skippedCount, entryCount } = report.data;
197
+ if (skippedCount > 0) {
198
+ const surfaces = skippedCount === 1 ? '1 configured surface was' : `${skippedCount} configured surfaces were`;
142
199
  // Not "see above": in `--format json` the reasons are IN the report, not on
143
200
  // stderr, so a message naming a position would be wrong on one of the two
144
201
  // channels.
145
- return `--strict: ${surfaces} not advertised — each is named, with its reason, in this run's \`skipped\` report.`;
202
+ return `--strict: ${surfaces} not advertised — each is named, with its reason, in this run's \`findings\`.`;
146
203
  }
147
- if (report.status === 'empty') {
204
+ if (entryCount === 0) {
148
205
  return '--strict: the manifest advertises nothing. Nothing this project declares became an ARD entry.';
149
206
  }
150
207
  return undefined;
151
208
  }
152
209
  /** The human rendering: findings on stderr, the one summary line on stdout. */
153
210
  function writeArdEmitText(report) {
154
- for (const item of report.skipped) {
155
- process.stderr.write(`skipped ${item.kind} "${item.name}": ${item.reason}\n`);
156
- }
157
- for (const item of report.shadowed) {
158
- process.stderr.write(`ignored \`ard.entries.${item.shadowedKey}\`: the ${item.kind} "${item.name}" is also named ` +
159
- `by \`ard.entries."${item.winningKey}"\`, and the kind-qualified key wins. Nothing in the ` +
160
- 'bare block was read — fold it into the qualified one or delete it.\n');
211
+ for (const finding of report.findings) {
212
+ process.stderr.write(`${finding.message}\n`);
161
213
  }
162
- process.stdout.write(`Wrote ${report.entryCount} ARD entr${report.entryCount === 1 ? 'y' : 'ies'} to ${report.outputPath}\n`);
214
+ const { entryCount, outputPath } = report.data;
215
+ process.stdout.write(`Wrote ${entryCount} ARD entr${entryCount === 1 ? 'y' : 'ies'} to ${outputPath}\n`);
163
216
  }
164
217
  /** Action handler for `vat ard emit`. */
165
218
  export async function ardEmitCommand(options) {
166
219
  const logger = createLogger(options.debug === true ? { debug: true } : {});
167
220
  const startTime = Date.now();
168
221
  try {
169
- const report = buildArdEmitReport(await runArdEmit(options));
222
+ const report = { ...buildArdEmitReport(await runArdEmit(options)), durationMs: Date.now() - startTime };
170
223
  if (options.format === 'json') {
171
224
  // The report carries every skipped and shadowed surface in full, so the
172
225
  // stderr lines would be the same facts twice on two channels.
@@ -178,7 +231,7 @@ export async function ardEmitCommand(options) {
178
231
  const failure = options.strict === true ? strictFailure(report) : undefined;
179
232
  if (failure !== undefined) {
180
233
  process.stderr.write(`${failure}\n`);
181
- process.exit(1);
234
+ process.exit(ExitCode.FINDINGS);
182
235
  }
183
236
  }
184
237
  catch (error) {
@@ -196,12 +249,12 @@ export async function ardEmitCommand(options) {
196
249
  // repositories which have not opted into ARD keys on exactly that split.
197
250
  //
198
251
  // Exit 2 is also what `vat okf validate` documents for the same conditions,
199
- // and what an invalid config already did here through `handleCommandError`.
252
+ // and what an invalid config already did here through `handleReportCommandError`.
200
253
  // The old split had a missing config file exiting 1 and an invalid one
201
254
  // exiting 2 while the help called 2 "Unexpected internal failure" — so a CI
202
255
  // job reading 2 as a crash was paged for a typo.
203
256
  //
204
- // ⚠️ Both endings publish their document through `handleExpectedFailure`,
257
+ // ⚠️ Both endings publish their document through `handleReportExpectedFailure`,
205
258
  // in the format the operator asked for. Written inline they published
206
259
  // NOTHING — a `--format json` run of the commonest case of all, a
207
260
  // repository that never opted into ARD, wrote zero bytes to stdout and left
@@ -212,12 +265,12 @@ export async function ardEmitCommand(options) {
212
265
  // and the run records a second exit — the same reason the inline endings
213
266
  // this replaced each carried a `return`.
214
267
  if (error instanceof ArdConfigMissingError) {
215
- return handleExpectedFailure(error.message, error.absence === 'no-ard-block' ? 1 : 2, startTime, options.format);
268
+ return handleReportExpectedFailure(error.message, error.absence === 'no-ard-block' ? ExitCode.FINDINGS : ExitCode.ERROR, startTime, options.format);
216
269
  }
217
270
  if (error instanceof ArdDerivationError) {
218
- return handleExpectedFailure(error.message, 1, startTime, options.format);
271
+ return handleReportExpectedFailure(error.message, ExitCode.FINDINGS, startTime, options.format);
219
272
  }
220
- handleCommandError(error, logger, startTime, 'ARD emit', options.format);
273
+ handleReportCommandError(error, logger, startTime, 'ARD emit', options.format);
221
274
  }
222
275
  }
223
276
  //# sourceMappingURL=emit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"emit.js","sourceRoot":"","sources":["../../../src/commands/ard/emit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,GAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAA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,OAAO,CAAC,MAAM,CAAC,CAAC;IACjF,CAAC;AACH,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * owned elsewhere, and this file only builds the command.
6
6
  */
7
7
  import { Command } from 'commander';
8
- export { ardEmitCommand, buildArdEmitReport, runArdEmit, ArdConfigMissingError, DEFAULT_ARD_OUTPUT, type ArdEmitReport, type ArdEmitStatus, } from './emit.js';
8
+ export { ardEmitCommand, buildArdEmitReport, runArdEmit, ArdConfigMissingError, DEFAULT_ARD_OUTPUT, type ArdEmitReport, } from './emit.js';
9
9
  export { collectArdSurfaces, type ArdSurfaceCollection, type SkippedArdSurface } from './surfaces.js';
10
10
  /** Build the `vat ard` command group. */
11
11
  export declare function createArdCommand(): Command;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/ard/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEtG,yCAAyC;AACzC,wBAAgB,gBAAgB,IAAI,OAAO,CA+E1C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/ard/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,aAAa,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEtG,yCAAyC;AACzC,wBAAgB,gBAAgB,IAAI,OAAO,CAgF1C"}
@@ -63,9 +63,10 @@ Requirements:
63
63
  Exit Codes:
64
64
  0 - Manifest written — INCLUDING one that advertises nothing. An empty
65
65
  \`entries\` list is a legal ARD document, and skipped surfaces are reported
66
- on stderr at this exit code. Gate on \`--format json\` (\`status\`,
67
- \`entryCount\`, \`skippedCount\`), or make both conditions fail with
68
- \`--strict\`
66
+ on stderr at this exit code. Gate on \`--format json\` (the report
67
+ envelope: \`examined\`, \`findings\`, \`summary\`, \`data.entryCount\`,
68
+ \`data.skippedCount\`; schema: packages/cli/schemas/ard-emit.json), or
69
+ make both conditions fail with \`--strict\`
69
70
  1 - No \`ard:\` block in the config, or a surface could not be derived. Under
70
71
  \`--strict\`, also an empty manifest or a skipped surface
71
72
  2 - System error (no project root, no config file, invalid config, unexpected
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/ard/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,GAGnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,kBAAkB,EAAqD,MAAM,eAAe,CAAC;AAEtG,yCAAyC;AACzC,MAAM,UAAU,gBAAgB;IAC9B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAE/B,GAAG,CAAC,WAAW,CAAC,oEAAoE,CAAC,CAAC,WAAW,CAC/F,OAAO,EACP;;;;;;;CAOH,CACE,CAAC;IAEF,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,6CAA6C,CAAC;SAC1D,MAAM,CAAC,qBAAqB,E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C7E,MAAM,CAAC,sBAAsB,EAAE,qDAAqD,CAAC;SACrF,SAAS;IACR,sEAAsE;IACtE,sEAAsE;IACtE,2DAA2D;IAC3D,IAAI,MAAM,CAAC,mBAAmB,EAAE,uCAAuC,CAAC;SACrE,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SACzB,OAAO,CAAC,MAAM,CAAC,CACnB;SACA,MAAM,CACL,UAAU,EACV,kFAAkF,CACnF;SACA,MAAM,CAAC,SAAS,EAAE,2BAA2B,CAAC;SAC9C,MAAM,CAAC,cAAc,CAAC;SACtB,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCL,CACI,CAAC;IAEJ,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"distributed-tree.d.ts","sourceRoot":"","sources":["../../../src/commands/audit/distributed-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AAGH,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACnG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAOlE,OAAO,EAEL,UAAU,EACX,MAAM,+BAA+B,CAAC;AAKvC;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAShF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBAUtC,CAAC;AAcF,iEAAiE;AACjE,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,aAAa,GA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AAG,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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O,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":["../../../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