//#region src/protocol.d.ts declare const PROTOCOL_VERSION: 1; type RequestStatus = 'completed' | 'failed' | 'cancelled'; type ControlType = 'request.steer' | 'request.inject' | 'request.cancel'; interface SubmitRequest { version: 1; id: string; type: 'request.submit'; timestamp: string; input: string; workspace?: string; session_id?: string; metadata?: Record; controller_id?: string; token?: string; } interface ControlRequest { version: 1; id: string; command_id: string; type: ControlType; timestamp: string; input?: string; reason?: string; controller_id?: string; token?: string; } interface GatewayEvent { version: 1; id: string; type: string; timestamp: string; sequence?: number; data?: unknown; } interface GatewayError { code: string; message: string; retryable: boolean; } interface GatewayResult { version: 1; id: string; type: 'request.result'; timestamp: string; status: RequestStatus; session_id?: string; summary?: string; error: GatewayError | null; } interface ProtocolLimits { maxMessageBytes: number; maxMetadataBytes: number; maxInputChars: number; } declare class ProtocolError extends Error { readonly code: string; readonly requestId?: string | undefined; readonly retryable: boolean; constructor(code: string, message: string, requestId?: string | undefined, retryable?: boolean); } declare function isRfc3339DateTime(value: string): boolean; declare function parseSubmit(payload: Uint8Array, limits: ProtocolLimits): SubmitRequest; declare function parseControl(payload: Uint8Array, topicRequestId: string, limits: ProtocolLimits): ControlRequest; declare function fingerprint(value: SubmitRequest | ControlRequest): string; declare function protocolEvent(id: string, type: string, data?: unknown, sequence?: number, now?: Date): GatewayEvent; declare function protocolResult(id: string, status: RequestStatus, options?: { sessionId?: string; summary?: string; error?: GatewayError | null; now?: Date; }): GatewayResult; declare function protocolErrorResult(error: ProtocolError, requestId?: string): GatewayResult; //#endregion export { protocolResult as _, GatewayResult as a, ProtocolLimits as c, fingerprint as d, isRfc3339DateTime as f, protocolEvent as g, protocolErrorResult as h, GatewayEvent as i, RequestStatus as l, parseSubmit as m, ControlType as n, PROTOCOL_VERSION as o, parseControl as p, GatewayError as r, ProtocolError as s, ControlRequest as t, SubmitRequest as u }; //# sourceMappingURL=protocol-CM1Hx439.d.ts.map