/**
 * Binding index — the machine-readable join between figma variable/style
 * identities and composition variables (design spec §7.1).
 *
 * Lives at .media/figma-bindings.jsonl, next to (but separate from) the
 * human-readable figma-tokens.json sidecar. Resolution is exact-ID only:
 * a missed link bakes a correct literal; a wrong link silently changes
 * color at the next brand refresh. Never match by value or name.
 */
export interface FigmaBindingRecord {
    kind: "binding";
    /** the figma variable/style id as it appears in node data (exact match key) */
    figmaId: string;
    /** stable cross-file identity, when known ("id and key are stable over the lifetime") */
    key?: string;
    sourceFileKey: string;
    /** semantic→primitive alias chain, directly-bound id first */
    aliasChain?: string[];
    compositionVariableId: string;
    brandRole?: string;
    /** figma file version at import time — staleness check */
    version: string;
}
export declare function readBindings(projectDir: string): FigmaBindingRecord[];
export declare function appendBinding(projectDir: string, record: FigmaBindingRecord): void;
/**
 * Upsert by figmaId: re-running a tokens import must REPLACE that file's
 * stale binding rows, not append duplicates — `findBindingByFigmaId`
 * returns the first match, so appended duplicates would pin lookups to the
 * stale record forever. Library rows and other files' bindings survive.
 */
export declare function upsertBindings(projectDir: string, records: FigmaBindingRecord[]): void;
/** Exact-ID lookup, checking alias chains too. Never value/name matching. */
export declare function findBindingByFigmaId(projectDir: string, figmaId: string): FigmaBindingRecord | null;
/** Answered "which file is this library?" mappings — asked once per project. */
export declare function readLibraryMap(projectDir: string): Record<string, string>;
export declare function recordLibraryFile(projectDir: string, libraryKey: string, fileKey: string): void;
//# sourceMappingURL=bindings.d.ts.map