@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,445 @@
1
+ import type { DocsTopicDescriptor } from './types.ts';
2
+
3
+ const cli_outputMarkdown = `---
4
+ title: CLI Output
5
+ summary: Output formatting, UI toolkit integration, tables, and colors
6
+ tags: [cli, output, formatting, ui, tables, colors]
7
+ parent: cli
8
+ order: 3
9
+ ---
10
+
11
+ # CLI Output
12
+
13
+ The vibes CLI provides consistent output formatting through the \`VibesUIToolkit\`. Commands use the toolkit to render tables, JSON, YAML, and formatted text with proper colorization and structure.
14
+
15
+ ## Overview
16
+
17
+ Output formatting is handled by \`VibesUIToolkit\`, a unified interface for CLI output that supports multiple formats and interactive prompts.
18
+
19
+ \`\`\`ts
20
+ import { VibesUIToolkit } from '@vibesdotdev/cli/support/ui-toolkit';
21
+
22
+ const ui = VibesUIToolkit.createSync({ mode: 'plain' });
23
+ ui.info('Starting process...');
24
+ ui.table(data);
25
+ ui.success('Done!');
26
+ \`\`\`
27
+
28
+ ## VibesUIToolkit API
29
+
30
+ ### Creation
31
+
32
+ \`\`\`ts
33
+ // Synchronous creation (most common)
34
+ const ui = VibesUIToolkit.createSync({
35
+ mode: 'plain', // or 'rich' for TUI apps
36
+ compact: false, // reduce whitespace
37
+ autoExit: true // exit after command completes
38
+ });
39
+ \`\`\`
40
+
41
+ ### Output methods
42
+
43
+ | Method | Description | Output |
44
+ |--------|-------------|--------|
45
+ | \`ui.info(message)\` | Informational message | stdout |
46
+ | \`ui.success(message)\` | Success message | stdout |
47
+ | \`ui.warn(message)\` | Warning message | stderr |
48
+ | \`ui.error(message)\` | Error message | stderr |
49
+ | \`ui.log(message)\` | Raw log output | stdout |
50
+
51
+ ### Format-aware rendering
52
+
53
+ The toolkit supports multiple output formats:
54
+
55
+ \`\`\`ts
56
+ ui.setFormat('json'); // or 'yaml', 'table', 'markdown'
57
+ ui.render(data); // outputs in selected format
58
+ \`\`\`
59
+
60
+ **Format examples:**
61
+
62
+ \`\`\`ts
63
+ const data = [
64
+ { id: 'tools.list', description: 'List tools' },
65
+ { id: 'tools.info', description: 'Show tool info' }
66
+ ];
67
+
68
+ // JSON output
69
+ ui.setFormat('json');
70
+ ui.render(data);
71
+ // [{ "id": "tools.list", "description": "List tools" }, ...]
72
+
73
+ // YAML output
74
+ ui.setFormat('yaml');
75
+ ui.render(data);
76
+ // - id: tools.list
77
+ // description: List tools
78
+
79
+ // Table output
80
+ ui.setFormat('table');
81
+ ui.render(data);
82
+ // ┌─────────────┬──────────────────┐
83
+ // │ id │ description │
84
+ // ├─────────────┼──────────────────┤
85
+ // │ tools.list │ List tools │
86
+ // │ tools.info │ Show tool info │
87
+ // └─────────────┴──────────────────┘
88
+ \`\`\`
89
+
90
+ ## Table rendering
91
+
92
+ Tables are the primary output format for list commands:
93
+
94
+ \`\`\`ts
95
+ // Basic table
96
+ ui.table(data);
97
+
98
+ // With column selection
99
+ ui.table(data, { columns: ['id', 'name'] });
100
+
101
+ // With title
102
+ ui.table(data, { title: 'Registered Tools' });
103
+
104
+ // Column names only (shorthand)
105
+ ui.table(data, ['id', 'name', 'status']);
106
+ \`\`\`
107
+
108
+ ### Table options
109
+
110
+ \`\`\`ts
111
+ interface TableOptions {
112
+ columns?: string[]; // subset of fields to display
113
+ title?: string; // table header
114
+ }
115
+
116
+ // Usage
117
+ ui.table(rows, {
118
+ columns: ['id', 'description', 'enabled'],
119
+ title: 'Available Commands'
120
+ });
121
+ \`\`\`
122
+
123
+ ### Example: Command list
124
+
125
+ \`\`\`ts
126
+ const commands = [
127
+ { id: 'profile.list', group: 'profile', description: 'List profiles' },
128
+ { id: 'profile.create', group: 'profile', description: 'Create profile' },
129
+ { id: 'completion', group: 'shell-integration', description: 'Generate completions' }
130
+ ];
131
+
132
+ ui.table(commands, {
133
+ columns: ['id', 'group', 'description'],
134
+ title: 'Registered Commands'
135
+ });
136
+ \`\`\`
137
+
138
+ **Output:**
139
+
140
+ \`\`\`
141
+ Registered Commands
142
+ ┌─────────────────┬───────────────────┬────────────────────┐
143
+ │ id │ group │ description │
144
+ ├─────────────────┼───────────────────┼────────────────────┤
145
+ │ profile.list │ profile │ List profiles │
146
+ │ profile.create │ profile │ Create profile │
147
+ │ completion │ shell-integration │ Generate completions│
148
+ └─────────────────┴───────────────────┴────────────────────┘
149
+ \`\`\`
150
+
151
+ ## JSON/YAML output
152
+
153
+ Many commands support \`--json\` or \`--yaml\` flags for machine-readable output:
154
+
155
+ \`\`\`ts
156
+ // Command implementation pattern
157
+ async function listProfiles(options: { json?: boolean; yaml?: boolean }) {
158
+ const profiles = await getProfiles();
159
+
160
+ if (options.json) {
161
+ ui.setFormat('json');
162
+ ui.render(profiles);
163
+ } else if (options.yaml) {
164
+ ui.setFormat('yaml');
165
+ ui.render(profiles);
166
+ } else {
167
+ ui.table(profiles, { columns: ['name', 'active', 'created'] });
168
+ }
169
+ }
170
+ \`\`\`
171
+
172
+ **Usage:**
173
+
174
+ \`\`\`bash
175
+ # Default table output
176
+ $ vibes profile list
177
+
178
+ # JSON for scripting
179
+ $ vibes profile list --json | jq '.[] | select(.active == true)'
180
+
181
+ # YAML for config generation
182
+ $ vibes profile list --yaml > profiles.yaml
183
+ \`\`\`
184
+
185
+ ## Interactive prompts
186
+
187
+ The toolkit provides interactive prompts for user input:
188
+
189
+ \`\`\`ts
190
+ // Text input
191
+ const name = await ui.prompt('Profile name:', { default: 'default' });
192
+
193
+ // Confirmation
194
+ const confirmed = await ui.confirm('Delete this profile?', { defaultValue: false });
195
+
196
+ // Single selection
197
+ const choice = await ui.select('Select profile:', [
198
+ { label: 'Development', value: 'dev' },
199
+ { label: 'Production', value: 'prod' }
200
+ ]);
201
+
202
+ // Multiple selection
203
+ const profiles = await ui.multiselect('Select profiles to delete:', [
204
+ { label: 'Old Dev', value: 'old-dev' },
205
+ { label: 'Test', value: 'test' }
206
+ ], { required: false });
207
+ \`\`\`
208
+
209
+ ### Non-interactive fallback
210
+
211
+ Prompts gracefully degrade in non-TTY environments:
212
+
213
+ \`\`\`ts
214
+ // Returns default in CI/pipes
215
+ const name = await ui.prompt('Name:', { default: 'default' });
216
+ // → 'default' if not interactive
217
+
218
+ // Returns empty array in CI
219
+ const choices = await ui.multiselect('Choose:', options);
220
+ // → [] if not interactive and not required
221
+ \`\`\`
222
+
223
+ ## Progress indicators
224
+
225
+ Simple progress tracking for long operations:
226
+
227
+ \`\`\`ts
228
+ const progress = ui.progress('Building...');
229
+ progress.update('Compiling modules...');
230
+ progress.complete('Build complete!');
231
+
232
+ // Or with failure
233
+ try {
234
+ await build();
235
+ progress.complete('Success!');
236
+ } catch (error) {
237
+ progress.fail('Build failed');
238
+ throw error;
239
+ }
240
+ \`\`\`
241
+
242
+ ## Color and formatting
243
+
244
+ The toolkit respects environment variables and options:
245
+
246
+ \`\`\`bash
247
+ # Environment variable
248
+ VIBES_NO_COLOR=1 vibes profile list
249
+
250
+ # Command flag
251
+ vibes profile list --no-color
252
+ \`\`\`
253
+
254
+ ### Color methods
255
+
256
+ \`\`\`ts
257
+ // Built-in colorization (when enabled)
258
+ ui.info('ℹ️ Information'); // blue
259
+ ui.success('✅ Success'); // green
260
+ ui.warn('⚠️ Warning'); // yellow
261
+ ui.error('❌ Error'); // red
262
+ \`\`\`
263
+
264
+ ## Integration with commands
265
+
266
+ Commands receive a UI toolkit through the context:
267
+
268
+ \`\`\`ts
269
+ // packages/cli/src/commands/profile/profile.list.impl.ts
270
+ import { VibesUIToolkit } from '../../support/ui-toolkit';
271
+
272
+ export async function execute(
273
+ args: Record<string, unknown>,
274
+ opts: { json?: boolean; yaml?: boolean },
275
+ context: CommandContext
276
+ ): Promise<void> {
277
+ const ui = VibesUIToolkit.createSync({ mode: 'plain' });
278
+
279
+ if (opts.json) ui.setFormat('json');
280
+ if (opts.yaml) ui.setFormat('yaml');
281
+
282
+ const profiles = await listProfiles();
283
+
284
+ if (opts.json || opts.yaml) {
285
+ ui.render(profiles);
286
+ } else {
287
+ ui.table(profiles, {
288
+ columns: ['name', 'active', 'created'],
289
+ title: 'Configuration Profiles'
290
+ });
291
+ }
292
+ }
293
+ \`\`\`
294
+
295
+ ## Log buffer integration
296
+
297
+ Commands can buffer output during execution:
298
+
299
+ \`\`\`ts
300
+ // Descriptor with log buffer config
301
+ const command: CLICommandAssetDescriptor = {
302
+ kind: 'cli/command',
303
+ id: 'dev.build',
304
+ name: 'build',
305
+ description: 'Build the project',
306
+ group: 'dev',
307
+ logBuffer: {
308
+ enabled: true,
309
+ sinks: ['file', 'memory'],
310
+ fallbackToStdout: true
311
+ }
312
+ };
313
+ \`\`\`
314
+
315
+ Buffered output is held until command completion, then flushed:
316
+
317
+ \`\`\`bash
318
+ # Output appears all at once when command finishes
319
+ $ vibes dev build
320
+ [build output buffered...]
321
+ ✅ Build complete!
322
+ \`\`\`
323
+
324
+ ## WRONG patterns
325
+
326
+ ### ❌ Direct console.log
327
+
328
+ \`\`\`ts
329
+ // BAD — bypasses formatting, breaks --json
330
+ console.log('Profile:', profile.name);
331
+
332
+ // GOOD — uses toolkit
333
+ ui.info(\`Profile: \${profile.name}\`);
334
+ \`\`\`
335
+
336
+ ### ❌ Mixed output streams
337
+
338
+ \`\`\`ts
339
+ // BAD — data on stdout, errors mixed in
340
+ console.log(data);
341
+ console.error('Warning: deprecated');
342
+
343
+ // GOOD — separate concerns
344
+ ui.render(data); // data to stdout
345
+ ui.warn('Warning'); // warnings to stderr
346
+ \`\`\`
347
+
348
+ ### ❌ Manual JSON formatting
349
+
350
+ \`\`\`ts
351
+ // BAD — inconsistent formatting
352
+ process.stdout.write(JSON.stringify(data));
353
+
354
+ // GOOD — toolkit handles formatting
355
+ ui.setFormat('json');
356
+ ui.render(data);
357
+ \`\`\`
358
+
359
+ ### ❌ Ignoring format flags
360
+
361
+ \`\`\`ts
362
+ // BAD — always outputs table
363
+ ui.table(profiles);
364
+
365
+ // GOOD — respects --json/--yaml
366
+ if (opts.json) {
367
+ ui.setFormat('json');
368
+ ui.render(profiles);
369
+ } else {
370
+ ui.table(profiles);
371
+ }
372
+ \`\`\`
373
+
374
+ ### ❌ Hardcoded colors
375
+
376
+ \`\`\`ts
377
+ // BAD — ignores VIBES_NO_COLOR
378
+ process.stdout.write('\\x1b[32mSuccess\\x1b[0m');
379
+
380
+ // GOOD — use toolkit methods
381
+ ui.success('Success');
382
+ \`\`\`
383
+
384
+ ## Environment variables
385
+
386
+ | Variable | Description | Default |
387
+ |----------|-------------|---------|
388
+ | \`VIBES_NO_COLOR\` | Disable ANSI colors | \`false\` |
389
+ | \`VIBES_OUTPUT_FORMAT\` | Default output format | \`table\` |
390
+ | \`VIBES_INTERACTIVE\` | Force interactive mode | auto-detect |
391
+ | \`CI\` | CI mode (non-interactive) | auto-detect |
392
+
393
+ ## Related
394
+
395
+ :::card{title="See also"}
396
+ - [\`cli.commands\`](cli.commands) — Command structure and execution
397
+ - [\`cli.groups\`](cli.groups) — Command group organization
398
+ - [\`tools.list\`](tools.list) — Example command using output formatting
399
+ :::
400
+ `;
401
+
402
+ const descriptor: DocsTopicDescriptor = {
403
+ kind: 'docs/topic',
404
+ id: 'cli.output',
405
+ title: 'CLI Output',
406
+ summary: 'Output formatting, UI toolkit integration, tables, and colors',
407
+ body: {
408
+ type: 'markdown',
409
+ sourceType: 'raw',
410
+ source: cli_outputMarkdown
411
+ },
412
+ parent: 'cli',
413
+ order: 3,
414
+ tags: ['cli', 'output', 'formatting', 'ui', 'tables', 'colors'],
415
+ surfaces: ['cli', 'web', 'in-app'],
416
+ hardware: ['consumer'],
417
+ enabled: true,
418
+ man: {
419
+ name: 'cli.output — CLI output formatting and UI toolkit',
420
+ section: 1,
421
+ synopsis: 'vibes man cli.output',
422
+ options: [
423
+ { flag: '--json', description: 'Output as JSON' },
424
+ { flag: '--yaml', description: 'Output as YAML' },
425
+ { flag: '--no-color', description: 'Disable ANSI colors' }
426
+ ],
427
+ examples: [
428
+ {
429
+ description: 'View output formatting documentation',
430
+ command: 'vibes man cli.output'
431
+ },
432
+ {
433
+ description: 'List commands with JSON output',
434
+ command: 'vibes tools list --json'
435
+ },
436
+ {
437
+ description: 'Profile list with YAML output',
438
+ command: 'vibes profile list --yaml'
439
+ }
440
+ ],
441
+ seeAlso: ['cli.commands', 'cli.groups', 'tools.list']
442
+ }
443
+ };
444
+
445
+ export default descriptor;
@@ -0,0 +1,18 @@
1
+ export type DocsTopicDescriptor = {
2
+ kind: 'docs/topic';
3
+ id: string;
4
+ title: string;
5
+ summary?: string;
6
+ body: {
7
+ type: 'markdown';
8
+ sourceType: 'raw';
9
+ source: string;
10
+ };
11
+ parent?: string;
12
+ order?: number;
13
+ enabled?: boolean;
14
+ man?: unknown;
15
+ tags?: string[];
16
+ surfaces?: string[];
17
+ hardware?: string[];
18
+ };
package/src/errors.ts ADDED
@@ -0,0 +1,123 @@
1
+ /**
2
+ * CLI Errors
3
+ *
4
+ * Error types for CLI commands.
5
+ */
6
+
7
+ /**
8
+ * Base CLI error
9
+ */
10
+ export class CLIError extends Error {
11
+ constructor(
12
+ message: string,
13
+ public code: string = 'CLI_ERROR',
14
+ public exitCode: number = 1
15
+ ) {
16
+ super(message);
17
+ this.name = 'CLIError';
18
+ }
19
+ }
20
+
21
+ /**
22
+ * Command not found error
23
+ */
24
+ export class CommandNotFoundError extends CLIError {
25
+ constructor(command: string) {
26
+ super(`Command not found: ${command}`, 'COMMAND_NOT_FOUND', 127);
27
+ this.name = 'CommandNotFoundError';
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Invalid argument error
33
+ */
34
+ export class InvalidArgumentError extends CLIError {
35
+ constructor(argument: string, reason?: string) {
36
+ const msg = reason
37
+ ? `Invalid argument '${argument}': ${reason}`
38
+ : `Invalid argument: ${argument}`;
39
+ super(msg, 'INVALID_ARGUMENT', 1);
40
+ this.name = 'InvalidArgumentError';
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Missing required argument error
46
+ */
47
+ export class MissingArgumentError extends CLIError {
48
+ constructor(argument: string) {
49
+ super(`Missing required argument: ${argument}`, 'MISSING_ARGUMENT', 1);
50
+ this.name = 'MissingArgumentError';
51
+ }
52
+ }
53
+
54
+ /**
55
+ * Authentication required error
56
+ */
57
+ export class AuthRequiredError extends CLIError {
58
+ constructor(message = 'Authentication required. Run: vibes auth login') {
59
+ super(message, 'AUTH_REQUIRED', 1);
60
+ this.name = 'AuthRequiredError';
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Permission denied error
66
+ */
67
+ export class PermissionDeniedError extends CLIError {
68
+ constructor(resource?: string) {
69
+ const msg = resource ? `Permission denied: ${resource}` : 'Permission denied';
70
+ super(msg, 'PERMISSION_DENIED', 1);
71
+ this.name = 'PermissionDeniedError';
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Resource not found error
77
+ */
78
+ export class NotFoundError extends CLIError {
79
+ constructor(resource: string) {
80
+ super(`Not found: ${resource}`, 'NOT_FOUND', 1);
81
+ this.name = 'NotFoundError';
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Configuration error
87
+ */
88
+ export class ConfigError extends CLIError {
89
+ constructor(message: string) {
90
+ super(message, 'CONFIG_ERROR', 1);
91
+ this.name = 'ConfigError';
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Network error
97
+ */
98
+ export class NetworkError extends CLIError {
99
+ constructor(message: string) {
100
+ super(message, 'NETWORK_ERROR', 1);
101
+ this.name = 'NetworkError';
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Timeout error
107
+ */
108
+ export class TimeoutError extends CLIError {
109
+ constructor(operation: string, timeout: number) {
110
+ super(`Operation '${operation}' timed out after ${timeout}ms`, 'TIMEOUT', 1);
111
+ this.name = 'TimeoutError';
112
+ }
113
+ }
114
+
115
+ /**
116
+ * User cancelled error
117
+ */
118
+ export class UserCancelledError extends CLIError {
119
+ constructor() {
120
+ super('Operation cancelled by user', 'USER_CANCELLED', 0);
121
+ this.name = 'UserCancelledError';
122
+ }
123
+ }
package/src/index.ts ADDED
@@ -0,0 +1,76 @@
1
+ /**
2
+ * CLI Module
3
+ *
4
+ * The CLI surface for the universal runtime.
5
+ * Integrates Commander.js with runtime-discovered commands.
6
+ *
7
+ * Usage:
8
+ * ```typescript
9
+ * import { createVibesCliApp } from '@vibesdotdev/cli/bootstrap';
10
+ *
11
+ * const app = await createVibesCliApp();
12
+ * await app.cli.run(process.argv);
13
+ * ```
14
+ */
15
+
16
+ // Bootstrap
17
+ export {
18
+ createVibesCliApp,
19
+ type VibesCliAppOptions,
20
+ type VibesCliApp,
21
+ type CliPluginLoader
22
+ } from './bootstrap';
23
+
24
+ // Surface
25
+ export { CLISurface, type CLISurfaceOptions, type CommandContext } from './surface';
26
+
27
+ // Plugin (registers cli/group and cli/command kinds)
28
+ export { default as cliPlugin } from './cli.plugin';
29
+
30
+ // Context providers
31
+ export {
32
+ registerCLIProviders,
33
+ requestCLIExit,
34
+ detectOutputFormat,
35
+ shouldKeepAlive,
36
+ resetKeepAlive,
37
+ CLIExitSignal,
38
+ type CLIProviderOptions,
39
+ type UIContext,
40
+ type LoggerContext,
41
+ type AppContext,
42
+ type CLIContext
43
+ } from './providers';
44
+
45
+ // Patterns
46
+ export {
47
+ PatternResolver,
48
+ createPatternResolver,
49
+ isPatternDescriptor,
50
+ getPatternType,
51
+ type PatternImplementation,
52
+ type CLIPatternDescriptor,
53
+ type CLICRUDGroupDescriptor,
54
+ type CLIToolWrapperCommandDescriptor,
55
+ type CLILogViewerGroupDescriptor,
56
+ type CLIProcessManagerGroupDescriptor,
57
+ type CLIConfigNamespaceGroupDescriptor
58
+ } from './patterns';
59
+
60
+ // Errors
61
+ export {
62
+ CLIError,
63
+ CommandNotFoundError,
64
+ InvalidArgumentError,
65
+ MissingArgumentError,
66
+ AuthRequiredError,
67
+ PermissionDeniedError,
68
+ NotFoundError,
69
+ ConfigError,
70
+ NetworkError,
71
+ TimeoutError,
72
+ UserCancelledError
73
+ } from './errors';
74
+
75
+ // Binary path resolution
76
+ export { resolveCliEntry, resolveCliInvocation } from './bin';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * CLI Startup Logger Descriptor
3
+ */
4
+
5
+ import type { LoggerDescriptor } from '@vibesdotdev/logging';
6
+
7
+ const descriptor: LoggerDescriptor = {
8
+ kind: 'logging/logger',
9
+ id: 'cli-startup',
10
+ namespace: 'cli:startup',
11
+ runtime: 'cli',
12
+ sinks: ['stdout'],
13
+ level: 'warn'
14
+ };
15
+
16
+ export default descriptor;
package/src/logging.ts ADDED
@@ -0,0 +1,35 @@
1
+ import {
2
+ getLogger as getRuntimeLogger,
3
+ updateNamespaceSettings,
4
+ parseNamespaceSettingsFromEnv
5
+ } from '@vibesdotdev/logging';
6
+
7
+ const envSettings = parseNamespaceSettingsFromEnv(
8
+ (typeof process !== 'undefined' && process.env) || {}
9
+ );
10
+
11
+ updateNamespaceSettings(envSettings);
12
+
13
+ let globalLogger: ReturnType<typeof getRuntimeLogger> | null = null;
14
+
15
+ function ensureLogger(): ReturnType<typeof getRuntimeLogger> {
16
+ if (!globalLogger) {
17
+ globalLogger = getRuntimeLogger('cli');
18
+ }
19
+
20
+ return globalLogger;
21
+ }
22
+
23
+ export function setLogger(logger: ReturnType<typeof getRuntimeLogger>): void {
24
+ globalLogger = logger;
25
+ }
26
+
27
+ export function getLogger(
28
+ child?: Parameters<ReturnType<typeof getRuntimeLogger>['child']>[0]
29
+ ): ReturnType<typeof getRuntimeLogger> {
30
+ const baseLogger = ensureLogger();
31
+ if (!child) {
32
+ return baseLogger;
33
+ }
34
+ return baseLogger.child(child);
35
+ }