export declare const ExitCodes: { readonly Success: 0; readonly GenericError: 1; readonly InvalidUsage: 2; readonly NotAuthenticated: 3; readonly PermissionDenied: 4; readonly NotFound: 5; }; export type ExitCode = (typeof ExitCodes)[keyof typeof ExitCodes]; export declare const colors: { red: (s: string) => string; green: (s: string) => string; yellow: (s: string) => string; cyan: (s: string) => string; dim: (s: string) => string; bold: (s: string) => string; }; export declare function outputJson(value: unknown): void; export declare function info(message: string): void; export declare function success(message: string): void; export declare function confirm(question: string): Promise; type FailWithOpts = { code?: ExitCode; extra?: Record; }; export declare function failWith(message: string, opts?: FailWithOpts): never; /** * Cut a plain line down to one screen row, with an ellipsis where it was cut. * * Exported for tests. */ export declare function clipToWidth(text: string, columns?: number): string; export type Spinner = { update: (message: string) => void; log: (line: string) => void; footer: (text: string) => void; stop: () => void; }; export declare function startSpinner(message: string): Spinner; export declare function parseJson(value: string, optionName: string): any; export declare function parsePositiveInt(value: string, optionName: string): number; export declare function applyRecordsLimit(records: T[], limit: number): { records: T[]; wasTruncated: boolean; total: number; }; type HandleApiCallOpts = { spinner?: string | false; /** * Replaces the default "run cargo-ai login" advice on a 401 — which reads as * a loop when the failing call is itself part of signing in. */ notAuthenticatedHint?: string; }; export declare function handleApiCall(fn: () => Promise, opts?: HandleApiCallOpts): Promise; export declare function sleep(ms: number): Promise; /** * Poll until the thing reports a `finishedAt`. * * `timeoutMs` is opt-in: a run or batch is allowed to take as long as it * takes, and a caller watching one interactively can see that it is still * going. Pass it where nobody is watching — a non-interactive turn that never * finishes would otherwise wait forever in a pipe or a CI job. */ export declare function pollUntilFinished(getResult: () => Promise, getFinishedAt: (result: T) => Date | string | null | undefined, intervalMs: number, timeoutMs?: number): Promise; export {}; //# sourceMappingURL=runHandler.d.ts.map