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

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 (755) hide show
  1. package/README.md +3 -3
  2. package/dist/bin/supervise-cli.d.ts +45 -0
  3. package/dist/bin/supervise-cli.d.ts.map +1 -0
  4. package/dist/bin/supervise-cli.js +83 -0
  5. package/dist/bin/supervise-cli.js.map +1 -0
  6. package/dist/bin/vat +94 -40
  7. package/dist/bin/vat.d.ts +15 -4
  8. package/dist/bin/vat.d.ts.map +1 -1
  9. package/dist/bin/vat.js +94 -40
  10. package/dist/bin/vat.js.map +1 -1
  11. package/dist/bin.js +21 -29
  12. package/dist/bin.js.map +1 -1
  13. package/dist/command-tree.d.ts +45 -0
  14. package/dist/command-tree.d.ts.map +1 -0
  15. package/dist/command-tree.js +60 -0
  16. package/dist/command-tree.js.map +1 -0
  17. package/dist/commands/agent/build-schema.d.ts +100 -0
  18. package/dist/commands/agent/build-schema.d.ts.map +1 -0
  19. package/dist/commands/agent/build-schema.js +32 -0
  20. package/dist/commands/agent/build-schema.js.map +1 -0
  21. package/dist/commands/agent/build.d.ts +1 -0
  22. package/dist/commands/agent/build.d.ts.map +1 -1
  23. package/dist/commands/agent/build.js +63 -33
  24. package/dist/commands/agent/build.js.map +1 -1
  25. package/dist/commands/agent/import-schema.d.ts +75 -0
  26. package/dist/commands/agent/import-schema.d.ts.map +1 -0
  27. package/dist/commands/agent/import-schema.js +25 -0
  28. package/dist/commands/agent/import-schema.js.map +1 -0
  29. package/dist/commands/agent/import.d.ts.map +1 -1
  30. package/dist/commands/agent/import.js +33 -27
  31. package/dist/commands/agent/import.js.map +1 -1
  32. package/dist/commands/agent/index.d.ts.map +1 -1
  33. package/dist/commands/agent/index.js +132 -37
  34. package/dist/commands/agent/index.js.map +1 -1
  35. package/dist/commands/agent/install-path.d.ts.map +1 -1
  36. package/dist/commands/agent/install-path.js +2 -1
  37. package/dist/commands/agent/install-path.js.map +1 -1
  38. package/dist/commands/agent/install-schema.d.ts +89 -0
  39. package/dist/commands/agent/install-schema.d.ts.map +1 -0
  40. package/dist/commands/agent/install-schema.js +29 -0
  41. package/dist/commands/agent/install-schema.js.map +1 -0
  42. package/dist/commands/agent/install.d.ts +7 -1
  43. package/dist/commands/agent/install.d.ts.map +1 -1
  44. package/dist/commands/agent/install.js +78 -108
  45. package/dist/commands/agent/install.js.map +1 -1
  46. package/dist/commands/agent/installed-schema.d.ts +140 -0
  47. package/dist/commands/agent/installed-schema.d.ts.map +1 -0
  48. package/dist/commands/agent/installed-schema.js +36 -0
  49. package/dist/commands/agent/installed-schema.js.map +1 -0
  50. package/dist/commands/agent/installed.d.ts +1 -1
  51. package/dist/commands/agent/installed.d.ts.map +1 -1
  52. package/dist/commands/agent/installed.js +104 -75
  53. package/dist/commands/agent/installed.js.map +1 -1
  54. package/dist/commands/agent/list-schema.d.ts +128 -0
  55. package/dist/commands/agent/list-schema.d.ts.map +1 -0
  56. package/dist/commands/agent/list-schema.js +34 -0
  57. package/dist/commands/agent/list-schema.js.map +1 -0
  58. package/dist/commands/agent/list.d.ts +4 -3
  59. package/dist/commands/agent/list.d.ts.map +1 -1
  60. package/dist/commands/agent/list.js +50 -37
  61. package/dist/commands/agent/list.js.map +1 -1
  62. package/dist/commands/agent/run.d.ts +3 -0
  63. package/dist/commands/agent/run.d.ts.map +1 -1
  64. package/dist/commands/agent/run.js +8 -3
  65. package/dist/commands/agent/run.js.map +1 -1
  66. package/dist/commands/agent/uninstall-schema.d.ts +89 -0
  67. package/dist/commands/agent/uninstall-schema.d.ts.map +1 -0
  68. package/dist/commands/agent/uninstall-schema.js +29 -0
  69. package/dist/commands/agent/uninstall-schema.js.map +1 -0
  70. package/dist/commands/agent/uninstall.d.ts +5 -1
  71. package/dist/commands/agent/uninstall.d.ts.map +1 -1
  72. package/dist/commands/agent/uninstall.js +50 -38
  73. package/dist/commands/agent/uninstall.js.map +1 -1
  74. package/dist/commands/agent/validate-schema.d.ts +129 -0
  75. package/dist/commands/agent/validate-schema.d.ts.map +1 -0
  76. package/dist/commands/agent/validate-schema.js +35 -0
  77. package/dist/commands/agent/validate-schema.js.map +1 -0
  78. package/dist/commands/agent/validate.d.ts +6 -0
  79. package/dist/commands/agent/validate.d.ts.map +1 -1
  80. package/dist/commands/agent/validate.js +64 -36
  81. package/dist/commands/agent/validate.js.map +1 -1
  82. package/dist/commands/ard/emit-schema.d.ts +108 -0
  83. package/dist/commands/ard/emit-schema.d.ts.map +1 -0
  84. package/dist/commands/ard/emit-schema.js +37 -0
  85. package/dist/commands/ard/emit-schema.js.map +1 -0
  86. package/dist/commands/ard/emit.d.ts +31 -63
  87. package/dist/commands/ard/emit.d.ts.map +1 -1
  88. package/dist/commands/ard/emit.js +124 -68
  89. package/dist/commands/ard/emit.js.map +1 -1
  90. package/dist/commands/ard/index.d.ts.map +1 -1
  91. package/dist/commands/ard/index.js +17 -10
  92. package/dist/commands/ard/index.js.map +1 -1
  93. package/dist/commands/audit/compat-lane-findings.d.ts +65 -0
  94. package/dist/commands/audit/compat-lane-findings.d.ts.map +1 -0
  95. package/dist/commands/audit/compat-lane-findings.js +72 -0
  96. package/dist/commands/audit/compat-lane-findings.js.map +1 -0
  97. package/dist/commands/audit/distributed-tree.d.ts +2 -2
  98. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  99. package/dist/commands/audit/distributed-tree.js +23 -12
  100. package/dist/commands/audit/distributed-tree.js.map +1 -1
  101. package/dist/commands/audit/git-url-clone.d.ts +15 -7
  102. package/dist/commands/audit/git-url-clone.d.ts.map +1 -1
  103. package/dist/commands/audit/git-url-clone.js +85 -42
  104. package/dist/commands/audit/git-url-clone.js.map +1 -1
  105. package/dist/commands/audit/hierarchical-output.d.ts +28 -4
  106. package/dist/commands/audit/hierarchical-output.d.ts.map +1 -1
  107. package/dist/commands/audit/hierarchical-output.js +44 -27
  108. package/dist/commands/audit/hierarchical-output.js.map +1 -1
  109. package/dist/commands/audit/scan-population.d.ts.map +1 -1
  110. package/dist/commands/audit/scan-population.js +2 -1
  111. package/dist/commands/audit/scan-population.js.map +1 -1
  112. package/dist/commands/audit-schema.d.ts +1247 -0
  113. package/dist/commands/audit-schema.d.ts.map +1 -0
  114. package/dist/commands/audit-schema.js +139 -0
  115. package/dist/commands/audit-schema.js.map +1 -0
  116. package/dist/commands/audit-settings-schema.d.ts +417 -0
  117. package/dist/commands/audit-settings-schema.d.ts.map +1 -0
  118. package/dist/commands/audit-settings-schema.js +77 -0
  119. package/dist/commands/audit-settings-schema.js.map +1 -0
  120. package/dist/commands/audit-settings.d.ts +28 -9
  121. package/dist/commands/audit-settings.d.ts.map +1 -1
  122. package/dist/commands/audit-settings.js +215 -151
  123. package/dist/commands/audit-settings.js.map +1 -1
  124. package/dist/commands/audit.d.ts +72 -33
  125. package/dist/commands/audit.d.ts.map +1 -1
  126. package/dist/commands/audit.js +415 -397
  127. package/dist/commands/audit.js.map +1 -1
  128. package/dist/commands/build.d.ts +61 -4
  129. package/dist/commands/build.d.ts.map +1 -1
  130. package/dist/commands/build.js +176 -190
  131. package/dist/commands/build.js.map +1 -1
  132. package/dist/commands/cache/clear-schema.d.ts +111 -0
  133. package/dist/commands/cache/clear-schema.d.ts.map +1 -0
  134. package/dist/commands/cache/clear-schema.js +37 -0
  135. package/dist/commands/cache/clear-schema.js.map +1 -0
  136. package/dist/commands/cache/clear.d.ts +28 -26
  137. package/dist/commands/cache/clear.d.ts.map +1 -1
  138. package/dist/commands/cache/clear.js +108 -103
  139. package/dist/commands/cache/clear.js.map +1 -1
  140. package/dist/commands/cache/index.d.ts.map +1 -1
  141. package/dist/commands/cache/index.js +13 -7
  142. package/dist/commands/cache/index.js.map +1 -1
  143. package/dist/commands/claude/claude-config.d.ts +23 -6
  144. package/dist/commands/claude/claude-config.d.ts.map +1 -1
  145. package/dist/commands/claude/claude-config.js +29 -15
  146. package/dist/commands/claude/claude-config.js.map +1 -1
  147. package/dist/commands/claude/context.d.ts +87 -2
  148. package/dist/commands/claude/context.d.ts.map +1 -1
  149. package/dist/commands/claude/context.js +116 -57
  150. package/dist/commands/claude/context.js.map +1 -1
  151. package/dist/commands/claude/marketplace/changelog-utils.js +2 -2
  152. package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
  153. package/dist/commands/claude/marketplace/git-publish.d.ts +14 -1
  154. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  155. package/dist/commands/claude/marketplace/git-publish.js +135 -68
  156. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  157. package/dist/commands/claude/marketplace/license-utils.d.ts +3 -5
  158. package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
  159. package/dist/commands/claude/marketplace/license-utils.js +16 -7
  160. package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
  161. package/dist/commands/claude/marketplace/publish-schema.d.ts +137 -0
  162. package/dist/commands/claude/marketplace/publish-schema.d.ts.map +1 -0
  163. package/dist/commands/claude/marketplace/publish-schema.js +32 -0
  164. package/dist/commands/claude/marketplace/publish-schema.js.map +1 -0
  165. package/dist/commands/claude/marketplace/publish-tree.d.ts +6 -0
  166. package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
  167. package/dist/commands/claude/marketplace/publish-tree.js +75 -17
  168. package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
  169. package/dist/commands/claude/marketplace/publish.d.ts +27 -0
  170. package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
  171. package/dist/commands/claude/marketplace/publish.js +84 -50
  172. package/dist/commands/claude/marketplace/publish.js.map +1 -1
  173. package/dist/commands/claude/marketplace/validate-schema.d.ts +362 -0
  174. package/dist/commands/claude/marketplace/validate-schema.d.ts.map +1 -0
  175. package/dist/commands/claude/marketplace/validate-schema.js +67 -0
  176. package/dist/commands/claude/marketplace/validate-schema.js.map +1 -0
  177. package/dist/commands/claude/marketplace/validate.d.ts +40 -53
  178. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  179. package/dist/commands/claude/marketplace/validate.js +358 -214
  180. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  181. package/dist/commands/claude/org/api-keys.d.ts +3 -0
  182. package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
  183. package/dist/commands/claude/org/api-keys.js +4 -5
  184. package/dist/commands/claude/org/api-keys.js.map +1 -1
  185. package/dist/commands/claude/org/code-analytics.js +1 -1
  186. package/dist/commands/claude/org/code-analytics.js.map +1 -1
  187. package/dist/commands/claude/org/cost.d.ts.map +1 -1
  188. package/dist/commands/claude/org/cost.js +11 -33
  189. package/dist/commands/claude/org/cost.js.map +1 -1
  190. package/dist/commands/claude/org/helpers.d.ts +40 -27
  191. package/dist/commands/claude/org/helpers.d.ts.map +1 -1
  192. package/dist/commands/claude/org/helpers.js +61 -66
  193. package/dist/commands/claude/org/helpers.js.map +1 -1
  194. package/dist/commands/claude/org/index.d.ts.map +1 -1
  195. package/dist/commands/claude/org/index.js +10 -4
  196. package/dist/commands/claude/org/index.js.map +1 -1
  197. package/dist/commands/claude/org/info.d.ts.map +1 -1
  198. package/dist/commands/claude/org/info.js +2 -3
  199. package/dist/commands/claude/org/info.js.map +1 -1
  200. package/dist/commands/claude/org/invites.d.ts +3 -0
  201. package/dist/commands/claude/org/invites.d.ts.map +1 -1
  202. package/dist/commands/claude/org/invites.js +5 -7
  203. package/dist/commands/claude/org/invites.js.map +1 -1
  204. package/dist/commands/claude/org/skills.d.ts +76 -21
  205. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  206. package/dist/commands/claude/org/skills.js +273 -246
  207. package/dist/commands/claude/org/skills.js.map +1 -1
  208. package/dist/commands/claude/org/stubs-schema.d.ts +56 -0
  209. package/dist/commands/claude/org/stubs-schema.d.ts.map +1 -0
  210. package/dist/commands/claude/org/stubs-schema.js +23 -0
  211. package/dist/commands/claude/org/stubs-schema.js.map +1 -0
  212. package/dist/commands/claude/org/stubs.d.ts +8 -3
  213. package/dist/commands/claude/org/stubs.d.ts.map +1 -1
  214. package/dist/commands/claude/org/stubs.js +9 -9
  215. package/dist/commands/claude/org/stubs.js.map +1 -1
  216. package/dist/commands/claude/org/usage.d.ts.map +1 -1
  217. package/dist/commands/claude/org/usage.js +1 -2
  218. package/dist/commands/claude/org/usage.js.map +1 -1
  219. package/dist/commands/claude/org/users.d.ts +3 -0
  220. package/dist/commands/claude/org/users.d.ts.map +1 -1
  221. package/dist/commands/claude/org/users.js +6 -8
  222. package/dist/commands/claude/org/users.js.map +1 -1
  223. package/dist/commands/claude/org/workspaces.d.ts +3 -0
  224. package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
  225. package/dist/commands/claude/org/workspaces.js +10 -15
  226. package/dist/commands/claude/org/workspaces.js.map +1 -1
  227. package/dist/commands/claude/plugin/build-schema.d.ts +642 -0
  228. package/dist/commands/claude/plugin/build-schema.d.ts.map +1 -0
  229. package/dist/commands/claude/plugin/build-schema.js +51 -0
  230. package/dist/commands/claude/plugin/build-schema.js.map +1 -0
  231. package/dist/commands/claude/plugin/build.d.ts +220 -45
  232. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  233. package/dist/commands/claude/plugin/build.js +466 -249
  234. package/dist/commands/claude/plugin/build.js.map +1 -1
  235. package/dist/commands/claude/plugin/helpers.d.ts +186 -24
  236. package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
  237. package/dist/commands/claude/plugin/helpers.js +110 -68
  238. package/dist/commands/claude/plugin/helpers.js.map +1 -1
  239. package/dist/commands/claude/plugin/install-schema.d.ts +144 -0
  240. package/dist/commands/claude/plugin/install-schema.d.ts.map +1 -0
  241. package/dist/commands/claude/plugin/install-schema.js +36 -0
  242. package/dist/commands/claude/plugin/install-schema.js.map +1 -0
  243. package/dist/commands/claude/plugin/install.d.ts +191 -11
  244. package/dist/commands/claude/plugin/install.d.ts.map +1 -1
  245. package/dist/commands/claude/plugin/install.js +688 -628
  246. package/dist/commands/claude/plugin/install.js.map +1 -1
  247. package/dist/commands/claude/plugin/kept-findings.d.ts +19 -0
  248. package/dist/commands/claude/plugin/kept-findings.d.ts.map +1 -0
  249. package/dist/commands/claude/plugin/kept-findings.js +24 -0
  250. package/dist/commands/claude/plugin/kept-findings.js.map +1 -0
  251. package/dist/commands/claude/plugin/list-schema.d.ts +223 -0
  252. package/dist/commands/claude/plugin/list-schema.d.ts.map +1 -0
  253. package/dist/commands/claude/plugin/list-schema.js +34 -0
  254. package/dist/commands/claude/plugin/list-schema.js.map +1 -0
  255. package/dist/commands/claude/plugin/list.d.ts +18 -0
  256. package/dist/commands/claude/plugin/list.d.ts.map +1 -1
  257. package/dist/commands/claude/plugin/list.js +53 -45
  258. package/dist/commands/claude/plugin/list.js.map +1 -1
  259. package/dist/commands/claude/plugin/npm-pack.d.ts +15 -0
  260. package/dist/commands/claude/plugin/npm-pack.d.ts.map +1 -0
  261. package/dist/commands/claude/plugin/npm-pack.js +39 -0
  262. package/dist/commands/claude/plugin/npm-pack.js.map +1 -0
  263. package/dist/commands/claude/plugin/plugin-changelog.d.ts +5 -1
  264. package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
  265. package/dist/commands/claude/plugin/plugin-changelog.js +9 -5
  266. package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
  267. package/dist/commands/claude/plugin/plugin-files.d.ts +21 -2
  268. package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
  269. package/dist/commands/claude/plugin/plugin-files.js +65 -32
  270. package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
  271. package/dist/commands/claude/plugin/plugin-validators.d.ts +13 -0
  272. package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
  273. package/dist/commands/claude/plugin/plugin-validators.js +64 -16
  274. package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
  275. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  276. package/dist/commands/claude/plugin/tree-copy.js +63 -37
  277. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  278. package/dist/commands/claude/plugin/uninstall-schema.d.ts +112 -0
  279. package/dist/commands/claude/plugin/uninstall-schema.d.ts.map +1 -0
  280. package/dist/commands/claude/plugin/uninstall-schema.js +28 -0
  281. package/dist/commands/claude/plugin/uninstall-schema.js.map +1 -0
  282. package/dist/commands/claude/plugin/uninstall.d.ts +57 -0
  283. package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
  284. package/dist/commands/claude/plugin/uninstall.js +176 -64
  285. package/dist/commands/claude/plugin/uninstall.js.map +1 -1
  286. package/dist/commands/consistency-check.d.ts.map +1 -1
  287. package/dist/commands/consistency-check.js +8 -6
  288. package/dist/commands/consistency-check.js.map +1 -1
  289. package/dist/commands/corpus/index.d.ts.map +1 -1
  290. package/dist/commands/corpus/index.js +26 -10
  291. package/dist/commands/corpus/index.js.map +1 -1
  292. package/dist/commands/corpus/report.d.ts +34 -16
  293. package/dist/commands/corpus/report.d.ts.map +1 -1
  294. package/dist/commands/corpus/report.js +36 -18
  295. package/dist/commands/corpus/report.js.map +1 -1
  296. package/dist/commands/corpus/runner.d.ts +25 -20
  297. package/dist/commands/corpus/runner.d.ts.map +1 -1
  298. package/dist/commands/corpus/runner.js +123 -67
  299. package/dist/commands/corpus/runner.js.map +1 -1
  300. package/dist/commands/corpus/scan-schema.d.ts +127 -0
  301. package/dist/commands/corpus/scan-schema.d.ts.map +1 -0
  302. package/dist/commands/corpus/scan-schema.js +31 -0
  303. package/dist/commands/corpus/scan-schema.js.map +1 -0
  304. package/dist/commands/corpus/scan.d.ts +31 -0
  305. package/dist/commands/corpus/scan.d.ts.map +1 -1
  306. package/dist/commands/corpus/scan.js +124 -50
  307. package/dist/commands/corpus/scan.js.map +1 -1
  308. package/dist/commands/corpus/seed.d.ts +11 -8
  309. package/dist/commands/corpus/seed.d.ts.map +1 -1
  310. package/dist/commands/corpus/seed.js +29 -11
  311. package/dist/commands/corpus/seed.js.map +1 -1
  312. package/dist/commands/doctor-render.d.ts +52 -0
  313. package/dist/commands/doctor-render.d.ts.map +1 -0
  314. package/dist/commands/doctor-render.js +110 -0
  315. package/dist/commands/doctor-render.js.map +1 -0
  316. package/dist/commands/doctor-schema.d.ts +191 -0
  317. package/dist/commands/doctor-schema.d.ts.map +1 -0
  318. package/dist/commands/doctor-schema.js +44 -0
  319. package/dist/commands/doctor-schema.js.map +1 -0
  320. package/dist/commands/doctor.d.ts +7 -62
  321. package/dist/commands/doctor.d.ts.map +1 -1
  322. package/dist/commands/doctor.js +126 -165
  323. package/dist/commands/doctor.js.map +1 -1
  324. package/dist/commands/inventory-schema.d.ts +7297 -0
  325. package/dist/commands/inventory-schema.d.ts.map +1 -0
  326. package/dist/commands/inventory-schema.js +28 -0
  327. package/dist/commands/inventory-schema.js.map +1 -0
  328. package/dist/commands/inventory.d.ts +1 -1
  329. package/dist/commands/inventory.d.ts.map +1 -1
  330. package/dist/commands/inventory.js +89 -41
  331. package/dist/commands/inventory.js.map +1 -1
  332. package/dist/commands/mcp/index.d.ts.map +1 -1
  333. package/dist/commands/mcp/index.js +15 -0
  334. package/dist/commands/mcp/index.js.map +1 -1
  335. package/dist/commands/mcp/list-collections-schema.d.ts +101 -0
  336. package/dist/commands/mcp/list-collections-schema.d.ts.map +1 -0
  337. package/dist/commands/mcp/list-collections-schema.js +22 -0
  338. package/dist/commands/mcp/list-collections-schema.js.map +1 -0
  339. package/dist/commands/mcp/list-collections.d.ts +1 -1
  340. package/dist/commands/mcp/list-collections.d.ts.map +1 -1
  341. package/dist/commands/mcp/list-collections.js +19 -17
  342. package/dist/commands/mcp/list-collections.js.map +1 -1
  343. package/dist/commands/mcp/serve.d.ts +5 -0
  344. package/dist/commands/mcp/serve.d.ts.map +1 -1
  345. package/dist/commands/mcp/serve.js +29 -15
  346. package/dist/commands/mcp/serve.js.map +1 -1
  347. package/dist/commands/okf/index.d.ts.map +1 -1
  348. package/dist/commands/okf/index.js +13 -10
  349. package/dist/commands/okf/index.js.map +1 -1
  350. package/dist/commands/okf/validate-schema.d.ts +171 -0
  351. package/dist/commands/okf/validate-schema.d.ts.map +1 -0
  352. package/dist/commands/okf/validate-schema.js +44 -0
  353. package/dist/commands/okf/validate-schema.js.map +1 -0
  354. package/dist/commands/okf/validate.d.ts +16 -145
  355. package/dist/commands/okf/validate.d.ts.map +1 -1
  356. package/dist/commands/okf/validate.js +63 -52
  357. package/dist/commands/okf/validate.js.map +1 -1
  358. package/dist/commands/orchestrator-schema.d.ts +419 -0
  359. package/dist/commands/orchestrator-schema.d.ts.map +1 -0
  360. package/dist/commands/orchestrator-schema.js +91 -0
  361. package/dist/commands/orchestrator-schema.js.map +1 -0
  362. package/dist/commands/phase-utils.d.ts +188 -220
  363. package/dist/commands/phase-utils.d.ts.map +1 -1
  364. package/dist/commands/phase-utils.js +210 -258
  365. package/dist/commands/phase-utils.js.map +1 -1
  366. package/dist/commands/positional-args.d.ts +13 -11
  367. package/dist/commands/positional-args.d.ts.map +1 -1
  368. package/dist/commands/positional-args.js +16 -15
  369. package/dist/commands/positional-args.js.map +1 -1
  370. package/dist/commands/rag/admin-schema.d.ts +152 -0
  371. package/dist/commands/rag/admin-schema.d.ts.map +1 -0
  372. package/dist/commands/rag/admin-schema.js +31 -0
  373. package/dist/commands/rag/admin-schema.js.map +1 -0
  374. package/dist/commands/rag/clear-command.d.ts.map +1 -1
  375. package/dist/commands/rag/clear-command.js +30 -15
  376. package/dist/commands/rag/clear-command.js.map +1 -1
  377. package/dist/commands/rag/command-helpers.d.ts +31 -7
  378. package/dist/commands/rag/command-helpers.d.ts.map +1 -1
  379. package/dist/commands/rag/command-helpers.js +41 -21
  380. package/dist/commands/rag/command-helpers.js.map +1 -1
  381. package/dist/commands/rag/index-command.d.ts +37 -48
  382. package/dist/commands/rag/index-command.d.ts.map +1 -1
  383. package/dist/commands/rag/index-command.js +80 -65
  384. package/dist/commands/rag/index-command.js.map +1 -1
  385. package/dist/commands/rag/index-schema.d.ts +107 -0
  386. package/dist/commands/rag/index-schema.d.ts.map +1 -0
  387. package/dist/commands/rag/index-schema.js +34 -0
  388. package/dist/commands/rag/index-schema.js.map +1 -0
  389. package/dist/commands/rag/index.d.ts.map +1 -1
  390. package/dist/commands/rag/index.js +88 -41
  391. package/dist/commands/rag/index.js.map +1 -1
  392. package/dist/commands/rag/query-command.d.ts +18 -4
  393. package/dist/commands/rag/query-command.d.ts.map +1 -1
  394. package/dist/commands/rag/query-command.js +42 -27
  395. package/dist/commands/rag/query-command.js.map +1 -1
  396. package/dist/commands/rag/query-schema.d.ts +363 -0
  397. package/dist/commands/rag/query-schema.d.ts.map +1 -0
  398. package/dist/commands/rag/query-schema.js +59 -0
  399. package/dist/commands/rag/query-schema.js.map +1 -0
  400. package/dist/commands/rag/stats-command.d.ts.map +1 -1
  401. package/dist/commands/rag/stats-command.js +19 -18
  402. package/dist/commands/rag/stats-command.js.map +1 -1
  403. package/dist/commands/resources/check-progress.d.ts +79 -13
  404. package/dist/commands/resources/check-progress.d.ts.map +1 -1
  405. package/dist/commands/resources/check-progress.js +112 -11
  406. package/dist/commands/resources/check-progress.js.map +1 -1
  407. package/dist/commands/resources/check-schema.d.ts +335 -0
  408. package/dist/commands/resources/check-schema.d.ts.map +1 -0
  409. package/dist/commands/resources/check-schema.js +104 -0
  410. package/dist/commands/resources/check-schema.js.map +1 -0
  411. package/dist/commands/resources/check-supervisor.d.ts +329 -71
  412. package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
  413. package/dist/commands/resources/check-supervisor.js +507 -107
  414. package/dist/commands/resources/check-supervisor.js.map +1 -1
  415. package/dist/commands/resources/check.d.ts +88 -254
  416. package/dist/commands/resources/check.d.ts.map +1 -1
  417. package/dist/commands/resources/check.js +537 -310
  418. package/dist/commands/resources/check.js.map +1 -1
  419. package/dist/commands/resources/index.d.ts.map +1 -1
  420. package/dist/commands/resources/index.js +189 -103
  421. package/dist/commands/resources/index.js.map +1 -1
  422. package/dist/commands/resources/query-schema.d.ts +188 -0
  423. package/dist/commands/resources/query-schema.d.ts.map +1 -0
  424. package/dist/commands/resources/query-schema.js +48 -0
  425. package/dist/commands/resources/query-schema.js.map +1 -0
  426. package/dist/commands/resources/query.d.ts +18 -13
  427. package/dist/commands/resources/query.d.ts.map +1 -1
  428. package/dist/commands/resources/query.js +61 -49
  429. package/dist/commands/resources/query.js.map +1 -1
  430. package/dist/commands/resources/scan-schema.d.ts +195 -0
  431. package/dist/commands/resources/scan-schema.d.ts.map +1 -0
  432. package/dist/commands/resources/scan-schema.js +53 -0
  433. package/dist/commands/resources/scan-schema.js.map +1 -0
  434. package/dist/commands/resources/scan.d.ts +26 -3
  435. package/dist/commands/resources/scan.d.ts.map +1 -1
  436. package/dist/commands/resources/scan.js +51 -53
  437. package/dist/commands/resources/scan.js.map +1 -1
  438. package/dist/commands/resources/validate-schema.d.ts +326 -0
  439. package/dist/commands/resources/validate-schema.d.ts.map +1 -0
  440. package/dist/commands/resources/validate-schema.js +60 -0
  441. package/dist/commands/resources/validate-schema.js.map +1 -0
  442. package/dist/commands/resources/validate.d.ts +45 -169
  443. package/dist/commands/resources/validate.d.ts.map +1 -1
  444. package/dist/commands/resources/validate.js +221 -485
  445. package/dist/commands/resources/validate.js.map +1 -1
  446. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  447. package/dist/commands/skill/review-checklist.js +0 -1
  448. package/dist/commands/skill/review-checklist.js.map +1 -1
  449. package/dist/commands/skill/review-schema.d.ts +278 -0
  450. package/dist/commands/skill/review-schema.d.ts.map +1 -0
  451. package/dist/commands/skill/review-schema.js +46 -0
  452. package/dist/commands/skill/review-schema.js.map +1 -0
  453. package/dist/commands/skill/review.d.ts +8 -234
  454. package/dist/commands/skill/review.d.ts.map +1 -1
  455. package/dist/commands/skill/review.js +54 -77
  456. package/dist/commands/skill/review.js.map +1 -1
  457. package/dist/commands/skill/test/auth-flags.d.ts +3 -0
  458. package/dist/commands/skill/test/auth-flags.d.ts.map +1 -1
  459. package/dist/commands/skill/test/auth-flags.js +6 -2
  460. package/dist/commands/skill/test/auth-flags.js.map +1 -1
  461. package/dist/commands/skill/test/configure-schema.d.ts +67 -0
  462. package/dist/commands/skill/test/configure-schema.d.ts.map +1 -0
  463. package/dist/commands/skill/test/configure-schema.js +27 -0
  464. package/dist/commands/skill/test/configure-schema.js.map +1 -0
  465. package/dist/commands/skill/test/configure.d.ts +12 -5
  466. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  467. package/dist/commands/skill/test/configure.js +101 -31
  468. package/dist/commands/skill/test/configure.js.map +1 -1
  469. package/dist/commands/skill/test/run-schema.d.ts +107 -0
  470. package/dist/commands/skill/test/run-schema.d.ts.map +1 -0
  471. package/dist/commands/skill/test/run-schema.js +36 -0
  472. package/dist/commands/skill/test/run-schema.js.map +1 -0
  473. package/dist/commands/skill/test/run.d.ts +3 -2
  474. package/dist/commands/skill/test/run.d.ts.map +1 -1
  475. package/dist/commands/skill/test/run.js +316 -155
  476. package/dist/commands/skill/test/run.js.map +1 -1
  477. package/dist/commands/skills/build-schema.d.ts +199 -0
  478. package/dist/commands/skills/build-schema.d.ts.map +1 -0
  479. package/dist/commands/skills/build-schema.js +55 -0
  480. package/dist/commands/skills/build-schema.js.map +1 -0
  481. package/dist/commands/skills/build.d.ts +95 -298
  482. package/dist/commands/skills/build.d.ts.map +1 -1
  483. package/dist/commands/skills/build.js +415 -818
  484. package/dist/commands/skills/build.js.map +1 -1
  485. package/dist/commands/skills/command-helpers.d.ts +5 -11
  486. package/dist/commands/skills/command-helpers.d.ts.map +1 -1
  487. package/dist/commands/skills/command-helpers.js +7 -17
  488. package/dist/commands/skills/command-helpers.js.map +1 -1
  489. package/dist/commands/skills/index.js +12 -6
  490. package/dist/commands/skills/index.js.map +1 -1
  491. package/dist/commands/skills/install-schema.d.ts +153 -0
  492. package/dist/commands/skills/install-schema.d.ts.map +1 -0
  493. package/dist/commands/skills/install-schema.js +44 -0
  494. package/dist/commands/skills/install-schema.js.map +1 -0
  495. package/dist/commands/skills/install.d.ts +76 -8
  496. package/dist/commands/skills/install.d.ts.map +1 -1
  497. package/dist/commands/skills/install.js +230 -194
  498. package/dist/commands/skills/install.js.map +1 -1
  499. package/dist/commands/skills/list-schema.d.ts +145 -0
  500. package/dist/commands/skills/list-schema.d.ts.map +1 -0
  501. package/dist/commands/skills/list-schema.js +37 -0
  502. package/dist/commands/skills/list-schema.js.map +1 -0
  503. package/dist/commands/skills/list.d.ts +39 -8
  504. package/dist/commands/skills/list.d.ts.map +1 -1
  505. package/dist/commands/skills/list.js +110 -122
  506. package/dist/commands/skills/list.js.map +1 -1
  507. package/dist/commands/skills/package-schema.d.ts +98 -0
  508. package/dist/commands/skills/package-schema.d.ts.map +1 -0
  509. package/dist/commands/skills/package-schema.js +32 -0
  510. package/dist/commands/skills/package-schema.js.map +1 -0
  511. package/dist/commands/skills/package.d.ts +85 -14
  512. package/dist/commands/skills/package.d.ts.map +1 -1
  513. package/dist/commands/skills/package.js +288 -207
  514. package/dist/commands/skills/package.js.map +1 -1
  515. package/dist/commands/skills/scope-guard.d.ts +27 -20
  516. package/dist/commands/skills/scope-guard.d.ts.map +1 -1
  517. package/dist/commands/skills/scope-guard.js +43 -28
  518. package/dist/commands/skills/scope-guard.js.map +1 -1
  519. package/dist/commands/skills/skill-discovery.d.ts +1 -1
  520. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  521. package/dist/commands/skills/skill-discovery.js +40 -19
  522. package/dist/commands/skills/skill-discovery.js.map +1 -1
  523. package/dist/commands/skills/source-resolvers.d.ts +58 -8
  524. package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
  525. package/dist/commands/skills/source-resolvers.js +113 -38
  526. package/dist/commands/skills/source-resolvers.js.map +1 -1
  527. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  528. package/dist/commands/skills/validate-command.js +31 -51
  529. package/dist/commands/skills/validate-command.js.map +1 -1
  530. package/dist/commands/skills/validate-schema.d.ts +199 -0
  531. package/dist/commands/skills/validate-schema.d.ts.map +1 -0
  532. package/dist/commands/skills/validate-schema.js +44 -0
  533. package/dist/commands/skills/validate-schema.js.map +1 -0
  534. package/dist/commands/skills/validate.d.ts +100 -136
  535. package/dist/commands/skills/validate.d.ts.map +1 -1
  536. package/dist/commands/skills/validate.js +257 -343
  537. package/dist/commands/skills/validate.js.map +1 -1
  538. package/dist/commands/validate.d.ts +17 -5
  539. package/dist/commands/validate.d.ts.map +1 -1
  540. package/dist/commands/validate.js +139 -94
  541. package/dist/commands/validate.js.map +1 -1
  542. package/dist/commands/verify.d.ts +121 -110
  543. package/dist/commands/verify.d.ts.map +1 -1
  544. package/dist/commands/verify.js +230 -294
  545. package/dist/commands/verify.js.map +1 -1
  546. package/dist/index.d.ts +1 -1
  547. package/dist/index.d.ts.map +1 -1
  548. package/dist/index.js +1 -1
  549. package/dist/index.js.map +1 -1
  550. package/dist/report-schemas.d.ts +12398 -35
  551. package/dist/report-schemas.d.ts.map +1 -1
  552. package/dist/report-schemas.js +624 -66
  553. package/dist/report-schemas.js.map +1 -1
  554. package/dist/skill-resolution/packaging-config.js +2 -2
  555. package/dist/skill-resolution/packaging-config.js.map +1 -1
  556. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
  557. package/dist/skill-resolution/resolve-skill-reference.js +20 -13
  558. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
  559. package/dist/utils/agent-discovery.d.ts +34 -1
  560. package/dist/utils/agent-discovery.d.ts.map +1 -1
  561. package/dist/utils/agent-discovery.js +80 -38
  562. package/dist/utils/agent-discovery.js.map +1 -1
  563. package/dist/utils/claude-context-lens.d.ts +13 -6
  564. package/dist/utils/claude-context-lens.d.ts.map +1 -1
  565. package/dist/utils/claude-context-lens.js +11 -12
  566. package/dist/utils/claude-context-lens.js.map +1 -1
  567. package/dist/utils/command-error-codes.d.ts +12 -0
  568. package/dist/utils/command-error-codes.d.ts.map +1 -0
  569. package/dist/utils/command-error-codes.js +12 -0
  570. package/dist/utils/command-error-codes.js.map +1 -0
  571. package/dist/utils/command-refusal.d.ts +58 -0
  572. package/dist/utils/command-refusal.d.ts.map +1 -0
  573. package/dist/utils/command-refusal.js +170 -0
  574. package/dist/utils/command-refusal.js.map +1 -0
  575. package/dist/utils/commander-ending.d.ts +40 -0
  576. package/dist/utils/commander-ending.d.ts.map +1 -0
  577. package/dist/utils/commander-ending.js +42 -0
  578. package/dist/utils/commander-ending.js.map +1 -0
  579. package/dist/utils/config-loader.d.ts +13 -8
  580. package/dist/utils/config-loader.d.ts.map +1 -1
  581. package/dist/utils/config-loader.js +84 -45
  582. package/dist/utils/config-loader.js.map +1 -1
  583. package/dist/utils/corpus-target.d.ts +1 -1
  584. package/dist/utils/corpus-target.d.ts.map +1 -1
  585. package/dist/utils/corpus-target.js +44 -5
  586. package/dist/utils/corpus-target.js.map +1 -1
  587. package/dist/utils/debug-diagnostics.d.ts +18 -0
  588. package/dist/utils/debug-diagnostics.d.ts.map +1 -0
  589. package/dist/utils/debug-diagnostics.js +23 -0
  590. package/dist/utils/debug-diagnostics.js.map +1 -0
  591. package/dist/utils/document-writer.d.ts +191 -0
  592. package/dist/utils/document-writer.d.ts.map +1 -0
  593. package/dist/utils/document-writer.js +319 -0
  594. package/dist/utils/document-writer.js.map +1 -0
  595. package/dist/utils/help-loader.d.ts +2 -2
  596. package/dist/utils/help-loader.js +2 -2
  597. package/dist/utils/install-plan.d.ts +99 -0
  598. package/dist/utils/install-plan.d.ts.map +1 -0
  599. package/dist/utils/install-plan.js +146 -0
  600. package/dist/utils/install-plan.js.map +1 -0
  601. package/dist/utils/issue-anchor.d.ts +1 -1
  602. package/dist/utils/issue-anchor.d.ts.map +1 -1
  603. package/dist/utils/issue-anchor.js.map +1 -1
  604. package/dist/utils/issue-rendering.d.ts +8 -3
  605. package/dist/utils/issue-rendering.d.ts.map +1 -1
  606. package/dist/utils/issue-rendering.js +4 -0
  607. package/dist/utils/issue-rendering.js.map +1 -1
  608. package/dist/utils/lens-population.d.ts +20 -0
  609. package/dist/utils/lens-population.d.ts.map +1 -0
  610. package/dist/utils/lens-population.js +15 -0
  611. package/dist/utils/lens-population.js.map +1 -0
  612. package/dist/utils/marketplace-io.d.ts +63 -0
  613. package/dist/utils/marketplace-io.d.ts.map +1 -0
  614. package/dist/utils/marketplace-io.js +63 -0
  615. package/dist/utils/marketplace-io.js.map +1 -0
  616. package/dist/utils/operator-notices.d.ts +97 -0
  617. package/dist/utils/operator-notices.d.ts.map +1 -0
  618. package/dist/utils/operator-notices.js +115 -0
  619. package/dist/utils/operator-notices.js.map +1 -0
  620. package/dist/utils/optional-backend.d.ts +18 -15
  621. package/dist/utils/optional-backend.d.ts.map +1 -1
  622. package/dist/utils/optional-backend.js +22 -33
  623. package/dist/utils/optional-backend.js.map +1 -1
  624. package/dist/utils/output.d.ts +5 -43
  625. package/dist/utils/output.d.ts.map +1 -1
  626. package/dist/utils/output.js +8 -63
  627. package/dist/utils/output.js.map +1 -1
  628. package/dist/utils/package-json.d.ts +3 -4
  629. package/dist/utils/package-json.d.ts.map +1 -1
  630. package/dist/utils/package-json.js +8 -8
  631. package/dist/utils/package-json.js.map +1 -1
  632. package/dist/utils/population-wiring.d.ts +31 -38
  633. package/dist/utils/population-wiring.d.ts.map +1 -1
  634. package/dist/utils/population-wiring.js +38 -32
  635. package/dist/utils/population-wiring.js.map +1 -1
  636. package/dist/utils/project-root-policy.d.ts +74 -1
  637. package/dist/utils/project-root-policy.d.ts.map +1 -1
  638. package/dist/utils/project-root-policy.js +146 -8
  639. package/dist/utils/project-root-policy.js.map +1 -1
  640. package/dist/utils/projection-lenses.d.ts +25 -7
  641. package/dist/utils/projection-lenses.d.ts.map +1 -1
  642. package/dist/utils/projection-lenses.js +20 -6
  643. package/dist/utils/projection-lenses.js.map +1 -1
  644. package/dist/utils/projection-query.d.ts +18 -11
  645. package/dist/utils/projection-query.d.ts.map +1 -1
  646. package/dist/utils/projection-query.js +47 -28
  647. package/dist/utils/projection-query.js.map +1 -1
  648. package/dist/utils/projection-store.d.ts +2 -2
  649. package/dist/utils/projection-store.d.ts.map +1 -1
  650. package/dist/utils/projection-store.js +74 -45
  651. package/dist/utils/projection-store.js.map +1 -1
  652. package/dist/utils/rag-database.d.ts +61 -0
  653. package/dist/utils/rag-database.d.ts.map +1 -0
  654. package/dist/utils/rag-database.js +178 -0
  655. package/dist/utils/rag-database.js.map +1 -0
  656. package/dist/utils/relation-limits.d.ts +7 -2
  657. package/dist/utils/relation-limits.d.ts.map +1 -1
  658. package/dist/utils/relation-limits.js +6 -1
  659. package/dist/utils/relation-limits.js.map +1 -1
  660. package/dist/utils/relativize-paths.d.ts +23 -0
  661. package/dist/utils/relativize-paths.d.ts.map +1 -1
  662. package/dist/utils/relativize-paths.js +32 -1
  663. package/dist/utils/relativize-paths.js.map +1 -1
  664. package/dist/utils/resource-loader.d.ts +78 -32
  665. package/dist/utils/resource-loader.d.ts.map +1 -1
  666. package/dist/utils/resource-loader.js +134 -66
  667. package/dist/utils/resource-loader.js.map +1 -1
  668. package/dist/utils/run-integrity.d.ts +64 -31
  669. package/dist/utils/run-integrity.d.ts.map +1 -1
  670. package/dist/utils/run-integrity.js +76 -35
  671. package/dist/utils/run-integrity.js.map +1 -1
  672. package/dist/utils/scope-locations.d.ts +7 -5
  673. package/dist/utils/scope-locations.d.ts.map +1 -1
  674. package/dist/utils/scope-locations.js +37 -12
  675. package/dist/utils/scope-locations.js.map +1 -1
  676. package/dist/utils/staging-dir.d.ts +7 -0
  677. package/dist/utils/staging-dir.d.ts.map +1 -0
  678. package/dist/utils/staging-dir.js +12 -0
  679. package/dist/utils/staging-dir.js.map +1 -0
  680. package/dist/utils/url-redact.d.ts +9 -0
  681. package/dist/utils/url-redact.d.ts.map +1 -1
  682. package/dist/utils/url-redact.js +13 -0
  683. package/dist/utils/url-redact.js.map +1 -1
  684. package/dist/utils/user-context-scanner.d.ts +3 -2
  685. package/dist/utils/user-context-scanner.d.ts.map +1 -1
  686. package/dist/utils/user-context-scanner.js +24 -4
  687. package/dist/utils/user-context-scanner.js.map +1 -1
  688. package/dist/utils/validate-help-files.d.ts.map +1 -1
  689. package/dist/utils/validate-help-files.js +8 -14
  690. package/dist/utils/validate-help-files.js.map +1 -1
  691. package/dist/utils/vat-bin-path.d.ts.map +1 -1
  692. package/dist/utils/vat-bin-path.js +3 -3
  693. package/dist/utils/vat-bin-path.js.map +1 -1
  694. package/dist/utils/verdict-helpers.d.ts.map +1 -1
  695. package/dist/utils/verdict-helpers.js +5 -5
  696. package/dist/utils/verdict-helpers.js.map +1 -1
  697. package/docs/agent.md +347 -2
  698. package/docs/audit.md +312 -89
  699. package/docs/doctor.md +65 -19
  700. package/docs/index.md +571 -20
  701. package/docs/mcp.md +64 -12
  702. package/docs/rag.md +176 -48
  703. package/docs/resources.md +257 -71
  704. package/docs/skill-test.md +148 -19
  705. package/docs/skills.md +459 -174
  706. package/package.json +17 -20
  707. package/schemas/agent-build.json +268 -0
  708. package/schemas/agent-import.json +252 -0
  709. package/schemas/agent-install.json +260 -0
  710. package/schemas/agent-installed.json +287 -0
  711. package/schemas/agent-list.json +279 -0
  712. package/schemas/agent-uninstall.json +260 -0
  713. package/schemas/agent-validate.json +279 -0
  714. package/schemas/ard-emit.json +228 -107
  715. package/schemas/audit-settings.json +472 -0
  716. package/schemas/audit.json +635 -0
  717. package/schemas/cache-clear.json +273 -0
  718. package/schemas/claude-marketplace-publish.json +286 -0
  719. package/schemas/claude-marketplace-validate.json +352 -0
  720. package/schemas/claude-org-not-implemented.json +239 -0
  721. package/schemas/claude-plugin-build.json +446 -0
  722. package/schemas/claude-plugin-install.json +291 -0
  723. package/schemas/claude-plugin-list.json +326 -0
  724. package/schemas/claude-plugin-uninstall.json +272 -0
  725. package/schemas/corpus-audit.json +635 -0
  726. package/schemas/corpus-scan.json +293 -0
  727. package/schemas/doctor.json +299 -0
  728. package/schemas/inventory.json +982 -0
  729. package/schemas/mcp-list-collections.json +268 -0
  730. package/schemas/okf-validate.json +224 -106
  731. package/schemas/orchestrator.json +299 -0
  732. package/schemas/rag-clear.json +253 -0
  733. package/schemas/rag-index.json +273 -0
  734. package/schemas/rag-query.json +365 -0
  735. package/schemas/rag-stats.json +269 -0
  736. package/schemas/resources-check.json +280 -118
  737. package/schemas/resources-query.json +333 -0
  738. package/schemas/resources-scan.json +321 -0
  739. package/schemas/resources-validate.json +332 -0
  740. package/schemas/skill-review.json +224 -106
  741. package/schemas/skill-test-configure.json +256 -0
  742. package/schemas/skill-test-run.json +296 -0
  743. package/schemas/skills-build.json +325 -0
  744. package/schemas/skills-install.json +287 -0
  745. package/schemas/skills-list.json +283 -0
  746. package/schemas/skills-package.json +270 -0
  747. package/schemas/skills-validate.json +285 -0
  748. package/dist/commands/skills/shared.d.ts +0 -29
  749. package/dist/commands/skills/shared.d.ts.map +0 -1
  750. package/dist/commands/skills/shared.js +0 -33
  751. package/dist/commands/skills/shared.js.map +0 -1
  752. package/dist/utils/command-error.d.ts +0 -189
  753. package/dist/utils/command-error.d.ts.map +0 -1
  754. package/dist/utils/command-error.js +0 -230
  755. package/dist/utils/command-error.js.map +0 -1
@@ -2,22 +2,24 @@
2
2
  * `vat skill test run <skill>` — execute a packaged skill's eval suite in isolation.
3
3
  *
4
4
  * Thin orchestration layer: parse flags, resolve precedence (flag > config > default),
5
- * print the §12 security warning, call runSkillTestHarness, map result/error to exit code.
6
- * All domain logic lives in run-harness.ts (agent-skills package).
5
+ * print the §12 security warning, call runSkillTestHarness, and publish its outcome as
6
+ * the Report envelope (`run-schema.ts`): each failed eval a finding, a harness that could
7
+ * not run a coded refusal. All domain logic lives in run-harness.ts (agent-skills package).
7
8
  */
8
- import { existsSync } from 'node:fs';
9
9
  import { basename, dirname, extname } from 'node:path';
10
- import { BootstrapNeededError, buildStaleDistWarningLines, DuplicateStagedSkillError, isAcknowledged, conventionalSuiteProbe, packageSkill, packagingConfigToPackageOptions, runPreStageBuild, runSkillTestHarness, SecurityAckError, SKILL_TEST_BUILTIN_CAPS, SkillBuildError, skillTestFailureReason, } from '@vibe-agent-toolkit/agent-skills';
11
- import { ExitCode } from '@vibe-agent-toolkit/schema';
12
- import { findProjectRoot, prefixMessageOnce, resolveAssetReference, safePath, toForwardSlashAnyPlatform } from '@vibe-agent-toolkit/utils';
13
- import { DirectoryListingRefusedError } from '@vibe-agent-toolkit/utils/crawl';
10
+ import { asPackagerRefusal, buildStaleDistWarningLines, DuplicateStagedSkillError, isAcknowledged, isSkillPackagingInputError, conventionalSuiteProbe, locateSkillSource, packageSkill, packagingConfigToPackageOptions, runPreStageBuild, runSkillTestHarness, SecurityAckError, SKILL_SOURCE_SPEC_INVALID_CODE, SKILL_TEST_BUILTIN_CAPS, SkillBuildError, skillTestFailureReason, } from '@vibe-agent-toolkit/agent-skills';
11
+ import { buildReport, ExitCode, toFindings } from '@vibe-agent-toolkit/schema';
12
+ import { ASSET_REFERENCE_UNRESOLVED_CODE, everywhere, findProjectRoot, followedKindSync, forEachInOrder, fsFaultOf, issueLocation, isVatError, pathPresent, prefixMessageOnce, relativeEscapesRoot, resolveAssetReference, safePath, toForwardSlash, toForwardSlashAnyPlatform, } from '@vibe-agent-toolkit/utils';
14
13
  import { Command } from 'commander';
15
14
  import { parseSourceSpec } from '../../../skill-resolution/classify.js';
16
15
  import { findDeclaredSkillForPath, findDeclaredSkillForSourceDir, resolveProjectDeclaredEvalSuites, resolveSkillReference, } from '../../../skill-resolution/index.js';
17
- import { ConfigLoadError, loadConfig, loadConfigCached } from '../../../utils/config-loader.js';
16
+ import { CommandRefusalError, errorMessageOf, refusalCodeOf } from '../../../utils/command-refusal.js';
17
+ import { loadConfig, loadConfigCached } from '../../../utils/config-loader.js';
18
+ import { endWithRefusal, endWithReport, leftoverIssueOf, NOTHING_FINISHED } from '../../../utils/document-writer.js';
18
19
  import { collectRepeated } from '../../../utils/repeatable-option.js';
19
20
  import { isSkillPublished } from '../../../utils/skill-packaging-config.js';
20
21
  import { runClaudePluginBuild } from '../../claude/plugin/build.js';
22
+ import { packagingFailedIssue } from '../../skills/build.js';
21
23
  import { assertValidAuth, assertValidRequireAuth } from './auth-flags.js';
22
24
  /** Extract the trailing path segment (cross-platform) from a path-like string. */
23
25
  function lastPathSegment(p) {
@@ -52,7 +54,7 @@ function coercePositiveInt(value, flagName) {
52
54
  return undefined;
53
55
  const n = Number.parseInt(value, 10);
54
56
  if (!Number.isInteger(n) || n <= 0) {
55
- throw new Error(`${flagName} must be a positive integer. Got: ${value}`);
57
+ throw new CommandRefusalError('USAGE_INVALID', `${flagName} must be a positive integer. Got: ${value}`);
56
58
  }
57
59
  return n;
58
60
  }
@@ -61,7 +63,7 @@ function coercePositiveFloat(value, flagName) {
61
63
  return undefined;
62
64
  const n = Number.parseFloat(value);
63
65
  if (!Number.isFinite(n) || n <= 0) {
64
- throw new Error(`${flagName} must be a positive number. Got: ${value}`);
66
+ throw new CommandRefusalError('USAGE_INVALID', `${flagName} must be a positive number. Got: ${value}`);
65
67
  }
66
68
  return n;
67
69
  }
@@ -120,14 +122,15 @@ export function deriveDeclaredExecutableNames(executables) {
120
122
  function parseWithPair(pair) {
121
123
  const eq = pair.indexOf('=');
122
124
  if (eq <= 0) {
123
- throw new Error(`--with entries must be "name=<src>" (e.g. mydep=workspace:foo, bar=npm:@scope/s@1.2.3, baz=path:../baz). Got: ${pair}`);
125
+ throw new CommandRefusalError('USAGE_INVALID', `--with entries must be "name=<src>" (e.g. mydep=workspace:foo, bar=npm:@scope/s@1.2.3, baz=path:../baz). Got: ${pair}`);
124
126
  }
125
127
  const name = pair.slice(0, eq);
126
128
  try {
127
129
  return [name, parseSourceSpec(pair.slice(eq + 1))];
128
130
  }
129
131
  catch (e) {
130
- throw new Error(`--with: ${e instanceof Error ? e.message : String(e)} (in ${pair})`);
132
+ // A source spec that does not parse is the flag's mistake, whatever parseSourceSpec threw.
133
+ throw new CommandRefusalError('USAGE_INVALID', `--with: ${e instanceof Error ? e.message : String(e)} (in ${pair})`, { cause: e });
131
134
  }
132
135
  }
133
136
  /** Parse an array of `name=src` flag values into a name→spec record. */
@@ -185,7 +188,7 @@ export function descriptorsToRecord(list) {
185
188
  * subject's block.
186
189
  */
187
190
  function declaredSkillTestConfig(link) {
188
- return loadConfigCached(link.configRoot)?.skills?.config?.[link.name]?.test;
191
+ return loadConfigCached(link.configRoot, 'source')?.skills?.config?.[link.name]?.test;
189
192
  }
190
193
  /**
191
194
  * Load the persisted `skills.config.<skill>.test` block for the subject skill,
@@ -227,7 +230,7 @@ async function loadTestConfig(subject, cwd) {
227
230
  const projectRoot = findProjectRoot(cwd);
228
231
  if (projectRoot === null)
229
232
  return undefined;
230
- const perSkill = loadConfig(projectRoot)?.skills?.config;
233
+ const perSkill = loadConfig(projectRoot, 'source')?.skills?.config;
231
234
  if (perSkill === undefined)
232
235
  return undefined;
233
236
  // Last-resort basename fallback (see doc comment above): only reached when neither
@@ -255,7 +258,7 @@ function loadGlobalTestConfig(cwd) {
255
258
  const projectRoot = findProjectRoot(cwd);
256
259
  if (projectRoot === null)
257
260
  return undefined;
258
- return loadConfig(projectRoot)?.test;
261
+ return loadConfig(projectRoot, 'source')?.test;
259
262
  }
260
263
  /** Copy flag-only passthrough options (no config counterpart) onto opts. */
261
264
  function applyFlagOnlyOptions(opts, options) {
@@ -273,8 +276,6 @@ function applyFlagOnlyOptions(opts, options) {
273
276
  opts.allowUnverifiedSkillSource = options.allowUnverifiedSkillSource;
274
277
  if (options.iUnderstandThisRunsSkillCode !== undefined)
275
278
  opts.acknowledgedRunsSkillCode = options.iUnderstandThisRunsSkillCode;
276
- if (options.allowEvalFailure !== undefined)
277
- opts.tolerateEvalFailure = options.allowEvalFailure;
278
279
  }
279
280
  /** Apply flag>config merges for scalar knobs (auth, model, baseline, eval/prompt). */
280
281
  function applyScalarMerges(opts, options, config) {
@@ -295,10 +296,25 @@ function applyScalarMerges(opts, options, config) {
295
296
  // against the skill source, because config travels with the skill. Both then
296
297
  // reach the harness as one field, and both accept a path or an npm bare
297
298
  // specifier (a suite published as a shared corpus).
298
- const evalsRef = options.evals === undefined ? config?.evals : resolveAssetReference(options.evals, process.cwd());
299
+ const evalsRef = options.evals === undefined ? config?.evals : resolveEvalsFlag(options.evals);
299
300
  if (evalsRef !== undefined)
300
301
  opts.evalsSubpath = evalsRef;
301
302
  }
303
+ /**
304
+ * Resolve `--evals` against the cwd, refusing a specifier that names nothing as
305
+ * the invocation's mistake. (`test.evals` from config is resolved — and refused
306
+ * as the config's — by the harness, which knows the skill source it is relative to.)
307
+ */
308
+ function resolveEvalsFlag(evals) {
309
+ try {
310
+ return resolveAssetReference(evals, process.cwd());
311
+ }
312
+ catch (error) {
313
+ if (!isVatError(error, ASSET_REFERENCE_UNRESOLVED_CODE))
314
+ throw error;
315
+ throw new CommandRefusalError('USAGE_INVALID', `--evals names no eval suite: ${error.message}`, { cause: error });
316
+ }
317
+ }
302
318
  /**
303
319
  * Resolve `--baseline` with flag > config precedence, ANNOUNCING a config-sourced
304
320
  * enable on stderr.
@@ -378,7 +394,7 @@ function applyKnobMerges(opts, knobs, config) {
378
394
  function parseEnvPair(pair) {
379
395
  const eq = pair.indexOf('=');
380
396
  if (eq <= 0) {
381
- throw new Error(`--env entries must be "KEY=VALUE" (e.g. CUSTOMER_SNAPSHOT_PATH=\${fixturesDir}/snapshot.json). Got: ${pair}`);
397
+ throw new CommandRefusalError('USAGE_INVALID', `--env entries must be "KEY=VALUE" (e.g. CUSTOMER_SNAPSHOT_PATH=\${fixturesDir}/snapshot.json). Got: ${pair}`);
382
398
  }
383
399
  return [pair.slice(0, eq), pair.slice(eq + 1)];
384
400
  }
@@ -414,11 +430,39 @@ function applyEnvMerges(opts, options, config) {
414
430
  if (passEnv !== undefined)
415
431
  opts.passEnv = passEnv;
416
432
  }
417
- /** Apply flag>config merges for the companion-skill records (with/optional). */
418
- function applyDepMerges(opts, options, config) {
419
- const withSources = parseWithFlags(options.with) ?? descriptorsToRecord(config?.with);
420
- if (withSources !== undefined)
433
+ /**
434
+ * Refuse a `{ path }` or `{ npm }` skill source that names nothing — an npm
435
+ * package that is not installed, a scoped specifier, an unpinned npm spec — as
436
+ * the mistake of whoever wrote it: `refusal` is `USAGE_INVALID` for a flag or
437
+ * the positional, `CONFIG_INVALID` for the config. Checked here because staging,
438
+ * where it would otherwise surface, cannot tell the two apart.
439
+ */
440
+ function requireSourceLocatable(source, repoRoot, refusal, origin) {
441
+ try {
442
+ locateSkillSource(source, repoRoot);
443
+ }
444
+ catch (error) {
445
+ if (!isVatError(error, ASSET_REFERENCE_UNRESOLVED_CODE) && !isVatError(error, SKILL_SOURCE_SPEC_INVALID_CODE))
446
+ throw error;
447
+ throw new CommandRefusalError(refusal, `${origin} names no skill source: ${errorMessageOf(error)}`, { cause: error });
448
+ }
449
+ }
450
+ /**
451
+ * Apply flag>config merges for the companion-skill records (with/optional).
452
+ *
453
+ * Required companions must name something ({@link requireSourceLocatable}).
454
+ * Optional ones are not checked: one that cannot stage is skipped with a warning.
455
+ */
456
+ function applyDepMerges(opts, options, config, repoRoot) {
457
+ const withFlags = parseWithFlags(options.with);
458
+ const withSources = withFlags ?? descriptorsToRecord(config?.with);
459
+ if (withSources !== undefined) {
460
+ const [refusal, origin] = withFlags === undefined ? ['CONFIG_INVALID', 'test.with in the project config'] : ['USAGE_INVALID', '--with'];
461
+ for (const [name, spec] of Object.entries(withSources)) {
462
+ requireSourceLocatable(spec, repoRoot, refusal, `${origin} companion '${name}'`);
463
+ }
421
464
  opts.withSources = withSources;
465
+ }
422
466
  const withOptional = parseWithFlags(options.withOptional) ?? descriptorsToRecord(config?.optional);
423
467
  if (withOptional !== undefined)
424
468
  opts.withOptional = withOptional;
@@ -449,7 +493,7 @@ function buildHarnessOpts(subject, options, knobs, config, globalTest, resolvedS
449
493
  applyFlagOnlyOptions(opts, options);
450
494
  applyScalarMerges(opts, options, config);
451
495
  applyKnobMerges(opts, knobs, config);
452
- applyDepMerges(opts, options, config);
496
+ applyDepMerges(opts, options, config, repoRoot);
453
497
  applyEnvMerges(opts, options, config);
454
498
  applyGraderMerges(opts, options, knobs, globalTest);
455
499
  applyResolvedSubject(opts, resolvedSubject);
@@ -489,6 +533,7 @@ export async function resolveSubjectForTest(ref, cwd, flags, memo, buildCommand)
489
533
  const resolved = await resolveSkillReference(ref, cwd);
490
534
  switch (resolved.kind) {
491
535
  case 'source':
536
+ requireSourceLocatable(resolved.source, resolveRepoRoot(), 'USAGE_INVALID', `the skill reference '${ref}'`);
492
537
  return {
493
538
  subjectSource: resolved.source,
494
539
  rebuilt: false,
@@ -527,7 +572,7 @@ function isInPlaceSkill(ref) {
527
572
  * when --no-build is set but no dist exists.
528
573
  */
529
574
  function resolveExistingDistOrThrow(ref, flags) {
530
- if (existsSync(ref.expectedDistDir)) {
575
+ if (pathPresent(ref.expectedDistDir, { follow: ref.configRoot }, everywhere('source'), 'probe')) {
531
576
  if (flags.noBuild) {
532
577
  process.stderr.write(`Using existing dist (NOT rebuilt): ${ref.expectedDistDir}\n`);
533
578
  }
@@ -576,12 +621,12 @@ export function buildMemoKey(ref) {
576
621
  * and is always checked.
577
622
  */
578
623
  function verifyBuiltDist(ref) {
579
- if (!existsSync(ref.expectedDistDir)) {
624
+ if (!pathPresent(ref.expectedDistDir, { follow: ref.configRoot }, everywhere('source'), 'probe')) {
580
625
  throw new SkillBuildError(`Skill build for '${ref.name}' reported success but produced no output at ${ref.expectedDistDir}. ` +
581
626
  `Check the skill's packaging config (\`vat build\` should create this directory).`);
582
627
  }
583
628
  const skillMdPath = safePath.join(ref.expectedDistDir, 'SKILL.md');
584
- if (!existsSync(skillMdPath)) {
629
+ if (!pathPresent(skillMdPath, { follow: ref.configRoot }, everywhere('source'), 'probe')) {
585
630
  throw new SkillBuildError(`Skill build for '${ref.name}' reported success but produced no SKILL.md at ${ref.expectedDistDir}. ` +
586
631
  `Check the skill's packaging config (\`vat build\` should create this file).`);
587
632
  }
@@ -631,6 +676,7 @@ async function runDeclaredSkillBuild(ref) {
631
676
  // excludes every skill's test input. Getting this wrong would hand the executor
632
677
  // under test another skill's answer key — the exact signal the harness exists to
633
678
  // protect. Memoized per config root, so a multi-skill run discovers once.
679
+ // A source fault inside the packager is the SKILL_PACKAGING_FAILED finding (buildFailureOf).
634
680
  await packageSkill(ref.sourcePath, packagingConfigToPackageOptions(ref.packagingConfig, { skillPath: ref.sourcePath, outputPath: ref.expectedDistDir },
635
681
  // `'refuse'`: staging a dist around a directory discovery could not
636
682
  // list may hand the executor another skill's answer key. The throw is
@@ -644,10 +690,13 @@ async function runDeclaredSkillBuild(ref) {
644
690
  // run-scoped seam threaded this far down to hang one on. The lane that made
645
691
  // the O(S²) matter (`vat resources validate`, measured at 10,815 probes over
646
692
  // 103 paths) hoists its probe; see the comment there.
647
- conventionalSuiteProbe()));
693
+ conventionalSuiteProbe())).catch((error) => {
694
+ throw asPackagerRefusal(error);
695
+ });
648
696
  return;
649
697
  }
650
- await runClaudePluginBuild(ref.configRoot, { marketplace: ref.distribution.marketplaceName });
698
+ // This run built no `dist/skills` of its own: the pool the marketplace copies in is an input.
699
+ await runClaudePluginBuild(ref.configRoot, { marketplace: ref.distribution.marketplaceName, runOutputs: [] });
651
700
  }
652
701
  /**
653
702
  * Build a declared skill (BuildableReference) into its `expectedDistDir`, or reuse
@@ -719,7 +768,8 @@ async function buildDeclaredSkill(ref, flags, memo, buildCommand) {
719
768
  await runDeclaredSkillBuild(ref);
720
769
  }
721
770
  catch (e) {
722
- throw new SkillBuildError(`Skill build failed for '${ref.name}': ${e instanceof Error ? e.message : String(e)}`);
771
+ // The throw rides along as `cause`: it, not this wrap, decides the refusal (runFailureOf).
772
+ throw new SkillBuildError(`Skill build failed for '${ref.name}': ${e instanceof Error ? e.message : String(e)}`, { cause: e, sourcePath: ref.sourcePath });
723
773
  }
724
774
  // Record the operation as soon as the build COMMAND succeeded — before verifying
725
775
  // this ref's output. The build did run; a marketplace sibling must not re-run it
@@ -870,9 +920,10 @@ export async function resolveCompanionSources(sources, repoRoot, flags, optional
870
920
  if (sources === undefined)
871
921
  return undefined;
872
922
  const resolved = {};
873
- for (const [name, spec] of Object.entries(sources)) {
923
+ // In order: the shared `memo` may stage or clone, and its first user must not race.
924
+ await forEachInOrder(Object.entries(sources), async ([name, spec]) => {
874
925
  resolved[name] = await resolveCompanionSpec(name, spec, repoRoot, flags, optional, memo);
875
- }
926
+ });
876
927
  return resolved;
877
928
  }
878
929
  /**
@@ -902,11 +953,14 @@ function warnIfPathTargetBypassesConfig(subject) {
902
953
  // ---------------------------------------------------------------------------
903
954
  // Testable action
904
955
  // ---------------------------------------------------------------------------
956
+ /** `vat skill test run` has no `--strict`: a warning (a tolerated eval failure) never fails it. */
957
+ const RUN_GATE = { strict: false };
905
958
  /**
906
959
  * Validate usage-level flags (auth values, numeric knobs) and load the subject's
907
- * persisted test config. Runs before the async harness work, so a bad flag exits
908
- * with a clean message + `Reason: preflight` instead of surfacing as an unhandled
909
- * promise rejection (raw stack trace, exit 1).
960
+ * persisted test config. Runs before the async harness work, so a bad flag is a
961
+ * coded refusal instead of an unhandled promise rejection (raw stack trace).
962
+ *
963
+ * @returns The knobs and config, or `undefined` once the run has been refused
910
964
  */
911
965
  async function preflightKnobsAndConfig(subject, options, cwd) {
912
966
  try {
@@ -919,50 +973,163 @@ async function preflightKnobsAndConfig(subject, options, cwd) {
919
973
  };
920
974
  }
921
975
  catch (err) {
922
- process.stderr.write(`Error: ${err instanceof Error ? err.message : String(err)}\n`);
923
- exitWithReason('preflight');
976
+ refuseRun(err);
977
+ return undefined;
924
978
  }
925
979
  }
926
980
  /**
927
- * End the run on `ERROR`, saying WHY on stderr.
981
+ * `path` as a finding `location`: relative to the project root, or `undefined`
982
+ * when it lies outside the project (a location is a file inside the project to
983
+ * open — an OS temp copy or another tree is not one).
984
+ */
985
+ function projectLocation(path) {
986
+ const relative = issueLocation(path, resolveRepoRoot());
987
+ return relativeEscapesRoot(relative) ? undefined : relative;
988
+ }
989
+ /**
990
+ * The refusal of a build that THREW, decided by what it threw: a coded value keeps
991
+ * its own refusal — an unlistable directory `INPUT_UNREADABLE`, a broken config
992
+ * `CONFIG_INVALID`, the same codes those carry on every other path; the packager
993
+ * refusing the skill's own content is the `SKILL_PACKAGING_FAILED` finding (as
994
+ * `vat skills build` / `package` publish it) on a run that stopped before any eval,
995
+ * `RUN_INCOMPLETE`; and anything uncoded is a defect, `INTERNAL_ERROR`.
928
996
  *
929
- * The reason used to be three exit codes (1 internal, 2 preflight, 3
930
- * bootstrap). Under the one exit-code contract every verb shares, every way the
931
- * harness could not run is `ERROR`, and the `Reason:` line is where a CI
932
- * author reads "harness broke" apart from "my environment is wrong".
997
+ * @param thrown - What the build threw
998
+ * @param message - The refusal's message, as the lane words it
999
+ * @param sourcePath - The skill's `SKILL.md`, when the lane knows which skill it was building
933
1000
  */
934
- function exitWithReason(reason) {
935
- process.stderr.write(`Reason: ${reason}\n`);
936
- process.exit(ExitCode.ERROR);
1001
+ function buildFailureOf(thrown, message, sourcePath) {
1002
+ const code = refusalCodeOf(thrown);
1003
+ if (code !== 'INTERNAL_ERROR')
1004
+ return { code, findings: [] };
1005
+ if (!isSkillPackagingInputError(thrown))
1006
+ return { code: 'INTERNAL_ERROR', findings: [] };
1007
+ const location = sourcePath === undefined ? undefined : projectLocation(sourcePath);
1008
+ return { code: 'RUN_INCOMPLETE', findings: [packagingFailedIssue(message, location, 're-run vat skill test run', thrown)] };
937
1009
  }
938
1010
  /**
939
- * End the run on the harness's own verdict: the `Summary:` line on stdout (the
940
- * one channel kept machine-readable), the `Reason:` line on stderr when the
941
- * harness could not run, and the exit code the harness decided.
1011
+ * WHY a thrown value stopped the run: the refusal the document publishes, the
1012
+ * `Reason:` stderr restates for a CI log, and any finding that stands.
1013
+ *
1014
+ * The code is the thrown value's own ({@link refusalCodeOf}): each skill-test error
1015
+ * names its refusal by its code, and anything uncoded is `INTERNAL_ERROR`. A build
1016
+ * that threw ({@link SkillBuildError}) is classified by its cause, and a packager
1017
+ * refusal that arrives unwrapped — a `workspace:` companion is packaged inside the
1018
+ * harness — by itself, both through {@link buildFailureOf}: a broken config, an
1019
+ * unlistable directory or a skill the packager refused publishes the same thing
1020
+ * whichever of subject resolution, companion resolution or staging surfaced it.
1021
+ * `Reason:` then follows the code, so the two can never disagree: `internal` exactly
1022
+ * for `INTERNAL_ERROR`, `bootstrap` for the scaffolded `evals.json`, and `preflight`
1023
+ * for every other refusal.
942
1024
  */
943
- function exitWithResult(result) {
944
- process.stdout.write(`Summary: ${result.summary}\n`);
945
- if (result.reason !== undefined)
946
- process.stderr.write(`Reason: ${result.reason}\n`);
947
- process.exit(result.exitCode);
1025
+ function runFailureOf(err) {
1026
+ const built = isVatError(err, 'SKILL_TEST_BUILD_FAILED') && err.cause !== undefined
1027
+ ? buildFailureOf(err.cause, err.message, err.sourcePath)
1028
+ : buildFailureOf(err, errorMessageOf(err), undefined);
1029
+ if (skillTestFailureReason(err) === 'bootstrap')
1030
+ return { ...built, reason: 'bootstrap' };
1031
+ return { ...built, reason: built.code === 'INTERNAL_ERROR' ? 'internal' : 'preflight' };
948
1032
  }
949
1033
  /**
950
- * The reason for an error escaping EITHER phase of {@link runSkillTestRun}.
1034
+ * Refuse the run: `Reason:` on stderr, then the envelope's error branch (its
1035
+ * message on stderr too), exit 2. No eval finished — every refusal lands before the
1036
+ * harness has a verdict — so what stands is only the findings the failure names.
1037
+ */
1038
+ function refuse(failure, error) {
1039
+ process.stderr.write(`Reason: ${failure.reason}\n`);
1040
+ const finished = failure.findings.length === 0
1041
+ ? NOTHING_FINISHED
1042
+ : { examined: 0, findings: toFindings(failure.findings), data: null };
1043
+ endWithRefusal('skill test run', failure.code, error, 'yaml', RUN_GATE, finished);
1044
+ }
1045
+ /** Refuse the run for a thrown value, as {@link runFailureOf} classifies it. */
1046
+ function refuseRun(err) {
1047
+ refuse(runFailureOf(err), err);
1048
+ }
1049
+ /**
1050
+ * Name, on stderr, the paths the operator reads next.
951
1051
  *
952
- * A broken governing config ({@link ConfigLoadError}) is a user-fixable PREFLIGHT
953
- * problem, not an internal harness failure — {@link skillTestFailureReason} has
954
- * no case for it and falls through to `internal`. ONE helper shared by BOTH catch
955
- * blocks so the SUBJECT arm and the COMPANION arm can never drift: a companion's
956
- * governing config root can differ from the subject's, so a broken config is
957
- * reachable from either arm and must report the same reason from both.
1052
+ * `Harness:` is asked of the PATH rather than re-derived from --keep/--out/--workdir:
1053
+ * the retention rule has ONE author (cleanupHarness), which runs inside the harness's
1054
+ * own `finally` before this result arrives — a run that returns before Step 7 creates
1055
+ * `results/` has had its root removed outright. Swallowing a refused probe is right here and only
1056
+ * here: the question is whether a cosmetic line about VAT's own scratch dir is worth
1057
+ * printing, and a root the OS refuses to stat is not one worth sending anyone to.
1058
+ *
1059
+ * `Results:` names the artifacts the help text tells the operator to read — on a
1060
+ * default run results/ is the only thing left under the root. `Workspaces:` names the
1061
+ * executor's working directories, which live outside the root under an unguessable
1062
+ * token and survive only under --keep; the harness reports them only then.
958
1063
  */
959
- function reasonForRunError(err) {
960
- // A directory the governing `skills.include` reaches and the crawl cannot list
961
- // is the same class: discovery refuses it by name, and the remedy is `chmod` or
962
- // a narrower include pattern — the operator's, not the harness's.
963
- return err instanceof ConfigLoadError || err instanceof DirectoryListingRefusedError
964
- ? 'preflight'
965
- : skillTestFailureReason(err);
1064
+ function reportHarnessPaths(result) {
1065
+ if (harnessRootPresent(result.harnessPath))
1066
+ process.stderr.write(`Harness: ${result.harnessPath}\n`);
1067
+ if (result.resultsPath !== undefined)
1068
+ process.stderr.write(`Results: ${result.resultsPath}\n`);
1069
+ if (result.workspacesPath !== undefined)
1070
+ process.stderr.write(`Workspaces: ${result.workspacesPath}\n`);
1071
+ }
1072
+ /**
1073
+ * Whether VAT's own harness root (a directory this run minted: its own `within`) is still there.
1074
+ * A probe the OS refuses answers "no" — see {@link reportHarnessPaths} for why that, and only
1075
+ * that, is swallowed here; anything but a filesystem fault is a defect and stays loud.
1076
+ */
1077
+ function harnessRootPresent(harnessPath) {
1078
+ try {
1079
+ return followedKindSync(harnessPath, harnessPath) !== 'absent';
1080
+ }
1081
+ catch (error) {
1082
+ if (fsFaultOf(error) === undefined)
1083
+ throw error;
1084
+ return false;
1085
+ }
1086
+ }
1087
+ /**
1088
+ * One failed eval as a finding about the eval: `error` by default (fail-closed, exit
1089
+ * 1), `warning` under `--allow-eval-failure`, so the exit derives 0 while the
1090
+ * finding still says which eval failed.
1091
+ */
1092
+ function evalFailedIssue(id, suiteLocation, tolerated) {
1093
+ return {
1094
+ code: 'SKILL_TEST_EVAL_FAILED',
1095
+ severity: tolerated ? 'warning' : 'error',
1096
+ message: `Eval '${id}' did not pass: an output expectation or its tool verdict failed.`,
1097
+ // The file to open is the suite; the eval inside it is the field.
1098
+ ...(suiteLocation === undefined ? {} : { location: suiteLocation }),
1099
+ field: id,
1100
+ fix: "Read the eval's entry in results/grading.json and results/tool-eval.json.",
1101
+ };
1102
+ }
1103
+ /**
1104
+ * Publish what the harness returned and end on the code the document derives: a
1105
+ * completed run's evals as the report (each failed one a finding), or the refusal
1106
+ * the harness decided where it saw the cause. The human verdict line stays on
1107
+ * stderr as `Summary:`; stdout carries the document and nothing else.
1108
+ */
1109
+ function endWithHarnessResult(subject, result, allowEvalFailure) {
1110
+ // Temp directories the harness could not remove once the run was done: one warning each, on either branch.
1111
+ const leftovers = result.leftovers.map((leftover) => leftoverIssueOf(leftover));
1112
+ if (result.exitCode === ExitCode.ERROR) {
1113
+ refuse({ code: result.refusal, reason: result.reason, findings: leftovers }, result.description);
1114
+ return;
1115
+ }
1116
+ process.stderr.write(`Summary: ${result.description}\n`);
1117
+ const failed = result.evals.filter((outcome) => !outcome.passed);
1118
+ const suiteLocation = projectLocation(result.evalsPath);
1119
+ endWithReport('skill test run', buildReport({
1120
+ examined: result.examined,
1121
+ findings: toFindings([...failed.map((outcome) => evalFailedIssue(outcome.id, suiteLocation, allowEvalFailure)), ...leftovers]),
1122
+ data: {
1123
+ skill: subject,
1124
+ description: result.description,
1125
+ evals: result.evals.map(({ id, passed }) => ({ id, passed })),
1126
+ artifacts: {
1127
+ frictionReport: result.frictionReportPath === null ? null : toForwardSlash(result.frictionReportPath),
1128
+ outputDir: toForwardSlash(result.harnessPath),
1129
+ },
1130
+ },
1131
+ gate: RUN_GATE,
1132
+ }), 'yaml');
966
1133
  }
967
1134
  /**
968
1135
  * Copy the resolved-subject fields onto the harness options. Optional fields are
@@ -983,6 +1150,26 @@ function applyResolvedSubject(harnessOpts, subject) {
983
1150
  harnessOpts.declaredExecutables = subject.declaredExecutables;
984
1151
  }
985
1152
  }
1153
+ /**
1154
+ * Assemble the harness options (companion records included) and run the harness.
1155
+ * Every throw here — a repeated companion name, a companion that would not build,
1156
+ * a broken companion config, the harness's own refusals — reaches the caller's one
1157
+ * refusal path.
1158
+ */
1159
+ async function runHarnessFor(subject, options, preflight, resolvedSubject, buildFlags, buildMemo) {
1160
+ const harnessOpts = buildHarnessOpts(subject, options, preflight.knobs, preflight.config, preflight.globalTest, resolvedSubject);
1161
+ // Companion build resolution: a --with/--with-optional companion whose source is a
1162
+ // path into a declared skill gets built (its `files:` injection runs) exactly like
1163
+ // the subject, instead of a raw source-tree copy.
1164
+ const repoRoot = resolveRepoRoot();
1165
+ const withSources = await resolveCompanionSources(harnessOpts.withSources, repoRoot, buildFlags, false, buildMemo);
1166
+ if (withSources !== undefined)
1167
+ harnessOpts.withSources = withSources;
1168
+ const withOptional = await resolveCompanionSources(harnessOpts.withOptional, repoRoot, buildFlags, true, buildMemo);
1169
+ if (withOptional !== undefined)
1170
+ harnessOpts.withOptional = withOptional;
1171
+ return runSkillTestHarness(harnessOpts);
1172
+ }
986
1173
  /**
987
1174
  * The unit-testable action for `vat skill test run`. Exported so tests can
988
1175
  * call it directly without parsing CLI args. Calls process.exit on completion.
@@ -994,7 +1181,10 @@ function applyResolvedSubject(harnessOpts, subject) {
994
1181
  */
995
1182
  export async function runSkillTestRun(subject, options) {
996
1183
  printSecurityWarning();
997
- const { knobs, config, globalTest } = await preflightKnobsAndConfig(subject, options, process.cwd());
1184
+ const preflight = await preflightKnobsAndConfig(subject, options, process.cwd());
1185
+ // 🪤 `return` after a refusal: under test `process.exit` is a spy that RETURNS.
1186
+ if (preflight === undefined)
1187
+ return;
998
1188
  // Commander stores the `--no-build` negatable flag under `build` (=== false when set);
999
1189
  // honor an explicit programmatic `noBuild` too.
1000
1190
  const noBuild = options.noBuild === true || options.build === false;
@@ -1019,87 +1209,18 @@ export async function runSkillTestRun(subject, options) {
1019
1209
  // that is both the subject and a companion builds exactly once, and N companions
1020
1210
  // in one marketplace trigger ONE marketplace build, not N.
1021
1211
  const buildMemo = new Set();
1022
- let resolvedSubject;
1023
- try {
1024
- resolvedSubject = await resolveSubjectForTest(subject, process.cwd(), buildFlags, buildMemo, config?.build);
1025
- }
1026
- catch (err) {
1027
- // A broken governing config surfacing during subject resolution is a preflight
1028
- // problem the user must fix, not an internal harness failure.
1029
- process.stderr.write(`Error: ${err instanceof Error ? err.message : String(err)}\n`);
1030
- // 🪤 `return` after a `never`: under test `process.exit` is a spy that RETURNS.
1031
- exitWithReason(reasonForRunError(err));
1032
- return;
1033
- }
1034
- warnIfPathTargetBypassesConfig(resolvedSubject);
1212
+ let result;
1035
1213
  try {
1036
- // buildHarnessOpts assembles the companion records (--with/--with-optional and
1037
- // config with:/optional:) and can throw DuplicateStagedSkillError on a repeated
1038
- // name — inside the try so it reads as preflight like every other preflight error.
1039
- const harnessOpts = buildHarnessOpts(subject, options, knobs, config, globalTest, resolvedSubject);
1040
- // Companion build resolution: a --with/--with-optional companion
1041
- // whose source is a path into a declared skill gets built (its `files:`
1042
- // injection runs) exactly like the subject, instead of a raw source-tree copy.
1043
- const repoRoot = resolveRepoRoot();
1044
- const withSources = await resolveCompanionSources(harnessOpts.withSources, repoRoot, buildFlags, false, buildMemo);
1045
- if (withSources !== undefined)
1046
- harnessOpts.withSources = withSources;
1047
- const withOptional = await resolveCompanionSources(harnessOpts.withOptional, repoRoot, buildFlags, true, buildMemo);
1048
- if (withOptional !== undefined)
1049
- harnessOpts.withOptional = withOptional;
1050
- const result = await runSkillTestHarness(harnessOpts);
1051
- // Same rule as the `Workspaces:` line below — "a populated value is a promise
1052
- // that the path is still there" — applied to the sibling it was written next to
1053
- // and not applied to. Harness cleanup runs inside the harness's own `finally`,
1054
- // BEFORE this result reaches the CLI: a run that returns before Step 7 creates
1055
- // `results/` (the §12 security-ack refusal, and the preflight-failure branch
1056
- // reachable from a `--require-auth` mismatch) leaves the harness root with no
1057
- // `results/` child, and cleanup removes the ROOT outright. Printing the path
1058
- // anyway hands the operator a directory that no longer exists.
1059
- //
1060
- // Asked of the PATH rather than re-derived from --keep/--out/--workdir on
1061
- // purpose: the retention rule has ONE author (cleanupHarness), and a second copy
1062
- // of its predicate here would drift from it. The filesystem cannot.
1063
- if (existsSync(result.harnessPath)) {
1064
- process.stderr.write(`Harness: ${result.harnessPath}\n`);
1065
- }
1066
- // The artifacts this command's help text tells the operator to read
1067
- // (grading.json / friction.json / baseline.json). Reported separately from the
1068
- // harness path because on a default run — no --out, no --workdir, no --keep —
1069
- // results/ is the ONLY thing left under it: everything else is staged untrusted
1070
- // bytes that cleanup evicts. Pointing at the harness root alone made the
1071
- // operator guess which of its children still existed.
1072
- if (result.resultsPath !== undefined) {
1073
- process.stderr.write(`Results: ${result.resultsPath}\n`);
1074
- }
1075
- // The executor's working directories live OUTSIDE the harness root under an
1076
- // unguessable token, so the harness path no longer leads an operator to them.
1077
- // Under --keep they survive holding everything the evals produced; unreported,
1078
- // they would be an orphan the operator cannot find to inspect or reap. On every
1079
- // other run cleanup deletes them, and the harness answers with no
1080
- // `workspacesPath` at all — the retention rule has ONE author, over there, so
1081
- // this stays a plain presence check and never a second copy of it.
1082
- if (result.workspacesPath !== undefined) {
1083
- process.stderr.write(`Workspaces: ${result.workspacesPath}\n`);
1084
- }
1085
- exitWithResult(result);
1086
- return;
1214
+ const resolvedSubject = await resolveSubjectForTest(subject, process.cwd(), buildFlags, buildMemo, preflight.config?.build);
1215
+ warnIfPathTargetBypassesConfig(resolvedSubject);
1216
+ result = await runHarnessFor(subject, options, preflight, resolvedSubject, buildFlags, buildMemo);
1087
1217
  }
1088
1218
  catch (err) {
1089
- // Same rule as the subject arm above (see {@link reasonForRunError}): companion
1090
- // resolution can surface a ConfigLoadError from a DIFFERENT config root than the
1091
- // subject's, and that must read as preflight, not internal.
1092
- // BootstrapNeededError is the happy "wrote a template, fill it in and
1093
- // re-run" path — surface its message plainly, not as a hard `Error:`.
1094
- if (err instanceof BootstrapNeededError) {
1095
- process.stderr.write(`${err.message}\n`);
1096
- }
1097
- else {
1098
- process.stderr.write(`Error: ${err instanceof Error ? err.message : String(err)}\n`);
1099
- }
1100
- exitWithReason(reasonForRunError(err));
1219
+ refuseRun(err);
1101
1220
  return;
1102
1221
  }
1222
+ reportHarnessPaths(result);
1223
+ endWithHarnessResult(subject, result, options.allowEvalFailure === true);
1103
1224
  }
1104
1225
  // ---------------------------------------------------------------------------
1105
1226
  // Commander command builder
@@ -1130,7 +1251,7 @@ export function createSkillTestRunCommand() {
1130
1251
  // tri-state is what lets a flag beat config in BOTH directions (see resolveBaseline).
1131
1252
  .option('--baseline', "A/B the skill's INSTRUCTIONS (declared vs withheld) and report the lift on stderr. Runs every eval TWICE, so it roughly DOUBLES the spawns and the spend (--max-budget-usd is per-spawn). Both arms share a filesystem — not a capability control; see baselineDelta and baselineIntegrity in baseline.json")
1132
1253
  .option('--no-baseline', 'Force the baseline A/B OFF for this run, overriding a committed `test.baseline: true` in the project config (which is announced on stderr when it applies).')
1133
- .option('--allow-eval-failure', 'Opt out of the fail-closed default: exit 0 even when an eval fails (for interactive use). By DEFAULT a failing eval exits 1, distinct from the harness-could-not-run exit 2 (with a Reason: line) so CI can gate on it.')
1254
+ .option('--allow-eval-failure', 'Opt out of the fail-closed default: publish each failed eval as a warning and exit 0 (for interactive use). By DEFAULT a failed eval is an error finding and exits 1, distinct from the harness-could-not-run exit 2 (a refusal with error.code) so CI can gate on it.')
1134
1255
  .option('--allow-unverified-skill-source', 'Skip the vendored manifest integrity check')
1135
1256
  .option('--i-understand-this-runs-skill-code', 'Acknowledge this command executes skill code (required)')
1136
1257
  .option('--model <id>', "Model ID passed VERBATIM to `claude --model <id>` for the model UNDER TEST (the executor). VAT does no mapping/validation (e.g. opus, sonnet, claude-opus-4-8). Omit to use claude's own default model. Independent of --grader-model.")
@@ -1171,7 +1292,9 @@ Artifacts:
1171
1292
  it are removed.
1172
1293
 
1173
1294
  --out or --workdir spares only the harness ROOT: it is a location you own, so
1174
- vat never deletes it, and the staged (untrusted) skill bytes inside it stay
1295
+ vat never deletes it (nor changes an existing --out's mode: on POSIX it must
1296
+ already be a 0700 directory, or not exist yet; Windows has no mode check, so
1297
+ there it need only be a directory), and the staged (untrusted) skill bytes inside it stay
1175
1298
  until you delete them yourself. It is NOT a blanket "keep everything". Three
1176
1299
  vat-owned directories live OUTSIDE that root -- the grader's output dir, the
1177
1300
  held eval suite, and the per-eval executor WORKSPACES (every eval's working
@@ -1205,13 +1328,52 @@ Model:
1205
1328
  --concurrency follows the same GLOBAL precedence for the executor->grader
1206
1329
  pipeline width (default 4).
1207
1330
 
1331
+ Output:
1332
+ YAML report on stdout (schema: packages/cli/schemas/skill-test-run.json):
1333
+ status ok|findings|error, examined (the evals graded; on --dry-run, the evals
1334
+ staged), one SKILL_TEST_EVAL_FAILED finding per failed eval (location: the
1335
+ evals.json, field: the eval id), and data: skill, description (the PASS/FAIL line, also on stderr as
1336
+ "Summary:"), evals[] {id, passed}, artifacts {frictionReport, outputDir}.
1337
+ Progress, the Harness:/Results:/Workspaces: paths and Reason: go to stderr.
1338
+
1208
1339
  Exit Codes:
1209
- 0 - Harness ran to completion and every eval passed (or --allow-eval-failure suppressed a failing verdict)
1210
- 1 - An eval FAILED (the harness completed and produced a valid grading.json; expectations did not all pass). This is the fail-closed DEFAULT -- suppress with --allow-eval-failure.
1211
- 2 - The harness could not run. A 'Reason: <reason>' line on stderr says why:
1212
- internal - the harness broke (grader fragment absent or off-schema, summary/expectations skew, executor/grader crash, stall/timeout)
1213
- preflight - the environment or inputs need fixing (missing binary, auth error, eval inputs absent, unsafe workdir, ack missing, broken project config, a required skill -- subject or --with companion -- failed to build, --no-build with no existing dist for one of them, or an OPTIONAL --with-optional companion hitting a non-survivable failure: a destructive plugin-local build failure, missing security ack, or broken config)
1214
- bootstrap - evals.json was absent, so VAT wrote a starter template next to the skill source. Fill it in and re-run.
1340
+ 0 - Every eval passed (or --allow-eval-failure published the failures as warnings)
1341
+ 1 - An eval FAILED: the harness completed and an expectation or tool verdict did
1342
+ not pass. The fail-closed DEFAULT -- --allow-eval-failure downgrades it to 0.
1343
+ 2 - The harness could not run; error.code says which refusal, and a
1344
+ 'Reason: <reason>' line on stderr restates it:
1345
+ preflight - the operator can fix it. BACKEND_UNAVAILABLE: no claude
1346
+ binary, or one too old for a flag the spawn needs.
1347
+ USAGE_INVALID: an invalid flag, an auth mismatch, the missing
1348
+ ack, an unsafe --workdir, an --out that exists and is not a
1349
+ directory (or, on POSIX, not 0700: VAT never changes its
1350
+ mode), a held harness lock, a skill name the config does not
1351
+ declare (or --no-build with no dist), a bad env token or
1352
+ test.build hook, a --with source, --evals or skill reference
1353
+ that names nothing (an npm package not installed, an
1354
+ unpinned npm spec, a scoped specifier as a path).
1355
+ RUN_INCOMPLETE: the packager refused the
1356
+ skill's content (with a SKILL_PACKAGING_FAILED finding), or
1357
+ the OS would not let the run write its output -- the harness
1358
+ root, its lockfile, the staged skill copies and manifest, the
1359
+ results/ files, a dist bundle: a full disk, a read-only
1360
+ directory; no finding (known gap: a disk so full that a
1361
+ skill build's git snapshot fails first is still
1362
+ INTERNAL_ERROR). A build that threw keeps
1363
+ its cause's code; an uncoded one is INTERNAL_ERROR.
1364
+ CONFIG_INVALID: a broken project config, or a test.with or
1365
+ test.evals reference in it that names nothing (an optional
1366
+ companion that names nothing is skipped with a warning).
1367
+ INPUT_UNREADABLE: a
1368
+ declared eval input or dependency absent, an evals.json that
1369
+ is not a valid suite, a vendored copy failing its manifest,
1370
+ a --with path: companion holding a file or directory the
1371
+ OS will not read (named).
1372
+ bootstrap - INPUT_UNREADABLE: evals.json was absent, so VAT wrote a
1373
+ starter template next to the skill source. Fill it in, re-run.
1374
+ internal - INTERNAL_ERROR: the harness broke (grader fragment absent or
1375
+ off-schema, summary/expectations skew, executor/grader crash,
1376
+ stall/timeout). Re-run with --debug and report it.
1215
1377
 
1216
1378
  The same three-way contract as every other vat command, so a CI consumer
1217
1379
  can tolerate eval failures while failing closed on a harness that broke:
@@ -1220,11 +1382,10 @@ Exit Codes:
1220
1382
  case $? in
1221
1383
  0) ;; # all evals passed
1222
1384
  1) ;; # evals failed but the harness is healthy -- tolerate/warn
1223
- *) exit 1 ;; # harness could not run -- fail the build; read Reason:
1385
+ *) exit 1 ;; # harness could not run -- fail the build; read error.code
1224
1386
  esac
1225
1387
 
1226
- Which specific evals failed lives in grading.json, never in the exit code.
1227
- For interactive iteration, --allow-eval-failure downgrades 1 to 0.
1388
+ Why an eval failed lives in grading.json and tool-eval.json under results/.
1228
1389
 
1229
1390
  Example:
1230
1391
  $ vat skill test run my-skill --i-understand-this-runs-skill-code