@vibesdotdev/cli 0.0.2 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -0
- package/README.md +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,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Reference Doc Generator
|
|
3
|
+
*
|
|
4
|
+
* Walks the descriptor registry (the same one the production CLI boots from)
|
|
5
|
+
* and emits per-command reference markdown. Idempotent: re-running on a clean
|
|
6
|
+
* tree produces a byte-identical diff.
|
|
7
|
+
*
|
|
8
|
+
* Reference docs only — synopsis, arguments, options, examples. Narrative
|
|
9
|
+
* docs (HOW-TO, concepts) stay hand-authored and are not touched.
|
|
10
|
+
*
|
|
11
|
+
* Programmatic use:
|
|
12
|
+
* const { filesWritten } = await generateCliDocs(runtime, { outDir });
|
|
13
|
+
*
|
|
14
|
+
* The runtime-bootstrap that loads the full aggregator plugin set
|
|
15
|
+
* (`bootDocsRuntime`) and the standalone `[--out <dir>]` CLI entrypoint live in
|
|
16
|
+
* the app tier at `apps/cli-bin/src/docs/generate.ts`, which depends on
|
|
17
|
+
* `@vibesdotdev/plugins`. This module stays free of the aggregator so
|
|
18
|
+
* `@vibesdotdev/cli` keeps no dependency edge to `@vibesdotdev/plugins`. It
|
|
19
|
+
* holds only the pure rendering + a runtime parameter the caller supplies.
|
|
20
|
+
*
|
|
21
|
+
* Every file operation goes through that runtime: its unbound host
|
|
22
|
+
* `filesystem/adapter` (the output directory is a host path the caller chose,
|
|
23
|
+
* never a workspace-bound one) and its path mechanics (`paths/runtime-path`).
|
|
24
|
+
*/
|
|
25
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel/api/runtime';
|
|
26
|
+
export type { GenerateOptions, GenerateResult } from './schemas/generate.ts';
|
|
27
|
+
import type { GenerateOptions, GenerateResult } from './schemas/generate.ts';
|
|
28
|
+
/**
|
|
29
|
+
* Generate the CLI reference docs tree from a runtime that already has its
|
|
30
|
+
* plugin set registered. Caller is responsible for booting the runtime —
|
|
31
|
+
* keeps this function side-effect-free apart from the file writes.
|
|
32
|
+
*/
|
|
33
|
+
export declare function generateCliDocs(runtime: VibesRuntime, options: GenerateOptions): Promise<GenerateResult>;
|
|
34
|
+
/**
|
|
35
|
+
* Sanity check used by the idempotency test: re-runs the generator into a
|
|
36
|
+
* temp directory and reads every produced file back into memory. Returns a
|
|
37
|
+
* map of relative-path → content so the test can compare against the
|
|
38
|
+
* checked-in tree without invoking `git diff` itself. Reads through the
|
|
39
|
+
* handed runtime's host filesystem; an absent `rootDir` is an empty map.
|
|
40
|
+
*/
|
|
41
|
+
export declare function readGeneratedDocs(runtime: VibesRuntime, rootDir: string): Promise<Map<string, string>>;
|
|
42
|
+
/**
|
|
43
|
+
* Default output dir for the CLI entry point: `cli/docs-generated/`.
|
|
44
|
+
* Resolved from this module through the handed runtime's path mechanics, so
|
|
45
|
+
* the path is stable regardless of CWD.
|
|
46
|
+
*/
|
|
47
|
+
export declare function defaultOutDir(runtime: VibesRuntime): Promise<string>;
|
|
48
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/commands/docs/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAMpE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE7E;;;;GAIG;AACH,wBAAsB,eAAe,CACpC,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,eAAe,GACtB,OAAO,CAAC,cAAc,CAAC,CAoDzB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAiB5G;AAUD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAE1E"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Reference Doc Generator
|
|
3
|
+
*
|
|
4
|
+
* Walks the descriptor registry (the same one the production CLI boots from)
|
|
5
|
+
* and emits per-command reference markdown. Idempotent: re-running on a clean
|
|
6
|
+
* tree produces a byte-identical diff.
|
|
7
|
+
*
|
|
8
|
+
* Reference docs only — synopsis, arguments, options, examples. Narrative
|
|
9
|
+
* docs (HOW-TO, concepts) stay hand-authored and are not touched.
|
|
10
|
+
*
|
|
11
|
+
* Programmatic use:
|
|
12
|
+
* const { filesWritten } = await generateCliDocs(runtime, { outDir });
|
|
13
|
+
*
|
|
14
|
+
* The runtime-bootstrap that loads the full aggregator plugin set
|
|
15
|
+
* (`bootDocsRuntime`) and the standalone `[--out <dir>]` CLI entrypoint live in
|
|
16
|
+
* the app tier at `apps/cli-bin/src/docs/generate.ts`, which depends on
|
|
17
|
+
* `@vibesdotdev/plugins`. This module stays free of the aggregator so
|
|
18
|
+
* `@vibesdotdev/cli` keeps no dependency edge to `@vibesdotdev/plugins`. It
|
|
19
|
+
* holds only the pure rendering + a runtime parameter the caller supplies.
|
|
20
|
+
*
|
|
21
|
+
* Every file operation goes through that runtime: its unbound host
|
|
22
|
+
* `filesystem/adapter` (the output directory is a host path the caller chose,
|
|
23
|
+
* never a workspace-bound one) and its path mechanics (`paths/runtime-path`).
|
|
24
|
+
*/
|
|
25
|
+
import { resolveFileSystemAdapter } from '@vibesdotdev/filesystem/client';
|
|
26
|
+
import { getRuntimePath } from '@vibesdotdev/paths';
|
|
27
|
+
import { getCLIDiscovery } from "../../surface/discovery-cache.js";
|
|
28
|
+
import { commandDocPath, groupDocPath } from "./doc-paths.js";
|
|
29
|
+
import { renderCommandPage } from "./render-command.js";
|
|
30
|
+
import { renderGroupPage, renderTopLevelIndex } from "./render-group.js";
|
|
31
|
+
/**
|
|
32
|
+
* Generate the CLI reference docs tree from a runtime that already has its
|
|
33
|
+
* plugin set registered. Caller is responsible for booting the runtime —
|
|
34
|
+
* keeps this function side-effect-free apart from the file writes.
|
|
35
|
+
*/
|
|
36
|
+
export async function generateCliDocs(runtime, options) {
|
|
37
|
+
const runtimePath = await getRuntimePath(runtime);
|
|
38
|
+
const outDir = runtimePath.resolve(options.outDir);
|
|
39
|
+
const discovery = getCLIDiscovery(runtime, { includeInternal: options.includeInternal ?? true });
|
|
40
|
+
// Build the set of all docs files we'll emit, in-memory. Only when the
|
|
41
|
+
// full map is built do we touch the filesystem — that way a generator
|
|
42
|
+
// failure mid-flight can't leave the tree half-written.
|
|
43
|
+
const files = new Map();
|
|
44
|
+
const sortedGroups = [...discovery.allGroups].sort((a, b) => a.id.localeCompare(b.id));
|
|
45
|
+
const sortedCommands = [...discovery.allCommands].sort((a, b) => a.id.localeCompare(b.id));
|
|
46
|
+
const groupsById = discovery.groupsById;
|
|
47
|
+
// Per-command pages.
|
|
48
|
+
for (const command of sortedCommands) {
|
|
49
|
+
const relPath = commandDocPath(command, groupsById);
|
|
50
|
+
files.set(relPath, renderCommandPage(command, groupsById));
|
|
51
|
+
}
|
|
52
|
+
// Per-group index pages (commands in this group + nested subgroups).
|
|
53
|
+
for (const group of sortedGroups) {
|
|
54
|
+
const relPath = groupDocPath(group, groupsById);
|
|
55
|
+
files.set(relPath, renderGroupPage(group, sortedGroups, sortedCommands, groupsById));
|
|
56
|
+
}
|
|
57
|
+
// Top-level index.
|
|
58
|
+
files.set('README.md', renderTopLevelIndex(sortedGroups, sortedCommands, groupsById));
|
|
59
|
+
const fs = await resolveFileSystemAdapter(runtime, { binding: false });
|
|
60
|
+
// Reset the output dir so removed commands disappear from the tree.
|
|
61
|
+
if (await fs.exists(outDir)) {
|
|
62
|
+
await fs.remove(outDir, { recursive: true });
|
|
63
|
+
}
|
|
64
|
+
await fs.mkdir(outDir, { recursive: true });
|
|
65
|
+
// Write all files. Sort the keys (code-unit order) for stable ordering of mkdir calls.
|
|
66
|
+
const written = [];
|
|
67
|
+
for (const [relPath, content] of [...files.entries()].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))) {
|
|
68
|
+
const abs = runtimePath.join(outDir, relPath);
|
|
69
|
+
await fs.mkdir(runtimePath.dirname(abs), { recursive: true });
|
|
70
|
+
await fs.writeFile(abs, content, 'utf8');
|
|
71
|
+
written.push(relPath);
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
outDir,
|
|
75
|
+
filesWritten: written,
|
|
76
|
+
commandsDocumented: sortedCommands.length,
|
|
77
|
+
groupsDocumented: sortedGroups.length
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Sanity check used by the idempotency test: re-runs the generator into a
|
|
82
|
+
* temp directory and reads every produced file back into memory. Returns a
|
|
83
|
+
* map of relative-path → content so the test can compare against the
|
|
84
|
+
* checked-in tree without invoking `git diff` itself. Reads through the
|
|
85
|
+
* handed runtime's host filesystem; an absent `rootDir` is an empty map.
|
|
86
|
+
*/
|
|
87
|
+
export async function readGeneratedDocs(runtime, rootDir) {
|
|
88
|
+
const runtimePath = await getRuntimePath(runtime);
|
|
89
|
+
const fs = await resolveFileSystemAdapter(runtime, { binding: false });
|
|
90
|
+
const out = new Map();
|
|
91
|
+
if (!(await fs.exists(rootDir)))
|
|
92
|
+
return out;
|
|
93
|
+
async function walk(dir) {
|
|
94
|
+
for (const entry of await fs.list(dir)) {
|
|
95
|
+
const abs = runtimePath.join(dir, entry.name);
|
|
96
|
+
if (entry.kind === 'directory') {
|
|
97
|
+
await walk(abs);
|
|
98
|
+
}
|
|
99
|
+
else if (entry.kind === 'file' && entry.name.endsWith('.md')) {
|
|
100
|
+
out.set(runtimePath.relative(rootDir, abs), await readText(fs, abs));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
await walk(rootDir);
|
|
105
|
+
return out;
|
|
106
|
+
}
|
|
107
|
+
async function readText(fs, path) {
|
|
108
|
+
const raw = await fs.readFile(path, 'utf8');
|
|
109
|
+
return raw instanceof Uint8Array ? new TextDecoder().decode(raw) : raw;
|
|
110
|
+
}
|
|
111
|
+
/** The checked-in generated tree, `cli/docs-generated/`, located from this module. */
|
|
112
|
+
const GENERATED_DOCS_URL = new URL('../../../docs-generated', import.meta.url);
|
|
113
|
+
/**
|
|
114
|
+
* Default output dir for the CLI entry point: `cli/docs-generated/`.
|
|
115
|
+
* Resolved from this module through the handed runtime's path mechanics, so
|
|
116
|
+
* the path is stable regardless of CWD.
|
|
117
|
+
*/
|
|
118
|
+
export async function defaultOutDir(runtime) {
|
|
119
|
+
return (await getRuntimePath(runtime)).fileURLToPath(GENERATED_DOCS_URL.href);
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/docs/generate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAKzE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACpC,OAAqB,EACrB,OAAwB;IAExB,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,eAAe,C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,YAAY,UAAU,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACxE,CAAC;AAED,sFAAsF;AACtF,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,yBAAyB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/E;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAqB;IACxD,OAAO,CAAC,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Per-command reference pages: synopsis, aliases, argument and option tables, examples. */
|
|
2
|
+
import type { CLICommandAssetDescriptor, CLIGroupAssetDescriptor } from '../../schemas/descriptors.ts';
|
|
3
|
+
export declare function renderCommandPage(command: CLICommandAssetDescriptor, groupsById: Map<string, CLIGroupAssetDescriptor>): string;
|
|
4
|
+
export declare function safeCell(value: string): string;
|
|
5
|
+
//# sourceMappingURL=render-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-command.d.ts","sourceRoot":"","sources":["../../../src/commands/docs/render-command.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,KAAK,EAEX,yBAAyB,EAGzB,uBAAuB,EACvB,MAAM,8BAA8B,CAAC;AAGtC,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,yBAAyB,EAClC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAC9C,MAAM,CAkER;AAyDD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9C"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { commandInvocation } from "./doc-paths.js";
|
|
2
|
+
export function renderCommandPage(command, groupsById) {
|
|
3
|
+
const invocation = commandInvocation(command, groupsById);
|
|
4
|
+
const lines = [];
|
|
5
|
+
lines.push(`# \`${invocation}\``);
|
|
6
|
+
lines.push('');
|
|
7
|
+
lines.push('> Reference doc generated from `cli/command` descriptor — do not edit by hand.');
|
|
8
|
+
lines.push(`> Source descriptor id: \`${command.id}\``);
|
|
9
|
+
lines.push('');
|
|
10
|
+
lines.push(command.description.trim());
|
|
11
|
+
lines.push('');
|
|
12
|
+
lines.push('## Synopsis');
|
|
13
|
+
lines.push('');
|
|
14
|
+
lines.push('```');
|
|
15
|
+
lines.push(renderSynopsis(invocation, command));
|
|
16
|
+
lines.push('```');
|
|
17
|
+
lines.push('');
|
|
18
|
+
if (command.aliases && command.aliases.length > 0) {
|
|
19
|
+
lines.push('## Aliases');
|
|
20
|
+
lines.push('');
|
|
21
|
+
for (const alias of [...command.aliases].sort()) {
|
|
22
|
+
lines.push(`- \`${alias}\``);
|
|
23
|
+
}
|
|
24
|
+
lines.push('');
|
|
25
|
+
}
|
|
26
|
+
if (command.arguments && command.arguments.length > 0) {
|
|
27
|
+
lines.push('## Arguments');
|
|
28
|
+
lines.push('');
|
|
29
|
+
lines.push(renderArgumentsTable(command.arguments));
|
|
30
|
+
lines.push('');
|
|
31
|
+
}
|
|
32
|
+
if (command.options && command.options.length > 0) {
|
|
33
|
+
lines.push('## Options');
|
|
34
|
+
lines.push('');
|
|
35
|
+
lines.push(renderOptionsTable(command.options));
|
|
36
|
+
lines.push('');
|
|
37
|
+
}
|
|
38
|
+
if (command.examples && command.examples.length > 0) {
|
|
39
|
+
lines.push('## Examples');
|
|
40
|
+
lines.push('');
|
|
41
|
+
for (const example of command.examples) {
|
|
42
|
+
lines.push(renderExample(example));
|
|
43
|
+
lines.push('');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (command.surfaces && command.surfaces.length > 0) {
|
|
47
|
+
lines.push('## Surfaces');
|
|
48
|
+
lines.push('');
|
|
49
|
+
lines.push([...command.surfaces].sort().map((s) => `\`${s}\``).join(', '));
|
|
50
|
+
lines.push('');
|
|
51
|
+
}
|
|
52
|
+
if (command.internal === true) {
|
|
53
|
+
lines.push('## Visibility');
|
|
54
|
+
lines.push('');
|
|
55
|
+
lines.push('`internal` — hidden from default CLI help; available when the CLI surface opts in.');
|
|
56
|
+
lines.push('');
|
|
57
|
+
}
|
|
58
|
+
return lines.join('\n');
|
|
59
|
+
}
|
|
60
|
+
function renderSynopsis(invocation, command) {
|
|
61
|
+
const parts = [invocation];
|
|
62
|
+
if (command.options && command.options.length > 0)
|
|
63
|
+
parts.push('[options]');
|
|
64
|
+
for (const arg of command.arguments ?? []) {
|
|
65
|
+
const name = arg.variadic ? `${arg.name}...` : arg.name;
|
|
66
|
+
parts.push(arg.required ? `<${name}>` : `[${name}]`);
|
|
67
|
+
}
|
|
68
|
+
return parts.join(' ');
|
|
69
|
+
}
|
|
70
|
+
function renderArgumentsTable(args) {
|
|
71
|
+
const header = '| Name | Required | Variadic | Default | Description |';
|
|
72
|
+
const sep = '|------|----------|----------|---------|-------------|';
|
|
73
|
+
const rows = args.map((arg) => {
|
|
74
|
+
const def = arg.default === undefined ? '' : '`' + safeCell(JSON.stringify(arg.default)) + '`';
|
|
75
|
+
return `| \`${safeCell(arg.name)}\` | ${arg.required ? 'yes' : 'no'} | ${arg.variadic ? 'yes' : 'no'} | ${def} | ${safeCell(arg.description)} |`;
|
|
76
|
+
});
|
|
77
|
+
return [header, sep, ...rows].join('\n');
|
|
78
|
+
}
|
|
79
|
+
function renderOptionsTable(options) {
|
|
80
|
+
const header = '| Flag | Type | Choices | Default | Description |';
|
|
81
|
+
const sep = '|------|------|---------|---------|-------------|';
|
|
82
|
+
const sorted = [...options].sort((a, b) => a.flags.localeCompare(b.flags));
|
|
83
|
+
const rows = sorted.map((opt) => {
|
|
84
|
+
const choices = opt.choices && opt.choices.length > 0
|
|
85
|
+
? opt.choices.map((c) => '`' + safeCell(c) + '`').join(', ')
|
|
86
|
+
: '';
|
|
87
|
+
const def = opt.default === undefined ? '' : '`' + safeCell(JSON.stringify(opt.default)) + '`';
|
|
88
|
+
const type = opt.type ?? '';
|
|
89
|
+
return `| \`${safeCell(opt.flags)}\` | ${type} | ${choices} | ${def} | ${safeCell(opt.description)} |`;
|
|
90
|
+
});
|
|
91
|
+
return [header, sep, ...rows].join('\n');
|
|
92
|
+
}
|
|
93
|
+
function renderExample(example) {
|
|
94
|
+
const lines = [];
|
|
95
|
+
lines.push(`### ${example.description.trim()}`);
|
|
96
|
+
lines.push('');
|
|
97
|
+
lines.push('```sh');
|
|
98
|
+
lines.push(example.command.trim());
|
|
99
|
+
lines.push('```');
|
|
100
|
+
const tags = [];
|
|
101
|
+
if (example.expectExit !== undefined)
|
|
102
|
+
tags.push(`exit ${example.expectExit}`);
|
|
103
|
+
if (example.expectStdoutContains !== undefined) {
|
|
104
|
+
tags.push(`stdout contains ${'`' + safeCell(example.expectStdoutContains) + '`'}`);
|
|
105
|
+
}
|
|
106
|
+
if (example.slow)
|
|
107
|
+
tags.push('slow (gated behind `VIBES_DOCS_TEST_SLOW=1`)');
|
|
108
|
+
if (tags.length > 0) {
|
|
109
|
+
lines.push('');
|
|
110
|
+
lines.push(`*Verified: ${tags.join('; ')}.*`);
|
|
111
|
+
}
|
|
112
|
+
return lines.join('\n');
|
|
113
|
+
}
|
|
114
|
+
export function safeCell(value) {
|
|
115
|
+
return value.replace(/\|/g, '\\|').replace(/\r?\n/g, ' ');
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=render-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-command.js","sourceRoot":"","sources":["../../../src/commands/docs/render-command.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,UAAU,iBAAiB,CAChC,OAAkC,EAClC,UAAgD;IAEhD,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC1D,MAAM,KA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SAAS,EAAE,CAAC;QAChD,IAAI,CAAC,IAAI,CAAC,mBAAmB,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IACpF,CAAC;IACD,IAAI,OAAO,CAAC,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;IAC5E,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAa;IACrC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Group index pages and the docs tree's top-level README. */
|
|
2
|
+
import type { CLICommandAssetDescriptor, CLIGroupAssetDescriptor } from '../../schemas/descriptors.ts';
|
|
3
|
+
export declare function renderGroupPage(group: CLIGroupAssetDescriptor, allGroups: readonly CLIGroupAssetDescriptor[], allCommands: readonly CLICommandAssetDescriptor[], groupsById: Map<string, CLIGroupAssetDescriptor>): string;
|
|
4
|
+
export declare function renderTopLevelIndex(allGroups: readonly CLIGroupAssetDescriptor[], allCommands: readonly CLICommandAssetDescriptor[], _groupsById: Map<string, CLIGroupAssetDescriptor>): string;
|
|
5
|
+
//# sourceMappingURL=render-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-group.d.ts","sourceRoot":"","sources":["../../../src/commands/docs/render-group.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvG,wBAAgB,eAAe,CAC9B,KAAK,EAAE,uBAAuB,EAC9B,SAAS,EAAE,SAAS,uBAAuB,EAAE,EAC7C,WAAW,EAAE,SAAS,yBAAyB,EAAE,EACjD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAC9C,MAAM,CA4CR;AAED,wBAAgB,mBAAmB,CAClC,SAAS,EAAE,SAAS,uBAAuB,EAAE,EAC7C,WAAW,EAAE,SAAS,yBAAyB,EAAE,EACjD,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAC/C,MAAM,CAoBR"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { groupPathSegments, sanitizeForPath } from "./doc-paths.js";
|
|
2
|
+
export function renderGroupPage(group, allGroups, allCommands, groupsById) {
|
|
3
|
+
const path = groupPathSegments(group, groupsById);
|
|
4
|
+
const lines = [];
|
|
5
|
+
lines.push(`# \`vibes ${path.join(' ')}\``);
|
|
6
|
+
lines.push('');
|
|
7
|
+
lines.push('> Reference doc generated from `cli/group` descriptor.');
|
|
8
|
+
lines.push(`> Source descriptor id: \`${group.id}\``);
|
|
9
|
+
lines.push('');
|
|
10
|
+
lines.push(group.description.trim());
|
|
11
|
+
lines.push('');
|
|
12
|
+
const childGroups = allGroups.filter((g) => g.parent === group.id);
|
|
13
|
+
const childCommands = allCommands.filter((c) => c.group === group.id);
|
|
14
|
+
if (childCommands.length > 0) {
|
|
15
|
+
lines.push('## Commands');
|
|
16
|
+
lines.push('');
|
|
17
|
+
for (const cmd of [...childCommands].sort((a, b) => a.name.localeCompare(b.name))) {
|
|
18
|
+
const cmdRel = encodeURI(`./${sanitizeForPath(cmd.name)}.md`);
|
|
19
|
+
lines.push(`- [\`${cmd.name}\`](${cmdRel}) — ${cmd.description.trim()}`);
|
|
20
|
+
}
|
|
21
|
+
lines.push('');
|
|
22
|
+
}
|
|
23
|
+
if (childGroups.length > 0) {
|
|
24
|
+
lines.push('## Subgroups');
|
|
25
|
+
lines.push('');
|
|
26
|
+
for (const sub of [...childGroups].sort((a, b) => a.name.localeCompare(b.name))) {
|
|
27
|
+
const subRel = encodeURI(`./${sub.name}/README.md`);
|
|
28
|
+
lines.push(`- [\`${sub.name}\`](${subRel}) — ${sub.description.trim()}`);
|
|
29
|
+
}
|
|
30
|
+
lines.push('');
|
|
31
|
+
}
|
|
32
|
+
if (group.aliases && group.aliases.length > 0) {
|
|
33
|
+
lines.push('## Aliases');
|
|
34
|
+
lines.push('');
|
|
35
|
+
for (const alias of [...group.aliases].sort()) {
|
|
36
|
+
lines.push(`- \`${alias}\``);
|
|
37
|
+
}
|
|
38
|
+
lines.push('');
|
|
39
|
+
}
|
|
40
|
+
return lines.join('\n');
|
|
41
|
+
}
|
|
42
|
+
export function renderTopLevelIndex(allGroups, allCommands, _groupsById) {
|
|
43
|
+
const topLevelGroups = [...allGroups]
|
|
44
|
+
.filter((g) => !g.parent)
|
|
45
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
46
|
+
const lines = [];
|
|
47
|
+
lines.push('# Vibes CLI — Reference');
|
|
48
|
+
lines.push('');
|
|
49
|
+
lines.push('> Generated from the `cli/group` and `cli/command` descriptor registry.');
|
|
50
|
+
lines.push(`> Groups: **${allGroups.length}** · Commands: **${allCommands.length}**`);
|
|
51
|
+
lines.push('');
|
|
52
|
+
lines.push('Run `bun run --cwd repos/apps/cli-bin docs:generate` from the developer repository to refresh this tree.');
|
|
53
|
+
lines.push('');
|
|
54
|
+
lines.push('## Top-level groups');
|
|
55
|
+
lines.push('');
|
|
56
|
+
for (const group of topLevelGroups) {
|
|
57
|
+
lines.push(`- [\`${group.name}\`](${encodeURI(`./commands/${group.name}/README.md`)}) — ${group.description.trim()}`);
|
|
58
|
+
}
|
|
59
|
+
lines.push('');
|
|
60
|
+
return lines.join('\n');
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=render-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-group.js","sourceRoot":"","sources":["../../../src/commands/docs/render-group.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEpE,MAAM,UAAU,eAAe,CAC9B,KAA8B,EAC9B,SAA6C,EAC7C,WAAiD,EACjD,UAAgD;IAEhD,MAAM,IAAI,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAClD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;IACrE,KAAK,CAAC,IAAI,CAAC,6BAA6B,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;IACtD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IACrC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC;IACnE,MAAM,aAAa,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC;IAEtE,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,C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,KAAK,IAAI,cAAc,EAAE,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,OAAO,SAAS,CAAC,cAAc,KAAK,CAAC,IAAI,YAAY,CAAC,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACvH,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Docs-generation contracts: options for one run and the counts it reports. */
|
|
2
|
+
export interface GenerateOptions {
|
|
3
|
+
/** Absolute path to the output directory (will be created / overwritten). */
|
|
4
|
+
outDir: string;
|
|
5
|
+
/** Include `internal: true` descriptors (default: true — these are linkable for contributors). */
|
|
6
|
+
includeInternal?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface GenerateResult {
|
|
9
|
+
outDir: string;
|
|
10
|
+
filesWritten: string[];
|
|
11
|
+
commandsDocumented: number;
|
|
12
|
+
groupsDocumented: number;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/schemas/generate.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,MAAM,WAAW,eAAe;IAC/B,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/commands/docs/schemas/generate.ts"],"names":[],"mappings":"AAAA,gFAAgF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type { CommandOutputRuntime, CommandWriters, OutputOptions } from './schemas/output.ts';
|
|
2
|
+
import type { CommandOutputRuntime, CommandWriters, OutputOptions } from './schemas/output.ts';
|
|
3
|
+
import type { CliHostOutput } from '../boot/schemas/providers.ts';
|
|
4
|
+
/** The handed runtime's stdout and stderr writers; a runtime with no text output refuses `UNAVAILABLE` `stdio-unavailable`. */
|
|
5
|
+
export declare function commandWriters(runtime: CommandOutputRuntime): Promise<CommandWriters>;
|
|
6
|
+
/** Write `content` to the handed runtime's stdout. */
|
|
7
|
+
export declare function writeStdout(runtime: CommandOutputRuntime, content: string): Promise<void>;
|
|
8
|
+
/** Write a line through the handed runtime, or an explicit executable-owned surface sink. */
|
|
9
|
+
export declare function writeStdoutLine(runtime: CommandOutputRuntime, content: string, hostOutput?: CliHostOutput): Promise<void>;
|
|
10
|
+
/** Whether the handed runtime's current invocation wrote its JSON document. */
|
|
11
|
+
export declare function hasWrittenJsonPayload(runtime: CommandOutputRuntime): boolean;
|
|
12
|
+
/** Open a new invocation on the handed runtime: its lifetime and output accounting start empty. */
|
|
13
|
+
export declare function beginJsonPayloadLedger(runtime: CommandOutputRuntime): Promise<void>;
|
|
14
|
+
/** Clear only the handed runtime's JSON document entry. */
|
|
15
|
+
export declare function resetJsonPayloadLedger(runtime: CommandOutputRuntime): void;
|
|
16
|
+
/**
|
|
17
|
+
* Write `payload` as the handed runtime's invocation JSON document.
|
|
18
|
+
*
|
|
19
|
+
* The runtime is validated before any byte is written: a first argument without
|
|
20
|
+
* the output surface, or options outside their schema, refuses `INVALID_INPUT`
|
|
21
|
+
* `cli-output-runtime-invalid` with nothing written and no accounting recorded.
|
|
22
|
+
* The document is recorded only once delivery (write and flush) succeeded.
|
|
23
|
+
*/
|
|
24
|
+
export declare function writeJson<Payload>(runtime: CommandOutputRuntime, payload: Payload, options?: OutputOptions): Promise<void>;
|
|
25
|
+
/** Write rendered JSON once; record delivery only after the selected sink has flushed. */
|
|
26
|
+
export declare function writeRenderedJson(runtime: CommandOutputRuntime, document: string, hostOutput?: CliHostOutput): Promise<void>;
|
|
27
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/commands/output.ts"],"names":[],"mappings":"AAoBA,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAalE,+HAA+H;AAC/H,wBAAsB,cAAc,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAO3F;AAED,sDAAsD;AACtD,wBAAsB,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/F;AAED,6FAA6F;AAC7F,wBAAsB,eAAe,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/H;AAED,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAE5E;AAED,mGAAmG;AACnG,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzF;AAED,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAE1E;AAWD;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAahI;AAED,0FAA0F;AAC1F,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAYlI"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A command's stdout. Every writer is handed the runtime whose output it uses:
|
|
3
|
+
* bytes go through that runtime's host text output (`runtime/stdio`) and the
|
|
4
|
+
* call settles once the host's output plane has joined them (when the host has
|
|
5
|
+
* one), so the bytes are out before the host exits; a write or flush failure
|
|
6
|
+
* rejects unchanged. A runtime with no text output refuses `UNAVAILABLE`
|
|
7
|
+
* `stdio-unavailable`.
|
|
8
|
+
*
|
|
9
|
+
* JSON accounting is per runtime and per invocation: the ledger entry only the
|
|
10
|
+
* handed runtime's invocation moves, so one runtime's document never redirects
|
|
11
|
+
* another runtime's failure envelope. `resetJsonPayloadLedger(runtime)` clears
|
|
12
|
+
* one runtime's entry; `beginJsonPayloadLedger(runtime)` opens a new invocation
|
|
13
|
+
* on it. A runtime that has not booted has no ledger and no output: free text
|
|
14
|
+
* before boot comes from the public host output owner
|
|
15
|
+
* `@vibesdotdev/host-node/stdio` (`createNodeRuntimeStdio`).
|
|
16
|
+
*/
|
|
17
|
+
import { CapabilityError, getRuntimeStdio, getRuntimeStdioOutputPlane, hasRuntimeStdioOutputPlane } from '@vibesdotdev/kernel';
|
|
18
|
+
import { OutputRuntimeFormSchema as RuntimeFormSchema } from "./schemas/output.js";
|
|
19
|
+
import { getCLIInvocationClient, tryCLIInvocationClient } from "../invocation/state.js";
|
|
20
|
+
/** Join an explicit surface sink, or the handed runtime's output plane when none was supplied. */
|
|
21
|
+
async function writeThroughRuntime(runtime, content, hostOutput) {
|
|
22
|
+
if (hostOutput) {
|
|
23
|
+
hostOutput.write('stdout', content);
|
|
24
|
+
await hostOutput.flush();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
(await getRuntimeStdio(runtime)).write('stdout', content);
|
|
28
|
+
if (await hasRuntimeStdioOutputPlane(runtime))
|
|
29
|
+
await (await getRuntimeStdioOutputPlane(runtime)).flush();
|
|
30
|
+
}
|
|
31
|
+
/** The handed runtime's stdout and stderr writers; a runtime with no text output refuses `UNAVAILABLE` `stdio-unavailable`. */
|
|
32
|
+
export async function commandWriters(runtime) {
|
|
33
|
+
const stdio = await getRuntimeStdio(runtime);
|
|
34
|
+
return {
|
|
35
|
+
out: (text) => stdio.write('stdout', text),
|
|
36
|
+
err: (text) => stdio.write('stderr', text),
|
|
37
|
+
log: (line) => stdio.write('stderr', `${line}\n`)
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** Write `content` to the handed runtime's stdout. */
|
|
41
|
+
export async function writeStdout(runtime, content) {
|
|
42
|
+
await writeThroughRuntime(runtime, content);
|
|
43
|
+
}
|
|
44
|
+
/** Write a line through the handed runtime, or an explicit executable-owned surface sink. */
|
|
45
|
+
export async function writeStdoutLine(runtime, content, hostOutput) {
|
|
46
|
+
await writeThroughRuntime(runtime, `${content}\n`, hostOutput);
|
|
47
|
+
}
|
|
48
|
+
/** Whether the handed runtime's current invocation wrote its JSON document. */
|
|
49
|
+
export function hasWrittenJsonPayload(runtime) {
|
|
50
|
+
return tryCLIInvocationClient(runtime)?.hasWrittenJsonPayload() ?? false;
|
|
51
|
+
}
|
|
52
|
+
/** Open a new invocation on the handed runtime: its lifetime and output accounting start empty. */
|
|
53
|
+
export async function beginJsonPayloadLedger(runtime) {
|
|
54
|
+
await (await getCLIInvocationClient(runtime)).begin();
|
|
55
|
+
}
|
|
56
|
+
/** Clear only the handed runtime's JSON document entry. */
|
|
57
|
+
export function resetJsonPayloadLedger(runtime) {
|
|
58
|
+
tryCLIInvocationClient(runtime)?.resetJsonPayload();
|
|
59
|
+
}
|
|
60
|
+
/** Serialize `payload` as the one JSON document; `undefined` cannot be one. */
|
|
61
|
+
function serializeJson(payload, options) {
|
|
62
|
+
const serialized = JSON.stringify(payload, null, options.pretty === false ? 0 : 2);
|
|
63
|
+
if (serialized === undefined) {
|
|
64
|
+
throw new Error('Cannot write undefined as JSON output');
|
|
65
|
+
}
|
|
66
|
+
return serialized;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Write `payload` as the handed runtime's invocation JSON document.
|
|
70
|
+
*
|
|
71
|
+
* The runtime is validated before any byte is written: a first argument without
|
|
72
|
+
* the output surface, or options outside their schema, refuses `INVALID_INPUT`
|
|
73
|
+
* `cli-output-runtime-invalid` with nothing written and no accounting recorded.
|
|
74
|
+
* The document is recorded only once delivery (write and flush) succeeded.
|
|
75
|
+
*/
|
|
76
|
+
export async function writeJson(runtime, payload, options) {
|
|
77
|
+
const form = RuntimeFormSchema.safeParse([runtime, payload, options]);
|
|
78
|
+
if (!form.success) {
|
|
79
|
+
throw new CapabilityError('writeJson was handed a runtime that cannot host command output, or options outside its schema.', 'INVALID_INPUT', {
|
|
80
|
+
reason: 'cli-output-runtime-invalid',
|
|
81
|
+
retryable: false,
|
|
82
|
+
details: { issues: form.error.issues.map((issue) => issue.path.join('.')) }
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const [, , parsedOptions] = form.data;
|
|
86
|
+
const state = await getCLIInvocationClient(runtime);
|
|
87
|
+
await writeThroughRuntime(runtime, `${serializeJson(payload, parsedOptions ?? {})}\n`);
|
|
88
|
+
state.recordJsonPayload();
|
|
89
|
+
}
|
|
90
|
+
/** Write rendered JSON once; record delivery only after the selected sink has flushed. */
|
|
91
|
+
export async function writeRenderedJson(runtime, document, hostOutput) {
|
|
92
|
+
const form = RuntimeFormSchema.safeParse([runtime, document, undefined]);
|
|
93
|
+
if (!form.success) {
|
|
94
|
+
throw new CapabilityError('writeRenderedJson was handed a runtime that cannot host command output.', 'INVALID_INPUT', {
|
|
95
|
+
reason: 'cli-output-runtime-invalid',
|
|
96
|
+
retryable: false,
|
|
97
|
+
details: { issues: form.error.issues.map((issue) => issue.path.join('.')) }
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
const state = await getCLIInvocationClient(runtime);
|
|
101
|
+
await writeThroughRuntime(runtime, `${document}\n`, hostOutput);
|
|
102
|
+
state.recordJsonPayload();
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/commands/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAC/H,OAAO,EAAE,uBAAuB,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAMxF,kGAAkG;AAClG,KAAK,UAAU,mBAAmB,CAAC,OAA6B,EAAE,OAAe,EAAE,UAA0B;IAC5G,IAAI,UAAU,EAAE,CAAC;QAChB,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpC,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;QACzB,OAAO;IACR,CAAC;IACD,CAAC,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,MAAM,0BAA0B,CAAC,OAAO,CAAC;QAAE,MAAM,CAAC,MAAM,0BAA0B,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;AAC1G,CAAC;AAED,+HAA+H;AAC/H,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAA6B;IACjE,MAAM,KAAK,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC;IAC7C,OAAO;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