export interface BrokerSessionState {
    status: 'absent' | 'pending' | 'awaiting_code' | 'done' | 'error';
    /** The Google sign-in URL the user opens — present once a session exists. */
    signInUrl?: string;
    /** Short-lived Google access token, only on 'done'. */
    accessToken?: string;
    /** Epoch ms the access token expires, on 'done'. */
    expiresAt?: number | null;
    /** Human-readable failure reason for 'awaiting_code' (wrong code) / 'error'. */
    error?: string;
}
/** Create a broker sign-in session for `appId`, persist its handle, and return the URL to show the user. */
export declare function brokerBegin(appId: string, baseDir?: string): Promise<{
    signInUrl: string;
}>;
/** Poll the persisted broker session. Pass `confirmCode` (the code the user read off the page) to release the token. */
export declare function brokerPoll(appId: string, confirmCode?: string, baseDir?: string): Promise<BrokerSessionState>;
/** Drop the in-flight broker session handle (reopen / error recovery). */
export declare function brokerClear(appId: string, baseDir?: string): Promise<void>;
