import { z } from "zod/v4"; export type FsDuplexParty = "initiator" | "handler"; /** * The Zod schema for a raw message on the wire. * It validates the core fields of the protocol frame. * The 'payload' is treated as `any` here and will be typed by consuming code. */ export declare const zFsDuplexMessage: z.ZodObject<{ from: z.ZodEnum<{ initiator: "initiator"; handler: "handler"; }>; seq: z.ZodNumber; ack: z.ZodNumber; type: z.ZodString; payload: z.ZodOptional; }, z.core.$strip>; export type FsDuplexMessage = z.infer; /** * Defines the payloads for all possible message types in the fs-duplex protocol. * The generic type represents the application-specific data being transported. */ export type FsDuplexPayloads = { init: { initial_payload?: T; }; ack: null; fin: { reason: "done" | "error" | "timeout"; }; fin_ack: null; ping: null; pong: null; data: T; }; /** * The union of all possible message types. */ export type FsDuplexMessageType = keyof FsDuplexPayloads; //# sourceMappingURL=protocol.d.ts.map