/** * Preflight check: estimate key count, type distribution, notify-keyspace-events (SPEC_F §F.9 Step 0). */ import type { MigrationRedisClient } from './redis-client.ts'; export interface KeyspaceEventsReadResult { value: string | null; /** False when the command is disabled or renamed and the default name fails. */ available: boolean; } export interface SetKeyspaceEventsOptions { configCommand?: string; merge?: boolean; } export interface SetKeyspaceEventsResult { ok: boolean; previous: string | null; applied: string; error?: string; } export interface PreflightOptions { configCommand?: string; } export interface PreflightResult { keyCountEstimate: number; typeDistribution: Record; notifyKeyspaceEvents: string | null; configCommandAvailable: boolean; recommended: { scan_count: number; max_concurrency: number; max_rps: number; }; } /** * Read the current `notify-keyspace-events` value from Redis. * Uses raw sendCommand so it works even if the CONFIG command has been renamed. */ export declare function readKeyspaceEvents(redisClient: MigrationRedisClient, configCommand?: string): Promise; /** * Set `notify-keyspace-events` to `value` on Redis. * Optionally merges the new flags into the existing value instead of overwriting. * * @param value - Flags to apply (e.g. `'Kgxe'`). */ export declare function setKeyspaceEvents(redisClient: MigrationRedisClient, value: string, { configCommand, merge }?: SetKeyspaceEventsOptions): Promise; export declare function runPreflight(redisClient: MigrationRedisClient, { configCommand }?: PreflightOptions): Promise;