/** * Sanitized failure reasons for `hikoutei setup` SDK/HTTP errors. * * Errors thrown by the Google SDKs (GaxiosError) can embed request URLs and * config objects, and arbitrary thrown messages can carry tokens or key * material, so setup diagnostics never forward raw error objects or full * messages. These helpers reduce an unknown error to a safe, short reason: * the HTTP status when one exists, otherwise the message of an error that * was explicitly constructed with `safeError` (the only whitelisted source * of human-readable reasons), or a generic fallback for everything else. * Tokens, key material, and request URLs never appear. */ /** HTTP status carried by an SDK error, when one exists. */ export declare function httpStatusOf(error: unknown): number | undefined; /** * Constructs an error whose message is safe to surface to the user. * * Use this for every validation/guard failure the setup flow builds itself * (malformed payloads, identity mismatches, protocol violations). The * message must never include tokens, key material, or raw remote output. */ export declare function safeError(message: string): Error; /** * Reduces an unknown error to a safe diagnostic reason. * * Prefers a bare `HTTP ` (the most machine-friendly and leak-free * form). Only errors constructed with `safeError` may contribute their * message (first non-empty line, truncated); any other error — including * arbitrary SDK, runner, or network messages — becomes the generic * `unknown failure`. Never includes tokens, key material, or raw streams. */ export declare function safeReasonOf(error: unknown): string; //# sourceMappingURL=sdkError.d.ts.map