/// <reference types="node" />
/// <reference types="bun-types" />
export declare const DOCKER_BOOTSTRAP_STATE_FILENAME = ".docker-bootstrap-state.json";
export declare const DOCKER_LEGACY_API_KEY = "ccs-internal-managed";
export declare const DEFAULT_DOCKER_LEGACY_KEY_GRACE_DAYS = 14;
export declare const DOCKER_LEGACY_KEY_GRACE_ENV = "CCS_DOCKER_LEGACY_KEY_GRACE_DAYS";
export declare const DOCKER_RESTORE_LEGACY_KEY_ENV = "CCS_DOCKER_RESTORE_LEGACY_API_KEY";
export declare const DOCKER_ENABLE_LEGACY_KEY_AUTH_ENV = "CCS_DOCKER_ENABLE_LEGACY_KEY_AUTH";
export interface DockerLegacyKeyGrace {
    legacyKey: string;
    replacementKey: string;
    startedAt: string;
    expiresAt: string;
    finalizedAt?: string;
}
export interface DockerBootstrapState {
    version: number;
    apiKey?: string;
    bootstrappedAt: string;
    legacyKeyGrace?: DockerLegacyKeyGrace;
}
export interface DockerBootstrapStateReadResult {
    state: DockerBootstrapState | null;
    corrupted: boolean;
    path: string;
}
export interface DockerKeyRotationStatus {
    apiKey?: string;
    maskedApiKey?: string;
    statePath: string;
    stateCorrupted: boolean;
    legacyGraceActive: boolean;
    legacyGrace?: DockerLegacyKeyGrace;
}
export declare function getDockerBootstrapStatePath(): string;
export declare function parseDockerLegacyKeyGraceDays(env?: NodeJS.ProcessEnv): number;
export declare function isLikelyDockerGeneratedApiKey(value: string | undefined): boolean;
export declare function shouldRestoreDockerLegacyApiKey(env?: NodeJS.ProcessEnv): boolean;
export declare function shouldEnableDockerLegacyKeyAuth(env?: NodeJS.ProcessEnv): boolean;
export declare function readDockerBootstrapState(): DockerBootstrapStateReadResult;
export declare function writeDockerBootstrapState(state: DockerBootstrapState): void;
export declare function createDockerBootstrapState(apiKey: string | undefined, now?: Date): DockerBootstrapState;
export declare function addLegacyKeyGrace(state: DockerBootstrapState, replacementKey: string, now?: Date, graceDays?: number): DockerBootstrapState;
export declare function isDockerLegacyKeyGraceActive(state: DockerBootstrapState | null, now?: Date): boolean;
export declare function getActiveDockerLegacyApiKeys(now?: Date): string[];
export declare function maskDockerApiKey(apiKey: string | undefined): string | undefined;
export declare function getDockerKeyRotationStatus(now?: Date): DockerKeyRotationStatus;
export declare function renderDockerKeyRotationBanner(status?: DockerKeyRotationStatus): string;
export declare function finalizeDockerKeyRotation(now?: Date): DockerKeyRotationStatus;
//# sourceMappingURL=docker-key-rotation.d.ts.map