@vibesdotdev/cli 0.0.1 → 1.0.0-rc.2
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/LICENSE +18 -0
- package/README.md +265 -24
- package/dist/boot/action-lifetime.d.ts +16 -0
- package/dist/boot/action-lifetime.d.ts.map +1 -0
- package/dist/boot/action-lifetime.js +80 -0
- package/dist/boot/action-lifetime.js.map +1 -0
- package/dist/boot/bootstrap.d.ts +190 -0
- package/dist/boot/bootstrap.d.ts.map +1 -0
- package/dist/boot/bootstrap.js +737 -0
- package/dist/boot/bootstrap.js.map +1 -0
- package/dist/boot/cli-flags.d.ts +45 -0
- package/dist/boot/cli-flags.d.ts.map +1 -0
- package/dist/boot/cli-flags.js +113 -0
- package/dist/boot/cli-flags.js.map +1 -0
- package/dist/boot/config.d.ts +25 -0
- package/dist/boot/config.d.ts.map +1 -0
- package/dist/{config.js → boot/config.js} +1 -1
- package/dist/boot/config.js.map +1 -0
- package/dist/boot/external-url.d.ts +13 -0
- package/dist/boot/external-url.d.ts.map +1 -0
- package/dist/boot/external-url.js +66 -0
- package/dist/boot/external-url.js.map +1 -0
- package/dist/boot/host-argv.d.ts +7 -0
- package/dist/boot/host-argv.d.ts.map +1 -0
- package/dist/boot/host-argv.js +8 -0
- package/dist/boot/host-argv.js.map +1 -0
- package/dist/boot/host-bootstrap.d.ts +37 -0
- package/dist/boot/host-bootstrap.d.ts.map +1 -0
- package/dist/boot/host-bootstrap.js +60 -0
- package/dist/boot/host-bootstrap.js.map +1 -0
- package/dist/boot/providers.d.ts +35 -0
- package/dist/boot/providers.d.ts.map +1 -0
- package/dist/boot/providers.js +155 -0
- package/dist/boot/providers.js.map +1 -0
- package/dist/boot/schemas/external-url.d.ts +11 -0
- package/dist/boot/schemas/external-url.d.ts.map +1 -0
- package/dist/boot/schemas/external-url.js +3 -0
- package/dist/boot/schemas/external-url.js.map +1 -0
- package/dist/boot/schemas/host-bootstrap.d.ts +7 -0
- package/dist/boot/schemas/host-bootstrap.d.ts.map +1 -0
- package/dist/boot/schemas/host-bootstrap.js +3 -0
- package/dist/boot/schemas/host-bootstrap.js.map +1 -0
- package/dist/boot/schemas/providers.d.ts +23 -0
- package/dist/boot/schemas/providers.d.ts.map +1 -0
- package/dist/boot/schemas/providers.js +3 -0
- package/dist/boot/schemas/providers.js.map +1 -0
- package/dist/boot/schemas/types.d.ts +4 -0
- package/dist/boot/schemas/types.d.ts.map +1 -0
- package/dist/{api → boot}/schemas/types.js.map +1 -1
- package/dist/boot/tui-plugin-policy.d.ts +8 -0
- package/dist/boot/tui-plugin-policy.d.ts.map +1 -0
- package/dist/boot/tui-plugin-policy.js +26 -0
- package/dist/boot/tui-plugin-policy.js.map +1 -0
- package/dist/boot/version.d.ts +13 -0
- package/dist/boot/version.d.ts.map +1 -0
- package/dist/boot/version.js +14 -0
- package/dist/boot/version.js.map +1 -0
- package/dist/bun/index.d.ts +2 -0
- package/dist/bun/index.d.ts.map +1 -0
- package/dist/bun/index.js +2 -0
- package/dist/bun/index.js.map +1 -0
- package/dist/bun/interactive-host.d.ts +9 -0
- package/dist/bun/interactive-host.d.ts.map +1 -0
- package/dist/bun/interactive-host.js +18 -0
- package/dist/bun/interactive-host.js.map +1 -0
- package/dist/commands/cli.kinds.d.ts +1239 -0
- package/dist/commands/cli.kinds.d.ts.map +1 -0
- package/dist/commands/cli.kinds.js +138 -0
- package/dist/commands/cli.kinds.js.map +1 -0
- package/dist/commands/cli.plugin.d.ts +22 -0
- package/dist/commands/cli.plugin.d.ts.map +1 -0
- package/dist/commands/cli.plugin.js +138 -0
- package/dist/commands/cli.plugin.js.map +1 -0
- package/dist/commands/completion/bash.d.ts +1 -1
- package/dist/commands/completion/bash.d.ts.map +1 -1
- package/dist/commands/completion/bash.impl.consumer.d.ts +6 -0
- package/dist/commands/completion/bash.impl.consumer.d.ts.map +1 -0
- package/dist/commands/completion/bash.impl.consumer.js +6 -0
- package/dist/commands/completion/bash.impl.consumer.js.map +1 -0
- package/dist/commands/completion/bash.js +4 -2
- package/dist/commands/completion/bash.js.map +1 -1
- package/dist/commands/completion/completion.consumer.plugin.d.ts +3 -0
- package/dist/commands/completion/completion.consumer.plugin.d.ts.map +1 -0
- package/dist/commands/completion/completion.consumer.plugin.js +19 -0
- package/dist/commands/completion/completion.consumer.plugin.js.map +1 -0
- package/dist/commands/completion/completion.descriptor.d.ts +1 -2
- package/dist/commands/completion/completion.descriptor.d.ts.map +1 -1
- package/dist/commands/completion/completion.descriptor.js +11 -4
- package/dist/commands/completion/completion.descriptor.js.map +1 -1
- package/dist/commands/completion/completion.descriptors.d.ts +3 -0
- package/dist/commands/completion/completion.descriptors.d.ts.map +1 -0
- package/dist/commands/completion/completion.descriptors.js +56 -0
- package/dist/commands/completion/completion.descriptors.js.map +1 -0
- package/dist/commands/completion/completion.impl.d.ts +5 -4
- package/dist/commands/completion/completion.impl.d.ts.map +1 -1
- package/dist/commands/completion/completion.impl.js +104 -145
- package/dist/commands/completion/completion.impl.js.map +1 -1
- package/dist/commands/completion/completion.install.impl.consumer.d.ts +4 -0
- package/dist/commands/completion/completion.install.impl.consumer.d.ts.map +1 -0
- package/dist/commands/completion/completion.install.impl.consumer.js +102 -0
- package/dist/commands/completion/completion.install.impl.consumer.js.map +1 -0
- package/dist/commands/completion/completion.kinds.d.ts +43 -0
- package/dist/commands/completion/completion.kinds.d.ts.map +1 -0
- package/dist/commands/completion/completion.kinds.js +17 -0
- package/dist/commands/completion/completion.kinds.js.map +1 -0
- package/dist/commands/completion/fig.d.ts +1 -1
- package/dist/commands/completion/fig.d.ts.map +1 -1
- package/dist/commands/completion/fig.impl.consumer.d.ts +6 -0
- package/dist/commands/completion/fig.impl.consumer.d.ts.map +1 -0
- package/dist/commands/completion/fig.impl.consumer.js +6 -0
- package/dist/commands/completion/fig.impl.consumer.js.map +1 -0
- package/dist/commands/completion/fish.d.ts +1 -1
- package/dist/commands/completion/fish.d.ts.map +1 -1
- package/dist/commands/completion/fish.impl.consumer.d.ts +6 -0
- package/dist/commands/completion/fish.impl.consumer.d.ts.map +1 -0
- package/dist/commands/completion/fish.impl.consumer.js +6 -0
- package/dist/commands/completion/fish.impl.consumer.js.map +1 -0
- package/dist/commands/completion/tree.d.ts +5 -26
- package/dist/commands/completion/tree.d.ts.map +1 -1
- package/dist/commands/completion/tree.js +26 -25
- package/dist/commands/completion/tree.js.map +1 -1
- package/dist/commands/completion/zsh-widget.js +4 -4
- package/dist/commands/completion/zsh.d.ts +1 -1
- package/dist/commands/completion/zsh.d.ts.map +1 -1
- package/dist/commands/completion/zsh.impl.consumer.d.ts +6 -0
- package/dist/commands/completion/zsh.impl.consumer.d.ts.map +1 -0
- package/dist/commands/completion/zsh.impl.consumer.js +6 -0
- package/dist/commands/completion/zsh.impl.consumer.js.map +1 -0
- package/dist/commands/completion/zsh.js +1 -1
- package/dist/commands/completion/zsh.js.map +1 -1
- package/dist/commands/docs/cli.commands.docs.descriptor.d.ts +8 -0
- package/dist/commands/docs/cli.commands.docs.descriptor.d.ts.map +1 -0
- package/dist/commands/docs/cli.commands.docs.descriptor.js +55 -0
- package/dist/commands/docs/cli.commands.docs.descriptor.js.map +1 -0
- package/dist/commands/docs/cli.docs.descriptor.d.ts +4 -0
- package/dist/commands/docs/cli.docs.descriptor.d.ts.map +1 -0
- package/dist/commands/docs/cli.docs.descriptor.js +44 -0
- package/dist/commands/docs/cli.docs.descriptor.js.map +1 -0
- package/dist/commands/docs/cli.groups.docs.descriptor.d.ts +4 -0
- package/dist/commands/docs/cli.groups.docs.descriptor.d.ts.map +1 -0
- package/dist/commands/docs/cli.groups.docs.descriptor.js +40 -0
- package/dist/commands/docs/cli.groups.docs.descriptor.js.map +1 -0
- package/dist/commands/docs/cli.output.docs.descriptor.d.ts +4 -0
- package/dist/commands/docs/cli.output.docs.descriptor.d.ts.map +1 -0
- package/dist/commands/docs/cli.output.docs.descriptor.js +45 -0
- package/dist/commands/docs/cli.output.docs.descriptor.js.map +1 -0
- package/dist/commands/docs/content/cli-commands.json +1 -0
- package/dist/commands/docs/content/cli-groups.json +1 -0
- package/dist/commands/docs/content/cli-output.json +1 -0
- package/dist/commands/docs/doc-paths.d.ts +11 -0
- package/dist/commands/docs/doc-paths.d.ts.map +1 -0
- package/dist/commands/docs/doc-paths.js +32 -0
- package/dist/commands/docs/doc-paths.js.map +1 -0
- package/dist/commands/docs/generate.d.ts +48 -0
- package/dist/commands/docs/generate.d.ts.map +1 -0
- package/dist/commands/docs/generate.js +121 -0
- package/dist/commands/docs/generate.js.map +1 -0
- package/dist/commands/docs/render-command.d.ts +5 -0
- package/dist/commands/docs/render-command.d.ts.map +1 -0
- package/dist/commands/docs/render-command.js +117 -0
- package/dist/commands/docs/render-command.js.map +1 -0
- package/dist/commands/docs/render-group.d.ts +5 -0
- package/dist/commands/docs/render-group.d.ts.map +1 -0
- package/dist/commands/docs/render-group.js +62 -0
- package/dist/commands/docs/render-group.js.map +1 -0
- package/dist/commands/docs/schemas/generate.d.ts +14 -0
- package/dist/commands/docs/schemas/generate.d.ts.map +1 -0
- package/dist/commands/docs/schemas/generate.js +3 -0
- package/dist/commands/docs/schemas/generate.js.map +1 -0
- package/dist/commands/output.d.ts +27 -0
- package/dist/commands/output.d.ts.map +1 -0
- package/dist/commands/output.js +104 -0
- package/dist/commands/output.js.map +1 -0
- package/dist/commands/profile/_utils.d.ts +34 -9
- package/dist/commands/profile/_utils.d.ts.map +1 -1
- package/dist/commands/profile/_utils.js +65 -37
- package/dist/commands/profile/_utils.js.map +1 -1
- package/dist/commands/profile/profile-env.d.ts +42 -0
- package/dist/commands/profile/profile-env.d.ts.map +1 -0
- package/dist/commands/profile/profile-env.js +56 -0
- package/dist/commands/profile/profile-env.js.map +1 -0
- package/dist/commands/profile/profile-group.descriptor.d.ts +1 -1
- package/dist/commands/profile/profile-group.descriptor.d.ts.map +1 -1
- package/dist/commands/profile/profile.create.descriptor.d.ts +1 -1
- package/dist/commands/profile/profile.create.descriptor.d.ts.map +1 -1
- package/dist/commands/profile/profile.create.descriptor.js +12 -1
- package/dist/commands/profile/profile.create.descriptor.js.map +1 -1
- package/dist/commands/profile/profile.create.impl.d.ts +2 -6
- package/dist/commands/profile/profile.create.impl.d.ts.map +1 -1
- package/dist/commands/profile/profile.create.impl.js +32 -9
- package/dist/commands/profile/profile.create.impl.js.map +1 -1
- package/dist/commands/profile/profile.delete.descriptor.d.ts +1 -1
- package/dist/commands/profile/profile.delete.descriptor.d.ts.map +1 -1
- package/dist/commands/profile/profile.delete.impl.d.ts +2 -7
- package/dist/commands/profile/profile.delete.impl.d.ts.map +1 -1
- package/dist/commands/profile/profile.delete.impl.js +33 -16
- package/dist/commands/profile/profile.delete.impl.js.map +1 -1
- package/dist/commands/profile/profile.environment.descriptor.d.ts +4 -0
- package/dist/commands/profile/profile.environment.descriptor.d.ts.map +1 -0
- package/dist/commands/profile/profile.environment.descriptor.js +26 -0
- package/dist/commands/profile/profile.environment.descriptor.js.map +1 -0
- package/dist/commands/profile/profile.environment.impl.d.ts +14 -0
- package/dist/commands/profile/profile.environment.impl.d.ts.map +1 -0
- package/dist/commands/profile/profile.environment.impl.js +33 -0
- package/dist/commands/profile/profile.environment.impl.js.map +1 -0
- package/dist/commands/profile/profile.info.descriptor.d.ts +1 -1
- package/dist/commands/profile/profile.info.descriptor.d.ts.map +1 -1
- package/dist/commands/profile/profile.info.descriptor.js +5 -1
- package/dist/commands/profile/profile.info.descriptor.js.map +1 -1
- package/dist/commands/profile/profile.info.impl.d.ts +5 -2
- package/dist/commands/profile/profile.info.impl.d.ts.map +1 -1
- package/dist/commands/profile/profile.info.impl.js +31 -14
- package/dist/commands/profile/profile.info.impl.js.map +1 -1
- package/dist/commands/profile/profile.list.descriptor.d.ts +1 -1
- package/dist/commands/profile/profile.list.descriptor.d.ts.map +1 -1
- package/dist/commands/profile/profile.list.descriptor.js +5 -1
- package/dist/commands/profile/profile.list.descriptor.js.map +1 -1
- package/dist/commands/profile/profile.list.impl.d.ts +17 -2
- package/dist/commands/profile/profile.list.impl.d.ts.map +1 -1
- package/dist/commands/profile/profile.list.impl.js +52 -25
- package/dist/commands/profile/profile.list.impl.js.map +1 -1
- package/dist/commands/profile/profile.use.descriptor.d.ts +1 -1
- package/dist/commands/profile/profile.use.descriptor.d.ts.map +1 -1
- package/dist/commands/profile/profile.use.impl.d.ts +2 -6
- package/dist/commands/profile/profile.use.impl.d.ts.map +1 -1
- package/dist/commands/profile/profile.use.impl.js +40 -10
- package/dist/commands/profile/profile.use.impl.js.map +1 -1
- package/dist/commands/runtime/codegen.command.descriptor.d.ts +26 -12
- package/dist/commands/runtime/codegen.command.descriptor.d.ts.map +1 -1
- package/dist/commands/runtime/codegen.command.descriptor.js +24 -6
- package/dist/commands/runtime/codegen.command.descriptor.js.map +1 -1
- package/dist/commands/runtime/codegen.command.impl.d.ts +15 -2
- package/dist/commands/runtime/codegen.command.impl.d.ts.map +1 -1
- package/dist/commands/runtime/codegen.command.impl.js +17 -30
- package/dist/commands/runtime/codegen.command.impl.js.map +1 -1
- package/dist/commands/runtime/codegen.d.ts +10 -14
- package/dist/commands/runtime/codegen.d.ts.map +1 -1
- package/dist/commands/runtime/codegen.declarations.d.ts +6 -0
- package/dist/commands/runtime/codegen.declarations.d.ts.map +1 -0
- package/dist/commands/runtime/codegen.declarations.js +6 -0
- package/dist/commands/runtime/codegen.declarations.js.map +1 -0
- package/dist/commands/runtime/codegen.js +85 -58
- package/dist/commands/runtime/codegen.js.map +1 -1
- package/dist/commands/runtime/export/markdown-document.d.ts +25 -0
- package/dist/commands/runtime/export/markdown-document.d.ts.map +1 -0
- package/dist/commands/runtime/export/markdown-document.js +38 -0
- package/dist/commands/runtime/export/markdown-document.js.map +1 -0
- package/dist/commands/runtime/export/markdown.d.ts +17 -0
- package/dist/commands/runtime/export/markdown.d.ts.map +1 -0
- package/dist/commands/runtime/export/markdown.js +141 -0
- package/dist/commands/runtime/export/markdown.js.map +1 -0
- package/dist/commands/runtime/export/read.d.ts +27 -0
- package/dist/commands/runtime/export/read.d.ts.map +1 -0
- package/dist/commands/runtime/export/read.js +128 -0
- package/dist/commands/runtime/export/read.js.map +1 -0
- package/dist/commands/runtime/export/reading-notes.d.ts +11 -0
- package/dist/commands/runtime/export/reading-notes.d.ts.map +1 -0
- package/dist/commands/runtime/export/reading-notes.js +45 -0
- package/dist/commands/runtime/export/reading-notes.js.map +1 -0
- package/dist/commands/runtime/export/register.d.ts +34 -0
- package/dist/commands/runtime/export/register.d.ts.map +1 -0
- package/dist/commands/runtime/export/register.js +57 -0
- package/dist/commands/runtime/export/register.js.map +1 -0
- package/dist/commands/runtime/export/schemas.d.ts +104 -0
- package/dist/commands/runtime/export/schemas.d.ts.map +1 -0
- package/dist/commands/runtime/export/schemas.js +38 -0
- package/dist/commands/runtime/export/schemas.js.map +1 -0
- package/dist/commands/runtime/export/write.d.ts +16 -0
- package/dist/commands/runtime/export/write.d.ts.map +1 -0
- package/dist/commands/runtime/export/write.js +36 -0
- package/dist/commands/runtime/export/write.js.map +1 -0
- package/dist/commands/runtime/export.command.impl.d.ts +18 -0
- package/dist/commands/runtime/export.command.impl.d.ts.map +1 -0
- package/dist/commands/runtime/export.command.impl.js +39 -0
- package/dist/commands/runtime/export.command.impl.js.map +1 -0
- package/dist/commands/runtime/export.d.ts +28 -0
- package/dist/commands/runtime/export.d.ts.map +1 -0
- package/dist/commands/runtime/export.descriptor.d.ts +55 -0
- package/dist/commands/runtime/export.descriptor.d.ts.map +1 -0
- package/dist/commands/runtime/export.descriptor.js +58 -0
- package/dist/commands/runtime/export.descriptor.js.map +1 -0
- package/dist/commands/runtime/export.js +28 -0
- package/dist/commands/runtime/export.js.map +1 -0
- package/dist/commands/runtime/index.d.ts +2 -2
- package/dist/commands/runtime/index.d.ts.map +1 -1
- package/dist/commands/runtime/index.js +3 -3
- package/dist/commands/runtime/index.js.map +1 -1
- package/dist/commands/runtime/plugin.d.ts +1 -1
- package/dist/commands/runtime/plugin.d.ts.map +1 -1
- package/dist/commands/runtime/plugin.js +1 -1
- package/dist/commands/runtime/plugin.js.map +1 -1
- package/dist/commands/runtime/runtime-group.descriptor.d.ts +1 -1
- package/dist/commands/runtime/runtime-group.descriptor.d.ts.map +1 -1
- package/dist/commands/schemas/output.d.ts +26 -0
- package/dist/commands/schemas/output.d.ts.map +1 -0
- package/dist/commands/schemas/output.js +14 -0
- package/dist/commands/schemas/output.js.map +1 -0
- package/dist/commands/schemas/profile-environment.d.ts +6 -0
- package/dist/commands/schemas/profile-environment.d.ts.map +1 -0
- package/dist/commands/schemas/profile-environment.js +3 -0
- package/dist/commands/schemas/profile-environment.js.map +1 -0
- package/dist/commands/schemas/profile-list.d.ts +22 -0
- package/dist/commands/schemas/profile-list.d.ts.map +1 -0
- package/dist/commands/schemas/profile-list.js +3 -0
- package/dist/commands/schemas/profile-list.js.map +1 -0
- package/dist/commands/skills/_skills.d.ts +98 -0
- package/dist/commands/skills/_skills.d.ts.map +1 -0
- package/dist/commands/skills/_skills.js +183 -0
- package/dist/commands/skills/_skills.js.map +1 -0
- package/dist/commands/skills/skills-group.descriptor.d.ts +4 -0
- package/dist/commands/skills/skills-group.descriptor.d.ts.map +1 -0
- package/dist/commands/skills/skills-group.descriptor.js +12 -0
- package/dist/commands/skills/skills-group.descriptor.js.map +1 -0
- package/dist/commands/skills/skills.install.descriptor.d.ts +4 -0
- package/dist/commands/skills/skills.install.descriptor.d.ts.map +1 -0
- package/dist/commands/skills/skills.install.descriptor.js +37 -0
- package/dist/commands/skills/skills.install.descriptor.js.map +1 -0
- package/dist/commands/skills/skills.install.impl.d.ts +12 -0
- package/dist/commands/skills/skills.install.impl.d.ts.map +1 -0
- package/dist/commands/skills/skills.install.impl.js +65 -0
- package/dist/commands/skills/skills.install.impl.js.map +1 -0
- package/dist/commands/skills/skills.list.descriptor.d.ts +4 -0
- package/dist/commands/skills/skills.list.descriptor.d.ts.map +1 -0
- package/dist/commands/skills/skills.list.descriptor.js +23 -0
- package/dist/commands/skills/skills.list.descriptor.js.map +1 -0
- package/dist/commands/skills/skills.list.impl.d.ts +11 -0
- package/dist/commands/skills/skills.list.impl.d.ts.map +1 -0
- package/dist/commands/skills/skills.list.impl.js +69 -0
- package/dist/commands/skills/skills.list.impl.js.map +1 -0
- package/dist/core/runtime/shared/context.d.ts +16 -16
- package/dist/core/runtime/shared/context.d.ts.map +1 -1
- package/dist/core/runtime/shared/context.js +20 -35
- package/dist/core/runtime/shared/context.js.map +1 -1
- package/dist/core/runtime/shared/options.d.ts +5 -19
- package/dist/core/runtime/shared/options.d.ts.map +1 -1
- package/dist/core/runtime/shared/options.js +87 -42
- package/dist/core/runtime/shared/options.js.map +1 -1
- package/dist/design-inventory.d.ts +23 -0
- package/dist/design-inventory.d.ts.map +1 -0
- package/dist/design-inventory.js +66 -0
- package/dist/design-inventory.js.map +1 -0
- package/dist/index.d.ts +12 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -25
- package/dist/index.js.map +1 -1
- package/dist/invocation/client.d.ts +20 -0
- package/dist/invocation/client.d.ts.map +1 -0
- package/dist/invocation/client.js +25 -0
- package/dist/invocation/client.js.map +1 -0
- package/dist/invocation/state.d.ts +10 -0
- package/dist/invocation/state.d.ts.map +1 -0
- package/dist/invocation/state.js +32 -0
- package/dist/invocation/state.js.map +1 -0
- package/dist/patterns/builtins/config-namespace-commands.d.ts +10 -0
- package/dist/patterns/builtins/config-namespace-commands.d.ts.map +1 -0
- package/dist/patterns/builtins/config-namespace-commands.js +132 -0
- package/dist/patterns/builtins/config-namespace-commands.js.map +1 -0
- package/dist/patterns/builtins/config-namespace-output.d.ts +9 -0
- package/dist/patterns/builtins/config-namespace-output.d.ts.map +1 -0
- package/dist/patterns/builtins/config-namespace-output.js +31 -0
- package/dist/patterns/builtins/config-namespace-output.js.map +1 -0
- package/dist/patterns/builtins/config-namespace.d.ts +23 -0
- package/dist/patterns/builtins/config-namespace.d.ts.map +1 -0
- package/dist/patterns/builtins/config-namespace.js +70 -0
- package/dist/patterns/builtins/config-namespace.js.map +1 -0
- package/dist/patterns/builtins/crud-commands.d.ts +11 -0
- package/dist/patterns/builtins/crud-commands.d.ts.map +1 -0
- package/dist/patterns/builtins/crud-commands.js +105 -0
- package/dist/patterns/builtins/crud-commands.js.map +1 -0
- package/dist/patterns/builtins/crud-output.d.ts +7 -0
- package/dist/patterns/builtins/crud-output.d.ts.map +1 -0
- package/dist/patterns/builtins/crud-output.js +21 -0
- package/dist/patterns/builtins/crud-output.js.map +1 -0
- package/dist/patterns/builtins/crud.d.ts +16 -0
- package/dist/patterns/builtins/crud.d.ts.map +1 -0
- package/dist/patterns/builtins/crud.js +38 -0
- package/dist/patterns/builtins/crud.js.map +1 -0
- package/dist/patterns/{log-viewer.d.ts → builtins/log-viewer.d.ts} +5 -5
- package/dist/patterns/builtins/log-viewer.d.ts.map +1 -0
- package/dist/patterns/{log-viewer.js → builtins/log-viewer.js} +31 -9
- package/dist/patterns/builtins/log-viewer.js.map +1 -0
- package/dist/patterns/builtins/output.d.ts +5 -0
- package/dist/patterns/builtins/output.d.ts.map +1 -0
- package/dist/patterns/builtins/output.js +25 -0
- package/dist/patterns/builtins/output.js.map +1 -0
- package/dist/patterns/{process-manager.d.ts → builtins/process-manager.d.ts} +9 -4
- package/dist/patterns/builtins/process-manager.d.ts.map +1 -0
- package/dist/patterns/{process-manager.js → builtins/process-manager.js} +46 -29
- package/dist/patterns/builtins/process-manager.js.map +1 -0
- package/dist/patterns/builtins/tool-wrapper.d.ts +18 -0
- package/dist/patterns/builtins/tool-wrapper.d.ts.map +1 -0
- package/dist/patterns/builtins/tool-wrapper.js +124 -0
- package/dist/patterns/builtins/tool-wrapper.js.map +1 -0
- package/dist/patterns/cli-value.d.ts +3 -0
- package/dist/patterns/cli-value.d.ts.map +1 -0
- package/dist/patterns/cli-value.js +42 -0
- package/dist/patterns/cli-value.js.map +1 -0
- package/dist/patterns/index.d.ts +5 -9
- package/dist/patterns/index.d.ts.map +1 -1
- package/dist/patterns/index.js +5 -9
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/pattern.kinds.d.ts +30 -0
- package/dist/patterns/pattern.kinds.d.ts.map +1 -0
- package/dist/patterns/pattern.kinds.js +8 -0
- package/dist/patterns/pattern.kinds.js.map +1 -0
- package/dist/patterns/resolver.d.ts +11 -32
- package/dist/patterns/resolver.d.ts.map +1 -1
- package/dist/patterns/resolver.js +14 -45
- package/dist/patterns/resolver.js.map +1 -1
- package/dist/patterns/schemas.d.ts +9 -492
- package/dist/patterns/schemas.d.ts.map +1 -1
- package/dist/patterns/schemas.js +5 -94
- package/dist/patterns/schemas.js.map +1 -1
- package/dist/schemas/bootstrap.d.ts +242 -0
- package/dist/schemas/bootstrap.d.ts.map +1 -0
- package/dist/schemas/bootstrap.js +7 -0
- package/dist/schemas/bootstrap.js.map +1 -0
- package/dist/schemas/command-implementation.d.ts +34 -0
- package/dist/schemas/command-implementation.d.ts.map +1 -0
- package/dist/schemas/command-implementation.js +31 -0
- package/dist/schemas/command-implementation.js.map +1 -0
- package/dist/schemas/command-recommendations.d.ts +9 -0
- package/dist/schemas/command-recommendations.d.ts.map +1 -0
- package/dist/schemas/command-recommendations.js +14 -0
- package/dist/schemas/command-recommendations.js.map +1 -0
- package/dist/schemas/completion.d.ts +118 -0
- package/dist/schemas/completion.d.ts.map +1 -0
- package/dist/schemas/completion.js +63 -0
- package/dist/schemas/completion.js.map +1 -0
- package/dist/schemas/descriptors.d.ts +1 -129
- package/dist/schemas/descriptors.d.ts.map +1 -1
- package/dist/schemas/descriptors.js +1 -95
- package/dist/schemas/descriptors.js.map +1 -1
- package/dist/schemas/design-inventory.d.ts +20 -0
- package/dist/schemas/design-inventory.d.ts.map +1 -0
- package/dist/schemas/design-inventory.js +10 -0
- package/dist/schemas/design-inventory.js.map +1 -0
- package/dist/schemas/discovery.d.ts +17 -0
- package/dist/schemas/discovery.d.ts.map +1 -0
- package/dist/schemas/discovery.js +15 -0
- package/dist/schemas/discovery.js.map +1 -0
- package/dist/schemas/exit.d.ts +33 -0
- package/dist/schemas/exit.d.ts.map +1 -0
- package/dist/schemas/exit.js +20 -0
- package/dist/schemas/exit.js.map +1 -0
- package/dist/schemas/interactive-host.d.ts +10 -0
- package/dist/schemas/interactive-host.d.ts.map +1 -0
- package/dist/schemas/interactive-host.js +11 -0
- package/dist/schemas/interactive-host.js.map +1 -0
- package/dist/schemas/output-format.d.ts +61 -0
- package/dist/schemas/output-format.d.ts.map +1 -0
- package/dist/schemas/output-format.js +26 -0
- package/dist/schemas/output-format.js.map +1 -0
- package/dist/schemas/pattern-implementation.d.ts +1572 -0
- package/dist/schemas/pattern-implementation.d.ts.map +1 -0
- package/dist/schemas/pattern-implementation.js +12 -0
- package/dist/schemas/pattern-implementation.js.map +1 -0
- package/dist/schemas/pattern-input.d.ts +152 -0
- package/dist/schemas/pattern-input.d.ts.map +1 -0
- package/dist/schemas/pattern-input.js +194 -0
- package/dist/schemas/pattern-input.js.map +1 -0
- package/dist/schemas/pm-context.d.ts +17 -0
- package/dist/schemas/pm-context.d.ts.map +1 -0
- package/dist/schemas/pm-context.js +13 -0
- package/dist/schemas/pm-context.js.map +1 -0
- package/dist/schemas/prompts.d.ts +61 -0
- package/dist/schemas/prompts.d.ts.map +1 -0
- package/dist/schemas/prompts.js +43 -0
- package/dist/schemas/prompts.js.map +1 -0
- package/dist/schemas/runtime-codegen.d.ts +191 -0
- package/dist/schemas/runtime-codegen.d.ts.map +1 -0
- package/dist/schemas/runtime-codegen.js +83 -0
- package/dist/schemas/runtime-codegen.js.map +1 -0
- package/dist/schemas/surface.d.ts +33 -20
- package/dist/schemas/surface.d.ts.map +1 -1
- package/dist/schemas/surface.js +2 -1
- package/dist/schemas/surface.js.map +1 -1
- package/dist/schemas/terminal-input.d.ts +15 -0
- package/dist/schemas/terminal-input.d.ts.map +1 -0
- package/dist/schemas/terminal-input.js +13 -0
- package/dist/schemas/terminal-input.js.map +1 -0
- package/dist/schemas/types.d.ts +1 -201
- package/dist/schemas/types.d.ts.map +1 -1
- package/dist/support/cli-inventory.generated.d.ts +4 -0
- package/dist/support/cli-inventory.generated.d.ts.map +1 -0
- package/dist/support/cli-inventory.generated.js +31 -0
- package/dist/support/cli-inventory.generated.js.map +1 -0
- package/dist/support/logging/cli-startup.logger.descriptor.d.ts.map +1 -0
- package/dist/support/logging/cli-startup.logger.descriptor.js.map +1 -0
- package/dist/support/logging/logging.d.ts +8 -0
- package/dist/support/logging/logging.d.ts.map +1 -0
- package/dist/support/logging/logging.js +13 -0
- package/dist/support/logging/logging.js.map +1 -0
- package/dist/support/terminal-input.d.ts +11 -0
- package/dist/support/terminal-input.d.ts.map +1 -0
- package/dist/support/terminal-input.js +39 -0
- package/dist/support/terminal-input.js.map +1 -0
- package/dist/support/ui/context.descriptor.d.ts +35 -0
- package/dist/support/ui/context.descriptor.d.ts.map +1 -0
- package/dist/{ui.context.descriptor.js → support/ui/context.descriptor.js} +2 -2
- package/dist/support/ui/context.descriptor.js.map +1 -0
- package/dist/support/ui/format.client.d.ts +42 -0
- package/dist/support/ui/format.client.d.ts.map +1 -0
- package/dist/support/ui/format.client.js +92 -0
- package/dist/support/ui/format.client.js.map +1 -0
- package/dist/support/ui/format.kinds.d.ts +30 -0
- package/dist/support/ui/format.kinds.d.ts.map +1 -0
- package/dist/support/ui/format.kinds.js +8 -0
- package/dist/support/ui/format.kinds.js.map +1 -0
- package/dist/support/ui/format.plugin.d.ts +7 -0
- package/dist/support/ui/format.plugin.d.ts.map +1 -0
- package/dist/support/ui/format.plugin.js +23 -0
- package/dist/support/ui/format.plugin.js.map +1 -0
- package/dist/support/ui/formats.d.ts +4 -0
- package/dist/support/ui/formats.d.ts.map +1 -0
- package/dist/support/ui/formats.js +34 -0
- package/dist/support/ui/formats.js.map +1 -0
- package/dist/support/ui/prompts.d.ts +9 -0
- package/dist/support/ui/prompts.d.ts.map +1 -0
- package/dist/support/ui/prompts.js +99 -0
- package/dist/support/ui/prompts.js.map +1 -0
- package/dist/support/ui/schemas/types.d.ts +2 -0
- package/dist/support/ui/schemas/types.d.ts.map +1 -0
- package/dist/support/ui/schemas/types.js.map +1 -0
- package/dist/support/ui/schemas/ui-toolkit.d.ts +45 -0
- package/dist/support/ui/schemas/ui-toolkit.d.ts.map +1 -0
- package/dist/support/ui/schemas/ui-toolkit.js +2 -0
- package/dist/support/ui/schemas/ui-toolkit.js.map +1 -0
- package/dist/support/ui/showcase.d.ts +18 -0
- package/dist/support/ui/showcase.d.ts.map +1 -0
- package/dist/support/ui/showcase.js +101 -0
- package/dist/support/ui/showcase.js.map +1 -0
- package/dist/support/ui/table.d.ts +28 -0
- package/dist/support/ui/table.d.ts.map +1 -0
- package/dist/support/ui/table.js +74 -0
- package/dist/support/ui/table.js.map +1 -0
- package/dist/support/ui/toolkit.d.ts +56 -0
- package/dist/support/ui/toolkit.d.ts.map +1 -0
- package/dist/support/ui/toolkit.js +130 -0
- package/dist/support/ui/toolkit.js.map +1 -0
- package/dist/support/vibesdev/index.d.ts +2 -0
- package/dist/support/vibesdev/index.d.ts.map +1 -0
- package/dist/support/vibesdev/index.js +3 -0
- package/dist/support/vibesdev/index.js.map +1 -0
- package/dist/surface/CLISurface.d.ts +77 -3
- package/dist/surface/CLISurface.d.ts.map +1 -1
- package/dist/surface/CLISurface.js +642 -98
- package/dist/surface/CLISurface.js.map +1 -1
- package/dist/surface/argument-name.d.ts +14 -0
- package/dist/surface/argument-name.d.ts.map +1 -0
- package/dist/surface/argument-name.js +23 -0
- package/dist/surface/argument-name.js.map +1 -0
- package/dist/surface/attach-tui-action.d.ts +35 -9
- package/dist/surface/attach-tui-action.d.ts.map +1 -1
- package/dist/surface/attach-tui-action.js +50 -43
- package/dist/surface/attach-tui-action.js.map +1 -1
- package/dist/surface/build-context.d.ts +2 -2
- package/dist/surface/build-context.d.ts.map +1 -1
- package/dist/surface/build-context.js +26 -44
- package/dist/surface/build-context.js.map +1 -1
- package/dist/surface/command-group-policy.d.ts +2 -3
- package/dist/surface/command-group-policy.d.ts.map +1 -1
- package/dist/surface/command-group-policy.js +1 -11
- package/dist/surface/command-group-policy.js.map +1 -1
- package/dist/surface/command-implementation.d.ts +9 -0
- package/dist/surface/command-implementation.d.ts.map +1 -0
- package/dist/surface/command-implementation.js +19 -0
- package/dist/surface/command-implementation.js.map +1 -0
- package/dist/surface/command-options.d.ts +29 -0
- package/dist/surface/command-options.d.ts.map +1 -0
- package/dist/surface/command-options.js +57 -0
- package/dist/surface/command-options.js.map +1 -0
- package/dist/surface/commander-action.d.ts +25 -0
- package/dist/surface/commander-action.d.ts.map +1 -0
- package/dist/surface/commander-action.js +38 -0
- package/dist/surface/commander-action.js.map +1 -0
- package/dist/surface/discovery-cache.d.ts +3 -15
- package/dist/surface/discovery-cache.d.ts.map +1 -1
- package/dist/surface/discovery-cache.js +6 -33
- package/dist/surface/discovery-cache.js.map +1 -1
- package/dist/surface/exit.d.ts +10 -0
- package/dist/surface/exit.d.ts.map +1 -0
- package/dist/surface/exit.js +33 -0
- package/dist/surface/exit.js.map +1 -0
- package/dist/surface/failure-of.d.ts +9 -0
- package/dist/surface/failure-of.d.ts.map +1 -0
- package/dist/surface/failure-of.js +17 -0
- package/dist/surface/failure-of.js.map +1 -0
- package/dist/surface/failure-output.d.ts +50 -0
- package/dist/surface/failure-output.d.ts.map +1 -0
- package/dist/surface/failure-output.js +84 -0
- package/dist/surface/failure-output.js.map +1 -0
- package/dist/surface/failure-report.d.ts +78 -0
- package/dist/surface/failure-report.d.ts.map +1 -0
- package/dist/surface/failure-report.js +229 -0
- package/dist/surface/failure-report.js.map +1 -0
- package/dist/surface/group-fallback.d.ts +32 -0
- package/dist/surface/group-fallback.d.ts.map +1 -0
- package/dist/surface/group-fallback.js +78 -0
- package/dist/surface/group-fallback.js.map +1 -0
- package/dist/surface/index.d.ts +10 -0
- package/dist/surface/index.d.ts.map +1 -0
- package/dist/surface/index.js +8 -0
- package/dist/surface/index.js.map +1 -0
- package/dist/surface/inherited-options.d.ts +28 -0
- package/dist/surface/inherited-options.d.ts.map +1 -0
- package/dist/surface/inherited-options.js +108 -0
- package/dist/surface/inherited-options.js.map +1 -0
- package/dist/surface/interactive-gate.d.ts +41 -0
- package/dist/surface/interactive-gate.d.ts.map +1 -0
- package/dist/surface/interactive-gate.js +112 -0
- package/dist/surface/interactive-gate.js.map +1 -0
- package/dist/surface/invocation-actions.d.ts +40 -0
- package/dist/surface/invocation-actions.d.ts.map +1 -0
- package/dist/surface/invocation-actions.js +78 -0
- package/dist/surface/invocation-actions.js.map +1 -0
- package/dist/surface/invocation-effects.d.ts +11 -0
- package/dist/surface/invocation-effects.d.ts.map +1 -0
- package/dist/surface/invocation-effects.js +52 -0
- package/dist/surface/invocation-effects.js.map +1 -0
- package/dist/surface/invocation-lifecycle.d.ts +49 -0
- package/dist/surface/invocation-lifecycle.d.ts.map +1 -0
- package/dist/surface/invocation-lifecycle.js +127 -0
- package/dist/surface/invocation-lifecycle.js.map +1 -0
- package/dist/surface/output-format-request.d.ts +23 -0
- package/dist/surface/output-format-request.d.ts.map +1 -0
- package/dist/surface/output-format-request.js +116 -0
- package/dist/surface/output-format-request.js.map +1 -0
- package/dist/surface/pm-context.d.ts +5 -0
- package/dist/surface/pm-context.d.ts.map +1 -0
- package/dist/surface/pm-context.js +69 -0
- package/dist/surface/pm-context.js.map +1 -0
- package/dist/surface/register-commands.d.ts +24 -4
- package/dist/surface/register-commands.d.ts.map +1 -1
- package/dist/surface/register-commands.js +156 -63
- package/dist/surface/register-commands.js.map +1 -1
- package/dist/surface/register-groups.d.ts +4 -4
- package/dist/surface/register-groups.d.ts.map +1 -1
- package/dist/surface/register-groups.js +71 -9
- package/dist/surface/register-groups.js.map +1 -1
- package/dist/surface/schemas/CLISurface.d.ts +31 -0
- package/dist/surface/schemas/CLISurface.d.ts.map +1 -0
- package/dist/surface/schemas/CLISurface.js +2 -0
- package/dist/surface/schemas/CLISurface.js.map +1 -0
- package/dist/surface/schemas/command-implementation.d.ts +20 -0
- package/dist/surface/schemas/command-implementation.d.ts.map +1 -0
- package/dist/surface/schemas/command-implementation.js +2 -0
- package/dist/surface/schemas/command-implementation.js.map +1 -0
- package/dist/surface/schemas/interactive-gate.d.ts +29 -0
- package/dist/surface/schemas/interactive-gate.d.ts.map +1 -0
- package/dist/surface/schemas/interactive-gate.js +2 -0
- package/dist/surface/schemas/interactive-gate.js.map +1 -0
- package/package.json +276 -140
- package/SPEC.md +0 -97
- package/bin/vibes.ts +0 -26
- package/dist/api/client/factory.d.ts +0 -29
- package/dist/api/client/factory.d.ts.map +0 -1
- package/dist/api/client/factory.js +0 -189
- package/dist/api/client/factory.js.map +0 -1
- package/dist/api/schemas/common.d.ts +0 -58
- package/dist/api/schemas/common.d.ts.map +0 -1
- package/dist/api/schemas/common.js +0 -48
- package/dist/api/schemas/common.js.map +0 -1
- package/dist/api/schemas/types.d.ts +0 -30
- package/dist/api/schemas/types.d.ts.map +0 -1
- package/dist/api/services/api.d.ts +0 -14
- package/dist/api/services/api.d.ts.map +0 -1
- package/dist/api/services/api.js +0 -110
- package/dist/api/services/api.js.map +0 -1
- package/dist/api/types.d.ts +0 -6
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js +0 -5
- package/dist/api/types.js.map +0 -1
- package/dist/bin.d.ts +0 -28
- package/dist/bin.d.ts.map +0 -1
- package/dist/bin.js +0 -73
- package/dist/bin.js.map +0 -1
- package/dist/bootstrap.d.ts +0 -14
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap.js +0 -14
- package/dist/bootstrap.js.map +0 -1
- package/dist/cli.plugin.d.ts +0 -20
- package/dist/cli.plugin.d.ts.map +0 -1
- package/dist/cli.plugin.js +0 -170
- package/dist/cli.plugin.js.map +0 -1
- package/dist/commands/runtime/_logging.d.ts +0 -11
- package/dist/commands/runtime/_logging.d.ts.map +0 -1
- package/dist/commands/runtime/_logging.js +0 -40
- package/dist/commands/runtime/_logging.js.map +0 -1
- package/dist/config.d.ts +0 -17
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/core/index.d.ts +0 -9
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -5
- package/dist/core/index.js.map +0 -1
- package/dist/core/namespace/hook.d.ts +0 -12
- package/dist/core/namespace/hook.d.ts.map +0 -1
- package/dist/core/namespace/hook.js +0 -15
- package/dist/core/namespace/hook.js.map +0 -1
- package/dist/core/namespace/index.d.ts +0 -18
- package/dist/core/namespace/index.d.ts.map +0 -1
- package/dist/core/namespace/index.js +0 -214
- package/dist/core/namespace/index.js.map +0 -1
- package/dist/core/namespace/schemas/index.d.ts +0 -25
- package/dist/core/namespace/schemas/index.d.ts.map +0 -1
- package/dist/core/namespace/schemas/index.js +0 -2
- package/dist/core/namespace/schemas/index.js.map +0 -1
- package/dist/core/plugins/types.d.ts +0 -81
- package/dist/core/plugins/types.d.ts.map +0 -1
- package/dist/core/plugins/types.js +0 -6
- package/dist/core/plugins/types.js.map +0 -1
- package/dist/core/runtime/context.d.ts +0 -25
- package/dist/core/runtime/context.d.ts.map +0 -1
- package/dist/core/runtime/context.js +0 -30
- package/dist/core/runtime/context.js.map +0 -1
- package/dist/core/runtime/hooks.d.ts +0 -12
- package/dist/core/runtime/hooks.d.ts.map +0 -1
- package/dist/core/runtime/hooks.js +0 -2
- package/dist/core/runtime/hooks.js.map +0 -1
- package/dist/core/schemas/manifest.d.ts +0 -24
- package/dist/core/schemas/manifest.d.ts.map +0 -1
- package/dist/core/schemas/manifest.js +0 -6
- package/dist/core/schemas/manifest.js.map +0 -1
- package/dist/core/schemas/types.d.ts +0 -7
- package/dist/core/schemas/types.d.ts.map +0 -1
- package/dist/core/schemas/types.js.map +0 -1
- package/dist/core/ui/interface.d.ts +0 -12
- package/dist/core/ui/interface.d.ts.map +0 -1
- package/dist/core/ui/interface.js +0 -6
- package/dist/core/ui/interface.js.map +0 -1
- package/dist/docs/cli.commands.docs.descriptor.d.ts +0 -4
- package/dist/docs/cli.commands.docs.descriptor.d.ts.map +0 -1
- package/dist/docs/cli.commands.docs.descriptor.js +0 -207
- package/dist/docs/cli.commands.docs.descriptor.js.map +0 -1
- package/dist/docs/cli.groups.docs.descriptor.d.ts +0 -4
- package/dist/docs/cli.groups.docs.descriptor.d.ts.map +0 -1
- package/dist/docs/cli.groups.docs.descriptor.js +0 -330
- package/dist/docs/cli.groups.docs.descriptor.js.map +0 -1
- package/dist/docs/cli.output.docs.descriptor.d.ts +0 -4
- package/dist/docs/cli.output.docs.descriptor.d.ts.map +0 -1
- package/dist/docs/cli.output.docs.descriptor.js +0 -442
- package/dist/docs/cli.output.docs.descriptor.js.map +0 -1
- package/dist/docs/types.d.ts +0 -19
- package/dist/docs/types.d.ts.map +0 -1
- package/dist/docs/types.js +0 -2
- package/dist/docs/types.js.map +0 -1
- package/dist/errors.d.ts +0 -74
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -113
- package/dist/errors.js.map +0 -1
- package/dist/logging/cli-startup.logger.descriptor.d.ts.map +0 -1
- package/dist/logging/cli-startup.logger.descriptor.js.map +0 -1
- package/dist/logging.d.ts +0 -4
- package/dist/logging.d.ts.map +0 -1
- package/dist/logging.js +0 -21
- package/dist/logging.js.map +0 -1
- package/dist/patterns/config-namespace.d.ts +0 -23
- package/dist/patterns/config-namespace.d.ts.map +0 -1
- package/dist/patterns/config-namespace.js +0 -218
- package/dist/patterns/config-namespace.js.map +0 -1
- package/dist/patterns/crud.d.ts +0 -23
- package/dist/patterns/crud.d.ts.map +0 -1
- package/dist/patterns/crud.js +0 -164
- package/dist/patterns/crud.js.map +0 -1
- package/dist/patterns/log-viewer.d.ts.map +0 -1
- package/dist/patterns/log-viewer.js.map +0 -1
- package/dist/patterns/pattern-types.d.ts +0 -21
- package/dist/patterns/pattern-types.d.ts.map +0 -1
- package/dist/patterns/pattern-types.js +0 -7
- package/dist/patterns/pattern-types.js.map +0 -1
- package/dist/patterns/process-manager.d.ts.map +0 -1
- package/dist/patterns/process-manager.js.map +0 -1
- package/dist/patterns/resolver.contracts.d.ts +0 -14
- package/dist/patterns/resolver.contracts.d.ts.map +0 -1
- package/dist/patterns/resolver.contracts.js +0 -9
- package/dist/patterns/resolver.contracts.js.map +0 -1
- package/dist/patterns/tool-wrapper.d.ts +0 -18
- package/dist/patterns/tool-wrapper.d.ts.map +0 -1
- package/dist/patterns/tool-wrapper.js +0 -130
- package/dist/patterns/tool-wrapper.js.map +0 -1
- package/dist/providers.d.ts +0 -105
- package/dist/providers.d.ts.map +0 -1
- package/dist/providers.js +0 -164
- package/dist/providers.js.map +0 -1
- package/dist/support/ui-toolkit.d.ts +0 -62
- package/dist/support/ui-toolkit.d.ts.map +0 -1
- package/dist/support/ui-toolkit.js +0 -172
- package/dist/support/ui-toolkit.js.map +0 -1
- package/dist/surface.d.ts +0 -9
- package/dist/surface.d.ts.map +0 -1
- package/dist/surface.js +0 -8
- package/dist/surface.js.map +0 -1
- package/dist/types.d.ts +0 -4
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/ui/schemas/types.d.ts +0 -2
- package/dist/ui/schemas/types.d.ts.map +0 -1
- package/dist/ui/schemas/types.js +0 -2
- package/dist/ui/schemas/types.js.map +0 -1
- package/dist/ui/toolkit/VibesUIToolkit.d.ts +0 -2
- package/dist/ui/toolkit/VibesUIToolkit.d.ts.map +0 -1
- package/dist/ui/toolkit/VibesUIToolkit.js +0 -2
- package/dist/ui/toolkit/VibesUIToolkit.js.map +0 -1
- package/dist/ui.context.descriptor.d.ts +0 -21
- package/dist/ui.context.descriptor.d.ts.map +0 -1
- package/dist/ui.context.descriptor.js.map +0 -1
- package/dist/utils/open.d.ts +0 -2
- package/dist/utils/open.d.ts.map +0 -1
- package/dist/utils/open.js +0 -30
- package/dist/utils/open.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -2
- package/dist/version.js.map +0 -1
- package/src/api/client/factory.ts +0 -265
- package/src/api/schemas/common.ts +0 -50
- package/src/api/schemas/types.ts +0 -32
- package/src/api/services/api.ts +0 -129
- package/src/api/types.ts +0 -12
- package/src/bin.ts +0 -84
- package/src/bootstrap.ts +0 -19
- package/src/cli.plugin.d.ts +0 -19
- package/src/cli.plugin.ts +0 -202
- package/src/commands/completion/bash.ts +0 -68
- package/src/commands/completion/completion.descriptor.ts +0 -48
- package/src/commands/completion/completion.impl.ts +0 -188
- package/src/commands/completion/fig.ts +0 -78
- package/src/commands/completion/fish.ts +0 -52
- package/src/commands/completion/tree.ts +0 -115
- package/src/commands/completion/zsh-widget.ts +0 -39
- package/src/commands/completion/zsh.ts +0 -165
- package/src/commands/profile/_utils.ts +0 -72
- package/src/commands/profile/profile-group.descriptor.ts +0 -14
- package/src/commands/profile/profile.create.descriptor.ts +0 -24
- package/src/commands/profile/profile.create.impl.ts +0 -44
- package/src/commands/profile/profile.delete.descriptor.ts +0 -31
- package/src/commands/profile/profile.delete.impl.ts +0 -71
- package/src/commands/profile/profile.info.descriptor.ts +0 -25
- package/src/commands/profile/profile.info.impl.ts +0 -51
- package/src/commands/profile/profile.list.descriptor.ts +0 -18
- package/src/commands/profile/profile.list.impl.ts +0 -46
- package/src/commands/profile/profile.use.descriptor.ts +0 -25
- package/src/commands/profile/profile.use.impl.ts +0 -39
- package/src/commands/runtime/_logging.ts +0 -47
- package/src/commands/runtime/codegen.command.descriptor.ts +0 -18
- package/src/commands/runtime/codegen.command.impl.ts +0 -44
- package/src/commands/runtime/codegen.ts +0 -84
- package/src/commands/runtime/index.ts +0 -14
- package/src/commands/runtime/plugin.ts +0 -7
- package/src/commands/runtime/runtime-group.descriptor.ts +0 -12
- package/src/config.ts +0 -22
- package/src/core/index.ts +0 -9
- package/src/core/namespace/hook.ts +0 -25
- package/src/core/namespace/index.ts +0 -298
- package/src/core/namespace/schemas/index.ts +0 -25
- package/src/core/plugins/types.ts +0 -87
- package/src/core/runtime/context.ts +0 -50
- package/src/core/runtime/hooks.ts +0 -12
- package/src/core/runtime/shared/context.ts +0 -65
- package/src/core/runtime/shared/options.ts +0 -60
- package/src/core/schemas/manifest.ts +0 -26
- package/src/core/schemas/types.ts +0 -6
- package/src/core/ui/interface.ts +0 -12
- package/src/docs/cli.commands.docs.descriptor.ts +0 -210
- package/src/docs/cli.groups.docs.descriptor.ts +0 -333
- package/src/docs/cli.output.docs.descriptor.ts +0 -445
- package/src/docs/types.ts +0 -18
- package/src/errors.ts +0 -123
- package/src/index.ts +0 -76
- package/src/logging/cli-startup.logger.descriptor.ts +0 -16
- package/src/logging.ts +0 -35
- package/src/patterns/config-namespace.ts +0 -251
- package/src/patterns/crud.ts +0 -217
- package/src/patterns/index.ts +0 -24
- package/src/patterns/log-viewer.ts +0 -118
- package/src/patterns/pattern-types.ts +0 -22
- package/src/patterns/process-manager.ts +0 -180
- package/src/patterns/resolver.contracts.ts +0 -15
- package/src/patterns/resolver.ts +0 -86
- package/src/patterns/schemas.ts +0 -146
- package/src/patterns/tool-wrapper.ts +0 -165
- package/src/providers.ts +0 -282
- package/src/schemas/descriptors.d.ts +0 -119
- package/src/schemas/descriptors.ts +0 -136
- package/src/schemas/surface.ts +0 -52
- package/src/schemas/types.d.ts +0 -195
- package/src/schemas/types.ts +0 -225
- package/src/support/ui-toolkit.ts +0 -224
- package/src/surface/CLISurface.ts +0 -193
- package/src/surface/attach-tui-action.ts +0 -76
- package/src/surface/build-context.ts +0 -49
- package/src/surface/command-group-policy.ts +0 -52
- package/src/surface/discovery-cache.ts +0 -143
- package/src/surface/register-commands.ts +0 -266
- package/src/surface/register-groups.ts +0 -84
- package/src/surface.ts +0 -9
- package/src/types.ts +0 -3
- package/src/ui/schemas/types.ts +0 -1
- package/src/ui/toolkit/VibesUIToolkit.ts +0 -1
- package/src/ui.context.descriptor.ts +0 -13
- package/src/utils/open.ts +0 -36
- package/src/version.ts +0 -10
- /package/dist/{api → boot}/schemas/types.js +0 -0
- /package/dist/{logging → support/logging}/cli-startup.logger.descriptor.d.ts +0 -0
- /package/dist/{logging → support/logging}/cli-startup.logger.descriptor.js +0 -0
- /package/dist/{core → support/ui}/schemas/types.js +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one print form of a CLI failure.
|
|
3
|
+
*
|
|
4
|
+
* Every path that prints a failure (a command failure in `CLISurface.run`, the
|
|
5
|
+
* exit-boundary disposal, a host bootstrap failure, a skipped telemetry emit
|
|
6
|
+
* under `-v`) renders it here, so they cannot disagree about what is shown:
|
|
7
|
+
*
|
|
8
|
+
* - The failure is described once by Logging's redaction walk
|
|
9
|
+
* (`LoggedErrorSchema`): total for any thrown value (throwing getters,
|
|
10
|
+
* Proxies, cycles), with credential-named keys and `secret()` values in
|
|
11
|
+
* details, fields and causes redacted; retained `AggregateError` members and
|
|
12
|
+
* causes are described within Logging's depth and breadth bounds.
|
|
13
|
+
* - Each retained `AggregateError` member, including nested aggregates, is
|
|
14
|
+
* listed with its `details.pluginId` and its retained cause chain. By default each member and cause is value-free: its
|
|
15
|
+
* `code`/`reason` when typed, else `Untyped failure: <class name>`, never its
|
|
16
|
+
* message. `-v` lists each member's stack or message and the full chain.
|
|
17
|
+
* "Runtime disposal failed for 1 plugin" therefore names the plugin and why.
|
|
18
|
+
* - Known typed refusals get friendly text by code and reason
|
|
19
|
+
* ({@link mapKnownError}); nothing parses a message.
|
|
20
|
+
* - The whole text then passes Logging's one-pass credential scrubber with the
|
|
21
|
+
* credential values the host env carries (keys Logging's `isSecretKey` calls
|
|
22
|
+
* secret), in normal and verbose modes alike.
|
|
23
|
+
*/
|
|
24
|
+
import * as z from 'zod/v4';
|
|
25
|
+
import { createEndpointTextSchema, isSecretKey, LoggedErrorSchema } from '@vibesdotdev/logging';
|
|
26
|
+
import { isCapabilityErrorCode } from '@vibesdotdev/kernel';
|
|
27
|
+
/** What a failure description is read as: the detached JSON the redaction walk produced. */
|
|
28
|
+
const DescriptionSchema = z.object({
|
|
29
|
+
name: z.string(),
|
|
30
|
+
message: z.string(),
|
|
31
|
+
code: z.union([z.string(), z.number()]).optional(),
|
|
32
|
+
reason: z.string().optional(),
|
|
33
|
+
details: z.unknown().optional(),
|
|
34
|
+
fields: z.record(z.string(), z.unknown()).optional(),
|
|
35
|
+
stack: z.string().optional(),
|
|
36
|
+
cause: z.unknown().optional(),
|
|
37
|
+
errors: z.array(z.unknown()).optional()
|
|
38
|
+
});
|
|
39
|
+
const PluginDetailsSchema = z.object({ pluginId: z.string() });
|
|
40
|
+
const NotRegisteredDetailsSchema = z.object({ kind: z.string(), id: z.string().optional() });
|
|
41
|
+
const AdapterDetailsSchema = z.object({ ownerId: z.string(), allowedAdapters: z.array(z.string()) });
|
|
42
|
+
const RecoveryHintSchema = z.object({ recoveryHint: z.string().min(1) });
|
|
43
|
+
/** How deep a cause chain is printed: the redaction walk itself stops at five. */
|
|
44
|
+
const MAX_PRINTED_CAUSES = 5;
|
|
45
|
+
/**
|
|
46
|
+
* A host env value shorter than this is not scrubbed from failure text: a
|
|
47
|
+
* credential is long, and replacing every short value (`true`, `1`) under a
|
|
48
|
+
* credential-named key would rewrite ordinary words.
|
|
49
|
+
*/
|
|
50
|
+
export const MIN_SCRUBBED_CREDENTIAL_LENGTH = 8;
|
|
51
|
+
/** The credential values an env carries: values of keys Logging calls secret, long enough to be a credential. */
|
|
52
|
+
export function credentialValuesOf(env) {
|
|
53
|
+
if (env === undefined)
|
|
54
|
+
return [];
|
|
55
|
+
const values = [];
|
|
56
|
+
for (const [key, value] of Object.entries(env)) {
|
|
57
|
+
if (value === undefined || !isSecretKey(key))
|
|
58
|
+
continue;
|
|
59
|
+
const trimmed = value.trim();
|
|
60
|
+
if (trimmed.length >= MIN_SCRUBBED_CREDENTIAL_LENGTH)
|
|
61
|
+
values.push(trimmed);
|
|
62
|
+
}
|
|
63
|
+
return values;
|
|
64
|
+
}
|
|
65
|
+
/** Remove every credential value `env` carries from `text` (Logging's scrubber; it never throws). */
|
|
66
|
+
export function scrubCliText(text, env) {
|
|
67
|
+
const values = credentialValuesOf(env);
|
|
68
|
+
if (values.length === 0)
|
|
69
|
+
return text;
|
|
70
|
+
return createEndpointTextSchema('', values).parse(text);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The total, redacted description of a caught failure (a catch site parses
|
|
74
|
+
* its binding with the runtime's `CaughtFailureSchema`): an `Error` is
|
|
75
|
+
* described itself, any other thrown value is described as the value it was.
|
|
76
|
+
*/
|
|
77
|
+
export function describeCliFailure(failure) {
|
|
78
|
+
const described = LoggedErrorSchema.parse(failure instanceof Error ? failure : failure.value);
|
|
79
|
+
const parsed = DescriptionSchema.safeParse(described);
|
|
80
|
+
return parsed.success ? parsed.data : { name: described.name, message: described.message };
|
|
81
|
+
}
|
|
82
|
+
/** Drop frames pointing into the `bun build --compile` virtual filesystem; they are not actionable. */
|
|
83
|
+
export function stripBundlePaths(text) {
|
|
84
|
+
return text
|
|
85
|
+
.split('\n')
|
|
86
|
+
.filter((line) => !line.includes('/$bunfs/') && !line.includes('B:/~BUN/'))
|
|
87
|
+
.join('\n')
|
|
88
|
+
.trim();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Friendly text for the typed refusals a user can act on, chosen by code and
|
|
92
|
+
* reason only. `null` when no mapping applies (the caller prints the message).
|
|
93
|
+
*/
|
|
94
|
+
export function mapKnownError(failure) {
|
|
95
|
+
return mapDescription(describeCliFailure(failure));
|
|
96
|
+
}
|
|
97
|
+
function mapDescription(failure) {
|
|
98
|
+
const { code, reason } = failure;
|
|
99
|
+
if (code === 'NOT_FOUND' && reason === 'not-registered') {
|
|
100
|
+
const subject = NotRegisteredDetailsSchema.safeParse(failure.details);
|
|
101
|
+
const target = subject.success ? `${subject.data.kind}${subject.data.id === undefined ? '' : `#${subject.data.id}`}` : undefined;
|
|
102
|
+
return (`${target === undefined ? 'A required capability' : `"${target}"`} is not registered in this build or scope.\n` +
|
|
103
|
+
'Update the CLI (or run it where the needed plugin is registered), ' +
|
|
104
|
+
'or run with -v for the underlying resolution error.');
|
|
105
|
+
}
|
|
106
|
+
if ((code === 'INTERNAL' && reason === 'dependency-absent') ||
|
|
107
|
+
(code === 'NOT_FOUND' && (reason === 'config-manifest-unregistered' || reason === 'storage-manifest-not-registered'))) {
|
|
108
|
+
return ("This command isn't available in this build or scope.\n" +
|
|
109
|
+
'Update the CLI (or run it where the needed plugin is registered), ' +
|
|
110
|
+
'or run with -v for the underlying resolution error.');
|
|
111
|
+
}
|
|
112
|
+
if (code === 'UNAVAILABLE' && reason === 'storage-adapter-absent') {
|
|
113
|
+
const adapter = AdapterDetailsSchema.safeParse(failure.details);
|
|
114
|
+
const subject = adapter.success
|
|
115
|
+
? `"${adapter.data.ownerId}" (checked: ${adapter.data.allowedAdapters.join(', ')})`
|
|
116
|
+
: 'this record';
|
|
117
|
+
return (`No storage adapter is initialized for ${subject}.\n` +
|
|
118
|
+
'Run `vibes os init` to set up local storage, or run with -v for details.');
|
|
119
|
+
}
|
|
120
|
+
if (code === 'NOT_FOUND' && reason === 'runtime-path-unavailable') {
|
|
121
|
+
return ('The runtime path service has not been initialized yet. ' +
|
|
122
|
+
'This is a bug — please report it. Run with -v for the full stack.');
|
|
123
|
+
}
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
/** ` [CODE reason]` for a typed description, or nothing. */
|
|
127
|
+
function typedTag(failure) {
|
|
128
|
+
if (failure.code === undefined && failure.reason === undefined)
|
|
129
|
+
return '';
|
|
130
|
+
const parts = [failure.code === undefined ? undefined : String(failure.code), failure.reason].filter((part) => part !== undefined && part !== '');
|
|
131
|
+
return parts.length === 0 ? '' : ` [${parts.join(' ')}]`;
|
|
132
|
+
}
|
|
133
|
+
/** ` (plugin <id>)` when the description's details name one. */
|
|
134
|
+
function pluginTag(failure) {
|
|
135
|
+
const plugin = PluginDetailsSchema.safeParse(failure.details);
|
|
136
|
+
return plugin.success ? ` (plugin ${plugin.data.pluginId})` : '';
|
|
137
|
+
}
|
|
138
|
+
/** The described causes of a description, nearest first, up to the print cap. */
|
|
139
|
+
function causeChain(failure) {
|
|
140
|
+
const chain = [];
|
|
141
|
+
let cursor = failure.cause;
|
|
142
|
+
while (cursor !== undefined && chain.length < MAX_PRINTED_CAUSES) {
|
|
143
|
+
const cause = DescriptionSchema.safeParse(cursor);
|
|
144
|
+
if (!cause.success)
|
|
145
|
+
break;
|
|
146
|
+
chain.push(cause.data);
|
|
147
|
+
cursor = cause.data.cause;
|
|
148
|
+
}
|
|
149
|
+
return chain;
|
|
150
|
+
}
|
|
151
|
+
function describedMembers(failure) {
|
|
152
|
+
return (failure.errors ?? []).map((member) => {
|
|
153
|
+
const parsed = DescriptionSchema.safeParse(member);
|
|
154
|
+
return parsed.success ? parsed.data : { name: 'Error', message: 'An aggregate member could not be described.' };
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/** `text` with `tag` appended to its first line (a stack's head line), so tags never trail the frames. */
|
|
158
|
+
function tagFirstLine(text, tag) {
|
|
159
|
+
const newline = text.indexOf('\n');
|
|
160
|
+
return newline === -1 ? `${text}${tag}` : `${text.slice(0, newline)}${tag}${text.slice(newline)}`;
|
|
161
|
+
}
|
|
162
|
+
/** A typed description's bounded facts: a taxonomy code and a kebab-case reason. */
|
|
163
|
+
const TypedFactsSchema = z.object({
|
|
164
|
+
code: z.string().refine(isCapabilityErrorCode),
|
|
165
|
+
reason: z.string().regex(/^[a-z][a-z0-9-]{0,63}$/)
|
|
166
|
+
});
|
|
167
|
+
/** A class name as a thrown class carries it; any other text is not printed as a name. */
|
|
168
|
+
const ClassNameSchema = z.string().regex(/^[A-Z][A-Za-z0-9]{0,62}(Error|Exception)$/).catch('Error');
|
|
169
|
+
/**
|
|
170
|
+
* A member or cause without its text, for the default (non-verbose) report:
|
|
171
|
+
* its code and reason when typed, else `Untyped failure: <class name>`. Its
|
|
172
|
+
* message is never printed, because an untyped one can carry the input.
|
|
173
|
+
*/
|
|
174
|
+
function valueFreeText(failure) {
|
|
175
|
+
const typed = TypedFactsSchema.safeParse(failure);
|
|
176
|
+
return typed.success ? `${typed.data.code} ${typed.data.reason}` : `Untyped failure: ${ClassNameSchema.parse(failure.name)}`;
|
|
177
|
+
}
|
|
178
|
+
function memberLines(member, verbose, indent = ' ') {
|
|
179
|
+
const text = verbose
|
|
180
|
+
? tagFirstLine(member.stack?.trim() || member.message, `${typedTag(member)}${pluginTag(member)}`)
|
|
181
|
+
: `${valueFreeText(member)}${pluginTag(member)}`;
|
|
182
|
+
const lines = [`${indent}- ${text}`];
|
|
183
|
+
// Logging already bounded and detached this tree; render its members at every level.
|
|
184
|
+
for (const child of describedMembers(member))
|
|
185
|
+
lines.push(...memberLines(child, verbose, `${indent} `));
|
|
186
|
+
for (const cause of causeChain(member)) {
|
|
187
|
+
const text = verbose
|
|
188
|
+
? tagFirstLine(cause.stack?.trim() || `${cause.name}: ${cause.message}`, `${typedTag(cause)}${pluginTag(cause)}`)
|
|
189
|
+
: `${valueFreeText(cause)}${pluginTag(cause)}`;
|
|
190
|
+
lines.push(`${indent} caused by: ${text}`);
|
|
191
|
+
for (const child of describedMembers(cause))
|
|
192
|
+
lines.push(...memberLines(child, verbose, `${indent} `));
|
|
193
|
+
}
|
|
194
|
+
return lines;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* The printable text of a failure (see the module comment). Never throws and
|
|
198
|
+
* never returns raw thrown text: every line is described, then scrubbed.
|
|
199
|
+
*/
|
|
200
|
+
export function renderCliFailure(caught, options) {
|
|
201
|
+
const failure = describeCliFailure(caught);
|
|
202
|
+
const lines = [];
|
|
203
|
+
if (options.verbose) {
|
|
204
|
+
lines.push(tagFirstLine(failure.stack?.trim() || failure.message.trim() || failure.name, typedTag(failure)));
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
const friendly = mapDescription(failure);
|
|
208
|
+
lines.push(stripBundlePaths(friendly ?? failure.message));
|
|
209
|
+
const hint = RecoveryHintSchema.safeParse(failure.fields);
|
|
210
|
+
if (friendly === null && hint.success)
|
|
211
|
+
lines.push(hint.data.recoveryHint);
|
|
212
|
+
}
|
|
213
|
+
for (const cause of causeChain(failure)) {
|
|
214
|
+
const members = describedMembers(cause);
|
|
215
|
+
if (options.verbose) {
|
|
216
|
+
lines.push(`caused by: ${tagFirstLine(cause.stack?.trim() || `${cause.name}: ${cause.message}`, `${typedTag(cause)}${pluginTag(cause)}`)}`);
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
lines.push(`caused by: ${valueFreeText(cause)}${pluginTag(cause)}`);
|
|
220
|
+
}
|
|
221
|
+
for (const member of members)
|
|
222
|
+
lines.push(...memberLines(member, options.verbose));
|
|
223
|
+
}
|
|
224
|
+
for (const member of describedMembers(failure))
|
|
225
|
+
lines.push(...memberLines(member, options.verbose));
|
|
226
|
+
const text = lines.filter((line) => line.trim() !== '').join('\n');
|
|
227
|
+
return scrubCliText(text, options.env);
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=failure-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failure-report.js","sourceRoot":"","sources":["../../src/surface/failure-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,iBAAiB,EAAoB,MAAM,sBAAsB,CAAC;AAClH,OAAO,EAAE,qBAAqB,EAAsB,MAAM,qBAAqB,CAAC;AAEhF,4FAA4F;AAC5F,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,OA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,CAAC,CAAC,CAAC;IACnF,CAAC;IACD,KAAK,MAAM,MAAM,IAAI,gBAAgB,CAAC,OAAO,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACpG,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnE,OAAO,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Group-command fallbacks: output-format normalization, unknown-subcommand refusal, and group help emission. */
|
|
2
|
+
import type { Command } from 'commander';
|
|
3
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel/api/runtime';
|
|
4
|
+
import type { CommandOptions } from '../schemas/surface.ts';
|
|
5
|
+
/**
|
|
6
|
+
* `--json` and `--format json` are ONE contract. Impls read whichever they
|
|
7
|
+
* were written against, so both spellings must land in both fields:
|
|
8
|
+
* `--json` → `format='json'`, `--format json` → `json=true`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function normalizeOutputFormatOptions(options: CommandOptions): void;
|
|
11
|
+
export declare function wantsJsonOutput(options: CommandOptions): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* A group with an action handler is dispatched by Commander even when its
|
|
14
|
+
* operands match no subcommand — the action fires and the operands are
|
|
15
|
+
* checked against the group's own (empty) argument list, which is how
|
|
16
|
+
* `vibes pm describe x` produced "too many arguments for 'pm'. Expected 0
|
|
17
|
+
* arguments but got 2." Groups without an action get Commander's proper
|
|
18
|
+
* `unknownCommand()` error and did-you-mean suggestion; give action-bearing
|
|
19
|
+
* groups the same one. `unknownCommand` is Commander's own (undocumented but
|
|
20
|
+
* stable since v7) implementation; fall back to its message format if a
|
|
21
|
+
* future version renames it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function rejectUnknownSubcommand(command: Command): void;
|
|
24
|
+
/**
|
|
25
|
+
* Group fallback when the TUI cannot launch and no subcommand was given.
|
|
26
|
+
* Under JSON output, help prose on stdout breaks every `JSON.parse(stdout)`
|
|
27
|
+
* consumer, so emit an envelope listing the subcommands and exit non-zero
|
|
28
|
+
* (the caller asked for data and there is none). Otherwise print help to
|
|
29
|
+
* stderr, keeping stdout clean for pipes.
|
|
30
|
+
*/
|
|
31
|
+
export declare function emitGroupHelpFallback(runtime: VibesRuntime, command: Command, options: CommandOptions): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=group-fallback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-fallback.d.ts","sourceRoot":"","sources":["../../src/surface/group-fallback.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAM1E;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAEhE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAS9D;AAOD;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB3H"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { writeJson } from "../commands/output.js";
|
|
2
|
+
import { requestCLIExit } from "./exit.js";
|
|
3
|
+
/**
|
|
4
|
+
* `--json` and `--format json` are ONE contract. Impls read whichever they
|
|
5
|
+
* were written against, so both spellings must land in both fields:
|
|
6
|
+
* `--json` → `format='json'`, `--format json` → `json=true`.
|
|
7
|
+
*/
|
|
8
|
+
export function normalizeOutputFormatOptions(options) {
|
|
9
|
+
if (options.json === true && options.format !== 'json') {
|
|
10
|
+
options.format = 'json';
|
|
11
|
+
}
|
|
12
|
+
else if (options.format === 'json' && options.json !== true) {
|
|
13
|
+
options.json = true;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export function wantsJsonOutput(options) {
|
|
17
|
+
return options.json === true || options.format === 'json';
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A group with an action handler is dispatched by Commander even when its
|
|
21
|
+
* operands match no subcommand — the action fires and the operands are
|
|
22
|
+
* checked against the group's own (empty) argument list, which is how
|
|
23
|
+
* `vibes pm describe x` produced "too many arguments for 'pm'. Expected 0
|
|
24
|
+
* arguments but got 2." Groups without an action get Commander's proper
|
|
25
|
+
* `unknownCommand()` error and did-you-mean suggestion; give action-bearing
|
|
26
|
+
* groups the same one. `unknownCommand` is Commander's own (undocumented but
|
|
27
|
+
* stable since v7) implementation; fall back to its message format if a
|
|
28
|
+
* future version renames it.
|
|
29
|
+
*/
|
|
30
|
+
export function rejectUnknownSubcommand(command) {
|
|
31
|
+
const [candidate] = command.args;
|
|
32
|
+
if (candidate === undefined || command.commands.length === 0)
|
|
33
|
+
return;
|
|
34
|
+
const known = command.commands.some((sub) => sub.name() === candidate || sub.aliases().includes(candidate));
|
|
35
|
+
if (known)
|
|
36
|
+
return;
|
|
37
|
+
if (hasUnknownCommand(command))
|
|
38
|
+
command.unknownCommand();
|
|
39
|
+
command.error(`error: unknown command '${candidate}'`, { code: 'commander.unknownCommand' });
|
|
40
|
+
}
|
|
41
|
+
/** Commander's internal `unknownCommand()` (present since v7, not in its typings). */
|
|
42
|
+
function hasUnknownCommand(command) {
|
|
43
|
+
return 'unknownCommand' in command && typeof command.unknownCommand === 'function';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Group fallback when the TUI cannot launch and no subcommand was given.
|
|
47
|
+
* Under JSON output, help prose on stdout breaks every `JSON.parse(stdout)`
|
|
48
|
+
* consumer, so emit an envelope listing the subcommands and exit non-zero
|
|
49
|
+
* (the caller asked for data and there is none). Otherwise print help to
|
|
50
|
+
* stderr, keeping stdout clean for pipes.
|
|
51
|
+
*/
|
|
52
|
+
export async function emitGroupHelpFallback(runtime, command, options) {
|
|
53
|
+
if (wantsJsonOutput(options)) {
|
|
54
|
+
await writeJson(runtime, {
|
|
55
|
+
ok: false,
|
|
56
|
+
error: 'no subcommand',
|
|
57
|
+
command: commandPath(command).join(' '),
|
|
58
|
+
commands: command
|
|
59
|
+
.createHelp()
|
|
60
|
+
.visibleCommands(command)
|
|
61
|
+
.map((sub) => ({
|
|
62
|
+
name: sub.name(),
|
|
63
|
+
aliases: sub.aliases(),
|
|
64
|
+
description: sub.description()
|
|
65
|
+
}))
|
|
66
|
+
});
|
|
67
|
+
requestCLIExit(1);
|
|
68
|
+
}
|
|
69
|
+
command.outputHelp({ error: true });
|
|
70
|
+
}
|
|
71
|
+
function commandPath(command) {
|
|
72
|
+
const path = [];
|
|
73
|
+
for (let cursor = command; cursor; cursor = cursor.parent) {
|
|
74
|
+
path.unshift(cursor.name());
|
|
75
|
+
}
|
|
76
|
+
return path;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=group-fallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-fallback.js","sourceRoot":"","sources":["../../src/surface/group-fallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAAuB;IACnE,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,IAAI,OAAO,CAAC,MAA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uB;IAC3G,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,MAAM,SAAS,CAAC,OAAO,EAAE;YACxB,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YACvC,QAAQ,EAAE,OAAO;iBACf,UAAU,EAAE;iBACZ,eAAe,CAAC,OAAO,CAAC;iBACxB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;gBACd,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE;gBAChB,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE;gBACtB,WAAW,EAAE,GAAG,CAAC,WAAW,EAAE;aAC9B,CAAC,CAAC;SACJ,CAAC,CAAC;QACH,cAAc,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,WAAW,CAAC,OAAgB;IACpC,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,KAAK,IAAI,MAAM,GAAmB,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC3E,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Explicit Commander surface. Metadata consumers use the root or ./kinds. */
|
|
2
|
+
export { CLISurface } from './CLISurface.ts';
|
|
3
|
+
export { reportBootstrapFailure, type ReportBootstrapFailureOptions } from './failure-output.ts';
|
|
4
|
+
export { renderCliFailure, scrubCliText, mapKnownError, type CliFailureRenderOptions } from './failure-report.ts';
|
|
5
|
+
export type { CLISurfaceOptions, CommandContext, CommandOptions, CommandOptionValue, CLIInvocationEndInfo, CLIInvocationInfo, CLIInvocationObserver, CLIInvocationPreparer, CLIResolvedEffects } from '../schemas/surface.ts';
|
|
6
|
+
export { CommandOptionValueSchema, CommandOptionsSchema } from '../schemas/surface.ts';
|
|
7
|
+
export { defineCommandImplementation, parseCommandOptions, type CommandImplementation, type TypedCommandImplementation } from './command-options.ts';
|
|
8
|
+
export { resolveCommandImplementation, type CliCommandExecute, type CommandImplementationResolution } from './command-implementation.ts';
|
|
9
|
+
export type { CliHostOutput } from '../boot/providers.ts';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/surface/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,KAAK,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAClH,YAAY,EACX,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EACrE,oBAAoB,EAAE,iBAAiB,EAAE,qBAAqB,EAC9D,qBAAqB,EAAE,kBAAkB,EACzC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACrJ,OAAO,EAAE,4BAA4B,EAAE,KAAK,iBAAiB,EAAE,KAAK,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AACzI,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Explicit Commander surface. Metadata consumers use the root or ./kinds. */
|
|
2
|
+
export { CLISurface } from "./CLISurface.js";
|
|
3
|
+
export { reportBootstrapFailure } from "./failure-output.js";
|
|
4
|
+
export { renderCliFailure, scrubCliText, mapKnownError } from "./failure-report.js";
|
|
5
|
+
export { CommandOptionValueSchema, CommandOptionsSchema } from "../schemas/surface.js";
|
|
6
|
+
export { defineCommandImplementation, parseCommandOptions } from "./command-options.js";
|
|
7
|
+
export { resolveCommandImplementation } from "./command-implementation.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/surface/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAsC,MAAM,qBAAqB,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAgC,MAAM,qBAAqB,CAAC;AAMlH,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAA+D,MAAM,sBAAsB,CAAC;AACrJ,OAAO,EAAE,4BAA4B,EAAgE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Command } from 'commander';
|
|
2
|
+
import type { CommandOptions } from '../schemas/surface.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Give command scopes their own copy of root global options.
|
|
5
|
+
*
|
|
6
|
+
* Commander normally lets a root option consume matching flags anywhere in
|
|
7
|
+
* argv. That makes a root `--version` steal a subcommand's own `--version`.
|
|
8
|
+
* Positional option parsing restores command ownership, while hidden inherited
|
|
9
|
+
* copies preserve the existing convenience of global flags after a subcommand.
|
|
10
|
+
*/
|
|
11
|
+
export declare function configureInheritedGlobalOptions(program: Command): void;
|
|
12
|
+
/**
|
|
13
|
+
* Merge an action command's option scopes without letting ancestor defaults
|
|
14
|
+
* overwrite values explicitly parsed by the selected command.
|
|
15
|
+
*
|
|
16
|
+
* Commander deliberately makes ancestors win in optsWithGlobals(). That is
|
|
17
|
+
* wrong once globals are cloned into command scopes: root `format=table` and
|
|
18
|
+
* `color=true` defaults would erase leaf `--format json` and `--no-color`.
|
|
19
|
+
* Source priority wins first; the deeper command wins equal-source ties.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveScopedCommandOptions(command: Command): CommandOptions;
|
|
22
|
+
/**
|
|
23
|
+
* Whether any scope of the selected command received `key` from something
|
|
24
|
+
* other than a declared default: the invocation asked for it, rather than
|
|
25
|
+
* Commander filling in the option's default (root `format=table`).
|
|
26
|
+
*/
|
|
27
|
+
export declare function optionValueIsExplicit(command: Command, key: string): boolean;
|
|
28
|
+
//# sourceMappingURL=inherited-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inherited-options.d.ts","sourceRoot":"","sources":["../../src/surface/inherited-options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAkC,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAQ5D;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CActE;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,CA0B5E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAK5E"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { parseCommandOptionBag } from "./command-options.js";
|
|
2
|
+
import { Option } from 'commander';
|
|
3
|
+
/**
|
|
4
|
+
* Give command scopes their own copy of root global options.
|
|
5
|
+
*
|
|
6
|
+
* Commander normally lets a root option consume matching flags anywhere in
|
|
7
|
+
* argv. That makes a root `--version` steal a subcommand's own `--version`.
|
|
8
|
+
* Positional option parsing restores command ownership, while hidden inherited
|
|
9
|
+
* copies preserve the existing convenience of global flags after a subcommand.
|
|
10
|
+
*/
|
|
11
|
+
export function configureInheritedGlobalOptions(program) {
|
|
12
|
+
const inherited = program.options.filter((option) => !isRootVersionOption(option));
|
|
13
|
+
program.enablePositionalOptions();
|
|
14
|
+
const visit = (command) => {
|
|
15
|
+
command.enablePositionalOptions();
|
|
16
|
+
for (const source of inherited) {
|
|
17
|
+
if (hasFlagConflict(command, source))
|
|
18
|
+
continue;
|
|
19
|
+
command.addOption(cloneInheritedOption(source));
|
|
20
|
+
}
|
|
21
|
+
for (const child of command.commands)
|
|
22
|
+
visit(child);
|
|
23
|
+
};
|
|
24
|
+
for (const command of program.commands)
|
|
25
|
+
visit(command);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Merge an action command's option scopes without letting ancestor defaults
|
|
29
|
+
* overwrite values explicitly parsed by the selected command.
|
|
30
|
+
*
|
|
31
|
+
* Commander deliberately makes ancestors win in optsWithGlobals(). That is
|
|
32
|
+
* wrong once globals are cloned into command scopes: root `format=table` and
|
|
33
|
+
* `color=true` defaults would erase leaf `--format json` and `--no-color`.
|
|
34
|
+
* Source priority wins first; the deeper command wins equal-source ties.
|
|
35
|
+
*/
|
|
36
|
+
export function resolveScopedCommandOptions(command) {
|
|
37
|
+
const chain = [];
|
|
38
|
+
for (let cursor = command; cursor; cursor = cursor.parent) {
|
|
39
|
+
chain.unshift(cursor);
|
|
40
|
+
}
|
|
41
|
+
const selected = new Map();
|
|
42
|
+
for (const [depth, scope] of chain.entries()) {
|
|
43
|
+
for (const [key, value] of Object.entries(scope.opts())) {
|
|
44
|
+
const candidate = {
|
|
45
|
+
value,
|
|
46
|
+
sourcePriority: optionSourcePriority(scope.getOptionValueSource(key)),
|
|
47
|
+
depth
|
|
48
|
+
};
|
|
49
|
+
const current = selected.get(key);
|
|
50
|
+
if (!current ||
|
|
51
|
+
candidate.sourcePriority > current.sourcePriority ||
|
|
52
|
+
(candidate.sourcePriority === current.sourcePriority && candidate.depth > current.depth)) {
|
|
53
|
+
selected.set(key, candidate);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return parseCommandOptionBag(Object.fromEntries(Array.from(selected, ([key, candidate]) => [key, candidate.value])));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Whether any scope of the selected command received `key` from something
|
|
61
|
+
* other than a declared default: the invocation asked for it, rather than
|
|
62
|
+
* Commander filling in the option's default (root `format=table`).
|
|
63
|
+
*/
|
|
64
|
+
export function optionValueIsExplicit(command, key) {
|
|
65
|
+
for (let cursor = command; cursor; cursor = cursor.parent) {
|
|
66
|
+
if (optionSourcePriority(cursor.getOptionValueSource(key)) > optionSourcePriority('default'))
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
function optionSourcePriority(source) {
|
|
72
|
+
switch (source) {
|
|
73
|
+
case 'cli':
|
|
74
|
+
return 5;
|
|
75
|
+
case 'env':
|
|
76
|
+
return 4;
|
|
77
|
+
case 'config':
|
|
78
|
+
return 3;
|
|
79
|
+
case 'implied':
|
|
80
|
+
return 2;
|
|
81
|
+
case 'default':
|
|
82
|
+
return 1;
|
|
83
|
+
case undefined:
|
|
84
|
+
return 0;
|
|
85
|
+
default:
|
|
86
|
+
// Commander permits author-defined sources. Treat them as stronger
|
|
87
|
+
// than defaults but weaker than its explicit CLI/env/config sources.
|
|
88
|
+
return 2;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function isRootVersionOption(option) {
|
|
92
|
+
return option.short === '-V' && option.long === '--version';
|
|
93
|
+
}
|
|
94
|
+
function hasFlagConflict(command, source) {
|
|
95
|
+
return command.options.some((option) => (source.short !== undefined && option.short === source.short) ||
|
|
96
|
+
(source.long !== undefined && option.long === source.long));
|
|
97
|
+
}
|
|
98
|
+
function cloneInheritedOption(source) {
|
|
99
|
+
const option = new Option(source.flags, source.description).hideHelp();
|
|
100
|
+
if (source.argChoices)
|
|
101
|
+
option.choices(source.argChoices);
|
|
102
|
+
if (source.parseArg)
|
|
103
|
+
option.argParser(source.parseArg);
|
|
104
|
+
if (source.presetArg !== undefined)
|
|
105
|
+
option.preset(source.presetArg);
|
|
106
|
+
return option;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=inherited-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inherited-options.js","sourceRoot":"","sources":["../../src/surface/inherited-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAgB,MAAM,EAA0B,MAAM,WAAW,CAAC;AASzE;;;;;;;GAOG;AACH,MAAM,UAAU,+BAA+B,CAAC,OAAgB;IAC/D,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAElC,MAAM,KAAK,GAAG,CAAC,OAAgB,EAAQ,EAAE;QACxC,OAAO,CAAC,uBAAuB,EAAE,CAAC;QAClC,KAAK,MAAM,MAAM,IAAI,SAAS,EAAE,CAAC;YAChC,IAAI,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC;gBAAE,SAAS;YAC/C,OAAO,CAAC,SAAS,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;QACjD,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,QAAQ;YAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC,CAAC;IAEF,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,QAAQ;QAAE,KAAK,CAAC,OAAO,CAAC,CAAC;AACxD,CAAC;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GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;IACvE,IAAI,MAAM,CAAC,UAAU;QAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACzD,IAAI,MAAM,CAAC,QAAQ;QAAE,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACvD,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;QAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpE,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel/api/runtime';
|
|
3
|
+
import { type CommandArguments } from './commander-action.ts';
|
|
4
|
+
import type { CommandOptions } from '../schemas/surface.ts';
|
|
5
|
+
interface TuiActionHooks {
|
|
6
|
+
beforeExecute?: (params: {
|
|
7
|
+
args: CommandArguments;
|
|
8
|
+
options: CommandOptions;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Minimal descriptor shape needed to attach an interactive launcher
|
|
13
|
+
* action. Both `cli/command` and `cli/group` descriptors satisfy it.
|
|
14
|
+
*
|
|
15
|
+
* `kind` decides what a positional means: a `cli/group` owns a subcommand
|
|
16
|
+
* tree, so a positional that is not a subcommand is an unknown command; a
|
|
17
|
+
* `cli/command` owns its declared arguments and keeps Commander's arity
|
|
18
|
+
* check. Omitted `kind` is treated as a command (the historical shape).
|
|
19
|
+
*/
|
|
20
|
+
export type { TuiActionDescriptor, TuiFallback, InteractiveGateInput } from './schemas/interactive-gate.ts';
|
|
21
|
+
import type { TuiActionDescriptor, TuiFallback, InteractiveGateInput } from './schemas/interactive-gate.ts';
|
|
22
|
+
/**
|
|
23
|
+
* Pure decision function for whether the CLI surface should launch the
|
|
24
|
+
* TUI given the runtime signals. Exported for unit testing — the live
|
|
25
|
+
* `cmd.action` handler reads host TTY/argv/env signals from the bun
|
|
26
|
+
* adapter and forwards them into this.
|
|
27
|
+
*/
|
|
28
|
+
export declare function shouldLaunchInteractive(input: InteractiveGateInput): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Register-time interactive action. Contains no TUI package import literals so `--help` / `--version` / MCP initialize can build the Commander
|
|
31
|
+
* tree without resolving TUI. The launch module is imported only after the
|
|
32
|
+
* gate decides to start the TUI.
|
|
33
|
+
*/
|
|
34
|
+
export declare function attachTuiAction(cmd: Command,
|
|
35
|
+
/**
|
|
36
|
+
* The runtime the TUI app launches on, or a getter for it. A serve command's
|
|
37
|
+
* transition replaces the surface's runtime before the action runs
|
|
38
|
+
* (rc02-rc03 §2.3), so the surface passes a getter.
|
|
39
|
+
*/
|
|
40
|
+
runtime: () => VibesRuntime, descriptor: TuiActionDescriptor, hooks?: TuiActionHooks, fallback?: TuiFallback): Promise<void>;
|
|
41
|
+
//# sourceMappingURL=interactive-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive-gate.d.ts","sourceRoot":"","sources":["../../src/surface/interactive-gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEhF,UAAU,cAAc;IACvB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE;QACxB,IAAI,EAAE,gBAAgB,CAAC;QACvB,OAAO,EAAE,cAAc,CAAC;KACxB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC5G,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE5G;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAqB5E;AAyBD;;;;GAIG;AACH,wBAAsB,eAAe,CACpC,GAAG,EAAE,OAAO;AACZ;;;;GAIG;AACH,OAAO,EAAE,MAAM,YAAY,EAC3B,UAAU,EAAE,mBAAmB,EAC/B,KAAK,GAAE,cAAmB,EAC1B,QAAQ,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,IAAI,CAAC,CAkEf"}
|