import type { AccountSlot, ClaudeCliAccountSlot } from "./accounts.ts";
export type SignInRequiredReason = NonNullable<ClaudeCliAccountSlot["signInRequired"]>;
export type SignInRequired = {
    readonly name: string;
    readonly reason: SignInRequiredReason;
};
/** The one prompt every surface shows for accounts from the retired sign-in (senpi#4436): notice, turn error, docs. */
export declare function signInAgainMessage(names: readonly string[]): string;
/** One sentence per reason, the retired sign-in first; an expired CLI login (senpi#5350) says "expired". */
export declare function signInRequiredMessage(required: readonly SignInRequired[]): string;
/** A turn error that is a sign-in-required prompt: no retry or other model can serve it until the user signs in. */
export declare function isSignInAgainError(errorMessage: string | undefined): boolean;
/**
 * A slot this engine can serve: nothing to sign in again for, and (on the CLI store) an account dir id that names a
 * directory. A stored CLI slot whose `dirId` is missing or malformed names no directory, so preparing it fails with an
 * internal error ("Invalid Claude account dir id") before any model call - that is a sign-in state, not a turn
 * failure, and it must never reach the SDK (omo#12228).
 */
export declare function isServableAccountSlot(slot: AccountSlot): boolean;
/**
 * The accounts a turn cannot use until the user signs in again, named so the prompt can say which. A stored slot whose
 * account dir id is unusable carries no login this engine can read, so it is reported as expired: only a new sign-in
 * gives it a directory (run `/login anthropic-subscription`).
 */
export declare function signInRequiredAccounts(accounts: readonly AccountSlot[]): SignInRequired[];
/**
 * A turn found only accounts that must sign in again; the message is the prompt, prefixed so it classifies as auth.
 * A bare name is an account from the retired sign-in.
 */
export declare class ClaudeSignInRequiredError extends Error {
    readonly accountNames: readonly string[];
    constructor(accounts: readonly (string | SignInRequired)[]);
}
//# sourceMappingURL=sign-in-again.d.ts.map