/**
 * @fileoverview Sync runner — drives a server's `sync` generator against a
 * {@link MirrorStore} for full init and incremental refresh. Owns the
 * cursor/checkpoint state machine, per-page persistence, resume-on-interrupt,
 * and terminal status transitions.
 * @module services/mirror/core/runner
 */
import type { MirrorLogger, MirrorStore, RunSyncOptions, SyncGenerator, SyncResult } from '../types.js';
/** Minimal context the runner consumes — a duck-typed logger plus cancellation. */
export interface RunnerContext {
    log: MirrorLogger;
    signal: AbortSignal;
}
/**
 * Run one sync cycle.
 *
 * - `init` performs a full harvest. With no prior state it starts from scratch;
 *   if a previous init left an incomplete dataset (status `in_progress` from a
 *   crash, or `error` from a caught failure) and a `cursor` was persisted, it
 *   resumes from that cursor, with `checkpoint` available for recovery.
 * - `refresh` performs an incremental harvest from the durable `checkpoint`.
 *
 * State is persisted after every page, so an interrupt at any point resumes from
 * the last yielded page. On success the volatile `cursor` is cleared and
 * `completedAt`/`total` advance; on failure they are preserved (a failed
 * refresh on top of a complete mirror stays "ready").
 */
export declare function runSync(store: MirrorStore, sync: SyncGenerator, ctx: RunnerContext, options: RunSyncOptions): Promise<SyncResult>;
//# sourceMappingURL=runner.d.ts.map