OptionalCustomKeyStats?: Record<string, CustomKeyStat[]>The sync's in-memory custom-key statistics (keyed by entity name). Supplements the overflow-column scan: with the Content-hash basis (overflow excluded from matching), unchanged rows never write their overflow JSON, so the column scan alone under-reports — these stats carry the candidates + sizing evidence for exactly those skipped rows.
OptionalProvider?: unknown
Server-registered hook that runs the post-sync custom-column promotion (gaps.md §2). The engine never depends on RSU/CodeGen — the server registers an implementation that performs the coverage scan → RSU ADD COLUMN → IOF/field-map. Self-gated INSIDE the callback: a cheap EXISTS over the overflow column means a customs-free sync does no promotion work, so the two-stage process collapses to single-stage (1×) when there is nothing to promote.
ContextUser/Provider are typed
unknownto avoid a circular import; the engine passes a real UserInfo / IMetadataProvider and the server implementation narrows them back.