@vibesdotdev/cli 0.0.2 → 1.0.0-rc.3
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 +261 -1
- 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 +273 -136
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/support/ui/schemas/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/support/ui/schemas/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** UI toolkit contracts: construction options, progress reporting, and the output channel. */
|
|
2
|
+
import type CLIFormatClient from '../format.client.ts';
|
|
3
|
+
import type { RuntimeTerminalFacts } from '@vibesdotdev/kernel';
|
|
4
|
+
import type { TerminalPromptTransport } from '../../terminal-input.ts';
|
|
5
|
+
/** Construction options; `terminal` is the runtime's captured terminal facts (the CLI passes `runtime.localEnvironment.terminal`). */
|
|
6
|
+
export interface VibesUIToolkitOptions {
|
|
7
|
+
/** Activated runtime format client; omit only when callers use prompt and log methods. */
|
|
8
|
+
formats?: CLIFormatClient;
|
|
9
|
+
mode?: 'rich' | 'plain';
|
|
10
|
+
compact?: boolean;
|
|
11
|
+
autoExit?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The handed runtime's captured terminal facts. When supplied they alone
|
|
14
|
+
* decide interactivity, and a fact the host did not observe reads as "not a
|
|
15
|
+
* terminal". Omitted (a toolkit built outside a command context), the
|
|
16
|
+
* no terminal is assumed and prompts return non-interactive defaults. If captured facts say\n\t * interactive, a runtime-selected `cli/terminal-input` transport is required;\n\t * absence refuses `UNAVAILABLE / cli-terminal-input-unavailable`.
|
|
17
|
+
*/
|
|
18
|
+
terminal?: () => RuntimeTerminalFacts | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Runtime-resolved interactive input. When a host registered a
|
|
21
|
+
* `cli/terminal-input` context, the CLI resolves it through the handed
|
|
22
|
+
* runtime. An interactive prompt refuses when no transport was registered.
|
|
23
|
+
*/
|
|
24
|
+
terminalInput?: TerminalPromptTransport;
|
|
25
|
+
/** Where the toolkit writes: the CLI hands the executable host's output, else the runtime's `runtime/stdio`. */
|
|
26
|
+
output: UIToolkitOutput;
|
|
27
|
+
}
|
|
28
|
+
/** What `progress()` answers: line-oriented updates. */
|
|
29
|
+
export interface CLIProgressReporter {
|
|
30
|
+
update: (nextMessage?: string) => void;
|
|
31
|
+
complete: (nextMessage?: string) => void;
|
|
32
|
+
fail: (nextMessage?: string) => void;
|
|
33
|
+
}
|
|
34
|
+
/** Where the toolkit writes: a channel and the text. */
|
|
35
|
+
export interface UIToolkitOutput {
|
|
36
|
+
readonly write: (channel: 'stdout' | 'stderr', text: string) => void;
|
|
37
|
+
}
|
|
38
|
+
/** The prompt surface's inputs: the terminal facts source and where prompts write. */
|
|
39
|
+
export interface PromptIO {
|
|
40
|
+
terminal: (() => RuntimeTerminalFacts | undefined) | undefined;
|
|
41
|
+
output: UIToolkitOutput;
|
|
42
|
+
/** Runtime-resolved input; an interactive prompt refuses when it is absent. */
|
|
43
|
+
terminalInput?: TerminalPromptTransport;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=ui-toolkit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-toolkit.d.ts","sourceRoot":"","sources":["../../../../src/support/ui/schemas/ui-toolkit.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,KAAK,eAAe,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,sIAAsI;AACtI,MAAM,WAAW,qBAAqB;IACrC,0FAA0F;IAC1F,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,oBAAoB,GAAG,SAAS,CAAC;IAClD;;;;OAIG;IACH,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,gHAAgH;IAChH,MAAM,EAAE,eAAe,CAAC;CACxB;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE;AAED,sFAAsF;AACtF,MAAM,WAAW,QAAQ;IACxB,QAAQ,EAAE,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAC/D,MAAM,EAAE,eAAe,CAAC;IACxB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-toolkit.js","sourceRoot":"","sources":["../../../../src/support/ui/schemas/ui-toolkit.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type RuntimeRef } from '@vibesdotdev/kernel';
|
|
2
|
+
import { VibesUIToolkit, type UIToolkitOutput } from './toolkit.ts';
|
|
3
|
+
export declare const CLI_UI_FORMATS: readonly ["json", "yaml", "table", "markdown"];
|
|
4
|
+
export declare function listCliToolkitMethods(): string[];
|
|
5
|
+
declare function exerciseCliToolkit(ui: VibesUIToolkit): Promise<{
|
|
6
|
+
methods: string[];
|
|
7
|
+
formats: readonly ["json", "yaml", "table", "markdown"];
|
|
8
|
+
}>;
|
|
9
|
+
export declare function showcaseCliToolkit(runtime: RuntimeRef, output?: UIToolkitOutput): Promise<{
|
|
10
|
+
methods: string[];
|
|
11
|
+
formats: readonly ["json", "yaml", "table", "markdown"];
|
|
12
|
+
}>;
|
|
13
|
+
export declare function readCliToolkitShowcaseCoverage(runtime: RuntimeRef, methods?: readonly string[], runShowcase?: (ui: VibesUIToolkit) => void | PromiseLike<void | Awaited<ReturnType<typeof exerciseCliToolkit>>>): Promise<{
|
|
14
|
+
ok: boolean;
|
|
15
|
+
missing: string[];
|
|
16
|
+
}>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=showcase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcase.d.ts","sourceRoot":"","sources":["../../../src/support/ui/showcase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpE,eAAO,MAAM,cAAc,gDAAiD,CAAC;AAO7E,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAKhD;AAkBD,iBAAe,kBAAkB,CAAC,EAAE,EAAE,cAAc;;;GAgCnD;AAED,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,UAAU,EACnB,MAAM,GAAE,eAAuC;;;GAG/C;AAED,wBAAsB,8BAA8B,CACnD,OAAO,EAAE,UAAU,EACnB,OAAO,GAAE,SAAS,MAAM,EAA4B,EACpD,WAAW,GAAE,CAAC,EAAE,EAAE,cAAc,KAAK,IAAI,GAAG,WAAW,CAAC,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAsB;;;GAqCnI"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {} from '@vibesdotdev/kernel';
|
|
2
|
+
import { getVibesClient } from '@vibesdotdev/kernel/client';
|
|
3
|
+
import { cliOutputFormatPlugin } from "./format.plugin.js";
|
|
4
|
+
import { VibesUIToolkit } from "./toolkit.js";
|
|
5
|
+
export const CLI_UI_FORMATS = ['json', 'yaml', 'table', 'markdown'];
|
|
6
|
+
const discardShowcaseOutput = { write: () => undefined };
|
|
7
|
+
/** Members the class declares `private`: prompt plumbing no host surface calls. */
|
|
8
|
+
const PRIVATE_TOOLKIT_MEMBERS = new Set(['promptIO']);
|
|
9
|
+
export function listCliToolkitMethods() {
|
|
10
|
+
const names = Object.getOwnPropertyNames(VibesUIToolkit.prototype)
|
|
11
|
+
.filter((name) => name !== 'constructor' && !PRIVATE_TOOLKIT_MEMBERS.has(name))
|
|
12
|
+
.concat(['createSync']);
|
|
13
|
+
return [...new Set(names)].sort();
|
|
14
|
+
}
|
|
15
|
+
async function preparedToolkit(runtime, output) {
|
|
16
|
+
if (!runtime.hasPlugin('cli-output-formats')) {
|
|
17
|
+
await runtime.registerPlugin(cliOutputFormatPlugin);
|
|
18
|
+
}
|
|
19
|
+
const formats = await getVibesClient('cli-output-formats', runtime);
|
|
20
|
+
await formats.load();
|
|
21
|
+
return VibesUIToolkit.createSync({
|
|
22
|
+
mode: 'plain',
|
|
23
|
+
autoExit: false,
|
|
24
|
+
terminal: () => undefined,
|
|
25
|
+
formats,
|
|
26
|
+
output
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
async function exerciseCliToolkit(ui) {
|
|
30
|
+
const methods = listCliToolkitMethods();
|
|
31
|
+
for (const format of CLI_UI_FORMATS) {
|
|
32
|
+
ui.setFormat(format);
|
|
33
|
+
ui.info(`cli ui ${format}`);
|
|
34
|
+
ui.log(`cli ui log ${format}`);
|
|
35
|
+
ui.success(`cli ui success ${format}`);
|
|
36
|
+
ui.warn(`cli ui warn ${format}`);
|
|
37
|
+
ui.warning(`cli ui warning ${format}`);
|
|
38
|
+
ui.error(`cli ui error ${format}`);
|
|
39
|
+
ui.json({ format, ok: true });
|
|
40
|
+
ui.yaml({ format, ok: true });
|
|
41
|
+
ui.table([{ format, ok: true }], { columns: ['format', 'ok'] });
|
|
42
|
+
ui.keyValue({ format, ok: true });
|
|
43
|
+
ui.render([{ format }], { format });
|
|
44
|
+
const bar = ui.progress(`cli ui progress ${format}`);
|
|
45
|
+
bar.update(`cli ui progress update ${format}`);
|
|
46
|
+
bar.complete(`cli ui progress complete ${format}`);
|
|
47
|
+
bar.fail(`cli ui progress fail ${format}`);
|
|
48
|
+
}
|
|
49
|
+
await ui.prompt('cli ui prompt', { default: 'preview' });
|
|
50
|
+
await ui.password('cli ui password');
|
|
51
|
+
await ui.confirm('cli ui confirm', false);
|
|
52
|
+
await ui.select('cli ui select', [{ label: 'One', value: 'one' }], 'one');
|
|
53
|
+
await ui.multiselect('cli ui multiselect', [{ label: 'One', value: 'one' }]);
|
|
54
|
+
await ui.withCommand({ name: 'design-system' }, (toolkit) => {
|
|
55
|
+
toolkit.info('cli ui withCommand');
|
|
56
|
+
});
|
|
57
|
+
await ui.withInteractiveCommand({ name: 'design-system' }, (toolkit) => {
|
|
58
|
+
toolkit.info('cli ui withInteractiveCommand');
|
|
59
|
+
});
|
|
60
|
+
return { methods, formats: CLI_UI_FORMATS };
|
|
61
|
+
}
|
|
62
|
+
export async function showcaseCliToolkit(runtime, output = discardShowcaseOutput) {
|
|
63
|
+
return exerciseCliToolkit(await preparedToolkit(runtime, output));
|
|
64
|
+
}
|
|
65
|
+
export async function readCliToolkitShowcaseCoverage(runtime, methods = listCliToolkitMethods(), runShowcase = exerciseCliToolkit) {
|
|
66
|
+
const target = await preparedToolkit(runtime, discardShowcaseOutput);
|
|
67
|
+
const invoked = new Set(['createSync']);
|
|
68
|
+
function record(method, call) {
|
|
69
|
+
invoked.add(method);
|
|
70
|
+
return call();
|
|
71
|
+
}
|
|
72
|
+
// Contextual method types retain generic selection, rendering and handler results.
|
|
73
|
+
const observed = {
|
|
74
|
+
setFormat: (format) => record('setFormat', () => target.setFormat(format)),
|
|
75
|
+
info: (message) => record('info', () => target.info(message)),
|
|
76
|
+
success: (message) => record('success', () => target.success(message)),
|
|
77
|
+
warn: (message) => record('warn', () => target.warn(message)),
|
|
78
|
+
warning: (message) => record('warning', () => target.warning(message)),
|
|
79
|
+
error: (message) => record('error', () => target.error(message)),
|
|
80
|
+
log: (message) => record('log', () => target.log(message)),
|
|
81
|
+
prompt: (message, options) => record('prompt', () => target.prompt(message, options)),
|
|
82
|
+
password: (message, options) => record('password', () => target.password(message, options)),
|
|
83
|
+
confirm: (message, defaultValue) => record('confirm', () => target.confirm(message, defaultValue)),
|
|
84
|
+
select: (message, options, defaultValue) => record('select', () => target.select(message, options, defaultValue)),
|
|
85
|
+
multiselect: (message, options, required) => record('multiselect', () => target.multiselect(message, options, required)),
|
|
86
|
+
table: (data, options) => record('table', () => target.table(data, options)),
|
|
87
|
+
json: (data) => record('json', () => target.json(data)),
|
|
88
|
+
yaml: (data) => record('yaml', () => target.yaml(data)),
|
|
89
|
+
keyValue: (data) => record('keyValue', () => target.keyValue(data)),
|
|
90
|
+
render: (data, options) => record('render', () => target.render(data, options)),
|
|
91
|
+
progress: (message) => record('progress', () => target.progress(message)),
|
|
92
|
+
withCommand: (command, handler) => record('withCommand', () => target.withCommand(command, handler)),
|
|
93
|
+
withInteractiveCommand: (command, handler) => record('withInteractiveCommand', () => target.withInteractiveCommand(command, handler))
|
|
94
|
+
};
|
|
95
|
+
const instrumented = await preparedToolkit(runtime, discardShowcaseOutput);
|
|
96
|
+
Object.assign(instrumented, observed);
|
|
97
|
+
await runShowcase(instrumented);
|
|
98
|
+
const missing = methods.filter((method) => !invoked.has(method));
|
|
99
|
+
return { ok: missing.length === 0, missing };
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=showcase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcase.js","sourceRoot":"","sources":["../../../src/support/ui/showcase.ts"],"names":[],"m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AG,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Boxed text-table rendering: column projection, cell text, and the box rules. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
/** `table` options: a column list, a title, or `{ columns, title }` (a title on the object form is honored too). */
|
|
4
|
+
export declare const TableOptionsSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<{
|
|
5
|
+
columns: string[];
|
|
6
|
+
title: undefined;
|
|
7
|
+
}, string[]>>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
8
|
+
title: string;
|
|
9
|
+
columns: undefined;
|
|
10
|
+
}, string>>, z.ZodObject<{
|
|
11
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
+
title: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodUndefined, z.ZodTransform<{
|
|
14
|
+
columns: undefined;
|
|
15
|
+
title: undefined;
|
|
16
|
+
}, undefined>>]>;
|
|
17
|
+
/**
|
|
18
|
+
* A table row reduced to `columns`, read off the row itself (own or inherited
|
|
19
|
+
* fields alike); a primitive row is shown as itself.
|
|
20
|
+
*/
|
|
21
|
+
export declare function projectColumns<TRow>(row: TRow, columns: readonly string[]): TRow | Record<string, TRow[keyof TRow] | undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* Render rows as a boxed text table. Object rows contribute their own keys as
|
|
24
|
+
* columns, in first-seen order; primitive rows are shown in a `Values` column.
|
|
25
|
+
* Projected rows (`table(rows, columns)`) carry exactly the requested columns.
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatTable<TRow>(rows: readonly TRow[]): string;
|
|
28
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/support/ui/table.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,oHAAoH;AACpH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;gBAK7B,CAAC;AAEH;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,CAI/H;AAqBD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,IAAI,EAAE,GAAG,MAAM,CA+B/D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** Boxed text-table rendering: column projection, cell text, and the box rules. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
/** `table` options: a column list, a title, or `{ columns, title }` (a title on the object form is honored too). */
|
|
4
|
+
export const TableOptionsSchema = z.union([
|
|
5
|
+
z.array(z.string()).transform((columns) => ({ columns, title: undefined })),
|
|
6
|
+
z.string().transform((title) => ({ title, columns: undefined })),
|
|
7
|
+
z.object({ columns: z.array(z.string()).optional(), title: z.string().optional() }),
|
|
8
|
+
z.undefined().transform(() => ({ columns: undefined, title: undefined }))
|
|
9
|
+
]);
|
|
10
|
+
/**
|
|
11
|
+
* A table row reduced to `columns`, read off the row itself (own or inherited
|
|
12
|
+
* fields alike); a primitive row is shown as itself.
|
|
13
|
+
*/
|
|
14
|
+
export function projectColumns(row, columns) {
|
|
15
|
+
if (Object(row) !== row)
|
|
16
|
+
return row;
|
|
17
|
+
const source = Object(row);
|
|
18
|
+
return Object.fromEntries(columns.map((column) => [column, column in source ? source[column] : undefined]));
|
|
19
|
+
}
|
|
20
|
+
/** A cell value printed as itself: text, numbers, booleans, bigints and `null`. */
|
|
21
|
+
const ScalarCellSchema = z.union([z.string(), z.number(), z.boolean(), z.bigint(), z.null()]);
|
|
22
|
+
/** The column a primitive row (a number, a string, `null`) is shown in. */
|
|
23
|
+
const VALUES_COLUMN = 'Values';
|
|
24
|
+
/** One cell's text: scalars as themselves, `undefined` empty, anything else as JSON; always one line. */
|
|
25
|
+
function cellText(value) {
|
|
26
|
+
if (value === undefined)
|
|
27
|
+
return '';
|
|
28
|
+
const scalar = ScalarCellSchema.safeParse(value);
|
|
29
|
+
const text = scalar.success ? String(scalar.data) : (JSON.stringify(value) ?? '');
|
|
30
|
+
return text.replace(/\r?\n/g, ' ');
|
|
31
|
+
}
|
|
32
|
+
/** Display width in code points (a box column is padded to its widest cell). */
|
|
33
|
+
function textWidth(text) {
|
|
34
|
+
return Array.from(text).length;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Render rows as a boxed text table. Object rows contribute their own keys as
|
|
38
|
+
* columns, in first-seen order; primitive rows are shown in a `Values` column.
|
|
39
|
+
* Projected rows (`table(rows, columns)`) carry exactly the requested columns.
|
|
40
|
+
*/
|
|
41
|
+
export function formatTable(rows) {
|
|
42
|
+
const columns = [];
|
|
43
|
+
let primitives = false;
|
|
44
|
+
for (const row of rows) {
|
|
45
|
+
if (Object(row) !== row) {
|
|
46
|
+
primitives = true;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
for (const key of Object.keys(Object(row)))
|
|
50
|
+
if (!columns.includes(key))
|
|
51
|
+
columns.push(key);
|
|
52
|
+
}
|
|
53
|
+
if (primitives)
|
|
54
|
+
columns.push(VALUES_COLUMN);
|
|
55
|
+
if (columns.length === 0)
|
|
56
|
+
return '(no rows)';
|
|
57
|
+
const cells = rows.map((row) => {
|
|
58
|
+
if (Object(row) !== row)
|
|
59
|
+
return columns.map((column) => (column === VALUES_COLUMN ? cellText(row) : ''));
|
|
60
|
+
const record = Object(row);
|
|
61
|
+
return columns.map((column) => (Object.hasOwn(record, column) ? cellText(record[column]) : ''));
|
|
62
|
+
});
|
|
63
|
+
const widths = columns.map((column, index) => Math.max(textWidth(column), ...cells.map((line) => textWidth(line[index] ?? ''))));
|
|
64
|
+
const rule = (left, middle, right) => `${left}${widths.map((width) => '─'.repeat(width + 2)).join(middle)}${right}`;
|
|
65
|
+
const line = (values) => `│${values.map((value, index) => ` ${value}${' '.repeat((widths[index] ?? 0) - textWidth(value))} `).join('│')}│`;
|
|
66
|
+
return [
|
|
67
|
+
rule('┌', '┬', '┐'),
|
|
68
|
+
line(columns),
|
|
69
|
+
rule('├', '┼', '┤'),
|
|
70
|
+
...cells.map(line),
|
|
71
|
+
rule('└', '┴', '┘')
|
|
72
|
+
].join('\n');
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/support/ui/table.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,oHAAoH;AACpH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC;IACzC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3E,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IACnF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AG,EAAE,GAAG,EAAE,GAAG,CAAC;KACnB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type RenderOptions } from '../../schemas/output-format.ts';
|
|
2
|
+
import type { PromptOptions, ConfirmMessage, SelectionEntry } from '../../schemas/prompts.ts';
|
|
3
|
+
import type { PasswordPromptOptions } from '@vibesdotdev/cli-contracts/context';
|
|
4
|
+
export type { VibesUIToolkitOptions, CLIProgressReporter, UIToolkitOutput } from './schemas/ui-toolkit.ts';
|
|
5
|
+
import type { CLIProgressReporter, VibesUIToolkitOptions } from './schemas/ui-toolkit.ts';
|
|
6
|
+
export declare class VibesUIToolkit {
|
|
7
|
+
private format;
|
|
8
|
+
private readonly formats;
|
|
9
|
+
private readonly terminal;
|
|
10
|
+
private readonly sink;
|
|
11
|
+
private readonly terminalInput;
|
|
12
|
+
constructor(options: VibesUIToolkitOptions);
|
|
13
|
+
/** The prompt surface's inputs, under its named owner contract. */
|
|
14
|
+
private promptIO;
|
|
15
|
+
static createSync(options: VibesUIToolkitOptions): VibesUIToolkit;
|
|
16
|
+
setFormat(format: string): void;
|
|
17
|
+
info(message: string): void;
|
|
18
|
+
success(message: string): void;
|
|
19
|
+
warn(message: string): void;
|
|
20
|
+
warning(message: string): void;
|
|
21
|
+
error(message: string): void;
|
|
22
|
+
log(message: string): void;
|
|
23
|
+
prompt(message: string, options?: PromptOptions): Promise<string | null>;
|
|
24
|
+
password(message: string, options?: PasswordPromptOptions): Promise<string | null>;
|
|
25
|
+
confirm(message: ConfirmMessage, defaultValue?: boolean): Promise<boolean>;
|
|
26
|
+
select<T>(message: string, options: SelectionEntry<T>[], defaultValue?: T): Promise<T | null>;
|
|
27
|
+
multiselect<T>(message: string, options: SelectionEntry<T>[], required?: boolean): Promise<T[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Render rows through the formatter selected for the current format. The
|
|
30
|
+
* formatter owns table rendering; `table` is optional on its contract, so a
|
|
31
|
+
* replacement that supplies only render() renders the table data itself, with
|
|
32
|
+
* the declared options preserved.
|
|
33
|
+
*/
|
|
34
|
+
table<TRow>(data: TRow[], options?: {
|
|
35
|
+
columns?: string[];
|
|
36
|
+
title?: string;
|
|
37
|
+
} | string | string[]): void;
|
|
38
|
+
/**
|
|
39
|
+
* Render a value in a caller-selected format. Convenience over `json`/`yaml`/
|
|
40
|
+
* `table` for command impls that defer format to an `--output` flag.
|
|
41
|
+
*/
|
|
42
|
+
render<TData>(data: TData, options?: RenderOptions): void;
|
|
43
|
+
json<TData>(data: TData): void;
|
|
44
|
+
yaml<TData>(data: TData): void;
|
|
45
|
+
keyValue<TValue>(data: Record<string, TValue>): void;
|
|
46
|
+
progress(message?: string): CLIProgressReporter;
|
|
47
|
+
withCommand<T>(_command: {
|
|
48
|
+
name?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
}, handler: (toolkit: VibesUIToolkit) => Promise<T> | T): Promise<T>;
|
|
51
|
+
withInteractiveCommand<T>(command: {
|
|
52
|
+
name?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
}, handler: (toolkit: VibesUIToolkit) => Promise<T> | T): Promise<T>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=toolkit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolkit.d.ts","sourceRoot":"","sources":["../../../src/support/ui/toolkit.ts"],"names":[],"mappings":"AAKA,OAAO,EAA8E,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEhJ,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE9F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhF,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,KAAK,EAAE,mBAAmB,EAAmB,qBAAqB,E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
|
|
2
|
+
* `VibesUIToolkit`: terminal formatting (json/yaml/table/markdown) and
|
|
3
|
+
* interactive prompts, writing through a caller-supplied output channel.
|
|
4
|
+
*/
|
|
5
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
6
|
+
import { OutputFormatSchema, RenderOptionsSchema } from "../../schemas/output-format.js";
|
|
7
|
+
import { renderWithFormatter } from "./formats.js";
|
|
8
|
+
import { TableOptionsSchema } from "./table.js";
|
|
9
|
+
import { promptConfirm, promptMultiselect, promptPassword, promptSelect, promptValue } from "./prompts.js";
|
|
10
|
+
/** One line to the toolkit's output channel. */
|
|
11
|
+
function writeLine(output, channel, message) {
|
|
12
|
+
output.write(channel, `${message}\n`);
|
|
13
|
+
}
|
|
14
|
+
function unavailableFormat() {
|
|
15
|
+
throw new CapabilityError('Output format is unavailable or has not been activated.', 'NOT_FOUND', {
|
|
16
|
+
reason: 'cli-output-format-unavailable'
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export class VibesUIToolkit {
|
|
20
|
+
format = 'table';
|
|
21
|
+
formats;
|
|
22
|
+
terminal;
|
|
23
|
+
sink;
|
|
24
|
+
terminalInput;
|
|
25
|
+
constructor(options) {
|
|
26
|
+
this.formats = options.formats;
|
|
27
|
+
this.terminal = options.terminal;
|
|
28
|
+
this.sink = options.output;
|
|
29
|
+
this.terminalInput = options.terminalInput;
|
|
30
|
+
}
|
|
31
|
+
/** The prompt surface's inputs, under its named owner contract. */
|
|
32
|
+
promptIO() {
|
|
33
|
+
return { terminal: this.terminal, output: this.sink, terminalInput: this.terminalInput };
|
|
34
|
+
}
|
|
35
|
+
static createSync(options) {
|
|
36
|
+
return new VibesUIToolkit(options);
|
|
37
|
+
}
|
|
38
|
+
setFormat(format) {
|
|
39
|
+
this.format = OutputFormatSchema.parse(format);
|
|
40
|
+
}
|
|
41
|
+
info(message) {
|
|
42
|
+
writeLine(this.sink, 'stdout', message);
|
|
43
|
+
}
|
|
44
|
+
success(message) {
|
|
45
|
+
writeLine(this.sink, 'stdout', message);
|
|
46
|
+
}
|
|
47
|
+
warn(message) {
|
|
48
|
+
writeLine(this.sink, 'stderr', message);
|
|
49
|
+
}
|
|
50
|
+
warning(message) {
|
|
51
|
+
this.warn(message);
|
|
52
|
+
}
|
|
53
|
+
error(message) {
|
|
54
|
+
writeLine(this.sink, 'stderr', message);
|
|
55
|
+
}
|
|
56
|
+
log(message) {
|
|
57
|
+
writeLine(this.sink, 'stdout', message);
|
|
58
|
+
}
|
|
59
|
+
async prompt(message, options = {}) {
|
|
60
|
+
return promptValue(this.promptIO(), message, options);
|
|
61
|
+
}
|
|
62
|
+
async password(message, options = {}) {
|
|
63
|
+
return promptPassword(this.promptIO(), message, options);
|
|
64
|
+
}
|
|
65
|
+
async confirm(message, defaultValue = false) {
|
|
66
|
+
return promptConfirm(this.promptIO(), message, defaultValue);
|
|
67
|
+
}
|
|
68
|
+
async select(message, options, defaultValue) {
|
|
69
|
+
return promptSelect(this.promptIO(), message, options, defaultValue);
|
|
70
|
+
}
|
|
71
|
+
async multiselect(message, options, required = false) {
|
|
72
|
+
return promptMultiselect(this.promptIO(), message, options, required);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Render rows through the formatter selected for the current format. The
|
|
76
|
+
* formatter owns table rendering; `table` is optional on its contract, so a
|
|
77
|
+
* replacement that supplies only render() renders the table data itself, with
|
|
78
|
+
* the declared options preserved.
|
|
79
|
+
*/
|
|
80
|
+
table(data, options) {
|
|
81
|
+
const { title, columns } = TableOptionsSchema.parse(options);
|
|
82
|
+
const renderOptions = { table: { data, columns, title } };
|
|
83
|
+
// The selected formatter owns table rendering; `table` is optional on its
|
|
84
|
+
// contract, so a replacement that supplies only render() renders the table
|
|
85
|
+
// data itself, with the declared options preserved. A standalone toolkit
|
|
86
|
+
// requires an activated formatter from the runtime owner.
|
|
87
|
+
const formatter = this.formats?.formatter(this.format) ?? unavailableFormat();
|
|
88
|
+
if (formatter.table) {
|
|
89
|
+
writeLine(this.sink, 'stdout', formatter.table(data, renderOptions));
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const rendered = renderWithFormatter(data, formatter, renderOptions);
|
|
93
|
+
writeLine(this.sink, 'stdout', title ? `${title}\n${rendered}` : rendered);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Render a value in a caller-selected format. Convenience over `json`/`yaml`/
|
|
97
|
+
* `table` for command impls that defer format to an `--output` flag.
|
|
98
|
+
*/
|
|
99
|
+
render(data, options = {}) {
|
|
100
|
+
const parsed = RenderOptionsSchema.parse(options);
|
|
101
|
+
const format = parsed.format ?? this.format;
|
|
102
|
+
const formatter = this.formats?.formatter(format) ?? unavailableFormat();
|
|
103
|
+
writeLine(this.sink, 'stdout', renderWithFormatter(data, formatter, { table: parsed.table }));
|
|
104
|
+
}
|
|
105
|
+
json(data) {
|
|
106
|
+
this.render(data, { format: 'json' });
|
|
107
|
+
}
|
|
108
|
+
yaml(data) {
|
|
109
|
+
this.render(data, { format: 'yaml' });
|
|
110
|
+
}
|
|
111
|
+
keyValue(data) {
|
|
112
|
+
this.table(Object.entries(data).map(([key, value]) => ({ key, value })));
|
|
113
|
+
}
|
|
114
|
+
progress(message) {
|
|
115
|
+
if (message)
|
|
116
|
+
writeLine(this.sink, 'stdout', message);
|
|
117
|
+
return {
|
|
118
|
+
update: (nextMessage) => nextMessage && writeLine(this.sink, 'stdout', nextMessage),
|
|
119
|
+
complete: (nextMessage) => nextMessage && writeLine(this.sink, 'stdout', nextMessage),
|
|
120
|
+
fail: (nextMessage) => nextMessage && writeLine(this.sink, 'stderr', nextMessage)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
async withCommand(_command, handler) {
|
|
124
|
+
return await handler(this);
|
|
125
|
+
}
|
|
126
|
+
async withInteractiveCommand(command, handler) {
|
|
127
|
+
return this.withCommand(command, handler);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=toolkit.js.map
|
|
@@ -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AC,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;YAC5F,QAAQ,EAAE,CAAC,WAAoB,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;YAC9F,IAAI,EAAE,CAAC,WAAoB,EAAE,EAAE,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;SAC1F,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAChB,QAAiD,EACjD,OAAoD;QAEpD,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,sBAAsB,CAC3B,OAAgD,EAChD,OAAoD;QAEpD,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/support/vibesdev/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/support/vibesdev/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,CAAC"}
|
|
@@ -1,16 +1,90 @@
|
|
|
1
|
+
export { argvWantsJson } from './failure-output.ts';
|
|
1
2
|
import { Command } from 'commander';
|
|
2
|
-
import type { VibesRuntime } from '@vibesdotdev/
|
|
3
|
-
import
|
|
3
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel/api/runtime';
|
|
4
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
5
|
+
import type { CLIInvocationObserver, CLIInvocationPreparer, CLISurfaceOptions } from '../schemas/surface.ts';
|
|
6
|
+
export { buildJsonFailureEnvelope, writeJsonEnvelope, reportBootstrapFailure } from './failure-output.ts';
|
|
7
|
+
export type { JsonFailureEnvelope, CliFailureEnvelope, ReportBootstrapFailureOptions } from './schemas/CLISurface.ts';
|
|
8
|
+
export { mapKnownError, renderCliFailure } from './failure-report.ts';
|
|
4
9
|
export declare class CLISurface {
|
|
5
10
|
private runtime;
|
|
6
11
|
private program;
|
|
7
12
|
private options;
|
|
8
13
|
private groups;
|
|
9
14
|
private groupDescriptors;
|
|
15
|
+
private readonly commandRecommendations;
|
|
10
16
|
private patternResolver;
|
|
11
17
|
private initialized;
|
|
18
|
+
private runtimeWriter;
|
|
19
|
+
private readonly invocationController;
|
|
20
|
+
private readonly invocationDescriptors;
|
|
21
|
+
private readonly invocationPreparers;
|
|
22
|
+
/** The overlay the dispatched action runs with; set once its preparation completes. */
|
|
23
|
+
private actionInvocation;
|
|
24
|
+
/** The host env snapshot failure text is scrubbed against; read before any runtime this surface holds is disposed. */
|
|
25
|
+
private capturedHostEnv;
|
|
26
|
+
/** The host output plane this surface installed, and the runtime it was resolved on (its methods refuse once that runtime is disposed). */
|
|
27
|
+
private outputPlane;
|
|
12
28
|
constructor(runtime: VibesRuntime, program: Command, options?: CLISurfaceOptions);
|
|
29
|
+
/** The host env snapshot, read once while the held runtime is live. */
|
|
30
|
+
private hostEnv;
|
|
31
|
+
/**
|
|
32
|
+
* The runtime the selected action runs on: the host's CLI runtime, or the
|
|
33
|
+
* serve host a serve command's transition booted (rc02-rc03 §2.3).
|
|
34
|
+
*/
|
|
35
|
+
get activeRuntime(): VibesRuntime;
|
|
36
|
+
setInvocationObserver<Token>(observer: CLIInvocationObserver<Token> | undefined): void;
|
|
37
|
+
/**
|
|
38
|
+
* Observer failures this surface could not log because the action's runtime
|
|
39
|
+
* had no logging to take them: typed `UNAVAILABLE`
|
|
40
|
+
* `observer-failure-unlogged` diagnostics (value-free observer facts in
|
|
41
|
+
* `details`, the logging refusal as `cause`). They never change an outcome.
|
|
42
|
+
*/
|
|
43
|
+
get invocationDiagnostics(): readonly CapabilityError[];
|
|
44
|
+
setInvocationPreparer(preparer: CLIInvocationPreparer | undefined): void;
|
|
45
|
+
addInvocationPreparer(preparer: CLIInvocationPreparer): void;
|
|
46
|
+
prependInvocationPreparer(preparer: CLIInvocationPreparer): void;
|
|
13
47
|
initialize(): Promise<void>;
|
|
14
|
-
run(argv
|
|
48
|
+
run(argv: string[]): Promise<number>;
|
|
49
|
+
/**
|
|
50
|
+
* Whether this invocation already put its JSON document on stdout, through
|
|
51
|
+
* the runtime its command was handed (`context.runtime`: the serve host
|
|
52
|
+
* after a serve transition), including the canonically bound free form.
|
|
53
|
+
*/
|
|
54
|
+
private jsonDocumentWritten;
|
|
55
|
+
/**
|
|
56
|
+
* Where the surface writes: the executable host's output, else the text
|
|
57
|
+
* output of the runtime it holds (resolved by `resolveWriter` as a run
|
|
58
|
+
* starts, and again when a serve transition swaps the runtime).
|
|
59
|
+
*/
|
|
60
|
+
private get writer();
|
|
61
|
+
/** Resolve the held runtime's text output as the surface's writer when no host output was handed. */
|
|
62
|
+
private resolveWriter;
|
|
63
|
+
/**
|
|
64
|
+
* Join every tracked write: through the host's own output when it handed
|
|
65
|
+
* one (usable after any disposal), else through the installed plane while
|
|
66
|
+
* the runtime it was resolved on is live.
|
|
67
|
+
*/
|
|
68
|
+
private flushOutput;
|
|
69
|
+
/**
|
|
70
|
+
* Answer help or dispatch the selected action. Answers the exit code a help
|
|
71
|
+
* path chose (`undefined` when the action ran and chose none); throws what
|
|
72
|
+
* Commander or the action threw.
|
|
73
|
+
*/
|
|
74
|
+
private dispatch;
|
|
75
|
+
/**
|
|
76
|
+
* Close the invocation with the failure's outcome, render the failure once
|
|
77
|
+
* (a JSON envelope under --json, otherwise the one renderer's text), and
|
|
78
|
+
* answer the exit code it projects to.
|
|
79
|
+
*/
|
|
80
|
+
private reportRunFailure;
|
|
81
|
+
/**
|
|
82
|
+
* The host's exit-boundary work (disposal of the active runtime). Its
|
|
83
|
+
* failure is a failure of the invocation: reported once through the one
|
|
84
|
+
* renderer — an `AggregateError` lists each plugin and its typed reason —
|
|
85
|
+
* and the exit code becomes non-zero. It never escapes as an unhandled
|
|
86
|
+
* rejection with only the aggregate's message.
|
|
87
|
+
*/
|
|
88
|
+
private finishBeforeAutoExit;
|
|
15
89
|
}
|
|
16
90
|
//# sourceMappingURL=CLISurface.d.ts.map
|