import type * as SqlClient from '@effect/sql/SqlClient'; import * as Effect from 'effect/Effect'; import { Context } from '@dxos/context'; import { type FeedProtocol } from '@dxos/protocols'; import type { SqlTransaction } from '@dxos/sql-sqlite'; import type { FeedStore } from './feed-store'; type ProtocolMessage = FeedProtocol.ProtocolMessage; export type SyncServerOptions = { /** This server's peer id. Set as senderPeerId on all replies. */ peerId: string; feedStore: FeedStore; /** Send a protocol message to a client. Receives full message (recipient is set by server). Returns Effect. */ sendMessage: (ctx: Context, message: ProtocolMessage) => Effect.Effect; }; /** * Server-side sync: receives protocol messages, runs query/append against the store, sends responses. * Reusable for many peers: sets senderPeerId = peerId and recipientPeerId = incoming message's senderPeerId on replies. */ export declare class SyncServer { #private; constructor(options: SyncServerOptions); /** * Receive a message from a client. Handles QueryRequest and AppendRequest; sends response via sendMessage with correct peer ids. */ handleMessage(ctx: Context, message: ProtocolMessage): Effect.Effect; } export {}; //# sourceMappingURL=sync-server.d.ts.map