/**
 * Utilities for encoding/decoding composite primary keys for the resolved state virtual table.
 *
 * The composite key format is: tag~file_id~entity_id~version_id
 * Using ~ as delimiter since it's URL-safe and unlikely to appear in identifiers
 *
 * Tag meanings:
 *
 * - T: Transaction direct (from lix_internal_transaction_state in child version)
 * - TI: Transaction inherited (from lix_internal_transaction_state in parent version)
 * - U: Untracked direct (from lix_internal_state_all_untracked in child version)
 * - UI: Untracked inherited (from lix_internal_state_all_untracked in parent version)
 * - C: Cache-tracked direct (from lix_internal_state_cache in child version)
 * - CI: Cache-tracked inherited (from lix_internal_state_cache in parent version)
 */
export type StatePkTag = "T" | "TI" | "U" | "UI" | "C" | "CI";
/** Encode one segment so it cannot contain the delimiter or raw '%' */
export declare function encodeStatePkPart(part: string): string;
/**
 * Build primary key string from components.
 *
 * @param tag - The tag indicating the source and ownership
 * @param fileId - The file ID
 * @param entityId - The entity ID
 * @param versionId - The version ID
 * @returns The encoded composite key
 */
export declare function serializeStatePk(tag: StatePkTag, fileId: string, entityId: string, versionId: string): string;
/**
 * Parse primary key back into parts.
 *
 * @param pk - The encoded composite key
 * @returns The decoded components
 */
export declare function parseStatePk(pk: string): {
    tag: StatePkTag;
    fileId: string;
    entityId: string;
    versionId: string;
};
//# sourceMappingURL=primary-key.d.ts.map