@vibe-agent-toolkit/cli 0.1.42 → 0.2.0-rc.10

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 (504) hide show
  1. package/README.md +4 -5
  2. package/dist/bin/vat +95 -28
  3. package/dist/bin/vat.js +95 -28
  4. package/dist/bin/vat.js.map +1 -1
  5. package/dist/bin.js +137 -76
  6. package/dist/bin.js.map +1 -1
  7. package/dist/command-loaders.d.ts +44 -0
  8. package/dist/command-loaders.d.ts.map +1 -0
  9. package/dist/command-loaders.js +60 -0
  10. package/dist/command-loaders.js.map +1 -0
  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/index.js +1 -1
  18. package/dist/commands/agent/install-path.d.ts +36 -0
  19. package/dist/commands/agent/install-path.d.ts.map +1 -0
  20. package/dist/commands/agent/install-path.js +44 -0
  21. package/dist/commands/agent/install-path.js.map +1 -0
  22. package/dist/commands/agent/install.d.ts.map +1 -1
  23. package/dist/commands/agent/install.js +66 -13
  24. package/dist/commands/agent/install.js.map +1 -1
  25. package/dist/commands/agent/installed.d.ts.map +1 -1
  26. package/dist/commands/agent/installed.js +22 -12
  27. package/dist/commands/agent/installed.js.map +1 -1
  28. package/dist/commands/agent/list.d.ts.map +1 -1
  29. package/dist/commands/agent/list.js +2 -1
  30. package/dist/commands/agent/list.js.map +1 -1
  31. package/dist/commands/agent/run.d.ts.map +1 -1
  32. package/dist/commands/agent/run.js +2 -1
  33. package/dist/commands/agent/run.js.map +1 -1
  34. package/dist/commands/agent/uninstall.d.ts.map +1 -1
  35. package/dist/commands/agent/uninstall.js +13 -6
  36. package/dist/commands/agent/uninstall.js.map +1 -1
  37. package/dist/commands/agent/validate.d.ts.map +1 -1
  38. package/dist/commands/agent/validate.js +3 -2
  39. package/dist/commands/agent/validate.js.map +1 -1
  40. package/dist/commands/ard/emit.d.ts +153 -0
  41. package/dist/commands/ard/emit.d.ts.map +1 -0
  42. package/dist/commands/ard/emit.js +276 -0
  43. package/dist/commands/ard/emit.js.map +1 -0
  44. package/dist/commands/ard/index.d.ts +12 -0
  45. package/dist/commands/ard/index.d.ts.map +1 -0
  46. package/dist/commands/ard/index.js +80 -0
  47. package/dist/commands/ard/index.js.map +1 -0
  48. package/dist/commands/ard/surfaces.d.ts +56 -0
  49. package/dist/commands/ard/surfaces.d.ts.map +1 -0
  50. package/dist/commands/ard/surfaces.js +150 -0
  51. package/dist/commands/ard/surfaces.js.map +1 -0
  52. package/dist/commands/audit/distributed-tree.d.ts +60 -2
  53. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  54. package/dist/commands/audit/distributed-tree.js +73 -1
  55. package/dist/commands/audit/distributed-tree.js.map +1 -1
  56. package/dist/commands/audit/git-url-clone.d.ts +1 -1
  57. package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
  58. package/dist/commands/audit/git-url-clone.js.map +1 -1
  59. package/dist/commands/audit/hierarchical-output.d.ts +1 -1
  60. package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
  61. package/dist/commands/audit/hierarchical-output.js +1 -1
  62. package/dist/commands/audit/hierarchical-output.js.map +1 -1
  63. package/dist/commands/audit/provenance.d.ts.map +1 -1
  64. package/dist/commands/audit/provenance.js +4 -3
  65. package/dist/commands/audit/provenance.js.map +1 -1
  66. package/dist/commands/audit/scan-population.d.ts +158 -0
  67. package/dist/commands/audit/scan-population.d.ts.map +1 -0
  68. package/dist/commands/audit/scan-population.js +292 -0
  69. package/dist/commands/audit/scan-population.js.map +1 -0
  70. package/dist/commands/audit-settings.d.ts.map +1 -1
  71. package/dist/commands/audit-settings.js +6 -5
  72. package/dist/commands/audit-settings.js.map +1 -1
  73. package/dist/commands/audit.d.ts +98 -8
  74. package/dist/commands/audit.d.ts.map +1 -1
  75. package/dist/commands/audit.js +1133 -395
  76. package/dist/commands/audit.js.map +1 -1
  77. package/dist/commands/build.d.ts +1 -1
  78. package/dist/commands/build.d.ts.map +1 -1
  79. package/dist/commands/build.js +40 -36
  80. package/dist/commands/build.js.map +1 -1
  81. package/dist/commands/cache/cache-control.d.ts +82 -0
  82. package/dist/commands/cache/cache-control.d.ts.map +1 -0
  83. package/dist/commands/cache/cache-control.js +86 -0
  84. package/dist/commands/cache/cache-control.js.map +1 -0
  85. package/dist/commands/cache/clear.d.ts +105 -0
  86. package/dist/commands/cache/clear.d.ts.map +1 -0
  87. package/dist/commands/cache/clear.js +248 -0
  88. package/dist/commands/cache/clear.js.map +1 -0
  89. package/dist/commands/cache/index.d.ts +18 -0
  90. package/dist/commands/cache/index.d.ts.map +1 -0
  91. package/dist/commands/cache/index.js +94 -0
  92. package/dist/commands/cache/index.js.map +1 -0
  93. package/dist/commands/claude/claude-config.d.ts.map +1 -1
  94. package/dist/commands/claude/claude-config.js +6 -0
  95. package/dist/commands/claude/claude-config.js.map +1 -1
  96. package/dist/commands/claude/context.d.ts +340 -0
  97. package/dist/commands/claude/context.d.ts.map +1 -0
  98. package/dist/commands/claude/context.js +1080 -0
  99. package/dist/commands/claude/context.js.map +1 -0
  100. package/dist/commands/claude/index.d.ts +14 -0
  101. package/dist/commands/claude/index.d.ts.map +1 -1
  102. package/dist/commands/claude/index.js +22 -2
  103. package/dist/commands/claude/index.js.map +1 -1
  104. package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
  105. package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
  106. package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
  107. package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
  108. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  109. package/dist/commands/claude/marketplace/git-publish.js +40 -31
  110. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  111. package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
  112. package/dist/commands/claude/marketplace/license-utils.js +0 -1
  113. package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
  114. package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
  115. package/dist/commands/claude/marketplace/publish-tree.js +0 -6
  116. package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
  117. package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
  118. package/dist/commands/claude/marketplace/publish.js +2 -1
  119. package/dist/commands/claude/marketplace/publish.js.map +1 -1
  120. package/dist/commands/claude/marketplace/validate.d.ts +73 -22
  121. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  122. package/dist/commands/claude/marketplace/validate.js +407 -72
  123. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  124. package/dist/commands/claude/org/api-keys.d.ts +0 -3
  125. package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
  126. package/dist/commands/claude/org/api-keys.js +2 -1
  127. package/dist/commands/claude/org/api-keys.js.map +1 -1
  128. package/dist/commands/claude/org/helpers.d.ts +54 -1
  129. package/dist/commands/claude/org/helpers.d.ts.map +1 -1
  130. package/dist/commands/claude/org/helpers.js +42 -7
  131. package/dist/commands/claude/org/helpers.js.map +1 -1
  132. package/dist/commands/claude/org/index.d.ts.map +1 -1
  133. package/dist/commands/claude/org/index.js +24 -16
  134. package/dist/commands/claude/org/index.js.map +1 -1
  135. package/dist/commands/claude/org/invites.d.ts +0 -3
  136. package/dist/commands/claude/org/invites.d.ts.map +1 -1
  137. package/dist/commands/claude/org/invites.js +3 -2
  138. package/dist/commands/claude/org/invites.js.map +1 -1
  139. package/dist/commands/claude/org/skills.d.ts +527 -0
  140. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  141. package/dist/commands/claude/org/skills.js +1414 -108
  142. package/dist/commands/claude/org/skills.js.map +1 -1
  143. package/dist/commands/claude/org/users.d.ts +0 -3
  144. package/dist/commands/claude/org/users.d.ts.map +1 -1
  145. package/dist/commands/claude/org/users.js +6 -3
  146. package/dist/commands/claude/org/users.js.map +1 -1
  147. package/dist/commands/claude/org/workspaces.d.ts +0 -3
  148. package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
  149. package/dist/commands/claude/org/workspaces.js +11 -7
  150. package/dist/commands/claude/org/workspaces.js.map +1 -1
  151. package/dist/commands/claude/plugin/build.d.ts +41 -3
  152. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  153. package/dist/commands/claude/plugin/build.js +147 -80
  154. package/dist/commands/claude/plugin/build.js.map +1 -1
  155. package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
  156. package/dist/commands/claude/plugin/helpers.js +2 -7
  157. package/dist/commands/claude/plugin/helpers.js.map +1 -1
  158. package/dist/commands/claude/plugin/install.d.ts +12 -0
  159. package/dist/commands/claude/plugin/install.d.ts.map +1 -1
  160. package/dist/commands/claude/plugin/install.js +93 -62
  161. package/dist/commands/claude/plugin/install.js.map +1 -1
  162. package/dist/commands/claude/plugin/list.d.ts.map +1 -1
  163. package/dist/commands/claude/plugin/list.js +3 -2
  164. package/dist/commands/claude/plugin/list.js.map +1 -1
  165. package/dist/commands/claude/plugin/marketplace-json.d.ts +24 -9
  166. package/dist/commands/claude/plugin/marketplace-json.d.ts.map +1 -1
  167. package/dist/commands/claude/plugin/marketplace-json.js +10 -9
  168. package/dist/commands/claude/plugin/marketplace-json.js.map +1 -1
  169. package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
  170. package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
  171. package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
  172. package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
  173. package/dist/commands/claude/plugin/plugin-files.js +3 -6
  174. package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
  175. package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
  176. package/dist/commands/claude/plugin/plugin-validators.js +3 -6
  177. package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
  178. package/dist/commands/claude/plugin/tree-copy.d.ts +73 -0
  179. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  180. package/dist/commands/claude/plugin/tree-copy.js +221 -14
  181. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  182. package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
  183. package/dist/commands/claude/plugin/uninstall.js +4 -4
  184. package/dist/commands/claude/plugin/uninstall.js.map +1 -1
  185. package/dist/commands/consistency-check.d.ts +17 -15
  186. package/dist/commands/consistency-check.d.ts.map +1 -1
  187. package/dist/commands/consistency-check.js +152 -106
  188. package/dist/commands/consistency-check.js.map +1 -1
  189. package/dist/commands/corpus/index.d.ts.map +1 -1
  190. package/dist/commands/corpus/index.js +3 -0
  191. package/dist/commands/corpus/index.js.map +1 -1
  192. package/dist/commands/corpus/report.d.ts +1 -2
  193. package/dist/commands/corpus/report.d.ts.map +1 -1
  194. package/dist/commands/corpus/report.js +1 -3
  195. package/dist/commands/corpus/report.js.map +1 -1
  196. package/dist/commands/corpus/runner.d.ts +58 -1
  197. package/dist/commands/corpus/runner.d.ts.map +1 -1
  198. package/dist/commands/corpus/runner.js +95 -41
  199. package/dist/commands/corpus/runner.js.map +1 -1
  200. package/dist/commands/corpus/scan.d.ts.map +1 -1
  201. package/dist/commands/corpus/scan.js +20 -12
  202. package/dist/commands/corpus/scan.js.map +1 -1
  203. package/dist/commands/corpus/seed.d.ts +4 -4
  204. package/dist/commands/corpus/seed.d.ts.map +1 -1
  205. package/dist/commands/corpus/seed.js +1 -3
  206. package/dist/commands/corpus/seed.js.map +1 -1
  207. package/dist/commands/doctor.d.ts +50 -0
  208. package/dist/commands/doctor.d.ts.map +1 -1
  209. package/dist/commands/doctor.js +245 -52
  210. package/dist/commands/doctor.js.map +1 -1
  211. package/dist/commands/inventory.d.ts +13 -1
  212. package/dist/commands/inventory.d.ts.map +1 -1
  213. package/dist/commands/inventory.js +128 -17
  214. package/dist/commands/inventory.js.map +1 -1
  215. package/dist/commands/mcp/collections.d.ts +1 -1
  216. package/dist/commands/mcp/collections.d.ts.map +1 -1
  217. package/dist/commands/mcp/list-collections.d.ts.map +1 -1
  218. package/dist/commands/mcp/list-collections.js +2 -1
  219. package/dist/commands/mcp/list-collections.js.map +1 -1
  220. package/dist/commands/mcp/serve.d.ts.map +1 -1
  221. package/dist/commands/mcp/serve.js +3 -2
  222. package/dist/commands/mcp/serve.js.map +1 -1
  223. package/dist/commands/okf/index.d.ts +11 -0
  224. package/dist/commands/okf/index.d.ts.map +1 -0
  225. package/dist/commands/okf/index.js +114 -0
  226. package/dist/commands/okf/index.js.map +1 -0
  227. package/dist/commands/okf/validate.d.ts +191 -0
  228. package/dist/commands/okf/validate.d.ts.map +1 -0
  229. package/dist/commands/okf/validate.js +190 -0
  230. package/dist/commands/okf/validate.js.map +1 -0
  231. package/dist/commands/phase-utils.d.ts +182 -114
  232. package/dist/commands/phase-utils.d.ts.map +1 -1
  233. package/dist/commands/phase-utils.js +154 -163
  234. package/dist/commands/phase-utils.js.map +1 -1
  235. package/dist/commands/positional-args.d.ts.map +1 -1
  236. package/dist/commands/positional-args.js +3 -2
  237. package/dist/commands/positional-args.js.map +1 -1
  238. package/dist/commands/rag/clear-command.d.ts.map +1 -1
  239. package/dist/commands/rag/clear-command.js +2 -1
  240. package/dist/commands/rag/clear-command.js.map +1 -1
  241. package/dist/commands/rag/index-command.d.ts +64 -0
  242. package/dist/commands/rag/index-command.d.ts.map +1 -1
  243. package/dist/commands/rag/index-command.js +72 -6
  244. package/dist/commands/rag/index-command.js.map +1 -1
  245. package/dist/commands/rag/index.d.ts.map +1 -1
  246. package/dist/commands/rag/index.js +23 -10
  247. package/dist/commands/rag/index.js.map +1 -1
  248. package/dist/commands/rag/query-command.d.ts.map +1 -1
  249. package/dist/commands/rag/query-command.js +2 -1
  250. package/dist/commands/rag/query-command.js.map +1 -1
  251. package/dist/commands/rag/stats-command.d.ts.map +1 -1
  252. package/dist/commands/rag/stats-command.js +2 -1
  253. package/dist/commands/rag/stats-command.js.map +1 -1
  254. package/dist/commands/resources/builtin-help.d.ts +27 -0
  255. package/dist/commands/resources/builtin-help.d.ts.map +1 -0
  256. package/dist/commands/resources/builtin-help.js +46 -0
  257. package/dist/commands/resources/builtin-help.js.map +1 -0
  258. package/dist/commands/resources/check-progress.d.ts +154 -0
  259. package/dist/commands/resources/check-progress.d.ts.map +1 -0
  260. package/dist/commands/resources/check-progress.js +222 -0
  261. package/dist/commands/resources/check-progress.js.map +1 -0
  262. package/dist/commands/resources/check-supervisor.d.ts +465 -0
  263. package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
  264. package/dist/commands/resources/check-supervisor.js +573 -0
  265. package/dist/commands/resources/check-supervisor.js.map +1 -0
  266. package/dist/commands/resources/check.d.ts +593 -0
  267. package/dist/commands/resources/check.d.ts.map +1 -0
  268. package/dist/commands/resources/check.js +1365 -0
  269. package/dist/commands/resources/check.js.map +1 -0
  270. package/dist/commands/resources/index.d.ts.map +1 -1
  271. package/dist/commands/resources/index.js +425 -6
  272. package/dist/commands/resources/index.js.map +1 -1
  273. package/dist/commands/resources/query.d.ts +106 -0
  274. package/dist/commands/resources/query.d.ts.map +1 -0
  275. package/dist/commands/resources/query.js +177 -0
  276. package/dist/commands/resources/query.js.map +1 -0
  277. package/dist/commands/resources/scan.d.ts +24 -0
  278. package/dist/commands/resources/scan.d.ts.map +1 -1
  279. package/dist/commands/resources/scan.js +17 -8
  280. package/dist/commands/resources/scan.js.map +1 -1
  281. package/dist/commands/resources/validate.d.ts +57 -4
  282. package/dist/commands/resources/validate.d.ts.map +1 -1
  283. package/dist/commands/resources/validate.js +224 -56
  284. package/dist/commands/resources/validate.js.map +1 -1
  285. package/dist/commands/skill/review-checklist.d.ts +3 -2
  286. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  287. package/dist/commands/skill/review-checklist.js +40 -2
  288. package/dist/commands/skill/review-checklist.js.map +1 -1
  289. package/dist/commands/skill/review.d.ts +247 -0
  290. package/dist/commands/skill/review.d.ts.map +1 -1
  291. package/dist/commands/skill/review.js +99 -62
  292. package/dist/commands/skill/review.js.map +1 -1
  293. package/dist/commands/skill/test/configure.d.ts +56 -0
  294. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  295. package/dist/commands/skill/test/configure.js +75 -16
  296. package/dist/commands/skill/test/configure.js.map +1 -1
  297. package/dist/commands/skill/test/run.d.ts +63 -10
  298. package/dist/commands/skill/test/run.d.ts.map +1 -1
  299. package/dist/commands/skill/test/run.js +258 -77
  300. package/dist/commands/skill/test/run.js.map +1 -1
  301. package/dist/commands/skills/build.d.ts +94 -4
  302. package/dist/commands/skills/build.d.ts.map +1 -1
  303. package/dist/commands/skills/build.js +325 -97
  304. package/dist/commands/skills/build.js.map +1 -1
  305. package/dist/commands/skills/install.d.ts +2 -1
  306. package/dist/commands/skills/install.d.ts.map +1 -1
  307. package/dist/commands/skills/install.js +20 -31
  308. package/dist/commands/skills/install.js.map +1 -1
  309. package/dist/commands/skills/list.d.ts +2 -1
  310. package/dist/commands/skills/list.d.ts.map +1 -1
  311. package/dist/commands/skills/list.js +44 -26
  312. package/dist/commands/skills/list.js.map +1 -1
  313. package/dist/commands/skills/package.d.ts +24 -3
  314. package/dist/commands/skills/package.d.ts.map +1 -1
  315. package/dist/commands/skills/package.js +42 -17
  316. package/dist/commands/skills/package.js.map +1 -1
  317. package/dist/commands/skills/scope-guard.d.ts.map +1 -1
  318. package/dist/commands/skills/scope-guard.js +3 -5
  319. package/dist/commands/skills/scope-guard.js.map +1 -1
  320. package/dist/commands/skills/shared.d.ts.map +1 -1
  321. package/dist/commands/skills/shared.js +2 -4
  322. package/dist/commands/skills/shared.js.map +1 -1
  323. package/dist/commands/skills/skill-discovery.d.ts +47 -6
  324. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  325. package/dist/commands/skills/skill-discovery.js +66 -16
  326. package/dist/commands/skills/skill-discovery.js.map +1 -1
  327. package/dist/commands/skills/source-resolvers.d.ts +15 -0
  328. package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
  329. package/dist/commands/skills/source-resolvers.js +25 -4
  330. package/dist/commands/skills/source-resolvers.js.map +1 -1
  331. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  332. package/dist/commands/skills/validate-command.js +11 -3
  333. package/dist/commands/skills/validate-command.js.map +1 -1
  334. package/dist/commands/skills/validate.d.ts +140 -4
  335. package/dist/commands/skills/validate.d.ts.map +1 -1
  336. package/dist/commands/skills/validate.js +224 -67
  337. package/dist/commands/skills/validate.js.map +1 -1
  338. package/dist/commands/validate.d.ts +1 -1
  339. package/dist/commands/validate.d.ts.map +1 -1
  340. package/dist/commands/validate.js +63 -27
  341. package/dist/commands/validate.js.map +1 -1
  342. package/dist/commands/verify.d.ts +119 -15
  343. package/dist/commands/verify.d.ts.map +1 -1
  344. package/dist/commands/verify.js +357 -142
  345. package/dist/commands/verify.js.map +1 -1
  346. package/dist/index.d.ts +0 -1
  347. package/dist/index.d.ts.map +1 -1
  348. package/dist/index.js +5 -1
  349. package/dist/index.js.map +1 -1
  350. package/dist/report-schemas.d.ts +45 -0
  351. package/dist/report-schemas.d.ts.map +1 -0
  352. package/dist/report-schemas.js +100 -0
  353. package/dist/report-schemas.js.map +1 -0
  354. package/dist/skill-resolution/classify.js +2 -2
  355. package/dist/skill-resolution/classify.js.map +1 -1
  356. package/dist/skill-resolution/packaging-config.d.ts +49 -5
  357. package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
  358. package/dist/skill-resolution/packaging-config.js +59 -19
  359. package/dist/skill-resolution/packaging-config.js.map +1 -1
  360. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
  361. package/dist/skill-resolution/resolve-skill-reference.js +55 -57
  362. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
  363. package/dist/utils/agent-discovery.d.ts.map +1 -1
  364. package/dist/utils/agent-discovery.js +22 -11
  365. package/dist/utils/agent-discovery.js.map +1 -1
  366. package/dist/utils/agent-runner.d.ts.map +1 -1
  367. package/dist/utils/agent-runner.js +7 -4
  368. package/dist/utils/agent-runner.js.map +1 -1
  369. package/dist/utils/claude-context-lens.d.ts +34 -0
  370. package/dist/utils/claude-context-lens.d.ts.map +1 -0
  371. package/dist/utils/claude-context-lens.js +39 -0
  372. package/dist/utils/claude-context-lens.js.map +1 -0
  373. package/dist/utils/command-error.d.ts +144 -7
  374. package/dist/utils/command-error.d.ts.map +1 -1
  375. package/dist/utils/command-error.js +179 -16
  376. package/dist/utils/command-error.js.map +1 -1
  377. package/dist/utils/config-loader.d.ts +2 -1
  378. package/dist/utils/config-loader.d.ts.map +1 -1
  379. package/dist/utils/config-loader.js +40 -14
  380. package/dist/utils/config-loader.js.map +1 -1
  381. package/dist/utils/corpus-target.d.ts +26 -0
  382. package/dist/utils/corpus-target.d.ts.map +1 -0
  383. package/dist/utils/corpus-target.js +35 -0
  384. package/dist/utils/corpus-target.js.map +1 -0
  385. package/dist/utils/edge-lens-evaluation.d.ts +83 -0
  386. package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
  387. package/dist/utils/edge-lens-evaluation.js +110 -0
  388. package/dist/utils/edge-lens-evaluation.js.map +1 -0
  389. package/dist/utils/help-loader.d.ts.map +1 -1
  390. package/dist/utils/help-loader.js +0 -1
  391. package/dist/utils/help-loader.js.map +1 -1
  392. package/dist/utils/issue-anchor.d.ts +2 -2
  393. package/dist/utils/issue-anchor.d.ts.map +1 -1
  394. package/dist/utils/issue-anchor.js +1 -1
  395. package/dist/utils/issue-rendering.d.ts +3 -3
  396. package/dist/utils/issue-rendering.d.ts.map +1 -1
  397. package/dist/utils/issue-rendering.js +3 -3
  398. package/dist/utils/issue-rendering.js.map +1 -1
  399. package/dist/utils/issue-severity.d.ts +12 -5
  400. package/dist/utils/issue-severity.d.ts.map +1 -1
  401. package/dist/utils/issue-severity.js +1 -1
  402. package/dist/utils/issue-severity.js.map +1 -1
  403. package/dist/utils/optional-backend.d.ts +78 -0
  404. package/dist/utils/optional-backend.d.ts.map +1 -0
  405. package/dist/utils/optional-backend.js +117 -0
  406. package/dist/utils/optional-backend.js.map +1 -0
  407. package/dist/utils/output.d.ts +26 -0
  408. package/dist/utils/output.d.ts.map +1 -1
  409. package/dist/utils/output.js +35 -0
  410. package/dist/utils/output.js.map +1 -1
  411. package/dist/utils/package-json.d.ts +24 -0
  412. package/dist/utils/package-json.d.ts.map +1 -0
  413. package/dist/utils/package-json.js +49 -0
  414. package/dist/utils/package-json.js.map +1 -0
  415. package/dist/utils/population-wiring.d.ts +100 -0
  416. package/dist/utils/population-wiring.d.ts.map +1 -0
  417. package/dist/utils/population-wiring.js +98 -0
  418. package/dist/utils/population-wiring.js.map +1 -0
  419. package/dist/utils/project-root-policy.d.ts +20 -0
  420. package/dist/utils/project-root-policy.d.ts.map +1 -1
  421. package/dist/utils/project-root-policy.js +30 -0
  422. package/dist/utils/project-root-policy.js.map +1 -1
  423. package/dist/utils/projection-lenses.d.ts +98 -0
  424. package/dist/utils/projection-lenses.d.ts.map +1 -0
  425. package/dist/utils/projection-lenses.js +203 -0
  426. package/dist/utils/projection-lenses.js.map +1 -0
  427. package/dist/utils/projection-query.d.ts +324 -0
  428. package/dist/utils/projection-query.d.ts.map +1 -0
  429. package/dist/utils/projection-query.js +357 -0
  430. package/dist/utils/projection-query.js.map +1 -0
  431. package/dist/utils/projection-store.d.ts +335 -0
  432. package/dist/utils/projection-store.d.ts.map +1 -0
  433. package/dist/utils/projection-store.js +522 -0
  434. package/dist/utils/projection-store.js.map +1 -0
  435. package/dist/utils/relation-limits.d.ts +50 -0
  436. package/dist/utils/relation-limits.d.ts.map +1 -0
  437. package/dist/utils/relation-limits.js +50 -0
  438. package/dist/utils/relation-limits.js.map +1 -0
  439. package/dist/utils/repeatable-option.d.ts +37 -0
  440. package/dist/utils/repeatable-option.d.ts.map +1 -0
  441. package/dist/utils/repeatable-option.js +39 -0
  442. package/dist/utils/repeatable-option.js.map +1 -0
  443. package/dist/utils/resource-loader.d.ts +132 -2
  444. package/dist/utils/resource-loader.d.ts.map +1 -1
  445. package/dist/utils/resource-loader.js +288 -27
  446. package/dist/utils/resource-loader.js.map +1 -1
  447. package/dist/utils/root-argv.d.ts +53 -0
  448. package/dist/utils/root-argv.d.ts.map +1 -0
  449. package/dist/utils/root-argv.js +215 -0
  450. package/dist/utils/root-argv.js.map +1 -0
  451. package/dist/utils/run-integrity.d.ts +95 -0
  452. package/dist/utils/run-integrity.d.ts.map +1 -0
  453. package/dist/utils/run-integrity.js +102 -0
  454. package/dist/utils/run-integrity.js.map +1 -0
  455. package/dist/utils/skill-discovery.d.ts.map +1 -1
  456. package/dist/utils/skill-discovery.js +2 -1
  457. package/dist/utils/skill-discovery.js.map +1 -1
  458. package/dist/utils/skill-packaging-config.d.ts +63 -1
  459. package/dist/utils/skill-packaging-config.d.ts.map +1 -1
  460. package/dist/utils/skill-packaging-config.js +56 -1
  461. package/dist/utils/skill-packaging-config.js.map +1 -1
  462. package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
  463. package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
  464. package/dist/utils/sqlite-experimental-warning.js +144 -0
  465. package/dist/utils/sqlite-experimental-warning.js.map +1 -0
  466. package/dist/utils/url-redact.d.ts.map +1 -1
  467. package/dist/utils/url-redact.js +4 -6
  468. package/dist/utils/url-redact.js.map +1 -1
  469. package/dist/utils/user-context-scanner.d.ts +8 -0
  470. package/dist/utils/user-context-scanner.d.ts.map +1 -1
  471. package/dist/utils/user-context-scanner.js +4 -2
  472. package/dist/utils/user-context-scanner.js.map +1 -1
  473. package/dist/utils/validate-help-files.d.ts.map +1 -1
  474. package/dist/utils/validate-help-files.js +12 -6
  475. package/dist/utils/validate-help-files.js.map +1 -1
  476. package/dist/utils/vat-bin-path.d.ts +36 -0
  477. package/dist/utils/vat-bin-path.d.ts.map +1 -0
  478. package/dist/utils/vat-bin-path.js +48 -0
  479. package/dist/utils/vat-bin-path.js.map +1 -0
  480. package/dist/utils/verdict-helpers.d.ts +1 -1
  481. package/dist/utils/verdict-helpers.d.ts.map +1 -1
  482. package/dist/utils/verdict-helpers.js +1 -1
  483. package/dist/utils/verdict-helpers.js.map +1 -1
  484. package/dist/version.d.ts.map +1 -1
  485. package/dist/version.js +1 -3
  486. package/dist/version.js.map +1 -1
  487. package/docs/agent.md +2 -2
  488. package/docs/audit.md +141 -37
  489. package/docs/doctor.md +7 -6
  490. package/docs/index.md +40 -12
  491. package/docs/mcp.md +2 -2
  492. package/docs/rag.md +3 -2
  493. package/docs/resources.md +13 -3
  494. package/docs/skill-test.md +10 -9
  495. package/docs/skills.md +53 -69
  496. package/package.json +38 -27
  497. package/schemas/ard-emit.json +149 -0
  498. package/schemas/okf-validate.json +170 -0
  499. package/schemas/resources-check.json +229 -0
  500. package/schemas/skill-review.json +230 -0
  501. package/dist/commands/resources/command-helpers.d.ts +0 -5
  502. package/dist/commands/resources/command-helpers.d.ts.map +0 -1
  503. package/dist/commands/resources/command-helpers.js +0 -6
  504. package/dist/commands/resources/command-helpers.js.map +0 -1
@@ -1,10 +1,14 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { serializeInventory, serializeInventoryShallow, } from '@vibe-agent-toolkit/agent-skills';
3
- import { crawlSkillLinkRegistry, extractClaudeInstallInventory, extractClaudeMarketplaceInventory, extractClaudePluginInventory, extractClaudeSkillInventory, getClaudeUserPaths, } from '@vibe-agent-toolkit/claude-marketplace';
3
+ import { buildInventoryPopulation, crawlSkillLinkRegistry, extractClaudeInstallInventory, extractClaudeMarketplaceInventory, extractClaudePluginInventory, extractClaudeSkillInventory, getClaudeUserPaths, projectionCrawlSelected, } from '@vibe-agent-toolkit/claude-marketplace';
4
+ import { ExitCode } from '@vibe-agent-toolkit/schema';
4
5
  import { findProjectRoot, safePath } from '@vibe-agent-toolkit/utils';
5
6
  import { Command } from 'commander';
6
7
  import { handleCommandError } from '../utils/command-error.js';
7
8
  import { createLogger } from '../utils/logger.js';
9
+ import { populationWiring } from '../utils/population-wiring.js';
10
+ import { withPopulationCache } from '../utils/projection-store.js';
11
+ import { gitTrackerForProjectRoot } from './audit/distributed-tree.js';
8
12
  /**
9
13
  * Create and configure the `vat inventory` command.
10
14
  */
@@ -26,7 +30,6 @@ Description:
26
30
  detectors — pure structural enumeration.
27
31
 
28
32
  Output:
29
- - schema: vat.inventory/v1alpha
30
33
  - kind: marketplace | plugin | skill | install
31
34
  - vendor: claude-code
32
35
  - declared / discovered / references / unexpected (per kind)
@@ -48,21 +51,40 @@ export async function inventoryCommand(pathArg, options) {
48
51
  const logger = createLogger(options.debug === true ? { debug: true } : {});
49
52
  const startTime = Date.now();
50
53
  try {
51
- const inv = await routeInventory(pathArg, options);
54
+ const inv = await routeInventory(pathArg, options, logger);
52
55
  const format = options.format ?? 'yaml';
53
56
  const out = options.shallow === true
54
57
  ? serializeInventoryShallow(inv, format)
55
58
  : serializeInventory(inv, format);
56
59
  process.stdout.write(out);
57
- process.exit(0);
60
+ process.exit(ExitCode.OK);
58
61
  }
59
62
  catch (error) {
60
- handleCommandError(error, logger, startTime, 'Inventory');
63
+ handleCommandError(error, logger, startTime, 'Inventory', options.format);
61
64
  }
62
65
  }
63
- export async function routeInventory(pathArg, options) {
66
+ /**
67
+ * Dispatch to the extractor the subject's shape calls for.
68
+ *
69
+ * @param pathArg - The path argument, or undefined under `--user` / `--system`
70
+ * @param options - The command's flags
71
+ * @param logger - Where diagnostics go. Defaults to a REPORTING logger, never a
72
+ * silent one: the default has to be the loud behaviour, or a caller acquires
73
+ * silence by leaving an argument off — which is the exact defect the blob
74
+ * stage's refusal counts were lost to in the first place
75
+ * @returns The extracted inventory
76
+ */
77
+ export async function routeInventory(pathArg, options, logger = createLogger()) {
64
78
  if (options.user === true) {
65
- return extractClaudeInstallInventory(getClaudeUserPaths());
79
+ // The tracker source is REQUIRED here now, and this is the lane it matters
80
+ // most on: `--user` walks every cached plugin under ~/.claude/plugins/cache,
81
+ // and without it every one of those skills answers its gitignore
82
+ // questions with a `git check-ignore` spawn per link target (which is
83
+ // what happened while the obligation stopped at `extract-plugin.ts`).
84
+ return extractClaudeInstallInventory({
85
+ pathsOrRoot: getClaudeUserPaths(),
86
+ gitTrackerSource: gitTrackerForProjectRoot,
87
+ });
66
88
  }
67
89
  if (options.system === true) {
68
90
  throw new Error('--system inventory is not implemented in this version');
@@ -76,26 +98,115 @@ export async function routeInventory(pathArg, options) {
76
98
  // same root from the same skill path and crawls it exactly once, so handing it a
77
99
  // registry here would only duplicate that derivation — and get it wrong the moment
78
100
  // the two rules drift.
79
- return extractClaudeSkillInventory(absolute);
101
+ //
102
+ // A git-tracker source IS worth handing over even for one skill: the saving is per
103
+ // LINK TARGET, not per skill. One `git ls-files` replaces one `git check-ignore`
104
+ // spawn for every distinct target this skill's link graph reaches. It is also not
105
+ // optional to hand over: the extractor requires a source, so a lane that wanted
106
+ // none would have to say `NO_GIT_TRACKER` out loud.
107
+ return extractClaudeSkillInventory(absolute, { gitTrackerSource: gitTrackerForProjectRoot });
80
108
  }
81
109
  const claudePluginDir = safePath.join(absolute, '.claude-plugin');
82
- // eslint-disable-next-line security/detect-non-literal-fs-filename -- absolute is caller-resolved, used for presence check only
83
110
  const hasMarketplace = existsSync(safePath.join(claudePluginDir, 'marketplace.json'));
84
- // eslint-disable-next-line security/detect-non-literal-fs-filename -- absolute is caller-resolved, used for presence check only
85
111
  const hasPlugin = existsSync(safePath.join(claudePluginDir, 'plugin.json'));
86
112
  // A directory with marketplace.json but no plugin.json is a marketplace root.
87
113
  // When both are present, the plugin extractor takes precedence (plugin is installed,
88
114
  // marketplace.json is a cached metadata artifact alongside it).
89
115
  if (hasMarketplace && !hasPlugin) {
90
- // No shared registry here: `extractClaudeMarketplaceInventory` (like
91
- // `extractClaudeInstallInventory` above) takes no `sharedRegistry` parameter,
92
- // so every plugin it fans out to still re-crawls. Threading one through those
93
- // two extractors is a claude-marketplace change, not a CLI one.
94
- return extractClaudeMarketplaceInventory(absolute);
116
+ // A tracker source but deliberately NO shared registry: that extractor accepts
117
+ // only the former, because a marketplace fans out to plugins that each sit in
118
+ // their own directory, so one registry matches none of their skills' project
119
+ // roots and was measured 1.5x SLOWER than the N+1 crawl. The tracker source is
120
+ // the opposite case — asked per skill about its own root, `undefined` where it
121
+ // cannot serve — so it costs nothing where it does not apply.
122
+ //
123
+ // ⚠ïļ NO shared POPULATION either, and that is the same decision rather than an
124
+ // oversight: a population is rooted, and `membersOf` refuses any root that is not
125
+ // the one the extractor derives per skill. Rooted at the marketplace it would
126
+ // match no skill and answer nothing; rooted per plugin it is not shared. So this
127
+ // subject shape keeps the walk, and **the flip is plugin-directory-only** — as are
128
+ // the `--user` and single-`SKILL.md` lanes above, for the same rootedness reason.
129
+ // Measured on three real marketplace roots (35/51/29 skills): both arms
130
+ // filed only the walker's `crawl` stratum, no `base`/`closure`, so their identical
131
+ // output is the two arms agreeing about ONE lane, not evidence about the flip.
132
+ return extractClaudeMarketplaceInventory(absolute, {
133
+ gitTrackerSource: gitTrackerForProjectRoot,
134
+ });
95
135
  }
96
136
  // Lazy, not eager: the extractor calls this only when it is about to walk its first
97
- // skill, so a plugin of commands/ and agents/ alone crawls nothing.
98
- return extractClaudePluginInventory(absolute, linkRegistryProviderFor(absolute));
137
+ // skill, so a plugin of commands/ and agents/ alone crawls nothing. The tracker source
138
+ // is unconditional — it is asked per skill, about that skill's own root, and answers
139
+ // `undefined` for any root it cannot serve.
140
+ const sharedRegistry = linkRegistryProviderFor(absolute);
141
+ // Root discovery at the CLI boundary, once, and then handed down — both the
142
+ // population provider and the store key are rooted, and deriving the root
143
+ // twice is how two rules drift into disagreeing about which corpus this is.
144
+ const projectRoot = findProjectRoot(absolute);
145
+ // The store scopes the whole extraction, not the provider call: the extractor
146
+ // MEMOIZES `sharedPopulation` and reaches it when it is about to walk its
147
+ // first skill, which is after this frame would otherwise have closed it.
148
+ return withPopulationCache({ root: projectRoot ?? absolute }, async (cache) => {
149
+ const sharedPopulation = populationProviderFor(projectRoot, cache, logger);
150
+ return extractClaudePluginInventory(absolute, {
151
+ ...(sharedRegistry !== undefined && { sharedRegistry }),
152
+ ...(sharedPopulation !== undefined && { sharedPopulation }),
153
+ gitTrackerSource: gitTrackerForProjectRoot,
154
+ });
155
+ });
156
+ }
157
+ /**
158
+ * The projection-backed membership lane — **now the default for this command** —
159
+ * or `undefined` to fall back to the incumbent link walk.
160
+ *
161
+ * Gated on two things, in this order:
162
+ *
163
+ * 1. **Not `VAT_INVENTORY_CRAWL=walker`.** The projection answers this command's
164
+ * membership question unless a caller asks for the walk back. It shipped the
165
+ * other way round, gated off, while it was a second implementation being
166
+ * measured against the first; it is now the implementation, with the walk kept
167
+ * reachable as an escape hatch and as the lab's B arm. ⚠ïļ It is ~5.3× slower on
168
+ * a real adopter and that was a deliberate, accepted trade — see
169
+ * {@link projectionCrawlSelected} for the measurement and for why neither half
170
+ * of the cost can be trimmed without changing the answer.
171
+ * 2. **A discoverable project root**, exactly as {@link linkRegistryProviderFor}
172
+ * requires and for the identical reason: membership is resolved relative to a
173
+ * root, and where `findProjectRoot` finds none the extractor falls back to each
174
+ * skill's OWN directory — so one population rooted at the plugin would answer a
175
+ * different question for every skill. No root, no provider.
176
+ *
177
+ * Root discovery belongs at this CLI boundary; this function takes the root the
178
+ * caller already discovered rather than discovering a second one.
179
+ *
180
+ * The tracker is resolved here too, and its absence is not cosmetic: with no
181
+ * tracker `resource_realizations.gitignored` is `false` on every row, and the
182
+ * declaration correspondingly drops its gitignore refusal rather than claiming a
183
+ * branch that cannot run.
184
+ *
185
+ * @param projectRoot - The discovered project root, or `null` when there is none
186
+ * @param cache - The run's projection store, or `undefined` to re-derive. A
187
+ * SEPARATE selector from the one above: which crawler answers membership and
188
+ * whether the answer is cached are independent choices, and conflating them
189
+ * would make the cache unmeasurable against the lane it is supposed to speed up
190
+ * @param logger - Where the blob stage's refusals are reported. stderr, never
191
+ * stdout: this command's stdout is the YAML document a caller parses, and a
192
+ * diagnostic in the middle of it would break every consumer
193
+ * @returns A population source, or `undefined` to use the walk
194
+ */
195
+ function populationProviderFor(projectRoot, cache, logger) {
196
+ if (!projectionCrawlSelected())
197
+ return undefined;
198
+ if (projectRoot === null)
199
+ return undefined;
200
+ return async (skillMdPaths) => {
201
+ const gitTracker = await gitTrackerForProjectRoot(projectRoot);
202
+ return buildInventoryPopulation({
203
+ root: projectRoot,
204
+ skillMdPaths,
205
+ // The observer this lane went without — see `populationWiring` for why
206
+ // the reporting half is written once rather than per lane.
207
+ ...populationWiring(logger, gitTracker, cache, projectRoot),
208
+ });
209
+ };
99
210
  }
100
211
  /**
101
212
  * A way to obtain the ONE markdown registry every skill under `subjectDir` link-walks
@@ -1 +1 @@
1
- {"version":3,"file":"inventory.js","sourceRoot":"","sources":["../../src/commands/inventory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACN,kBAAkB,EAClB,yBAAyB,GAEzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,sBAAsB,EACtB,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,2BAA2B,EAC3B,kBAAkB,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAUlD;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACrC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO;SACL,WAAW,CAAC,+EAA+E,CAAC;SAC5F,QAAQ,CAAC,QAAQ,EAAE,2CAA2C,CAAC;SAC/D,MAAM,CAAC,QAAQ,EAAE,6DAA6D,CAAC;SAC/E,MAAM,CAAC,UAAU,EAAE,2CAA2C,CAAC;SAC/D,MAA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CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,SAAS,qBAAqB,CAC7B,WAA0B,EAC1B,KAAkC,EAClC,MAAc;IAEd,IAAI,CAAC,uBAAuB,EAAE;QAAE,OAAO,SAAS,CAAC;IACjD,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,EAAE;QAC7B,MAAM,UAAU,GAAG,MAAM,wBAAwB,CAAC,WAAW,CAAC,CAAC;QAC/D,OAAO,wBAAwB,CAAC;YAC/B,IAAI,EAAE,WAAW;YACjB,YAAY;YACZ,uEAAuE;YACvE,2DAA2D;YAC3D,GAAG,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC;SAC3D,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAS,uBAAuB,CAC/B,UAAkB;IAElB,MAAM,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAChD,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC3C,OAAO,GAAG,EAAE,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;AAClD,CAAC"}
@@ -9,7 +9,7 @@
9
9
  * Phase 1: Dynamic loading from npm packages or file paths
10
10
  * Phase 2+: Global discovery registry
11
11
  */
12
- import type { Agent, OneShotAgentOutput } from '@vibe-agent-toolkit/agent-schema';
12
+ import type { Agent, OneShotAgentOutput } from '@vibe-agent-toolkit/schema';
13
13
  export interface AgentRegistration {
14
14
  name: string;
15
15
  agent: Agent<unknown, OneShotAgentOutput<unknown, string>>;
@@ -1 +1 @@
1
- {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/collections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,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AAE,iBAAiB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC9C,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CASvF;AA+HD;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAOhF"}
@@ -1 +1 @@
1
- {"version":3,"file":"list-collections.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/list-collections.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAqCf"}
1
+ {"version":3,"file":"list-collections.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/list-collections.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAqCf"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * MCP list-collections command - lists available agent collections
3
3
  */
4
+ import { ExitCode } from '@vibe-agent-toolkit/schema';
4
5
  import { handleCommandError } from '../../utils/command-error.js';
5
6
  import { createLogger } from '../../utils/logger.js';
6
7
  import { writeYamlOutput } from '../../utils/output.js';
@@ -34,7 +35,7 @@ export async function listCollectionsCommand(options) {
34
35
  logger.info(`Examples:`);
35
36
  logger.info(` vat mcp serve @vibe-agent-toolkit/vat-example-cat-agents`);
36
37
  logger.info(` vat mcp serve ./packages/vat-example-cat-agents # Local development\n`);
37
- process.exit(0);
38
+ process.exit(ExitCode.OK);
38
39
  }
39
40
  catch (error) {
40
41
  handleCommandError(error, logger, startTime, 'MCPListCollections');
@@ -1 +1 @@
1
- {"version":3,"file":"list-collections.js","sourceRoot":"","sources":["../../../src/commands/mcp/list-collections.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAMrD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAA+B;IAE/B,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;QAErC,MAAM,MAAM,GAAG;YACb,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC7B,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,WAAW,EAAE,CAAC,CAAC,WAAW;aAC3B,CAAC,CAAC;YACH,KAAK,EAAE,QAAQ,CAAC,MAAM;YACtB,QAAQ,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,IAAI;SACxC,CAAC;QAEF,eAAe,CAAC,MAAM,CAAC,C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E,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,CAAC,CAAC;IACrE,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/serve.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAmCD;;GAEG;AACH,wBAAsB,YAAY,CAChC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAwDf"}
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/serve.ts"],"names":[],"mappings":"AAAA;;GAEG;AAcH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAmCD;;GAEG;AACH,wBAAsB,YAAY,CAChC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAwDf"}
@@ -2,6 +2,7 @@
2
2
  * MCP serve command - exposes agent collections via MCP stdio transport
3
3
  */
4
4
  import { StdioMCPGateway, ConsoleLogger, NoOpObservabilityProvider, } from '@vibe-agent-toolkit/gateway-mcp';
5
+ import { ExitCode } from '@vibe-agent-toolkit/schema';
5
6
  import { handleCommandError } from '../../utils/command-error.js';
6
7
  import { createLogger } from '../../utils/logger.js';
7
8
  import { resolveCollection } from './collections.js';
@@ -46,7 +47,7 @@ export async function serveCommand(packageOrPath, options) {
46
47
  logger.info('Add this to ~/.claude/config.json:\n');
47
48
  console.log(generateClaudeDesktopConfig(packageOrPath));
48
49
  logger.info('\nThen restart Claude Desktop to load the MCP server.');
49
- process.exit(0);
50
+ process.exit(ExitCode.OK);
50
51
  }
51
52
  // Resolve collection from package name or file path
52
53
  logger.debug(`Resolving MCP collection from: ${packageOrPath}`);
@@ -67,7 +68,7 @@ export async function serveCommand(packageOrPath, options) {
67
68
  // Setup graceful shutdown
68
69
  process.on('SIGINT', () => {
69
70
  logger.info('Shutting down MCP gateway...');
70
- process.exit(0);
71
+ process.exit(ExitCode.OK);
71
72
  });
72
73
  // Wait for stdin to close (stdio server lifetime = stdin lifetime)
73
74
  await new Promise((resolve) => {
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/commands/mcp/serve.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,eAAe,EACf,aAAa,EACb,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOrD;;;GAGG;AACH,MAAM,4BAA6B,SAAQ,yBAAyB;IACjD,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;IAE5C,SAAS;QAChB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;CACF;AAED;;GAEG;AACH,SAAS,2BAA2B,CAAC,aAAqB;IACxD,6DAA6D;IAC7D,MAAM,SAAS,GAAG,aAAa;SAC5B,UAAU,CAAC,sBAAsB,EAAE,MAAM,CAAC;SAC1C,UAAU,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IAEnC,MAAM,MAAM,GAAG;QACb,UAAU,EAAE;YACV,CAAC,SAAS,CAAC,EAAE;gBACX,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,CAAC;aACtC;SACF;KACF,CAAC;IAEF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzC,CAA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;QAC5B,CAAC,CAAC,CAAC;QAEH,mEAAmE;QACnE,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YAClC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBAC3B,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;gBAC9C,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;YACH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBAC7B,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * `vat okf` command group — Open Knowledge Format bundles.
3
+ *
4
+ * One verb today. The group exists rather than a flat `vat okf-validate`
5
+ * because OKF is a format with more than one producer-side question in it (a
6
+ * bundle's index files are generated artifacts, §8), and a group is cheaper to
7
+ * extend than a top-level verb is to deprecate.
8
+ */
9
+ import { Command } from 'commander';
10
+ export declare function createOkfCommand(): Command;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/okf/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,wBAAgB,gBAAgB,IAAI,OAAO,CAmH1C"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * `vat okf` command group — Open Knowledge Format bundles.
3
+ *
4
+ * One verb today. The group exists rather than a flat `vat okf-validate`
5
+ * because OKF is a format with more than one producer-side question in it (a
6
+ * bundle's index files are generated artifacts, §8), and a group is cheaper to
7
+ * extend than a top-level verb is to deprecate.
8
+ */
9
+ import { Command, Option } from 'commander';
10
+ import { okfValidateCommand } from './validate.js';
11
+ export function createOkfCommand() {
12
+ const okf = new Command('okf');
13
+ okf
14
+ .description('Validate the Open Knowledge Format (OKF) bundles this project publishes')
15
+ .helpCommand(false)
16
+ .addHelpText('after', `
17
+ Description:
18
+ An OKF bundle is a directory of markdown concept documents, one per file,
19
+ each carrying YAML frontmatter with a non-empty \`type\`. Bundles are declared
20
+ in vibe-agent-toolkit.config.yaml:
21
+
22
+ okf:
23
+ bundles:
24
+ knowledge:
25
+ root: ./knowledge # required
26
+ severity: error # optional; error is the default
27
+
28
+ The population is defined by the SPECIFICATION, not by a glob: every
29
+ non-reserved .md file anywhere beneath the root is a concept document, and
30
+ only index.md and log.md are reserved. There is deliberately no include or
31
+ exclude — a narrower population would let VAT report a clean bundle while a
32
+ file it never read broke conformance. If a subtree must not be part of a
33
+ bundle, it must not be under the bundle root.
34
+
35
+ Example:
36
+ $ vat okf validate # Every declared bundle
37
+ `);
38
+ okf
39
+ .command('validate')
40
+ .description('Check declared OKF bundles for conformance (§11)')
41
+ .argument('[bundle]', 'Validate only this declared bundle (default: all of them)')
42
+ .addOption(
43
+ // `.choices()`, not a bare `.option()`: an unrecognised value used to fall
44
+ // through to the YAML branch and exit 0, so `--format Json` in a pipeline
45
+ // failed downstream in `jq` instead of here, where the mistake is.
46
+ new Option('--format <format>', 'Output format: yaml (default) or json')
47
+ .choices(['yaml', 'json'])
48
+ .default('yaml'))
49
+ .option('--spec-version <version>', 'Cross-check a bundle-root index.md okf_version against this revision (e.g. 0.2). Omitted, a declaration is reported but not judged.')
50
+ .option('--debug', 'Verbose logging to stderr')
51
+ .action(async function (bundle) {
52
+ await okfValidateCommand(bundle, this.optsWithGlobals());
53
+ })
54
+ .addHelpText('after', `
55
+ Description:
56
+ Checks each declared bundle against the OKF v0.2 conformance items VAT
57
+ implements:
58
+
59
+ §11.1 every non-reserved .md carries a parseable YAML frontmatter block
60
+ §11.2 every one of those blocks carries a non-empty \`type\`
61
+ §6.1 every markdown LINK and IMAGE — the [text](target) form — resolves
62
+ inside the bundle. A leading "/" resolves against the BUNDLE ROOT,
63
+ not the filesystem root, and EVERY path component is judged against
64
+ the bytes on disk, so a link that opens only because the author's
65
+ filesystem folds letter case or Unicode normalization form is
66
+ reported: the bundle is unpacked somewhere that does not fold.
67
+ §2 every .md under the root is a file whose bytes are under the root. A
68
+ symlink out of the bundle, or one pointing at nothing, is reported —
69
+ tar stores a symlink as a symlink, so it arrives dangling.
70
+ §8/§12 an index.md carries no frontmatter, except a bundle-root index.md,
71
+ which may carry okf_version and nothing else
72
+
73
+ NOT covered by the §6.1 check: wikilinks. \`[[other-concept]]\` is invisible to
74
+ the markdown parser, so a bundle written in that style gets no cross-link
75
+ checking at all, and a clean report says nothing about those links.
76
+
77
+ §11.3's structural rules for the BODY of index.md and log.md are not
78
+ implemented, so a clean report means §11.1 and §11.2 in full and §11.3 only
79
+ in part.
80
+
81
+ Unknown \`type\` values and unknown frontmatter keys are legal and are never
82
+ reported: §4.1 has no central registry and forbids rejecting extra keys.
83
+
84
+ The okf_version a bundle-root index.md declares is a CROSS-CHECK, never an
85
+ input. It is reported as data.bundles[].declaredOkfVersion; pass
86
+ --spec-version to have a disagreement reported as a finding.
87
+
88
+ Output (the shared report envelope; schema: packages/cli/schemas/okf-validate.json):
89
+ status: ok | findings | error
90
+ examined: every document opened and judged, across every bundle. Zero with
91
+ a data.notice means nothing was checked: no okf.bundles declared,
92
+ or a declared root that holds no .md at all (a root one level too
93
+ deep reads exactly like this)
94
+ findings: {code, severity, message, location, line?, link?} — location is
95
+ the project-relative path of the document to open
96
+ summary: {errors, warnings, info}; exit 1 iff errors > 0
97
+ data.bundles[]: {bundle, root, conceptDocuments, reservedDocuments,
98
+ declaredOkfVersion?} — root as the config wrote it, never absolute
99
+
100
+ Exit Codes:
101
+ 0 - No error-severity findings
102
+ 1 - At least one error-severity finding. Anything unreadable — the bundle
103
+ root, one subdirectory, or one document — is reported as a finding naming
104
+ exactly what could not be read, so the rest of that bundle and every other
105
+ bundle in the run are still checked and still reported
106
+ 2 - System error (no config file, unknown bundle name)
107
+
108
+ Example:
109
+ $ vat okf validate knowledge --format json
110
+ $ vat okf validate --spec-version 0.2
111
+ `);
112
+ return okf;
113
+ }
114
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/okf/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAA2B,MAAM,eAAe,CAAC;AAE5E,MAAM,UAAU,gBAAgB;IAC9B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAE/B,GAAG;SACA,WAAW,CAAC,yEAAyE,CAAC;SACtF,WAAW,CAAC,KAAK,CAAC;SAClB,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;CAqBL,CACI,CAAC;IAEJ,GAAG;SACA,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,kDAAkD,CAAC;SAC/D,QAAQ,CAAC,UAAU,EAAE,2DAA2D,CAAC;SACjF,SAAS;IACR,2EAA2E;IAC3E,0EAA0E;IAC1E,mEAAmE;IACnE,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,0BAA0B,EAC1B,qIAAqI,CACtI;SACA,MAAM,CAAC,SAAS,EAAE,2BAA2B,CAAC;SAC9C,MAAM,CAAC,KAAK,WAA0B,MAA0B;QAC/D,MAAM,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAwB,CAAC,CAAC;IACjF,CAAC,CAAC;SACD,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDL,CACI,CAAC;IAEJ,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,191 @@
1
+ /**
2
+ * `vat okf validate [bundle]` — conformance for the OKF bundles a project declares.
3
+ *
4
+ * Producer-side, and the exit code says so: OKF §11 tells CONSUMERS not to
5
+ * reject a bundle over broken cross-links or unknown keys, but VAT is tooling
6
+ * for the publisher — the one party who can fix them — so a finding at `error`
7
+ * severity fails the command. An adopter who wants a softer gate lowers
8
+ * `okf.bundles.<name>.severity`; the finding is still reported either way.
9
+ */
10
+ import { type OkfBundleReport } from '@vibe-agent-toolkit/resources';
11
+ import { type Report } from '@vibe-agent-toolkit/schema';
12
+ import { z } from 'zod';
13
+ export interface OkfValidateOptions {
14
+ format?: 'yaml' | 'json';
15
+ specVersion?: string;
16
+ debug?: boolean;
17
+ }
18
+ /** One checked bundle's `data` row: what was read, never the findings (those are the envelope's). */
19
+ export declare const OkfBundleSummarySchema: z.ZodObject<{
20
+ /** The `okf.bundles.<name>` key. */
21
+ bundle: z.ZodString;
22
+ /** The root as the config file wrote it — never the resolved absolute path. */
23
+ root: z.ZodString;
24
+ /** Every non-reserved `.md` beneath the root, bundle-relative and sorted. */
25
+ conceptDocuments: z.ZodArray<z.ZodString, "many">;
26
+ /** Every `index.md` / `log.md` beneath the root, bundle-relative and sorted. */
27
+ reservedDocuments: z.ZodArray<z.ZodString, "many">;
28
+ /** What the root `index.md` declares, when it declares a well-formed one. Reported, never obeyed. */
29
+ declaredOkfVersion: z.ZodOptional<z.ZodString>;
30
+ }, "strict", z.ZodTypeAny, {
31
+ root: string;
32
+ bundle: string;
33
+ conceptDocuments: string[];
34
+ reservedDocuments: string[];
35
+ declaredOkfVersion?: string | undefined;
36
+ }, {
37
+ root: string;
38
+ bundle: string;
39
+ conceptDocuments: string[];
40
+ reservedDocuments: string[];
41
+ declaredOkfVersion?: string | undefined;
42
+ }>;
43
+ export declare const OkfValidateDataSchema: z.ZodObject<{
44
+ bundles: z.ZodArray<z.ZodObject<{
45
+ /** The `okf.bundles.<name>` key. */
46
+ bundle: z.ZodString;
47
+ /** The root as the config file wrote it — never the resolved absolute path. */
48
+ root: z.ZodString;
49
+ /** Every non-reserved `.md` beneath the root, bundle-relative and sorted. */
50
+ conceptDocuments: z.ZodArray<z.ZodString, "many">;
51
+ /** Every `index.md` / `log.md` beneath the root, bundle-relative and sorted. */
52
+ reservedDocuments: z.ZodArray<z.ZodString, "many">;
53
+ /** What the root `index.md` declares, when it declares a well-formed one. Reported, never obeyed. */
54
+ declaredOkfVersion: z.ZodOptional<z.ZodString>;
55
+ }, "strict", z.ZodTypeAny, {
56
+ root: string;
57
+ bundle: string;
58
+ conceptDocuments: string[];
59
+ reservedDocuments: string[];
60
+ declaredOkfVersion?: string | undefined;
61
+ }, {
62
+ root: string;
63
+ bundle: string;
64
+ conceptDocuments: string[];
65
+ reservedDocuments: string[];
66
+ declaredOkfVersion?: string | undefined;
67
+ }>, "many">;
68
+ /**
69
+ * Present only when there was nothing to check, and says what to declare or
70
+ * which root to look at.
71
+ *
72
+ * ðŸŠĪ The command used to print `status: passed`, `bundles: []`, exit 0 when a
73
+ * project declared no `okf.bundles` at all — a report indistinguishable from
74
+ * a bundle read in full and found conformant, so a mistyped key
75
+ * (`okf.bundle:`, `okf.Bundles:`) read as a clean bill of health. The
76
+ * envelope's REQUIRED `examined` now says `0` in that case, and this sentence
77
+ * says why. The exit code stays 0: nothing failed, and failing a build for a
78
+ * feature the project never opted into would be worse.
79
+ */
80
+ notice: z.ZodOptional<z.ZodString>;
81
+ }, "strict", z.ZodTypeAny, {
82
+ bundles: {
83
+ root: string;
84
+ bundle: string;
85
+ conceptDocuments: string[];
86
+ reservedDocuments: string[];
87
+ declaredOkfVersion?: string | undefined;
88
+ }[];
89
+ notice?: string | undefined;
90
+ }, {
91
+ bundles: {
92
+ root: string;
93
+ bundle: string;
94
+ conceptDocuments: string[];
95
+ reservedDocuments: string[];
96
+ declaredOkfVersion?: string | undefined;
97
+ }[];
98
+ notice?: string | undefined;
99
+ }>;
100
+ export type OkfBundleSummary = z.infer<typeof OkfBundleSummarySchema>;
101
+ export type OkfValidateData = z.infer<typeof OkfValidateDataSchema>;
102
+ /** The document this command publishes. */
103
+ export declare const OKF_VALIDATE_REPORT_SCHEMA: import("@vibe-agent-toolkit/schema").ReportZodSchema<z.ZodObject<{
104
+ bundles: z.ZodArray<z.ZodObject<{
105
+ /** The `okf.bundles.<name>` key. */
106
+ bundle: z.ZodString;
107
+ /** The root as the config file wrote it — never the resolved absolute path. */
108
+ root: z.ZodString;
109
+ /** Every non-reserved `.md` beneath the root, bundle-relative and sorted. */
110
+ conceptDocuments: z.ZodArray<z.ZodString, "many">;
111
+ /** Every `index.md` / `log.md` beneath the root, bundle-relative and sorted. */
112
+ reservedDocuments: z.ZodArray<z.ZodString, "many">;
113
+ /** What the root `index.md` declares, when it declares a well-formed one. Reported, never obeyed. */
114
+ declaredOkfVersion: z.ZodOptional<z.ZodString>;
115
+ }, "strict", z.ZodTypeAny, {
116
+ root: string;
117
+ bundle: string;
118
+ conceptDocuments: string[];
119
+ reservedDocuments: string[];
120
+ declaredOkfVersion?: string | undefined;
121
+ }, {
122
+ root: string;
123
+ bundle: string;
124
+ conceptDocuments: string[];
125
+ reservedDocuments: string[];
126
+ declaredOkfVersion?: string | undefined;
127
+ }>, "many">;
128
+ /**
129
+ * Present only when there was nothing to check, and says what to declare or
130
+ * which root to look at.
131
+ *
132
+ * ðŸŠĪ The command used to print `status: passed`, `bundles: []`, exit 0 when a
133
+ * project declared no `okf.bundles` at all — a report indistinguishable from
134
+ * a bundle read in full and found conformant, so a mistyped key
135
+ * (`okf.bundle:`, `okf.Bundles:`) read as a clean bill of health. The
136
+ * envelope's REQUIRED `examined` now says `0` in that case, and this sentence
137
+ * says why. The exit code stays 0: nothing failed, and failing a build for a
138
+ * feature the project never opted into would be worse.
139
+ */
140
+ notice: z.ZodOptional<z.ZodString>;
141
+ }, "strict", z.ZodTypeAny, {
142
+ bundles: {
143
+ root: string;
144
+ bundle: string;
145
+ conceptDocuments: string[];
146
+ reservedDocuments: string[];
147
+ declaredOkfVersion?: string | undefined;
148
+ }[];
149
+ notice?: string | undefined;
150
+ }, {
151
+ bundles: {
152
+ root: string;
153
+ bundle: string;
154
+ conceptDocuments: string[];
155
+ reservedDocuments: string[];
156
+ declaredOkfVersion?: string | undefined;
157
+ }[];
158
+ notice?: string | undefined;
159
+ }>>;
160
+ export type OkfValidateReport = Report<OkfValidateData>;
161
+ /** One bundle's report beside the absolute root it was read from. */
162
+ export interface CheckedOkfBundle {
163
+ readonly report: OkfBundleReport;
164
+ /** The resolved absolute root, so a finding can name a project-relative file. */
165
+ readonly root: string;
166
+ }
167
+ /**
168
+ * Assemble the report for a set of checked bundles. Pure, so the status rule
169
+ * and the denominator are unit-testable.
170
+ *
171
+ * `examined` counts every document that was opened and judged — concept and
172
+ * reserved alike — across every bundle. A declared-but-empty bundle and an
173
+ * empty declaration both examine zero, and the notice tells them apart.
174
+ *
175
+ * @param checked - One report per bundle that was actually checked, with its root
176
+ * @param projectRoot - What every finding's `location` is relative to
177
+ * @returns The report
178
+ */
179
+ export declare function summarizeOkfBundles(checked: readonly CheckedOkfBundle[], projectRoot: string): OkfValidateReport;
180
+ /**
181
+ * Check every selected bundle and assemble the report.
182
+ *
183
+ * Separate from the action so the shape is testable without a process exit.
184
+ *
185
+ * @param bundleArg - A single declared bundle name, or undefined for all of them
186
+ * @param options - Output format and the optional revision to cross-check against
187
+ */
188
+ export declare function okfValidateReport(bundleArg: string | undefined, options: OkfValidateOptions): Promise<OkfValidateReport>;
189
+ /** Action handler for `vat okf validate [bundle]`. */
190
+ export declare function okfValidateCommand(bundleArg: string | undefined, options: OkfValidateOptions): Promise<void>;
191
+ //# sourceMappingURL=validate.d.ts.map