import type { PubSub } from '@livestore/utils/effect'; import { Effect, Queue, Schema, Scope, WebChannel } from '@livestore/utils/effect'; import { type ChannelName, type MeshNodeName, type ProxyQueueItem } from '../common.ts'; import * as MeshSchema from '../mesh-schema.ts'; /** * Simulation parameters for proxy channel operations. * Used for testing race conditions and timing-sensitive behavior. * * Each parameter represents a delay (in ms) injected at a specific point in the code. * Values are bounded 0-500ms to prevent tests from running too long. */ export declare const ProxyChannelSimulationParams: Schema.Struct<{ /** * Delays related to receiving and processing payload messages */ onPayload: Schema.Struct<{ /** Delay before sending the ACK response (simulates slow ACK send) */ beforeAckSend: Schema.filter; /** Delay after forking the ACK send, before adding message to listen queue */ afterAckFork: Schema.filter; /** Delay after adding message to listen queue */ afterListenQueueOffer: Schema.filter; }>; }>; export type ProxyChannelSimulationParams = typeof ProxyChannelSimulationParams.Type; /** Default simulation params with no delays */ export declare const defaultSimulationParams: ProxyChannelSimulationParams; interface MakeProxyChannelArgs { queue: Queue.Queue; nodeName: MeshNodeName; newEdgeAvailablePubSub: PubSub.PubSub; sendPacket: (packet: typeof MeshSchema.ProxyChannelPacket.Type) => Effect.Effect; channelName: ChannelName; target: MeshNodeName; schema: { send: Schema.Schema; listen: Schema.Schema; }; /** Optional simulation parameters for testing timing-sensitive behavior */ simulation?: ProxyChannelSimulationParams; } export declare const makeProxyChannel: ({ queue, nodeName, newEdgeAvailablePubSub, sendPacket, target, channelName, schema, simulation, }: MakeProxyChannelArgs) => Effect.Effect, never, Scope.Scope>; export {}; //# sourceMappingURL=proxy-channel.d.ts.map