import { Context } from '../context/context.js'; import { PersistenceMetadataDb } from './interfaces.js'; import type { PersistenceMetadata } from './PersistenceMetadata.js'; export declare class PersistenceRebaser { private db; private meta; private ctx; constructor(db: PersistenceMetadataDb, meta: PersistenceMetadata, ctx: Pick); /** * Autonomous rebases are only allowed for clients who have never synced. They * keep storage clean for non-syncing clients by compressing history. */ tryAutonomousRebase: () => Promise; /** * Attempt to autonomously rebase local documents without server intervention. * This can currently only happen for a client who has never synced before. * The goal is to allow local-only clients to compress their history to exactly * their undo stack. */ private runRebase; /** * Debounces rebase attempts to avoid thrashing the database with * rebase operations. */ scheduleRebase: (timestamp: string) => Promise; private rebaseTimeout; private rebase; }