import { Effect } from 'effect';
import type { WorkbookSnapshot } from '@bilig/protocol';
import type { EngineOpBatch } from '@bilig/workbook';
import type { EngineRuntimeState, EngineSyncClient } from '../runtime-state.js';
import { EngineSyncError } from '../errors.js';
export interface EngineReplicaSyncService {
    readonly connectClient: (client: EngineSyncClient) => Effect.Effect<void, EngineSyncError>;
    readonly disconnectClient: () => Effect.Effect<void, EngineSyncError>;
    readonly applyRemoteBatch: (batch: EngineOpBatch) => Effect.Effect<boolean, EngineSyncError>;
}
export declare function createEngineReplicaSyncService(args: {
    readonly state: Pick<EngineRuntimeState, 'replicaState' | 'getSyncState' | 'setSyncState' | 'getSyncClientConnection' | 'setSyncClientConnection'>;
    readonly applyRemoteBatchNow: (batch: EngineOpBatch) => void;
    readonly applyRemoteSnapshot: (snapshot: WorkbookSnapshot) => void;
}): EngineReplicaSyncService;
