import { type JsonRpcId } from './json-rpc-protocol.ts'; import type { Cursor, EventSelector } from './workflow-event-feed.ts'; type JsonRpcErrorPayload = { readonly code: number; readonly message: string; readonly data?: Record; }; export type SubscribeParamsValidation = { readonly ok: true; readonly workflowId: string; readonly selector: EventSelector; readonly fromCursor: Cursor | undefined; } | { readonly ok: false; readonly error: JsonRpcErrorPayload; }; export type MessageFrameValidation = { readonly ok: false; readonly error: JsonRpcErrorPayload; readonly id: null; } | { readonly ok: true; readonly parsed: Record; readonly method: unknown; readonly id: JsonRpcId | undefined; readonly params: Record | undefined; readonly hasRequestId: boolean; readonly rawId: unknown; }; export declare function validateSubscribeParams(params: Record | undefined): SubscribeParamsValidation; export declare function validateMessageFrame(frame: string, maxFrameBytes: number): MessageFrameValidation; export declare function validateSessionPrimitiveFrame(frame: Extract): { readonly error: JsonRpcErrorPayload; readonly id: JsonRpcId | null; } | null; export {};