import type { Credential, CredentialStore, OAuthCredential } from "@earendil-works/pi-ai";
export type CursorCliAccountSlot = {
    name: string;
    displayName?: string;
    access: string;
    refresh: string;
    expires: number;
    source: "login" | "import";
    blockedUntil?: number;
    blockReason?: "rate_limit" | "auth_error";
};
export type CursorCliSlotState = Record<string, {
    blockedUntil?: number;
    blockReason?: "rate_limit" | "auth_error";
}>;
export type CursorCliOauthCredential = OAuthCredential & {
    accounts?: CursorCliAccountSlot[];
    pinned?: string;
    order?: string[];
    slotState?: CursorCliSlotState;
};
export declare const SENTINEL_OAUTH_FIELDS: {
    readonly access: "cursor-cli-oauth-managed";
    readonly refresh: "cursor-cli-oauth-managed";
    readonly expires: 4102444800000;
};
export declare function emptyCredential(): CursorCliOauthCredential;
export declare function listAccounts(credential: CursorCliOauthCredential): CursorCliAccountSlot[];
export declare function assertValidAccountName(name: string): void;
export declare function addAccount(credential: CursorCliOauthCredential, slot: CursorCliAccountSlot): CursorCliOauthCredential;
export declare function removeAccount(credential: CursorCliOauthCredential, name: string): CursorCliOauthCredential;
export declare function pinAccount(credential: CursorCliOauthCredential, name: string): CursorCliOauthCredential;
export declare function assertSentinelInvariant(credential: CursorCliOauthCredential): void;
export type CursorCliSlotRefresher = (refreshToken: string, signal: AbortSignal) => Promise<{
    refresh: string;
    access: string;
    expires: number;
}>;
export declare function refreshSlot(store: CredentialStore, providerId: string, slotName: string, refresher: CursorCliSlotRefresher, signal: AbortSignal): Promise<Credential | undefined>;
//# sourceMappingURL=accounts.d.ts.map