/** * Recovering the failure message of a `now-sdk` child process. * * The SDK CLI does not report failures on stderr: its logger writes to stdout * (`[now-sdk] ERROR: `), and in machine mode (`--output` / `--select`, * which `query`, `cicd` and `exec` run in) it silences the logger and prints a * JSON envelope `{"ok":false,"error":{"message":…,"status"?:…}}` to stdout * instead. Reading only stderr therefore loses the reason for almost every * instance-side failure. */ /** Strip ANSI escape codes from CLI output so they never reach a client or an LLM. */ export declare function stripAnsi(text: string): string; /** * The best available failure message of a `now-sdk` invocation, or undefined * when neither stream carries one. Preference: the machine-mode envelope's * `error.message`, then the CLI's logged `ERROR:` lines, then raw stderr. When * the runner stopped the child (timeout / cancellation) or an external signal * terminated it, the runner's stderr note is always kept, since that is the * reason the output is partial. * @param stdout The child's stdout * @param stderr The child's stderr (the runner appends its own notes here) * @param exitCode The exit code reported by the runner * @param terminatedBySignal Signal name when an external signal terminated the child */ export declare function cliErrorMessage(stdout: string, stderr: string, exitCode?: number, terminatedBySignal?: string): string | undefined; //# sourceMappingURL=cliError.d.ts.map