/** * Process-wide error type and exit-code contract. * * Extracted from http.ts so the auth gateway (auth/ensure.ts) can throw the same * error type without creating an import cycle (http.ts → ensure.ts → http.ts). * `SkillError` is still re-exported from http.ts, so existing imports are unchanged. * * Exit codes are a CONTRACT with hosts (Claude Code / Codex / ab-agent): an agent * reads the code to decide whether to guide the user through authorization, retry * later, or surface a hard failure. Never reuse a code for a different meaning. */ export declare const EXIT: { /** Success. */ readonly OK: 0; /** Generic runtime failure. */ readonly ERROR: 1; /** Usage error — unknown skill / unknown option. */ readonly USAGE: 2; /** No usable credential, or the credential was rejected. Host should offer to authorize. */ readonly NOT_AUTHENTICATED: 4; /** Backend unreachable / timed out. Distinct from 4 so "log in" isn't suggested for an outage. */ readonly BACKEND_UNREACHABLE: 5; /** Failed to spawn the underlying interpreter. */ readonly SPAWN_FAILED: 127; }; export declare class SkillError extends Error { readonly exitCode: number; constructor(message: string, exitCode?: number); }