@vibesdotdev/cli 0.0.2 → 1.0.0-rc.2

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 (907) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +261 -1
  3. package/dist/boot/action-lifetime.d.ts +16 -0
  4. package/dist/boot/action-lifetime.d.ts.map +1 -0
  5. package/dist/boot/action-lifetime.js +80 -0
  6. package/dist/boot/action-lifetime.js.map +1 -0
  7. package/dist/boot/bootstrap.d.ts +190 -0
  8. package/dist/boot/bootstrap.d.ts.map +1 -0
  9. package/dist/boot/bootstrap.js +737 -0
  10. package/dist/boot/bootstrap.js.map +1 -0
  11. package/dist/boot/cli-flags.d.ts +45 -0
  12. package/dist/boot/cli-flags.d.ts.map +1 -0
  13. package/dist/boot/cli-flags.js +113 -0
  14. package/dist/boot/cli-flags.js.map +1 -0
  15. package/dist/boot/config.d.ts +25 -0
  16. package/dist/boot/config.d.ts.map +1 -0
  17. package/dist/{config.js → boot/config.js} +1 -1
  18. package/dist/boot/config.js.map +1 -0
  19. package/dist/boot/external-url.d.ts +13 -0
  20. package/dist/boot/external-url.d.ts.map +1 -0
  21. package/dist/boot/external-url.js +66 -0
  22. package/dist/boot/external-url.js.map +1 -0
  23. package/dist/boot/host-argv.d.ts +7 -0
  24. package/dist/boot/host-argv.d.ts.map +1 -0
  25. package/dist/boot/host-argv.js +8 -0
  26. package/dist/boot/host-argv.js.map +1 -0
  27. package/dist/boot/host-bootstrap.d.ts +37 -0
  28. package/dist/boot/host-bootstrap.d.ts.map +1 -0
  29. package/dist/boot/host-bootstrap.js +60 -0
  30. package/dist/boot/host-bootstrap.js.map +1 -0
  31. package/dist/boot/providers.d.ts +35 -0
  32. package/dist/boot/providers.d.ts.map +1 -0
  33. package/dist/boot/providers.js +155 -0
  34. package/dist/boot/providers.js.map +1 -0
  35. package/dist/boot/schemas/external-url.d.ts +11 -0
  36. package/dist/boot/schemas/external-url.d.ts.map +1 -0
  37. package/dist/boot/schemas/external-url.js +3 -0
  38. package/dist/boot/schemas/external-url.js.map +1 -0
  39. package/dist/boot/schemas/host-bootstrap.d.ts +7 -0
  40. package/dist/boot/schemas/host-bootstrap.d.ts.map +1 -0
  41. package/dist/boot/schemas/host-bootstrap.js +3 -0
  42. package/dist/boot/schemas/host-bootstrap.js.map +1 -0
  43. package/dist/boot/schemas/providers.d.ts +23 -0
  44. package/dist/boot/schemas/providers.d.ts.map +1 -0
  45. package/dist/boot/schemas/providers.js +3 -0
  46. package/dist/boot/schemas/providers.js.map +1 -0
  47. package/dist/boot/schemas/types.d.ts +4 -0
  48. package/dist/boot/schemas/types.d.ts.map +1 -0
  49. package/dist/{api → boot}/schemas/types.js.map +1 -1
  50. package/dist/boot/tui-plugin-policy.d.ts +8 -0
  51. package/dist/boot/tui-plugin-policy.d.ts.map +1 -0
  52. package/dist/boot/tui-plugin-policy.js +26 -0
  53. package/dist/boot/tui-plugin-policy.js.map +1 -0
  54. package/dist/boot/version.d.ts +13 -0
  55. package/dist/boot/version.d.ts.map +1 -0
  56. package/dist/boot/version.js +14 -0
  57. package/dist/boot/version.js.map +1 -0
  58. package/dist/bun/index.d.ts +2 -0
  59. package/dist/bun/index.d.ts.map +1 -0
  60. package/dist/bun/index.js +2 -0
  61. package/dist/bun/index.js.map +1 -0
  62. package/dist/bun/interactive-host.d.ts +9 -0
  63. package/dist/bun/interactive-host.d.ts.map +1 -0
  64. package/dist/bun/interactive-host.js +18 -0
  65. package/dist/bun/interactive-host.js.map +1 -0
  66. package/dist/commands/cli.kinds.d.ts +1239 -0
  67. package/dist/commands/cli.kinds.d.ts.map +1 -0
  68. package/dist/commands/cli.kinds.js +138 -0
  69. package/dist/commands/cli.kinds.js.map +1 -0
  70. package/dist/commands/cli.plugin.d.ts +22 -0
  71. package/dist/commands/cli.plugin.d.ts.map +1 -0
  72. package/dist/commands/cli.plugin.js +138 -0
  73. package/dist/commands/cli.plugin.js.map +1 -0
  74. package/dist/commands/completion/bash.d.ts +1 -1
  75. package/dist/commands/completion/bash.d.ts.map +1 -1
  76. package/dist/commands/completion/bash.impl.consumer.d.ts +6 -0
  77. package/dist/commands/completion/bash.impl.consumer.d.ts.map +1 -0
  78. package/dist/commands/completion/bash.impl.consumer.js +6 -0
  79. package/dist/commands/completion/bash.impl.consumer.js.map +1 -0
  80. package/dist/commands/completion/bash.js +4 -2
  81. package/dist/commands/completion/bash.js.map +1 -1
  82. package/dist/commands/completion/completion.consumer.plugin.d.ts +3 -0
  83. package/dist/commands/completion/completion.consumer.plugin.d.ts.map +1 -0
  84. package/dist/commands/completion/completion.consumer.plugin.js +19 -0
  85. package/dist/commands/completion/completion.consumer.plugin.js.map +1 -0
  86. package/dist/commands/completion/completion.descriptor.d.ts +1 -2
  87. package/dist/commands/completion/completion.descriptor.d.ts.map +1 -1
  88. package/dist/commands/completion/completion.descriptor.js +11 -4
  89. package/dist/commands/completion/completion.descriptor.js.map +1 -1
  90. package/dist/commands/completion/completion.descriptors.d.ts +3 -0
  91. package/dist/commands/completion/completion.descriptors.d.ts.map +1 -0
  92. package/dist/commands/completion/completion.descriptors.js +56 -0
  93. package/dist/commands/completion/completion.descriptors.js.map +1 -0
  94. package/dist/commands/completion/completion.impl.d.ts +5 -4
  95. package/dist/commands/completion/completion.impl.d.ts.map +1 -1
  96. package/dist/commands/completion/completion.impl.js +104 -145
  97. package/dist/commands/completion/completion.impl.js.map +1 -1
  98. package/dist/commands/completion/completion.install.impl.consumer.d.ts +4 -0
  99. package/dist/commands/completion/completion.install.impl.consumer.d.ts.map +1 -0
  100. package/dist/commands/completion/completion.install.impl.consumer.js +102 -0
  101. package/dist/commands/completion/completion.install.impl.consumer.js.map +1 -0
  102. package/dist/commands/completion/completion.kinds.d.ts +43 -0
  103. package/dist/commands/completion/completion.kinds.d.ts.map +1 -0
  104. package/dist/commands/completion/completion.kinds.js +17 -0
  105. package/dist/commands/completion/completion.kinds.js.map +1 -0
  106. package/dist/commands/completion/fig.d.ts +1 -1
  107. package/dist/commands/completion/fig.d.ts.map +1 -1
  108. package/dist/commands/completion/fig.impl.consumer.d.ts +6 -0
  109. package/dist/commands/completion/fig.impl.consumer.d.ts.map +1 -0
  110. package/dist/commands/completion/fig.impl.consumer.js +6 -0
  111. package/dist/commands/completion/fig.impl.consumer.js.map +1 -0
  112. package/dist/commands/completion/fish.d.ts +1 -1
  113. package/dist/commands/completion/fish.d.ts.map +1 -1
  114. package/dist/commands/completion/fish.impl.consumer.d.ts +6 -0
  115. package/dist/commands/completion/fish.impl.consumer.d.ts.map +1 -0
  116. package/dist/commands/completion/fish.impl.consumer.js +6 -0
  117. package/dist/commands/completion/fish.impl.consumer.js.map +1 -0
  118. package/dist/commands/completion/tree.d.ts +5 -26
  119. package/dist/commands/completion/tree.d.ts.map +1 -1
  120. package/dist/commands/completion/tree.js +26 -25
  121. package/dist/commands/completion/tree.js.map +1 -1
  122. package/dist/commands/completion/zsh-widget.js +4 -4
  123. package/dist/commands/completion/zsh.d.ts +1 -1
  124. package/dist/commands/completion/zsh.d.ts.map +1 -1
  125. package/dist/commands/completion/zsh.impl.consumer.d.ts +6 -0
  126. package/dist/commands/completion/zsh.impl.consumer.d.ts.map +1 -0
  127. package/dist/commands/completion/zsh.impl.consumer.js +6 -0
  128. package/dist/commands/completion/zsh.impl.consumer.js.map +1 -0
  129. package/dist/commands/completion/zsh.js +1 -1
  130. package/dist/commands/completion/zsh.js.map +1 -1
  131. package/dist/commands/docs/cli.commands.docs.descriptor.d.ts +8 -0
  132. package/dist/commands/docs/cli.commands.docs.descriptor.d.ts.map +1 -0
  133. package/dist/commands/docs/cli.commands.docs.descriptor.js +55 -0
  134. package/dist/commands/docs/cli.commands.docs.descriptor.js.map +1 -0
  135. package/dist/commands/docs/cli.docs.descriptor.d.ts +4 -0
  136. package/dist/commands/docs/cli.docs.descriptor.d.ts.map +1 -0
  137. package/dist/commands/docs/cli.docs.descriptor.js +44 -0
  138. package/dist/commands/docs/cli.docs.descriptor.js.map +1 -0
  139. package/dist/commands/docs/cli.groups.docs.descriptor.d.ts +4 -0
  140. package/dist/commands/docs/cli.groups.docs.descriptor.d.ts.map +1 -0
  141. package/dist/commands/docs/cli.groups.docs.descriptor.js +40 -0
  142. package/dist/commands/docs/cli.groups.docs.descriptor.js.map +1 -0
  143. package/dist/commands/docs/cli.output.docs.descriptor.d.ts +4 -0
  144. package/dist/commands/docs/cli.output.docs.descriptor.d.ts.map +1 -0
  145. package/dist/commands/docs/cli.output.docs.descriptor.js +45 -0
  146. package/dist/commands/docs/cli.output.docs.descriptor.js.map +1 -0
  147. package/dist/commands/docs/content/cli-commands.json +1 -0
  148. package/dist/commands/docs/content/cli-groups.json +1 -0
  149. package/dist/commands/docs/content/cli-output.json +1 -0
  150. package/dist/commands/docs/doc-paths.d.ts +11 -0
  151. package/dist/commands/docs/doc-paths.d.ts.map +1 -0
  152. package/dist/commands/docs/doc-paths.js +32 -0
  153. package/dist/commands/docs/doc-paths.js.map +1 -0
  154. package/dist/commands/docs/generate.d.ts +48 -0
  155. package/dist/commands/docs/generate.d.ts.map +1 -0
  156. package/dist/commands/docs/generate.js +121 -0
  157. package/dist/commands/docs/generate.js.map +1 -0
  158. package/dist/commands/docs/render-command.d.ts +5 -0
  159. package/dist/commands/docs/render-command.d.ts.map +1 -0
  160. package/dist/commands/docs/render-command.js +117 -0
  161. package/dist/commands/docs/render-command.js.map +1 -0
  162. package/dist/commands/docs/render-group.d.ts +5 -0
  163. package/dist/commands/docs/render-group.d.ts.map +1 -0
  164. package/dist/commands/docs/render-group.js +62 -0
  165. package/dist/commands/docs/render-group.js.map +1 -0
  166. package/dist/commands/docs/schemas/generate.d.ts +14 -0
  167. package/dist/commands/docs/schemas/generate.d.ts.map +1 -0
  168. package/dist/commands/docs/schemas/generate.js +3 -0
  169. package/dist/commands/docs/schemas/generate.js.map +1 -0
  170. package/dist/commands/output.d.ts +27 -0
  171. package/dist/commands/output.d.ts.map +1 -0
  172. package/dist/commands/output.js +104 -0
  173. package/dist/commands/output.js.map +1 -0
  174. package/dist/commands/profile/_utils.d.ts +34 -9
  175. package/dist/commands/profile/_utils.d.ts.map +1 -1
  176. package/dist/commands/profile/_utils.js +65 -37
  177. package/dist/commands/profile/_utils.js.map +1 -1
  178. package/dist/commands/profile/profile-env.d.ts +42 -0
  179. package/dist/commands/profile/profile-env.d.ts.map +1 -0
  180. package/dist/commands/profile/profile-env.js +56 -0
  181. package/dist/commands/profile/profile-env.js.map +1 -0
  182. package/dist/commands/profile/profile-group.descriptor.d.ts +1 -1
  183. package/dist/commands/profile/profile-group.descriptor.d.ts.map +1 -1
  184. package/dist/commands/profile/profile.create.descriptor.d.ts +1 -1
  185. package/dist/commands/profile/profile.create.descriptor.d.ts.map +1 -1
  186. package/dist/commands/profile/profile.create.descriptor.js +12 -1
  187. package/dist/commands/profile/profile.create.descriptor.js.map +1 -1
  188. package/dist/commands/profile/profile.create.impl.d.ts +2 -6
  189. package/dist/commands/profile/profile.create.impl.d.ts.map +1 -1
  190. package/dist/commands/profile/profile.create.impl.js +32 -9
  191. package/dist/commands/profile/profile.create.impl.js.map +1 -1
  192. package/dist/commands/profile/profile.delete.descriptor.d.ts +1 -1
  193. package/dist/commands/profile/profile.delete.descriptor.d.ts.map +1 -1
  194. package/dist/commands/profile/profile.delete.impl.d.ts +2 -7
  195. package/dist/commands/profile/profile.delete.impl.d.ts.map +1 -1
  196. package/dist/commands/profile/profile.delete.impl.js +33 -16
  197. package/dist/commands/profile/profile.delete.impl.js.map +1 -1
  198. package/dist/commands/profile/profile.environment.descriptor.d.ts +4 -0
  199. package/dist/commands/profile/profile.environment.descriptor.d.ts.map +1 -0
  200. package/dist/commands/profile/profile.environment.descriptor.js +26 -0
  201. package/dist/commands/profile/profile.environment.descriptor.js.map +1 -0
  202. package/dist/commands/profile/profile.environment.impl.d.ts +14 -0
  203. package/dist/commands/profile/profile.environment.impl.d.ts.map +1 -0
  204. package/dist/commands/profile/profile.environment.impl.js +33 -0
  205. package/dist/commands/profile/profile.environment.impl.js.map +1 -0
  206. package/dist/commands/profile/profile.info.descriptor.d.ts +1 -1
  207. package/dist/commands/profile/profile.info.descriptor.d.ts.map +1 -1
  208. package/dist/commands/profile/profile.info.descriptor.js +5 -1
  209. package/dist/commands/profile/profile.info.descriptor.js.map +1 -1
  210. package/dist/commands/profile/profile.info.impl.d.ts +5 -2
  211. package/dist/commands/profile/profile.info.impl.d.ts.map +1 -1
  212. package/dist/commands/profile/profile.info.impl.js +31 -14
  213. package/dist/commands/profile/profile.info.impl.js.map +1 -1
  214. package/dist/commands/profile/profile.list.descriptor.d.ts +1 -1
  215. package/dist/commands/profile/profile.list.descriptor.d.ts.map +1 -1
  216. package/dist/commands/profile/profile.list.descriptor.js +5 -1
  217. package/dist/commands/profile/profile.list.descriptor.js.map +1 -1
  218. package/dist/commands/profile/profile.list.impl.d.ts +17 -2
  219. package/dist/commands/profile/profile.list.impl.d.ts.map +1 -1
  220. package/dist/commands/profile/profile.list.impl.js +52 -25
  221. package/dist/commands/profile/profile.list.impl.js.map +1 -1
  222. package/dist/commands/profile/profile.use.descriptor.d.ts +1 -1
  223. package/dist/commands/profile/profile.use.descriptor.d.ts.map +1 -1
  224. package/dist/commands/profile/profile.use.impl.d.ts +2 -6
  225. package/dist/commands/profile/profile.use.impl.d.ts.map +1 -1
  226. package/dist/commands/profile/profile.use.impl.js +40 -10
  227. package/dist/commands/profile/profile.use.impl.js.map +1 -1
  228. package/dist/commands/runtime/codegen.command.descriptor.d.ts +26 -12
  229. package/dist/commands/runtime/codegen.command.descriptor.d.ts.map +1 -1
  230. package/dist/commands/runtime/codegen.command.descriptor.js +24 -6
  231. package/dist/commands/runtime/codegen.command.descriptor.js.map +1 -1
  232. package/dist/commands/runtime/codegen.command.impl.d.ts +15 -2
  233. package/dist/commands/runtime/codegen.command.impl.d.ts.map +1 -1
  234. package/dist/commands/runtime/codegen.command.impl.js +17 -30
  235. package/dist/commands/runtime/codegen.command.impl.js.map +1 -1
  236. package/dist/commands/runtime/codegen.d.ts +10 -14
  237. package/dist/commands/runtime/codegen.d.ts.map +1 -1
  238. package/dist/commands/runtime/codegen.declarations.d.ts +6 -0
  239. package/dist/commands/runtime/codegen.declarations.d.ts.map +1 -0
  240. package/dist/commands/runtime/codegen.declarations.js +6 -0
  241. package/dist/commands/runtime/codegen.declarations.js.map +1 -0
  242. package/dist/commands/runtime/codegen.js +85 -58
  243. package/dist/commands/runtime/codegen.js.map +1 -1
  244. package/dist/commands/runtime/export/markdown-document.d.ts +25 -0
  245. package/dist/commands/runtime/export/markdown-document.d.ts.map +1 -0
  246. package/dist/commands/runtime/export/markdown-document.js +38 -0
  247. package/dist/commands/runtime/export/markdown-document.js.map +1 -0
  248. package/dist/commands/runtime/export/markdown.d.ts +17 -0
  249. package/dist/commands/runtime/export/markdown.d.ts.map +1 -0
  250. package/dist/commands/runtime/export/markdown.js +141 -0
  251. package/dist/commands/runtime/export/markdown.js.map +1 -0
  252. package/dist/commands/runtime/export/read.d.ts +27 -0
  253. package/dist/commands/runtime/export/read.d.ts.map +1 -0
  254. package/dist/commands/runtime/export/read.js +128 -0
  255. package/dist/commands/runtime/export/read.js.map +1 -0
  256. package/dist/commands/runtime/export/reading-notes.d.ts +11 -0
  257. package/dist/commands/runtime/export/reading-notes.d.ts.map +1 -0
  258. package/dist/commands/runtime/export/reading-notes.js +45 -0
  259. package/dist/commands/runtime/export/reading-notes.js.map +1 -0
  260. package/dist/commands/runtime/export/register.d.ts +34 -0
  261. package/dist/commands/runtime/export/register.d.ts.map +1 -0
  262. package/dist/commands/runtime/export/register.js +57 -0
  263. package/dist/commands/runtime/export/register.js.map +1 -0
  264. package/dist/commands/runtime/export/schemas.d.ts +104 -0
  265. package/dist/commands/runtime/export/schemas.d.ts.map +1 -0
  266. package/dist/commands/runtime/export/schemas.js +38 -0
  267. package/dist/commands/runtime/export/schemas.js.map +1 -0
  268. package/dist/commands/runtime/export/write.d.ts +16 -0
  269. package/dist/commands/runtime/export/write.d.ts.map +1 -0
  270. package/dist/commands/runtime/export/write.js +36 -0
  271. package/dist/commands/runtime/export/write.js.map +1 -0
  272. package/dist/commands/runtime/export.command.impl.d.ts +18 -0
  273. package/dist/commands/runtime/export.command.impl.d.ts.map +1 -0
  274. package/dist/commands/runtime/export.command.impl.js +39 -0
  275. package/dist/commands/runtime/export.command.impl.js.map +1 -0
  276. package/dist/commands/runtime/export.d.ts +28 -0
  277. package/dist/commands/runtime/export.d.ts.map +1 -0
  278. package/dist/commands/runtime/export.descriptor.d.ts +55 -0
  279. package/dist/commands/runtime/export.descriptor.d.ts.map +1 -0
  280. package/dist/commands/runtime/export.descriptor.js +58 -0
  281. package/dist/commands/runtime/export.descriptor.js.map +1 -0
  282. package/dist/commands/runtime/export.js +28 -0
  283. package/dist/commands/runtime/export.js.map +1 -0
  284. package/dist/commands/runtime/index.d.ts +2 -2
  285. package/dist/commands/runtime/index.d.ts.map +1 -1
  286. package/dist/commands/runtime/index.js +3 -3
  287. package/dist/commands/runtime/index.js.map +1 -1
  288. package/dist/commands/runtime/plugin.d.ts +1 -1
  289. package/dist/commands/runtime/plugin.d.ts.map +1 -1
  290. package/dist/commands/runtime/plugin.js +1 -1
  291. package/dist/commands/runtime/plugin.js.map +1 -1
  292. package/dist/commands/runtime/runtime-group.descriptor.d.ts +1 -1
  293. package/dist/commands/runtime/runtime-group.descriptor.d.ts.map +1 -1
  294. package/dist/commands/schemas/output.d.ts +26 -0
  295. package/dist/commands/schemas/output.d.ts.map +1 -0
  296. package/dist/commands/schemas/output.js +14 -0
  297. package/dist/commands/schemas/output.js.map +1 -0
  298. package/dist/commands/schemas/profile-environment.d.ts +6 -0
  299. package/dist/commands/schemas/profile-environment.d.ts.map +1 -0
  300. package/dist/commands/schemas/profile-environment.js +3 -0
  301. package/dist/commands/schemas/profile-environment.js.map +1 -0
  302. package/dist/commands/schemas/profile-list.d.ts +22 -0
  303. package/dist/commands/schemas/profile-list.d.ts.map +1 -0
  304. package/dist/commands/schemas/profile-list.js +3 -0
  305. package/dist/commands/schemas/profile-list.js.map +1 -0
  306. package/dist/commands/skills/_skills.d.ts +98 -0
  307. package/dist/commands/skills/_skills.d.ts.map +1 -0
  308. package/dist/commands/skills/_skills.js +183 -0
  309. package/dist/commands/skills/_skills.js.map +1 -0
  310. package/dist/commands/skills/skills-group.descriptor.d.ts +4 -0
  311. package/dist/commands/skills/skills-group.descriptor.d.ts.map +1 -0
  312. package/dist/commands/skills/skills-group.descriptor.js +12 -0
  313. package/dist/commands/skills/skills-group.descriptor.js.map +1 -0
  314. package/dist/commands/skills/skills.install.descriptor.d.ts +4 -0
  315. package/dist/commands/skills/skills.install.descriptor.d.ts.map +1 -0
  316. package/dist/commands/skills/skills.install.descriptor.js +37 -0
  317. package/dist/commands/skills/skills.install.descriptor.js.map +1 -0
  318. package/dist/commands/skills/skills.install.impl.d.ts +12 -0
  319. package/dist/commands/skills/skills.install.impl.d.ts.map +1 -0
  320. package/dist/commands/skills/skills.install.impl.js +65 -0
  321. package/dist/commands/skills/skills.install.impl.js.map +1 -0
  322. package/dist/commands/skills/skills.list.descriptor.d.ts +4 -0
  323. package/dist/commands/skills/skills.list.descriptor.d.ts.map +1 -0
  324. package/dist/commands/skills/skills.list.descriptor.js +23 -0
  325. package/dist/commands/skills/skills.list.descriptor.js.map +1 -0
  326. package/dist/commands/skills/skills.list.impl.d.ts +11 -0
  327. package/dist/commands/skills/skills.list.impl.d.ts.map +1 -0
  328. package/dist/commands/skills/skills.list.impl.js +69 -0
  329. package/dist/commands/skills/skills.list.impl.js.map +1 -0
  330. package/dist/core/runtime/shared/context.d.ts +16 -16
  331. package/dist/core/runtime/shared/context.d.ts.map +1 -1
  332. package/dist/core/runtime/shared/context.js +20 -35
  333. package/dist/core/runtime/shared/context.js.map +1 -1
  334. package/dist/core/runtime/shared/options.d.ts +5 -19
  335. package/dist/core/runtime/shared/options.d.ts.map +1 -1
  336. package/dist/core/runtime/shared/options.js +87 -42
  337. package/dist/core/runtime/shared/options.js.map +1 -1
  338. package/dist/design-inventory.d.ts +23 -0
  339. package/dist/design-inventory.d.ts.map +1 -0
  340. package/dist/design-inventory.js +66 -0
  341. package/dist/design-inventory.js.map +1 -0
  342. package/dist/index.d.ts +12 -21
  343. package/dist/index.d.ts.map +1 -1
  344. package/dist/index.js +15 -25
  345. package/dist/index.js.map +1 -1
  346. package/dist/invocation/client.d.ts +20 -0
  347. package/dist/invocation/client.d.ts.map +1 -0
  348. package/dist/invocation/client.js +25 -0
  349. package/dist/invocation/client.js.map +1 -0
  350. package/dist/invocation/state.d.ts +10 -0
  351. package/dist/invocation/state.d.ts.map +1 -0
  352. package/dist/invocation/state.js +32 -0
  353. package/dist/invocation/state.js.map +1 -0
  354. package/dist/patterns/builtins/config-namespace-commands.d.ts +10 -0
  355. package/dist/patterns/builtins/config-namespace-commands.d.ts.map +1 -0
  356. package/dist/patterns/builtins/config-namespace-commands.js +132 -0
  357. package/dist/patterns/builtins/config-namespace-commands.js.map +1 -0
  358. package/dist/patterns/builtins/config-namespace-output.d.ts +9 -0
  359. package/dist/patterns/builtins/config-namespace-output.d.ts.map +1 -0
  360. package/dist/patterns/builtins/config-namespace-output.js +31 -0
  361. package/dist/patterns/builtins/config-namespace-output.js.map +1 -0
  362. package/dist/patterns/builtins/config-namespace.d.ts +23 -0
  363. package/dist/patterns/builtins/config-namespace.d.ts.map +1 -0
  364. package/dist/patterns/builtins/config-namespace.js +70 -0
  365. package/dist/patterns/builtins/config-namespace.js.map +1 -0
  366. package/dist/patterns/builtins/crud-commands.d.ts +11 -0
  367. package/dist/patterns/builtins/crud-commands.d.ts.map +1 -0
  368. package/dist/patterns/builtins/crud-commands.js +105 -0
  369. package/dist/patterns/builtins/crud-commands.js.map +1 -0
  370. package/dist/patterns/builtins/crud-output.d.ts +7 -0
  371. package/dist/patterns/builtins/crud-output.d.ts.map +1 -0
  372. package/dist/patterns/builtins/crud-output.js +21 -0
  373. package/dist/patterns/builtins/crud-output.js.map +1 -0
  374. package/dist/patterns/builtins/crud.d.ts +16 -0
  375. package/dist/patterns/builtins/crud.d.ts.map +1 -0
  376. package/dist/patterns/builtins/crud.js +38 -0
  377. package/dist/patterns/builtins/crud.js.map +1 -0
  378. package/dist/patterns/{log-viewer.d.ts → builtins/log-viewer.d.ts} +5 -5
  379. package/dist/patterns/builtins/log-viewer.d.ts.map +1 -0
  380. package/dist/patterns/{log-viewer.js → builtins/log-viewer.js} +31 -9
  381. package/dist/patterns/builtins/log-viewer.js.map +1 -0
  382. package/dist/patterns/builtins/output.d.ts +5 -0
  383. package/dist/patterns/builtins/output.d.ts.map +1 -0
  384. package/dist/patterns/builtins/output.js +25 -0
  385. package/dist/patterns/builtins/output.js.map +1 -0
  386. package/dist/patterns/{process-manager.d.ts → builtins/process-manager.d.ts} +9 -4
  387. package/dist/patterns/builtins/process-manager.d.ts.map +1 -0
  388. package/dist/patterns/{process-manager.js → builtins/process-manager.js} +46 -29
  389. package/dist/patterns/builtins/process-manager.js.map +1 -0
  390. package/dist/patterns/builtins/tool-wrapper.d.ts +18 -0
  391. package/dist/patterns/builtins/tool-wrapper.d.ts.map +1 -0
  392. package/dist/patterns/builtins/tool-wrapper.js +124 -0
  393. package/dist/patterns/builtins/tool-wrapper.js.map +1 -0
  394. package/dist/patterns/cli-value.d.ts +3 -0
  395. package/dist/patterns/cli-value.d.ts.map +1 -0
  396. package/dist/patterns/cli-value.js +42 -0
  397. package/dist/patterns/cli-value.js.map +1 -0
  398. package/dist/patterns/index.d.ts +5 -9
  399. package/dist/patterns/index.d.ts.map +1 -1
  400. package/dist/patterns/index.js +5 -9
  401. package/dist/patterns/index.js.map +1 -1
  402. package/dist/patterns/pattern.kinds.d.ts +30 -0
  403. package/dist/patterns/pattern.kinds.d.ts.map +1 -0
  404. package/dist/patterns/pattern.kinds.js +8 -0
  405. package/dist/patterns/pattern.kinds.js.map +1 -0
  406. package/dist/patterns/resolver.d.ts +11 -32
  407. package/dist/patterns/resolver.d.ts.map +1 -1
  408. package/dist/patterns/resolver.js +14 -45
  409. package/dist/patterns/resolver.js.map +1 -1
  410. package/dist/patterns/schemas.d.ts +9 -492
  411. package/dist/patterns/schemas.d.ts.map +1 -1
  412. package/dist/patterns/schemas.js +5 -94
  413. package/dist/patterns/schemas.js.map +1 -1
  414. package/dist/schemas/bootstrap.d.ts +242 -0
  415. package/dist/schemas/bootstrap.d.ts.map +1 -0
  416. package/dist/schemas/bootstrap.js +7 -0
  417. package/dist/schemas/bootstrap.js.map +1 -0
  418. package/dist/schemas/command-implementation.d.ts +34 -0
  419. package/dist/schemas/command-implementation.d.ts.map +1 -0
  420. package/dist/schemas/command-implementation.js +31 -0
  421. package/dist/schemas/command-implementation.js.map +1 -0
  422. package/dist/schemas/command-recommendations.d.ts +9 -0
  423. package/dist/schemas/command-recommendations.d.ts.map +1 -0
  424. package/dist/schemas/command-recommendations.js +14 -0
  425. package/dist/schemas/command-recommendations.js.map +1 -0
  426. package/dist/schemas/completion.d.ts +118 -0
  427. package/dist/schemas/completion.d.ts.map +1 -0
  428. package/dist/schemas/completion.js +63 -0
  429. package/dist/schemas/completion.js.map +1 -0
  430. package/dist/schemas/descriptors.d.ts +1 -129
  431. package/dist/schemas/descriptors.d.ts.map +1 -1
  432. package/dist/schemas/descriptors.js +1 -95
  433. package/dist/schemas/descriptors.js.map +1 -1
  434. package/dist/schemas/design-inventory.d.ts +20 -0
  435. package/dist/schemas/design-inventory.d.ts.map +1 -0
  436. package/dist/schemas/design-inventory.js +10 -0
  437. package/dist/schemas/design-inventory.js.map +1 -0
  438. package/dist/schemas/discovery.d.ts +17 -0
  439. package/dist/schemas/discovery.d.ts.map +1 -0
  440. package/dist/schemas/discovery.js +15 -0
  441. package/dist/schemas/discovery.js.map +1 -0
  442. package/dist/schemas/exit.d.ts +33 -0
  443. package/dist/schemas/exit.d.ts.map +1 -0
  444. package/dist/schemas/exit.js +20 -0
  445. package/dist/schemas/exit.js.map +1 -0
  446. package/dist/schemas/interactive-host.d.ts +10 -0
  447. package/dist/schemas/interactive-host.d.ts.map +1 -0
  448. package/dist/schemas/interactive-host.js +11 -0
  449. package/dist/schemas/interactive-host.js.map +1 -0
  450. package/dist/schemas/output-format.d.ts +61 -0
  451. package/dist/schemas/output-format.d.ts.map +1 -0
  452. package/dist/schemas/output-format.js +26 -0
  453. package/dist/schemas/output-format.js.map +1 -0
  454. package/dist/schemas/pattern-implementation.d.ts +1572 -0
  455. package/dist/schemas/pattern-implementation.d.ts.map +1 -0
  456. package/dist/schemas/pattern-implementation.js +12 -0
  457. package/dist/schemas/pattern-implementation.js.map +1 -0
  458. package/dist/schemas/pattern-input.d.ts +152 -0
  459. package/dist/schemas/pattern-input.d.ts.map +1 -0
  460. package/dist/schemas/pattern-input.js +194 -0
  461. package/dist/schemas/pattern-input.js.map +1 -0
  462. package/dist/schemas/pm-context.d.ts +17 -0
  463. package/dist/schemas/pm-context.d.ts.map +1 -0
  464. package/dist/schemas/pm-context.js +13 -0
  465. package/dist/schemas/pm-context.js.map +1 -0
  466. package/dist/schemas/prompts.d.ts +61 -0
  467. package/dist/schemas/prompts.d.ts.map +1 -0
  468. package/dist/schemas/prompts.js +43 -0
  469. package/dist/schemas/prompts.js.map +1 -0
  470. package/dist/schemas/runtime-codegen.d.ts +191 -0
  471. package/dist/schemas/runtime-codegen.d.ts.map +1 -0
  472. package/dist/schemas/runtime-codegen.js +83 -0
  473. package/dist/schemas/runtime-codegen.js.map +1 -0
  474. package/dist/schemas/surface.d.ts +33 -20
  475. package/dist/schemas/surface.d.ts.map +1 -1
  476. package/dist/schemas/surface.js +2 -1
  477. package/dist/schemas/surface.js.map +1 -1
  478. package/dist/schemas/terminal-input.d.ts +15 -0
  479. package/dist/schemas/terminal-input.d.ts.map +1 -0
  480. package/dist/schemas/terminal-input.js +13 -0
  481. package/dist/schemas/terminal-input.js.map +1 -0
  482. package/dist/schemas/types.d.ts +1 -201
  483. package/dist/schemas/types.d.ts.map +1 -1
  484. package/dist/support/cli-inventory.generated.d.ts +4 -0
  485. package/dist/support/cli-inventory.generated.d.ts.map +1 -0
  486. package/dist/support/cli-inventory.generated.js +31 -0
  487. package/dist/support/cli-inventory.generated.js.map +1 -0
  488. package/dist/support/logging/cli-startup.logger.descriptor.d.ts.map +1 -0
  489. package/dist/support/logging/cli-startup.logger.descriptor.js.map +1 -0
  490. package/dist/support/logging/logging.d.ts +8 -0
  491. package/dist/support/logging/logging.d.ts.map +1 -0
  492. package/dist/support/logging/logging.js +13 -0
  493. package/dist/support/logging/logging.js.map +1 -0
  494. package/dist/support/terminal-input.d.ts +11 -0
  495. package/dist/support/terminal-input.d.ts.map +1 -0
  496. package/dist/support/terminal-input.js +39 -0
  497. package/dist/support/terminal-input.js.map +1 -0
  498. package/dist/support/ui/context.descriptor.d.ts +35 -0
  499. package/dist/support/ui/context.descriptor.d.ts.map +1 -0
  500. package/dist/{ui.context.descriptor.js → support/ui/context.descriptor.js} +2 -2
  501. package/dist/support/ui/context.descriptor.js.map +1 -0
  502. package/dist/support/ui/format.client.d.ts +42 -0
  503. package/dist/support/ui/format.client.d.ts.map +1 -0
  504. package/dist/support/ui/format.client.js +92 -0
  505. package/dist/support/ui/format.client.js.map +1 -0
  506. package/dist/support/ui/format.kinds.d.ts +30 -0
  507. package/dist/support/ui/format.kinds.d.ts.map +1 -0
  508. package/dist/support/ui/format.kinds.js +8 -0
  509. package/dist/support/ui/format.kinds.js.map +1 -0
  510. package/dist/support/ui/format.plugin.d.ts +7 -0
  511. package/dist/support/ui/format.plugin.d.ts.map +1 -0
  512. package/dist/support/ui/format.plugin.js +23 -0
  513. package/dist/support/ui/format.plugin.js.map +1 -0
  514. package/dist/support/ui/formats.d.ts +4 -0
  515. package/dist/support/ui/formats.d.ts.map +1 -0
  516. package/dist/support/ui/formats.js +34 -0
  517. package/dist/support/ui/formats.js.map +1 -0
  518. package/dist/support/ui/prompts.d.ts +9 -0
  519. package/dist/support/ui/prompts.d.ts.map +1 -0
  520. package/dist/support/ui/prompts.js +99 -0
  521. package/dist/support/ui/prompts.js.map +1 -0
  522. package/dist/support/ui/schemas/types.d.ts +2 -0
  523. package/dist/support/ui/schemas/types.d.ts.map +1 -0
  524. package/dist/support/ui/schemas/types.js.map +1 -0
  525. package/dist/support/ui/schemas/ui-toolkit.d.ts +45 -0
  526. package/dist/support/ui/schemas/ui-toolkit.d.ts.map +1 -0
  527. package/dist/support/ui/schemas/ui-toolkit.js +2 -0
  528. package/dist/support/ui/schemas/ui-toolkit.js.map +1 -0
  529. package/dist/support/ui/showcase.d.ts +18 -0
  530. package/dist/support/ui/showcase.d.ts.map +1 -0
  531. package/dist/support/ui/showcase.js +101 -0
  532. package/dist/support/ui/showcase.js.map +1 -0
  533. package/dist/support/ui/table.d.ts +28 -0
  534. package/dist/support/ui/table.d.ts.map +1 -0
  535. package/dist/support/ui/table.js +74 -0
  536. package/dist/support/ui/table.js.map +1 -0
  537. package/dist/support/ui/toolkit.d.ts +56 -0
  538. package/dist/support/ui/toolkit.d.ts.map +1 -0
  539. package/dist/support/ui/toolkit.js +130 -0
  540. package/dist/support/ui/toolkit.js.map +1 -0
  541. package/dist/support/vibesdev/index.d.ts +2 -0
  542. package/dist/support/vibesdev/index.d.ts.map +1 -0
  543. package/dist/support/vibesdev/index.js +3 -0
  544. package/dist/support/vibesdev/index.js.map +1 -0
  545. package/dist/surface/CLISurface.d.ts +77 -3
  546. package/dist/surface/CLISurface.d.ts.map +1 -1
  547. package/dist/surface/CLISurface.js +642 -98
  548. package/dist/surface/CLISurface.js.map +1 -1
  549. package/dist/surface/argument-name.d.ts +14 -0
  550. package/dist/surface/argument-name.d.ts.map +1 -0
  551. package/dist/surface/argument-name.js +23 -0
  552. package/dist/surface/argument-name.js.map +1 -0
  553. package/dist/surface/attach-tui-action.d.ts +35 -9
  554. package/dist/surface/attach-tui-action.d.ts.map +1 -1
  555. package/dist/surface/attach-tui-action.js +50 -43
  556. package/dist/surface/attach-tui-action.js.map +1 -1
  557. package/dist/surface/build-context.d.ts +2 -2
  558. package/dist/surface/build-context.d.ts.map +1 -1
  559. package/dist/surface/build-context.js +26 -44
  560. package/dist/surface/build-context.js.map +1 -1
  561. package/dist/surface/command-group-policy.d.ts +2 -3
  562. package/dist/surface/command-group-policy.d.ts.map +1 -1
  563. package/dist/surface/command-group-policy.js +1 -11
  564. package/dist/surface/command-group-policy.js.map +1 -1
  565. package/dist/surface/command-implementation.d.ts +9 -0
  566. package/dist/surface/command-implementation.d.ts.map +1 -0
  567. package/dist/surface/command-implementation.js +19 -0
  568. package/dist/surface/command-implementation.js.map +1 -0
  569. package/dist/surface/command-options.d.ts +29 -0
  570. package/dist/surface/command-options.d.ts.map +1 -0
  571. package/dist/surface/command-options.js +57 -0
  572. package/dist/surface/command-options.js.map +1 -0
  573. package/dist/surface/commander-action.d.ts +25 -0
  574. package/dist/surface/commander-action.d.ts.map +1 -0
  575. package/dist/surface/commander-action.js +38 -0
  576. package/dist/surface/commander-action.js.map +1 -0
  577. package/dist/surface/discovery-cache.d.ts +3 -15
  578. package/dist/surface/discovery-cache.d.ts.map +1 -1
  579. package/dist/surface/discovery-cache.js +6 -33
  580. package/dist/surface/discovery-cache.js.map +1 -1
  581. package/dist/surface/exit.d.ts +10 -0
  582. package/dist/surface/exit.d.ts.map +1 -0
  583. package/dist/surface/exit.js +33 -0
  584. package/dist/surface/exit.js.map +1 -0
  585. package/dist/surface/failure-of.d.ts +9 -0
  586. package/dist/surface/failure-of.d.ts.map +1 -0
  587. package/dist/surface/failure-of.js +17 -0
  588. package/dist/surface/failure-of.js.map +1 -0
  589. package/dist/surface/failure-output.d.ts +50 -0
  590. package/dist/surface/failure-output.d.ts.map +1 -0
  591. package/dist/surface/failure-output.js +84 -0
  592. package/dist/surface/failure-output.js.map +1 -0
  593. package/dist/surface/failure-report.d.ts +78 -0
  594. package/dist/surface/failure-report.d.ts.map +1 -0
  595. package/dist/surface/failure-report.js +229 -0
  596. package/dist/surface/failure-report.js.map +1 -0
  597. package/dist/surface/group-fallback.d.ts +32 -0
  598. package/dist/surface/group-fallback.d.ts.map +1 -0
  599. package/dist/surface/group-fallback.js +78 -0
  600. package/dist/surface/group-fallback.js.map +1 -0
  601. package/dist/surface/index.d.ts +10 -0
  602. package/dist/surface/index.d.ts.map +1 -0
  603. package/dist/surface/index.js +8 -0
  604. package/dist/surface/index.js.map +1 -0
  605. package/dist/surface/inherited-options.d.ts +28 -0
  606. package/dist/surface/inherited-options.d.ts.map +1 -0
  607. package/dist/surface/inherited-options.js +108 -0
  608. package/dist/surface/inherited-options.js.map +1 -0
  609. package/dist/surface/interactive-gate.d.ts +41 -0
  610. package/dist/surface/interactive-gate.d.ts.map +1 -0
  611. package/dist/surface/interactive-gate.js +112 -0
  612. package/dist/surface/interactive-gate.js.map +1 -0
  613. package/dist/surface/invocation-actions.d.ts +40 -0
  614. package/dist/surface/invocation-actions.d.ts.map +1 -0
  615. package/dist/surface/invocation-actions.js +78 -0
  616. package/dist/surface/invocation-actions.js.map +1 -0
  617. package/dist/surface/invocation-effects.d.ts +11 -0
  618. package/dist/surface/invocation-effects.d.ts.map +1 -0
  619. package/dist/surface/invocation-effects.js +52 -0
  620. package/dist/surface/invocation-effects.js.map +1 -0
  621. package/dist/surface/invocation-lifecycle.d.ts +49 -0
  622. package/dist/surface/invocation-lifecycle.d.ts.map +1 -0
  623. package/dist/surface/invocation-lifecycle.js +127 -0
  624. package/dist/surface/invocation-lifecycle.js.map +1 -0
  625. package/dist/surface/output-format-request.d.ts +23 -0
  626. package/dist/surface/output-format-request.d.ts.map +1 -0
  627. package/dist/surface/output-format-request.js +116 -0
  628. package/dist/surface/output-format-request.js.map +1 -0
  629. package/dist/surface/pm-context.d.ts +5 -0
  630. package/dist/surface/pm-context.d.ts.map +1 -0
  631. package/dist/surface/pm-context.js +69 -0
  632. package/dist/surface/pm-context.js.map +1 -0
  633. package/dist/surface/register-commands.d.ts +24 -4
  634. package/dist/surface/register-commands.d.ts.map +1 -1
  635. package/dist/surface/register-commands.js +156 -63
  636. package/dist/surface/register-commands.js.map +1 -1
  637. package/dist/surface/register-groups.d.ts +4 -4
  638. package/dist/surface/register-groups.d.ts.map +1 -1
  639. package/dist/surface/register-groups.js +71 -9
  640. package/dist/surface/register-groups.js.map +1 -1
  641. package/dist/surface/schemas/CLISurface.d.ts +31 -0
  642. package/dist/surface/schemas/CLISurface.d.ts.map +1 -0
  643. package/dist/surface/schemas/CLISurface.js +2 -0
  644. package/dist/surface/schemas/CLISurface.js.map +1 -0
  645. package/dist/surface/schemas/command-implementation.d.ts +20 -0
  646. package/dist/surface/schemas/command-implementation.d.ts.map +1 -0
  647. package/dist/surface/schemas/command-implementation.js +2 -0
  648. package/dist/surface/schemas/command-implementation.js.map +1 -0
  649. package/dist/surface/schemas/interactive-gate.d.ts +29 -0
  650. package/dist/surface/schemas/interactive-gate.d.ts.map +1 -0
  651. package/dist/surface/schemas/interactive-gate.js +2 -0
  652. package/dist/surface/schemas/interactive-gate.js.map +1 -0
  653. package/package.json +273 -136
  654. package/bin/vibes.ts +0 -26
  655. package/dist/api/client/factory.d.ts +0 -29
  656. package/dist/api/client/factory.d.ts.map +0 -1
  657. package/dist/api/client/factory.js +0 -189
  658. package/dist/api/client/factory.js.map +0 -1
  659. package/dist/api/schemas/common.d.ts +0 -58
  660. package/dist/api/schemas/common.d.ts.map +0 -1
  661. package/dist/api/schemas/common.js +0 -48
  662. package/dist/api/schemas/common.js.map +0 -1
  663. package/dist/api/schemas/types.d.ts +0 -30
  664. package/dist/api/schemas/types.d.ts.map +0 -1
  665. package/dist/api/services/api.d.ts +0 -14
  666. package/dist/api/services/api.d.ts.map +0 -1
  667. package/dist/api/services/api.js +0 -110
  668. package/dist/api/services/api.js.map +0 -1
  669. package/dist/api/types.d.ts +0 -6
  670. package/dist/api/types.d.ts.map +0 -1
  671. package/dist/api/types.js +0 -5
  672. package/dist/api/types.js.map +0 -1
  673. package/dist/bin.d.ts +0 -28
  674. package/dist/bin.d.ts.map +0 -1
  675. package/dist/bin.js +0 -73
  676. package/dist/bin.js.map +0 -1
  677. package/dist/bootstrap.d.ts +0 -14
  678. package/dist/bootstrap.d.ts.map +0 -1
  679. package/dist/bootstrap.js +0 -14
  680. package/dist/bootstrap.js.map +0 -1
  681. package/dist/cli.plugin.d.ts +0 -20
  682. package/dist/cli.plugin.d.ts.map +0 -1
  683. package/dist/cli.plugin.js +0 -170
  684. package/dist/cli.plugin.js.map +0 -1
  685. package/dist/commands/runtime/_logging.d.ts +0 -11
  686. package/dist/commands/runtime/_logging.d.ts.map +0 -1
  687. package/dist/commands/runtime/_logging.js +0 -40
  688. package/dist/commands/runtime/_logging.js.map +0 -1
  689. package/dist/config.d.ts +0 -17
  690. package/dist/config.d.ts.map +0 -1
  691. package/dist/config.js.map +0 -1
  692. package/dist/core/index.d.ts +0 -9
  693. package/dist/core/index.d.ts.map +0 -1
  694. package/dist/core/index.js +0 -5
  695. package/dist/core/index.js.map +0 -1
  696. package/dist/core/namespace/hook.d.ts +0 -12
  697. package/dist/core/namespace/hook.d.ts.map +0 -1
  698. package/dist/core/namespace/hook.js +0 -15
  699. package/dist/core/namespace/hook.js.map +0 -1
  700. package/dist/core/namespace/index.d.ts +0 -18
  701. package/dist/core/namespace/index.d.ts.map +0 -1
  702. package/dist/core/namespace/index.js +0 -214
  703. package/dist/core/namespace/index.js.map +0 -1
  704. package/dist/core/namespace/schemas/index.d.ts +0 -25
  705. package/dist/core/namespace/schemas/index.d.ts.map +0 -1
  706. package/dist/core/namespace/schemas/index.js +0 -2
  707. package/dist/core/namespace/schemas/index.js.map +0 -1
  708. package/dist/core/plugins/types.d.ts +0 -81
  709. package/dist/core/plugins/types.d.ts.map +0 -1
  710. package/dist/core/plugins/types.js +0 -6
  711. package/dist/core/plugins/types.js.map +0 -1
  712. package/dist/core/runtime/context.d.ts +0 -25
  713. package/dist/core/runtime/context.d.ts.map +0 -1
  714. package/dist/core/runtime/context.js +0 -30
  715. package/dist/core/runtime/context.js.map +0 -1
  716. package/dist/core/runtime/hooks.d.ts +0 -12
  717. package/dist/core/runtime/hooks.d.ts.map +0 -1
  718. package/dist/core/runtime/hooks.js +0 -2
  719. package/dist/core/runtime/hooks.js.map +0 -1
  720. package/dist/core/schemas/manifest.d.ts +0 -24
  721. package/dist/core/schemas/manifest.d.ts.map +0 -1
  722. package/dist/core/schemas/manifest.js +0 -6
  723. package/dist/core/schemas/manifest.js.map +0 -1
  724. package/dist/core/schemas/types.d.ts +0 -7
  725. package/dist/core/schemas/types.d.ts.map +0 -1
  726. package/dist/core/schemas/types.js.map +0 -1
  727. package/dist/core/ui/interface.d.ts +0 -12
  728. package/dist/core/ui/interface.d.ts.map +0 -1
  729. package/dist/core/ui/interface.js +0 -6
  730. package/dist/core/ui/interface.js.map +0 -1
  731. package/dist/docs/cli.commands.docs.descriptor.d.ts +0 -4
  732. package/dist/docs/cli.commands.docs.descriptor.d.ts.map +0 -1
  733. package/dist/docs/cli.commands.docs.descriptor.js +0 -207
  734. package/dist/docs/cli.commands.docs.descriptor.js.map +0 -1
  735. package/dist/docs/cli.groups.docs.descriptor.d.ts +0 -4
  736. package/dist/docs/cli.groups.docs.descriptor.d.ts.map +0 -1
  737. package/dist/docs/cli.groups.docs.descriptor.js +0 -330
  738. package/dist/docs/cli.groups.docs.descriptor.js.map +0 -1
  739. package/dist/docs/cli.output.docs.descriptor.d.ts +0 -4
  740. package/dist/docs/cli.output.docs.descriptor.d.ts.map +0 -1
  741. package/dist/docs/cli.output.docs.descriptor.js +0 -442
  742. package/dist/docs/cli.output.docs.descriptor.js.map +0 -1
  743. package/dist/docs/types.d.ts +0 -19
  744. package/dist/docs/types.d.ts.map +0 -1
  745. package/dist/docs/types.js +0 -2
  746. package/dist/docs/types.js.map +0 -1
  747. package/dist/errors.d.ts +0 -74
  748. package/dist/errors.d.ts.map +0 -1
  749. package/dist/errors.js +0 -113
  750. package/dist/errors.js.map +0 -1
  751. package/dist/logging/cli-startup.logger.descriptor.d.ts.map +0 -1
  752. package/dist/logging/cli-startup.logger.descriptor.js.map +0 -1
  753. package/dist/logging.d.ts +0 -4
  754. package/dist/logging.d.ts.map +0 -1
  755. package/dist/logging.js +0 -21
  756. package/dist/logging.js.map +0 -1
  757. package/dist/patterns/config-namespace.d.ts +0 -23
  758. package/dist/patterns/config-namespace.d.ts.map +0 -1
  759. package/dist/patterns/config-namespace.js +0 -218
  760. package/dist/patterns/config-namespace.js.map +0 -1
  761. package/dist/patterns/crud.d.ts +0 -23
  762. package/dist/patterns/crud.d.ts.map +0 -1
  763. package/dist/patterns/crud.js +0 -164
  764. package/dist/patterns/crud.js.map +0 -1
  765. package/dist/patterns/log-viewer.d.ts.map +0 -1
  766. package/dist/patterns/log-viewer.js.map +0 -1
  767. package/dist/patterns/pattern-types.d.ts +0 -21
  768. package/dist/patterns/pattern-types.d.ts.map +0 -1
  769. package/dist/patterns/pattern-types.js +0 -7
  770. package/dist/patterns/pattern-types.js.map +0 -1
  771. package/dist/patterns/process-manager.d.ts.map +0 -1
  772. package/dist/patterns/process-manager.js.map +0 -1
  773. package/dist/patterns/resolver.contracts.d.ts +0 -14
  774. package/dist/patterns/resolver.contracts.d.ts.map +0 -1
  775. package/dist/patterns/resolver.contracts.js +0 -9
  776. package/dist/patterns/resolver.contracts.js.map +0 -1
  777. package/dist/patterns/tool-wrapper.d.ts +0 -18
  778. package/dist/patterns/tool-wrapper.d.ts.map +0 -1
  779. package/dist/patterns/tool-wrapper.js +0 -130
  780. package/dist/patterns/tool-wrapper.js.map +0 -1
  781. package/dist/providers.d.ts +0 -105
  782. package/dist/providers.d.ts.map +0 -1
  783. package/dist/providers.js +0 -164
  784. package/dist/providers.js.map +0 -1
  785. package/dist/support/ui-toolkit.d.ts +0 -62
  786. package/dist/support/ui-toolkit.d.ts.map +0 -1
  787. package/dist/support/ui-toolkit.js +0 -172
  788. package/dist/support/ui-toolkit.js.map +0 -1
  789. package/dist/surface.d.ts +0 -9
  790. package/dist/surface.d.ts.map +0 -1
  791. package/dist/surface.js +0 -8
  792. package/dist/surface.js.map +0 -1
  793. package/dist/types.d.ts +0 -4
  794. package/dist/types.d.ts.map +0 -1
  795. package/dist/types.js +0 -2
  796. package/dist/types.js.map +0 -1
  797. package/dist/ui/schemas/types.d.ts +0 -2
  798. package/dist/ui/schemas/types.d.ts.map +0 -1
  799. package/dist/ui/schemas/types.js +0 -2
  800. package/dist/ui/schemas/types.js.map +0 -1
  801. package/dist/ui/toolkit/VibesUIToolkit.d.ts +0 -2
  802. package/dist/ui/toolkit/VibesUIToolkit.d.ts.map +0 -1
  803. package/dist/ui/toolkit/VibesUIToolkit.js +0 -2
  804. package/dist/ui/toolkit/VibesUIToolkit.js.map +0 -1
  805. package/dist/ui.context.descriptor.d.ts +0 -21
  806. package/dist/ui.context.descriptor.d.ts.map +0 -1
  807. package/dist/ui.context.descriptor.js.map +0 -1
  808. package/dist/utils/open.d.ts +0 -2
  809. package/dist/utils/open.d.ts.map +0 -1
  810. package/dist/utils/open.js +0 -30
  811. package/dist/utils/open.js.map +0 -1
  812. package/dist/version.d.ts +0 -2
  813. package/dist/version.d.ts.map +0 -1
  814. package/dist/version.js +0 -2
  815. package/dist/version.js.map +0 -1
  816. package/src/api/client/factory.ts +0 -265
  817. package/src/api/schemas/common.ts +0 -50
  818. package/src/api/schemas/types.ts +0 -32
  819. package/src/api/services/api.ts +0 -129
  820. package/src/api/types.ts +0 -12
  821. package/src/bin.ts +0 -84
  822. package/src/bootstrap.ts +0 -19
  823. package/src/cli.plugin.d.ts +0 -19
  824. package/src/cli.plugin.ts +0 -202
  825. package/src/commands/completion/bash.ts +0 -68
  826. package/src/commands/completion/completion.descriptor.ts +0 -48
  827. package/src/commands/completion/completion.impl.ts +0 -188
  828. package/src/commands/completion/fig.ts +0 -78
  829. package/src/commands/completion/fish.ts +0 -52
  830. package/src/commands/completion/tree.ts +0 -115
  831. package/src/commands/completion/zsh-widget.ts +0 -39
  832. package/src/commands/completion/zsh.ts +0 -165
  833. package/src/commands/profile/_utils.ts +0 -72
  834. package/src/commands/profile/profile-group.descriptor.ts +0 -14
  835. package/src/commands/profile/profile.create.descriptor.ts +0 -24
  836. package/src/commands/profile/profile.create.impl.ts +0 -44
  837. package/src/commands/profile/profile.delete.descriptor.ts +0 -31
  838. package/src/commands/profile/profile.delete.impl.ts +0 -71
  839. package/src/commands/profile/profile.info.descriptor.ts +0 -25
  840. package/src/commands/profile/profile.info.impl.ts +0 -51
  841. package/src/commands/profile/profile.list.descriptor.ts +0 -18
  842. package/src/commands/profile/profile.list.impl.ts +0 -46
  843. package/src/commands/profile/profile.use.descriptor.ts +0 -25
  844. package/src/commands/profile/profile.use.impl.ts +0 -39
  845. package/src/commands/runtime/_logging.ts +0 -47
  846. package/src/commands/runtime/codegen.command.descriptor.ts +0 -18
  847. package/src/commands/runtime/codegen.command.impl.ts +0 -44
  848. package/src/commands/runtime/codegen.ts +0 -84
  849. package/src/commands/runtime/index.ts +0 -14
  850. package/src/commands/runtime/plugin.ts +0 -7
  851. package/src/commands/runtime/runtime-group.descriptor.ts +0 -12
  852. package/src/config.ts +0 -22
  853. package/src/core/index.ts +0 -9
  854. package/src/core/namespace/hook.ts +0 -25
  855. package/src/core/namespace/index.ts +0 -298
  856. package/src/core/namespace/schemas/index.ts +0 -25
  857. package/src/core/plugins/types.ts +0 -87
  858. package/src/core/runtime/context.ts +0 -50
  859. package/src/core/runtime/hooks.ts +0 -12
  860. package/src/core/runtime/shared/context.ts +0 -65
  861. package/src/core/runtime/shared/options.ts +0 -60
  862. package/src/core/schemas/manifest.ts +0 -26
  863. package/src/core/schemas/types.ts +0 -6
  864. package/src/core/ui/interface.ts +0 -12
  865. package/src/docs/cli.commands.docs.descriptor.ts +0 -210
  866. package/src/docs/cli.groups.docs.descriptor.ts +0 -333
  867. package/src/docs/cli.output.docs.descriptor.ts +0 -445
  868. package/src/docs/types.ts +0 -18
  869. package/src/errors.ts +0 -123
  870. package/src/index.ts +0 -76
  871. package/src/logging/cli-startup.logger.descriptor.ts +0 -16
  872. package/src/logging.ts +0 -35
  873. package/src/patterns/config-namespace.ts +0 -251
  874. package/src/patterns/crud.ts +0 -217
  875. package/src/patterns/index.ts +0 -24
  876. package/src/patterns/log-viewer.ts +0 -118
  877. package/src/patterns/pattern-types.ts +0 -22
  878. package/src/patterns/process-manager.ts +0 -180
  879. package/src/patterns/resolver.contracts.ts +0 -15
  880. package/src/patterns/resolver.ts +0 -86
  881. package/src/patterns/schemas.ts +0 -146
  882. package/src/patterns/tool-wrapper.ts +0 -165
  883. package/src/providers.ts +0 -282
  884. package/src/schemas/descriptors.d.ts +0 -119
  885. package/src/schemas/descriptors.ts +0 -136
  886. package/src/schemas/surface.ts +0 -52
  887. package/src/schemas/types.d.ts +0 -195
  888. package/src/schemas/types.ts +0 -225
  889. package/src/support/ui-toolkit.ts +0 -224
  890. package/src/surface/CLISurface.ts +0 -193
  891. package/src/surface/attach-tui-action.ts +0 -76
  892. package/src/surface/build-context.ts +0 -49
  893. package/src/surface/command-group-policy.ts +0 -52
  894. package/src/surface/discovery-cache.ts +0 -143
  895. package/src/surface/register-commands.ts +0 -266
  896. package/src/surface/register-groups.ts +0 -84
  897. package/src/surface.ts +0 -9
  898. package/src/types.ts +0 -3
  899. package/src/ui/schemas/types.ts +0 -1
  900. package/src/ui/toolkit/VibesUIToolkit.ts +0 -1
  901. package/src/ui.context.descriptor.ts +0 -13
  902. package/src/utils/open.ts +0 -36
  903. package/src/version.ts +0 -10
  904. /package/dist/{api → boot}/schemas/types.js +0 -0
  905. /package/dist/{logging → support/logging}/cli-startup.logger.descriptor.d.ts +0 -0
  906. /package/dist/{logging → support/logging}/cli-startup.logger.descriptor.js +0 -0
  907. /package/dist/{core → support/ui}/schemas/types.js +0 -0
@@ -0,0 +1,25 @@
1
+ /**
2
+ * What Commander hands an action: `(...positionals, options, command)`, read
3
+ * once at that boundary. The options are the merged scopes of the selected
4
+ * command (source priority first, the deeper command on ties), never
5
+ * Commander's ancestor-wins `optsWithGlobals()`.
6
+ */
7
+ import { Command } from 'commander';
8
+ import { type CommandExecutionStartInfo, type CommandOptionValue, type CommandOptions } from '../schemas/surface.ts';
9
+ /** A command's positional arguments by argument name: the surface's own execution contract. */
10
+ export type CommandArguments = CommandExecutionStartInfo['args'];
11
+ export interface CommanderActionCall {
12
+ /** The positional values, in declaration order, each parsed. */
13
+ readonly positionals: readonly (CommandOptionValue | undefined)[];
14
+ /** The selected command's merged option scopes (a fresh object the caller may normalize). */
15
+ readonly options: CommandOptions;
16
+ /** The command Commander dispatched, when it passed one (it always does). */
17
+ readonly command: Command | undefined;
18
+ }
19
+ /**
20
+ * Read Commander's action call. A positional or option value outside the
21
+ * command option contract refuses `INVALID_INPUT` `command-options-invalid`
22
+ * before the implementation runs.
23
+ */
24
+ export declare function readCommanderAction(actionArgs: readonly unknown[]): CommanderActionCall;
25
+ //# sourceMappingURL=commander-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commander-action.d.ts","sourceRoot":"","sources":["../../src/surface/commander-action.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAA4B,KAAK,yBAAyB,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI/I,+FAA+F;AAC/F,MAAM,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAQjE,MAAM,WAAW,mBAAmB;IACnC,gEAAgE;IAChE,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,kBAAkB,GAAG,SAAS,CAAC,EAAE,CAAC;IAClE,6FAA6F;IAC7F,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,SAAS,OAAO,EAAE,GAAG,mBAAmB,CAcvF"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * What Commander hands an action: `(...positionals, options, command)`, read
3
+ * once at that boundary. The options are the merged scopes of the selected
4
+ * command (source priority first, the deeper command on ties), never
5
+ * Commander's ancestor-wins `optsWithGlobals()`.
6
+ */
7
+ import { Command } from 'commander';
8
+ import * as z from 'zod/v4';
9
+ import { CapabilityError } from '@vibesdotdev/kernel';
10
+ import { CommandOptionValueSchema } from "../schemas/surface.js";
11
+ import { parseCommandOptionBag } from "./command-options.js";
12
+ import { resolveScopedCommandOptions } from "./inherited-options.js";
13
+ /** Commander's per-command option bag: a record keyed by option name (parsed by the command option contract). */
14
+ const OptionBagSchema = z.looseObject({});
15
+ /** The positional values Commander passes: text, a variadic text list, or absent. */
16
+ const PositionalsSchema = z.array(CommandOptionValueSchema.optional());
17
+ /**
18
+ * Read Commander's action call. A positional or option value outside the
19
+ * command option contract refuses `INVALID_INPUT` `command-options-invalid`
20
+ * before the implementation runs.
21
+ */
22
+ export function readCommanderAction(actionArgs) {
23
+ const raw = [...actionArgs];
24
+ const last = raw.pop();
25
+ const bag = raw.pop();
26
+ const positionals = PositionalsSchema.safeParse(raw);
27
+ if (!positionals.success) {
28
+ throw new CapabilityError('A positional argument is not text.', 'INVALID_INPUT', {
29
+ reason: 'command-options-invalid', retryable: false, details: { positions: positionals.error.issues.map((issue) => String(issue.path[0] ?? "")) }
30
+ });
31
+ }
32
+ const command = last instanceof Command ? last : undefined;
33
+ if (command)
34
+ return { positionals: positionals.data, options: resolveScopedCommandOptions(command), command };
35
+ const bagged = OptionBagSchema.safeParse(bag);
36
+ return { positionals: positionals.data, options: bagged.success ? parseCommandOptionBag(bagged.data) : {}, command };
37
+ }
38
+ //# sourceMappingURL=commander-action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commander-action.js","sourceRoot":"","sources":["../../src/surface/commander-action.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAA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AC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IAC9G,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC9C,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC;AACtH,CAAC"}
@@ -1,17 +1,5 @@
1
- import type { VibesRuntime } from '@vibesdotdev/runtime/api/runtime';
2
- import type { CLICommandAssetDescriptor, CLIGroupAssetDescriptor } from '../schemas/descriptors';
3
- export interface CLIDiscoveryOptions {
4
- includeInternal?: boolean;
5
- }
6
- export interface CLIDiscovery {
7
- allGroups: CLIGroupAssetDescriptor[];
8
- allCommands: CLICommandAssetDescriptor[];
9
- groups: CLIGroupAssetDescriptor[];
10
- commands: CLICommandAssetDescriptor[];
11
- groupsById: Map<string, CLIGroupAssetDescriptor>;
12
- sortedGroups: CLIGroupAssetDescriptor[];
13
- sortedCommands: CLICommandAssetDescriptor[];
14
- }
1
+ import type { VibesRuntime } from '@vibesdotdev/kernel/api/runtime';
2
+ import type { CLIDiscovery, CLIDiscoveryOptions } from '../schemas/discovery.ts';
3
+ export type { CLIDiscovery, CLIDiscoveryOptions } from '../schemas/discovery.ts';
15
4
  export declare function getCLIDiscovery(runtime: VibesRuntime, options?: CLIDiscoveryOptions): CLIDiscovery;
16
- export declare function clearCLIDiscoveryCache(runtime?: VibesRuntime): void;
17
5
  //# sourceMappingURL=discovery-cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discovery-cache.d.ts","sourceRoot":"","sources":["../../src/surface/discovery-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EACX,yBAAyB,EACzB,uBAAuB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,mBAAmB;IACnC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,uBAAuB,EAAE,CAAC;IACrC,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACzC,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC,QAAQ,EAAE,yBAAyB,EAAE,CAAC;IACtC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACjD,YAAY,EAAE,uBAAuB,EAAE,CAAC;IACxC,cAAc,EAAE,yBAAyB,EAAE,CAAC;CAC5C;AASD,wBAAgB,eAAe,CAC9B,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE,mBAAwB,GAC/B,YAAY,CAsDd;AAED,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAOnE"}
1
+ {"version":3,"file":"discovery-cache.d.ts","sourceRoot":"","sources":["../../src/surface/discovery-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAMpE,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACjF,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEjF,wBAAgB,eAAe,CAC9B,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE,mBAAwB,GAC/B,YAAY,CAkCd"}
@@ -1,31 +1,17 @@
1
- const discoveryCache = new WeakMap();
2
1
  export function getCLIDiscovery(runtime, options = {}) {
3
2
  const includeInternal = options.includeInternal === true;
4
- const allGroups = runtime.assets('cli/group').descriptors();
5
- const allCommands = runtime.assets('cli/command').descriptors();
3
+ // The kinds validated each descriptor against its schema at registration,
4
+ // so the typed accessor reads them as the kinds' own descriptor types.
5
+ const allGroups = runtime.query('cli/group').descriptors();
6
+ const allCommands = runtime.query('cli/command').descriptors();
6
7
  const scope = runtime.scope;
7
- const cacheKey = [
8
- scope.surface ?? '',
9
- scope.hardware ?? '',
10
- scope.purpose ?? '',
11
- includeInternal ? 'internal' : 'public'
12
- ].join(':');
13
- const fingerprint = buildFingerprint(allGroups, allCommands);
14
- let runtimeCache = discoveryCache.get(runtime);
15
- if (!runtimeCache) {
16
- runtimeCache = new Map();
17
- discoveryCache.set(runtime, runtimeCache);
18
- }
19
- const cached = runtimeCache.get(cacheKey);
20
- if (cached?.fingerprint === fingerprint)
21
- return cached.discovery;
22
8
  const groupsById = new Map(allGroups.map((group) => [group.id, group]));
23
9
  const groups = allGroups.filter((group) => {
24
10
  if (group.enabled === false)
25
11
  return false;
26
12
  if (group.hardware?.length && !group.hardware.includes(scope.hardware))
27
13
  return false;
28
- if (group.surfaces?.length && !group.surfaces.includes(scope.surface))
14
+ if (group.surfaces?.length && !group.surfaces.some((surface) => surface === scope.surface))
29
15
  return false;
30
16
  if (!includeInternal && group.internal === true)
31
17
  return false;
@@ -36,8 +22,7 @@ export function getCLIDiscovery(runtime, options = {}) {
36
22
  return false;
37
23
  if (command.hardware?.length && !command.hardware.includes(scope.hardware))
38
24
  return false;
39
- if (command.surfaces?.length &&
40
- !command.surfaces.includes(scope.surface))
25
+ if (command.surfaces?.length && !command.surfaces.some((surface) => surface === scope.surface))
41
26
  return false;
42
27
  if (!includeInternal && command.internal === true)
43
28
  return false;
@@ -54,17 +39,8 @@ export function getCLIDiscovery(runtime, options = {}) {
54
39
  sortedGroups: sortGroupsByDepth(groups),
55
40
  sortedCommands: [...commands].sort(byOrder)
56
41
  };
57
- runtimeCache.set(cacheKey, { fingerprint, discovery });
58
42
  return discovery;
59
43
  }
60
- export function clearCLIDiscoveryCache(runtime) {
61
- if (runtime) {
62
- discoveryCache.delete(runtime);
63
- return;
64
- }
65
- // WeakMap cannot be cleared. This helper intentionally supports targeted
66
- // invalidation for tests or runtimes that mutate descriptors after bootstrap.
67
- }
68
44
  function sortGroupsByDepth(groups) {
69
45
  const groupMap = new Map(groups.map((group) => [group.id, group]));
70
46
  const depths = new Map();
@@ -100,7 +76,4 @@ function byOrder(a, b) {
100
76
  return orderDiff;
101
77
  return a.id.localeCompare(b.id);
102
78
  }
103
- function buildFingerprint(groups, commands) {
104
- return JSON.stringify({ groups, commands });
105
- }
106
79
  //# sourceMappingURL=discovery-cache.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"discovery-cache.js","sourceRoot":"","sources":["../../src/surface/discovery-cache.ts"],"names":[],"mappings":"AAyBA,MAAM,cAAc,GAAG,IAAI,OAAO,EAA8C,CAAC;AAEjF,MAAM,UAAU,eAAe,CAC9B,OAAqB,EACrB,UAA+B,EAAE;IAEjC,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,KAAK,IAAI,CAAC;IACzD,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,EAA+B,CAAC;IACzF,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,WAAW,EAAiC,CAAC;IAC/F,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5B,MAAM,QAAQ,GAAG;QAChB,KAAK,CAAC,OAAO,IAAI,EAAE;QACnB,KAAK,CAAC,QAAQ,IAAI,EAAE;QACpB,KAAK,CAAC,OAAO,IAAI,EAAE;QACnB,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ;KACvC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACZ,MAAM,WAAW,GAAG,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAC7D,IAAI,YAAY,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/C,IAAI,CAAC,YAAY,EAAE,CAAC;QACnB,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QACzB,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC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AAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;QACpE,IAAI,SAAS,KAAK,CAAC;YAAE,OAAO,SAAS,CAAC;QACtC,OAAO,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CACf,CAA4E,EAC5E,CAA4E;IAE5E,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC;IACtD,IAAI,SAAS,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACtC,OAAO,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /** Intentional stack termination. This leaf imports only the kernel and schemas. */
2
+ import { type CaughtFailure } from '@vibesdotdev/kernel';
3
+ import { type CLIExitOptions, type CLIExitSignal } from '../schemas/exit.ts';
4
+ export type { CLIExitOptions, CLIExitSignal } from '../schemas/exit.ts';
5
+ /** The `name` an exit request carries; match it through {@link isCLIExitSignal}. */
6
+ export declare const CLI_EXIT_SIGNAL_NAME = "CLIExitSignal";
7
+ /** Recognize exit requests across duplicate module instances. */
8
+ export declare function isCLIExitSignal(caught: CaughtFailure): caught is CLIExitSignal;
9
+ export declare function requestCLIExit(code?: number, options?: CLIExitOptions): never;
10
+ //# sourceMappingURL=exit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["../../src/surface/exit.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,EAA8B,KAAK,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAA4C,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvH,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxE,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAqBpD,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,IAAI,aAAa,CAO9E;AAED,wBAAgB,cAAc,CAAC,IAAI,SAAI,EAAE,OAAO,GAAE,cAAmB,GAAG,KAAK,CAE5E"}
@@ -0,0 +1,33 @@
1
+ /** Intentional stack termination. This leaf imports only the kernel and schemas. */
2
+ import { CapabilityError, settleNow } from '@vibesdotdev/kernel';
3
+ import { CLIExitSignalSchema, CLIExitStatusSchema } from "../schemas/exit.js";
4
+ const CLI_EXIT_SIGNAL_BRAND = Symbol.for('@vibesdotdev/cli/CLIExitSignal');
5
+ /** The `name` an exit request carries; match it through {@link isCLIExitSignal}. */
6
+ export const CLI_EXIT_SIGNAL_NAME = 'CLIExitSignal';
7
+ function createCLIExitSignal(code, cause) {
8
+ const status = CLIExitStatusSchema.parse(code);
9
+ const outcome = status === 0
10
+ ? { ok: true, value: undefined }
11
+ : {
12
+ ok: false,
13
+ cause: new CapabilityError('CLI requested a nonzero exit.', 'INTERNAL', {
14
+ reason: 'cli-exit-nonzero',
15
+ retryable: false,
16
+ cause
17
+ })
18
+ };
19
+ const signal = Object.assign(new Error(`CLI requested exit with code ${status}`, cause === undefined ? undefined : { cause }), { name: CLI_EXIT_SIGNAL_NAME, code: status, outcome, [CLI_EXIT_SIGNAL_BRAND]: true });
20
+ return CLIExitSignalSchema.parse(signal);
21
+ }
22
+ /** Recognize exit requests across duplicate module instances. */
23
+ export function isCLIExitSignal(caught) {
24
+ const recognized = settleNow(() => {
25
+ const parsed = CLIExitSignalSchema.safeParse(caught);
26
+ return parsed.success && CLI_EXIT_SIGNAL_BRAND in caught && caught[CLI_EXIT_SIGNAL_BRAND] === true;
27
+ });
28
+ return recognized.ok && recognized.value;
29
+ }
30
+ export function requestCLIExit(code = 0, options = {}) {
31
+ throw createCLIExitSignal(code, options.cause);
32
+ }
33
+ //# sourceMappingURL=exit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit.js","sourceRoot":"","sources":["../../src/surface/exit.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,EAAE,eAAe,EAAE,SAAS,EAAoC,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAA2C,MAAM,oBAAoB,CAAC;AAGvH,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAE3E,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAEpD,SAAS,mBAAmB,CAAC,IAAY,EAAE,KAAqB;IAC/D,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAkB,MAAM,KAAK,CAAC;QAC1C,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;QAChC,CAAC,CAAC;YACD,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,IAAI,eAAe,CAAC,+BAA+B,EAAE,UAAU,EAAE;gBACvE,MAAM,EAAE,kBAAkB;gBAC1B,SAAS,EAAE,KAAK;gBAChB,KAAK;aACL,CAAC;SACF,CAAC;IACH,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAC3B,IAAI,KAAK,CAAC,gCAAgC,MAAM,EAAE,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAChG,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,qBAAqB,CAAC,EAAE,IAAI,EAAE,CACpF,CAAC;IACF,OAAO,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,eAAe,CAAC,MAAqB;IACpD,MAAM,UAAU,GAAG,SAAS,CAAC,GAAG,EAAE;QACjC,MAAM,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACrD,OAAO,MAAM,CAAC,OAAO,IAAI,qBAAqB,IAAI,MAAM,IAAI,MAAM,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAC;IACpG,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC,EAAE,IAAI,UAAU,CAAC,KAAK,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAI,GAAG,CAAC,EAAE,UAA0B,EAAE;IACpE,MAAM,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type CaughtFailure } from '@vibesdotdev/kernel';
2
+ /**
3
+ * Run `work`: `null` once it completes, else its failure, parsed at the catch
4
+ * with Runtime's `CaughtFailureSchema` and returned for the caller to render,
5
+ * report or carry (the Runtime catch pattern). The caller owns the failure:
6
+ * every call site handles a non-null result.
7
+ */
8
+ export declare function failureOf(work: () => void | Promise<void>): Promise<CaughtFailure | null>;
9
+ //# sourceMappingURL=failure-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failure-of.d.ts","sourceRoot":"","sources":["../../src/surface/failure-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9E;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAO/F"}
@@ -0,0 +1,17 @@
1
+ import { CaughtFailureSchema } from '@vibesdotdev/kernel';
2
+ /**
3
+ * Run `work`: `null` once it completes, else its failure, parsed at the catch
4
+ * with Runtime's `CaughtFailureSchema` and returned for the caller to render,
5
+ * report or carry (the Runtime catch pattern). The caller owns the failure:
6
+ * every call site handles a non-null result.
7
+ */
8
+ export async function failureOf(work) {
9
+ try {
10
+ await work();
11
+ return null;
12
+ }
13
+ catch (error) {
14
+ return CaughtFailureSchema.parse(error);
15
+ }
16
+ }
17
+ //# sourceMappingURL=failure-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failure-of.js","sourceRoot":"","sources":["../../src/surface/failure-of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAgC;IAC/D,IAAI,CAAC;QACJ,MAAM,IAAI,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;AACF,CAAC"}
@@ -0,0 +1,50 @@
1
+ /** Failure output shared by command surfaces and hosts that have not booted. */
2
+ import { type CaughtFailure } from '@vibesdotdev/kernel';
3
+ import type { CliHostOutput } from '../boot/schemas/providers.ts';
4
+ import { type CliFailureRenderOptions } from './failure-report.ts';
5
+ /** Whether captured argv requests a machine-readable failure envelope. */
6
+ export declare function argvWantsJson(argv: readonly string[]): boolean;
7
+ export type { JsonFailureEnvelope, CliFailureEnvelope, ReportBootstrapFailureOptions } from './schemas/CLISurface.ts';
8
+ import type { CliFailureEnvelope, JsonFailureEnvelope, ReportBootstrapFailureOptions } from './schemas/CLISurface.ts';
9
+ /**
10
+ * Generic failure envelope for throws that are not CapabilityError.
11
+ * Shape matches CapabilityError.toEnvelope() so scripts can parse one contract.
12
+ */
13
+ export declare function buildJsonFailureEnvelope(message: string, code?: string): JsonFailureEnvelope;
14
+ /**
15
+ * Emit a failure envelope on the stream that keeps `--json` parseable.
16
+ *
17
+ * stdout carries EXACTLY ONE JSON document under --json. When the command
18
+ * already wrote its own — `doctor run --json` renders the full report, then
19
+ * throws UNAVAILABLE so the exit code matches the verdict — a second document
20
+ * on stdout breaks `JSON.parse(stdout)` for every consumer of the "stable agent
21
+ * contract" the flag advertises, and it breaks it exactly when there is
22
+ * something to act on. The envelope is then diagnosis, not output: the failure
23
+ * is already in the payload and the exit code, so it goes to stderr.
24
+ */
25
+ /** Where the surface writes its own failure text and envelopes. */
26
+ type SurfaceWriter = Pick<CliHostOutput, 'write'>;
27
+ /**
28
+ * Write a failure envelope: to stdout when it is the invocation's one JSON
29
+ * document, to stderr when a document is already there (`documentWritten`:
30
+ * the surface passes its own runtime's ledger entry; by default, the owed
31
+ * free form's canonical-runtime entry only). `write` is the writer the envelope
32
+ * goes through; there is no process-stream default.
33
+ */
34
+ export declare function writeJsonEnvelope(envelope: CliFailureEnvelope, write: (fd: 1 | 2, text: string) => void, documentWritten: boolean): void;
35
+ /** A JSON envelope with every host credential value scrubbed from its text. */
36
+ export declare function writeScrubbedEnvelope(envelope: CliFailureEnvelope, env: CliFailureRenderOptions['env'], writer: SurfaceWriter, documentWritten: boolean): void;
37
+ export { mapKnownError, renderCliFailure } from './failure-report.ts';
38
+ /**
39
+ * Report a fatal HOST BOOTSTRAP failure — the `await createVibesCliApp(...)`
40
+ * host entrypoints perform with no try/catch — with the same renderer and
41
+ * `--json` envelope contract `run()` applies to command failures. Without
42
+ * this, a present-but-broken `vibes.config.ts` (unconditionally fatal in
43
+ * bootstrap) surfaced as a raw unhandled rejection: no envelope, no friendly
44
+ * mapping, runtime-dependent exit behavior.
45
+ *
46
+ * The host parses what its boot threw at its own catch
47
+ * (`reportBootstrapFailure(CaughtFailureSchema.parse(caught), …)`).
48
+ */
49
+ export declare function reportBootstrapFailure(failure: CaughtFailure, verbose: boolean, argv: readonly string[], options: ReportBootstrapFailureOptions): Promise<number>;
50
+ //# sourceMappingURL=failure-output.d.ts.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sB,CAC3C,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,6BAA6B,GACpC,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
@@ -0,0 +1,84 @@
1
+ /** Failure output shared by command surfaces and hosts that have not booted. */
2
+ import { isCapabilityError } from '@vibesdotdev/kernel';
3
+ import { renderCliFailure, scrubCliText } from "./failure-report.js";
4
+ /** Whether captured argv requests a machine-readable failure envelope. */
5
+ export function argvWantsJson(argv) {
6
+ const rest = argv.slice(2);
7
+ if (rest.includes('--json'))
8
+ return true;
9
+ for (const flag of ['--format', '--output']) {
10
+ const i = rest.indexOf(flag);
11
+ if (i >= 0 && rest[i + 1] === 'json')
12
+ return true;
13
+ // --format=json / --output=json
14
+ if (rest.some((a) => a === `${flag}=json`))
15
+ return true;
16
+ }
17
+ return false;
18
+ }
19
+ /**
20
+ * Generic failure envelope for throws that are not CapabilityError.
21
+ * Shape matches CapabilityError.toEnvelope() so scripts can parse one contract.
22
+ */
23
+ export function buildJsonFailureEnvelope(message, code = 'INTERNAL') {
24
+ return {
25
+ ok: false,
26
+ error: {
27
+ code,
28
+ message,
29
+ retryable: false
30
+ }
31
+ };
32
+ }
33
+ function writeEnvelopeBytes(writer, fd, text) {
34
+ // Through the host's tracked stream writes, never `fs.writeSync`: the output
35
+ // plane exists because mixing the two reorders and loses data on Bun 1.4.0,
36
+ // and a command that emitted tracked stdout before failing must not interleave.
37
+ writer.write(fd === 2 ? 'stderr' : 'stdout', text);
38
+ }
39
+ /**
40
+ * Write a failure envelope: to stdout when it is the invocation's one JSON
41
+ * document, to stderr when a document is already there (`documentWritten`:
42
+ * the surface passes its own runtime's ledger entry; by default, the owed
43
+ * free form's canonical-runtime entry only). `write` is the writer the envelope
44
+ * goes through; there is no process-stream default.
45
+ */
46
+ export function writeJsonEnvelope(envelope, write, documentWritten) {
47
+ write(documentWritten ? 2 : 1, `${JSON.stringify(envelope)}\n`);
48
+ }
49
+ /** A JSON envelope with every host credential value scrubbed from its text. */
50
+ export function writeScrubbedEnvelope(envelope, env, writer, documentWritten) {
51
+ writeJsonEnvelope(envelope, (fd, text) => writeEnvelopeBytes(writer, fd, scrubCliText(text, env)), documentWritten);
52
+ }
53
+ export { mapKnownError, renderCliFailure } from "./failure-report.js";
54
+ /**
55
+ * Report a fatal HOST BOOTSTRAP failure — the `await createVibesCliApp(...)`
56
+ * host entrypoints perform with no try/catch — with the same renderer and
57
+ * `--json` envelope contract `run()` applies to command failures. Without
58
+ * this, a present-but-broken `vibes.config.ts` (unconditionally fatal in
59
+ * bootstrap) surfaced as a raw unhandled rejection: no envelope, no friendly
60
+ * mapping, runtime-dependent exit behavior.
61
+ *
62
+ * The host parses what its boot threw at its own catch
63
+ * (`reportBootstrapFailure(CaughtFailureSchema.parse(caught), …)`).
64
+ */
65
+ export async function reportBootstrapFailure(failure, verbose, argv, options) {
66
+ const render = { verbose, env: options.env };
67
+ const writer = options.output;
68
+ // A typed boot failure keeps its code, reason and exit code through the
69
+ // envelope, exactly as a command failure does (`workspace-invalid` is
70
+ // INVALID_INPUT, rc02-rc03 C2).
71
+ const typed = failure instanceof Error && isCapabilityError(failure) ? failure : undefined;
72
+ if (argvWantsJson(argv)) {
73
+ // No command of this invocation has run, so the envelope is its one
74
+ // document: a ledger entry here is a previous invocation's.
75
+ writeScrubbedEnvelope(typed ? typed.toEnvelope() : buildJsonFailureEnvelope(renderCliFailure(failure, render) || 'CLI bootstrap failed.'), options.env, writer, false);
76
+ }
77
+ else {
78
+ writer.write('stderr', `${renderCliFailure(failure, render) || 'CLI bootstrap failed.'}\n`);
79
+ }
80
+ const exitCode = typed ? typed.exitCode : 1;
81
+ await options.output.flush();
82
+ return exitCode;
83
+ }
84
+ //# sourceMappingURL=failure-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failure-output.js","sourceRoot":"","sources":["../../src/surface/failure-output.ts"],"names":[],"mappings":"AAAA,gFA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C,GAAG,EACX,MAAM,EACN,KAAK,CACL,CAAC;IACH,CAAC;SAAM,CAAC;QACP,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,uBAAuB,IAAI,CAAC,CAAC;IAC7F,CAAC;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC7B,OAAO,QAAQ,CAAC;AACjB,CAAC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * The one print form of a CLI failure.
3
+ *
4
+ * Every path that prints a failure (a command failure in `CLISurface.run`, the
5
+ * exit-boundary disposal, a host bootstrap failure, a skipped telemetry emit
6
+ * under `-v`) renders it here, so they cannot disagree about what is shown:
7
+ *
8
+ * - The failure is described once by Logging's redaction walk
9
+ * (`LoggedErrorSchema`): total for any thrown value (throwing getters,
10
+ * Proxies, cycles), with credential-named keys and `secret()` values in
11
+ * details, fields and causes redacted; retained `AggregateError` members and
12
+ * causes are described within Logging's depth and breadth bounds.
13
+ * - Each retained `AggregateError` member, including nested aggregates, is
14
+ * listed with its `details.pluginId` and its retained cause chain. By default each member and cause is value-free: its
15
+ * `code`/`reason` when typed, else `Untyped failure: <class name>`, never its
16
+ * message. `-v` lists each member's stack or message and the full chain.
17
+ * "Runtime disposal failed for 1 plugin" therefore names the plugin and why.
18
+ * - Known typed refusals get friendly text by code and reason
19
+ * ({@link mapKnownError}); nothing parses a message.
20
+ * - The whole text then passes Logging's one-pass credential scrubber with the
21
+ * credential values the host env carries (keys Logging's `isSecretKey` calls
22
+ * secret), in normal and verbose modes alike.
23
+ */
24
+ import * as z from 'zod/v4';
25
+ import { type CaughtFailure } from '@vibesdotdev/kernel';
26
+ /** What a failure description is read as: the detached JSON the redaction walk produced. */
27
+ declare const DescriptionSchema: z.ZodObject<{
28
+ name: z.ZodString;
29
+ message: z.ZodString;
30
+ code: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
31
+ reason: z.ZodOptional<z.ZodString>;
32
+ details: z.ZodOptional<z.ZodUnknown>;
33
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
34
+ stack: z.ZodOptional<z.ZodString>;
35
+ cause: z.ZodOptional<z.ZodUnknown>;
36
+ errors: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
37
+ }, z.core.$strip>;
38
+ type Description = z.infer<typeof DescriptionSchema>;
39
+ /**
40
+ * A host env value shorter than this is not scrubbed from failure text: a
41
+ * credential is long, and replacing every short value (`true`, `1`) under a
42
+ * credential-named key would rewrite ordinary words.
43
+ */
44
+ export declare const MIN_SCRUBBED_CREDENTIAL_LENGTH = 8;
45
+ export interface CliFailureRenderOptions {
46
+ /** `-v`: stacks and cause chains instead of the friendly line. */
47
+ readonly verbose: boolean;
48
+ /**
49
+ * The host env snapshot (a runtime's `getEnvSnapshot()`, or the executable
50
+ * host's own before a runtime exists). Every value under a credential key is
51
+ * removed from the printed text.
52
+ */
53
+ readonly env?: Readonly<Record<string, string | undefined>>;
54
+ }
55
+ /** The credential values an env carries: values of keys Logging calls secret, long enough to be a credential. */
56
+ export declare function credentialValuesOf(env: Readonly<Record<string, string | undefined>> | undefined): string[];
57
+ /** Remove every credential value `env` carries from `text` (Logging's scrubber; it never throws). */
58
+ export declare function scrubCliText(text: string, env: Readonly<Record<string, string | undefined>> | undefined): string;
59
+ /**
60
+ * The total, redacted description of a caught failure (a catch site parses
61
+ * its binding with the runtime's `CaughtFailureSchema`): an `Error` is
62
+ * described itself, any other thrown value is described as the value it was.
63
+ */
64
+ export declare function describeCliFailure(failure: CaughtFailure): Description;
65
+ /** Drop frames pointing into the `bun build --compile` virtual filesystem; they are not actionable. */
66
+ export declare function stripBundlePaths(text: string): string;
67
+ /**
68
+ * Friendly text for the typed refusals a user can act on, chosen by code and
69
+ * reason only. `null` when no mapping applies (the caller prints the message).
70
+ */
71
+ export declare function mapKnownError(failure: CaughtFailure): string | null;
72
+ /**
73
+ * The printable text of a failure (see the module comment). Never throws and
74
+ * never returns raw thrown text: every line is described, then scrubbed.
75
+ */
76
+ export declare function renderCliFailure(caught: CaughtFailure, options: CliFailureRenderOptions): string;
77
+ export {};
78
+ //# sourceMappingURL=failure-report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failure-report.d.ts","sourceRoot":"","sources":["../../src/surface/failure-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEhF,4FAA4F;AAC5F,QAAA,MAAM,iBAAiB;;;;;;;;;;iBAUrB,CAAC;AACH,KAAK,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAUrD;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,MAAM,WAAW,uBAAuB;IACvC,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CAC5D;AAED,iHAAiH;AACjH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CAS1G;AAED,qGAAqG;AACrG,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,GAAG,MAA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