@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,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zsh Completion Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates zsh tab completion with full flag/argument support
|
|
5
|
+
* and integrates with zsh-autosuggestions for inline ghost-text.
|
|
6
|
+
*/
|
|
7
|
+
import { getWidgetCode } from './zsh-widget.js';
|
|
8
|
+
function esc(s) {
|
|
9
|
+
return s.replace(/'/g, "'\\''").replace(/\[/g, '\\[').replace(/\]/g, '\\]');
|
|
10
|
+
}
|
|
11
|
+
function optionSpec(opt) {
|
|
12
|
+
const desc = esc(opt.description);
|
|
13
|
+
const short = opt.short ? `-${opt.short}` : '';
|
|
14
|
+
const long = `--${opt.long}`;
|
|
15
|
+
const names = short ? `'(${short} ${long})'{${short},${long}}` : `${long}`;
|
|
16
|
+
const action = opt.choices
|
|
17
|
+
? `:(${opt.choices.join(' ')})`
|
|
18
|
+
: opt.takesValue
|
|
19
|
+
? `: :_default`
|
|
20
|
+
: '';
|
|
21
|
+
return ` ${names}'[${desc}]${action}'`;
|
|
22
|
+
}
|
|
23
|
+
function emitLeafFunction(node, fnName) {
|
|
24
|
+
const lines = [];
|
|
25
|
+
lines.push(`${fnName}() {`);
|
|
26
|
+
if (node.options.length === 0 && node.arguments.length === 0) {
|
|
27
|
+
lines.push(' _message "no more arguments"');
|
|
28
|
+
lines.push('}');
|
|
29
|
+
return lines;
|
|
30
|
+
}
|
|
31
|
+
lines.push(' _arguments -s \\');
|
|
32
|
+
for (const opt of node.options) {
|
|
33
|
+
lines.push(optionSpec(opt) + ' \\');
|
|
34
|
+
}
|
|
35
|
+
for (const arg of node.arguments) {
|
|
36
|
+
const desc = esc(arg.description);
|
|
37
|
+
const action = arg.choices ? `(${arg.choices.join(' ')})` : '_default';
|
|
38
|
+
const spec = arg.variadic
|
|
39
|
+
? `'*:${desc}:${action}'`
|
|
40
|
+
: arg.required
|
|
41
|
+
? `':${desc}:${action}'`
|
|
42
|
+
: `'::${desc}:${action}'`;
|
|
43
|
+
lines.push(` ${spec} \\`);
|
|
44
|
+
}
|
|
45
|
+
// Remove trailing backslash from last line
|
|
46
|
+
if (lines.length > 1) {
|
|
47
|
+
lines[lines.length - 1] = lines[lines.length - 1].replace(/ \\$/, '');
|
|
48
|
+
}
|
|
49
|
+
lines.push('}');
|
|
50
|
+
return lines;
|
|
51
|
+
}
|
|
52
|
+
function emitGroupFunction(node, fnName) {
|
|
53
|
+
const lines = [];
|
|
54
|
+
lines.push(`${fnName}() {`);
|
|
55
|
+
lines.push(' local line state');
|
|
56
|
+
lines.push(' _arguments -C \\');
|
|
57
|
+
for (const opt of node.options) {
|
|
58
|
+
lines.push(optionSpec(opt) + ' \\');
|
|
59
|
+
}
|
|
60
|
+
lines.push(` "1: :${fnName}_cmds" \\`);
|
|
61
|
+
lines.push(' "*::arg:->args"');
|
|
62
|
+
lines.push(' case "$state" in');
|
|
63
|
+
lines.push(' args)');
|
|
64
|
+
lines.push(' case "$line[1]" in');
|
|
65
|
+
for (const child of node.children) {
|
|
66
|
+
const childFn = `${fnName}_${child.name.replace(/-/g, '_')}`;
|
|
67
|
+
lines.push(` ${child.name}) ${childFn} ;;`);
|
|
68
|
+
for (const alias of child.aliases) {
|
|
69
|
+
lines.push(` ${alias}) ${childFn} ;;`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
lines.push(' esac');
|
|
73
|
+
lines.push(' ;;');
|
|
74
|
+
lines.push(' esac');
|
|
75
|
+
lines.push('}');
|
|
76
|
+
lines.push('');
|
|
77
|
+
// Subcommand list function
|
|
78
|
+
lines.push(`${fnName}_cmds() {`);
|
|
79
|
+
lines.push(' local -a subcmds');
|
|
80
|
+
lines.push(' subcmds=(');
|
|
81
|
+
for (const child of node.children) {
|
|
82
|
+
const desc = esc(child.description);
|
|
83
|
+
lines.push(` '${child.name}:${desc}'`);
|
|
84
|
+
for (const alias of child.aliases) {
|
|
85
|
+
lines.push(` '${alias}:${desc}'`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
lines.push(' )');
|
|
89
|
+
lines.push(" _describe -t commands 'commands' subcmds");
|
|
90
|
+
lines.push('}');
|
|
91
|
+
return lines;
|
|
92
|
+
}
|
|
93
|
+
function emitAll(node, fnName) {
|
|
94
|
+
const lines = [];
|
|
95
|
+
if (node.children.length > 0) {
|
|
96
|
+
lines.push(...emitGroupFunction(node, fnName));
|
|
97
|
+
lines.push('');
|
|
98
|
+
for (const child of node.children) {
|
|
99
|
+
const childFn = `${fnName}_${child.name.replace(/-/g, '_')}`;
|
|
100
|
+
lines.push(...emitAll(child, childFn));
|
|
101
|
+
lines.push('');
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
lines.push(...emitLeafFunction(node, fnName));
|
|
106
|
+
}
|
|
107
|
+
return lines;
|
|
108
|
+
}
|
|
109
|
+
function collectPaths(node, prefix) {
|
|
110
|
+
const results = [];
|
|
111
|
+
for (const child of node.children) {
|
|
112
|
+
const cp = prefix ? `${prefix} ${child.name}` : child.name;
|
|
113
|
+
results.push(cp);
|
|
114
|
+
for (const alias of child.aliases) {
|
|
115
|
+
results.push(prefix ? `${prefix} ${alias}` : alias);
|
|
116
|
+
}
|
|
117
|
+
if (child.children.length > 0) {
|
|
118
|
+
results.push(...collectPaths(child, cp));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return results;
|
|
122
|
+
}
|
|
123
|
+
export function generateZshCompletion(tree) {
|
|
124
|
+
const completionPaths = collectPaths(tree, '').sort();
|
|
125
|
+
const completionPathsStr = completionPaths.map((p) => ` "${p}"`).join('\n');
|
|
126
|
+
const parts = [
|
|
127
|
+
'#compdef vibes',
|
|
128
|
+
'# vibes zsh completion — generated by vibes completion zsh',
|
|
129
|
+
'# Install: vibes completion zsh --install',
|
|
130
|
+
'',
|
|
131
|
+
'# ── Tab Completion (commands, flags, arguments) ──',
|
|
132
|
+
''
|
|
133
|
+
];
|
|
134
|
+
parts.push(...emitAll(tree, '_vibes'));
|
|
135
|
+
parts.push('');
|
|
136
|
+
parts.push('compdef _vibes vibes');
|
|
137
|
+
parts.push('');
|
|
138
|
+
parts.push('# ── Autosuggestion paths (used by zsh-autosuggestions strategy) ──');
|
|
139
|
+
parts.push('typeset -ga _VIBES_SUGGEST_PATHS=(');
|
|
140
|
+
parts.push(completionPathsStr);
|
|
141
|
+
parts.push(')');
|
|
142
|
+
parts.push('');
|
|
143
|
+
parts.push(getWidgetCode());
|
|
144
|
+
return parts.join('\n') + '\n';
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=zsh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zsh.js","sourceRoot":"","sources":["../../../src/commands/completion/zsh.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,SAAS,GAAG,CAAC,CAAS;IACrB,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE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QAChB,4DAA4D;QAC5D,2CAA2C;QAC3C,EAAE;QACF,qDAAqD;QACrD,EAAE;KACF,CAAC;IAEF,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IACvC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACnC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,KAAK,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;IAClF,KAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;IACjD,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC/B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAE5B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile command utilities
|
|
3
|
+
*
|
|
4
|
+
* Shared helpers for scanning profile directories and formatting output.
|
|
5
|
+
* Uses node built-ins only to avoid circular dependencies.
|
|
6
|
+
*/
|
|
7
|
+
export declare const GREEN = "\u001B[32m";
|
|
8
|
+
export declare const GRAY = "\u001B[90m";
|
|
9
|
+
export declare const YELLOW = "\u001B[33m";
|
|
10
|
+
export declare const RED = "\u001B[31m";
|
|
11
|
+
export declare const BOLD = "\u001B[1m";
|
|
12
|
+
export declare const RESET = "\u001B[0m";
|
|
13
|
+
export declare function validateProfileName(name: string): string;
|
|
14
|
+
export declare function getProfilesDir(): string;
|
|
15
|
+
export declare function getActiveProfile(): string | undefined;
|
|
16
|
+
export declare function listProfiles(): string[];
|
|
17
|
+
export declare function profileExists(name: string): boolean;
|
|
18
|
+
export declare function createProfileDir(name: string): void;
|
|
19
|
+
export declare function deleteProfileDir(name: string): void;
|
|
20
|
+
export declare function log(msg: string): void;
|
|
21
|
+
//# sourceMappingURL=_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_utils.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/_utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,eAAO,MAAM,KAAK,eAAa,CAAC;AAChC,eAAO,MAAM,IAAI,eAAa,CAAC;AAC/B,eAAO,MAAM,MAAM,eAAa,CAAC;AACjC,eAAO,MAAM,GAAG,eAAa,CAAC;AAC9B,eAAO,MAAM,IAAI,cAAY,CAAC;AAC9B,eAAO,MAAM,KAAK,cAAY,CAAC;AAI/B,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAaxD;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAErD;AAED,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAOvC;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKnD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAErC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile command utilities
|
|
3
|
+
*
|
|
4
|
+
* Shared helpers for scanning profile directories and formatting output.
|
|
5
|
+
* Uses node built-ins only to avoid circular dependencies.
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, readdirSync, statSync, mkdirSync, rmSync } from 'node:fs';
|
|
8
|
+
import { homedir } from 'node:os';
|
|
9
|
+
import { join } from 'node:path';
|
|
10
|
+
import { getRuntimeEnv } from '@vibesdotdev/runtime';
|
|
11
|
+
export const GREEN = '\x1b[32m';
|
|
12
|
+
export const GRAY = '\x1b[90m';
|
|
13
|
+
export const YELLOW = '\x1b[33m';
|
|
14
|
+
export const RED = '\x1b[31m';
|
|
15
|
+
export const BOLD = '\x1b[1m';
|
|
16
|
+
export const RESET = '\x1b[0m';
|
|
17
|
+
const VALID_PROFILE_NAME = /^[a-zA-Z0-9._-]+$/;
|
|
18
|
+
export function validateProfileName(name) {
|
|
19
|
+
if (!name || typeof name !== 'string') {
|
|
20
|
+
throw new Error('Profile name is required');
|
|
21
|
+
}
|
|
22
|
+
if (name.length > 64) {
|
|
23
|
+
throw new Error('Profile name must be 64 characters or fewer');
|
|
24
|
+
}
|
|
25
|
+
if (!VALID_PROFILE_NAME.test(name)) {
|
|
26
|
+
throw new Error('Profile name may only contain letters, numbers, dots, hyphens, and underscores');
|
|
27
|
+
}
|
|
28
|
+
return name;
|
|
29
|
+
}
|
|
30
|
+
export function getProfilesDir() {
|
|
31
|
+
return join(homedir(), '.vibes', 'profile');
|
|
32
|
+
}
|
|
33
|
+
export function getActiveProfile() {
|
|
34
|
+
return getRuntimeEnv('VIBES_PROFILE') || getRuntimeEnv('VIBES_PROFILE_NAME') || undefined;
|
|
35
|
+
}
|
|
36
|
+
export function listProfiles() {
|
|
37
|
+
const dir = getProfilesDir();
|
|
38
|
+
if (!existsSync(dir))
|
|
39
|
+
return [];
|
|
40
|
+
return readdirSync(dir).filter((name) => {
|
|
41
|
+
const full = join(dir, name);
|
|
42
|
+
return statSync(full).isDirectory();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export function profileExists(name) {
|
|
46
|
+
const path = join(getProfilesDir(), name);
|
|
47
|
+
return existsSync(path) && statSync(path).isDirectory();
|
|
48
|
+
}
|
|
49
|
+
export function createProfileDir(name) {
|
|
50
|
+
const base = join(getProfilesDir(), name);
|
|
51
|
+
for (const sub of ['config', 'data', 'cache', 'logs']) {
|
|
52
|
+
mkdirSync(join(base, sub), { recursive: true });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export function deleteProfileDir(name) {
|
|
56
|
+
rmSync(join(getProfilesDir(), name), { recursive: true, force: true });
|
|
57
|
+
}
|
|
58
|
+
export function log(msg) {
|
|
59
|
+
process.stderr.write(msg + '\n');
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=_utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_utils.js","sourceRoot":"","sources":["../../../src/commands/profile/_utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC;AAChC,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC;AACjC,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAAC;AAC9B,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAC9B,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC;AAE/B,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAE/C,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC/C,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,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D,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;AACF,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC5C,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,GAAW;IAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-group.descriptor.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile-group.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,QAAA,MAAM,UAAU,EAAE,uBASjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const descriptor = {
|
|
2
|
+
kind: 'cli/group',
|
|
3
|
+
id: 'profile',
|
|
4
|
+
name: 'profile',
|
|
5
|
+
description: 'Manage vibes profiles (isolated config/data environments)',
|
|
6
|
+
order: 100,
|
|
7
|
+
surfaces: ['cli'],
|
|
8
|
+
hardware: ['consumer'],
|
|
9
|
+
enabled: true
|
|
10
|
+
};
|
|
11
|
+
export default descriptor;
|
|
12
|
+
//# sourceMappingURL=profile-group.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-group.descriptor.js","sourceRoot":"","sources":["../../../src/commands/profile/profile-group.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAA4B;IAC3C,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,2DAA2D;IACxE,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.create.descriptor.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.create.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,QAAA,MAAM,UAAU,EAAE,yBAmBjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const descriptor = {
|
|
2
|
+
kind: 'cli/command',
|
|
3
|
+
id: 'profile.create',
|
|
4
|
+
name: 'create',
|
|
5
|
+
description: 'Create a new profile',
|
|
6
|
+
group: 'profile',
|
|
7
|
+
arguments: [
|
|
8
|
+
{
|
|
9
|
+
name: 'name',
|
|
10
|
+
description: 'Name of the profile to create',
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
examples: [
|
|
15
|
+
{ command: 'vibes profile create work', description: 'Create a new profile named "work"' }
|
|
16
|
+
],
|
|
17
|
+
surfaces: ['cli'],
|
|
18
|
+
hardware: ['consumer'],
|
|
19
|
+
enabled: true
|
|
20
|
+
};
|
|
21
|
+
export default descriptor;
|
|
22
|
+
//# sourceMappingURL=profile.create.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.create.descriptor.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.create.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAA8B;IAC7C,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,sBAAsB;IACnC,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE;QACV;YACC,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACd;KACD;IACD,QAAQ,EAAE;QACT,EAAE,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,mCAAmC,EAAE;KAC1F;IACD,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Create Implementation
|
|
3
|
+
*
|
|
4
|
+
* Creates ~/.vibes/profile/{name}/ along with config/, data/, cache/, logs/.
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: {
|
|
7
|
+
execute(args: Record<string, unknown>): Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=profile.create.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.create.impl.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.create.impl.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;kBAgBkB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;;AAD5D,wBAwBE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Create Implementation
|
|
3
|
+
*
|
|
4
|
+
* Creates ~/.vibes/profile/{name}/ along with config/, data/, cache/, logs/.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
import { getProfilesDir, profileExists, createProfileDir, validateProfileName, GREEN, RED, BOLD, RESET, log } from './_utils.js';
|
|
8
|
+
export default {
|
|
9
|
+
async execute(args) {
|
|
10
|
+
const name = args.name;
|
|
11
|
+
if (!name) {
|
|
12
|
+
log(`${RED}✗${RESET} Profile name is required`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
validateProfileName(name);
|
|
16
|
+
log('');
|
|
17
|
+
log(`${BOLD}vibes profile create${RESET} ${name}`);
|
|
18
|
+
log(`${'─'.repeat(40)}`);
|
|
19
|
+
if (profileExists(name)) {
|
|
20
|
+
log(` ${RED}✗${RESET} Profile already exists: ${BOLD}${name}${RESET}`);
|
|
21
|
+
log('');
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
createProfileDir(name);
|
|
25
|
+
log(` ${GREEN}✓${RESET} Created profile ${BOLD}${name}${RESET}`);
|
|
26
|
+
log('');
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=profile.create.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.create.impl.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.create.impl.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EACN,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,GAAG,EACH,IAAI,EACJ,KAAK,EACL,GAAG,EACH,MAAM,UAAU,CAAC;AAElB,eAAe;IACd,KAAK,CAAC,OAAO,CAAC,IAA6B;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;QACjC,IAAI,CAAC,IAAI,EAAE,CAAC;YACX,GAAG,CAAC,GAAG,GAAG,IAAI,KAAK,2BAA2B,CAAC,CAAC;YAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;QAED,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE1B,GAAG,CAAC,EAAE,CAAC,CAAC;QACR,GAAG,CAAC,GAAG,IAAI,uBAAuB,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC;QACnD,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAEzB,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,GAAG,CAAC,KAAK,GAAG,IAAI,KAAK,4BAA4B,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC;YACxE,GAAG,CAAC,EAAE,CAAC,CAAC;YACR,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;QAED,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACvB,GAAG,CAAC,KAAK,KAAK,IAAI,KAAK,oBAAoB,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC;QAClE,GAAG,CAAC,EAAE,CAAC,CAAC;IACT,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.delete.descriptor.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.delete.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,QAAA,MAAM,UAAU,EAAE,yBA0BjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const descriptor = {
|
|
2
|
+
kind: 'cli/command',
|
|
3
|
+
id: 'profile.delete',
|
|
4
|
+
name: 'delete',
|
|
5
|
+
description: 'Delete a profile',
|
|
6
|
+
group: 'profile',
|
|
7
|
+
arguments: [
|
|
8
|
+
{
|
|
9
|
+
name: 'name',
|
|
10
|
+
description: 'Name of the profile to delete',
|
|
11
|
+
required: true
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
flags: '--force',
|
|
17
|
+
description: 'Skip confirmation prompt'
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
examples: [
|
|
21
|
+
{ command: 'vibes profile delete work', description: 'Delete the "work" profile with confirmation' },
|
|
22
|
+
{ command: 'vibes profile delete work --force', description: 'Delete without confirmation' }
|
|
23
|
+
],
|
|
24
|
+
surfaces: ['cli'],
|
|
25
|
+
hardware: ['consumer'],
|
|
26
|
+
enabled: true
|
|
27
|
+
};
|
|
28
|
+
export default descriptor;
|
|
29
|
+
//# sourceMappingURL=profile.delete.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.delete.descriptor.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.delete.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAA8B;IAC7C,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kBAAkB;IAC/B,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE;QACV;YACC,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACd;KACD;IACD,OAAO,EAAE;QACR;YACC,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,0BAA0B;SACvC;KACD;IACD,QAAQ,EAAE;QACT,EAAE,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,6CAA6C,EAAE;QACpG,EAAE,OAAO,EAAE,mCAAmC,EAAE,WAAW,EAAE,6BAA6B,EAAE;KAC5F;IACD,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
declare const _default: {
|
|
8
|
+
execute(args: Record<string, unknown>, opts: Record<string, unknown>): Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=profile.delete.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.delete.impl.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.delete.impl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;kBAiBK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QACvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,OAAO,CAAC,IAAI,CAAC;;AAJjB,wBAkDE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
import { createInterface } from 'node:readline/promises';
|
|
8
|
+
import { getActiveProfile, profileExists, deleteProfileDir, validateProfileName, GREEN, RED, BOLD, RESET, log } from './_utils.js';
|
|
9
|
+
export default {
|
|
10
|
+
async execute(args, opts) {
|
|
11
|
+
const name = args.name;
|
|
12
|
+
const force = opts.force === true;
|
|
13
|
+
if (!name) {
|
|
14
|
+
log(`${RED}✗${RESET} Profile name is required`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
validateProfileName(name);
|
|
18
|
+
log('');
|
|
19
|
+
log(`${BOLD}vibes profile delete${RESET} ${name}`);
|
|
20
|
+
log(`${'─'.repeat(40)}`);
|
|
21
|
+
if (!profileExists(name)) {
|
|
22
|
+
log(` ${RED}✗${RESET} Profile does not exist: ${BOLD}${name}${RESET}`);
|
|
23
|
+
log('');
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
const active = getActiveProfile();
|
|
27
|
+
if (name === active) {
|
|
28
|
+
log(` ${RED}✗${RESET} Cannot delete the currently active profile: ${BOLD}${name}${RESET}`);
|
|
29
|
+
log('');
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
if (!force) {
|
|
33
|
+
const rl = createInterface({
|
|
34
|
+
input: process.stdin,
|
|
35
|
+
output: process.stdout
|
|
36
|
+
});
|
|
37
|
+
const answer = await rl.question(` Delete profile "${name}"? [y/N] `);
|
|
38
|
+
rl.close();
|
|
39
|
+
if (answer.trim().toLowerCase() !== 'y') {
|
|
40
|
+
log(` ${RED}✗${RESET} Cancelled`);
|
|
41
|
+
log('');
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
deleteProfileDir(name);
|
|
46
|
+
log(` ${GREEN}✓${RESET} Deleted profile ${BOLD}${name}${RESET}`);
|
|
47
|
+
log('');
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=profile.delete.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.delete.impl.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.delete.impl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,GAAG,EACH,IAAI,EACJ,KAAK,EACL,GAAG,EACH,MAAM,UAAU,CAAC;AAElB,eAAe;IACd,KAAK,CAAC,OAAO,CACZ,IAA6B,EAC7B,IAA6B;QAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC;QAElC,IAAI,CAAC,IAAI,EAAE,CAAC;YACX,GAAG,CAAC,GAAG,GAAG,IAAI,KAAK,2BAA2B,CAAC,CAAC;YAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;QAED,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE1B,GAAG,CAAC,EAAE,CA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GAAG,CAAC,KAAK,KAAK,IAAI,KAAK,oBAAoB,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC;QAClE,GAAG,CAAC,EAAE,CAAC,CAAC;IACT,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.info.descriptor.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.info.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,QAAA,MAAM,UAAU,EAAE,yBAoBjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const descriptor = {
|
|
2
|
+
kind: 'cli/command',
|
|
3
|
+
id: 'profile.info',
|
|
4
|
+
name: 'info',
|
|
5
|
+
description: 'Show profile information',
|
|
6
|
+
group: 'profile',
|
|
7
|
+
arguments: [
|
|
8
|
+
{
|
|
9
|
+
name: 'name',
|
|
10
|
+
description: 'Profile name (defaults to active profile)',
|
|
11
|
+
required: false
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
examples: [
|
|
15
|
+
{ command: 'vibes profile info', description: 'Show info for the active profile' },
|
|
16
|
+
{ command: 'vibes profile info work', description: 'Show info for the "work" profile' }
|
|
17
|
+
],
|
|
18
|
+
surfaces: ['cli'],
|
|
19
|
+
hardware: ['consumer'],
|
|
20
|
+
enabled: true
|
|
21
|
+
};
|
|
22
|
+
export default descriptor;
|
|
23
|
+
//# sourceMappingURL=profile.info.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.info.descriptor.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.info.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAA8B;IAC7C,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,0BAA0B;IACvC,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE;QACV;YACC,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,2CAA2C;YACxD,QAAQ,EAAE,KAAK;SACf;KACD;IACD,QAAQ,EAAE;QACT,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,kCAAkC,EAAE;QAClF,EAAE,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,kCAAkC,EAAE;KACvF;IACD,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Info Implementation
|
|
3
|
+
*
|
|
4
|
+
* Shows details about a specific profile or the active one.
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: {
|
|
7
|
+
execute(args: Record<string, unknown>): Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=profile.info.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.info.impl.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.info.impl.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;kBAkBkB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;;AAD5D,wBA6BE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Info Implementation
|
|
3
|
+
*
|
|
4
|
+
* Shows details about a specific profile or the active one.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
import { getProfilesDir, getActiveProfile, profileExists, validateProfileName, GREEN, RED, GRAY, BOLD, RESET, log } from './_utils.js';
|
|
9
|
+
export default {
|
|
10
|
+
async execute(args) {
|
|
11
|
+
const name = args.name ?? getActiveProfile();
|
|
12
|
+
log('');
|
|
13
|
+
log(`${BOLD}vibes profile info${RESET}`);
|
|
14
|
+
log(`${'─'.repeat(40)}`);
|
|
15
|
+
if (!name) {
|
|
16
|
+
log(` ${GRAY}No active profile${RESET}`);
|
|
17
|
+
log('');
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
validateProfileName(name);
|
|
21
|
+
const dir = getProfilesDir();
|
|
22
|
+
const path = join(dir, name);
|
|
23
|
+
const exists = profileExists(name);
|
|
24
|
+
const active = getActiveProfile();
|
|
25
|
+
const isActive = name === active;
|
|
26
|
+
log(` Name: ${BOLD}${name}${RESET}`);
|
|
27
|
+
log(` Path: ${GRAY}${path}${RESET}`);
|
|
28
|
+
log(` Exists: ${exists ? `${GREEN}✓${RESET} yes` : `${RED}✗${RESET} no`}`);
|
|
29
|
+
log(` Active: ${isActive ? `${GREEN}✓${RESET} yes` : `${GRAY}no${RESET}`}`);
|
|
30
|
+
log('');
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=profile.info.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.info.impl.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.info.impl.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,KAAK,EACL,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,GAAG,EACH,MAAM,UAAU,CAAC;AAElB,eAAe;IACd,KAAK,CAAC,OAAO,CAAC,IAA6B;QAC1C,MAAM,IAAI,GAAI,IAAI,CAAC,IAA2B,IAAI,gBAAgB,EAAE,CAAC;QAErE,GAAG,CAAC,EAAE,CAAC,CAAC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,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,QAAA,MAAM,UAAU,EAAE,yBAajB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const descriptor = {
|
|
2
|
+
kind: 'cli/command',
|
|
3
|
+
id: 'profile.list',
|
|
4
|
+
name: 'list',
|
|
5
|
+
description: 'List all profiles',
|
|
6
|
+
group: 'profile',
|
|
7
|
+
arguments: [],
|
|
8
|
+
examples: [
|
|
9
|
+
{ command: 'vibes profile list', description: 'Show all profiles with active indicator' }
|
|
10
|
+
],
|
|
11
|
+
surfaces: ['cli'],
|
|
12
|
+
hardware: ['consumer'],
|
|
13
|
+
enabled: true
|
|
14
|
+
};
|
|
15
|
+
export default descriptor;
|
|
16
|
+
//# sourceMappingURL=profile.list.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.list.descriptor.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.list.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAA8B;IAC7C,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,mBAAmB;IAChC,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE;QACT,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,yCAAyC,EAAE;KACzF;IACD,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile List Implementation
|
|
3
|
+
*
|
|
4
|
+
* Scans ~/.vibes/profile/ and lists each profile, highlighting the active one.
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: {
|
|
7
|
+
execute(): Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=profile.list.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.list.impl.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.list.impl.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;eAee,OAAO,CAAC,IAAI,CAAC;;AAD/B,wBA2BE"}
|