@vibesdotdev/cli 0.0.1

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 (432) hide show
  1. package/README.md +41 -0
  2. package/SPEC.md +97 -0
  3. package/bin/vibes.ts +26 -0
  4. package/dist/api/client/factory.d.ts +29 -0
  5. package/dist/api/client/factory.d.ts.map +1 -0
  6. package/dist/api/client/factory.js +189 -0
  7. package/dist/api/client/factory.js.map +1 -0
  8. package/dist/api/schemas/common.d.ts +58 -0
  9. package/dist/api/schemas/common.d.ts.map +1 -0
  10. package/dist/api/schemas/common.js +48 -0
  11. package/dist/api/schemas/common.js.map +1 -0
  12. package/dist/api/schemas/types.d.ts +30 -0
  13. package/dist/api/schemas/types.d.ts.map +1 -0
  14. package/dist/api/schemas/types.js +2 -0
  15. package/dist/api/schemas/types.js.map +1 -0
  16. package/dist/api/services/api.d.ts +14 -0
  17. package/dist/api/services/api.d.ts.map +1 -0
  18. package/dist/api/services/api.js +110 -0
  19. package/dist/api/services/api.js.map +1 -0
  20. package/dist/api/types.d.ts +6 -0
  21. package/dist/api/types.d.ts.map +1 -0
  22. package/dist/api/types.js +5 -0
  23. package/dist/api/types.js.map +1 -0
  24. package/dist/bin.d.ts +28 -0
  25. package/dist/bin.d.ts.map +1 -0
  26. package/dist/bin.js +73 -0
  27. package/dist/bin.js.map +1 -0
  28. package/dist/bootstrap.d.ts +14 -0
  29. package/dist/bootstrap.d.ts.map +1 -0
  30. package/dist/bootstrap.js +14 -0
  31. package/dist/bootstrap.js.map +1 -0
  32. package/dist/cli.plugin.d.ts +20 -0
  33. package/dist/cli.plugin.d.ts.map +1 -0
  34. package/dist/cli.plugin.js +170 -0
  35. package/dist/cli.plugin.js.map +1 -0
  36. package/dist/commands/completion/bash.d.ts +8 -0
  37. package/dist/commands/completion/bash.d.ts.map +1 -0
  38. package/dist/commands/completion/bash.js +60 -0
  39. package/dist/commands/completion/bash.js.map +1 -0
  40. package/dist/commands/completion/completion.descriptor.d.ts +10 -0
  41. package/dist/commands/completion/completion.descriptor.d.ts.map +1 -0
  42. package/dist/commands/completion/completion.descriptor.js +41 -0
  43. package/dist/commands/completion/completion.descriptor.js.map +1 -0
  44. package/dist/commands/completion/completion.impl.d.ts +12 -0
  45. package/dist/commands/completion/completion.impl.d.ts.map +1 -0
  46. package/dist/commands/completion/completion.impl.js +167 -0
  47. package/dist/commands/completion/completion.impl.js.map +1 -0
  48. package/dist/commands/completion/fig.d.ts +12 -0
  49. package/dist/commands/completion/fig.d.ts.map +1 -0
  50. package/dist/commands/completion/fig.js +71 -0
  51. package/dist/commands/completion/fig.js.map +1 -0
  52. package/dist/commands/completion/fish.d.ts +8 -0
  53. package/dist/commands/completion/fish.d.ts.map +1 -0
  54. package/dist/commands/completion/fish.js +38 -0
  55. package/dist/commands/completion/fish.js.map +1 -0
  56. package/dist/commands/completion/tree.d.ts +33 -0
  57. package/dist/commands/completion/tree.d.ts.map +1 -0
  58. package/dist/commands/completion/tree.js +75 -0
  59. package/dist/commands/completion/tree.js.map +1 -0
  60. package/dist/commands/completion/zsh-widget.d.ts +13 -0
  61. package/dist/commands/completion/zsh-widget.d.ts.map +1 -0
  62. package/dist/commands/completion/zsh-widget.js +39 -0
  63. package/dist/commands/completion/zsh-widget.js.map +1 -0
  64. package/dist/commands/completion/zsh.d.ts +9 -0
  65. package/dist/commands/completion/zsh.d.ts.map +1 -0
  66. package/dist/commands/completion/zsh.js +146 -0
  67. package/dist/commands/completion/zsh.js.map +1 -0
  68. package/dist/commands/profile/_utils.d.ts +21 -0
  69. package/dist/commands/profile/_utils.d.ts.map +1 -0
  70. package/dist/commands/profile/_utils.js +61 -0
  71. package/dist/commands/profile/_utils.js.map +1 -0
  72. package/dist/commands/profile/profile-group.descriptor.d.ts +4 -0
  73. package/dist/commands/profile/profile-group.descriptor.d.ts.map +1 -0
  74. package/dist/commands/profile/profile-group.descriptor.js +12 -0
  75. package/dist/commands/profile/profile-group.descriptor.js.map +1 -0
  76. package/dist/commands/profile/profile.create.descriptor.d.ts +4 -0
  77. package/dist/commands/profile/profile.create.descriptor.d.ts.map +1 -0
  78. package/dist/commands/profile/profile.create.descriptor.js +22 -0
  79. package/dist/commands/profile/profile.create.descriptor.js.map +1 -0
  80. package/dist/commands/profile/profile.create.impl.d.ts +10 -0
  81. package/dist/commands/profile/profile.create.impl.d.ts.map +1 -0
  82. package/dist/commands/profile/profile.create.impl.js +29 -0
  83. package/dist/commands/profile/profile.create.impl.js.map +1 -0
  84. package/dist/commands/profile/profile.delete.descriptor.d.ts +4 -0
  85. package/dist/commands/profile/profile.delete.descriptor.d.ts.map +1 -0
  86. package/dist/commands/profile/profile.delete.descriptor.js +29 -0
  87. package/dist/commands/profile/profile.delete.descriptor.js.map +1 -0
  88. package/dist/commands/profile/profile.delete.impl.d.ts +11 -0
  89. package/dist/commands/profile/profile.delete.impl.d.ts.map +1 -0
  90. package/dist/commands/profile/profile.delete.impl.js +50 -0
  91. package/dist/commands/profile/profile.delete.impl.js.map +1 -0
  92. package/dist/commands/profile/profile.info.descriptor.d.ts +4 -0
  93. package/dist/commands/profile/profile.info.descriptor.d.ts.map +1 -0
  94. package/dist/commands/profile/profile.info.descriptor.js +23 -0
  95. package/dist/commands/profile/profile.info.descriptor.js.map +1 -0
  96. package/dist/commands/profile/profile.info.impl.d.ts +10 -0
  97. package/dist/commands/profile/profile.info.impl.d.ts.map +1 -0
  98. package/dist/commands/profile/profile.info.impl.js +33 -0
  99. package/dist/commands/profile/profile.info.impl.js.map +1 -0
  100. package/dist/commands/profile/profile.list.descriptor.d.ts +4 -0
  101. package/dist/commands/profile/profile.list.descriptor.d.ts.map +1 -0
  102. package/dist/commands/profile/profile.list.descriptor.js +16 -0
  103. package/dist/commands/profile/profile.list.descriptor.js.map +1 -0
  104. package/dist/commands/profile/profile.list.impl.d.ts +10 -0
  105. package/dist/commands/profile/profile.list.impl.d.ts.map +1 -0
  106. package/dist/commands/profile/profile.list.impl.js +33 -0
  107. package/dist/commands/profile/profile.list.impl.js.map +1 -0
  108. package/dist/commands/profile/profile.use.descriptor.d.ts +4 -0
  109. package/dist/commands/profile/profile.use.descriptor.d.ts.map +1 -0
  110. package/dist/commands/profile/profile.use.descriptor.js +23 -0
  111. package/dist/commands/profile/profile.use.descriptor.js.map +1 -0
  112. package/dist/commands/profile/profile.use.impl.d.ts +10 -0
  113. package/dist/commands/profile/profile.use.impl.d.ts.map +1 -0
  114. package/dist/commands/profile/profile.use.impl.js +24 -0
  115. package/dist/commands/profile/profile.use.impl.js.map +1 -0
  116. package/dist/commands/runtime/_logging.d.ts +11 -0
  117. package/dist/commands/runtime/_logging.d.ts.map +1 -0
  118. package/dist/commands/runtime/_logging.js +40 -0
  119. package/dist/commands/runtime/_logging.js.map +1 -0
  120. package/dist/commands/runtime/codegen.command.descriptor.d.ts +15 -0
  121. package/dist/commands/runtime/codegen.command.descriptor.d.ts.map +1 -0
  122. package/dist/commands/runtime/codegen.command.descriptor.js +18 -0
  123. package/dist/commands/runtime/codegen.command.descriptor.js.map +1 -0
  124. package/dist/commands/runtime/codegen.command.impl.d.ts +4 -0
  125. package/dist/commands/runtime/codegen.command.impl.d.ts.map +1 -0
  126. package/dist/commands/runtime/codegen.command.impl.js +39 -0
  127. package/dist/commands/runtime/codegen.command.impl.js.map +1 -0
  128. package/dist/commands/runtime/codegen.d.ts +17 -0
  129. package/dist/commands/runtime/codegen.d.ts.map +1 -0
  130. package/dist/commands/runtime/codegen.js +65 -0
  131. package/dist/commands/runtime/codegen.js.map +1 -0
  132. package/dist/commands/runtime/index.d.ts +4 -0
  133. package/dist/commands/runtime/index.d.ts.map +1 -0
  134. package/dist/commands/runtime/index.js +8 -0
  135. package/dist/commands/runtime/index.js.map +1 -0
  136. package/dist/commands/runtime/plugin.d.ts +2 -0
  137. package/dist/commands/runtime/plugin.d.ts.map +1 -0
  138. package/dist/commands/runtime/plugin.js +7 -0
  139. package/dist/commands/runtime/plugin.js.map +1 -0
  140. package/dist/commands/runtime/runtime-group.descriptor.d.ts +4 -0
  141. package/dist/commands/runtime/runtime-group.descriptor.d.ts.map +1 -0
  142. package/dist/commands/runtime/runtime-group.descriptor.js +10 -0
  143. package/dist/commands/runtime/runtime-group.descriptor.js.map +1 -0
  144. package/dist/config.d.ts +17 -0
  145. package/dist/config.d.ts.map +1 -0
  146. package/dist/config.js +11 -0
  147. package/dist/config.js.map +1 -0
  148. package/dist/core/index.d.ts +9 -0
  149. package/dist/core/index.d.ts.map +1 -0
  150. package/dist/core/index.js +5 -0
  151. package/dist/core/index.js.map +1 -0
  152. package/dist/core/namespace/hook.d.ts +12 -0
  153. package/dist/core/namespace/hook.d.ts.map +1 -0
  154. package/dist/core/namespace/hook.js +15 -0
  155. package/dist/core/namespace/hook.js.map +1 -0
  156. package/dist/core/namespace/index.d.ts +18 -0
  157. package/dist/core/namespace/index.d.ts.map +1 -0
  158. package/dist/core/namespace/index.js +214 -0
  159. package/dist/core/namespace/index.js.map +1 -0
  160. package/dist/core/namespace/schemas/index.d.ts +25 -0
  161. package/dist/core/namespace/schemas/index.d.ts.map +1 -0
  162. package/dist/core/namespace/schemas/index.js +2 -0
  163. package/dist/core/namespace/schemas/index.js.map +1 -0
  164. package/dist/core/plugins/types.d.ts +81 -0
  165. package/dist/core/plugins/types.d.ts.map +1 -0
  166. package/dist/core/plugins/types.js +6 -0
  167. package/dist/core/plugins/types.js.map +1 -0
  168. package/dist/core/runtime/context.d.ts +25 -0
  169. package/dist/core/runtime/context.d.ts.map +1 -0
  170. package/dist/core/runtime/context.js +30 -0
  171. package/dist/core/runtime/context.js.map +1 -0
  172. package/dist/core/runtime/hooks.d.ts +12 -0
  173. package/dist/core/runtime/hooks.d.ts.map +1 -0
  174. package/dist/core/runtime/hooks.js +2 -0
  175. package/dist/core/runtime/hooks.js.map +1 -0
  176. package/dist/core/runtime/shared/context.d.ts +33 -0
  177. package/dist/core/runtime/shared/context.d.ts.map +1 -0
  178. package/dist/core/runtime/shared/context.js +51 -0
  179. package/dist/core/runtime/shared/context.js.map +1 -0
  180. package/dist/core/runtime/shared/options.d.ts +20 -0
  181. package/dist/core/runtime/shared/options.d.ts.map +1 -0
  182. package/dist/core/runtime/shared/options.js +61 -0
  183. package/dist/core/runtime/shared/options.js.map +1 -0
  184. package/dist/core/schemas/manifest.d.ts +24 -0
  185. package/dist/core/schemas/manifest.d.ts.map +1 -0
  186. package/dist/core/schemas/manifest.js +6 -0
  187. package/dist/core/schemas/manifest.js.map +1 -0
  188. package/dist/core/schemas/types.d.ts +7 -0
  189. package/dist/core/schemas/types.d.ts.map +1 -0
  190. package/dist/core/schemas/types.js +2 -0
  191. package/dist/core/schemas/types.js.map +1 -0
  192. package/dist/core/ui/interface.d.ts +12 -0
  193. package/dist/core/ui/interface.d.ts.map +1 -0
  194. package/dist/core/ui/interface.js +6 -0
  195. package/dist/core/ui/interface.js.map +1 -0
  196. package/dist/docs/cli.commands.docs.descriptor.d.ts +4 -0
  197. package/dist/docs/cli.commands.docs.descriptor.d.ts.map +1 -0
  198. package/dist/docs/cli.commands.docs.descriptor.js +207 -0
  199. package/dist/docs/cli.commands.docs.descriptor.js.map +1 -0
  200. package/dist/docs/cli.groups.docs.descriptor.d.ts +4 -0
  201. package/dist/docs/cli.groups.docs.descriptor.d.ts.map +1 -0
  202. package/dist/docs/cli.groups.docs.descriptor.js +330 -0
  203. package/dist/docs/cli.groups.docs.descriptor.js.map +1 -0
  204. package/dist/docs/cli.output.docs.descriptor.d.ts +4 -0
  205. package/dist/docs/cli.output.docs.descriptor.d.ts.map +1 -0
  206. package/dist/docs/cli.output.docs.descriptor.js +442 -0
  207. package/dist/docs/cli.output.docs.descriptor.js.map +1 -0
  208. package/dist/docs/types.d.ts +19 -0
  209. package/dist/docs/types.d.ts.map +1 -0
  210. package/dist/docs/types.js +2 -0
  211. package/dist/docs/types.js.map +1 -0
  212. package/dist/errors.d.ts +74 -0
  213. package/dist/errors.d.ts.map +1 -0
  214. package/dist/errors.js +113 -0
  215. package/dist/errors.js.map +1 -0
  216. package/dist/index.d.ts +22 -0
  217. package/dist/index.d.ts.map +1 -0
  218. package/dist/index.js +29 -0
  219. package/dist/index.js.map +1 -0
  220. package/dist/logging/cli-startup.logger.descriptor.d.ts +7 -0
  221. package/dist/logging/cli-startup.logger.descriptor.d.ts.map +1 -0
  222. package/dist/logging/cli-startup.logger.descriptor.js +13 -0
  223. package/dist/logging/cli-startup.logger.descriptor.js.map +1 -0
  224. package/dist/logging.d.ts +4 -0
  225. package/dist/logging.d.ts.map +1 -0
  226. package/dist/logging.js +21 -0
  227. package/dist/logging.js.map +1 -0
  228. package/dist/patterns/config-namespace.d.ts +23 -0
  229. package/dist/patterns/config-namespace.d.ts.map +1 -0
  230. package/dist/patterns/config-namespace.js +218 -0
  231. package/dist/patterns/config-namespace.js.map +1 -0
  232. package/dist/patterns/crud.d.ts +23 -0
  233. package/dist/patterns/crud.d.ts.map +1 -0
  234. package/dist/patterns/crud.js +164 -0
  235. package/dist/patterns/crud.js.map +1 -0
  236. package/dist/patterns/index.d.ts +13 -0
  237. package/dist/patterns/index.d.ts.map +1 -0
  238. package/dist/patterns/index.js +13 -0
  239. package/dist/patterns/index.js.map +1 -0
  240. package/dist/patterns/log-viewer.d.ts +19 -0
  241. package/dist/patterns/log-viewer.d.ts.map +1 -0
  242. package/dist/patterns/log-viewer.js +74 -0
  243. package/dist/patterns/log-viewer.js.map +1 -0
  244. package/dist/patterns/pattern-types.d.ts +21 -0
  245. package/dist/patterns/pattern-types.d.ts.map +1 -0
  246. package/dist/patterns/pattern-types.js +7 -0
  247. package/dist/patterns/pattern-types.js.map +1 -0
  248. package/dist/patterns/process-manager.d.ts +21 -0
  249. package/dist/patterns/process-manager.d.ts.map +1 -0
  250. package/dist/patterns/process-manager.js +134 -0
  251. package/dist/patterns/process-manager.js.map +1 -0
  252. package/dist/patterns/resolver.contracts.d.ts +14 -0
  253. package/dist/patterns/resolver.contracts.d.ts.map +1 -0
  254. package/dist/patterns/resolver.contracts.js +9 -0
  255. package/dist/patterns/resolver.contracts.js.map +1 -0
  256. package/dist/patterns/resolver.d.ts +40 -0
  257. package/dist/patterns/resolver.d.ts.map +1 -0
  258. package/dist/patterns/resolver.js +63 -0
  259. package/dist/patterns/resolver.js.map +1 -0
  260. package/dist/patterns/schemas.d.ts +496 -0
  261. package/dist/patterns/schemas.d.ts.map +1 -0
  262. package/dist/patterns/schemas.js +105 -0
  263. package/dist/patterns/schemas.js.map +1 -0
  264. package/dist/patterns/tool-wrapper.d.ts +18 -0
  265. package/dist/patterns/tool-wrapper.d.ts.map +1 -0
  266. package/dist/patterns/tool-wrapper.js +130 -0
  267. package/dist/patterns/tool-wrapper.js.map +1 -0
  268. package/dist/providers.d.ts +105 -0
  269. package/dist/providers.d.ts.map +1 -0
  270. package/dist/providers.js +164 -0
  271. package/dist/providers.js.map +1 -0
  272. package/dist/schemas/descriptors.d.ts +130 -0
  273. package/dist/schemas/descriptors.d.ts.map +1 -0
  274. package/dist/schemas/descriptors.js +96 -0
  275. package/dist/schemas/descriptors.js.map +1 -0
  276. package/dist/schemas/surface.d.ts +40 -0
  277. package/dist/schemas/surface.d.ts.map +1 -0
  278. package/dist/schemas/surface.js +2 -0
  279. package/dist/schemas/surface.js.map +1 -0
  280. package/dist/schemas/types.d.ts +202 -0
  281. package/dist/schemas/types.d.ts.map +1 -0
  282. package/dist/schemas/types.js +2 -0
  283. package/dist/schemas/types.js.map +1 -0
  284. package/dist/support/ui-toolkit.d.ts +62 -0
  285. package/dist/support/ui-toolkit.d.ts.map +1 -0
  286. package/dist/support/ui-toolkit.js +172 -0
  287. package/dist/support/ui-toolkit.js.map +1 -0
  288. package/dist/surface/CLISurface.d.ts +16 -0
  289. package/dist/surface/CLISurface.d.ts.map +1 -0
  290. package/dist/surface/CLISurface.js +173 -0
  291. package/dist/surface/CLISurface.js.map +1 -0
  292. package/dist/surface/attach-tui-action.d.ts +12 -0
  293. package/dist/surface/attach-tui-action.d.ts.map +1 -0
  294. package/dist/surface/attach-tui-action.js +48 -0
  295. package/dist/surface/attach-tui-action.js.map +1 -0
  296. package/dist/surface/build-context.d.ts +4 -0
  297. package/dist/surface/build-context.d.ts.map +1 -0
  298. package/dist/surface/build-context.js +49 -0
  299. package/dist/surface/build-context.js.map +1 -0
  300. package/dist/surface/command-group-policy.d.ts +7 -0
  301. package/dist/surface/command-group-policy.d.ts.map +1 -0
  302. package/dist/surface/command-group-policy.js +42 -0
  303. package/dist/surface/command-group-policy.js.map +1 -0
  304. package/dist/surface/discovery-cache.d.ts +17 -0
  305. package/dist/surface/discovery-cache.d.ts.map +1 -0
  306. package/dist/surface/discovery-cache.js +106 -0
  307. package/dist/surface/discovery-cache.js.map +1 -0
  308. package/dist/surface/register-commands.d.ts +15 -0
  309. package/dist/surface/register-commands.d.ts.map +1 -0
  310. package/dist/surface/register-commands.js +197 -0
  311. package/dist/surface/register-commands.js.map +1 -0
  312. package/dist/surface/register-groups.d.ts +15 -0
  313. package/dist/surface/register-groups.d.ts.map +1 -0
  314. package/dist/surface/register-groups.js +52 -0
  315. package/dist/surface/register-groups.js.map +1 -0
  316. package/dist/surface.d.ts +9 -0
  317. package/dist/surface.d.ts.map +1 -0
  318. package/dist/surface.js +8 -0
  319. package/dist/surface.js.map +1 -0
  320. package/dist/types.d.ts +4 -0
  321. package/dist/types.d.ts.map +1 -0
  322. package/dist/types.js +2 -0
  323. package/dist/types.js.map +1 -0
  324. package/dist/ui/schemas/types.d.ts +2 -0
  325. package/dist/ui/schemas/types.d.ts.map +1 -0
  326. package/dist/ui/schemas/types.js +2 -0
  327. package/dist/ui/schemas/types.js.map +1 -0
  328. package/dist/ui/toolkit/VibesUIToolkit.d.ts +2 -0
  329. package/dist/ui/toolkit/VibesUIToolkit.d.ts.map +1 -0
  330. package/dist/ui/toolkit/VibesUIToolkit.js +2 -0
  331. package/dist/ui/toolkit/VibesUIToolkit.js.map +1 -0
  332. package/dist/ui.context.descriptor.d.ts +21 -0
  333. package/dist/ui.context.descriptor.d.ts.map +1 -0
  334. package/dist/ui.context.descriptor.js +12 -0
  335. package/dist/ui.context.descriptor.js.map +1 -0
  336. package/dist/utils/open.d.ts +2 -0
  337. package/dist/utils/open.d.ts.map +1 -0
  338. package/dist/utils/open.js +30 -0
  339. package/dist/utils/open.js.map +1 -0
  340. package/dist/version.d.ts +2 -0
  341. package/dist/version.d.ts.map +1 -0
  342. package/dist/version.js +2 -0
  343. package/dist/version.js.map +1 -0
  344. package/package.json +186 -0
  345. package/src/api/client/factory.ts +265 -0
  346. package/src/api/schemas/common.ts +50 -0
  347. package/src/api/schemas/types.ts +32 -0
  348. package/src/api/services/api.ts +129 -0
  349. package/src/api/types.ts +12 -0
  350. package/src/bin.ts +84 -0
  351. package/src/bootstrap.ts +19 -0
  352. package/src/cli.plugin.d.ts +19 -0
  353. package/src/cli.plugin.ts +202 -0
  354. package/src/commands/completion/bash.ts +68 -0
  355. package/src/commands/completion/completion.descriptor.ts +48 -0
  356. package/src/commands/completion/completion.impl.ts +188 -0
  357. package/src/commands/completion/fig.ts +78 -0
  358. package/src/commands/completion/fish.ts +52 -0
  359. package/src/commands/completion/tree.ts +115 -0
  360. package/src/commands/completion/zsh-widget.ts +39 -0
  361. package/src/commands/completion/zsh.ts +165 -0
  362. package/src/commands/profile/_utils.ts +72 -0
  363. package/src/commands/profile/profile-group.descriptor.ts +14 -0
  364. package/src/commands/profile/profile.create.descriptor.ts +24 -0
  365. package/src/commands/profile/profile.create.impl.ts +44 -0
  366. package/src/commands/profile/profile.delete.descriptor.ts +31 -0
  367. package/src/commands/profile/profile.delete.impl.ts +71 -0
  368. package/src/commands/profile/profile.info.descriptor.ts +25 -0
  369. package/src/commands/profile/profile.info.impl.ts +51 -0
  370. package/src/commands/profile/profile.list.descriptor.ts +18 -0
  371. package/src/commands/profile/profile.list.impl.ts +46 -0
  372. package/src/commands/profile/profile.use.descriptor.ts +25 -0
  373. package/src/commands/profile/profile.use.impl.ts +39 -0
  374. package/src/commands/runtime/_logging.ts +47 -0
  375. package/src/commands/runtime/codegen.command.descriptor.ts +18 -0
  376. package/src/commands/runtime/codegen.command.impl.ts +44 -0
  377. package/src/commands/runtime/codegen.ts +84 -0
  378. package/src/commands/runtime/index.ts +14 -0
  379. package/src/commands/runtime/plugin.ts +7 -0
  380. package/src/commands/runtime/runtime-group.descriptor.ts +12 -0
  381. package/src/config.ts +22 -0
  382. package/src/core/index.ts +9 -0
  383. package/src/core/namespace/hook.ts +25 -0
  384. package/src/core/namespace/index.ts +298 -0
  385. package/src/core/namespace/schemas/index.ts +25 -0
  386. package/src/core/plugins/types.ts +87 -0
  387. package/src/core/runtime/context.ts +50 -0
  388. package/src/core/runtime/hooks.ts +12 -0
  389. package/src/core/runtime/shared/context.ts +65 -0
  390. package/src/core/runtime/shared/options.ts +60 -0
  391. package/src/core/schemas/manifest.ts +26 -0
  392. package/src/core/schemas/types.ts +6 -0
  393. package/src/core/ui/interface.ts +12 -0
  394. package/src/docs/cli.commands.docs.descriptor.ts +210 -0
  395. package/src/docs/cli.groups.docs.descriptor.ts +333 -0
  396. package/src/docs/cli.output.docs.descriptor.ts +445 -0
  397. package/src/docs/types.ts +18 -0
  398. package/src/errors.ts +123 -0
  399. package/src/index.ts +76 -0
  400. package/src/logging/cli-startup.logger.descriptor.ts +16 -0
  401. package/src/logging.ts +35 -0
  402. package/src/patterns/config-namespace.ts +251 -0
  403. package/src/patterns/crud.ts +217 -0
  404. package/src/patterns/index.ts +24 -0
  405. package/src/patterns/log-viewer.ts +118 -0
  406. package/src/patterns/pattern-types.ts +22 -0
  407. package/src/patterns/process-manager.ts +180 -0
  408. package/src/patterns/resolver.contracts.ts +15 -0
  409. package/src/patterns/resolver.ts +86 -0
  410. package/src/patterns/schemas.ts +146 -0
  411. package/src/patterns/tool-wrapper.ts +165 -0
  412. package/src/providers.ts +282 -0
  413. package/src/schemas/descriptors.d.ts +119 -0
  414. package/src/schemas/descriptors.ts +136 -0
  415. package/src/schemas/surface.ts +52 -0
  416. package/src/schemas/types.d.ts +195 -0
  417. package/src/schemas/types.ts +225 -0
  418. package/src/support/ui-toolkit.ts +224 -0
  419. package/src/surface/CLISurface.ts +193 -0
  420. package/src/surface/attach-tui-action.ts +76 -0
  421. package/src/surface/build-context.ts +49 -0
  422. package/src/surface/command-group-policy.ts +52 -0
  423. package/src/surface/discovery-cache.ts +143 -0
  424. package/src/surface/register-commands.ts +266 -0
  425. package/src/surface/register-groups.ts +84 -0
  426. package/src/surface.ts +9 -0
  427. package/src/types.ts +3 -0
  428. package/src/ui/schemas/types.ts +1 -0
  429. package/src/ui/toolkit/VibesUIToolkit.ts +1 -0
  430. package/src/ui.context.descriptor.ts +13 -0
  431. package/src/utils/open.ts +36 -0
  432. package/src/version.ts +10 -0
@@ -0,0 +1,110 @@
1
+ /**
2
+ * API service - provides API testing and debugging commands
3
+ */
4
+ import { apiTestSchema } from "../schemas/common.js";
5
+ import { createAPIClientConfig, testAPIConnection } from "../client/factory.js";
6
+ import { loadStoredCredentials, loadStoredEnvironment } from '@vibesdotdev/config/client';
7
+ /**
8
+ * Execute API test command
9
+ */
10
+ export async function executeAPITest(input, context) {
11
+ try {
12
+ const validatedInput = apiTestSchema.parse(input);
13
+ const environment = await loadStoredEnvironment();
14
+ if (!environment) {
15
+ throw new Error('No environment configured');
16
+ }
17
+ const credentials = await loadStoredCredentials(environment.name);
18
+ let authType = 'none';
19
+ if (credentials?.apiKey)
20
+ authType = 'apiKey';
21
+ else if (credentials?.sessionToken)
22
+ authType = 'session';
23
+ // Test connection
24
+ const testResult = await testAPIConnection(validatedInput.endpoint, context);
25
+ const status = {
26
+ connected: testResult.success,
27
+ environment: environment.name,
28
+ baseUrl: environment.apiUrl,
29
+ authType,
30
+ lastChecked: new Date().toISOString(),
31
+ latency: testResult.latency,
32
+ error: testResult.error
33
+ };
34
+ const result = {
35
+ success: testResult.success,
36
+ status
37
+ };
38
+ if (testResult.success) {
39
+ result.response = {
40
+ status: testResult.status,
41
+ statusText: 'OK',
42
+ headers: {},
43
+ data: { message: 'Connection successful' }
44
+ };
45
+ }
46
+ else {
47
+ result.error = testResult.error;
48
+ }
49
+ return result;
50
+ }
51
+ catch (error) {
52
+ context.logger?.error('Failed to test API', error);
53
+ throw error;
54
+ }
55
+ }
56
+ /**
57
+ * Execute API debug command
58
+ */
59
+ export async function executeAPIDebug(context) {
60
+ try {
61
+ // Get API client config
62
+ const config = await createAPIClientConfig(context);
63
+ // Get current environment
64
+ const environment = await loadStoredEnvironment();
65
+ const credentials = await loadStoredCredentials(environment?.name);
66
+ // Run diagnostics
67
+ const diagnostics = {
68
+ environmentResolved: !!environment,
69
+ authResolved: !!(credentials?.apiKey || credentials?.sessionToken),
70
+ baseUrlValid: !!environment?.apiUrl && environment.apiUrl.startsWith('http'),
71
+ credentialsValid: !!(credentials?.apiKey ||
72
+ (credentials?.sessionToken && !isTokenExpired(credentials.expiresAt)))
73
+ };
74
+ // Get connection status
75
+ const testResult = await testAPIConnection('/api/health', context);
76
+ const status = {
77
+ connected: testResult.success,
78
+ environment: environment?.name || 'none',
79
+ baseUrl: environment?.apiUrl || 'none',
80
+ authType: config.auth.type,
81
+ lastChecked: new Date().toISOString(),
82
+ latency: testResult.latency,
83
+ error: testResult.error
84
+ };
85
+ return {
86
+ config,
87
+ status,
88
+ diagnostics
89
+ };
90
+ }
91
+ catch (error) {
92
+ context.logger?.error('Failed to debug API', error);
93
+ throw error;
94
+ }
95
+ }
96
+ /**
97
+ * Helper to check if token is expired
98
+ */
99
+ function isTokenExpired(expiresAt) {
100
+ if (!expiresAt)
101
+ return false;
102
+ try {
103
+ const expiry = new Date(expiresAt);
104
+ return expiry.getTime() < Date.now();
105
+ }
106
+ catch {
107
+ return false;
108
+ }
109
+ }
110
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/services/api.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EA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AAM,MAAM,GAAwB;YACnC,SAAS,EAAE,UAAU,CAAC,OAAO;YAC7B,WAAW,EAAE,WAAW,EAAE,IAAI,IAAI,MAAM;YACxC,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,MAAM;YACtC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI;YAC1B,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACrC,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,KAAK,EAAE,UAAU,CAAC,KAAK;SACvB,CAAC;QAEF,OAAO;YACN,MAAM;YACN,MAAM;YACN,WAAW;SACX,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;QACpD,MAAM,KAAK,CAAC;IACb,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,SAAkB;IACzC,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IAC7B,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;QACnC,OAAO,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * API module type exports
3
+ */
4
+ export type { RuntimeContext, UIToolkit } from '../types.ts';
5
+ export type { APIClientConfig, APITestInput, APITestResult, APIDebugResult, APIConnectionStatus } from './schemas/types.ts';
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,YAAY,EACX,eAAe,EACf,YAAY,EACZ,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * API module type exports
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
package/dist/bin.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * CLI Binary Path Resolution
3
+ *
4
+ * Provides utilities for resolving the path to the vibes CLI binary.
5
+ * Used by PM and workers to spawn the CLI correctly.
6
+ */
7
+ /**
8
+ * Resolve the vibes CLI entry point path.
9
+ * Searches in order: apps/cli-bin, single-app layout, flat layout.
10
+ *
11
+ * @throws Error if no CLI entry point is found
12
+ */
13
+ export declare function resolveCliEntry(): string;
14
+ /**
15
+ * Resolve the bun command to invoke the CLI.
16
+ * Returns the appropriate args to run the CLI.
17
+ *
18
+ * @param target - Worker target (consumer or cloud)
19
+ * @param options.hot - Enable hot reload (default: false)
20
+ * @returns Object with command and args array
21
+ */
22
+ export declare function resolveCliInvocation(target: 'consumer' | 'cloud', options?: {
23
+ hot?: boolean;
24
+ }): {
25
+ command: string;
26
+ args: string[];
27
+ };
28
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyBH;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAwBxC;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,UAAU,GAAG,OAAO,EAC5B,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7B;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAUrC"}
package/dist/bin.js ADDED
@@ -0,0 +1,73 @@
1
+ /**
2
+ * CLI Binary Path Resolution
3
+ *
4
+ * Provides utilities for resolving the path to the vibes CLI binary.
5
+ * Used by PM and workers to spawn the CLI correctly.
6
+ */
7
+ import { dirname, resolve } from 'node:path';
8
+ import { existsSync } from 'node:fs';
9
+ import { fileURLToPath } from 'node:url';
10
+ const MODULE_DIR = dirname(fileURLToPath(import.meta.url));
11
+ const MONOREPO_ENTRY_SEGMENTS = ['apps', 'cli-bin', 'src', 'bin', 'vibes.ts'];
12
+ function findMonorepoCliEntry(startDir, searched) {
13
+ let current = resolve(startDir);
14
+ while (true) {
15
+ const candidate = resolve(current, ...MONOREPO_ENTRY_SEGMENTS);
16
+ searched.add(candidate);
17
+ if (existsSync(candidate))
18
+ return candidate;
19
+ const parent = dirname(current);
20
+ if (parent === current)
21
+ break;
22
+ current = parent;
23
+ }
24
+ return undefined;
25
+ }
26
+ /**
27
+ * Resolve the vibes CLI entry point path.
28
+ * Searches in order: apps/cli-bin, single-app layout, flat layout.
29
+ *
30
+ * @throws Error if no CLI entry point is found
31
+ */
32
+ export function resolveCliEntry() {
33
+ const searched = new Set();
34
+ const monorepoStarts = [process.cwd(), MODULE_DIR];
35
+ for (const start of monorepoStarts) {
36
+ const monorepoEntry = findMonorepoCliEntry(start, searched);
37
+ if (monorepoEntry)
38
+ return monorepoEntry;
39
+ }
40
+ const fallbackEntries = [
41
+ resolve(process.cwd(), 'src', 'bin', 'vibes.ts'),
42
+ resolve(process.cwd(), 'bin', 'vibes.ts'),
43
+ resolve(MODULE_DIR, 'src', 'bin', 'vibes.ts'),
44
+ resolve(MODULE_DIR, 'bin', 'vibes.ts'),
45
+ resolve(MODULE_DIR, '..', 'src', 'bin', 'vibes.ts'),
46
+ resolve(MODULE_DIR, '..', 'bin', 'vibes.ts')
47
+ ];
48
+ for (const candidate of fallbackEntries) {
49
+ searched.add(candidate);
50
+ if (existsSync(candidate))
51
+ return candidate;
52
+ }
53
+ throw new Error(`Failed to resolve CLI entry point. Searched:\n${[...searched].join('\n')}`);
54
+ }
55
+ /**
56
+ * Resolve the bun command to invoke the CLI.
57
+ * Returns the appropriate args to run the CLI.
58
+ *
59
+ * @param target - Worker target (consumer or cloud)
60
+ * @param options.hot - Enable hot reload (default: false)
61
+ * @returns Object with command and args array
62
+ */
63
+ export function resolveCliInvocation(target, options = {}) {
64
+ const cliEntry = resolveCliEntry();
65
+ const hot = options.hot ?? false;
66
+ return {
67
+ command: 'bun',
68
+ args: hot
69
+ ? ['run', '--hot', '--bun', cliEntry, 'workers', 'serve', target]
70
+ : ['run', '--bun', cliEntry, 'workers', 'serve', target]
71
+ };
72
+ }
73
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3D,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAU,CAAC;AAEvF,SAAS,oBAAoB,CAAC,QAAgB,EAAE,QAAqB;IACpE,IAAI,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEhC,OAAO,IAAI,EAAE,CAAC;QACb,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,EAAE,GAAG,uBAAuB,CAAC,CAAC;QAC/D,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACxB,IAAI,UAAU,CAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAC;QAE5C,MAAM,MAAM,GA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AC;AAC9F,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CACnC,MAA4B,EAC5B,UAA6B,EAAE;IAE/B,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;IACnC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC;IAEjC,OAAO;QACN,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,GAAG;YACR,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC;YACjE,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC;KACzD,CAAC;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * CLI Bootstrap (compatibility re-export)
3
+ *
4
+ * @deprecated Prefer importing from '@vibesdotdev/runtime-surface-cli' for new code.
5
+ *
6
+ * This file is now a thin re-export shim for backward compatibility during the
7
+ * surface package migration. All real bootstrap logic (runtime initialization,
8
+ * umbrella plugin loading, etc.) lives in the dedicated surface package.
9
+ *
10
+ * Canonical usage:
11
+ * import { createVibesCliApp } from '@vibesdotdev/runtime-surface-cli';
12
+ */
13
+ export { createVibesCliApp, type VibesCliAppOptions, type VibesCliApp, type CliPluginLoader, } from '@vibesdotdev/runtime-surface-cli';
14
+ //# sourceMappingURL=bootstrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * CLI Bootstrap (compatibility re-export)
3
+ *
4
+ * @deprecated Prefer importing from '@vibesdotdev/runtime-surface-cli' for new code.
5
+ *
6
+ * This file is now a thin re-export shim for backward compatibility during the
7
+ * surface package migration. All real bootstrap logic (runtime initialization,
8
+ * umbrella plugin loading, etc.) lives in the dedicated surface package.
9
+ *
10
+ * Canonical usage:
11
+ * import { createVibesCliApp } from '@vibesdotdev/runtime-surface-cli';
12
+ */
13
+ export { createVibesCliApp, } from '@vibesdotdev/runtime-surface-cli';
14
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,iBAAiB,GAIlB,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * CLI Plugin
3
+ *
4
+ * Registers CLI kinds with the universal runtime:
5
+ * - cli/group: Command groups for organizing commands
6
+ * - cli/command: Executable CLI commands
7
+ *
8
+ * This plugin does NOT create a separate runtime - it extends the universal
9
+ * runtime with CLI-specific asset kinds that CLISurface uses to build
10
+ * the Commander.js command tree.
11
+ */
12
+ /**
13
+ * CLI Plugin
14
+ *
15
+ * Registers cli/group and cli/command kinds with the universal runtime.
16
+ * CLISurface queries these kinds to build the Commander.js command tree.
17
+ */
18
+ declare const _default: import("@vibesdotdev/runtime").RuntimePlugin;
19
+ export default _default;
20
+ //# sourceMappingURL=cli.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.plugin.d.ts","sourceRoot":"","sources":["../src/cli.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAyJH;;;;;GAKG;;AACH,wBAgCG"}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * CLI Plugin
3
+ *
4
+ * Registers CLI kinds with the universal runtime:
5
+ * - cli/group: Command groups for organizing commands
6
+ * - cli/command: Executable CLI commands
7
+ *
8
+ * This plugin does NOT create a separate runtime - it extends the universal
9
+ * runtime with CLI-specific asset kinds that CLISurface uses to build
10
+ * the Commander.js command tree.
11
+ */
12
+ import { createRuntimePlugin, loader } from '@vibesdotdev/runtime';
13
+ import { CLIGroupDescriptorSchema, CLICommandDescriptorSchema } from './schemas/descriptors.js';
14
+ // CLI command descriptors
15
+ import completionDescriptor from './commands/completion/completion.descriptor.js';
16
+ import { runtimeCodegenCommandDescriptor } from './commands/runtime/codegen.command.descriptor.js';
17
+ import { runtimeCodegenCommandImpl } from './commands/runtime/codegen.command.impl.js';
18
+ import uiContextDescriptor from './ui.context.descriptor.js';
19
+ import cliStartupLogger from './logging/cli-startup.logger.descriptor.js';
20
+ import runtimeGroup from './commands/runtime/runtime-group.descriptor.js';
21
+ // Profile descriptors
22
+ import profileGroupDescriptor from './commands/profile/profile-group.descriptor.js';
23
+ import profileListDescriptor from './commands/profile/profile.list.descriptor.js';
24
+ import profileCreateDescriptor from './commands/profile/profile.create.descriptor.js';
25
+ import profileUseDescriptor from './commands/profile/profile.use.descriptor.js';
26
+ import profileDeleteDescriptor from './commands/profile/profile.delete.descriptor.js';
27
+ import profileInfoDescriptor from './commands/profile/profile.info.descriptor.js';
28
+ // Docs
29
+ import cliCommandsDescriptor from "./docs/cli.commands.docs.descriptor.js";
30
+ import cliGroupsDescriptor from "./docs/cli.groups.docs.descriptor.js";
31
+ import cliOutputDescriptor from "./docs/cli.output.docs.descriptor.js";
32
+ /**
33
+ * CLI Group kind - metadata only, no implementation needed
34
+ */
35
+ function isCLIGroupAssetDescriptor(descriptor) {
36
+ return descriptor.kind === 'cli/group' && typeof descriptor.id === 'string';
37
+ }
38
+ class DefaultCLIGroupImplementation {
39
+ descriptor;
40
+ constructor(descriptor) {
41
+ this.descriptor = descriptor;
42
+ }
43
+ }
44
+ const cliGroupKind = {
45
+ id: 'cli/group',
46
+ descriptorSchema: CLIGroupDescriptorSchema,
47
+ defaultImplementation: class {
48
+ descriptor;
49
+ constructor(descriptor) {
50
+ if (!isCLIGroupAssetDescriptor(descriptor)) {
51
+ throw new Error(`Invalid cli/group descriptor '${descriptor.id ?? 'unknown'}'`);
52
+ }
53
+ this.descriptor = descriptor;
54
+ }
55
+ },
56
+ // Resolution: prefer explicit scope matches
57
+ resolve: (candidates, scope) => {
58
+ const descriptors = candidates.filter(isCLIGroupAssetDescriptor);
59
+ if (descriptors.length === 0)
60
+ return undefined;
61
+ if (descriptors.length === 1)
62
+ return descriptors[0];
63
+ // Filter by surface
64
+ let matches = descriptors.filter((d) => {
65
+ if (!d.surfaces || d.surfaces.length === 0)
66
+ return true;
67
+ return d.surfaces.includes(scope.surface);
68
+ });
69
+ if (matches.length === 0)
70
+ return undefined;
71
+ // Filter by hardware
72
+ matches = matches.filter((d) => {
73
+ if (!d.hardware || d.hardware.length === 0)
74
+ return true;
75
+ return d.hardware.includes(scope.hardware);
76
+ });
77
+ // Sort by order, return first
78
+ matches.sort((a, b) => (a.order ?? 999) - (b.order ?? 999));
79
+ return matches[0];
80
+ },
81
+ contexts: []
82
+ };
83
+ /**
84
+ * CLI Command kind - requires implementation with execute()
85
+ */
86
+ function isCLICommandAssetDescriptor(descriptor) {
87
+ return (descriptor.kind === 'cli/command' && typeof descriptor.id === 'string' && 'group' in descriptor);
88
+ }
89
+ class DefaultCLICommandImplementation {
90
+ descriptor;
91
+ constructor(descriptor) {
92
+ if (!isCLICommandAssetDescriptor(descriptor)) {
93
+ throw new Error(`Invalid cli/command descriptor '${descriptor.id ?? 'unknown'}'`);
94
+ }
95
+ this.descriptor = descriptor;
96
+ }
97
+ async execute(_args, _opts) {
98
+ throw new Error(`No implementation for command: ${this.descriptor.id}`);
99
+ }
100
+ }
101
+ const cliCommandKind = {
102
+ id: 'cli/command',
103
+ descriptorSchema: CLICommandDescriptorSchema,
104
+ defaultImplementation: DefaultCLICommandImplementation,
105
+ // Resolution: prefer explicit scope matches
106
+ resolve: (candidates, scope) => {
107
+ const descriptors = candidates.filter(isCLICommandAssetDescriptor);
108
+ if (descriptors.length === 0)
109
+ return undefined;
110
+ if (descriptors.length === 1)
111
+ return descriptors[0];
112
+ // Filter by surface
113
+ let matches = descriptors.filter((d) => {
114
+ if (!d.surfaces || d.surfaces.length === 0)
115
+ return true;
116
+ return d.surfaces.includes(scope.surface);
117
+ });
118
+ if (matches.length === 0)
119
+ return undefined;
120
+ // Filter by hardware
121
+ matches = matches.filter((d) => {
122
+ if (!d.hardware || d.hardware.length === 0)
123
+ return true;
124
+ return d.hardware.includes(scope.hardware);
125
+ });
126
+ // Sort by order, return first
127
+ matches.sort((a, b) => (a.order ?? 999) - (b.order ?? 999));
128
+ return matches[0];
129
+ },
130
+ // Commands receive runtime context
131
+ contexts: ['runtime']
132
+ };
133
+ /**
134
+ * CLI Plugin
135
+ *
136
+ * Registers cli/group and cli/command kinds with the universal runtime.
137
+ * CLISurface queries these kinds to build the Commander.js command tree.
138
+ */
139
+ export default createRuntimePlugin({
140
+ id: 'cli',
141
+ name: 'CLI Surface',
142
+ description: 'CLI command system using Commander.js',
143
+ dependencies: ['context'],
144
+ kinds: [cliGroupKind, cliCommandKind],
145
+ descriptors: [
146
+ completionDescriptor,
147
+ runtimeCodegenCommandDescriptor,
148
+ uiContextDescriptor,
149
+ cliStartupLogger,
150
+ runtimeGroup,
151
+ profileGroupDescriptor,
152
+ profileListDescriptor,
153
+ profileCreateDescriptor,
154
+ profileUseDescriptor,
155
+ profileDeleteDescriptor,
156
+ profileInfoDescriptor,
157
+ cliCommandsDescriptor,
158
+ cliGroupsDescriptor,
159
+ cliOutputDescriptor
160
+ ],
161
+ loaders: [
162
+ loader('completion', () => import('./commands/completion/completion.impl.js')),
163
+ loader('profile.list', () => import('./commands/profile/profile.list.impl.js')),
164
+ loader('profile.create', () => import('./commands/profile/profile.create.impl.js')),
165
+ loader('profile.use', () => import('./commands/profile/profile.use.impl.js')),
166
+ loader('profile.delete', () => import('./commands/profile/profile.delete.impl.js')),
167
+ loader('profile.info', () => import('./commands/profile/profile.info.impl.js'))
168
+ ]
169
+ });
170
+ //# sourceMappingURL=cli.plugin.js.map
@@ -0,0 +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AAE,CAAC,YAAY,EAAE,cAAc,CAAC;IAErC,WAAW,EAAE;QACZ,oBAAoB;QACpB,+BAA+B;QAC/B,mBAAmB;QACnB,gBAAgB;QAChB,YAAY;QACZ,sBAAsB;QACtB,qBAAqB;QACrB,uBAAuB;QACvB,oBAAoB;QACpB,uBAAuB;QACvB,qBAAqB;QACrB,qBAAqB;QACrB,mBAAmB;QACnB,mBAAmB;KACnB;IAED,OAAO,EAAE;QACR,MAAM,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,0CAA0C,CAAC,CAAC;QAC9E,MAAM,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC;QAC/E,MAAM,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,2CAA2C,CAAC,CAAC;QACnF,MAAM,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,wCAAwC,CAAC,CAAC;QAC7E,MAAM,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,2CAA2C,CAAC,CAAC;QACnF,MAAM,CAAC,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC;KAC/E;CACD,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Bash Completion Generator
3
+ *
4
+ * Generates a bash completion function from the command tree.
5
+ */
6
+ import type { CommandNode } from './tree';
7
+ export declare function generateBashCompletion(tree: CommandNode): string;
8
+ //# sourceMappingURL=bash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../../src/commands/completion/bash.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAwB1C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAqChE"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Bash Completion Generator
3
+ *
4
+ * Generates a bash completion function from the command tree.
5
+ */
6
+ function generateCaseBlock(path, node, indent) {
7
+ const lines = [];
8
+ if (node.children.length === 0)
9
+ return lines;
10
+ const childNames = node.children.flatMap((c) => [c.name, ...c.aliases]).join(' ');
11
+ lines.push(`${indent}${path})`);
12
+ lines.push(`${indent} COMPREPLY=( $(compgen -W "${childNames}" -- "\${cur}") )`);
13
+ lines.push(`${indent} return 0`);
14
+ lines.push(`${indent} ;;`);
15
+ for (const child of node.children) {
16
+ if (child.children.length > 0) {
17
+ lines.push(...generateCaseBlock(`${path} ${child.name}`, child, indent));
18
+ for (const alias of child.aliases) {
19
+ lines.push(...generateCaseBlock(`${path} ${alias}`, child, indent));
20
+ }
21
+ }
22
+ }
23
+ return lines;
24
+ }
25
+ export function generateBashCompletion(tree) {
26
+ const cases = generateCaseBlock('vibes', tree, ' ');
27
+ return `# vibes bash completion — generated by vibes completion bash
28
+ # Add to ~/.bashrc: eval "$(vibes completion bash)"
29
+
30
+ _vibes_completions() {
31
+ local cur prev words cword
32
+ _init_completion || return
33
+
34
+ local cmd="\${words[*]:0:cword}"
35
+
36
+ case "\${cmd}" in
37
+ ${cases.join('\n')}
38
+ esac
39
+
40
+ # Option completion
41
+ if [[ "\${cur}" == -* ]]; then
42
+ local opts=""
43
+ case "\${cmd}" in
44
+ ${tree.children
45
+ .flatMap((g) => g.children.map((c) => {
46
+ const opts = c.options.map((o) => (o.short ? `-${o.short} --${o.long}` : `--${o.long}`)).join(' ');
47
+ return opts ? ` vibes ${g.name} ${c.name}) opts="${opts}" ;;` : '';
48
+ }))
49
+ .filter(Boolean)
50
+ .join('\n')}
51
+ esac
52
+ COMPREPLY=( $(compgen -W "\${opts}" -- "\${cur}") )
53
+ return 0
54
+ fi
55
+ }
56
+
57
+ complete -F _vibes_completions vibes
58
+ `;
59
+ }
60
+ //# sourceMappingURL=bash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bash.js","sourceRoot":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sBAAsB,CAAC,IAAiB;IACvD,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAE3D,OAAO;;;;;;;;;;EAUN,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;EAOhB,IAAI,CAAC,QAAQ;SACb,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CACd,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACpB,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnG,OAAO,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,WAAW,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/E,CAAC,CAAC,CACF;SACA,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,IAAI,CAAC;;;;;;;;CAQX,CAAC;AACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Shell Completion Generator Command Descriptor
3
+ *
4
+ * Generates shell completions and autosuggestions from runtime descriptors.
5
+ * Supports bash, zsh (with inline autosuggestion widget), fish, and fig specs.
6
+ */
7
+ import type { CLICommandAssetDescriptor } from '../../schemas/descriptors';
8
+ declare const descriptor: CLICommandAssetDescriptor;
9
+ export default descriptor;
10
+ //# sourceMappingURL=completion.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion.descriptor.d.ts","sourceRoot":"","sources":["../../../src/commands/completion/completion.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,QAAA,MAAM,UAAU,EAAE,yBAoCjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Shell Completion Generator Command Descriptor
3
+ *
4
+ * Generates shell completions and autosuggestions from runtime descriptors.
5
+ * Supports bash, zsh (with inline autosuggestion widget), fish, and fig specs.
6
+ */
7
+ const descriptor = {
8
+ kind: 'cli/command',
9
+ id: 'completion',
10
+ name: 'completion',
11
+ description: 'Generate shell completions and autosuggestions',
12
+ group: 'shell-integration',
13
+ arguments: [
14
+ {
15
+ name: 'shell',
16
+ description: 'Target shell: bash, zsh, fish, or fig',
17
+ required: true
18
+ }
19
+ ],
20
+ options: [
21
+ {
22
+ flags: '--json',
23
+ description: 'Output command tree as JSON (for tooling)'
24
+ },
25
+ {
26
+ flags: '--install',
27
+ description: 'Install to standard shell completion directory'
28
+ }
29
+ ],
30
+ examples: [
31
+ { command: 'vibes completion zsh', description: 'Output zsh completions with autosuggestions' },
32
+ { command: 'eval "$(vibes completion zsh)"', description: 'Enable in current shell' },
33
+ { command: 'vibes completion fig', description: 'Generate Fig/Amazon Q completion spec' },
34
+ { command: 'vibes completion --json', description: 'Output raw command tree as JSON' }
35
+ ],
36
+ surfaces: ['cli'],
37
+ hardware: ['consumer'],
38
+ enabled: true
39
+ };
40
+ export default descriptor;
41
+ //# sourceMappingURL=completion.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion.descriptor.js","sourceRoot":"","sources":["../../../src/commands/completion/completion.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,UAAU,GAA8B;IAC7C,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,gDAAgD;IAC7D,KAAK,EAAE,mBAAmB;IAE1B,SAAS,EAAE;QACV;YACC,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACd;KACD;IAED,OAAO,EAAE;QACR;YACC,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,2CAA2C;SACxD;QACD;YACC,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,gDAAgD;SAC7D;KACD;IAED,QAAQ,EAAE;QACT,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,6CAA6C,EAAE;QAC/F,EAAE,OAAO,EAAE,gCAAgC,EAAE,WAAW,EAAE,yBAAyB,EAAE;QACrF,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,uCAAuC,EAAE;QACzF,EAAE,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,iCAAiC,EAAE;KACtF;IAED,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shell Completion Generator Implementation
3
+ *
4
+ * Builds the CLI command tree from runtime descriptors and generates
5
+ * shell-specific completion scripts. The zsh output includes an inline
6
+ * autosuggestion widget with history-based ranking.
7
+ */
8
+ declare const _default: {
9
+ execute(args: Record<string, unknown>, opts: Record<string, unknown>): Promise<void>;
10
+ };
11
+ export default _default;
12
+ //# sourceMappingURL=completion.impl.d.ts.map