@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,112 @@
|
|
|
1
|
+
import { normalizeCLIArgumentName } from "./argument-name.js";
|
|
2
|
+
import { emitGroupHelpFallback, normalizeOutputFormatOptions, rejectUnknownSubcommand } from "./group-fallback.js";
|
|
3
|
+
import { readCommanderAction } from "./commander-action.js";
|
|
4
|
+
/**
|
|
5
|
+
* Pure decision function for whether the CLI surface should launch the
|
|
6
|
+
* TUI given the runtime signals. Exported for unit testing — the live
|
|
7
|
+
* `cmd.action` handler reads host TTY/argv/env signals from the bun
|
|
8
|
+
* adapter and forwards them into this.
|
|
9
|
+
*/
|
|
10
|
+
export function shouldLaunchInteractive(input) {
|
|
11
|
+
const { launchWhen, hasPositionalArgs, stdoutIsTTY, stdinIsTTY, nonInteractiveFlag, forceTtyEnv } = input;
|
|
12
|
+
if (nonInteractiveFlag)
|
|
13
|
+
return false;
|
|
14
|
+
if (launchWhen === 'explicit')
|
|
15
|
+
return false;
|
|
16
|
+
// `VIBES_FORCE_TTY=1` bypasses TTY checks for E2E and headless tooling.
|
|
17
|
+
const ttyOk = forceTtyEnv || (stdoutIsTTY && stdinIsTTY);
|
|
18
|
+
if (!ttyOk)
|
|
19
|
+
return false;
|
|
20
|
+
if (launchWhen === 'always')
|
|
21
|
+
return true;
|
|
22
|
+
if (launchWhen === 'noArgsAndTty')
|
|
23
|
+
return !hasPositionalArgs;
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
function readInteractiveSignals(descriptor, actionArgs) {
|
|
27
|
+
const args = {};
|
|
28
|
+
let hasPositionalArgs = false;
|
|
29
|
+
if (descriptor.arguments) {
|
|
30
|
+
descriptor.arguments.forEach((arg, i) => {
|
|
31
|
+
if (i < actionArgs.length) {
|
|
32
|
+
const value = actionArgs[i];
|
|
33
|
+
args[normalizeCLIArgumentName(arg.name)] = value;
|
|
34
|
+
if (value !== undefined && value !== '') {
|
|
35
|
+
hasPositionalArgs = true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return { args, hasPositionalArgs };
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Register-time interactive action. Contains no TUI package import literals so `--help` / `--version` / MCP initialize can build the Commander
|
|
44
|
+
* tree without resolving TUI. The launch module is imported only after the
|
|
45
|
+
* gate decides to start the TUI.
|
|
46
|
+
*/
|
|
47
|
+
export async function attachTuiAction(cmd,
|
|
48
|
+
/**
|
|
49
|
+
* The runtime the TUI app launches on, or a getter for it. A serve command's
|
|
50
|
+
* transition replaces the surface's runtime before the action runs
|
|
51
|
+
* (rc02-rc03 §2.3), so the surface passes a getter.
|
|
52
|
+
*/
|
|
53
|
+
runtime, descriptor, hooks = {}, fallback) {
|
|
54
|
+
const interactive = descriptor.interactive;
|
|
55
|
+
if (!interactive) {
|
|
56
|
+
throw new Error('[CLI] attachTuiAction called without an `interactive` descriptor.');
|
|
57
|
+
}
|
|
58
|
+
const appId = interactive.appId;
|
|
59
|
+
const isGroup = descriptor.kind === 'cli/group';
|
|
60
|
+
if (isGroup) {
|
|
61
|
+
// Let operands reach the action instead of Commander's arity check so
|
|
62
|
+
// `rejectUnknownSubcommand` can answer with the unknown-command error.
|
|
63
|
+
// A variadic argument (not `allowExcessArguments`) because children
|
|
64
|
+
// created later copy the excess-arguments setting from their parent,
|
|
65
|
+
// which would have silenced arity errors on every leaf command. The
|
|
66
|
+
// argument carries no description so help does not list it, and the
|
|
67
|
+
// usage line is pinned to what a group shows anyway.
|
|
68
|
+
cmd.argument('[subcommand...]');
|
|
69
|
+
cmd.usage('[options] [command]');
|
|
70
|
+
}
|
|
71
|
+
cmd.action(async (...actionArgs) => {
|
|
72
|
+
// Commander passes (...positionals, options, command). Pop in
|
|
73
|
+
// reverse so we can merge globals by source the same way the
|
|
74
|
+
// non-interactive path does.
|
|
75
|
+
const { positionals, options, command: commandObj } = readCommanderAction(actionArgs);
|
|
76
|
+
normalizeOutputFormatOptions(options);
|
|
77
|
+
if (isGroup && commandObj)
|
|
78
|
+
rejectUnknownSubcommand(commandObj);
|
|
79
|
+
const { args, hasPositionalArgs } = readInteractiveSignals(descriptor, positionals);
|
|
80
|
+
if (hooks.beforeExecute) {
|
|
81
|
+
await hooks.beforeExecute({ args, options });
|
|
82
|
+
}
|
|
83
|
+
const { readInteractiveHostSignals } = await import("../bun/interactive-host.js");
|
|
84
|
+
const activeRuntime = runtime();
|
|
85
|
+
const host = readInteractiveHostSignals(activeRuntime);
|
|
86
|
+
const launchInteractive = shouldLaunchInteractive({
|
|
87
|
+
launchWhen: interactive.launchWhen,
|
|
88
|
+
hasPositionalArgs,
|
|
89
|
+
stdoutIsTTY: host.stdoutIsTTY,
|
|
90
|
+
stdinIsTTY: host.stdinIsTTY,
|
|
91
|
+
nonInteractiveFlag: options.nonInteractive === true || options.interactive === false ||
|
|
92
|
+
options.json === true || options.format === 'json' || host.argvIncludesNonInteractive,
|
|
93
|
+
forceTtyEnv: host.forceTtyEnv
|
|
94
|
+
});
|
|
95
|
+
if (!launchInteractive) {
|
|
96
|
+
if (fallback) {
|
|
97
|
+
await fallback({ args, options });
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
await emitGroupHelpFallback(activeRuntime, cmd, options);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const { launchAttachedTui } = await import("./attach-tui-action.js");
|
|
104
|
+
await launchAttachedTui({
|
|
105
|
+
runtime: activeRuntime,
|
|
106
|
+
appId,
|
|
107
|
+
args,
|
|
108
|
+
options
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=interactive-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive-gate.js","sourceRoot":"","sources":["../../src/surface/interactive-gate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,E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I,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9C,CAAC;QAED,MAAM,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;QAClF,MAAM,aAAa,GAAG,OAAO,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,0BAA0B,CAAC,aAAa,CAAC,CAAC;QACvD,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;YACjD,UAAU,EAAE,WAAW,CAAC,UAAU;YAClC,iBAAiB;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,kBAAkB,EACjB,OAAO,CAAC,cAAc,KAAK,IAAI,IAAI,OAAO,CAAC,WAAW,KAAK,KAAK;gBAChE,OAAO,CAAC,IAAI,KAAK,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,IAAI,IAAI,CAAC,0BAA0B;YACtF,WAAW,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACxB,IAAI,QAAQ,EAAE,CAAC;gBACd,MAAM,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;gBAClC,OAAO;YACR,CAAC;YACD,MAAM,qBAAqB,CAAC,aAAa,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;YACzD,OAAO;QACR,CAAC;QAED,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;QACrE,MAAM,iBAAiB,CAAC;YACvB,OAAO,EAAE,aAAa;YACtB,KAAK;YACL,IAAI;YACJ,OAAO;SACP,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel/api/runtime';
|
|
3
|
+
import { type RuntimeActor } from '@vibesdotdev/kernel/schemas';
|
|
4
|
+
import type { CLIInvocationInfo } from '../schemas/surface.ts';
|
|
5
|
+
type ActionRunner = <T>(action: () => T) => T;
|
|
6
|
+
/**
|
|
7
|
+
* Route every Commander action registered under `command` through `run`.
|
|
8
|
+
*
|
|
9
|
+
* Commander calls an action from a promise chain created while parsing, so an
|
|
10
|
+
* invocation opened in a `preAction` hook never reaches the action. Wrapping
|
|
11
|
+
* the action itself is the only boundary that runs inside the action's own
|
|
12
|
+
* async context. Children inherit the wrapper through `createCommand`, which
|
|
13
|
+
* `command()` uses for every subcommand, so groups and pattern-registered
|
|
14
|
+
* commands are covered without each registration site knowing about it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function routeActionsThrough(command: Command, run: ActionRunner): void;
|
|
17
|
+
/**
|
|
18
|
+
* Who one CLI action acts for (rc01 §2.1, `interactiveSession`): the signed-in
|
|
19
|
+
* user from `auth/identity` plus the agent its launching harness declared for
|
|
20
|
+
* the shell (the host's `launchIdentity()` fact: `VIBES_AGENT_ID` and
|
|
21
|
+
* `VIBES_AGENT_HOME`, captured once). A shared host (MCP host, daemon)
|
|
22
|
+
* acts for none: each invocation it serves names its own actor, so an
|
|
23
|
+
* inherited shell identity can never become every client's identity.
|
|
24
|
+
*
|
|
25
|
+
* The user is read only for an action whose host preparation ran (it declares
|
|
26
|
+
* a home write): reading the stored session is storage work that
|
|
27
|
+
* metadata-only actions never do.
|
|
28
|
+
*
|
|
29
|
+
* Admission runs through the kernel's `admitInvokeCaller` (RC08/D-RC08 U7),
|
|
30
|
+
* never a hand-rolled equivalent. The CLI host is a single-process, one-caller
|
|
31
|
+
* surface: `launchIdentity()` is captured once, at host construction, from
|
|
32
|
+
* the launching harness's own shell environment — the same trust boundary a
|
|
33
|
+
* verified transport establishes at connection time for a shared host (MCP,
|
|
34
|
+
* daemon), not a per-call value a caller can redeclare. So the host's own
|
|
35
|
+
* capture is the verified fact here; there is no separate "declared" source
|
|
36
|
+
* to disagree with it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveCliInvocationActor(runtime: VibesRuntime, info: CLIInvocationInfo): Promise<RuntimeActor | undefined>;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=invocation-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-actions.d.ts","sourceRoot":"","sources":["../../src/surface/invocation-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAEN,KAAK,YAAY,EAGjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,KAAK,YAAY,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;AAE9C;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,GAAG,IAAI,CAe7E;AAaD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,yBAAyB,CAC9C,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,iBAAiB,GACrB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAoBnC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { admitInvokeCaller } from '@vibesdotdev/kernel/schemas';
|
|
2
|
+
/**
|
|
3
|
+
* Route every Commander action registered under `command` through `run`.
|
|
4
|
+
*
|
|
5
|
+
* Commander calls an action from a promise chain created while parsing, so an
|
|
6
|
+
* invocation opened in a `preAction` hook never reaches the action. Wrapping
|
|
7
|
+
* the action itself is the only boundary that runs inside the action's own
|
|
8
|
+
* async context. Children inherit the wrapper through `createCommand`, which
|
|
9
|
+
* `command()` uses for every subcommand, so groups and pattern-registered
|
|
10
|
+
* commands are covered without each registration site knowing about it.
|
|
11
|
+
*/
|
|
12
|
+
export function routeActionsThrough(command, run) {
|
|
13
|
+
const setAction = command.action.bind(command);
|
|
14
|
+
const createCommand = command.createCommand.bind(command);
|
|
15
|
+
Object.assign(command, {
|
|
16
|
+
action(fn) {
|
|
17
|
+
return setAction(function (...args) {
|
|
18
|
+
return run(() => fn.apply(this, args));
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
createCommand(name) {
|
|
22
|
+
const child = createCommand(name);
|
|
23
|
+
routeActionsThrough(child, run);
|
|
24
|
+
return child;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
const AGENT_HOMES = new Set(['user', 'organization', 'team']);
|
|
29
|
+
/** A declared agent home the kernel admits (`user`, `organization` or `team`). */
|
|
30
|
+
function isAgentHome(home) {
|
|
31
|
+
return AGENT_HOMES.has(home);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Who one CLI action acts for (rc01 §2.1, `interactiveSession`): the signed-in
|
|
35
|
+
* user from `auth/identity` plus the agent its launching harness declared for
|
|
36
|
+
* the shell (the host's `launchIdentity()` fact: `VIBES_AGENT_ID` and
|
|
37
|
+
* `VIBES_AGENT_HOME`, captured once). A shared host (MCP host, daemon)
|
|
38
|
+
* acts for none: each invocation it serves names its own actor, so an
|
|
39
|
+
* inherited shell identity can never become every client's identity.
|
|
40
|
+
*
|
|
41
|
+
* The user is read only for an action whose host preparation ran (it declares
|
|
42
|
+
* a home write): reading the stored session is storage work that
|
|
43
|
+
* metadata-only actions never do.
|
|
44
|
+
*
|
|
45
|
+
* Admission runs through the kernel's `admitInvokeCaller` (RC08/D-RC08 U7),
|
|
46
|
+
* never a hand-rolled equivalent. The CLI host is a single-process, one-caller
|
|
47
|
+
* surface: `launchIdentity()` is captured once, at host construction, from
|
|
48
|
+
* the launching harness's own shell environment — the same trust boundary a
|
|
49
|
+
* verified transport establishes at connection time for a shared host (MCP,
|
|
50
|
+
* daemon), not a per-call value a caller can redeclare. So the host's own
|
|
51
|
+
* capture is the verified fact here; there is no separate "declared" source
|
|
52
|
+
* to disagree with it.
|
|
53
|
+
*/
|
|
54
|
+
export async function resolveCliInvocationActor(runtime, info) {
|
|
55
|
+
if (info.effects.sharedHost)
|
|
56
|
+
return undefined;
|
|
57
|
+
const launch = runtime.localEnvironment.launchIdentity?.();
|
|
58
|
+
const agentId = launch?.agentId?.trim() || undefined;
|
|
59
|
+
const declaredHome = agentId ? launch?.agentHome?.trim() : undefined;
|
|
60
|
+
const home = declaredHome && isAgentHome(declaredHome) ? declaredHome : undefined;
|
|
61
|
+
let userId;
|
|
62
|
+
if (info.effects.homeWrite && runtime.hasContext('auth/identity')) {
|
|
63
|
+
const identity = await runtime.context('auth/identity');
|
|
64
|
+
userId = identity?.isAuthenticated === true ? identity.userId?.trim() || undefined : undefined;
|
|
65
|
+
}
|
|
66
|
+
if (!agentId && !userId)
|
|
67
|
+
return undefined;
|
|
68
|
+
const caller = {};
|
|
69
|
+
if (userId)
|
|
70
|
+
caller.userId = userId;
|
|
71
|
+
if (agentId)
|
|
72
|
+
caller.agentId = agentId;
|
|
73
|
+
if (home)
|
|
74
|
+
caller.home = home;
|
|
75
|
+
const verified = { source: 'cli-host-launch-identity', caller };
|
|
76
|
+
return admitInvokeCaller(caller, verified);
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=invocation-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-actions.js","sourceRoot":"","sources":["../../src/surface/invocation-actions.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,iBAAiB,EAIjB,MAAM,6BAA6B,CAAC;AAMrC;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAgB,EAAE,GAAiB;IACtE,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,OA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I,MAA0B,CAAC;IAC/B,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,OAAO,CACrC,eAAe,CACf,CAAC;QACF,MAAM,GAAG,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAChG,CAAC;IACD,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,MAAM,GAAmF,EAAE,CAAC;IAClG,IAAI,MAAM;QAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACnC,IAAI,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACtC,IAAI,IAAI;QAAE,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IAC7B,MAAM,QAAQ,GAA8B,EAAE,MAAM,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC;IAC3F,OAAO,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { CLICommandEffects } from '../schemas/descriptors.ts';
|
|
3
|
+
import type { CLIResolvedEffects } from '../schemas/surface.ts';
|
|
4
|
+
/**
|
|
5
|
+
* Evaluate descriptor-declared effects inside the CLI surface.
|
|
6
|
+
*
|
|
7
|
+
* Raw parsed options never cross this boundary. Hosts receive only the
|
|
8
|
+
* resolved booleans they need to prepare the action.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveCLIInvocationEffects(command: Command, declared?: CLICommandEffects): CLIResolvedEffects;
|
|
11
|
+
//# sourceMappingURL=invocation-effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-effects.d.ts","sourceRoot":"","sources":["../../src/surface/invocation-effects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,OAAO,EAChB,QAAQ,CAAC,EAAE,iBAAiB,GAC1B,kBAAkB,CAOpB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { resolveScopedCommandOptions } from "./inherited-options.js";
|
|
2
|
+
/**
|
|
3
|
+
* Evaluate descriptor-declared effects inside the CLI surface.
|
|
4
|
+
*
|
|
5
|
+
* Raw parsed options never cross this boundary. Hosts receive only the
|
|
6
|
+
* resolved booleans they need to prepare the action.
|
|
7
|
+
*/
|
|
8
|
+
export function resolveCLIInvocationEffects(command, declared) {
|
|
9
|
+
// A serve host acts for many agents (rc02-rc03 §2.3).
|
|
10
|
+
const serve = resolveServeEffect(command, declared?.serve);
|
|
11
|
+
const effects = { homeWrite: resolveHomeWrite(command, declared?.homeWrite), sharedHost: serve !== undefined };
|
|
12
|
+
if (serve)
|
|
13
|
+
effects.serve = { ...serve };
|
|
14
|
+
if (declared?.launches)
|
|
15
|
+
effects.launches = declared.launches;
|
|
16
|
+
return effects;
|
|
17
|
+
}
|
|
18
|
+
/** Whether the action writes home: omission is conservative (the action requires writable home storage). */
|
|
19
|
+
function resolveHomeWrite(command, homeWrite) {
|
|
20
|
+
if (homeWrite === 'none')
|
|
21
|
+
return false;
|
|
22
|
+
if (homeWrite === undefined || homeWrite === 'required')
|
|
23
|
+
return true;
|
|
24
|
+
const options = resolveScopedCommandOptions(command);
|
|
25
|
+
const expected = homeWrite.equals ?? true;
|
|
26
|
+
return options[homeWrite.whenOption] === expected;
|
|
27
|
+
}
|
|
28
|
+
/** Resolve a declared relay mode before host boot; the serving body keeps activation. */
|
|
29
|
+
function resolveServeEffect(command, serve) {
|
|
30
|
+
if (!serve)
|
|
31
|
+
return undefined;
|
|
32
|
+
const { deferActivationWhen, compositionWhen, ...host } = serve;
|
|
33
|
+
if (!deferActivationWhen && !compositionWhen) {
|
|
34
|
+
return host.composition === 'transport' ? { ...host, deferActivation: true } : host;
|
|
35
|
+
}
|
|
36
|
+
const options = resolveScopedCommandOptions(command);
|
|
37
|
+
const isTransport = host.composition === 'transport' || (compositionWhen !== undefined &&
|
|
38
|
+
options[compositionWhen.whenOption] === compositionWhen.equals &&
|
|
39
|
+
!(compositionWhen.unlessOptions ?? []).some((option) => options[option] === true));
|
|
40
|
+
const deferActivation = isTransport || host.composition === 'transport' || (deferActivationWhen !== undefined &&
|
|
41
|
+
options[deferActivationWhen.whenOption] === deferActivationWhen.equals &&
|
|
42
|
+
!(deferActivationWhen.unlessOptions ?? []).some((option) => options[option] === true));
|
|
43
|
+
const result = {
|
|
44
|
+
...host,
|
|
45
|
+
deferActivation
|
|
46
|
+
};
|
|
47
|
+
if (isTransport) {
|
|
48
|
+
result.composition = 'transport';
|
|
49
|
+
}
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=invocation-effects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-effects.js","sourceRoot":"","sources":["../../src/surface/invocation-effects.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAErE;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAC1C,OAAgB,EAChB,QAA4B;IAE5B,sDAAsD;IACtD,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAuB,EAAE,SAAS,EAAE,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAE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AAU,CAAC,KAAK,eAAe,CAAC,MAAM;QAC9D,CAAC,CAAC,eAAe,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CACjF,CAAC;IACF,MAAM,eAAe,GAAG,WAAW,IAAI,IAAI,CAAC,WAAW,KAAK,WAAW,IAAI,CAC1E,mBAAmB,KAAK,SAAS;QACjC,OAAO,CAAC,mBAAmB,CAAC,UAAU,CAAC,KAAK,mBAAmB,CAAC,MAAM;QACtE,CAAC,CAAC,mBAAmB,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CACrF,CAAC;IACF,MAAM,MAAM,GAAyD;QACpE,GAAG,IAAI;QACP,eAAe;KACf,CAAC;IACF,IAAI,WAAW,EAAE,CAAC;QACjB,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;IAClC,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CapabilityError, type CaughtFailure, type RuntimeRef, type ValueFreeFailure } from '@vibesdotdev/kernel';
|
|
2
|
+
import type { CLIInvocationFailureCode, CLIInvocationInfo, CLIInvocationObserver } from '../schemas/surface.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Pairs a host observer to Commander's actual action dispatch.
|
|
5
|
+
*
|
|
6
|
+
* Help, version, parse failures, and a bare program never call `start` because
|
|
7
|
+
* Commander never dispatches an action for them. This is deliberately
|
|
8
|
+
* action-based rather than an argv-name allow/deny list.
|
|
9
|
+
*
|
|
10
|
+
* Observer failures never change the command's outcome: neither `start` nor
|
|
11
|
+
* `finish` rejects because an observer did.
|
|
12
|
+
*/
|
|
13
|
+
export declare class CLIInvocationController {
|
|
14
|
+
private readonly runtimeOf?;
|
|
15
|
+
private readonly describe?;
|
|
16
|
+
private observer;
|
|
17
|
+
private active;
|
|
18
|
+
/** Whether this invocation already reported an observer failure (one report per invocation). */
|
|
19
|
+
private reported;
|
|
20
|
+
private readonly undelivered;
|
|
21
|
+
/**
|
|
22
|
+
* Observer failures are reported once per invocation through the runtime
|
|
23
|
+
* logger with their value-free facts (class, code, reason: never thrown
|
|
24
|
+
* text). A runtime whose logging cannot take the entry (not prepared, or
|
|
25
|
+
* already closed) leaves the report as a typed diagnostic in
|
|
26
|
+
* {@link undeliveredDiagnostics} instead; the warn never throws.
|
|
27
|
+
*
|
|
28
|
+
* @param runtimeOf The runtime whose logger reports an observer failure
|
|
29
|
+
* (the action's runtime: after a serve transition, the serve host). Absent,
|
|
30
|
+
* the logger binds to the default runtime at emit.
|
|
31
|
+
* @param describe The host's redacted rendering of the failure for the
|
|
32
|
+
* report's `detail` (the CLI supplies it under `-v`); absent or `undefined`,
|
|
33
|
+
* the report carries the value-free facts alone.
|
|
34
|
+
*/
|
|
35
|
+
constructor(runtimeOf?: (() => RuntimeRef | undefined) | undefined, describe?: ((failure: CaughtFailure) => string | undefined) | undefined);
|
|
36
|
+
setObserver<Token>(observer: CLIInvocationObserver<Token> | undefined): void;
|
|
37
|
+
/**
|
|
38
|
+
* Observer failures whose report logging could not take: each a
|
|
39
|
+
* `CapabilityError` `UNAVAILABLE` `observer-failure-unlogged` whose
|
|
40
|
+
* `details` hold the observer failure's value-free facts and whose `cause`
|
|
41
|
+
* is the logging refusal. In order; never cleared by the controller.
|
|
42
|
+
*/
|
|
43
|
+
get undeliveredDiagnostics(): readonly CapabilityError[];
|
|
44
|
+
start(info: CLIInvocationInfo): Promise<void>;
|
|
45
|
+
finish(outcome: 'success' | 'failure', failureCode?: CLIInvocationFailureCode, failureCause?: ValueFreeFailure): Promise<void>;
|
|
46
|
+
/** Report one observer failure: the runtime logger's warn, else a carried typed diagnostic. */
|
|
47
|
+
private report;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=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1,127 @@
|
|
|
1
|
+
import { getLogger } from '@vibesdotdev/logging';
|
|
2
|
+
import { CapabilityError, CaughtFailureSchema, valueFreeFailure } from '@vibesdotdev/kernel';
|
|
3
|
+
import { failureOf } from "./failure-of.js";
|
|
4
|
+
function pairObserver(observer) {
|
|
5
|
+
return {
|
|
6
|
+
async start(info) {
|
|
7
|
+
const token = await observer.start(info);
|
|
8
|
+
return (endInfo) => observer.end(endInfo, token);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const OBSERVER_FAILURE_MESSAGES = {
|
|
13
|
+
start: 'CLI invocation observer start failed',
|
|
14
|
+
end: 'CLI invocation observer end failed'
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Pairs a host observer to Commander's actual action dispatch.
|
|
18
|
+
*
|
|
19
|
+
* Help, version, parse failures, and a bare program never call `start` because
|
|
20
|
+
* Commander never dispatches an action for them. This is deliberately
|
|
21
|
+
* action-based rather than an argv-name allow/deny list.
|
|
22
|
+
*
|
|
23
|
+
* Observer failures never change the command's outcome: neither `start` nor
|
|
24
|
+
* `finish` rejects because an observer did.
|
|
25
|
+
*/
|
|
26
|
+
export class CLIInvocationController {
|
|
27
|
+
runtimeOf;
|
|
28
|
+
describe;
|
|
29
|
+
observer;
|
|
30
|
+
active;
|
|
31
|
+
/** Whether this invocation already reported an observer failure (one report per invocation). */
|
|
32
|
+
reported = false;
|
|
33
|
+
undelivered = [];
|
|
34
|
+
/**
|
|
35
|
+
* Observer failures are reported once per invocation through the runtime
|
|
36
|
+
* logger with their value-free facts (class, code, reason: never thrown
|
|
37
|
+
* text). A runtime whose logging cannot take the entry (not prepared, or
|
|
38
|
+
* already closed) leaves the report as a typed diagnostic in
|
|
39
|
+
* {@link undeliveredDiagnostics} instead; the warn never throws.
|
|
40
|
+
*
|
|
41
|
+
* @param runtimeOf The runtime whose logger reports an observer failure
|
|
42
|
+
* (the action's runtime: after a serve transition, the serve host). Absent,
|
|
43
|
+
* the logger binds to the default runtime at emit.
|
|
44
|
+
* @param describe The host's redacted rendering of the failure for the
|
|
45
|
+
* report's `detail` (the CLI supplies it under `-v`); absent or `undefined`,
|
|
46
|
+
* the report carries the value-free facts alone.
|
|
47
|
+
*/
|
|
48
|
+
constructor(runtimeOf, describe) {
|
|
49
|
+
this.runtimeOf = runtimeOf;
|
|
50
|
+
this.describe = describe;
|
|
51
|
+
}
|
|
52
|
+
setObserver(observer) {
|
|
53
|
+
this.observer = observer ? pairObserver(observer) : undefined;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Observer failures whose report logging could not take: each a
|
|
57
|
+
* `CapabilityError` `UNAVAILABLE` `observer-failure-unlogged` whose
|
|
58
|
+
* `details` hold the observer failure's value-free facts and whose `cause`
|
|
59
|
+
* is the logging refusal. In order; never cleared by the controller.
|
|
60
|
+
*/
|
|
61
|
+
get undeliveredDiagnostics() {
|
|
62
|
+
return this.undelivered;
|
|
63
|
+
}
|
|
64
|
+
async start(info) {
|
|
65
|
+
const observer = this.observer;
|
|
66
|
+
if (!observer)
|
|
67
|
+
return;
|
|
68
|
+
if (this.active) {
|
|
69
|
+
throw new Error('CLI invocation observer already has an active action');
|
|
70
|
+
}
|
|
71
|
+
this.reported = false;
|
|
72
|
+
const failure = await failureOf(async () => {
|
|
73
|
+
const end = await observer.start(info);
|
|
74
|
+
this.active = { info, end };
|
|
75
|
+
});
|
|
76
|
+
if (failure)
|
|
77
|
+
this.report('start', failure);
|
|
78
|
+
}
|
|
79
|
+
async finish(outcome, failureCode, failureCause) {
|
|
80
|
+
const active = this.active;
|
|
81
|
+
if (!active)
|
|
82
|
+
return;
|
|
83
|
+
this.active = undefined;
|
|
84
|
+
const info = { ...active.info, outcome };
|
|
85
|
+
if (failureCode !== undefined)
|
|
86
|
+
info.failureCode = failureCode;
|
|
87
|
+
if (failureCause !== undefined)
|
|
88
|
+
info.failureCause = failureCause;
|
|
89
|
+
const failure = await failureOf(() => active.end(info));
|
|
90
|
+
if (failure)
|
|
91
|
+
this.report('end', failure);
|
|
92
|
+
}
|
|
93
|
+
/** Report one observer failure: the runtime logger's warn, else a carried typed diagnostic. */
|
|
94
|
+
report(phase, failure) {
|
|
95
|
+
if (this.reported)
|
|
96
|
+
return;
|
|
97
|
+
this.reported = true;
|
|
98
|
+
const facts = valueFreeFailure(failure);
|
|
99
|
+
const unlogged = warnFailure(this.runtimeOf?.(), OBSERVER_FAILURE_MESSAGES[phase], {
|
|
100
|
+
error: facts,
|
|
101
|
+
detail: this.describe?.(failure)
|
|
102
|
+
});
|
|
103
|
+
if (!unlogged)
|
|
104
|
+
return;
|
|
105
|
+
this.undelivered.push(new CapabilityError(`${OBSERVER_FAILURE_MESSAGES[phase]}, and logging could not take the report.`, 'UNAVAILABLE', {
|
|
106
|
+
reason: 'observer-failure-unlogged',
|
|
107
|
+
retryable: false,
|
|
108
|
+
details: { phase, observerFailure: { name: facts.name, code: facts.code, reason: facts.reason } },
|
|
109
|
+
cause: unlogged
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Warn through the runtime's `cli` logger: `null` once the entry is taken,
|
|
115
|
+
* else the logging failure (logging not prepared on this runtime, or closed),
|
|
116
|
+
* parsed at the catch for the caller to carry. Never throws.
|
|
117
|
+
*/
|
|
118
|
+
function warnFailure(runtime, message, context) {
|
|
119
|
+
try {
|
|
120
|
+
getLogger('cli', runtime).warn(message, context);
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
return CaughtFailureSchema.parse(error);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=invocation-lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-lifecycle.js","sourceRoot":"","sources":["../../src/surface/invocation-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,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,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,yBAAyB,CAAC,KAAK,CAAC,EAAE;YAClF,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC;SAChC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,eAAe,CACxC,GAAG,yBAAyB,CAAC,KAAK,CAAC,0CAA0C,EAC7E,aAAa,EACb;YACC,MAAM,EAAE,2BAA2B;YACnC,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE;YACjG,KAAK,EAAE,QAAQ;SACf,CACD,CAAC,CAAC;IACJ,CAAC;CACD;AAED;;;;GAIG;AACH,SAAS,WAAW,CACnB,OAA+B,EAC/B,OAAe,EACf,OAAkF;IAElF,IAAI,CAAC;QACJ,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { JsonValue } from '@vibesdotdev/kernel/schemas/json';
|
|
2
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel/api/runtime';
|
|
3
|
+
import type { CLICommandAssetDescriptor } from '../schemas/descriptors.ts';
|
|
4
|
+
import type { CommandOptions } from '../schemas/surface.ts';
|
|
5
|
+
import type { CommandOutputBoundary } from '../schemas/command-implementation.ts';
|
|
6
|
+
import type { CliHostOutput } from '../boot/schemas/providers.ts';
|
|
7
|
+
/** Whether the command declares its own `--format` option (and owns its contract). */
|
|
8
|
+
export declare function commandOwnsOutputFormat(options: readonly {
|
|
9
|
+
flags: string;
|
|
10
|
+
}[] | undefined): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve and admit the format before dispatch. Data commands use the inherited
|
|
13
|
+
* default format when no explicit request was typed; runtime-UI and direct
|
|
14
|
+
* commands keep their own default output path.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveGlobalOutputFormat(runtime: VibesRuntime, descriptor: CLICommandAssetDescriptor, options: CommandOptions, formatExplicit: boolean, outputBoundary?: CommandOutputBoundary): Promise<string | undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* Run one action under its resolved output request. Only a `data` command's
|
|
19
|
+
* returned value is rendered here. Runtime-UI and direct commands retain their
|
|
20
|
+
* output ownership, even if an implementation also returns data.
|
|
21
|
+
*/
|
|
22
|
+
export declare function runWithGlobalOutputFormat(runtime: VibesRuntime, format: string | undefined, action: () => Promise<JsonValue | void>, outputBoundary?: CommandOutputBoundary, formatExplicit?: boolean, commandOwnsFormat?: boolean, hostOutput?: CliHostOutput): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=output-format-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-format-request.d.ts","sourceRoot":"","sources":["../../src/surface/output-format-request.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAIpE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,SAAS,GAAG,OAAO,CAElG;AAwCD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC9C,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,yBAAyB,EACrC,OAAO,EAAE,cAAc,EACvB,cAAc,EAAE,OAAO,EACvB,cAAc,CAAC,EAAE,qBAAqB,GACpC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmB7B;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC9C,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,MAAM,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,EACvC,cAAc,CAAC,EAAE,qBAAqB,EACtC,cAAc,UAAuB,EACrC,iBAAiB,UAAQ,EACzB,UAAU,CAAC,EAAE,aAAa,GACxB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
|