import { type ProviderId } from "./providers.js";
export declare const DEFAULT_GRACE_PERIOD_DAYS = 30;
export interface MigrationState {
    acknowledged: boolean;
    ackedAt: string | null;
    migratedAt: string | null;
}
export interface MigrationAvailability {
    hasLegacyKeys: boolean;
    providers: ProviderId[];
    ackStatus?: {
        acknowledged: boolean;
        ackedAt: string | null;
        migratedAt: string | null;
    };
}
export interface MigrationResult {
    migrated: ProviderId[];
}
interface Logger {
    warn: (msg: string) => void;
    error: (msg: string) => void;
    info?: (msg: string) => void;
}
type SpawnSyncLike = (cmd: string, args: ReadonlyArray<string>) => {
    status: number | null;
    stdout: string | Buffer;
    stderr: string | Buffer;
};
export interface MigratorOptions {
    /** Override for tests — defaults to `process.platform`. */
    platform?: NodeJS.Platform;
    /** Override for tests — defaults to `child_process.spawnSync`. */
    spawnSync?: SpawnSyncLike;
    /** Where to persist the migration-state file. Defaults to `~/.vskill/migration-state.json`. */
    statePath?: string;
    /** Custom logger (tests). Defaults to console. */
    logger?: Logger;
}
export declare function readMigrationState(filePath: string): MigrationState | null;
export declare function writeMigrationState(filePath: string, state: MigrationState): void;
export declare class DarwinKeychainMigrator {
    private readonly platform;
    private readonly spawnSync;
    private readonly statePath;
    private readonly logger;
    constructor(opts?: MigratorOptions);
    /** Probe the keychain for legacy entries. Never writes; never errors on non-Darwin. */
    available(): Promise<MigrationAvailability>;
    /** Copy legacy keychain entries into the file store. Idempotent. */
    migrate(): Promise<MigrationResult>;
    /** Record that the user dismissed the migration banner. */
    acknowledge(): Promise<void>;
    /** Read a single keychain entry via `security find-generic-password`. */
    private probe;
}
export {};
