import { type CompletionResult, type ParsedArgs } from "@cotal-ai/core"; import { type OutputWarning } from "@cotal-ai/workspace"; /** The hidden dispatcher the shell stubs call (`rawArgs`: its argv is another command's * half-typed line, never parsed). The words after `cotal`, up to and including the (possibly * empty) word being completed, arrive as `args.positionals` verbatim. */ export declare function complete(args: ParsedArgs): Promise; export declare const completionFlags: readonly [{ readonly name: "json"; readonly short: "j"; readonly type: "boolean"; readonly description: "structured output on stdout"; }, { readonly name: "plain"; readonly type: "boolean"; readonly description: "plain line-oriented output"; }]; /** Validate output mode and grammar before reading or changing shell files. */ export declare function validateCompletionArguments(args: ParsedArgs): void; export declare function completion(args: ParsedArgs): Promise; type StubState = "missing" | "current" | "differs" | "unreadable"; /** One shell's completion as this machine has it. `wiredIn` is where `completion install` wires the * stub in: the startup file holding the line it writes, or fish's completions directory, which fish * loads by itself. It is null when that wiring is not found, which does not mean the shell loads no * completion some other way. PowerShell reports only the profile its installed host identifies. */ export interface ShellCompletion { readonly shell: string; readonly stub: string | null; readonly state: StubState | "not-installed-by-cotal"; readonly wiredIn: string | null; readonly ownership: "managed" | "unrecorded" | "modified" | "unreadable" | "manual"; readonly legacyWiring: boolean; } export interface CompletionStatus { /** The shell `$SHELL` names, when it is one Cotal completes. */ readonly shell: string | null; readonly shells: ShellCompletion[]; } /** Each shell's stub against the script this binary prints, and a warning for each file it could * not read. Reads local files only. */ export declare function completionStatus(): { status: CompletionStatus; unread: OutputWarning[]; }; /** Argument completion for `cotal completion` itself: its subcommands, then the shells. */ export declare function completionComplete(argv: string[]): CompletionResult; export {}; //# sourceMappingURL=completion.d.ts.map