@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.
- package/README.md +41 -0
- package/SPEC.md +97 -0
- package/bin/vibes.ts +26 -0
- package/dist/api/client/factory.d.ts +29 -0
- package/dist/api/client/factory.d.ts.map +1 -0
- package/dist/api/client/factory.js +189 -0
- package/dist/api/client/factory.js.map +1 -0
- package/dist/api/schemas/common.d.ts +58 -0
- package/dist/api/schemas/common.d.ts.map +1 -0
- package/dist/api/schemas/common.js +48 -0
- package/dist/api/schemas/common.js.map +1 -0
- package/dist/api/schemas/types.d.ts +30 -0
- package/dist/api/schemas/types.d.ts.map +1 -0
- package/dist/api/schemas/types.js +2 -0
- package/dist/api/schemas/types.js.map +1 -0
- package/dist/api/services/api.d.ts +14 -0
- package/dist/api/services/api.d.ts.map +1 -0
- package/dist/api/services/api.js +110 -0
- package/dist/api/services/api.js.map +1 -0
- package/dist/api/types.d.ts +6 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +5 -0
- package/dist/api/types.js.map +1 -0
- package/dist/bin.d.ts +28 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +73 -0
- package/dist/bin.js.map +1 -0
- package/dist/bootstrap.d.ts +14 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +14 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/cli.plugin.d.ts +20 -0
- package/dist/cli.plugin.d.ts.map +1 -0
- package/dist/cli.plugin.js +170 -0
- package/dist/cli.plugin.js.map +1 -0
- package/dist/commands/completion/bash.d.ts +8 -0
- package/dist/commands/completion/bash.d.ts.map +1 -0
- package/dist/commands/completion/bash.js +60 -0
- package/dist/commands/completion/bash.js.map +1 -0
- package/dist/commands/completion/completion.descriptor.d.ts +10 -0
- package/dist/commands/completion/completion.descriptor.d.ts.map +1 -0
- package/dist/commands/completion/completion.descriptor.js +41 -0
- package/dist/commands/completion/completion.descriptor.js.map +1 -0
- package/dist/commands/completion/completion.impl.d.ts +12 -0
- package/dist/commands/completion/completion.impl.d.ts.map +1 -0
- package/dist/commands/completion/completion.impl.js +167 -0
- package/dist/commands/completion/completion.impl.js.map +1 -0
- package/dist/commands/completion/fig.d.ts +12 -0
- package/dist/commands/completion/fig.d.ts.map +1 -0
- package/dist/commands/completion/fig.js +71 -0
- package/dist/commands/completion/fig.js.map +1 -0
- package/dist/commands/completion/fish.d.ts +8 -0
- package/dist/commands/completion/fish.d.ts.map +1 -0
- package/dist/commands/completion/fish.js +38 -0
- package/dist/commands/completion/fish.js.map +1 -0
- package/dist/commands/completion/tree.d.ts +33 -0
- package/dist/commands/completion/tree.d.ts.map +1 -0
- package/dist/commands/completion/tree.js +75 -0
- package/dist/commands/completion/tree.js.map +1 -0
- package/dist/commands/completion/zsh-widget.d.ts +13 -0
- package/dist/commands/completion/zsh-widget.d.ts.map +1 -0
- package/dist/commands/completion/zsh-widget.js +39 -0
- package/dist/commands/completion/zsh-widget.js.map +1 -0
- package/dist/commands/completion/zsh.d.ts +9 -0
- package/dist/commands/completion/zsh.d.ts.map +1 -0
- package/dist/commands/completion/zsh.js +146 -0
- package/dist/commands/completion/zsh.js.map +1 -0
- package/dist/commands/profile/_utils.d.ts +21 -0
- package/dist/commands/profile/_utils.d.ts.map +1 -0
- package/dist/commands/profile/_utils.js +61 -0
- package/dist/commands/profile/_utils.js.map +1 -0
- package/dist/commands/profile/profile-group.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile-group.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile-group.descriptor.js +12 -0
- package/dist/commands/profile/profile-group.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.create.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.create.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.create.descriptor.js +22 -0
- package/dist/commands/profile/profile.create.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.create.impl.d.ts +10 -0
- package/dist/commands/profile/profile.create.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.create.impl.js +29 -0
- package/dist/commands/profile/profile.create.impl.js.map +1 -0
- package/dist/commands/profile/profile.delete.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.delete.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.delete.descriptor.js +29 -0
- package/dist/commands/profile/profile.delete.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.delete.impl.d.ts +11 -0
- package/dist/commands/profile/profile.delete.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.delete.impl.js +50 -0
- package/dist/commands/profile/profile.delete.impl.js.map +1 -0
- package/dist/commands/profile/profile.info.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.info.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.info.descriptor.js +23 -0
- package/dist/commands/profile/profile.info.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.info.impl.d.ts +10 -0
- package/dist/commands/profile/profile.info.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.info.impl.js +33 -0
- package/dist/commands/profile/profile.info.impl.js.map +1 -0
- package/dist/commands/profile/profile.list.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.list.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.list.descriptor.js +16 -0
- package/dist/commands/profile/profile.list.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.list.impl.d.ts +10 -0
- package/dist/commands/profile/profile.list.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.list.impl.js +33 -0
- package/dist/commands/profile/profile.list.impl.js.map +1 -0
- package/dist/commands/profile/profile.use.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.use.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.use.descriptor.js +23 -0
- package/dist/commands/profile/profile.use.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.use.impl.d.ts +10 -0
- package/dist/commands/profile/profile.use.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.use.impl.js +24 -0
- package/dist/commands/profile/profile.use.impl.js.map +1 -0
- package/dist/commands/runtime/_logging.d.ts +11 -0
- package/dist/commands/runtime/_logging.d.ts.map +1 -0
- package/dist/commands/runtime/_logging.js +40 -0
- package/dist/commands/runtime/_logging.js.map +1 -0
- package/dist/commands/runtime/codegen.command.descriptor.d.ts +15 -0
- package/dist/commands/runtime/codegen.command.descriptor.d.ts.map +1 -0
- package/dist/commands/runtime/codegen.command.descriptor.js +18 -0
- package/dist/commands/runtime/codegen.command.descriptor.js.map +1 -0
- package/dist/commands/runtime/codegen.command.impl.d.ts +4 -0
- package/dist/commands/runtime/codegen.command.impl.d.ts.map +1 -0
- package/dist/commands/runtime/codegen.command.impl.js +39 -0
- package/dist/commands/runtime/codegen.command.impl.js.map +1 -0
- package/dist/commands/runtime/codegen.d.ts +17 -0
- package/dist/commands/runtime/codegen.d.ts.map +1 -0
- package/dist/commands/runtime/codegen.js +65 -0
- package/dist/commands/runtime/codegen.js.map +1 -0
- package/dist/commands/runtime/index.d.ts +4 -0
- package/dist/commands/runtime/index.d.ts.map +1 -0
- package/dist/commands/runtime/index.js +8 -0
- package/dist/commands/runtime/index.js.map +1 -0
- package/dist/commands/runtime/plugin.d.ts +2 -0
- package/dist/commands/runtime/plugin.d.ts.map +1 -0
- package/dist/commands/runtime/plugin.js +7 -0
- package/dist/commands/runtime/plugin.js.map +1 -0
- package/dist/commands/runtime/runtime-group.descriptor.d.ts +4 -0
- package/dist/commands/runtime/runtime-group.descriptor.d.ts.map +1 -0
- package/dist/commands/runtime/runtime-group.descriptor.js +10 -0
- package/dist/commands/runtime/runtime-group.descriptor.js.map +1 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +5 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/namespace/hook.d.ts +12 -0
- package/dist/core/namespace/hook.d.ts.map +1 -0
- package/dist/core/namespace/hook.js +15 -0
- package/dist/core/namespace/hook.js.map +1 -0
- package/dist/core/namespace/index.d.ts +18 -0
- package/dist/core/namespace/index.d.ts.map +1 -0
- package/dist/core/namespace/index.js +214 -0
- package/dist/core/namespace/index.js.map +1 -0
- package/dist/core/namespace/schemas/index.d.ts +25 -0
- package/dist/core/namespace/schemas/index.d.ts.map +1 -0
- package/dist/core/namespace/schemas/index.js +2 -0
- package/dist/core/namespace/schemas/index.js.map +1 -0
- package/dist/core/plugins/types.d.ts +81 -0
- package/dist/core/plugins/types.d.ts.map +1 -0
- package/dist/core/plugins/types.js +6 -0
- package/dist/core/plugins/types.js.map +1 -0
- package/dist/core/runtime/context.d.ts +25 -0
- package/dist/core/runtime/context.d.ts.map +1 -0
- package/dist/core/runtime/context.js +30 -0
- package/dist/core/runtime/context.js.map +1 -0
- package/dist/core/runtime/hooks.d.ts +12 -0
- package/dist/core/runtime/hooks.d.ts.map +1 -0
- package/dist/core/runtime/hooks.js +2 -0
- package/dist/core/runtime/hooks.js.map +1 -0
- package/dist/core/runtime/shared/context.d.ts +33 -0
- package/dist/core/runtime/shared/context.d.ts.map +1 -0
- package/dist/core/runtime/shared/context.js +51 -0
- package/dist/core/runtime/shared/context.js.map +1 -0
- package/dist/core/runtime/shared/options.d.ts +20 -0
- package/dist/core/runtime/shared/options.d.ts.map +1 -0
- package/dist/core/runtime/shared/options.js +61 -0
- package/dist/core/runtime/shared/options.js.map +1 -0
- package/dist/core/schemas/manifest.d.ts +24 -0
- package/dist/core/schemas/manifest.d.ts.map +1 -0
- package/dist/core/schemas/manifest.js +6 -0
- package/dist/core/schemas/manifest.js.map +1 -0
- package/dist/core/schemas/types.d.ts +7 -0
- package/dist/core/schemas/types.d.ts.map +1 -0
- package/dist/core/schemas/types.js +2 -0
- package/dist/core/schemas/types.js.map +1 -0
- package/dist/core/ui/interface.d.ts +12 -0
- package/dist/core/ui/interface.d.ts.map +1 -0
- package/dist/core/ui/interface.js +6 -0
- package/dist/core/ui/interface.js.map +1 -0
- package/dist/docs/cli.commands.docs.descriptor.d.ts +4 -0
- package/dist/docs/cli.commands.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/cli.commands.docs.descriptor.js +207 -0
- package/dist/docs/cli.commands.docs.descriptor.js.map +1 -0
- package/dist/docs/cli.groups.docs.descriptor.d.ts +4 -0
- package/dist/docs/cli.groups.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/cli.groups.docs.descriptor.js +330 -0
- package/dist/docs/cli.groups.docs.descriptor.js.map +1 -0
- package/dist/docs/cli.output.docs.descriptor.d.ts +4 -0
- package/dist/docs/cli.output.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/cli.output.docs.descriptor.js +442 -0
- package/dist/docs/cli.output.docs.descriptor.js.map +1 -0
- package/dist/docs/types.d.ts +19 -0
- package/dist/docs/types.d.ts.map +1 -0
- package/dist/docs/types.js +2 -0
- package/dist/docs/types.js.map +1 -0
- package/dist/errors.d.ts +74 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +113 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/cli-startup.logger.descriptor.d.ts +7 -0
- package/dist/logging/cli-startup.logger.descriptor.d.ts.map +1 -0
- package/dist/logging/cli-startup.logger.descriptor.js +13 -0
- package/dist/logging/cli-startup.logger.descriptor.js.map +1 -0
- package/dist/logging.d.ts +4 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +21 -0
- package/dist/logging.js.map +1 -0
- package/dist/patterns/config-namespace.d.ts +23 -0
- package/dist/patterns/config-namespace.d.ts.map +1 -0
- package/dist/patterns/config-namespace.js +218 -0
- package/dist/patterns/config-namespace.js.map +1 -0
- package/dist/patterns/crud.d.ts +23 -0
- package/dist/patterns/crud.d.ts.map +1 -0
- package/dist/patterns/crud.js +164 -0
- package/dist/patterns/crud.js.map +1 -0
- package/dist/patterns/index.d.ts +13 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +13 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/log-viewer.d.ts +19 -0
- package/dist/patterns/log-viewer.d.ts.map +1 -0
- package/dist/patterns/log-viewer.js +74 -0
- package/dist/patterns/log-viewer.js.map +1 -0
- package/dist/patterns/pattern-types.d.ts +21 -0
- package/dist/patterns/pattern-types.d.ts.map +1 -0
- package/dist/patterns/pattern-types.js +7 -0
- package/dist/patterns/pattern-types.js.map +1 -0
- package/dist/patterns/process-manager.d.ts +21 -0
- package/dist/patterns/process-manager.d.ts.map +1 -0
- package/dist/patterns/process-manager.js +134 -0
- package/dist/patterns/process-manager.js.map +1 -0
- package/dist/patterns/resolver.contracts.d.ts +14 -0
- package/dist/patterns/resolver.contracts.d.ts.map +1 -0
- package/dist/patterns/resolver.contracts.js +9 -0
- package/dist/patterns/resolver.contracts.js.map +1 -0
- package/dist/patterns/resolver.d.ts +40 -0
- package/dist/patterns/resolver.d.ts.map +1 -0
- package/dist/patterns/resolver.js +63 -0
- package/dist/patterns/resolver.js.map +1 -0
- package/dist/patterns/schemas.d.ts +496 -0
- package/dist/patterns/schemas.d.ts.map +1 -0
- package/dist/patterns/schemas.js +105 -0
- package/dist/patterns/schemas.js.map +1 -0
- package/dist/patterns/tool-wrapper.d.ts +18 -0
- package/dist/patterns/tool-wrapper.d.ts.map +1 -0
- package/dist/patterns/tool-wrapper.js +130 -0
- package/dist/patterns/tool-wrapper.js.map +1 -0
- package/dist/providers.d.ts +105 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +164 -0
- package/dist/providers.js.map +1 -0
- package/dist/schemas/descriptors.d.ts +130 -0
- package/dist/schemas/descriptors.d.ts.map +1 -0
- package/dist/schemas/descriptors.js +96 -0
- package/dist/schemas/descriptors.js.map +1 -0
- package/dist/schemas/surface.d.ts +40 -0
- package/dist/schemas/surface.d.ts.map +1 -0
- package/dist/schemas/surface.js +2 -0
- package/dist/schemas/surface.js.map +1 -0
- package/dist/schemas/types.d.ts +202 -0
- package/dist/schemas/types.d.ts.map +1 -0
- package/dist/schemas/types.js +2 -0
- package/dist/schemas/types.js.map +1 -0
- package/dist/support/ui-toolkit.d.ts +62 -0
- package/dist/support/ui-toolkit.d.ts.map +1 -0
- package/dist/support/ui-toolkit.js +172 -0
- package/dist/support/ui-toolkit.js.map +1 -0
- package/dist/surface/CLISurface.d.ts +16 -0
- package/dist/surface/CLISurface.d.ts.map +1 -0
- package/dist/surface/CLISurface.js +173 -0
- package/dist/surface/CLISurface.js.map +1 -0
- package/dist/surface/attach-tui-action.d.ts +12 -0
- package/dist/surface/attach-tui-action.d.ts.map +1 -0
- package/dist/surface/attach-tui-action.js +48 -0
- package/dist/surface/attach-tui-action.js.map +1 -0
- package/dist/surface/build-context.d.ts +4 -0
- package/dist/surface/build-context.d.ts.map +1 -0
- package/dist/surface/build-context.js +49 -0
- package/dist/surface/build-context.js.map +1 -0
- package/dist/surface/command-group-policy.d.ts +7 -0
- package/dist/surface/command-group-policy.d.ts.map +1 -0
- package/dist/surface/command-group-policy.js +42 -0
- package/dist/surface/command-group-policy.js.map +1 -0
- package/dist/surface/discovery-cache.d.ts +17 -0
- package/dist/surface/discovery-cache.d.ts.map +1 -0
- package/dist/surface/discovery-cache.js +106 -0
- package/dist/surface/discovery-cache.js.map +1 -0
- package/dist/surface/register-commands.d.ts +15 -0
- package/dist/surface/register-commands.d.ts.map +1 -0
- package/dist/surface/register-commands.js +197 -0
- package/dist/surface/register-commands.js.map +1 -0
- package/dist/surface/register-groups.d.ts +15 -0
- package/dist/surface/register-groups.d.ts.map +1 -0
- package/dist/surface/register-groups.js +52 -0
- package/dist/surface/register-groups.js.map +1 -0
- package/dist/surface.d.ts +9 -0
- package/dist/surface.d.ts.map +1 -0
- package/dist/surface.js +8 -0
- package/dist/surface.js.map +1 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/schemas/types.d.ts +2 -0
- package/dist/ui/schemas/types.d.ts.map +1 -0
- package/dist/ui/schemas/types.js +2 -0
- package/dist/ui/schemas/types.js.map +1 -0
- package/dist/ui/toolkit/VibesUIToolkit.d.ts +2 -0
- package/dist/ui/toolkit/VibesUIToolkit.d.ts.map +1 -0
- package/dist/ui/toolkit/VibesUIToolkit.js +2 -0
- package/dist/ui/toolkit/VibesUIToolkit.js.map +1 -0
- package/dist/ui.context.descriptor.d.ts +21 -0
- package/dist/ui.context.descriptor.d.ts.map +1 -0
- package/dist/ui.context.descriptor.js +12 -0
- package/dist/ui.context.descriptor.js.map +1 -0
- package/dist/utils/open.d.ts +2 -0
- package/dist/utils/open.d.ts.map +1 -0
- package/dist/utils/open.js +30 -0
- package/dist/utils/open.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +186 -0
- package/src/api/client/factory.ts +265 -0
- package/src/api/schemas/common.ts +50 -0
- package/src/api/schemas/types.ts +32 -0
- package/src/api/services/api.ts +129 -0
- package/src/api/types.ts +12 -0
- package/src/bin.ts +84 -0
- package/src/bootstrap.ts +19 -0
- package/src/cli.plugin.d.ts +19 -0
- package/src/cli.plugin.ts +202 -0
- package/src/commands/completion/bash.ts +68 -0
- package/src/commands/completion/completion.descriptor.ts +48 -0
- package/src/commands/completion/completion.impl.ts +188 -0
- package/src/commands/completion/fig.ts +78 -0
- package/src/commands/completion/fish.ts +52 -0
- package/src/commands/completion/tree.ts +115 -0
- package/src/commands/completion/zsh-widget.ts +39 -0
- package/src/commands/completion/zsh.ts +165 -0
- package/src/commands/profile/_utils.ts +72 -0
- package/src/commands/profile/profile-group.descriptor.ts +14 -0
- package/src/commands/profile/profile.create.descriptor.ts +24 -0
- package/src/commands/profile/profile.create.impl.ts +44 -0
- package/src/commands/profile/profile.delete.descriptor.ts +31 -0
- package/src/commands/profile/profile.delete.impl.ts +71 -0
- package/src/commands/profile/profile.info.descriptor.ts +25 -0
- package/src/commands/profile/profile.info.impl.ts +51 -0
- package/src/commands/profile/profile.list.descriptor.ts +18 -0
- package/src/commands/profile/profile.list.impl.ts +46 -0
- package/src/commands/profile/profile.use.descriptor.ts +25 -0
- package/src/commands/profile/profile.use.impl.ts +39 -0
- package/src/commands/runtime/_logging.ts +47 -0
- package/src/commands/runtime/codegen.command.descriptor.ts +18 -0
- package/src/commands/runtime/codegen.command.impl.ts +44 -0
- package/src/commands/runtime/codegen.ts +84 -0
- package/src/commands/runtime/index.ts +14 -0
- package/src/commands/runtime/plugin.ts +7 -0
- package/src/commands/runtime/runtime-group.descriptor.ts +12 -0
- package/src/config.ts +22 -0
- package/src/core/index.ts +9 -0
- package/src/core/namespace/hook.ts +25 -0
- package/src/core/namespace/index.ts +298 -0
- package/src/core/namespace/schemas/index.ts +25 -0
- package/src/core/plugins/types.ts +87 -0
- package/src/core/runtime/context.ts +50 -0
- package/src/core/runtime/hooks.ts +12 -0
- package/src/core/runtime/shared/context.ts +65 -0
- package/src/core/runtime/shared/options.ts +60 -0
- package/src/core/schemas/manifest.ts +26 -0
- package/src/core/schemas/types.ts +6 -0
- package/src/core/ui/interface.ts +12 -0
- package/src/docs/cli.commands.docs.descriptor.ts +210 -0
- package/src/docs/cli.groups.docs.descriptor.ts +333 -0
- package/src/docs/cli.output.docs.descriptor.ts +445 -0
- package/src/docs/types.ts +18 -0
- package/src/errors.ts +123 -0
- package/src/index.ts +76 -0
- package/src/logging/cli-startup.logger.descriptor.ts +16 -0
- package/src/logging.ts +35 -0
- package/src/patterns/config-namespace.ts +251 -0
- package/src/patterns/crud.ts +217 -0
- package/src/patterns/index.ts +24 -0
- package/src/patterns/log-viewer.ts +118 -0
- package/src/patterns/pattern-types.ts +22 -0
- package/src/patterns/process-manager.ts +180 -0
- package/src/patterns/resolver.contracts.ts +15 -0
- package/src/patterns/resolver.ts +86 -0
- package/src/patterns/schemas.ts +146 -0
- package/src/patterns/tool-wrapper.ts +165 -0
- package/src/providers.ts +282 -0
- package/src/schemas/descriptors.d.ts +119 -0
- package/src/schemas/descriptors.ts +136 -0
- package/src/schemas/surface.ts +52 -0
- package/src/schemas/types.d.ts +195 -0
- package/src/schemas/types.ts +225 -0
- package/src/support/ui-toolkit.ts +224 -0
- package/src/surface/CLISurface.ts +193 -0
- package/src/surface/attach-tui-action.ts +76 -0
- package/src/surface/build-context.ts +49 -0
- package/src/surface/command-group-policy.ts +52 -0
- package/src/surface/discovery-cache.ts +143 -0
- package/src/surface/register-commands.ts +266 -0
- package/src/surface/register-groups.ts +84 -0
- package/src/surface.ts +9 -0
- package/src/types.ts +3 -0
- package/src/ui/schemas/types.ts +1 -0
- package/src/ui/toolkit/VibesUIToolkit.ts +1 -0
- package/src/ui.context.descriptor.ts +13 -0
- package/src/utils/open.ts +36 -0
- package/src/version.ts +10 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { Option } from 'commander';
|
|
3
|
+
import type { VibesRuntime } from '@vibesdotdev/runtime/api/runtime';
|
|
4
|
+
import type {
|
|
5
|
+
CLICommandAssetDescriptor,
|
|
6
|
+
CLIGroupAssetDescriptor,
|
|
7
|
+
CLILogBufferBehavior
|
|
8
|
+
} from '../schemas/descriptors';
|
|
9
|
+
import type { PatternResolver } from '../patterns';
|
|
10
|
+
import { isPatternDescriptor, type CLIPatternDescriptor } from '../patterns/schemas';
|
|
11
|
+
import type {
|
|
12
|
+
CLISurfaceOptions,
|
|
13
|
+
CommandContext,
|
|
14
|
+
CommandExecutionStartInfo
|
|
15
|
+
} from '../schemas/surface';
|
|
16
|
+
import {
|
|
17
|
+
allowedRootFallbackGroups,
|
|
18
|
+
findScopeMissingGroups,
|
|
19
|
+
findUnexpectedMissingGroups
|
|
20
|
+
} from './command-group-policy';
|
|
21
|
+
import { attachTuiAction } from './attach-tui-action';
|
|
22
|
+
import { getLogger } from '../logging';
|
|
23
|
+
import { getCLIDiscovery } from './discovery-cache';
|
|
24
|
+
|
|
25
|
+
const logger = getLogger('surface').child('register-commands');
|
|
26
|
+
|
|
27
|
+
export async function registerCommands(params: {
|
|
28
|
+
runtime: VibesRuntime;
|
|
29
|
+
program: Command;
|
|
30
|
+
groups: Map<string, Command>;
|
|
31
|
+
groupDescriptors: Map<string, CLIGroupAssetDescriptor>;
|
|
32
|
+
options: CLISurfaceOptions;
|
|
33
|
+
patternResolver: PatternResolver | null;
|
|
34
|
+
buildContext: () => Promise<CommandContext>;
|
|
35
|
+
}): Promise<void> {
|
|
36
|
+
const { runtime, options } = params;
|
|
37
|
+
const { verbose } = options;
|
|
38
|
+
const discovery = getCLIDiscovery(runtime, options);
|
|
39
|
+
const commands = discovery.commands;
|
|
40
|
+
|
|
41
|
+
if (verbose) logger.debug(`Discovered ${commands.length} commands`);
|
|
42
|
+
|
|
43
|
+
const sorted = discovery.sortedCommands;
|
|
44
|
+
const rootFallbackGroups = allowedRootFallbackGroups(options);
|
|
45
|
+
const registeredGroupIds = new Set(params.groups.keys());
|
|
46
|
+
const declaredGroupIds = new Set(discovery.allGroups.map((descriptor) => descriptor.id));
|
|
47
|
+
const scopeMissingGroups = findScopeMissingGroups(
|
|
48
|
+
sorted,
|
|
49
|
+
registeredGroupIds,
|
|
50
|
+
declaredGroupIds,
|
|
51
|
+
rootFallbackGroups
|
|
52
|
+
);
|
|
53
|
+
const missingGroups = findUnexpectedMissingGroups(sorted, declaredGroupIds, rootFallbackGroups);
|
|
54
|
+
if (missingGroups.size > 0) {
|
|
55
|
+
const message = [
|
|
56
|
+
'[CLI] Command descriptors reference unknown groups:',
|
|
57
|
+
...Array.from(missingGroups.entries()).map(
|
|
58
|
+
([groupId, commandIds]) => ` - ${groupId}: ${commandIds.join(', ')}`
|
|
59
|
+
)
|
|
60
|
+
].join('\n');
|
|
61
|
+
if (options.strictCommandGroups ?? true) throw new Error(message);
|
|
62
|
+
if (verbose) logger.warn(message);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const skippedByScope = new Set(scopeMissingGroups.keys());
|
|
66
|
+
if (verbose && skippedByScope.size > 0) {
|
|
67
|
+
const message = [
|
|
68
|
+
'[CLI] Skipping commands because their groups are not registered in this scope:',
|
|
69
|
+
...Array.from(scopeMissingGroups.entries()).map(
|
|
70
|
+
([groupId, commandIds]) => ` - ${groupId}: ${commandIds.join(', ')}`
|
|
71
|
+
)
|
|
72
|
+
].join('\n');
|
|
73
|
+
logger.warn(message);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const scopedCommands = sorted.filter((command) => !skippedByScope.has(command.group));
|
|
77
|
+
for (const command of scopedCommands) await registerCommand(params, command, rootFallbackGroups);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function registerCommand(
|
|
81
|
+
params: {
|
|
82
|
+
runtime: VibesRuntime;
|
|
83
|
+
program: Command;
|
|
84
|
+
groups: Map<string, Command>;
|
|
85
|
+
groupDescriptors: Map<string, CLIGroupAssetDescriptor>;
|
|
86
|
+
options: CLISurfaceOptions;
|
|
87
|
+
patternResolver: PatternResolver | null;
|
|
88
|
+
buildContext: () => Promise<CommandContext>;
|
|
89
|
+
},
|
|
90
|
+
descriptor: CLICommandAssetDescriptor,
|
|
91
|
+
rootFallbackGroups: Set<string>
|
|
92
|
+
): Promise<void> {
|
|
93
|
+
const { runtime, options } = params;
|
|
94
|
+
const { verbose } = options;
|
|
95
|
+
const groupParent = params.groups.get(descriptor.group);
|
|
96
|
+
const parent =
|
|
97
|
+
groupParent ??
|
|
98
|
+
(rootFallbackGroups.has(descriptor.group) || !(options.strictCommandGroups ?? true)
|
|
99
|
+
? params.program
|
|
100
|
+
: null);
|
|
101
|
+
if (!parent) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
`[CLI] Missing group '${descriptor.group}' for command '${descriptor.id}'. Add a cli/group descriptor or explicitly allow root fallback.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
if (!groupParent && verbose) {
|
|
107
|
+
const message = `[CLI] Command '${descriptor.id}' registered at root via fallback group '${descriptor.group}'.`;
|
|
108
|
+
if (rootFallbackGroups.has(descriptor.group)) {
|
|
109
|
+
logger.debug(message);
|
|
110
|
+
} else {
|
|
111
|
+
logger.warn(message);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (params.patternResolver && isPatternDescriptor(descriptor)) {
|
|
116
|
+
const ctx = await params.buildContext();
|
|
117
|
+
await params.patternResolver.resolve(descriptor as CLIPatternDescriptor, parent, ctx);
|
|
118
|
+
if (verbose) {
|
|
119
|
+
logger.debug(
|
|
120
|
+
`Pattern '${(descriptor as { pattern?: string }).pattern}' applied to: ${descriptor.id}`
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const cmd = parent.command(descriptor.name).description(descriptor.description);
|
|
127
|
+
if (descriptor.arguments) {
|
|
128
|
+
for (const arg of descriptor.arguments) {
|
|
129
|
+
const variadic = arg.variadic ? '...' : '';
|
|
130
|
+
const spec = arg.required ? `<${arg.name}${variadic}>` : `[${arg.name}${variadic}]`;
|
|
131
|
+
cmd.argument(spec, arg.description, arg.default as string);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (descriptor.options) {
|
|
136
|
+
for (const opt of descriptor.options) {
|
|
137
|
+
const option = new Option(opt.flags, opt.description);
|
|
138
|
+
if (opt.choices) option.choices(opt.choices);
|
|
139
|
+
if (opt.type === 'number') {
|
|
140
|
+
option.argParser((value) => {
|
|
141
|
+
const n = Number(value);
|
|
142
|
+
if (Number.isNaN(n)) {
|
|
143
|
+
throw new Error(`Expected a number for ${opt.flags}, got: ${value}`);
|
|
144
|
+
}
|
|
145
|
+
return n;
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
if (opt.default !== undefined) option.default(coerceDefault(opt.default, opt.type));
|
|
149
|
+
cmd.addOption(option);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (descriptor.aliases) for (const alias of descriptor.aliases) cmd.alias(alias);
|
|
153
|
+
|
|
154
|
+
const groupDescriptor = params.groupDescriptors.get(descriptor.group);
|
|
155
|
+
const logBuffer = resolveLogBufferBehavior(descriptor, groupDescriptor);
|
|
156
|
+
|
|
157
|
+
if (descriptor.tuiAppId) {
|
|
158
|
+
await attachTuiAction(cmd, runtime, descriptor, {
|
|
159
|
+
beforeExecute: async ({ args, options: commandOptions }) => {
|
|
160
|
+
await emitCommandExecutionStart(params.options, {
|
|
161
|
+
command: descriptor,
|
|
162
|
+
group: groupDescriptor,
|
|
163
|
+
args,
|
|
164
|
+
options: commandOptions,
|
|
165
|
+
logBuffer
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
if (verbose) logger.debug(`Command (tui/app: ${descriptor.tuiAppId}): ${descriptor.id}`);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
cmd.action(async (...args: unknown[]) => {
|
|
174
|
+
args.pop();
|
|
175
|
+
const cmdOptions = args.pop() as Record<string, unknown>;
|
|
176
|
+
const positionalArgs: Record<string, unknown> = {};
|
|
177
|
+
if (descriptor.arguments) {
|
|
178
|
+
descriptor.arguments.forEach((arg: (typeof descriptor.arguments)[number], i: number) => {
|
|
179
|
+
if (i < args.length) positionalArgs[arg.name] = args[i];
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
await emitCommandExecutionStart(params.options, {
|
|
183
|
+
command: descriptor,
|
|
184
|
+
group: groupDescriptor,
|
|
185
|
+
args: positionalArgs,
|
|
186
|
+
options: cmdOptions,
|
|
187
|
+
logBuffer
|
|
188
|
+
});
|
|
189
|
+
const impl = await resolveCommandImpl(runtime, descriptor, verbose);
|
|
190
|
+
if (!impl) {
|
|
191
|
+
throw new Error(
|
|
192
|
+
`[CLI] Command '${descriptor.id}' is registered but has no resolvable implementation in this runtime scope.`
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
await impl.execute(positionalArgs, cmdOptions);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
if (verbose) logger.debug(`Command: ${descriptor.id}`);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async function resolveCommandImpl(
|
|
202
|
+
runtime: VibesRuntime,
|
|
203
|
+
descriptor: CLICommandAssetDescriptor,
|
|
204
|
+
verbose?: boolean
|
|
205
|
+
): Promise<{
|
|
206
|
+
execute: (args: Record<string, unknown>, opts: Record<string, unknown>) => Promise<void>;
|
|
207
|
+
} | null> {
|
|
208
|
+
try {
|
|
209
|
+
const impl = (await runtime.query('cli/command').withId(descriptor.id).resolve()) as {
|
|
210
|
+
execute?: (args: Record<string, unknown>, opts: Record<string, unknown>) => Promise<void>;
|
|
211
|
+
};
|
|
212
|
+
if (!impl || typeof impl.execute !== 'function') {
|
|
213
|
+
if (verbose) logger.warn(`Invalid implementation for: ${descriptor.id}`);
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
return { execute: impl.execute.bind(impl) };
|
|
217
|
+
} catch {
|
|
218
|
+
if (verbose) logger.warn(`No implementation for: ${descriptor.id}`);
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function resolveLogBufferBehavior(
|
|
224
|
+
command: CLICommandAssetDescriptor,
|
|
225
|
+
group?: CLIGroupAssetDescriptor
|
|
226
|
+
): CLILogBufferBehavior | null {
|
|
227
|
+
const groupBehavior = group?.logBuffer;
|
|
228
|
+
const commandBehavior = command.logBuffer;
|
|
229
|
+
|
|
230
|
+
if (!groupBehavior && !commandBehavior) {
|
|
231
|
+
if (command.tuiAppId) {
|
|
232
|
+
return {
|
|
233
|
+
enabled: true,
|
|
234
|
+
sinks: ['stdout'],
|
|
235
|
+
fallbackToStdout: true
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const merged: CLILogBufferBehavior = {
|
|
242
|
+
enabled: commandBehavior?.enabled ?? groupBehavior?.enabled ?? true,
|
|
243
|
+
sinks: commandBehavior?.sinks ?? groupBehavior?.sinks,
|
|
244
|
+
fallbackToStdout: commandBehavior?.fallbackToStdout ?? groupBehavior?.fallbackToStdout ?? true
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
if (!merged.enabled) return null;
|
|
248
|
+
if (command.tuiAppId && (!merged.sinks || merged.sinks.length === 0)) {
|
|
249
|
+
merged.sinks = ['stdout'];
|
|
250
|
+
}
|
|
251
|
+
return merged;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function coerceDefault(value: unknown, type: 'string' | 'number' | 'boolean' | undefined): unknown {
|
|
255
|
+
if (type !== 'number' || typeof value !== 'string') return value;
|
|
256
|
+
const n = Number(value);
|
|
257
|
+
return Number.isNaN(n) ? value : n;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
async function emitCommandExecutionStart(
|
|
261
|
+
options: CLISurfaceOptions,
|
|
262
|
+
info: CommandExecutionStartInfo
|
|
263
|
+
): Promise<void> {
|
|
264
|
+
if (!options.onCommandExecutionStart) return;
|
|
265
|
+
await options.onCommandExecutionStart(info);
|
|
266
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { VibesRuntime } from '@vibesdotdev/runtime/api/runtime';
|
|
3
|
+
import type { PatternResolver } from '../patterns';
|
|
4
|
+
import { isPatternDescriptor, type CLIPatternDescriptor } from '../patterns/schemas';
|
|
5
|
+
import type { CLIGroupAssetDescriptor } from '../schemas/descriptors';
|
|
6
|
+
import type { CLISurfaceOptions, CommandContext } from '../schemas/surface';
|
|
7
|
+
import { getLogger } from '../logging';
|
|
8
|
+
import { getCLIDiscovery } from './discovery-cache';
|
|
9
|
+
|
|
10
|
+
const logger = getLogger('surface').child('register-groups');
|
|
11
|
+
|
|
12
|
+
export async function registerGroups(params: {
|
|
13
|
+
runtime: VibesRuntime;
|
|
14
|
+
program: Command;
|
|
15
|
+
groups: Map<string, Command>;
|
|
16
|
+
groupDescriptors: Map<string, CLIGroupAssetDescriptor>;
|
|
17
|
+
options: CLISurfaceOptions;
|
|
18
|
+
patternResolver: PatternResolver | null;
|
|
19
|
+
buildContext: () => Promise<CommandContext>;
|
|
20
|
+
}): Promise<void> {
|
|
21
|
+
const { runtime, options } = params;
|
|
22
|
+
const { verbose } = options;
|
|
23
|
+
const discovery = getCLIDiscovery(runtime, options);
|
|
24
|
+
const groups = discovery.groups;
|
|
25
|
+
|
|
26
|
+
if (verbose) {
|
|
27
|
+
logger.debug(`Discovered ${groups.length} groups`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
for (const group of discovery.sortedGroups) {
|
|
31
|
+
await registerGroup(params, group);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function registerGroup(
|
|
36
|
+
params: {
|
|
37
|
+
program: Command;
|
|
38
|
+
groups: Map<string, Command>;
|
|
39
|
+
groupDescriptors: Map<string, CLIGroupAssetDescriptor>;
|
|
40
|
+
options: CLISurfaceOptions;
|
|
41
|
+
patternResolver: PatternResolver | null;
|
|
42
|
+
buildContext: () => Promise<CommandContext>;
|
|
43
|
+
},
|
|
44
|
+
descriptor: CLIGroupAssetDescriptor
|
|
45
|
+
): Promise<void> {
|
|
46
|
+
const { verbose } = params.options;
|
|
47
|
+
let parent = params.program;
|
|
48
|
+
if (descriptor.parent) {
|
|
49
|
+
const parentGroup = params.groups.get(descriptor.parent);
|
|
50
|
+
if (!parentGroup) {
|
|
51
|
+
const message = `[CLI] Group '${descriptor.id}' references missing parent '${descriptor.parent}'.`;
|
|
52
|
+
if (params.options.strictGroupParents === true) throw new Error(message);
|
|
53
|
+
if (verbose) logger.warn(message);
|
|
54
|
+
} else {
|
|
55
|
+
parent = parentGroup;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const groupCmd = parent.command(descriptor.name).description(descriptor.description);
|
|
60
|
+
|
|
61
|
+
if (descriptor.aliases) {
|
|
62
|
+
for (const alias of descriptor.aliases) {
|
|
63
|
+
groupCmd.alias(alias);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
params.groups.set(descriptor.id, groupCmd);
|
|
68
|
+
params.groupDescriptors.set(descriptor.id, descriptor);
|
|
69
|
+
|
|
70
|
+
if (verbose) {
|
|
71
|
+
logger.debug(`Group: ${descriptor.id}`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (params.patternResolver && isPatternDescriptor(descriptor)) {
|
|
75
|
+
const ctx = await params.buildContext();
|
|
76
|
+
await params.patternResolver.resolve(descriptor as CLIPatternDescriptor, groupCmd, ctx);
|
|
77
|
+
|
|
78
|
+
if (verbose) {
|
|
79
|
+
logger.debug(
|
|
80
|
+
`Pattern '${(descriptor as { pattern?: string }).pattern}' applied to: ${descriptor.id}`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
package/src/surface.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Surface
|
|
3
|
+
*
|
|
4
|
+
* The Commander.js integration for the universal runtime.
|
|
5
|
+
* Discovers cli/group and cli/command descriptors and builds a command tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export { CLISurface } from './surface/CLISurface';
|
|
9
|
+
export type { CLISurfaceOptions, CommandContext } from './schemas/surface';
|
package/src/types.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { UIContext as UIToolkit } from '../../providers.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VibesUIToolkit } from '../../support/ui-toolkit.ts';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI UI Context Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Provides UI toolkit for terminal output (CLI surface only).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { createContextDescriptor } from '@vibesdotdev/runtime/factory/context';
|
|
8
|
+
|
|
9
|
+
export default createContextDescriptor({
|
|
10
|
+
id: 'cli/ui',
|
|
11
|
+
description: 'UI toolkit for terminal output and user interaction.',
|
|
12
|
+
hardware: ['consumer']
|
|
13
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { spawn } from 'bun';
|
|
2
|
+
|
|
3
|
+
const ALLOWED_SCHEMES = new Set(['http:', 'https:']);
|
|
4
|
+
|
|
5
|
+
function validateUrl(url: string): void {
|
|
6
|
+
let parsed: URL;
|
|
7
|
+
try {
|
|
8
|
+
parsed = new URL(url);
|
|
9
|
+
} catch {
|
|
10
|
+
throw new Error(`Invalid URL: ${url}`);
|
|
11
|
+
}
|
|
12
|
+
if (!ALLOWED_SCHEMES.has(parsed.protocol)) {
|
|
13
|
+
throw new Error(
|
|
14
|
+
`URL scheme not allowed: ${parsed.protocol}. Only http:// and https:// are permitted.`
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export async function open(url: string): Promise<void> {
|
|
20
|
+
validateUrl(url);
|
|
21
|
+
|
|
22
|
+
const platform = process.platform;
|
|
23
|
+
const command = platform === 'darwin' ? 'open' : platform === 'win32' ? 'start' : 'xdg-open';
|
|
24
|
+
|
|
25
|
+
const proc = spawn({
|
|
26
|
+
cmd: [command, url],
|
|
27
|
+
stdout: 'ignore',
|
|
28
|
+
stderr: 'pipe'
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const exitCode = await proc.exited;
|
|
32
|
+
if (exitCode !== 0) {
|
|
33
|
+
const stderr = await new Response(proc.stderr).text();
|
|
34
|
+
throw new Error(`Failed to open browser: ${stderr.trim() || `exit code ${exitCode}`}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/version.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI version string for `vibes --version`.
|
|
3
|
+
*
|
|
4
|
+
* In compiled binaries, `__VIBES_VERSION__` is substituted at build time.
|
|
5
|
+
* In source mode, falls back to 'dev'.
|
|
6
|
+
*/
|
|
7
|
+
declare const __VIBES_VERSION__: string | undefined;
|
|
8
|
+
|
|
9
|
+
export const VIBES_VERSION: string =
|
|
10
|
+
typeof __VIBES_VERSION__ === 'string' ? __VIBES_VERSION__ : 'dev';
|