/** * The scai Commander program tree — assembled here, with **no * import-time side effects**, so it can be consumed both by the CLI * entrypoint (`src/cli.ts`, which runs it) and by tooling that only * needs to inspect the command structure (`scripts/generate-commands-doc.ts`). * * `src/cli.ts` keeps the runtime concerns — argv normalization, the * auto-wizard, telemetry, the force-exit teardown — and calls * `createProgram` to build the tree. Anything that adds a top-level * command group belongs here. */ import { Command } from "commander"; /** Env snapshot the shell REPL restores between sub-invocations. */ export type RunCliOptions = { baseEnv?: Record; skipBanner?: boolean; shellMode?: boolean; }; /** * The CLI runner — `src/cli.ts` supplies the real implementation. The * shell command needs a callback to re-enter the CLI for each typed * line; `createProgram` threads it through without importing the * entrypoint (which would re-trigger its side effects). */ export type RunCli = (argv: string[], options?: RunCliOptions) => Promise; /** * Build the full nested Commander tree. The CLI surface is organized by * product area, not flat — each parent below is a namespace, and the * leaf command builders are unchanged (only where they attach). * * Pure: no side effects beyond constructing `Command` objects. */ export declare const createProgram: (runCli: RunCli, options?: { shellMode?: boolean; }) => Command;