/**
 * Mutation Tracker — Proxy-based dirty cell tracking for sheet-exec.
 *
 * Wraps Workbook/Worksheet objects in Proxies that record every mutation
 * (setCell, setRange, setCells, etc.). Captures old values before
 * each mutation. After code execution, resolves mutations to CellEdit[]
 * by batch-fetching current values and display values.
 *
 * Each MutationRecord stores a workbook reference so resolve() works
 * correctly across multiple workbooks.
 *
 * Proxy pattern adapted from mog/runtime/headless-server/src/execution/executor.ts.
 *
 * TODO: Sparse range optimization — resolve() fetches the full bounding box for
 * all mutations on a sheet. If mutations are sparse (e.g. A1 and Z100), this
 * fetches many unneeded cells. Consider partitioning into sub-ranges.
 */
import type { CellEdit } from './cell-diff/types.js';
import type { Workbook } from './sdk-types.js';
export declare class MutationTracker {
    private readonly mutations;
    private readonly trackedWorkbooks;
    /**
     * Wrap a Workbook in tracking Proxies. Returns a cached proxy if this
     * workbook has already been wrapped, avoiding nested proxy chains.
     */
    track(wb: Workbook): Workbook;
    /**
     * After execution, resolve all mutations to CellEdit[] by batch-fetching
     * current values, display values, and number formats from workbooks.
     *
     * Each mutation stores its workbook reference, so multi-workbook scenarios
     * resolve correctly.
     *
     * getRange returns CellData[][] where CellData = { value, formula?, format?, ... }
     * and format?.numberFormat holds the number format string.
     */
    resolve(): Promise<CellEdit[]>;
    /** Stable identity for a worksheet across lookups. */
    private worksheetIds;
    private nextWsId;
    private getWorksheetId;
}
//# sourceMappingURL=mutation-tracker.d.ts.map