import type { SqliteAdapter as Database } from '../db/sqlite-adapter.js'; export declare const AUTOSYNC_STATE_SOURCE = "autosync"; export declare const AUTOSYNC_STATE_KEY = "last_run"; export declare const DEFAULT_AUTOSYNC_INTERVAL_MS: number; /** The auto-sync interval in ms: env seconds, 0 = always sync, default 10 min. */ export declare function autosyncIntervalMs(env?: NodeJS.ProcessEnv): number; /** The store that holds the autosync marker: the ingest cache in hosted mode, the local db otherwise. */ export declare function autosyncMarkerStore(env?: NodeJS.ProcessEnv): Database; /** Epoch ms of the last auto-sync, or 0 when the store has never auto-synced. */ export declare function autosyncLastRun(db?: Database, env?: NodeJS.ProcessEnv): number; /** Record that an auto-sync just completed. */ export declare function markAutoSync(db?: Database, env?: NodeJS.ProcessEnv): void; /** Whether the auto-sync should run now: always when the interval is 0, otherwise at most once per interval. */ export declare function autoSyncDue(db?: Database, env?: NodeJS.ProcessEnv): boolean; //# sourceMappingURL=autosync-gate.d.ts.map