@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,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Delete Implementation
|
|
3
|
+
*
|
|
4
|
+
* Deletes a profile directory with optional --force to skip confirmation.
|
|
5
|
+
* Refuses to delete the currently active profile.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { createInterface } from 'node:readline/promises';
|
|
9
|
+
import {
|
|
10
|
+
getActiveProfile,
|
|
11
|
+
profileExists,
|
|
12
|
+
deleteProfileDir,
|
|
13
|
+
validateProfileName,
|
|
14
|
+
GREEN,
|
|
15
|
+
RED,
|
|
16
|
+
BOLD,
|
|
17
|
+
RESET,
|
|
18
|
+
log
|
|
19
|
+
} from './_utils';
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
async execute(
|
|
23
|
+
args: Record<string, unknown>,
|
|
24
|
+
opts: Record<string, unknown>
|
|
25
|
+
): Promise<void> {
|
|
26
|
+
const name = args.name as string;
|
|
27
|
+
const force = opts.force === true;
|
|
28
|
+
|
|
29
|
+
if (!name) {
|
|
30
|
+
log(`${RED}✗${RESET} Profile name is required`);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
validateProfileName(name);
|
|
35
|
+
|
|
36
|
+
log('');
|
|
37
|
+
log(`${BOLD}vibes profile delete${RESET} ${name}`);
|
|
38
|
+
log(`${'─'.repeat(40)}`);
|
|
39
|
+
|
|
40
|
+
if (!profileExists(name)) {
|
|
41
|
+
log(` ${RED}✗${RESET} Profile does not exist: ${BOLD}${name}${RESET}`);
|
|
42
|
+
log('');
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const active = getActiveProfile();
|
|
47
|
+
if (name === active) {
|
|
48
|
+
log(` ${RED}✗${RESET} Cannot delete the currently active profile: ${BOLD}${name}${RESET}`);
|
|
49
|
+
log('');
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!force) {
|
|
54
|
+
const rl = createInterface({
|
|
55
|
+
input: process.stdin,
|
|
56
|
+
output: process.stdout
|
|
57
|
+
});
|
|
58
|
+
const answer = await rl.question(` Delete profile "${name}"? [y/N] `);
|
|
59
|
+
rl.close();
|
|
60
|
+
if (answer.trim().toLowerCase() !== 'y') {
|
|
61
|
+
log(` ${RED}✗${RESET} Cancelled`);
|
|
62
|
+
log('');
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
deleteProfileDir(name);
|
|
68
|
+
log(` ${GREEN}✓${RESET} Deleted profile ${BOLD}${name}${RESET}`);
|
|
69
|
+
log('');
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CLICommandAssetDescriptor } from '../../schemas/descriptors';
|
|
2
|
+
|
|
3
|
+
const descriptor: CLICommandAssetDescriptor = {
|
|
4
|
+
kind: 'cli/command',
|
|
5
|
+
id: 'profile.info',
|
|
6
|
+
name: 'info',
|
|
7
|
+
description: 'Show profile information',
|
|
8
|
+
group: 'profile',
|
|
9
|
+
arguments: [
|
|
10
|
+
{
|
|
11
|
+
name: 'name',
|
|
12
|
+
description: 'Profile name (defaults to active profile)',
|
|
13
|
+
required: false
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
examples: [
|
|
17
|
+
{ command: 'vibes profile info', description: 'Show info for the active profile' },
|
|
18
|
+
{ command: 'vibes profile info work', description: 'Show info for the "work" profile' }
|
|
19
|
+
],
|
|
20
|
+
surfaces: ['cli'],
|
|
21
|
+
hardware: ['consumer'],
|
|
22
|
+
enabled: true
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default descriptor;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Info Implementation
|
|
3
|
+
*
|
|
4
|
+
* Shows details about a specific profile or the active one.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { existsSync } from 'node:fs';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import {
|
|
10
|
+
getProfilesDir,
|
|
11
|
+
getActiveProfile,
|
|
12
|
+
profileExists,
|
|
13
|
+
validateProfileName,
|
|
14
|
+
GREEN,
|
|
15
|
+
RED,
|
|
16
|
+
GRAY,
|
|
17
|
+
BOLD,
|
|
18
|
+
RESET,
|
|
19
|
+
log
|
|
20
|
+
} from './_utils';
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
async execute(args: Record<string, unknown>): Promise<void> {
|
|
24
|
+
const name = (args.name as string | undefined) ?? getActiveProfile();
|
|
25
|
+
|
|
26
|
+
log('');
|
|
27
|
+
log(`${BOLD}vibes profile info${RESET}`);
|
|
28
|
+
log(`${'─'.repeat(40)}`);
|
|
29
|
+
|
|
30
|
+
if (!name) {
|
|
31
|
+
log(` ${GRAY}No active profile${RESET}`);
|
|
32
|
+
log('');
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
validateProfileName(name);
|
|
37
|
+
|
|
38
|
+
const dir = getProfilesDir();
|
|
39
|
+
const path = join(dir, name);
|
|
40
|
+
const exists = profileExists(name);
|
|
41
|
+
const active = getActiveProfile();
|
|
42
|
+
const isActive = name === active;
|
|
43
|
+
|
|
44
|
+
log(` Name: ${BOLD}${name}${RESET}`);
|
|
45
|
+
log(` Path: ${GRAY}${path}${RESET}`);
|
|
46
|
+
log(` Exists: ${exists ? `${GREEN}✓${RESET} yes` : `${RED}✗${RESET} no`}`);
|
|
47
|
+
log(` Active: ${isActive ? `${GREEN}✓${RESET} yes` : `${GRAY}no${RESET}`}`);
|
|
48
|
+
|
|
49
|
+
log('');
|
|
50
|
+
}
|
|
51
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CLICommandAssetDescriptor } from '../../schemas/descriptors';
|
|
2
|
+
|
|
3
|
+
const descriptor: CLICommandAssetDescriptor = {
|
|
4
|
+
kind: 'cli/command',
|
|
5
|
+
id: 'profile.list',
|
|
6
|
+
name: 'list',
|
|
7
|
+
description: 'List all profiles',
|
|
8
|
+
group: 'profile',
|
|
9
|
+
arguments: [],
|
|
10
|
+
examples: [
|
|
11
|
+
{ command: 'vibes profile list', description: 'Show all profiles with active indicator' }
|
|
12
|
+
],
|
|
13
|
+
surfaces: ['cli'],
|
|
14
|
+
hardware: ['consumer'],
|
|
15
|
+
enabled: true
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default descriptor;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile List Implementation
|
|
3
|
+
*
|
|
4
|
+
* Scans ~/.vibes/profile/ and lists each profile, highlighting the active one.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { existsSync } from 'node:fs';
|
|
8
|
+
import {
|
|
9
|
+
getProfilesDir,
|
|
10
|
+
getActiveProfile,
|
|
11
|
+
listProfiles,
|
|
12
|
+
GREEN,
|
|
13
|
+
GRAY,
|
|
14
|
+
BOLD,
|
|
15
|
+
RESET,
|
|
16
|
+
log
|
|
17
|
+
} from './_utils';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
async execute(): Promise<void> {
|
|
21
|
+
const dir = getProfilesDir();
|
|
22
|
+
const active = getActiveProfile();
|
|
23
|
+
|
|
24
|
+
log('');
|
|
25
|
+
log(`${BOLD}vibes profile list${RESET}`);
|
|
26
|
+
log(`${'─'.repeat(40)}`);
|
|
27
|
+
|
|
28
|
+
if (!existsSync(dir)) {
|
|
29
|
+
log(` ${GRAY}~/.vibes/profile/ does not exist${RESET}`);
|
|
30
|
+
log('');
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const profiles = listProfiles();
|
|
35
|
+
if (profiles.length === 0) {
|
|
36
|
+
log(` ${GRAY}No profiles found${RESET}`);
|
|
37
|
+
} else {
|
|
38
|
+
for (const name of profiles) {
|
|
39
|
+
const marker = name === active ? ` ${GREEN}[active]${RESET}` : '';
|
|
40
|
+
log(` ${GREEN}✓${RESET} ${name}${marker}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
log('');
|
|
45
|
+
}
|
|
46
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CLICommandAssetDescriptor } from '../../schemas/descriptors';
|
|
2
|
+
|
|
3
|
+
const descriptor: CLICommandAssetDescriptor = {
|
|
4
|
+
kind: 'cli/command',
|
|
5
|
+
id: 'profile.use',
|
|
6
|
+
name: 'use',
|
|
7
|
+
description: 'Print shell export statement to activate a profile',
|
|
8
|
+
group: 'profile',
|
|
9
|
+
arguments: [
|
|
10
|
+
{
|
|
11
|
+
name: 'name',
|
|
12
|
+
description: 'Name of the profile to activate',
|
|
13
|
+
required: true
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
examples: [
|
|
17
|
+
{ command: 'vibes profile use work', description: 'Print export for the "work" profile' },
|
|
18
|
+
{ command: 'eval "$(vibes profile use work)"', description: 'Activate profile in current shell' }
|
|
19
|
+
],
|
|
20
|
+
surfaces: ['cli'],
|
|
21
|
+
hardware: ['consumer'],
|
|
22
|
+
enabled: true
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default descriptor;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Use Implementation
|
|
3
|
+
*
|
|
4
|
+
* Prints the shell export statement for activating a profile.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
profileExists,
|
|
9
|
+
validateProfileName,
|
|
10
|
+
GREEN,
|
|
11
|
+
RED,
|
|
12
|
+
GRAY,
|
|
13
|
+
BOLD,
|
|
14
|
+
RESET,
|
|
15
|
+
log
|
|
16
|
+
} from './_utils';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
async execute(args: Record<string, unknown>): Promise<void> {
|
|
20
|
+
const name = args.name as string;
|
|
21
|
+
if (!name) {
|
|
22
|
+
log(`${RED}✗${RESET} Profile name is required`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
validateProfileName(name);
|
|
27
|
+
|
|
28
|
+
if (!profileExists(name)) {
|
|
29
|
+
log(`${RED}✗${RESET} Profile does not exist: ${BOLD}${name}${RESET}`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
process.stdout.write(`export VIBES_PROFILE=${name}\n`);
|
|
34
|
+
process.stderr.write(
|
|
35
|
+
`\n${GRAY}# Add this to your shell rc file to make it persistent:${RESET}\n` +
|
|
36
|
+
`${GRAY}# echo 'export VIBES_PROFILE=${name}' >> ~/.zshrc${RESET}\n`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRuntimeLogger } from '@vibesdotdev/logging/core';
|
|
2
|
+
|
|
3
|
+
export function createRuntimeCliLogger(command: string) {
|
|
4
|
+
return createRuntimeLogger({
|
|
5
|
+
namespace: `runtime.cli.${command}`,
|
|
6
|
+
runtime: 'cli',
|
|
7
|
+
staticMetadata: {
|
|
8
|
+
service: 'runtime-cli',
|
|
9
|
+
command
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function formatError(error: unknown): { error: string; stack?: string } {
|
|
15
|
+
if (error instanceof Error) {
|
|
16
|
+
return {
|
|
17
|
+
error: error.message,
|
|
18
|
+
...(error.stack ? { stack: error.stack } : {})
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return { error: String(error) };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function formatCliOutput(message: string): void {
|
|
26
|
+
process.stdout.write(`${message}\n`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function formatCliError(message: string): void {
|
|
30
|
+
process.stderr.write(`${message}\n`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function formatCliDetail(id: string, issue: string): void {
|
|
34
|
+
formatCliOutput(` - ${id}: ${issue}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function formatCliSection(title: string): void {
|
|
38
|
+
formatCliOutput('');
|
|
39
|
+
formatCliOutput(title);
|
|
40
|
+
formatCliOutput('-'.repeat(title.length));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function formatCliSubsection(title: string): void {
|
|
44
|
+
formatCliOutput('');
|
|
45
|
+
formatCliOutput(` ${title}`);
|
|
46
|
+
formatCliOutput(' ' + '-'.repeat(title.length));
|
|
47
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createRuntimeAsset } from '@vibesdotdev/runtime';
|
|
2
|
+
|
|
3
|
+
export const runtimeCodegenCommandDescriptor = createRuntimeAsset({
|
|
4
|
+
id: 'runtime-codegen',
|
|
5
|
+
kind: 'cli/command',
|
|
6
|
+
name: 'codegen',
|
|
7
|
+
description: 'Generate static runtime loader for compiled binaries',
|
|
8
|
+
group: 'runtime',
|
|
9
|
+
arguments: [],
|
|
10
|
+
options: [
|
|
11
|
+
{
|
|
12
|
+
name: 'verbose',
|
|
13
|
+
description: 'Enable verbose logging',
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
short: 'v'
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createRuntimeImplementation } from '@vibesdotdev/runtime';
|
|
2
|
+
import type { Command } from 'commander';
|
|
3
|
+
import type { RuntimeContext } from '../../core/runtime/context.ts';
|
|
4
|
+
import { generate } from './codegen.ts';
|
|
5
|
+
|
|
6
|
+
export const runtimeCodegenCommandImpl = createRuntimeImplementation({
|
|
7
|
+
id: 'runtime-codegen',
|
|
8
|
+
kind: 'cli/command',
|
|
9
|
+
implementation: {
|
|
10
|
+
execute: async (args: Record<string, unknown>, opts: Record<string, unknown>) => {
|
|
11
|
+
// Create a mock command and context for the registration function. The mock only
|
|
12
|
+
// needs to satisfy the chained shape that `generate()` invokes; widening through
|
|
13
|
+
// `unknown` keeps the cast explicit rather than relying on `any`.
|
|
14
|
+
const mockCommand = {
|
|
15
|
+
command: () => ({
|
|
16
|
+
description: () => ({
|
|
17
|
+
option: () => ({
|
|
18
|
+
action: (handler: () => Promise<void>) => handler()
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
} as unknown as Command;
|
|
23
|
+
|
|
24
|
+
const mockContext = {
|
|
25
|
+
ui: {
|
|
26
|
+
success: (msg: string) => process.stdout.write(`✅ ${msg}\n`),
|
|
27
|
+
error: (msg: string) => {
|
|
28
|
+
process.stderr.write(`❌ ${msg}\n`);
|
|
29
|
+
throw new Error(msg);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
} as unknown as RuntimeContext;
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
await generate();
|
|
36
|
+
mockContext.ui.success('Runtime codegen completed successfully');
|
|
37
|
+
} catch (error) {
|
|
38
|
+
mockContext.ui.error(
|
|
39
|
+
`Runtime codegen failed: ${error instanceof Error ? error.message : String(error)}`
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Runtime Codegen Command
|
|
4
|
+
*
|
|
5
|
+
* Thin wrapper around the canonical runtime bundle codegen script.
|
|
6
|
+
* The script in /scripts is the single source of truth.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { Command } from 'commander';
|
|
10
|
+
import type { RuntimeContext } from '../../core/runtime/context.ts';
|
|
11
|
+
import { join, resolve } from 'node:path';
|
|
12
|
+
import { getLogger } from '../../logging.ts';
|
|
13
|
+
|
|
14
|
+
const logger = getLogger('runtime-codegen');
|
|
15
|
+
|
|
16
|
+
const ROOT_DIR = resolve(join(import.meta.dir, '../../../../../../'));
|
|
17
|
+
const CODEGEN_SCRIPT = join(ROOT_DIR, 'scripts/codegen-runtime-bundle.ts');
|
|
18
|
+
|
|
19
|
+
export interface RuntimeCodegenOptions {
|
|
20
|
+
scope?: string;
|
|
21
|
+
hardware?: string;
|
|
22
|
+
verbose?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function resolveBunBinary(): string {
|
|
26
|
+
const whichBun = typeof Bun.which === 'function' ? Bun.which('bun') : null;
|
|
27
|
+
if (whichBun) return whichBun;
|
|
28
|
+
return process.execPath || 'bun';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function runRuntimeCodegenScript(options: RuntimeCodegenOptions = {}): Promise<void> {
|
|
32
|
+
const scriptExists = await Bun.file(CODEGEN_SCRIPT).exists();
|
|
33
|
+
if (!scriptExists) {
|
|
34
|
+
throw new Error(`Runtime codegen script not found: ${CODEGEN_SCRIPT}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const args = [resolveBunBinary(), CODEGEN_SCRIPT];
|
|
38
|
+
if (options.scope) args.push(options.scope);
|
|
39
|
+
if (options.hardware) args.push(options.hardware);
|
|
40
|
+
|
|
41
|
+
const proc = Bun.spawn(args, {
|
|
42
|
+
cwd: ROOT_DIR,
|
|
43
|
+
stdout: 'inherit',
|
|
44
|
+
stderr: 'inherit',
|
|
45
|
+
stdin: 'inherit',
|
|
46
|
+
env: process.env
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const exitCode = await proc.exited;
|
|
50
|
+
if (exitCode !== 0) {
|
|
51
|
+
throw new Error(`Runtime codegen script failed with exit code ${exitCode}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export async function generate(options: RuntimeCodegenOptions = {}): Promise<void> {
|
|
56
|
+
await runRuntimeCodegenScript(options);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function registerRuntimeCodegenCommand(
|
|
60
|
+
parent: Command,
|
|
61
|
+
context: RuntimeContext
|
|
62
|
+
): Promise<void> {
|
|
63
|
+
parent
|
|
64
|
+
.command('codegen')
|
|
65
|
+
.description('Generate static runtime loader for compiled binaries')
|
|
66
|
+
.option('-v, --verbose', 'Enable verbose logging')
|
|
67
|
+
.option('--scope <scope>', 'Filter generated bundle by runtime surface scope')
|
|
68
|
+
.option('--hardware <hardware>', 'Filter generated bundle by runtime hardware')
|
|
69
|
+
.action(async (options: RuntimeCodegenOptions) => {
|
|
70
|
+
if (options.verbose) {
|
|
71
|
+
logger.info('Running runtime codegen script...');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
await generate(options);
|
|
76
|
+
context.ui.success('Runtime codegen completed successfully');
|
|
77
|
+
} catch (error) {
|
|
78
|
+
context.ui.error(
|
|
79
|
+
`Runtime codegen failed: ${error instanceof Error ? error.message : String(error)}`
|
|
80
|
+
);
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { RuntimeContext } from '../../core/runtime/context.ts';
|
|
3
|
+
import { registerRuntimeCodegenCommand } from './codegen.ts';
|
|
4
|
+
|
|
5
|
+
export async function registerRuntimeCommands(
|
|
6
|
+
parent: Command,
|
|
7
|
+
context: RuntimeContext
|
|
8
|
+
): Promise<void> {
|
|
9
|
+
// Create the runtime command group
|
|
10
|
+
const runtimeCmd = parent.command('runtime').description('Runtime management commands');
|
|
11
|
+
|
|
12
|
+
// Register the codegen subcommand
|
|
13
|
+
await registerRuntimeCodegenCommand(runtimeCmd, context);
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CLIGroupAssetDescriptor } from '../../schemas/descriptors';
|
|
2
|
+
|
|
3
|
+
const descriptor: CLIGroupAssetDescriptor = {
|
|
4
|
+
kind: 'cli/group',
|
|
5
|
+
id: 'runtime',
|
|
6
|
+
name: 'runtime',
|
|
7
|
+
description: 'Runtime management commands',
|
|
8
|
+
order: 50,
|
|
9
|
+
enabled: true
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default descriptor;
|
package/src/config.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CLI config contract for `vibes.config.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the canonical `VibesAppConfig` from `@vibesdotdev/runtime/config`
|
|
5
|
+
* and provides a typed `defineConfig` helper for editor autocomplete in
|
|
6
|
+
* project-level configs.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export type { VibesAppConfig, PluginsConfig } from '@vibesdotdev/runtime/config';
|
|
10
|
+
|
|
11
|
+
import type { VibesAppConfig } from '@vibesdotdev/runtime/config';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Project config shape accepted by `defineConfig`. Plugin arrays may be
|
|
15
|
+
* empty, in which case the binary's `defaultPlugins` (statically imported
|
|
16
|
+
* by the wrapper) are used. Set this to override or extend that default.
|
|
17
|
+
*/
|
|
18
|
+
export type VibesConfig = Partial<VibesAppConfig>;
|
|
19
|
+
|
|
20
|
+
export function defineConfig(config: VibesConfig): VibesConfig {
|
|
21
|
+
return config;
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI core compatibility barrel.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export { getContext, setContext, type RuntimeContext } from './runtime/context.ts';
|
|
6
|
+
export type { Hook } from './runtime/hooks.ts';
|
|
7
|
+
export type { CLIContext } from '../providers.ts';
|
|
8
|
+
export type { CLIRuntimeContext, UIToolkit, CommandLayout } from './plugins/types.ts';
|
|
9
|
+
export type { IUIHandles } from './ui/interface.ts';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace Hook Compatibility API
|
|
3
|
+
*
|
|
4
|
+
* Legacy callers import register/get helpers from this module.
|
|
5
|
+
* It delegates to the compatibility namespace registry.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { getNamespaceRegistry } from './index';
|
|
9
|
+
import type { NamespaceDefinition, ConfigValue } from './schemas';
|
|
10
|
+
|
|
11
|
+
export async function registerNamespace(
|
|
12
|
+
_context: Record<string, ConfigValue>,
|
|
13
|
+
definition: NamespaceDefinition
|
|
14
|
+
): Promise<void> {
|
|
15
|
+
getNamespaceRegistry().register(definition);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function getNamespaceConfig<TConfig extends Record<string, ConfigValue>>(
|
|
19
|
+
_context: Record<string, ConfigValue>,
|
|
20
|
+
namespaceId: string
|
|
21
|
+
) {
|
|
22
|
+
return getNamespaceRegistry().getConfig<TConfig>(namespaceId);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { getNamespaceRegistry };
|