import { type CanonSyncOptions } from './canonSync.js'; export interface CanonAutoSyncConfig { /** Opt-in gate. False → scheduleCanonSync is a no-op. */ enabled: boolean; /** Debounce window before a sync fires after the last trigger. */ debounceMs: number; /** Options forwarded to canonSync (store / repoUrl). */ options: CanonSyncOptions; } /** Resolve the auto-sync config from the environment (opt-in via CANON_AUTO_SYNC). */ export declare function canonAutoSyncConfig(env?: NodeJS.ProcessEnv): CanonAutoSyncConfig; export declare function __setCanonSyncRunner(fn: ((o: CanonSyncOptions) => unknown | Promise) | null): void; /** * HOOK — call on each session write / turn completion. Debounced: a burst of * turns collapses into one `canonSync`. No-op unless `CANON_AUTO_SYNC` is set. * The timer is `unref`'d so a pending sync never keeps the process alive by itself. * `overrides` merge over the env config (tests force `{ enabled, debounceMs }`). */ export declare function scheduleCanonSync(overrides?: Partial): void; /** * Flush a pending sync NOW and await it (process shutdown / explicit flush). * No-op when nothing was scheduled — so opting out (never calling * `scheduleCanonSync`) can never trigger a capture. */ export declare function flushCanonSync(): Promise; //# sourceMappingURL=canonSyncScheduler.d.ts.map