import { a as HelpRow, i as CommandHelpSpec, r as CommandHandler } from "./types-I5Cwtl_K.js"; import * as z from "zod/mini"; //#region src/tui/help.d.ts type GroupHelpSpec = { menu: MenuRow[]; usage?: string; description?: string[]; examples?: HelpRow[]; exampleCommand?: string; seeAlso?: string; details?: boolean; }; /** A help row: left column in cyan, right in dim, an optional note in light. */ type MenuRow = { usage: string; blurb: string; note?: string; }; //#endregion //#region src/cli.d.ts declare const MODEL_HINT = "Use luna or sonnet for mechanical work; sol or opus is the default.\nUse astra or fable for the hardest work; they cost the most."; declare const SERVER_FLAG: HelpRow; declare const CREDENTIAL_SERVER_FLAG: HelpRow; type CliCommand = CommandHandler & { commandName?: string; help?: CommandHelpSpec; groupHelp?: GroupHelpSpec; subcommands?: Record; }; type Load = () => Promise; type CommandInput = { options: z.output>; args: string[]; cwd: string; }; /** A Coder server used for the first time is confirmed once, then remembered. */ declare function confirmServer(option: string | true | undefined, yes?: boolean): Promise; declare function command(spec: { /** The command's words, such as `task stop`, for its help and error hints. */ name: string; helpName?: string; globalFlags?: { json?: false; cwd?: false; }; help?: CommandHelpSpec; options: S; /** The most positional arguments it takes. */ args?: number; run(input: CommandInput): Promise | R; /** Human output. */ print?(result: R, input: CommandInput): void; /** What `--json` prints, when not the result itself. */ json?(result: R, input: CommandInput): unknown; /** The exit code the result means, in both outputs. */ exit?(result: R, input: CommandInput): number | undefined; }): CliCommand; /** A command group: routes `coder ` and prints its help; the work is in the subcommands. */ declare function group(name: string, subcommands: Record, groupHelp?: GroupHelpSpec, { aliases, nested, hint, help }?: { aliases?: Record; nested?: string[]; hint?: string; help?: CommandHelpSpec; }): CliCommand; declare function getCommandHelp(id: string): Promise; declare function renderHelp(id: string): Promise; declare const renderTopHelp: () => string; /** Run the CLI on `process.argv`. */ declare function main(): Promise; //#endregion export { CREDENTIAL_SERVER_FLAG, CliCommand, CommandInput, Load, MODEL_HINT, SERVER_FLAG, command, confirmServer, getCommandHelp, group, main, renderHelp, renderTopHelp };