@vibe-agent-toolkit/cli 0.2.0-rc.1 → 0.2.0-rc.11

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 +97 -28
  3. package/dist/bin/vat.js +97 -28
  4. package/dist/bin/vat.js.map +1 -1
  5. package/dist/bin.js +115 -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 +165 -0
  41. package/dist/commands/ard/emit.d.ts.map +1 -0
  42. package/dist/commands/ard/emit.js +338 -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 +84 -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 +2 -2
  53. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  54. package/dist/commands/audit/distributed-tree.js +11 -7
  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 +1150 -394
  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 +34 -6
  86. package/dist/commands/cache/clear.d.ts.map +1 -1
  87. package/dist/commands/cache/clear.js +101 -15
  88. package/dist/commands/cache/clear.js.map +1 -1
  89. package/dist/commands/cache/index.d.ts +13 -63
  90. package/dist/commands/cache/index.d.ts.map +1 -1
  91. package/dist/commands/cache/index.js +47 -79
  92. package/dist/commands/cache/index.js.map +1 -1
  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 +372 -0
  97. package/dist/commands/claude/context.d.ts.map +1 -0
  98. package/dist/commands/claude/context.js +1115 -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 +121 -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 +116 -0
  226. package/dist/commands/okf/index.js.map +1 -0
  227. package/dist/commands/okf/validate.d.ts +195 -0
  228. package/dist/commands/okf/validate.d.ts.map +1 -0
  229. package/dist/commands/okf/validate.js +199 -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 +167 -0
  259. package/dist/commands/resources/check-progress.d.ts.map +1 -0
  260. package/dist/commands/resources/check-progress.js +250 -0
  261. package/dist/commands/resources/check-progress.js.map +1 -0
  262. package/dist/commands/resources/check-supervisor.d.ts +479 -0
  263. package/dist/commands/resources/check-supervisor.d.ts.map +1 -0
  264. package/dist/commands/resources/check-supervisor.js +587 -0
  265. package/dist/commands/resources/check-supervisor.js.map +1 -0
  266. package/dist/commands/resources/check.d.ts +620 -0
  267. package/dist/commands/resources/check.d.ts.map +1 -0
  268. package/dist/commands/resources/check.js +1452 -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 +430 -4
  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 +42 -2
  282. package/dist/commands/resources/validate.d.ts.map +1 -1
  283. package/dist/commands/resources/validate.js +208 -55
  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 +100 -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 +1 -1
  314. package/dist/commands/skills/package.d.ts.map +1 -1
  315. package/dist/commands/skills/package.js +6 -8
  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 +8 -6
  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 +61 -11
  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 +143 -20
  374. package/dist/utils/command-error.d.ts.map +1 -1
  375. package/dist/utils/command-error.js +179 -36
  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 +72 -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 +134 -2
  444. package/dist/utils/resource-loader.d.ts.map +1 -1
  445. package/dist/utils/resource-loader.js +290 -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 +143 -39
  489. package/docs/doctor.md +7 -6
  490. package/docs/index.md +19 -11
  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 +36 -27
  497. package/schemas/ard-emit.json +152 -0
  498. package/schemas/okf-validate.json +170 -0
  499. package/schemas/resources-check.json +257 -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 +1 @@
1
- {"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EACL,wBAAwB,EACxB,gBAAgB,GAIjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEjF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAWhD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAA0B,EAAE,MAAc;IAC9E,IAAI,MAAM,KAAK,EAAE,EAAE,CAAC;QAClB,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,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Q,EAAE,CAAC,SAAS,gBAAgB,CAAC,CAAC;QAE7F,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,WAAW,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YAC7E,YAAY,GAAG,IAAI,CAAC;QACtB,CAAC,EAAE,KAAK,CAAC,CAAC;QACV,MAAM,QAAQ,GAAsB,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC;QAC7E,IAAI,gBAAgB,EAAE,CAAC;YACrB,MAAM,CAAC,KAAK,CAAC,wCAAwC,mBAAmB,IAAI,0BAA0B,GAAG,CAAC,CAAC;YAC3G,YAAY,GAAG,EAAE,GAAG,YAAY,EAAE,gBAAgB,EAAE,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,2EAA2E;YAC3E,uEAAuE;YACvE,2EAA2E;YAC3E,uBAAuB;YACvB,MAAM,CAAC,KAAK,CAAC,uCAAuC,mBAAmB,SAAS,CAAC,CAAC;QACpF,CAAC;QAED,MAAM,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACnC,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,QAAQ,EAAE,OAAO,IAAI,WAAW;QAChC,WAAW;QACX,MAAM;QACN,QAAQ;QACR,UAAU;QACV,IAAI;QACJ,YAAY;KACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The argv grammar `bin.ts` needs BEFORE commander parses anything.
3
+ *
4
+ * Two decisions have to be made from raw argv: which command module to load
5
+ * (only one is, so `vat --version` does not pay for the whole CLI surface), and
6
+ * whether this invocation is one of the four `--verbose` help pages commander
7
+ * cannot render itself. Both must model commander's grammar rather than
8
+ * pattern-match the line, and getting that wrong is silent by construction —
9
+ * every failure mode below ended in a wrong page at exit 0.
10
+ *
11
+ * It lives here and not in `bin.ts` because `bin.ts` is the executable:
12
+ * importing it PARSES ARGV AND RUNS A COMMAND, so nothing there can be unit
13
+ * tested. Same reason `command-loaders.ts` is its own module.
14
+ */
15
+ import type { Option } from 'commander';
16
+ /** The argv questions `bin.ts` asks, bound to what the root program declares. */
17
+ export interface RootArgvGrammar {
18
+ /**
19
+ * The command the user actually asked for, or `undefined` when the whole tree
20
+ * is needed (or nothing is).
21
+ */
22
+ requestedCommand(argv: readonly string[]): string | undefined;
23
+ /** Whether this is `vat <group> --verbose` for the named command group. */
24
+ wantsGroupVerboseHelp(argv: readonly string[], group: string): boolean;
25
+ /** Whether this is a bare `vat --help --verbose`. */
26
+ wantsRootVerboseHelp(argv: readonly string[]): boolean;
27
+ }
28
+ /**
29
+ * Build the grammar from the root program's OWN option declarations.
30
+ *
31
+ * Read off commander's declarations rather than hardcoded, because the blast
32
+ * radius grows with every future root option. Today that is `--version`,
33
+ * `--cwd <dir>`, `--debug` and `--no-cache`; only `--cwd` takes a value.
34
+ *
35
+ * ⚠️ ORDERING MATTERS at the call site: this must be built AFTER
36
+ * `registerCacheControl(program)`, which is what puts `--no-cache` into
37
+ * `program.options`. Built before that call, `--no-cache` would read as
38
+ * unknown and every `vat --no-cache <verb>` would silently give up the lazy
39
+ * load and register the whole tree — a quiet perf regression with no failing
40
+ * test to announce it.
41
+ *
42
+ * Note what is deliberately NOT synthesised here: a `--no-x` twin for boolean
43
+ * options, and a positive `--cache` twin for `--no-cache`. Commander matches an
44
+ * option by exact string (`Option.is()` is `short === arg || long === arg`), so
45
+ * `--no-debug` and `--cache` are UNKNOWN options that end the parse in an
46
+ * error. Accepting them here would re-create the very bug this scan exists to
47
+ * avoid: a token commander rejects, treated by us as an ordinary flag to skip.
48
+ *
49
+ * @param rootOptions - `program.options`, after every root option is registered
50
+ * @returns The grammar, closed over what those options declare
51
+ */
52
+ export declare function createRootArgvGrammar(rootOptions: readonly Option[]): RootArgvGrammar;
53
+ //# sourceMappingURL=root-argv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-argv.d.ts","sourceRoot":"","sources":["../../src/utils/root-argv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AASxC,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;IAC9D,2EAA2E;IAC3E,qBAAqB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACvE,qDAAqD;IACrD,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC;CACxD;AAOD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe,CAyKrF"}
@@ -0,0 +1,215 @@
1
+ /**
2
+ * The argv grammar `bin.ts` needs BEFORE commander parses anything.
3
+ *
4
+ * Two decisions have to be made from raw argv: which command module to load
5
+ * (only one is, so `vat --version` does not pay for the whole CLI surface), and
6
+ * whether this invocation is one of the four `--verbose` help pages commander
7
+ * cannot render itself. Both must model commander's grammar rather than
8
+ * pattern-match the line, and getting that wrong is silent by construction —
9
+ * every failure mode below ended in a wrong page at exit 0.
10
+ *
11
+ * It lives here and not in `bin.ts` because `bin.ts` is the executable:
12
+ * importing it PARSES ARGV AND RUNS A COMMAND, so nothing there can be unit
13
+ * tested. Same reason `command-loaders.ts` is its own module.
14
+ */
15
+ /** How many argv slots a step occupies: a `pair` takes its value with it. */
16
+ function widthOf(step) {
17
+ return step === 'pair' ? 2 : 1;
18
+ }
19
+ /**
20
+ * Build the grammar from the root program's OWN option declarations.
21
+ *
22
+ * Read off commander's declarations rather than hardcoded, because the blast
23
+ * radius grows with every future root option. Today that is `--version`,
24
+ * `--cwd <dir>`, `--debug` and `--no-cache`; only `--cwd` takes a value.
25
+ *
26
+ * ⚠️ ORDERING MATTERS at the call site: this must be built AFTER
27
+ * `registerCacheControl(program)`, which is what puts `--no-cache` into
28
+ * `program.options`. Built before that call, `--no-cache` would read as
29
+ * unknown and every `vat --no-cache <verb>` would silently give up the lazy
30
+ * load and register the whole tree — a quiet perf regression with no failing
31
+ * test to announce it.
32
+ *
33
+ * Note what is deliberately NOT synthesised here: a `--no-x` twin for boolean
34
+ * options, and a positive `--cache` twin for `--no-cache`. Commander matches an
35
+ * option by exact string (`Option.is()` is `short === arg || long === arg`), so
36
+ * `--no-debug` and `--cache` are UNKNOWN options that end the parse in an
37
+ * error. Accepting them here would re-create the very bug this scan exists to
38
+ * avoid: a token commander rejects, treated by us as an ordinary flag to skip.
39
+ *
40
+ * @param rootOptions - `program.options`, after every root option is registered
41
+ * @returns The grammar, closed over what those options declare
42
+ */
43
+ export function createRootArgvGrammar(rootOptions) {
44
+ const declaredRootFlags = new Set(['-h', '--help']);
45
+ const valueTakingRootFlags = new Set();
46
+ const declareRootFlag = (flag, takesValue) => {
47
+ if (!flag)
48
+ return;
49
+ declaredRootFlags.add(flag);
50
+ if (takesValue)
51
+ valueTakingRootFlags.add(flag);
52
+ };
53
+ for (const option of rootOptions) {
54
+ const takesValue = Boolean(option.required || option.optional);
55
+ declareRootFlag(option.short, takesValue);
56
+ declareRootFlag(option.long, takesValue);
57
+ }
58
+ /**
59
+ * Classify an option-shaped token against what this program declares.
60
+ *
61
+ * The `--flag=value` case is not just "strip the suffix": commander only
62
+ * accepts the inline form for a VALUE-TAKING option — its `--foo=bar` branch
63
+ * requires `option.required || option.optional` — so `--debug=1` is an unknown
64
+ * option even though `--debug` is declared.
65
+ *
66
+ * Anything unrecognised is reported as `unknown` rather than guessed at.
67
+ * The cost of being wrong is asymmetric: a false `unknown` only forfeits
68
+ * the lazy-load saving, while a false "declared" ships a wrong help page at
69
+ * exit 0.
70
+ */
71
+ function classifyOptionToken(arg) {
72
+ const equalsIndex = arg.indexOf('=');
73
+ if (equalsIndex !== -1) {
74
+ return valueTakingRootFlags.has(arg.slice(0, equalsIndex)) ? 'flag' : 'unknown';
75
+ }
76
+ if (!declaredRootFlags.has(arg))
77
+ return 'unknown';
78
+ return valueTakingRootFlags.has(arg) ? 'pair' : 'flag';
79
+ }
80
+ /**
81
+ * How the scan steps over one token: an operand, or one of the option kinds.
82
+ *
83
+ * A lone `-` is an OPERAND — commander's `maybeOption` requires
84
+ * `arg.length > 1` — and so is anything not option-shaped. Shared by both
85
+ * scans below so the grammar cannot be modelled on one side of the command
86
+ * name and pattern-matched on the other, which is how `wantsGroupVerboseHelp`
87
+ * shipped.
88
+ */
89
+ function stepOver(arg) {
90
+ return arg.length > 1 && arg.startsWith('-') ? classifyOptionToken(arg) : 'operand';
91
+ }
92
+ /**
93
+ * Where in argv commander will read the command name, or `undefined` when it
94
+ * will not read one.
95
+ *
96
+ * This must model commander's grammar, not just "the first token without a
97
+ * dash". Ways a naive scan got it wrong, all shipped and all verified:
98
+ *
99
+ * - **An option's VALUE is not a verb.** `--cwd <dir>` takes a value that does
100
+ * not start with `-`, so `vat --cwd skills validate` picked `skills`,
101
+ * registered only that, and left `validate` unregistered — while
102
+ * `vat --cwd skills validate --help` printed ROOT help and exited **0**.
103
+ * Only the space-separated form was affected; `--cwd=skills` carries its
104
+ * value inline. The advertised `vat --cwd <dir> build` also lost the entire
105
+ * startup saving, since a non-colliding directory matched no loader key and
106
+ * fell through to loading everything.
107
+ * - **`--help` BEFORE the verb renders ROOT help**, which has to list every
108
+ * command. Loading only the named one made `vat --help audit` print a help
109
+ * page claiming the CLI has exactly one command, and exit 0. `vat audit
110
+ * --help` is the other order and returns on the verb before reaching the
111
+ * flag, so it still loads just `audit`.
112
+ * - **An UNDECLARED option is not a flag to skip over.** `--help` is only the
113
+ * most visible member of that class — it is not in `program.options` either,
114
+ * which is exactly why the bail-out above works. Commander's `parseOptions`
115
+ * switches its destination to `unknown` at the FIRST unrecognised
116
+ * option-shaped token and never switches back, so the verb after it never
117
+ * reaches `operands`; the run ends in `unknownOption()` +
118
+ * `showHelpAfterError()`, i.e. ROOT help. `vat --verbose audit` therefore
119
+ * printed an error page listing exactly one command. Every undeclared option
120
+ * gets the `--help` treatment for that reason.
121
+ * - **A lone `-` is an OPERAND, not an option.** Commander's `maybeOption`
122
+ * requires `arg.length > 1`, so `-` lands in `operands` and reaches the
123
+ * `command:*` handler as an unknown command — which again renders root help.
124
+ * Returning its index hands `-` to the dispatcher, where it matches no
125
+ * loader key and the whole tree loads.
126
+ *
127
+ * `--` is option-shaped by the length test but declared by nobody, so it takes
128
+ * the undeclared bail-out. That is the right answer: commander treats every
129
+ * token after it as an operand, and loading the whole tree is always
130
+ * behaviourally correct — the scan only ever trades away startup time.
131
+ */
132
+ function commandIndex(argv) {
133
+ let index = 0;
134
+ while (index < argv.length) {
135
+ const arg = argv[index] ?? '';
136
+ if (arg === '--help' || arg === '-h')
137
+ return undefined;
138
+ const step = stepOver(arg);
139
+ if (step === 'operand')
140
+ return index;
141
+ if (step === 'unknown')
142
+ return undefined;
143
+ index += widthOf(step);
144
+ }
145
+ return undefined;
146
+ }
147
+ return {
148
+ requestedCommand(argv) {
149
+ const index = commandIndex(argv);
150
+ return index === undefined ? undefined : argv[index];
151
+ },
152
+ /**
153
+ * Whether this is `vat <group> --verbose`, asked by POSITION.
154
+ *
155
+ * 🪤 The three shipped checks asked `process.argv.includes('<group>')
156
+ * && process.argv.includes('--verbose')`, which matches the word anywhere
157
+ * on the line — as another command's subcommand, as a path, as a value:
158
+ *
159
+ * vat inventory resources --verbose → printed RESOURCES' verbose help, exit 0
160
+ * vat resources scan rag --verbose → printed RAG's verbose help, exit 0
161
+ *
162
+ * Neither ran what the user typed and neither said so; the second exited 0
163
+ * having enumerated nothing at all, on a line whose only sin was naming a
164
+ * directory `rag`. So the group has to be the token commander itself would
165
+ * read as the command name — the same question the lazy loader asks — and
166
+ * `--verbose` has to follow it with no subcommand in between.
167
+ *
168
+ * 🪤 "No subcommand in between" is the SAME grammar as `commandIndex`, applied
169
+ * to the tokens after the group. Commander accepts a root option on either
170
+ * side of the command name, so `--cwd`'s value is no more a subcommand after
171
+ * the group than before it — but this branch read `after.some(!startsWith('-'))`,
172
+ * which is the naive scan the rest of this module replaced, and
173
+ * `vat resources --verbose --cwd docs` died on `unknown option '--verbose'`
174
+ * while `vat --cwd docs resources --verbose` printed the page. An undeclared
175
+ * option after the group is likewise commander's to refuse, not ours to skip:
176
+ * `vat resources --verbose --nonsense` printed the page at exit 0 with the
177
+ * typo silently dropped.
178
+ */
179
+ wantsGroupVerboseHelp(argv, group) {
180
+ const index = commandIndex(argv);
181
+ if (index === undefined || argv[index] !== group)
182
+ return false;
183
+ let verbose = false;
184
+ let cursor = index + 1;
185
+ while (cursor < argv.length) {
186
+ const arg = argv[cursor] ?? '';
187
+ if (arg === '--verbose') {
188
+ verbose = true;
189
+ cursor += 1;
190
+ continue;
191
+ }
192
+ // A subcommand of its own is commander's to run, and so is an option
193
+ // nobody declared; only the bare group has no page but the hand-written one.
194
+ const step = stepOver(arg);
195
+ if (step === 'operand' || step === 'unknown')
196
+ return false;
197
+ cursor += widthOf(step);
198
+ }
199
+ return verbose;
200
+ },
201
+ /**
202
+ * Whether this is a bare `vat --help --verbose`.
203
+ *
204
+ * "Bare" is decided the same way, and for the same reason: the shipped
205
+ * check treated any token without a leading dash as a subcommand, so
206
+ * `vat --cwd docs --help --verbose` read `docs` as the command and silently
207
+ * rendered the NON-verbose root page instead.
208
+ */
209
+ wantsRootVerboseHelp(argv) {
210
+ const hasHelp = argv.includes('--help') || argv.includes('-h');
211
+ return hasHelp && argv.includes('--verbose') && commandIndex(argv) === undefined;
212
+ },
213
+ };
214
+ }
215
+ //# sourceMappingURL=root-argv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-argv.js","sourceRoot":"","sources":["../../src/utils/root-argv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwBH,6EAA6E;AAC7E,SAAS,OAAO,CAAC,IAAqB;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AK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK;gBAAE,OAAO,KAAK,CAAC;YAC/D,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,IAAI,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC;YACvB,OAAO,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC/B,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;oBACxB,OAAO,GAAG,IAAI,CAAC;oBACf,MAAM,IAAI,CAAC,CAAC;oBACZ,SAAS;gBACX,CAAC;gBACD,qEAAqE;gBACrE,6EAA6E;gBAC7E,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;gBAC3B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS;oBAAE,OAAO,KAAK,CAAC;gBAC3D,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QAED;;;;;;;WAOG;QACH,oBAAoB,CAAC,IAAI;YACvB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/D,OAAO,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;QACnF,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * The run-integrity refusal: ONE mechanism for every gate that must never
3
+ * answer `success` after checking nothing.
4
+ *
5
+ * ## The class this closes
6
+ *
7
+ * A gate that checked nothing produces the same document as a gate that was
8
+ * removed. `vat resources check` shipped it (no `checks:` block → `status:
9
+ * success`, exit 0), then `vat claude budget` (a path matching no working
10
+ * location), then the repo's own audit quality gate (a green path over zero
11
+ * parsed findings), then `vat resources validate` (a `--collection` matching
12
+ * nothing → `filesScanned: 0`, exit 0), `vat claude marketplace validate` (no
13
+ * `plugins/` to walk, no count published), `vat corpus scan` (an empty tree
14
+ * "audits cleanly"), `vat verify`'s `packaged-content` phase (a typo'd glob
15
+ * discovers no bundle and the phase reports `success`), then `vat skills
16
+ * validate` (the same typo'd glob: one info line, no document, exit 0 — and
17
+ * `vat validate` folded that into `success`) and `vat audit` (an existing tree
18
+ * with nothing auditable: `status: success` over `filesScanned: 0`). Nine
19
+ * instances of one shape, and each was first fixed by hand at its own site.
20
+ * This module is where that hand-fixing stops: every site derives its refusal
21
+ * through the same three functions, so the invariants below are properties of
22
+ * the mechanism rather than of each author's memory.
23
+ *
24
+ * ## The invariants
25
+ *
26
+ * 1. **Code {@link RUN_INTEGRITY_CODE} — `RESOURCE_CHECK_BROKEN` — and never a
27
+ * sibling per site.** It is the registry's one run-integrity claim — *these
28
+ * assertions did not execute meaningfully, so the green means nothing* — and
29
+ * `ValidationConfigSchema` refuses it as a `severity` key, which is what makes
30
+ * it non-overridable by construction. A code per site would buy a consumer
31
+ * nothing the message does not already say while adding one more thing an
32
+ * adopter's CI has to know to look for.
33
+ * 2. **Severity `error`, and not a parameter.** The one thing that must never be
34
+ * configurable about "the gate did not do its job" is whether it gates.
35
+ * 3. **Derived inside the DOCUMENT builder, never asserted in a handler.** The
36
+ * builder is the one function every lane's document passes through, so
37
+ * deriving the refusal there lands it after `resolveIssueSeverity` and
38
+ * `applyAllowFilter` and makes "denominator zero, status clean"
39
+ * unrepresentable rather than merely unwritten. A pure function, unit-testable
40
+ * without I/O.
41
+ * 4. **ONE finding per run**, however many things went unmatched. The claim is
42
+ * about the RUN; one per argument is per-finding duplication.
43
+ * 5. **The message says what did not run and what the operator can do.** It
44
+ * must not claim the corpus is broken — it claims the run is not a verdict.
45
+ * 6. **stderr may still carry a human warning; the document and the exit code
46
+ * must agree with it.** The human channel and the machine channel were what
47
+ * disagreed in every shipped instance, and only the machine channel gates.
48
+ */
49
+ import type { ValidationIssue } from '@vibe-agent-toolkit/schema';
50
+ /**
51
+ * The code every run-integrity refusal carries.
52
+ *
53
+ * 🔑 **One code for every refusal, on purpose.** A statement that would not
54
+ * compile, a corpus with no members, a run with no rules, a run that was killed,
55
+ * a scan that matched no file, a walk that missed a declared plugin, a phase that
56
+ * found no bundle — all are the same claim to a consumer, and they need the
57
+ * identical non-overridability, which
58
+ * `ValidationConfigSchema` grants by refusing this code as a `severity` key.
59
+ */
60
+ export declare const RUN_INTEGRITY_CODE = "RESOURCE_CHECK_BROKEN";
61
+ /**
62
+ * A run-integrity refusal: the non-overridable code, at `error`, always.
63
+ *
64
+ * The severity is not a parameter and must not become one. Every caller is
65
+ * reporting that the gate did not do its job, and the one thing that must never
66
+ * be configurable about that report is whether it gates.
67
+ *
68
+ * @param message - What did not run, and what the operator can do about it
69
+ * @returns The finding
70
+ */
71
+ export declare function runIntegrityFinding(message: string): ValidationIssue;
72
+ /**
73
+ * The refusal for a run whose denominator is zero — nothing was checked.
74
+ *
75
+ * 🪤 **It asks the DENOMINATOR, never the config.** A builder cannot see why
76
+ * nothing ran and deliberately does not ask. An absent config block, a filter
77
+ * that matched nothing, a glob with a typo, a directory that was never built —
78
+ * all arrive as the same document, and all of them are a gate that asserted
79
+ * nothing. The message is where a site names the likely causes and the remedy.
80
+ *
81
+ * 🪤 **One report per situation.** A run that already carries a run-integrity
82
+ * finding (an interrupted run, say) has the more specific of the two claims on
83
+ * the document, so this stands down rather than handing the operator two reports
84
+ * about one situation. Nothing weaker is needed: every such finding is `error`,
85
+ * so the status is already refused.
86
+ *
87
+ * @param denominator - How many things the run actually checked
88
+ * @param issues - What the run already found, so an existing run-integrity
89
+ * report is not duplicated
90
+ * @param message - The site's own account of what did not run and what to do;
91
+ * evaluated lazily so a populated run pays nothing for it
92
+ * @returns The one finding, or nothing when at least one thing was checked
93
+ */
94
+ export declare function nothingCheckedFinding(denominator: number, issues: readonly ValidationIssue[], message: () => string): readonly ValidationIssue[];
95
+ //# sourceMappingURL=run-integrity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-integrity.d.ts","sourceRoot":"","sources":["../../src/utils/run-integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAE1D;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAEpE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,OAAO,EAAE,MAAM,MAAM,GACpB,SAAS,eAAe,EAAE,CAI5B"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The run-integrity refusal: ONE mechanism for every gate that must never
3
+ * answer `success` after checking nothing.
4
+ *
5
+ * ## The class this closes
6
+ *
7
+ * A gate that checked nothing produces the same document as a gate that was
8
+ * removed. `vat resources check` shipped it (no `checks:` block → `status:
9
+ * success`, exit 0), then `vat claude budget` (a path matching no working
10
+ * location), then the repo's own audit quality gate (a green path over zero
11
+ * parsed findings), then `vat resources validate` (a `--collection` matching
12
+ * nothing → `filesScanned: 0`, exit 0), `vat claude marketplace validate` (no
13
+ * `plugins/` to walk, no count published), `vat corpus scan` (an empty tree
14
+ * "audits cleanly"), `vat verify`'s `packaged-content` phase (a typo'd glob
15
+ * discovers no bundle and the phase reports `success`), then `vat skills
16
+ * validate` (the same typo'd glob: one info line, no document, exit 0 — and
17
+ * `vat validate` folded that into `success`) and `vat audit` (an existing tree
18
+ * with nothing auditable: `status: success` over `filesScanned: 0`). Nine
19
+ * instances of one shape, and each was first fixed by hand at its own site.
20
+ * This module is where that hand-fixing stops: every site derives its refusal
21
+ * through the same three functions, so the invariants below are properties of
22
+ * the mechanism rather than of each author's memory.
23
+ *
24
+ * ## The invariants
25
+ *
26
+ * 1. **Code {@link RUN_INTEGRITY_CODE} — `RESOURCE_CHECK_BROKEN` — and never a
27
+ * sibling per site.** It is the registry's one run-integrity claim — *these
28
+ * assertions did not execute meaningfully, so the green means nothing* — and
29
+ * `ValidationConfigSchema` refuses it as a `severity` key, which is what makes
30
+ * it non-overridable by construction. A code per site would buy a consumer
31
+ * nothing the message does not already say while adding one more thing an
32
+ * adopter's CI has to know to look for.
33
+ * 2. **Severity `error`, and not a parameter.** The one thing that must never be
34
+ * configurable about "the gate did not do its job" is whether it gates.
35
+ * 3. **Derived inside the DOCUMENT builder, never asserted in a handler.** The
36
+ * builder is the one function every lane's document passes through, so
37
+ * deriving the refusal there lands it after `resolveIssueSeverity` and
38
+ * `applyAllowFilter` and makes "denominator zero, status clean"
39
+ * unrepresentable rather than merely unwritten. A pure function, unit-testable
40
+ * without I/O.
41
+ * 4. **ONE finding per run**, however many things went unmatched. The claim is
42
+ * about the RUN; one per argument is per-finding duplication.
43
+ * 5. **The message says what did not run and what the operator can do.** It
44
+ * must not claim the corpus is broken — it claims the run is not a verdict.
45
+ * 6. **stderr may still carry a human warning; the document and the exit code
46
+ * must agree with it.** The human channel and the machine channel were what
47
+ * disagreed in every shipped instance, and only the machine channel gates.
48
+ */
49
+ /**
50
+ * The code every run-integrity refusal carries.
51
+ *
52
+ * 🔑 **One code for every refusal, on purpose.** A statement that would not
53
+ * compile, a corpus with no members, a run with no rules, a run that was killed,
54
+ * a scan that matched no file, a walk that missed a declared plugin, a phase that
55
+ * found no bundle — all are the same claim to a consumer, and they need the
56
+ * identical non-overridability, which
57
+ * `ValidationConfigSchema` grants by refusing this code as a `severity` key.
58
+ */
59
+ export const RUN_INTEGRITY_CODE = 'RESOURCE_CHECK_BROKEN';
60
+ /**
61
+ * A run-integrity refusal: the non-overridable code, at `error`, always.
62
+ *
63
+ * The severity is not a parameter and must not become one. Every caller is
64
+ * reporting that the gate did not do its job, and the one thing that must never
65
+ * be configurable about that report is whether it gates.
66
+ *
67
+ * @param message - What did not run, and what the operator can do about it
68
+ * @returns The finding
69
+ */
70
+ export function runIntegrityFinding(message) {
71
+ return { code: RUN_INTEGRITY_CODE, severity: 'error', message };
72
+ }
73
+ /**
74
+ * The refusal for a run whose denominator is zero — nothing was checked.
75
+ *
76
+ * 🪤 **It asks the DENOMINATOR, never the config.** A builder cannot see why
77
+ * nothing ran and deliberately does not ask. An absent config block, a filter
78
+ * that matched nothing, a glob with a typo, a directory that was never built —
79
+ * all arrive as the same document, and all of them are a gate that asserted
80
+ * nothing. The message is where a site names the likely causes and the remedy.
81
+ *
82
+ * 🪤 **One report per situation.** A run that already carries a run-integrity
83
+ * finding (an interrupted run, say) has the more specific of the two claims on
84
+ * the document, so this stands down rather than handing the operator two reports
85
+ * about one situation. Nothing weaker is needed: every such finding is `error`,
86
+ * so the status is already refused.
87
+ *
88
+ * @param denominator - How many things the run actually checked
89
+ * @param issues - What the run already found, so an existing run-integrity
90
+ * report is not duplicated
91
+ * @param message - The site's own account of what did not run and what to do;
92
+ * evaluated lazily so a populated run pays nothing for it
93
+ * @returns The one finding, or nothing when at least one thing was checked
94
+ */
95
+ export function nothingCheckedFinding(denominator, issues, message) {
96
+ if (denominator > 0)
97
+ return [];
98
+ if (issues.some((issue) => issue.code === RUN_INTEGRITY_CODE))
99
+ return [];
100
+ return [runIntegrityFinding(message())];
101
+ }
102
+ //# sourceMappingURL=run-integrity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-integrity.js","sourceRoot":"","sources":["../../src/utils/run-integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAIH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AAE1D;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAClE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,qBAAqB,CACnC,WAAmB,EACnB,MAAkC,EAClC,OAAqB;IAErB,IAAI,WAAW,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAC/B,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,kBAAkB,CAAC;QAAE,OAAO,EAAE,CAAC;IACzE,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAC1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"skill-discovery.d.ts","sourceRoot":"","sources":["../../src/utils/skill-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAehE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAEpE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAiBA"}
1
+ {"version":3,"file":"skill-discovery.d.ts","sourceRoot":"","sources":["../../src/utils/skill-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAgBhE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAEpE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAiBA"}
@@ -5,6 +5,7 @@
5
5
  * Uses case-insensitive matching for discovery but validates proper casing.
6
6
  */
7
7
  import { basename } from 'node:path';
8
+ import { toForwardSlash } from '@vibe-agent-toolkit/utils';
8
9
  import picomatch from 'picomatch';
9
10
  /**
10
11
  * Case-insensitive matcher for SKILL.md files
@@ -57,7 +58,7 @@ export function discoverSkills(resources) {
57
58
  */
58
59
  export function validateSkillFilename(skillPath) {
59
60
  // Normalize path separators for cross-platform support
60
- const normalizedPath = skillPath.replaceAll('\\', '/');
61
+ const normalizedPath = toForwardSlash(skillPath);
61
62
  const filename = basename(normalizedPath);
62
63
  if (filename === 'SKILL.md') {
63
64
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"skill-discovery.js","sourceRoot":"","sources":["../../src/utils/skill-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,GAAG,SAAS,CAAC,aAAa,EAAE;IAC3C,MAAM,EAAE,IAAI,EAAO,4BAA4B;IAC/C,SAAS,EAAE,IAAI,EAAI,kCAAkC;IACrD,GAAG,EAAE,IAAI,EAAU,2DAA2D;CAC/E,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,cAAc,CAAC,SAAuB;IACpD,OAAO,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAA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c,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;IAE1C,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC5B,OAAO;YACL,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,QAAQ;SACnB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,gEAAgE,QAAQ,2FAA2F;KAC7K,CAAC;AACJ,CAAC"}
@@ -9,7 +9,7 @@
9
9
  * Most fields are a shallow override: a per-skill value replaces the default
10
10
  * outright. `files:` is the exception — see below.
11
11
  */
12
- import { type DeclaredEvalSuite, type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
12
+ import { type DeclaredEvalSuite, type PluginLocalSkillIndex, type SkillPackagingConfig } from '@vibe-agent-toolkit/agent-skills';
13
13
  import type { SkillsConfig } from '@vibe-agent-toolkit/resources';
14
14
  /**
15
15
  * Merge defaults with per-skill overrides, dropping undefined values.
@@ -26,6 +26,67 @@ import type { SkillsConfig } from '@vibe-agent-toolkit/resources';
26
26
  * the build did — the exact class of divergence this module exists to prevent.
27
27
  */
28
28
  export declare function mergeSkillPackagingConfig(defaults: Record<string, unknown> | undefined, perSkillOverrides: Record<string, unknown> | undefined): SkillPackagingConfig;
29
+ /**
30
+ * THE `skills.config` entry a plugin-local skill packages under, for both lanes that
31
+ * ask: the Claude plugin build that packages it and `vat verify` that checks what it
32
+ * packaged. Keyed by the skill's declared name; its directory path under the plugin's
33
+ * `skills/` (`group/nested`) and that path's trailing segment are fallbacks for a
34
+ * config keyed by directory. Two lookups were two effective configs for one skill —
35
+ * verify checked `files:` dests and severity overrides the build never applied.
36
+ */
37
+ export declare function pluginLocalSkillConfigEntry<T>(config: Readonly<Record<string, T>> | undefined, skill: {
38
+ readonly skillName: string;
39
+ readonly skillDirPath: string;
40
+ }): T | undefined;
41
+ /**
42
+ * Is this skill distributed through the POOL (`dist/skills/<name>`)?
43
+ *
44
+ * THE predicate for `publish`, read off the MERGED config so that
45
+ * `skills.defaults.publish` counts; every lane that decides whether a pool bundle
46
+ * is built, expected or assigned asks this and nothing else. The consistency
47
+ * check used to read `skills.config.<name>.publish` alone, so a project-wide
48
+ * `skills.defaults.publish: false` parsed and changed nothing — and `vat build`
49
+ * and `vat verify` never read the flag at all: two contracts for one key.
50
+ *
51
+ * `publish: false` names an IN-PLACE skill: validated at source by `vat validate`
52
+ * / `vat skills validate`, never bundled by `vat build`, never expected by
53
+ * `vat verify`. Default `true`.
54
+ *
55
+ * `publish` scopes the POOL only. A plugin-local skill (a git-tracked skill directory
56
+ * under a plugin's `skills/` — see `indexPluginLocalSkills`) ships with its
57
+ * plugin by LOCATION: the claude phase packages it and verify expects it whatever
58
+ * this returns. A skill that is both discovered by `skills.include` and
59
+ * plugin-local therefore skips the pool with `publish: false` and still ships in
60
+ * its plugin.
61
+ *
62
+ * `publish` is a distribution flag, not a packaging knob — the packaging
63
+ * validator never reads it — so it is declared on the project-config schema and
64
+ * carried through the merge generically like every other key; it is read here
65
+ * off the merged record rather than off a typed field of the validator's config.
66
+ */
67
+ export declare function isSkillPublished(packaging: SkillPackagingConfig): boolean;
68
+ /**
69
+ * Where `publish` sends a discovered skill:
70
+ * - `pool` — published: bundled into `dist/skills/<name>` (a plugin-local one ALSO ships in its plugin);
71
+ * - `plugin-only` — `publish: false` but plugin-local: out of the pool, still shipped by its plugin;
72
+ * - `in-place` — `publish: false` and not plugin-local: used from the repo, distributed nowhere.
73
+ *
74
+ * `plugin-only` is deliberately not `SkillDistribution`'s `plugin-local`: that names WHERE a
75
+ * skill's plugin build output lands whatever `publish` says; this names a skill that ships
76
+ * ONLY there, which a published plugin-local skill does not.
77
+ */
78
+ type PublishScope = 'pool' | 'plugin-only' | 'in-place';
79
+ /**
80
+ * Classify one discovered skill — {@link isSkillPublished} over its merged config, then
81
+ * plugin-local by the directory holding its `SKILL.md` (`pluginLocal`, from
82
+ * `indexPluginLocalSkills`: the skill dirs the plugin build actually packages). A
83
+ * plugin-local skill is never `in-place`: it ships with its plugin, so every lane that
84
+ * reports in-place skills (`vat build`, `vat verify`, the consistency check) asks this,
85
+ * not the flag alone.
86
+ */
87
+ export declare function publishScope(skill: {
88
+ sourcePath: string;
89
+ }, packaging: SkillPackagingConfig, pluginLocal: PluginLocalSkillIndex): PublishScope;
29
90
  /**
30
91
  * The PROJECT's declared eval suites: one {@link DeclaredEvalSuite} per discovered
31
92
  * skill, from the same discovery + merge every lane already runs.
@@ -46,4 +107,5 @@ export declare function collectDeclaredEvalSuites(skillsConfig: SkillsConfig | u
46
107
  name: string;
47
108
  sourcePath: string;
48
109
  }>): DeclaredEvalSuite[];
110
+ export {};
49
111
  //# sourceMappingURL=skill-packaging-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-packaging-config.d.ts","sourceRoot":"","sources":["../../src/utils/skill-packaging-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAoB,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACvH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGlE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC7C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACrD,oBAAoB,CAmBtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,UAAU,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9D,iBAAiB,EAAE,CAUrB"}
1
+ {"version":3,"file":"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