/** * JSON-mode auth guard: a --json caller must get JSON on EVERY path, including * "not signed in" (QA BUG-002, 2026-07-20). Prints a machine-readable error and * returns true when there is no session. */ export declare function notSignedInJson(): boolean; /** * Companion for the expired-session path (Greptile P1 on #1650): a present- * but-dead JWT sails past notSignedInJson, and a failed refresh throws prose. * Commands wrap their fetch and route 401s here so --json callers get JSON on * EVERY auth failure. Returns true when the error was handled. */ export declare function handledJsonAuthError(err: unknown, json: boolean | undefined): boolean; /** * Last-resort guard for --json commands (Greptile P1 on #1776): --json * advertises machine-readable output on EVERY path, so an unexpected failure * (unmapped server error, network failure, non-JSON proxy response) must still * print an {error, hint} envelope instead of letting the top-level handler * leak plain text. Call after the specific envelopes; returns true when * handled (json mode), false to rethrow for the human-readable path. */ export declare function handledJsonFailure(err: unknown, json: boolean | undefined): boolean; //# sourceMappingURL=json-auth.d.ts.map