@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
@@ -1,10 +1,81 @@
1
1
  /**
2
- * Shared utilities for top-level phase orchestration commands (vat build, vat verify, vat validate).
2
+ * Shared machinery for the phase orchestrators: `vat build`, `vat verify` and
3
+ * `vat validate`.
4
+ *
5
+ * 🔑 **Each phase hands back its report; the orchestrator publishes ONE.** A
6
+ * phase function returns `{ report }` — the `Report<T>` its own command would
7
+ * publish, BEFORE the writer's run-integrity pass — and the orchestrator folds
8
+ * every phase into {@link orchestratorReport}: findings flat on the envelope,
9
+ * `examined` the sum, each phase's status, count, summary and `data` under
10
+ * `data.phases`.
11
+ *
12
+ * 🔑 **A configured phase that examined nothing is a refusal of THAT phase**
13
+ * ({@link phaseVerdict}), by the declaration its verb's writer is given when the
14
+ * verb runs alone — so an orchestrated phase and its verb cannot disagree. Judged
15
+ * on the sum alone, a `skills.include` matching nothing beside a healthy
16
+ * `resources:` surface was `status: ok`, exit 0. What is NOT refused is a phase
17
+ * for which zero is an answer, and each one says why ({@link ZeroIsAnAnswer}): a
18
+ * phase that ran with no config block of its own (`vat build`'s `skills` phase in a
19
+ * project with no `skills:` block), a `skills` phase whose pool is empty in a project
20
+ * that ships plugin-local skills ({@link skillsPhaseExamined} — refusing that failed
21
+ * `claude plugin install --build`, which trusts `vat build`'s exit), or one that
22
+ * checks what another phase discovered. The writer still judges the sum, for the
23
+ * run in which no phase ran at all.
24
+ *
25
+ * Each phase's report is held to its OWN schema before the fold ({@link Phase}
26
+ * `schema`, parsed by {@link runPhase}): the orchestrator's schema carries a
27
+ * phase's `data` as `unknown`, so nothing downstream could catch a phase
28
+ * publishing data its verb does not describe.
29
+ *
30
+ * There is no second status vocabulary. A phase's status is its envelope's
31
+ * (`ok | findings | error`), the orchestrator's exit derives from its own
32
+ * published document, and a phase that did not finish makes the run `error` /
33
+ * `RUN_INCOMPLETE` with the finished phases still in `data.phases`.
3
34
  */
4
- import { ExitCode, isExitCode } from '@vibe-agent-toolkit/schema';
35
+ import { indexPluginLocalSkills } from '@vibe-agent-toolkit/agent-skills';
36
+ import { buildErrorReport, buildReport, FindingSchema, reportSchema, } from '@vibe-agent-toolkit/schema';
5
37
  import { Option } from 'commander';
38
+ import { z } from 'zod';
39
+ import { CommandRefusalError, refusalCodeOf } from '../utils/command-refusal.js';
40
+ import { NOTHING_FINISHED, refusalReport } from '../utils/document-writer.js';
6
41
  import { createLogger } from '../utils/logger.js';
7
- import { writeJsonOutput, writeYamlOutput } from '../utils/output.js';
42
+ import { warnRunIntegrity, withRunIntegrity } from '../utils/run-integrity.js';
43
+ /**
44
+ * The report schema of a phase that publishes no `data` of its own — verify's
45
+ * `files-config-dests` and `consistency`, build's `shipped-links`: no verb of
46
+ * their own registers one, and their `data` is `null`.
47
+ */
48
+ export const DATALESS_PHASE_REPORT_SCHEMA = reportSchema(z.null(), FindingSchema);
49
+ /**
50
+ * Whether the project ships at least one plugin-local skill — by the ONE answer to that question
51
+ * (`indexPluginLocalSkills`: what the claude phase packages), never a path prefix.
52
+ *
53
+ * @param config - The project's config, or `undefined` when none loaded
54
+ * @param configDir - The directory the config was loaded from
55
+ */
56
+ export function shipsPluginLocalSkills(config, configDir) {
57
+ return config !== undefined && indexPluginLocalSkills(config, configDir).locations.length > 0;
58
+ }
59
+ /**
60
+ * The declaration of a `skills` phase (`vat build`, `vat validate`, `vat verify`): zero pool
61
+ * skills is the verb's own refusal — unless the project ships a plugin-local skill.
62
+ *
63
+ * `skills.include` is required by the schema, and a plugin-local skill reads its packaging
64
+ * config from `skills.config` / `skills.defaults`, so a project whose skills are all plugin-local
65
+ * MUST carry a `skills:` block whose include legitimately matches nothing in the pool. Refusing
66
+ * that stopped `vat build` before the `claude` phase that builds those very skills. With no pool
67
+ * match AND no plugin-local skill, the run examined no skill at all, and it is the refusal.
68
+ *
69
+ * @param declared - What the phase's verb declares its `examined` counts
70
+ * @param pluginLocal - Asked only when the phase examined nothing: it lists the project's plugins
71
+ */
72
+ export function skillsPhaseExamined(declared, pluginLocal) {
73
+ return (report) => (report.examined === 0 && pluginLocal()
74
+ ? { zeroIsAnAnswer: 'skills.include matches no pool skill, and the project ships plugin-local skills — which read skills.config and skills.defaults, so the block is theirs' }
75
+ : declared);
76
+ }
77
+ /** No orchestrator offers `--strict`: warnings never fail a run. */
78
+ export const ORCHESTRATOR_GATE = Object.freeze({ strict: false });
8
79
  /**
9
80
  * Declare `--only` on a command that has RETIRED it, solely so the command can
10
81
  * explain itself instead of emitting Commander's bare `error: unknown option
@@ -12,7 +83,7 @@ import { writeJsonOutput, writeYamlOutput } from '../utils/output.js';
12
83
  *
13
84
  * This is **not** a backward-compatibility shim — the pre-1.0 policy forbids
14
85
  * those and this obeys it. The flag does not work: {@link rejectRetiredOnly}
15
- * fails the run before any phase is selected, so no caller can keep depending
86
+ * refuses the run before any phase is selected, so no caller can keep depending
16
87
  * on the old behaviour. What it buys is a diagnosis. An unknown-option error
17
88
  * names the flag and nothing else; the reader cannot tell a typo from a removal
18
89
  * and has no way to learn what replaced it, so the next move is a bug report or
@@ -26,60 +97,46 @@ export function addRetiredOnlyOption(command) {
26
97
  return command.addOption(new Option('--only <phase>', 'Retired — a run is now a whole run.').hideHelp());
27
98
  }
28
99
  /**
29
- * Fail the run when a caller passed the retired `--only`, naming what changed.
100
+ * Refuse the run when a caller passed the retired `--only`, naming what changed.
30
101
  *
31
- * Exit 1, matching both Commander's usage-error convention and the exit code an
32
- * unroutable `--only` already produced on these commands, so a CI gate that was
33
- * failing on a bad `--only` keeps failing rather than flipping to green.
102
+ * `USAGE_INVALID` (exit 2): the invocation is the mistake, and nothing was
103
+ * examined.
34
104
  *
35
105
  * @param only - The parsed `--only` value; `undefined` when it was not passed.
36
106
  * @param command - Command name for the message, e.g. `vat validate`.
37
107
  * @param seconds - The measured full-run duration that made the flag not worth
38
108
  * its coverage risk. Cited so the removal reads as a decision with evidence
39
109
  * rather than a preference.
110
+ * @throws CommandRefusalError `USAGE_INVALID` when `--only` was passed
40
111
  */
41
112
  export function rejectRetiredOnly(only, command, seconds) {
42
113
  if (only === undefined)
43
114
  return;
44
- process.stderr.write(`error: '--only' was removed from '${command}'.\n` +
115
+ throw new CommandRefusalError('USAGE_INVALID', `error: '--only' was removed from '${command}'.\n` +
45
116
  `\n` +
46
- ` A full run measures ~${seconds}s on a 90-skill project, so the flag saved\n` +
117
+ ` A full run measured ~${seconds}s on a 90-skill project, so the flag saved\n` +
47
118
  ` little while letting a CI gate silently lose coverage: renaming a config\n` +
48
119
  ` key left '--only <that key>' selecting nothing, and the gate stayed green.\n` +
49
120
  `\n` +
50
121
  ` Fix: drop the flag — '${command}' runs every configured surface.\n` +
51
- ` Still selective: 'vat build --only <phase>', where a phase is minutes, not seconds.\n`);
52
- process.exit(ExitCode.ERROR);
122
+ ` Still selective: 'vat build --only <phase>', where a phase is minutes, not seconds.`);
53
123
  }
54
- /** The phase outcome for "we did not learn what this phase would have said". */
55
- export const SYSTEM_ERROR = 'system-error';
56
124
  /**
57
- * Create the shared phase command context: logger, startTime, and bin path.
58
- *
59
- * Total by design: it builds the context and decides nothing.
60
- *
61
- * ⚠️ This runs BEFORE the command's try block, so anything that throws here
62
- * reaches the user as a raw Node stack trace with zero bytes of stdout and an
63
- * exit 1 indistinguishable from "validation errors". Phase routing therefore
64
- * belongs to {@link decidePhaseSelection} and {@link applyPhaseSelection}, which
65
- * emit the command's normal structured document.
125
+ * Create the shared phase command context. Total by design: it builds the
126
+ * context and decides nothing, because it runs outside the orchestrator's
127
+ * refusal handling.
66
128
  */
67
129
  export function createPhaseContext(debugFlag) {
68
- return {
69
- logger: createLogger(debugFlag ? { debug: true } : {}),
70
- startTime: Date.now(),
71
- };
130
+ return { logger: createLogger(debugFlag ? { debug: true } : {}) };
72
131
  }
73
132
  /**
74
133
  * Decide what an orchestrator should do with its `--only` value and the phase
75
134
  * list its config produced.
76
135
  *
77
136
  * THE single decision site for all three orchestrators, so they cannot answer
78
- * the same question differently. An orchestrator that builds its phase list
79
- * without consulting the config exits 0 on `--only skills` in a project with no
80
- * `skills:` block while another exits 1 — opposite verdicts on one question.
81
- * `vat verify` has retired `--only` and always passes `only: undefined`;
82
- * `vat validate` and `vat build` route their own `--only` through here.
137
+ * the same question differently. `vat verify` and `vat validate` have retired
138
+ * `--only` and always pass `only: undefined`; `vat build` routes its own
139
+ * `--only` through here.
83
140
  *
84
141
  * ⚠️ **Nothing may short-circuit ahead of the config-error arm.** A check
85
142
  * evaluated before `unreadableConfig` answers a confident "not configured" for a
@@ -87,19 +144,17 @@ export function createPhaseContext(debugFlag) {
87
144
  * must never give, because it is indistinguishable from a correct one.
88
145
  *
89
146
  * @param unreadableConfig - The config-load error, when the config exists but
90
- * could not be parsed. A broken config is NOT "the phase is unconfigured":
91
- * we do not know what it declares, so we must not answer with a confident
92
- * "not configured". Only `vat verify` passes it, and only defensively — its
147
+ * could not be parsed. Only `vat verify` passes it, and only defensively — its
93
148
  * phase builder pushes every configured phase when the config is unreadable
94
149
  * (so the phase itself reports the real error), which makes the list non-empty
95
- * and this arm unreachable by construction today. It is kept because the arm
96
- * that would otherwise catch an empty list is the "not configured" lie.
150
+ * and this arm unreachable by construction today.
97
151
  */
98
152
  export function decidePhaseSelection(only, phases, vocab, options = {}) {
99
153
  const lower = vocab.noun.toLowerCase();
100
154
  if (only !== undefined && !vocab.validNames.includes(only)) {
101
155
  return {
102
156
  kind: 'fail',
157
+ code: 'USAGE_INVALID',
103
158
  message: `Unknown ${lower}: ${only}. Valid ${lower}s: ${vocab.validNames.join(', ')}`,
104
159
  };
105
160
  }
@@ -107,269 +162,166 @@ export function decidePhaseSelection(only, phases, vocab, options = {}) {
107
162
  return { kind: 'run', phases };
108
163
  }
109
164
  if (options.unreadableConfig !== undefined) {
110
- return { kind: 'fail', message: options.unreadableConfig };
165
+ return { kind: 'fail', code: 'CONFIG_INVALID', message: options.unreadableConfig };
111
166
  }
112
167
  if (only !== undefined) {
113
168
  return {
114
169
  kind: 'fail',
170
+ code: 'USAGE_INVALID',
115
171
  message: `${vocab.noun} '${only}' is not configured in vibe-agent-toolkit.config.yaml — nothing to ${vocab.verb}.`,
116
172
  };
117
173
  }
118
174
  return vocab.noop === undefined
119
- ? { kind: 'fail', message: `No ${lower} to ${vocab.verb}.` }
175
+ ? { kind: 'fail', code: 'USAGE_INVALID', message: `No ${lower} to ${vocab.verb}.` }
120
176
  : { kind: 'noop', ...vocab.noop };
121
177
  }
122
178
  /**
123
- * Act on a {@link PhaseSelection}: return the phases to run, or emit the
124
- * command's normal structured document and exit.
179
+ * Act on a {@link PhaseSelection}: the phases to run, or the refusal.
125
180
  *
126
- * Both terminal arms go through `writeYamlOutput` deliberately: the YAML
127
- * document on stdout is the one output a scripted caller parses, so a routing
128
- * failure has to publish one rather than throw past it.
181
+ * @throws CommandRefusalError for a `fail` selection, carrying its code —
182
+ * the orchestrator's catch publishes it
129
183
  */
130
- export function applyPhaseSelection(selection, logger, startTime) {
131
- if (selection.kind === 'run') {
184
+ export function applyPhaseSelection(selection, logger) {
185
+ if (selection.kind === 'run')
132
186
  return selection.phases;
133
- }
134
- if (selection.kind === 'fail') {
135
- logger.error(selection.message);
136
- writeYamlOutput({
137
- status: 'error',
138
- phases: [],
139
- error: selection.message,
140
- duration: `${Date.now() - startTime}ms`,
141
- });
142
- // A selection that cannot run — an unknown `--only` name, an unreadable
143
- // config, nothing configured for what was asked — is the command failing
144
- // to do its job, not a finding about the tree.
145
- return process.exit(ExitCode.ERROR);
146
- }
187
+ if (selection.kind === 'fail')
188
+ throw new CommandRefusalError(selection.code, selection.message);
147
189
  logger.warn(selection.warning);
148
- writeYamlOutput({
149
- status: 'success',
150
- phases: [],
151
- note: selection.note,
152
- duration: `${Date.now() - startTime}ms`,
153
- });
154
- return process.exit(ExitCode.OK);
190
+ return [];
155
191
  }
156
- /** Rank used by {@link worseOf}: later wins. */
157
- const PHASE_STATUS_ORDER = ['success', 'warning', 'error', 'system-error'];
158
- /** The worse of two phase statuses, per {@link PHASE_STATUS_ORDER}. */
159
- export function worseOf(a, b) {
160
- return PHASE_STATUS_ORDER.indexOf(b) > PHASE_STATUS_ORDER.indexOf(a) ? b : a;
161
- }
162
- /** Every value a phase may legitimately report as its own `status`. */
163
- const REPORTABLE_STATUSES = new Set(PHASE_STATUS_ORDER);
164
192
  /**
165
- * The status an exit code alone implies, before the phase's report is read.
193
+ * Run a single phase in THIS process.
194
+ *
195
+ * In THIS process, because everything an orchestrator reads back from a phase is
196
+ * its report. A process per phase charges, on every phase, a full Node startup
197
+ * and the whole module graph again (~730 ms of remark per isolate), a parse
198
+ * cache whose miss counters restart from zero, and a worker pool built and torn
199
+ * down before the next phase begins.
200
+ *
201
+ * The report is held to the phase's own {@link Phase.schema} before it is
202
+ * folded — the check its verb's writer applies when that verb runs alone. A
203
+ * report the schema rejects is VAT's defect: the `ZodError` carries no code, so
204
+ * it becomes the phase's `INTERNAL_ERROR`, never a finished phase.
166
205
  *
167
- * A code outside the `ExitCode` contract is a DEFECT in the phase, not a
168
- * status to round: the old table folded "anything else" into `system-error`,
169
- * which let a phase ending on a code no reader could interpret pass as a
170
- * merely broken environment. It throws, and {@link runPhase}'s backstop files
171
- * the phase as `system-error` with the defect named.
206
+ * Then it is judged as its verb's writer judges it ({@link phaseVerdict}): a
207
+ * configured phase that examined nothing is refused, and the refusal is said on
208
+ * stderr as well as in the document.
209
+ *
210
+ * The `catch` is a BACKSTOP, not the error path: every phase function returns
211
+ * its own refusal as a report. A throw that escaped that becomes the phase's
212
+ * refusal — classified by its code, `INTERNAL_ERROR` when it carries none —
213
+ * rather than aborting the orchestrator and silently skipping every later phase.
172
214
  */
173
- function statusFromExitCode(status) {
174
- if (!isExitCode(status)) {
175
- throw new Error(`exit code ${status} is not in the ExitCode contract (0 ok, 1 findings, 2 error)`);
215
+ export async function runPhase(phase) {
216
+ try {
217
+ const { report } = await phase.run();
218
+ phase.schema.parse(report);
219
+ const judged = phaseVerdict(phase, report);
220
+ // The refusal was added here, so no phase has said it: the document and stderr must agree.
221
+ if (judged !== report)
222
+ warnRunIntegrity(judged);
223
+ return { name: phase.name, report: judged };
224
+ }
225
+ catch (error) {
226
+ return { name: phase.name, report: refusalReport(refusalCodeOf(error), error, ORCHESTRATOR_GATE, NOTHING_FINISHED) };
176
227
  }
177
- if (status === ExitCode.OK)
178
- return 'success';
179
- if (status === ExitCode.FINDINGS)
180
- return 'error';
181
- return SYSTEM_ERROR;
182
- }
183
- /** The status the phase claimed for itself, when it claimed a recognized one. */
184
- function statusFromReport(report) {
185
- if (typeof report !== 'object' || report === null)
186
- return undefined;
187
- const claimed = report.status;
188
- return typeof claimed === 'string' && REPORTABLE_STATUSES.has(claimed)
189
- ? claimed
190
- : undefined;
191
228
  }
192
229
  /**
193
- * Map what a phase produced to its outcome. The pure core of {@link runPhase}.
230
+ * A phase's report as its own verb's writer would publish it: with the ONE
231
+ * `RESOURCE_CHECK_BROKEN` refusal added when it examined nothing — unless zero is
232
+ * an answer for this phase. `withRunIntegrity` is the same function every writer
233
+ * calls, so there is one contract for "a run that examined nothing", and an
234
+ * orchestrated phase gets the very finding its verb gives alone.
194
235
  *
195
- * | exit code | phase status | why |
196
- * |-----------------------|----------------|-----------------------------------------|
197
- * | `OK` (0) | `success` | ran, found nothing actionable |
198
- * | `FINDINGS` (1) | `error` | ran, found validation errors |
199
- * | `ERROR` (2) | `system-error` | the phase itself reported a system error |
200
- * | anything else | throws | a defect in the phase, filed by `runPhase` as `system-error` |
236
+ * Pure: no I/O, no stderr.
201
237
  *
202
- * The exit code is then reconciled with the phase's OWN reported `status`,
203
- * worst-wins. An exit code has three values and cannot express `warning`:
204
- * `vat skills validate` exits 0 while reporting `status: warning`, so its exit
205
- * code alone reads as `success` — including on the tree VAT's CI dogfoods on
206
- * VAT itself.
207
- *
208
- * The table has no row for a signal kill, a missing status code, or a document
209
- * that fails to parse, and that is the design rather than an omission. A phase
210
- * runs in this process: there is no serialization step in which to lose a
211
- * document, and no signal that could take a phase without taking the
212
- * orchestrator with it.
238
+ * @param phase - The phase's `examined` declaration
239
+ * @param report - What the phase returned
240
+ * @returns `report` itself when nothing is added, so a caller can tell by identity
213
241
  */
214
- export function phaseResultFromOutcome(name, outcome) {
215
- const { exitCode, document } = outcome;
216
- const exitStatus = statusFromExitCode(exitCode);
217
- const reported = statusFromReport(document);
218
- const status = reported === undefined ? exitStatus : worseOf(exitStatus, reported);
242
+ export function phaseVerdict(phase, report) {
243
+ const declared = typeof phase.examined === 'function' ? phase.examined(report) : phase.examined;
244
+ return 'zeroIsAnAnswer' in declared ? report : withRunIntegrity(report, declared);
245
+ }
246
+ /** One phase as `data.phases` publishes it. */
247
+ function phaseEntry({ name, report }) {
219
248
  return {
220
249
  name,
221
- status,
222
- exitCode,
223
- ...(exitStatus === SYSTEM_ERROR
224
- ? { error: `Phase '${name}' exited with system-error code ${exitCode}` }
225
- : {}),
226
- ...(document === undefined ? {} : { report: document }),
250
+ status: report.status,
251
+ examined: report.examined,
252
+ summary: report.summary,
253
+ ...(report.status === 'error' ? { error: report.error } : {}),
254
+ data: report.data,
255
+ };
256
+ }
257
+ /** What the phases amount to so far: the sum examined, every finding, every entry. */
258
+ function finishedPhases(results) {
259
+ return {
260
+ examined: results.reduce((sum, { report }) => sum + report.examined, 0),
261
+ findings: results.flatMap(({ report }) => report.findings),
262
+ data: { phases: results.map(phaseEntry) },
227
263
  };
228
264
  }
229
265
  /**
230
- * End a command-line run from a phase outcome: publish the document, then exit.
231
- *
232
- * THE single place the two lanes diverge, so they cannot diverge anywhere else.
233
- * A phase hands back the same `{ document, exitCode }` either way; this decides
234
- * what a *command* does with it, while an orchestrator folds it into
235
- * `phases[].report` instead.
236
- *
237
- * Three cases, and the middle one is the one to get right:
238
- * - an unexpected failure publishes the shared envelope in the format the
239
- * operator asked for, matching `handleCommandError`;
240
- * - a command's own report goes through the command's own `render`;
241
- * - no document at all (an unconfigured run, a dry run) publishes nothing.
266
+ * Fold the phases into the orchestrator's ONE report.
242
267
  *
243
- * 🔑 **`format` is REQUIRED, and that is the whole point of it being a
244
- * parameter.** This arm hardcoded `writeYamlOutput`, and it is `vat resources
245
- * validate`'s ONLY error exit — so `--format json` silently produced YAML on the
246
- * one path a scripted consumer most needs to parse. The sibling
247
- * `handleCommandError` has the same parameter as an OPTIONAL one carrying a
248
- * docstring that says a caller with a `--format` option must pass it, and two
249
- * commands added in the same change dropped it anyway: a docstring is not a
250
- * mechanism. Here the type system asks, so a new caller cannot forget. A command
251
- * that offers no `--format` passes `undefined` and says so at its call site.
268
+ * `findings` is every phase's findings with its `location` unchanged; `examined`
269
+ * is the sum of the phases' own; `data.phases` is one entry per phase. Any phase
270
+ * that did not finish makes the run `error` with `RUN_INCOMPLETE`, naming the
271
+ * phases that stopped, and the finished ones stay in `data.phases` — a failed
272
+ * phase never erases what the others found.
252
273
  *
253
- * ⚠️ It governs the FAILURE envelope only. A command's own report still goes
254
- * through `render`, which is what a `--format text` lane needs.
274
+ * Pure: each phase was judged as it ran ({@link runPhase}), and the writer judges
275
+ * the sum when it publishes — which refuses the run in which no phase ran.
255
276
  *
256
- * @param outcome - What the phase produced
257
- * @param render - How this command publishes its OWN report shape
258
- * @param format - What the operator asked for: `json`, or anything else (and
259
- * `undefined`) for YAML — the same two-branch switch `handleCommandError` and
260
- * every success path use
277
+ * @param results - Every phase that ran, in execution order
278
+ * @param gate - The gate the run is judged by
279
+ * @param durationMs - Wall-clock milliseconds the run took; carried by a completed
280
+ * run only, as no refusal document carries `durationMs`
281
+ * @returns The report, before the writer's run-integrity pass
261
282
  */
262
- export function finishCommand(outcome, render, format) {
263
- if (outcome.failed === true) {
264
- if (format === 'json') {
265
- writeJsonOutput(outcome.document);
266
- }
267
- else {
268
- writeYamlOutput(outcome.document);
269
- }
270
- }
271
- else if (outcome.document !== undefined) {
272
- render(outcome.document);
273
- }
274
- return process.exit(outcome.exitCode);
283
+ export function orchestratorReport(results, gate, durationMs) {
284
+ const finished = finishedPhases(results);
285
+ const failed = results.filter(({ report }) => report.status === 'error');
286
+ if (failed.length === 0)
287
+ return buildReport({ ...finished, gate, durationMs });
288
+ const named = failed.map(({ name, report }) => (report.status === 'error' ? `'${name}' (${report.error.code})` : name)).join(', ');
289
+ return buildErrorReport({
290
+ error: {
291
+ code: 'RUN_INCOMPLETE',
292
+ message: `The run did not finish: phase ${named} stopped before it did. The phases that finished are in data.phases.`,
293
+ },
294
+ gate,
295
+ ...finished,
296
+ });
275
297
  }
276
298
  /**
277
- * Run a single phase in THIS process and fold its outcome into a result.
299
+ * Run an orchestrator's body and fold it into its ONE report.
278
300
  *
279
- * In THIS process, because everything an orchestrator reads back from a phase is
280
- * the {@link PhaseOutcome} pair. A process per phase buys neither half of it and
281
- * charges, on every phase, a full Node startup and the whole module graph again
282
- * (~730 ms of remark per isolate), a parse cache whose miss counters restart
283
- * from zero, and a worker pool built and torn down before the next phase begins.
284
- * Phases run sequentially, so none of that cost is ever overlapped with work.
301
+ * `body` pushes each phase that ran onto `results`. A throw from it — the
302
+ * refused `--only`, a positional argument, no project root, discovery that
303
+ * could not see the tree — is classified by its code and becomes the
304
+ * envelope's error branch carrying every phase that already finished. The
305
+ * command publishes the result with `endWithReport`.
285
306
  *
286
- * The `catch` is a BACKSTOP, not the error path. Every phase function reports
287
- * its own failures through `reportCommandError` and returns them as a document.
288
- *
289
- * ⚠️ This arm exists for a throw that escaped that handling. Sharing the
290
- * orchestrator's process is what makes it load-bearing: an escaped throw aborts
291
- * the orchestrator itself and silently skips every later phase.
307
+ * @param body - The run; it records each phase's result as it finishes
308
+ * @returns The orchestrator's report, before the writer's run-integrity pass
292
309
  */
293
- export async function runPhase(phase) {
310
+ export async function orchestrate(body) {
311
+ const startTime = Date.now();
312
+ const results = [];
294
313
  try {
295
- return phaseResultFromOutcome(phase.name, await phase.run());
314
+ await body(results);
296
315
  }
297
316
  catch (error) {
298
- const detail = error instanceof Error ? error.message : String(error);
299
- return {
300
- name: phase.name,
301
- status: SYSTEM_ERROR,
302
- error: `Phase '${phase.name}' threw past its own error handling: ${detail}`,
303
- };
304
- }
305
- }
306
- /**
307
- * Worst-wins aggregate across phases. `system-error` outranks `error`: "we could
308
- * not determine the answer" must never be filed under "we determined it is bad".
309
- */
310
- export function aggregatePhaseStatus(results) {
311
- let worst = 'success';
312
- for (const { status } of results) {
313
- worst = worseOf(worst, status);
317
+ const finished = results.length === 0 ? NOTHING_FINISHED : finishedPhases(results);
318
+ return refusalReport(refusalCodeOf(error), error, ORCHESTRATOR_GATE, finished);
314
319
  }
315
- return worst;
316
- }
317
- /**
318
- * One phase's per-severity distribution, wherever that phase keeps it.
319
- *
320
- * A phase that holds its own findings publishes {@link PhaseResult.issueCounts}.
321
- * A phase that publishes its own document deliberately does not — it owns its
322
- * findings, and its document rides verbatim in {@link PhaseResult.report}.
323
- *
324
- * ⚠️ Both places must be read. Reading only `issueCounts` makes an
325
- * orchestrator's header report `{0, 0, 0}` over phases that just reported 12
326
- * warnings.
327
- *
328
- * Absent or malformed counts read as zero rather than throwing: a phase that
329
- * publishes no distribution contributes nothing to the total.
330
- */
331
- export function phaseIssueCounts(result) {
332
- if (result.issueCounts)
333
- return result.issueCounts;
334
- const counts = result.report?.issueCounts;
335
- if (typeof counts !== 'object' || counts === null)
336
- return { errors: 0, warnings: 0, info: 0 };
337
- const { errors, warnings, info } = counts;
338
- return {
339
- errors: typeof errors === 'number' ? errors : 0,
340
- warnings: typeof warnings === 'number' ? warnings : 0,
341
- info: typeof info === 'number' ? info : 0,
342
- };
343
- }
344
- /**
345
- * Sum every phase's distribution, so an orchestrator's header total reconciles
346
- * against the phases printed beneath it.
347
- *
348
- * The companion to {@link aggregatePhaseStatus}: status is worst-wins ACROSS
349
- * phases, so a header whose `status` can see the phases while its `issueCounts`
350
- * cannot publishes a contradiction in one document — `status: warning` beside
351
- * `warnings: 0`.
352
- */
353
- export function aggregatePhaseIssueCounts(results) {
354
- const total = { errors: 0, warnings: 0, info: 0 };
355
- for (const result of results) {
356
- const { errors, warnings, info } = phaseIssueCounts(result);
357
- total.errors += errors;
358
- total.warnings += warnings;
359
- total.info += info;
360
- }
361
- return total;
362
- }
363
- /**
364
- * The process exit code for a set of phase outcomes, per the exit-code contract
365
- * every orchestrator's help text documents: `OK` pass, `FINDINGS` validation
366
- * failure, `ERROR` system error. Warnings do not fail a run — they are
367
- * published in the status and counts instead.
368
- */
369
- export function exitCodeForPhases(results) {
370
- const worst = aggregatePhaseStatus(results);
371
- if (worst === SYSTEM_ERROR)
372
- return ExitCode.ERROR;
373
- return worst === 'error' ? ExitCode.FINDINGS : ExitCode.OK;
320
+ const report = orchestratorReport(results, ORCHESTRATOR_GATE, Date.now() - startTime);
321
+ if (report.status === 'error')
322
+ process.stderr.write(`${report.error.message}\n`);
323
+ return report;
374
324
  }
325
+ /** No orchestrator offers `--format`: the document is YAML. */
326
+ export const ORCHESTRATOR_FORMAT = 'yaml';
375
327
  //# sourceMappingURL=phase-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"phase-utils.js","sourceRoot":"","sources":["../../src/commands/phase-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAsB,UAAU,EAAuB,MAA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