/** * Lightweight CLI helper utilities extracted from agent-mux-cli. * * These are self-contained copies of the flag-parsing helpers, exit codes, * and output helpers that the launch module needs, avoiding a circular * dependency back to the CLI package. */ export type { ParsedArgs, FlagDef } from './types.js'; /** CLI exit code constants. */ export declare const ExitCode: { readonly SUCCESS: 0; readonly GENERAL_ERROR: 1; readonly USAGE_ERROR: 2; readonly AGENT_NOT_FOUND: 3; readonly AGENT_NOT_INSTALLED: 4; readonly AUTH_ERROR: 5; readonly CAPABILITY_ERROR: 6; readonly CONFIG_ERROR: 7; readonly SESSION_NOT_FOUND: 8; readonly PROFILE_NOT_FOUND: 9; readonly PLUGIN_ERROR: 10; readonly TIMEOUT: 11; readonly AGENT_CRASHED: 12; readonly ABORTED: 13; readonly RATE_LIMITED: 14; readonly CONTEXT_EXCEEDED: 15; }; export type ExitCodeValue = (typeof ExitCode)[keyof typeof ExitCode]; /** * Get a flag value as a string, or undefined. */ export declare function flagStr(flags: Record, name: string): string | undefined; /** * Get a flag value as a number, or undefined. */ export declare function flagNum(flags: Record, name: string): number | undefined; /** * Get a flag value as a boolean. */ export declare function flagBool(flags: Record, name: string): boolean | undefined; /** * Get a flag value as a string array (for repeatable flags). */ export declare function flagArr(flags: Record, name: string): string[]; /** * Print a JSON-wrapped error response to stdout. */ export declare function printJsonError(code: string, message: string, recoverable?: boolean): void; /** * Print an error message to stderr. */ export declare function printError(message: string): void;