/** * @fileoverview Shell-specific completion-script renderers (bash/zsh/fish). * * Split out of `completion.ts` (file-length limit) to separate that module's * inventory-assembly concern — deriving a {@link CompletionInventory} from * the live `CommandSpec`s — from this one: turning an already-assembled * inventory into each shell's sourceable script text. `completion.ts` * re-exports {@link CompletionInventory} from here and calls * {@link bashScript} / {@link zshScript} / {@link fishScript} from its * `buildCompletionScript`. This module intentionally has no dependency on * `completion.ts` (one-directional import, no cycle). */ /** * The derived completion surface, assembled from the live `CommandSpec`s by * `assembleCompletionInventory` (`completion.ts`). Everything the emitted * script needs to know about the command surface lives here — there are no * hand-maintained flag lists anymore. */ export interface CompletionInventory { /** User-facing top-level command names (incl. aliases + `help`). */ readonly subcommands: readonly string[]; /** Per-command long-flag list, keyed by command name (and alias). */ readonly commandFlags: Readonly>; /** * Sub-subcommand names for the action-less groups (`sessions`, `tools`), the * ` ` grammar (`fit export`…), and the per-tool `plugin` groups * (`fit plugin`, keyed under `${parentVerb} plugin`). */ readonly groupSubcommands: Readonly>; } /** * Render the bash completion script. `commonFlagList` is the pre-joined * ADR-0021 common-flag fallback (owned by `completion.ts`, which is the * single place `@opensip-cli/contracts`'s flag registry is read) — this * module stays a pure renderer over an already-assembled inventory. */ export declare function bashScript(inv: CompletionInventory, commonFlagList: string): string; /** Render the zsh completion script. See {@link bashScript} for `commonFlagList`. */ export declare function zshScript(inv: CompletionInventory, commonFlagList: string): string; /** Render the fish completion script. Fish has no common-flag fallback line. */ export declare function fishScript(inv: CompletionInventory): string; //# sourceMappingURL=completion-scripts.d.ts.map