/** Separator used in compound runtime/legacy cursor keys. */
export const LINK_ID_SEPARATOR = '^';
/**
 * Build the runtime identifier for a replication link.
 *
 * Runtime identity is `(tenantDid, remoteEndpoint, scopeId)`.
 */
export function buildLinkId(tenantDid, remoteEndpoint, scopeId) {
    return `${tenantDid}${LINK_ID_SEPARATOR}${remoteEndpoint}${LINK_ID_SEPARATOR}${scopeId}`;
}
/**
 * Build the legacy cursor key used by the deprecated `syncCursors` sublevel.
 *
 * This remains only for one-time migration of pre-Phase-1f data.
 */
export function buildLegacyCursorKey(tenantDid, remoteEndpoint, protocol) {
    const base = `${tenantDid}${LINK_ID_SEPARATOR}${remoteEndpoint}`;
    return protocol ? `${base}${LINK_ID_SEPARATOR}${protocol}` : base;
}
//# sourceMappingURL=sync-link-id.js.map