@vibe-agent-toolkit/cli 0.2.0-rc.6 → 0.2.0-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (422) hide show
  1. package/README.md +4 -5
  2. package/dist/bin/vat +34 -19
  3. package/dist/bin/vat.js +34 -19
  4. package/dist/bin/vat.js.map +1 -1
  5. package/dist/bin.js +44 -158
  6. package/dist/bin.js.map +1 -1
  7. package/dist/command-loaders.d.ts +2 -2
  8. package/dist/command-loaders.d.ts.map +1 -1
  9. package/dist/command-loaders.js +4 -2
  10. package/dist/command-loaders.js.map +1 -1
  11. package/dist/commands/agent/build.d.ts.map +1 -1
  12. package/dist/commands/agent/build.js +2 -1
  13. package/dist/commands/agent/build.js.map +1 -1
  14. package/dist/commands/agent/import.d.ts.map +1 -1
  15. package/dist/commands/agent/import.js +3 -2
  16. package/dist/commands/agent/import.js.map +1 -1
  17. package/dist/commands/agent/install-path.d.ts +36 -0
  18. package/dist/commands/agent/install-path.d.ts.map +1 -0
  19. package/dist/commands/agent/install-path.js +44 -0
  20. package/dist/commands/agent/install-path.js.map +1 -0
  21. package/dist/commands/agent/install.d.ts.map +1 -1
  22. package/dist/commands/agent/install.js +22 -10
  23. package/dist/commands/agent/install.js.map +1 -1
  24. package/dist/commands/agent/installed.d.ts.map +1 -1
  25. package/dist/commands/agent/installed.js +22 -12
  26. package/dist/commands/agent/installed.js.map +1 -1
  27. package/dist/commands/agent/list.d.ts.map +1 -1
  28. package/dist/commands/agent/list.js +2 -1
  29. package/dist/commands/agent/list.js.map +1 -1
  30. package/dist/commands/agent/run.d.ts.map +1 -1
  31. package/dist/commands/agent/run.js +2 -1
  32. package/dist/commands/agent/run.js.map +1 -1
  33. package/dist/commands/agent/uninstall.d.ts.map +1 -1
  34. package/dist/commands/agent/uninstall.js +13 -6
  35. package/dist/commands/agent/uninstall.js.map +1 -1
  36. package/dist/commands/agent/validate.d.ts.map +1 -1
  37. package/dist/commands/agent/validate.js +3 -2
  38. package/dist/commands/agent/validate.js.map +1 -1
  39. package/dist/commands/ard/emit.d.ts +153 -0
  40. package/dist/commands/ard/emit.d.ts.map +1 -0
  41. package/dist/commands/ard/emit.js +276 -0
  42. package/dist/commands/ard/emit.js.map +1 -0
  43. package/dist/commands/ard/index.d.ts +12 -0
  44. package/dist/commands/ard/index.d.ts.map +1 -0
  45. package/dist/commands/ard/index.js +80 -0
  46. package/dist/commands/ard/index.js.map +1 -0
  47. package/dist/commands/ard/surfaces.d.ts +56 -0
  48. package/dist/commands/ard/surfaces.d.ts.map +1 -0
  49. package/dist/commands/ard/surfaces.js +150 -0
  50. package/dist/commands/ard/surfaces.js.map +1 -0
  51. package/dist/commands/audit/distributed-tree.d.ts.map +1 -1
  52. package/dist/commands/audit/distributed-tree.js +9 -6
  53. package/dist/commands/audit/distributed-tree.js.map +1 -1
  54. package/dist/commands/audit/scan-population.d.ts +158 -0
  55. package/dist/commands/audit/scan-population.d.ts.map +1 -0
  56. package/dist/commands/audit/scan-population.js +292 -0
  57. package/dist/commands/audit/scan-population.js.map +1 -0
  58. package/dist/commands/audit-settings.d.ts.map +1 -1
  59. package/dist/commands/audit-settings.js +6 -5
  60. package/dist/commands/audit-settings.js.map +1 -1
  61. package/dist/commands/audit.d.ts +78 -9
  62. package/dist/commands/audit.d.ts.map +1 -1
  63. package/dist/commands/audit.js +853 -473
  64. package/dist/commands/audit.js.map +1 -1
  65. package/dist/commands/build.d.ts.map +1 -1
  66. package/dist/commands/build.js +24 -24
  67. package/dist/commands/build.js.map +1 -1
  68. package/dist/commands/cache/clear.d.ts.map +1 -1
  69. package/dist/commands/cache/clear.js +17 -10
  70. package/dist/commands/cache/clear.js.map +1 -1
  71. package/dist/commands/claude/budget.d.ts +136 -24
  72. package/dist/commands/claude/budget.d.ts.map +1 -1
  73. package/dist/commands/claude/budget.js +152 -57
  74. package/dist/commands/claude/budget.js.map +1 -1
  75. package/dist/commands/claude/context.d.ts.map +1 -1
  76. package/dist/commands/claude/context.js +4 -3
  77. package/dist/commands/claude/context.js.map +1 -1
  78. package/dist/commands/claude/marketplace/changelog-utils.d.ts +1 -1
  79. package/dist/commands/claude/marketplace/changelog-utils.d.ts.map +1 -1
  80. package/dist/commands/claude/marketplace/changelog-utils.js +1 -2
  81. package/dist/commands/claude/marketplace/changelog-utils.js.map +1 -1
  82. package/dist/commands/claude/marketplace/git-publish.d.ts.map +1 -1
  83. package/dist/commands/claude/marketplace/git-publish.js +3 -2
  84. package/dist/commands/claude/marketplace/git-publish.js.map +1 -1
  85. package/dist/commands/claude/marketplace/license-utils.d.ts.map +1 -1
  86. package/dist/commands/claude/marketplace/license-utils.js +0 -1
  87. package/dist/commands/claude/marketplace/license-utils.js.map +1 -1
  88. package/dist/commands/claude/marketplace/publish-tree.d.ts.map +1 -1
  89. package/dist/commands/claude/marketplace/publish-tree.js +0 -6
  90. package/dist/commands/claude/marketplace/publish-tree.js.map +1 -1
  91. package/dist/commands/claude/marketplace/publish.d.ts.map +1 -1
  92. package/dist/commands/claude/marketplace/publish.js +2 -1
  93. package/dist/commands/claude/marketplace/publish.js.map +1 -1
  94. package/dist/commands/claude/marketplace/validate.d.ts +55 -22
  95. package/dist/commands/claude/marketplace/validate.d.ts.map +1 -1
  96. package/dist/commands/claude/marketplace/validate.js +392 -77
  97. package/dist/commands/claude/marketplace/validate.js.map +1 -1
  98. package/dist/commands/claude/org/api-keys.d.ts +0 -3
  99. package/dist/commands/claude/org/api-keys.d.ts.map +1 -1
  100. package/dist/commands/claude/org/api-keys.js +2 -1
  101. package/dist/commands/claude/org/api-keys.js.map +1 -1
  102. package/dist/commands/claude/org/helpers.d.ts +17 -22
  103. package/dist/commands/claude/org/helpers.d.ts.map +1 -1
  104. package/dist/commands/claude/org/helpers.js +6 -22
  105. package/dist/commands/claude/org/helpers.js.map +1 -1
  106. package/dist/commands/claude/org/invites.d.ts +0 -3
  107. package/dist/commands/claude/org/invites.d.ts.map +1 -1
  108. package/dist/commands/claude/org/invites.js +3 -2
  109. package/dist/commands/claude/org/invites.js.map +1 -1
  110. package/dist/commands/claude/org/skills.d.ts +103 -4
  111. package/dist/commands/claude/org/skills.d.ts.map +1 -1
  112. package/dist/commands/claude/org/skills.js +331 -123
  113. package/dist/commands/claude/org/skills.js.map +1 -1
  114. package/dist/commands/claude/org/users.d.ts +0 -3
  115. package/dist/commands/claude/org/users.d.ts.map +1 -1
  116. package/dist/commands/claude/org/users.js +3 -2
  117. package/dist/commands/claude/org/users.js.map +1 -1
  118. package/dist/commands/claude/org/workspaces.d.ts +0 -3
  119. package/dist/commands/claude/org/workspaces.d.ts.map +1 -1
  120. package/dist/commands/claude/org/workspaces.js +6 -5
  121. package/dist/commands/claude/org/workspaces.js.map +1 -1
  122. package/dist/commands/claude/plugin/build.d.ts +8 -0
  123. package/dist/commands/claude/plugin/build.d.ts.map +1 -1
  124. package/dist/commands/claude/plugin/build.js +28 -33
  125. package/dist/commands/claude/plugin/build.js.map +1 -1
  126. package/dist/commands/claude/plugin/helpers.d.ts.map +1 -1
  127. package/dist/commands/claude/plugin/helpers.js +0 -6
  128. package/dist/commands/claude/plugin/helpers.js.map +1 -1
  129. package/dist/commands/claude/plugin/install.d.ts +12 -0
  130. package/dist/commands/claude/plugin/install.d.ts.map +1 -1
  131. package/dist/commands/claude/plugin/install.js +71 -60
  132. package/dist/commands/claude/plugin/install.js.map +1 -1
  133. package/dist/commands/claude/plugin/list.d.ts.map +1 -1
  134. package/dist/commands/claude/plugin/list.js +3 -2
  135. package/dist/commands/claude/plugin/list.js.map +1 -1
  136. package/dist/commands/claude/plugin/plugin-changelog.d.ts.map +1 -1
  137. package/dist/commands/claude/plugin/plugin-changelog.js +0 -2
  138. package/dist/commands/claude/plugin/plugin-changelog.js.map +1 -1
  139. package/dist/commands/claude/plugin/plugin-files.d.ts.map +1 -1
  140. package/dist/commands/claude/plugin/plugin-files.js +0 -3
  141. package/dist/commands/claude/plugin/plugin-files.js.map +1 -1
  142. package/dist/commands/claude/plugin/plugin-validators.d.ts.map +1 -1
  143. package/dist/commands/claude/plugin/plugin-validators.js +3 -6
  144. package/dist/commands/claude/plugin/plugin-validators.js.map +1 -1
  145. package/dist/commands/claude/plugin/tree-copy.d.ts +73 -0
  146. package/dist/commands/claude/plugin/tree-copy.d.ts.map +1 -1
  147. package/dist/commands/claude/plugin/tree-copy.js +221 -15
  148. package/dist/commands/claude/plugin/tree-copy.js.map +1 -1
  149. package/dist/commands/claude/plugin/uninstall.d.ts.map +1 -1
  150. package/dist/commands/claude/plugin/uninstall.js +4 -4
  151. package/dist/commands/claude/plugin/uninstall.js.map +1 -1
  152. package/dist/commands/consistency-check.d.ts +9 -13
  153. package/dist/commands/consistency-check.d.ts.map +1 -1
  154. package/dist/commands/consistency-check.js +91 -81
  155. package/dist/commands/consistency-check.js.map +1 -1
  156. package/dist/commands/corpus/index.d.ts.map +1 -1
  157. package/dist/commands/corpus/index.js +3 -0
  158. package/dist/commands/corpus/index.js.map +1 -1
  159. package/dist/commands/corpus/report.d.ts +0 -1
  160. package/dist/commands/corpus/report.d.ts.map +1 -1
  161. package/dist/commands/corpus/report.js +1 -3
  162. package/dist/commands/corpus/report.js.map +1 -1
  163. package/dist/commands/corpus/runner.d.ts +58 -1
  164. package/dist/commands/corpus/runner.d.ts.map +1 -1
  165. package/dist/commands/corpus/runner.js +92 -21
  166. package/dist/commands/corpus/runner.js.map +1 -1
  167. package/dist/commands/corpus/scan.d.ts.map +1 -1
  168. package/dist/commands/corpus/scan.js +2 -4
  169. package/dist/commands/corpus/scan.js.map +1 -1
  170. package/dist/commands/corpus/seed.d.ts +4 -4
  171. package/dist/commands/corpus/seed.d.ts.map +1 -1
  172. package/dist/commands/corpus/seed.js +1 -3
  173. package/dist/commands/corpus/seed.js.map +1 -1
  174. package/dist/commands/doctor.d.ts +14 -0
  175. package/dist/commands/doctor.d.ts.map +1 -1
  176. package/dist/commands/doctor.js +147 -51
  177. package/dist/commands/doctor.js.map +1 -1
  178. package/dist/commands/inventory.d.ts.map +1 -1
  179. package/dist/commands/inventory.js +6 -7
  180. package/dist/commands/inventory.js.map +1 -1
  181. package/dist/commands/mcp/list-collections.d.ts.map +1 -1
  182. package/dist/commands/mcp/list-collections.js +2 -1
  183. package/dist/commands/mcp/list-collections.js.map +1 -1
  184. package/dist/commands/mcp/serve.d.ts.map +1 -1
  185. package/dist/commands/mcp/serve.js +3 -2
  186. package/dist/commands/mcp/serve.js.map +1 -1
  187. package/dist/commands/okf/index.d.ts +11 -0
  188. package/dist/commands/okf/index.d.ts.map +1 -0
  189. package/dist/commands/okf/index.js +114 -0
  190. package/dist/commands/okf/index.js.map +1 -0
  191. package/dist/commands/okf/validate.d.ts +191 -0
  192. package/dist/commands/okf/validate.d.ts.map +1 -0
  193. package/dist/commands/okf/validate.js +190 -0
  194. package/dist/commands/okf/validate.js.map +1 -0
  195. package/dist/commands/phase-utils.d.ts +30 -13
  196. package/dist/commands/phase-utils.d.ts.map +1 -1
  197. package/dist/commands/phase-utils.js +56 -19
  198. package/dist/commands/phase-utils.js.map +1 -1
  199. package/dist/commands/positional-args.d.ts.map +1 -1
  200. package/dist/commands/positional-args.js +2 -1
  201. package/dist/commands/positional-args.js.map +1 -1
  202. package/dist/commands/rag/clear-command.d.ts.map +1 -1
  203. package/dist/commands/rag/clear-command.js +2 -1
  204. package/dist/commands/rag/clear-command.js.map +1 -1
  205. package/dist/commands/rag/index-command.d.ts +27 -2
  206. package/dist/commands/rag/index-command.d.ts.map +1 -1
  207. package/dist/commands/rag/index-command.js +48 -8
  208. package/dist/commands/rag/index-command.js.map +1 -1
  209. package/dist/commands/rag/index.d.ts.map +1 -1
  210. package/dist/commands/rag/index.js +2 -0
  211. package/dist/commands/rag/index.js.map +1 -1
  212. package/dist/commands/rag/query-command.d.ts.map +1 -1
  213. package/dist/commands/rag/query-command.js +2 -1
  214. package/dist/commands/rag/query-command.js.map +1 -1
  215. package/dist/commands/rag/stats-command.d.ts.map +1 -1
  216. package/dist/commands/rag/stats-command.js +2 -1
  217. package/dist/commands/rag/stats-command.js.map +1 -1
  218. package/dist/commands/resources/check-progress.d.ts +3 -0
  219. package/dist/commands/resources/check-progress.d.ts.map +1 -1
  220. package/dist/commands/resources/check-progress.js +11 -2
  221. package/dist/commands/resources/check-progress.js.map +1 -1
  222. package/dist/commands/resources/check-supervisor.d.ts.map +1 -1
  223. package/dist/commands/resources/check-supervisor.js +14 -7
  224. package/dist/commands/resources/check-supervisor.js.map +1 -1
  225. package/dist/commands/resources/check.d.ts +168 -8
  226. package/dist/commands/resources/check.d.ts.map +1 -1
  227. package/dist/commands/resources/check.js +222 -118
  228. package/dist/commands/resources/check.js.map +1 -1
  229. package/dist/commands/resources/index.d.ts.map +1 -1
  230. package/dist/commands/resources/index.js +64 -29
  231. package/dist/commands/resources/index.js.map +1 -1
  232. package/dist/commands/resources/query.d.ts +18 -1
  233. package/dist/commands/resources/query.d.ts.map +1 -1
  234. package/dist/commands/resources/query.js +33 -12
  235. package/dist/commands/resources/query.js.map +1 -1
  236. package/dist/commands/resources/scan.d.ts.map +1 -1
  237. package/dist/commands/resources/scan.js +4 -8
  238. package/dist/commands/resources/scan.js.map +1 -1
  239. package/dist/commands/resources/validate.d.ts +30 -1
  240. package/dist/commands/resources/validate.d.ts.map +1 -1
  241. package/dist/commands/resources/validate.js +116 -14
  242. package/dist/commands/resources/validate.js.map +1 -1
  243. package/dist/commands/skill/review-checklist.d.ts +3 -2
  244. package/dist/commands/skill/review-checklist.d.ts.map +1 -1
  245. package/dist/commands/skill/review-checklist.js +4 -2
  246. package/dist/commands/skill/review-checklist.js.map +1 -1
  247. package/dist/commands/skill/review.d.ts +247 -0
  248. package/dist/commands/skill/review.d.ts.map +1 -1
  249. package/dist/commands/skill/review.js +98 -61
  250. package/dist/commands/skill/review.js.map +1 -1
  251. package/dist/commands/skill/test/configure.d.ts.map +1 -1
  252. package/dist/commands/skill/test/configure.js +0 -1
  253. package/dist/commands/skill/test/configure.js.map +1 -1
  254. package/dist/commands/skill/test/run.d.ts +12 -6
  255. package/dist/commands/skill/test/run.d.ts.map +1 -1
  256. package/dist/commands/skill/test/run.js +137 -67
  257. package/dist/commands/skill/test/run.js.map +1 -1
  258. package/dist/commands/skills/build.d.ts +69 -2
  259. package/dist/commands/skills/build.d.ts.map +1 -1
  260. package/dist/commands/skills/build.js +128 -42
  261. package/dist/commands/skills/build.js.map +1 -1
  262. package/dist/commands/skills/install.d.ts +2 -1
  263. package/dist/commands/skills/install.d.ts.map +1 -1
  264. package/dist/commands/skills/install.js +20 -30
  265. package/dist/commands/skills/install.js.map +1 -1
  266. package/dist/commands/skills/list.d.ts +2 -1
  267. package/dist/commands/skills/list.d.ts.map +1 -1
  268. package/dist/commands/skills/list.js +44 -26
  269. package/dist/commands/skills/list.js.map +1 -1
  270. package/dist/commands/skills/package.d.ts +1 -1
  271. package/dist/commands/skills/package.d.ts.map +1 -1
  272. package/dist/commands/skills/package.js +6 -8
  273. package/dist/commands/skills/package.js.map +1 -1
  274. package/dist/commands/skills/scope-guard.d.ts.map +1 -1
  275. package/dist/commands/skills/scope-guard.js +2 -4
  276. package/dist/commands/skills/scope-guard.js.map +1 -1
  277. package/dist/commands/skills/shared.d.ts.map +1 -1
  278. package/dist/commands/skills/shared.js +2 -4
  279. package/dist/commands/skills/shared.js.map +1 -1
  280. package/dist/commands/skills/skill-discovery.d.ts +40 -1
  281. package/dist/commands/skills/skill-discovery.d.ts.map +1 -1
  282. package/dist/commands/skills/skill-discovery.js +32 -4
  283. package/dist/commands/skills/skill-discovery.js.map +1 -1
  284. package/dist/commands/skills/source-resolvers.d.ts +15 -0
  285. package/dist/commands/skills/source-resolvers.d.ts.map +1 -1
  286. package/dist/commands/skills/source-resolvers.js +25 -4
  287. package/dist/commands/skills/source-resolvers.js.map +1 -1
  288. package/dist/commands/skills/validate-command.d.ts.map +1 -1
  289. package/dist/commands/skills/validate-command.js +11 -3
  290. package/dist/commands/skills/validate-command.js.map +1 -1
  291. package/dist/commands/skills/validate.d.ts +66 -7
  292. package/dist/commands/skills/validate.d.ts.map +1 -1
  293. package/dist/commands/skills/validate.js +133 -29
  294. package/dist/commands/skills/validate.js.map +1 -1
  295. package/dist/commands/validate.d.ts +1 -1
  296. package/dist/commands/validate.js +8 -6
  297. package/dist/commands/validate.js.map +1 -1
  298. package/dist/commands/verify.d.ts +102 -5
  299. package/dist/commands/verify.d.ts.map +1 -1
  300. package/dist/commands/verify.js +246 -69
  301. package/dist/commands/verify.js.map +1 -1
  302. package/dist/index.d.ts +0 -1
  303. package/dist/index.d.ts.map +1 -1
  304. package/dist/index.js +5 -1
  305. package/dist/index.js.map +1 -1
  306. package/dist/report-schemas.d.ts +45 -0
  307. package/dist/report-schemas.d.ts.map +1 -0
  308. package/dist/report-schemas.js +102 -0
  309. package/dist/report-schemas.js.map +1 -0
  310. package/dist/skill-resolution/packaging-config.d.ts +49 -5
  311. package/dist/skill-resolution/packaging-config.d.ts.map +1 -1
  312. package/dist/skill-resolution/packaging-config.js +59 -19
  313. package/dist/skill-resolution/packaging-config.js.map +1 -1
  314. package/dist/skill-resolution/resolve-skill-reference.d.ts.map +1 -1
  315. package/dist/skill-resolution/resolve-skill-reference.js +8 -6
  316. package/dist/skill-resolution/resolve-skill-reference.js.map +1 -1
  317. package/dist/utils/agent-discovery.d.ts.map +1 -1
  318. package/dist/utils/agent-discovery.js +22 -11
  319. package/dist/utils/agent-discovery.js.map +1 -1
  320. package/dist/utils/agent-runner.d.ts.map +1 -1
  321. package/dist/utils/agent-runner.js +0 -1
  322. package/dist/utils/agent-runner.js.map +1 -1
  323. package/dist/utils/command-error.d.ts +87 -55
  324. package/dist/utils/command-error.d.ts.map +1 -1
  325. package/dist/utils/command-error.js +113 -64
  326. package/dist/utils/command-error.js.map +1 -1
  327. package/dist/utils/config-loader.d.ts +2 -1
  328. package/dist/utils/config-loader.d.ts.map +1 -1
  329. package/dist/utils/config-loader.js +3 -6
  330. package/dist/utils/config-loader.js.map +1 -1
  331. package/dist/utils/context-budget-issues.d.ts +1 -1
  332. package/dist/utils/context-budget-issues.js +1 -1
  333. package/dist/utils/corpus-target.d.ts +5 -27
  334. package/dist/utils/corpus-target.d.ts.map +1 -1
  335. package/dist/utils/corpus-target.js +7 -33
  336. package/dist/utils/corpus-target.js.map +1 -1
  337. package/dist/utils/edge-lens-evaluation.d.ts +83 -0
  338. package/dist/utils/edge-lens-evaluation.d.ts.map +1 -0
  339. package/dist/utils/edge-lens-evaluation.js +110 -0
  340. package/dist/utils/edge-lens-evaluation.js.map +1 -0
  341. package/dist/utils/help-loader.d.ts.map +1 -1
  342. package/dist/utils/help-loader.js +0 -1
  343. package/dist/utils/help-loader.js.map +1 -1
  344. package/dist/utils/issue-rendering.d.ts +2 -2
  345. package/dist/utils/issue-rendering.js +2 -2
  346. package/dist/utils/optional-backend.d.ts +5 -4
  347. package/dist/utils/optional-backend.d.ts.map +1 -1
  348. package/dist/utils/optional-backend.js +7 -5
  349. package/dist/utils/optional-backend.js.map +1 -1
  350. package/dist/utils/output.d.ts +9 -0
  351. package/dist/utils/output.d.ts.map +1 -1
  352. package/dist/utils/output.js +16 -0
  353. package/dist/utils/output.js.map +1 -1
  354. package/dist/utils/package-json.d.ts +24 -0
  355. package/dist/utils/package-json.d.ts.map +1 -0
  356. package/dist/utils/package-json.js +49 -0
  357. package/dist/utils/package-json.js.map +1 -0
  358. package/dist/utils/project-root-policy.d.ts +20 -0
  359. package/dist/utils/project-root-policy.d.ts.map +1 -1
  360. package/dist/utils/project-root-policy.js +30 -0
  361. package/dist/utils/project-root-policy.js.map +1 -1
  362. package/dist/utils/projection-query.d.ts +41 -4
  363. package/dist/utils/projection-query.d.ts.map +1 -1
  364. package/dist/utils/projection-query.js +44 -10
  365. package/dist/utils/projection-query.js.map +1 -1
  366. package/dist/utils/projection-store.d.ts +41 -15
  367. package/dist/utils/projection-store.d.ts.map +1 -1
  368. package/dist/utils/projection-store.js +65 -18
  369. package/dist/utils/projection-store.js.map +1 -1
  370. package/dist/utils/repeatable-option.d.ts +37 -0
  371. package/dist/utils/repeatable-option.d.ts.map +1 -0
  372. package/dist/utils/repeatable-option.js +39 -0
  373. package/dist/utils/repeatable-option.js.map +1 -0
  374. package/dist/utils/resource-loader.d.ts +4 -3
  375. package/dist/utils/resource-loader.d.ts.map +1 -1
  376. package/dist/utils/resource-loader.js +63 -32
  377. package/dist/utils/resource-loader.js.map +1 -1
  378. package/dist/utils/root-argv.d.ts +53 -0
  379. package/dist/utils/root-argv.d.ts.map +1 -0
  380. package/dist/utils/root-argv.js +215 -0
  381. package/dist/utils/root-argv.js.map +1 -0
  382. package/dist/utils/run-integrity.d.ts +95 -0
  383. package/dist/utils/run-integrity.d.ts.map +1 -0
  384. package/dist/utils/run-integrity.js +102 -0
  385. package/dist/utils/run-integrity.js.map +1 -0
  386. package/dist/utils/skill-packaging-config.d.ts +27 -0
  387. package/dist/utils/skill-packaging-config.d.ts.map +1 -1
  388. package/dist/utils/skill-packaging-config.js +30 -0
  389. package/dist/utils/skill-packaging-config.js.map +1 -1
  390. package/dist/utils/sqlite-experimental-warning.d.ts +69 -0
  391. package/dist/utils/sqlite-experimental-warning.d.ts.map +1 -0
  392. package/dist/utils/sqlite-experimental-warning.js +144 -0
  393. package/dist/utils/sqlite-experimental-warning.js.map +1 -0
  394. package/dist/utils/url-redact.d.ts.map +1 -1
  395. package/dist/utils/url-redact.js +4 -6
  396. package/dist/utils/url-redact.js.map +1 -1
  397. package/dist/utils/user-context-scanner.d.ts +8 -0
  398. package/dist/utils/user-context-scanner.d.ts.map +1 -1
  399. package/dist/utils/user-context-scanner.js +4 -2
  400. package/dist/utils/user-context-scanner.js.map +1 -1
  401. package/dist/utils/validate-help-files.d.ts.map +1 -1
  402. package/dist/utils/validate-help-files.js +12 -6
  403. package/dist/utils/validate-help-files.js.map +1 -1
  404. package/dist/utils/vat-bin-path.d.ts.map +1 -1
  405. package/dist/utils/vat-bin-path.js +0 -1
  406. package/dist/utils/vat-bin-path.js.map +1 -1
  407. package/dist/version.d.ts.map +1 -1
  408. package/dist/version.js +1 -3
  409. package/dist/version.js.map +1 -1
  410. package/docs/audit.md +141 -37
  411. package/docs/doctor.md +7 -6
  412. package/docs/index.md +19 -11
  413. package/docs/rag.md +3 -2
  414. package/docs/resources.md +5 -2
  415. package/docs/skill-test.md +10 -9
  416. package/docs/skills.md +53 -69
  417. package/package.json +24 -29
  418. package/schemas/ard-emit.json +149 -0
  419. package/schemas/claude-budget.json +197 -0
  420. package/schemas/okf-validate.json +170 -0
  421. package/schemas/resources-check.json +186 -0
  422. package/schemas/skill-review.json +230 -0
@@ -127,6 +127,30 @@ export interface ProjectionProvenance {
127
127
  * every consumer a stable sub-phase vocabulary.
128
128
  */
129
129
  readonly populationMs: number;
130
+ /**
131
+ * What EVALUATING THE LENS cost, separately from populating the tree.
132
+ *
133
+ * Separate because the two answer different questions and a reader must be
134
+ * able to tell them apart. Population is work every verb pays and the store
135
+ * can make cheap; this is work the *edge relations* cost, it is paid on every
136
+ * run whether or not the caller's statement mentions them, and a store hit
137
+ * does NOT make it cheaper — the lens is evaluated over the served rows just
138
+ * as over derived ones. Folded into `populationMs` it would look like the
139
+ * store getting worse.
140
+ *
141
+ * ⚠️ **DISJOINT from `populationMs`, and that is enforced by where the
142
+ * population clock stops, not by convention.** It shipped overlapping: the
143
+ * population span ended after the lens write, so this value was contained in
144
+ * that one while all three docstrings said otherwise, and anyone adding the
145
+ * two over-counted wall time. If you move either clock, keep them disjoint —
146
+ * a reader comparing a served run against a derived one is the whole reason
147
+ * they are two fields.
148
+ *
149
+ * ⚠️ Published rather than merely measured, because an unconditional cost
150
+ * that is invisible is the one nobody can argue with. If this ever grows
151
+ * large enough to be worth a flag, this field is the evidence that says so.
152
+ */
153
+ readonly lensMs: number;
130
154
  }
131
155
  /**
132
156
  * How much of the tree the population actually covered.
@@ -167,6 +191,12 @@ export interface PopulationExtent {
167
191
  */
168
192
  readonly membersEnumerated: number;
169
193
  }
194
+ /** One statement a run intends to ask, with the values it will bind to it. */
195
+ export interface PreflightStatement {
196
+ readonly sql: string;
197
+ /** Bound in order, one per `?`. Empty for a statement that binds nothing. */
198
+ readonly parameters: readonly string[];
199
+ }
170
200
  /** Run one read-only statement against the populated projection. */
171
201
  export type AskProjection = (sql: string, ...parameters: readonly string[]) => readonly Record<string, unknown>[];
172
202
  /**
@@ -199,11 +229,18 @@ export type AskProjection = (sql: string, ...parameters: readonly string[]) => r
199
229
  * unbounded cost lives, and a preflight that ran `WITH RECURSIVE …` would hang
200
230
  * before the run it exists to make cheap had begun.
201
231
  *
202
- * @param statements - Every statement the run will ask, in any order
232
+ * ⚠️ Each statement comes WITH the values it will be bound to, because the
233
+ * placeholder count is part of what compiles: a `?` the caller forgot to bind is
234
+ * SQL NULL at run time, and the statement then selects nothing and reports
235
+ * success — the same silent class as a typo'd column, and worth the same early
236
+ * refusal. The backend does the counting; this only has to hand it the values.
237
+ *
238
+ * @param statements - Every statement the run will ask, in any order, each with
239
+ * the values it will bind
203
240
  * @throws The same legible failure `ask` throws, for the first statement that
204
- * does not compile
241
+ * does not compile or does not pair its placeholders with its values
205
242
  */
206
- export declare function assertQueriesCompile(statements: readonly string[]): Promise<void>;
243
+ export declare function assertQueriesCompile(statements: readonly PreflightStatement[]): Promise<void>;
207
244
  /**
208
245
  * Populate the tree, load it into something askable, and hand the caller a way
209
246
  * to ask.
@@ -223,7 +260,7 @@ export declare function assertQueriesCompile(statements: readonly string[]): Pro
223
260
  export declare function withQueriedProjection<T>(options: {
224
261
  root: string;
225
262
  logger: Logger;
226
- preflight?: readonly string[];
263
+ preflight?: readonly PreflightStatement[];
227
264
  }, work: (ask: AskProjection, provenance: ProjectionProvenance, extent: PopulationExtent) => Promise<T> | T): Promise<T>;
228
265
  /**
229
266
  * Turn a rejected statement into a message that names the surface it missed.
@@ -1 +1 @@
1
- {"version":3,"file":"projection-query.d.ts","sourceRoot":"","sources":["../../src/utils/projection-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,SAAS,kBAAkB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBnG;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,EAC3C,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;CAAE,EACpF,IAAI,EAAE,CACJ,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,oBAAoB,EAChC,MAAM,EAAE,gBAAgB,KACrB,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAClB,OAAO,CAAC,CAAC,CAAC,CAgHZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAoBzE"}
@@ -46,8 +46,9 @@
46
46
  * throw, so no command can forget it.
47
47
  */
48
48
  import { performance } from 'node:perf_hooks';
49
- import { buildResourceProjection, PROJECTION_TABLES, splitProjectionByScope, } from '@vibe-agent-toolkit/resources';
49
+ import { allDerivedSpecs, buildResourceProjection, PROJECTION_TABLES, splitProjectionByScope, } from '@vibe-agent-toolkit/resources';
50
50
  import { gitTrackerForProjectRoot } from '../commands/audit/distributed-tree.js';
51
+ import { evaluateAuthoredLenses } from './edge-lens-evaluation.js';
51
52
  import { populationWiring } from './population-wiring.js';
52
53
  import { openEphemeralQueryStore, withPopulationCache } from './projection-store.js';
53
54
  /**
@@ -92,18 +93,25 @@ const NAME_NOT_FOUND = ['no such table:', 'no such column:'];
92
93
  * unbounded cost lives, and a preflight that ran `WITH RECURSIVE …` would hang
93
94
  * before the run it exists to make cheap had begun.
94
95
  *
95
- * @param statements - Every statement the run will ask, in any order
96
+ * ⚠️ Each statement comes WITH the values it will be bound to, because the
97
+ * placeholder count is part of what compiles: a `?` the caller forgot to bind is
98
+ * SQL NULL at run time, and the statement then selects nothing and reports
99
+ * success — the same silent class as a typo'd column, and worth the same early
100
+ * refusal. The backend does the counting; this only has to hand it the values.
101
+ *
102
+ * @param statements - Every statement the run will ask, in any order, each with
103
+ * the values it will bind
96
104
  * @throws The same legible failure `ask` throws, for the first statement that
97
- * does not compile
105
+ * does not compile or does not pair its placeholders with its values
98
106
  */
99
107
  export async function assertQueriesCompile(statements) {
100
108
  if (statements.length === 0)
101
109
  return;
102
110
  const probe = await openEphemeralQueryStore();
103
111
  try {
104
- for (const sql of statements) {
112
+ for (const { sql, parameters } of statements) {
105
113
  try {
106
- probe.assertCompiles(sql);
114
+ probe.assertCompiles(sql, parameters);
107
115
  }
108
116
  catch (error) {
109
117
  throw new Error(describeQueryFailure(sql, error instanceof Error ? error.message : String(error)));
@@ -187,8 +195,27 @@ export async function withQueriedProjection(options, work) {
187
195
  const { blobs, extent } = splitProjectionByScope(projection);
188
196
  await store.writeBlobFacts(blobs);
189
197
  await store.writeExtent({ rootId, treeHash: EPHEMERAL_TREE_HASH }, extent);
190
- // The shared setup is done. Everything after this line is the caller's.
198
+ // 🚨 The population clock STOPS HERE, before the lens runs. It used to
199
+ // stop after, which made `populationSecs` silently CONTAIN `lensSecs`
200
+ // while this comment and both payloads said it did not. The two numbers
201
+ // are published side by side precisely so a reader can compare a served
202
+ // population against a derived one — and folding the lens into the
203
+ // population put its cost on the arm the store's value is argued from,
204
+ // which is the "store got worse" reading the separation exists to
205
+ // prevent. Overlapping spans also made `populationSecs + lensSecs`
206
+ // over-count wall time for anyone who added them.
191
207
  const populationMs = performance.now() - populationStart;
208
+ // The lens's output, alongside the tree's facts. Unconditional rather
209
+ // than behind a flag: the relations are the answer to questions the
210
+ // projection was built to support, and a surface that exists only when
211
+ // someone remembered a flag is one nobody writes a check against. What it
212
+ // costs is published as `lensSecs` rather than folded into the population
213
+ // — a caller who finds it too expensive can see the number they are
214
+ // paying, which a hidden cost never permits.
215
+ const lensStart = performance.now();
216
+ await store.writeDerived(evaluateAuthoredLenses(projection));
217
+ const lensMs = performance.now() - lensStart;
218
+ // The shared setup is done. Everything after this line is the caller's.
192
219
  const ask = (sql, ...parameters) => {
193
220
  try {
194
221
  return store.query(sql, ...parameters);
@@ -197,7 +224,7 @@ export async function withQueriedProjection(options, work) {
197
224
  throw new Error(describeQueryFailure(sql, error instanceof Error ? error.message : String(error)));
198
225
  }
199
226
  };
200
- return await work(ask, { population: contributorRecords === 0 ? 'store' : 'derived', populationMs },
227
+ return await work(ask, { population: contributorRecords === 0 ? 'store' : 'derived', populationMs, lensMs },
201
228
  // Read off the PROJECTION rather than counted back out of the store with
202
229
  // a `SELECT COUNT(*)`: a count that travelled through the same `ask` the
203
230
  // caller's statements do would be broken by the very schema drift it
@@ -249,14 +276,21 @@ export async function withQueriedProjection(options, work) {
249
276
  export function describeQueryFailure(sql, message) {
250
277
  if (!NAME_NOT_FOUND.some((prefix) => message.includes(prefix)))
251
278
  return message;
279
+ // 🪤 The derived relations belong in this listing even though they are not
280
+ // projection tables. A user who mistypes `edge_resolution` gets "no such
281
+ // table" and a list of everything they could have meant — and a list that
282
+ // omitted the very relation they were reaching for would read as proof it
283
+ // does not exist. What the listing answers is "what can I name here", which
284
+ // is the queryable surface, not the registry.
285
+ const askable = [...Object.values(PROJECTION_TABLES), ...allDerivedSpecs()];
252
286
  const lowered = sql.toLowerCase();
253
- const named = Object.values(PROJECTION_TABLES).filter((spec) => lowered.includes(spec.name.toLowerCase()));
287
+ const named = askable.filter((spec) => lowered.includes(spec.name.toLowerCase()));
254
288
  const surface = named.length > 0
255
289
  ? named.map((spec) => ` ${spec.name}(${spec.columns.join(', ')})`).join('\n')
256
- : Object.values(PROJECTION_TABLES).map((spec) => ` ${spec.name}`).join('\n');
290
+ : askable.map((spec) => ` ${spec.name}`).join('\n');
257
291
  const heading = named.length > 0
258
292
  ? 'The tables this statement names hold these columns:'
259
- : 'The projection holds these tables:';
293
+ : 'This tree is queryable through these relations:';
260
294
  return `${message}\n\n${heading}\n${surface}`;
261
295
  }
262
296
  //# sourceMappingURL=projection-query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"projection-query.js","sourceRoot":"","sources":["../../src/utils/projection-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAGjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAErF;;;;;;;;GAQG;AACH,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAExC,kFAAkF;AAClF,MAAM,cAAc,GAAsB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;AAqIhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,UAA6B;IACtE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IACpC,MAAM,KAAK,GAAG,MAAM,uBAAuB,EAAE,CAAC;IAC9C,IAAI,CAAC;QACH,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,IAAI,CAAC;gBACH,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CACb,oBAAoB,CAAC,GAAG,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CA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8C;IAC9C,MAAM,OAAO,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,GAAG,eAAe,EAAE,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAClF,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC;QAC9B,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9E,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC;QAC9B,CAAC,CAAC,qDAAqD;QACvD,CAAC,CAAC,iDAAiD,CAAC;IAEtD,OAAO,GAAG,OAAO,OAAO,OAAO,KAAK,OAAO,EAAE,CAAC;AAChD,CAAC"}
@@ -129,8 +129,6 @@ export declare const PROJECTION_STORE_DIR_ENV = "VAT_PROJECTION_STORE_DIR";
129
129
  * flag was written for.
130
130
  */
131
131
  export declare const CACHE_ENV = "VAT_CACHE";
132
- /** {@link CACHE_ENV}'s one off value. Exactly `'0'`, never truthiness — see {@link projectionStoreSelected}. */
133
- export declare const CACHE_DISABLED = "0";
134
132
  /**
135
133
  * Whether this process should read and write a projection store.
136
134
  *
@@ -154,10 +152,16 @@ export declare const CACHE_DISABLED = "0";
154
152
  * `vat cache`'s own help text described three caches while a fourth was being
155
153
  * written beside them.
156
154
  *
157
- * 🪤 Compared against `'0'` exactly, never for truthiness, matching
158
- * `ParseCache`'s `env['VAT_CACHE'] !== '0'`. `VAT_CACHE=1` is the value an
159
- * operator writes to turn caching ON, and a truthiness test would read it as a
160
- * reason to decline.
155
+ * 🪤 Read through `parseEnvBoolean`, never for truthiness — `VAT_CACHE=1` is
156
+ * the value an operator writes to turn caching ON, and a truthiness test would
157
+ * read it as a reason to decline. It was previously a comparison against the
158
+ * literal `'0'`, which is the same shape `ParseCache` carried and the same
159
+ * defect: `VAT_CACHE=false` disabled nothing. The two now share one parser
160
+ * (`@vibe-agent-toolkit/utils`) so the variable cannot be read two ways again.
161
+ *
162
+ * Only an explicit `false` vetoes. `parseEnvBoolean` returns `undefined` for a
163
+ * value it cannot read, and an unreadable value is not something the operator
164
+ * said — the veto has to be a statement, not a shrug.
161
165
  *
162
166
  * @returns `true` when a store is selected
163
167
  */
@@ -232,19 +236,41 @@ export declare function openEphemeralQueryStore(): Promise<ProjectionSqlite.SqlQ
232
236
  *
233
237
  * 🪤 The two are **different error codes**, and only one of them reaches
234
238
  * {@link isModuleMissing}. `@vibe-agent-toolkit/projection-sqlite` imports
235
- * `node:sqlite`, which arrived in Node 22.13.0; on 22.0–22.12 the import fails
239
+ * `node:sqlite`, which loads unflagged from Node 22.13.0 (it was added in 22.5.0
240
+ * behind `--experimental-sqlite`); on 22.0–22.12 an ordinary import fails
236
241
  * with `ERR_UNKNOWN_BUILTIN_MODULE`, not `ERR_MODULE_NOT_FOUND`. Without this
237
242
  * branch the user gets a bare `No such built-in module: node:sqlite` — which
238
243
  * names neither the version floor nor the fix.
239
244
  *
240
- * ⚠️ It is reachable on EVERY `vat resources query`/`check` run, and not a
241
- * corner: VAT's own floor is `>=22.0.0`, so a supported Node hits it. That was
242
- * already true before the store-selected path stopped querying a shared
243
- * database — the query lane has always fallen back to
244
- * {@link openEphemeralQueryStore} when no store is selected, which is the
245
- * default, so `node:sqlite` was required on every default run. Nothing here
246
- * became newly reachable; the branch is load-bearing because the FLOOR is,
247
- * whichever way the lane resolves its store.
245
+ * ⚠️ It is reachable on an ordinary run and is not a corner: the query lane has
246
+ * always fallen back to {@link openEphemeralQueryStore} when no store is
247
+ * selected, which is the default, so `node:sqlite` is required on a default
248
+ * `vat resources query` whichever way the lane resolves its store.
249
+ *
250
+ * 🪤 This used to say "EVERY `vat resources query`/`check` run", and that was
251
+ * too strong for `check`. Measured against the built CLI on Node v24.13.1 by
252
+ * counting the `ExperimentalWarning` `node:sqlite` emits at load — the only
253
+ * externally visible tell that the module was reached at all:
254
+ *
255
+ * | Command | Warnings | Backend loaded? |
256
+ * |---|---|---|
257
+ * | `vat resources query "SELECT …"` | 1 | yes |
258
+ * | `vat resources check`, no checks declared | 0 | **no** |
259
+ *
260
+ * `check` reaches a store only when the project declares checks for it to
261
+ * evaluate, so a repo with none never loads the backend and never needed the
262
+ * floor for that command. The floor argument is unaffected — `query` alone
263
+ * establishes it — but "every default run of those two commands" was a claim
264
+ * nothing had counted.
265
+ *
266
+ * ✅ **VAT's declared floor is now `>=22.13.0`, so this no longer fires on a
267
+ * SUPPORTED Node.** It used to: the manifests said `>=22.0.0` while these two
268
+ * commands could not run below 22.13.0, which meant thirteen Node patch
269
+ * releases were advertised as supported and hard-failed here. The floor was
270
+ * raised to stop advertising what VAT cannot do. The branch stays load-bearing
271
+ * for the Node that is merely *installed* rather than supported — `engines` is
272
+ * a warning in npm and nothing at all under most runners, so a user on 22.4
273
+ * still reaches this and still deserves to be told which number is wrong.
248
274
  *
249
275
  * The repair stays distinct from the missing-package one on purpose:
250
276
  * "install this package" is the wrong instruction for "upgrade Node", and
@@ -1 +1 @@
1
- {"version":3,"file":"projection-store.d.ts","sourceRoot":"","sources":["../../src/utils/projection-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,KAAK,KAAK,gB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAmBxE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACzB,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,GACvD,OAAO,CAAC,CAAC,CAAC,CA0BZ"}
@@ -44,8 +44,10 @@
44
44
  * standard legible error, and a tree that cannot be keyed says so on stderr
45
45
  * rather than silently declining.
46
46
  */
47
+ import { parseEnvBoolean } from '@vibe-agent-toolkit/utils';
47
48
  import { gitTreeSnapshot, withGitSnapshotCache } from '@vibe-agent-toolkit/utils/git';
48
49
  import { isModuleMissing, reportMissingBackend } from './optional-backend.js';
50
+ import { installSqliteWarningFilter } from './sqlite-experimental-warning.js';
49
51
  /**
50
52
  * The env var that selects a projection store for this process.
51
53
  *
@@ -129,8 +131,6 @@ export const PROJECTION_STORE_DIR_ENV = 'VAT_PROJECTION_STORE_DIR';
129
131
  * flag was written for.
130
132
  */
131
133
  export const CACHE_ENV = 'VAT_CACHE';
132
- /** {@link CACHE_ENV}'s one off value. Exactly `'0'`, never truthiness — see {@link projectionStoreSelected}. */
133
- export const CACHE_DISABLED = '0';
134
134
  /**
135
135
  * The backend as a user is told to install it.
136
136
  *
@@ -139,7 +139,7 @@ export const CACHE_DISABLED = '0';
139
139
  * it: RAG carries a platform-native binary, while this one carries a Node
140
140
  * version floor.
141
141
  */
142
- /** What Node throws for `import('node:sqlite')` before 22.13.0. */
142
+ /** What Node throws for `import('node:sqlite')` when it is absent or still flagged. */
143
143
  const UNKNOWN_BUILTIN_MODULE = 'ERR_UNKNOWN_BUILTIN_MODULE';
144
144
  const PROJECTION_STORE_BACKEND = {
145
145
  feature: 'The projection store',
@@ -168,15 +168,21 @@ const PROJECTION_STORE_BACKEND = {
168
168
  * `vat cache`'s own help text described three caches while a fourth was being
169
169
  * written beside them.
170
170
  *
171
- * 🪤 Compared against `'0'` exactly, never for truthiness, matching
172
- * `ParseCache`'s `env['VAT_CACHE'] !== '0'`. `VAT_CACHE=1` is the value an
173
- * operator writes to turn caching ON, and a truthiness test would read it as a
174
- * reason to decline.
171
+ * 🪤 Read through `parseEnvBoolean`, never for truthiness — `VAT_CACHE=1` is
172
+ * the value an operator writes to turn caching ON, and a truthiness test would
173
+ * read it as a reason to decline. It was previously a comparison against the
174
+ * literal `'0'`, which is the same shape `ParseCache` carried and the same
175
+ * defect: `VAT_CACHE=false` disabled nothing. The two now share one parser
176
+ * (`@vibe-agent-toolkit/utils`) so the variable cannot be read two ways again.
177
+ *
178
+ * Only an explicit `false` vetoes. `parseEnvBoolean` returns `undefined` for a
179
+ * value it cannot read, and an unreadable value is not something the operator
180
+ * said — the veto has to be a statement, not a shrug.
175
181
  *
176
182
  * @returns `true` when a store is selected
177
183
  */
178
184
  export function projectionStoreSelected() {
179
- if (process.env[CACHE_ENV] === CACHE_DISABLED)
185
+ if (parseEnvBoolean(process.env[CACHE_ENV]) === false)
180
186
  return false;
181
187
  return process.env[PROJECTION_STORE_ENV] === PROJECTION_STORE_SQLITE;
182
188
  }
@@ -260,6 +266,16 @@ export async function openEphemeralQueryStore() {
260
266
  * @returns The backend's module namespace
261
267
  */
262
268
  async function loadBackend() {
269
+ // `node:sqlite` emits one ExperimentalWarning as it loads, even on a Node that
270
+ // needs no flag for it. `projection-sqlite` refuses to suppress that itself —
271
+ // correctly, since a blanket NODE_NO_WARNINGS hides real warnings — and
272
+ // assigns the filter to whichever caller turns the backend on by default.
273
+ // That caller is this module, and this import is the boundary.
274
+ //
275
+ // Restored immediately afterwards: the warning fires at module evaluation, so
276
+ // holding the filter open any longer would start hiding warnings this import
277
+ // did not cause.
278
+ const restoreWarnings = installSqliteWarningFilter();
263
279
  try {
264
280
  return await import('@vibe-agent-toolkit/projection-sqlite');
265
281
  }
@@ -271,6 +287,9 @@ async function loadBackend() {
271
287
  throw error;
272
288
  reportMissingBackend(PROJECTION_STORE_BACKEND);
273
289
  }
290
+ finally {
291
+ restoreWarnings();
292
+ }
274
293
  }
275
294
  /**
276
295
  * The legible failure for "your Node is too old", or `undefined` when this is
@@ -284,19 +303,41 @@ async function loadBackend() {
284
303
  *
285
304
  * 🪤 The two are **different error codes**, and only one of them reaches
286
305
  * {@link isModuleMissing}. `@vibe-agent-toolkit/projection-sqlite` imports
287
- * `node:sqlite`, which arrived in Node 22.13.0; on 22.0–22.12 the import fails
306
+ * `node:sqlite`, which loads unflagged from Node 22.13.0 (it was added in 22.5.0
307
+ * behind `--experimental-sqlite`); on 22.0–22.12 an ordinary import fails
288
308
  * with `ERR_UNKNOWN_BUILTIN_MODULE`, not `ERR_MODULE_NOT_FOUND`. Without this
289
309
  * branch the user gets a bare `No such built-in module: node:sqlite` — which
290
310
  * names neither the version floor nor the fix.
291
311
  *
292
- * ⚠️ It is reachable on EVERY `vat resources query`/`check` run, and not a
293
- * corner: VAT's own floor is `>=22.0.0`, so a supported Node hits it. That was
294
- * already true before the store-selected path stopped querying a shared
295
- * database — the query lane has always fallen back to
296
- * {@link openEphemeralQueryStore} when no store is selected, which is the
297
- * default, so `node:sqlite` was required on every default run. Nothing here
298
- * became newly reachable; the branch is load-bearing because the FLOOR is,
299
- * whichever way the lane resolves its store.
312
+ * ⚠️ It is reachable on an ordinary run and is not a corner: the query lane has
313
+ * always fallen back to {@link openEphemeralQueryStore} when no store is
314
+ * selected, which is the default, so `node:sqlite` is required on a default
315
+ * `vat resources query` whichever way the lane resolves its store.
316
+ *
317
+ * 🪤 This used to say "EVERY `vat resources query`/`check` run", and that was
318
+ * too strong for `check`. Measured against the built CLI on Node v24.13.1 by
319
+ * counting the `ExperimentalWarning` `node:sqlite` emits at load — the only
320
+ * externally visible tell that the module was reached at all:
321
+ *
322
+ * | Command | Warnings | Backend loaded? |
323
+ * |---|---|---|
324
+ * | `vat resources query "SELECT …"` | 1 | yes |
325
+ * | `vat resources check`, no checks declared | 0 | **no** |
326
+ *
327
+ * `check` reaches a store only when the project declares checks for it to
328
+ * evaluate, so a repo with none never loads the backend and never needed the
329
+ * floor for that command. The floor argument is unaffected — `query` alone
330
+ * establishes it — but "every default run of those two commands" was a claim
331
+ * nothing had counted.
332
+ *
333
+ * ✅ **VAT's declared floor is now `>=22.13.0`, so this no longer fires on a
334
+ * SUPPORTED Node.** It used to: the manifests said `>=22.0.0` while these two
335
+ * commands could not run below 22.13.0, which meant thirteen Node patch
336
+ * releases were advertised as supported and hard-failed here. The floor was
337
+ * raised to stop advertising what VAT cannot do. The branch stays load-bearing
338
+ * for the Node that is merely *installed* rather than supported — `engines` is
339
+ * a warning in npm and nothing at all under most runners, so a user on 22.4
340
+ * still reaches this and still deserves to be told which number is wrong.
300
341
  *
301
342
  * The repair stays distinct from the missing-package one on purpose:
302
343
  * "install this package" is the wrong instruction for "upgrade Node", and
@@ -314,7 +355,13 @@ export function nodeSqliteFloorFailure(error) {
314
355
  if (!isFloor)
315
356
  return undefined;
316
357
  return new Error('The projection store needs `node:sqlite`, which this Node does not have.'
317
- + ` VAT runs on Node >= 22.0.0, but \`node:sqlite\` arrived in 22.13.0 — you are on ${process.version}.`
358
+ // States the NODE fact (when the module arrived), never VAT's floor. The
359
+ // floor lives in `engines.node` and `vat doctor` derives it from there
360
+ // precisely so it has one home; restating it in a string would be the
361
+ // second copy that change exists to remove, and it would go stale silently
362
+ // the next time the floor moves.
363
+ + ` \`node:sqlite\` loads unflagged from Node 22.13.0 (added in 22.5.0 behind`
364
+ + ` \`--experimental-sqlite\`) — you are on ${process.version}.`
318
365
  + ' Upgrade Node to 22.13.0 or newer. Installing a package will not help:'
319
366
  + ' the module is built into Node, not published to npm.');
320
367
  }
@@ -1 +1 @@
1
- {"version":3,"file":"projection-store.js","sourceRoot":"","sources":["../../src/utils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,CAAC,KAAK,UAAU,mBAAmB,CACvC,OAAyB,EACzB,IAAwD;IAExD,4EAA4E;IAC5E,+EAA+E;IAC/E,uEAAuE;IACvE,8EAA8E;IAC9E,EAAE;IACF,yEAAyE;IACzE,2EAA2E;IAC3E,+EAA+E;IAC/E,yEAAyE;IACzE,2EAA2E;IAC3E,EAAE;IACF,8EAA8E;IAC9E,2EAA2E;IAC3E,8EAA8E;IAC9E,+EAA+E;IAC/E,4CAA4C;IAC5C,OAAO,oBAAoB,CAAC,KAAK,IAAI,EAAE;QACrC,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;gBAAS,CAAC;YACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * The collector every REPEATABLE option in this CLI uses, and the reason none
3
+ * of them is variadic.
4
+ *
5
+ * Commander offers two spellings for "this flag takes several values":
6
+ *
7
+ * - **Variadic** — `--param <values...>`, which consumes every following token
8
+ * up to the next option-shaped one.
9
+ * - **Repeatable** — `--param <value>` passed more than once, accumulated by a
10
+ * custom collector. This one.
11
+ *
12
+ * The variadic spelling is unusable on a command that also has a positional
13
+ * argument, and every command here has one. It ate the positional:
14
+ * `vat resources query 'SELECT ? AS x, ? AS y' --param a docs/` bound `docs/`
15
+ * as the SECOND SQL VALUE, left the `[path]` positional unread, and reported
16
+ * `status: success` at exit 0 with `y: 'docs/'` in its rows — a token the
17
+ * operator typed as a location, silently reinterpreted as data. On
18
+ * `vat skill test run <skill>` the same shape consumed the subject and the run
19
+ * died claiming the subject was missing.
20
+ *
21
+ * ⚠️ What the swallowed token would have DONE is a separate question, and on
22
+ * `query` the answer is "located the project": `[path]` there is a root
23
+ * locator, not a scope — see `queryCommand` — so an earlier reading of this
24
+ * incident as "answered about the whole tree instead of `docs/`" claimed a
25
+ * scoping the verb never had. The defect this module fixes is the swallow.
26
+ *
27
+ * So: no variadic options. `test/commands/no-variadic-cli-options.test.ts`
28
+ * enforces that against the source, because the defect is a declaration shape
29
+ * rather than a bug in any one command.
30
+ *
31
+ * @param value - The value Commander parsed for this occurrence of the flag
32
+ * @param previous - What earlier occurrences accumulated, or `undefined` for the first
33
+ * @returns A NEW array — never a mutation of `previous`, which on a defaulted
34
+ * option is shared by every parse of the same `Option` instance
35
+ */
36
+ export declare function collectRepeated(value: string, previous?: readonly string[]): string[];
37
+ //# sourceMappingURL=repeatable-option.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repeatable-option.d.ts","sourceRoot":"","sources":["../../src/utils/repeatable-option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAErF"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The collector every REPEATABLE option in this CLI uses, and the reason none
3
+ * of them is variadic.
4
+ *
5
+ * Commander offers two spellings for "this flag takes several values":
6
+ *
7
+ * - **Variadic** — `--param <values...>`, which consumes every following token
8
+ * up to the next option-shaped one.
9
+ * - **Repeatable** — `--param <value>` passed more than once, accumulated by a
10
+ * custom collector. This one.
11
+ *
12
+ * The variadic spelling is unusable on a command that also has a positional
13
+ * argument, and every command here has one. It ate the positional:
14
+ * `vat resources query 'SELECT ? AS x, ? AS y' --param a docs/` bound `docs/`
15
+ * as the SECOND SQL VALUE, left the `[path]` positional unread, and reported
16
+ * `status: success` at exit 0 with `y: 'docs/'` in its rows — a token the
17
+ * operator typed as a location, silently reinterpreted as data. On
18
+ * `vat skill test run <skill>` the same shape consumed the subject and the run
19
+ * died claiming the subject was missing.
20
+ *
21
+ * ⚠️ What the swallowed token would have DONE is a separate question, and on
22
+ * `query` the answer is "located the project": `[path]` there is a root
23
+ * locator, not a scope — see `queryCommand` — so an earlier reading of this
24
+ * incident as "answered about the whole tree instead of `docs/`" claimed a
25
+ * scoping the verb never had. The defect this module fixes is the swallow.
26
+ *
27
+ * So: no variadic options. `test/commands/no-variadic-cli-options.test.ts`
28
+ * enforces that against the source, because the defect is a declaration shape
29
+ * rather than a bug in any one command.
30
+ *
31
+ * @param value - The value Commander parsed for this occurrence of the flag
32
+ * @param previous - What earlier occurrences accumulated, or `undefined` for the first
33
+ * @returns A NEW array — never a mutation of `previous`, which on a defaulted
34
+ * option is shared by every parse of the same `Option` instance
35
+ */
36
+ export function collectRepeated(value, previous) {
37
+ return [...(previous ?? []), value];
38
+ }
39
+ //# sourceMappingURL=repeatable-option.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repeatable-option.js","sourceRoot":"","sources":["../../src/utils/repeatable-option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,QAA4B;IACzE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AACtC,CAAC"}
@@ -90,9 +90,10 @@ export declare const RESOURCES_CRAWL_WALK = "walk";
90
90
  *
91
91
  * ⚠️⚠️ **ONE DISAGREEMENT SURVIVES, AND IT DROPS FINDINGS: SYMLINKS.** The
92
92
  * `filesystem` extent crawls with `followSymlinks: false` and records no link's
93
- * own path, and `GitCrawlSource` skips mode `120000` deliberately to match it —
94
- * so BOTH projection extents omit a committed symlink that the incumbent walk
95
- * includes. For an out-of-tree target those bytes have no other path into the
93
+ * own path, and `GitCrawlSource` drops one at a single seam to match it (git's
94
+ * mode `120000` for the paths the tree snapshot described, an `lstat` for the
95
+ * collapsed `ls-files --others` entries that carry no mode) — so BOTH projection
96
+ * extents omit a symlink, committed or not, that the incumbent walk includes. For an out-of-tree target those bytes have no other path into the
96
97
  * population, which means **a broken symlink the walk reports as
97
98
  * `LINK_BROKEN_FILE` is not reported on this lane.** That is a real loss, it is
98
99
  * known, and it is the cost this default was accepted at; closing it is its own
@@ -1 +1 @@
1
- {"version":3,"file":"resource-loader.d.ts","sourceRoot":"","sources":["../../src/utils/resource-loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAIL,gBAAgB,EAEhB,KAAK,eAAe,EAEpB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAE9B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAmB,MAAM,+BAA+B,CAAC;AAG5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI1C;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,YAAY,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;IACnC;;;;;;;;;OASG;IACH,IAAI,EAAE,iBAAiB,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;CACtC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAK1F;AA+CD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,4EAA4E;AAC5E,eAAO,MAAM,0BAA0B,eAAe,CAAC;AAEvD;;;;;;;GAOG;AACH,eAAO,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