import z from "zod"; export declare const AuthMessageSchema: z.ZodObject<{ type: z.ZodLiteral<"auth">; secret: z.ZodString; pid: z.ZodOptional; }, z.z.core.$strip>; export declare const AuthAckMessageSchema: z.ZodObject<{ type: z.ZodLiteral<"auth-ack">; }, z.z.core.$strip>; export declare const RpcMethodSchema: z.ZodEnum<{ stop: "stop"; call: "call"; boot: "boot"; "target-context-open": "target-context-open"; "runtime-error": "runtime-error"; "context-open": "context-open"; "context-close": "context-close"; "event-subscribe": "event-subscribe"; "subscription-ready": "subscription-ready"; "event-unsubscribe": "event-unsubscribe"; "value-get": "value-get"; "value-watch": "value-watch"; "value-unwatch": "value-unwatch"; "subscription-publish": "subscription-publish"; }>; export declare const RequestMessageSchema: z.ZodObject<{ type: z.ZodLiteral<"request">; requestId: z.ZodString; method: z.ZodEnum<{ stop: "stop"; call: "call"; boot: "boot"; "target-context-open": "target-context-open"; "runtime-error": "runtime-error"; "context-open": "context-open"; "context-close": "context-close"; "event-subscribe": "event-subscribe"; "subscription-ready": "subscription-ready"; "event-unsubscribe": "event-unsubscribe"; "value-get": "value-get"; "value-watch": "value-watch"; "value-unwatch": "value-unwatch"; "subscription-publish": "subscription-publish"; }>; params: z.ZodRecord; }, z.z.core.$strip>; export declare const CallRequestParamsSchema: z.ZodObject<{ functionName: z.ZodString; params: z.ZodUnknown; target: z.ZodOptional; targetPackageName: z.ZodOptional; callerStateContextId: z.ZodOptional; stateContextId: z.ZodOptional; contextNamespace: z.ZodOptional; }, z.z.core.$strip>; export declare const BootRequestParamsSchema: z.ZodObject<{ target: z.ZodString; }, z.z.core.$strip>; export declare const TargetContextOpenRequestParamsSchema: z.ZodObject<{ target: z.ZodString; targetPackageName: z.ZodOptional; callerStateContextId: z.ZodOptional; stateContextId: z.ZodOptional; contextNamespace: z.ZodOptional; }, z.z.core.$strip>; export declare const RuntimeErrorRequestParamsSchema: z.ZodObject<{ phase: z.ZodEnum<{ function: "function"; "event-subscribe": "event-subscribe"; "value-get": "value-get"; "value-watch": "value-watch"; "subscription-publish": "subscription-publish"; "on-create": "on-create"; "on-destroy": "on-destroy"; "on-context-open": "on-context-open"; "on-context-close": "on-context-close"; "browser-surface": "browser-surface"; "event-cleanup": "event-cleanup"; "value-cleanup": "value-cleanup"; internal: "internal"; }>; stateContextId: z.ZodOptional; functionName: z.ZodOptional; resourceKind: z.ZodOptional>; resourceName: z.ZodOptional; surfaceId: z.ZodOptional; hostSessionId: z.ZodOptional; message: z.ZodString; stack: z.ZodOptional; }, z.z.core.$strip>; export declare const ContextOpenRequestParamsSchema: z.ZodObject<{ stateContextId: z.ZodString; }, z.z.core.$strip>; export declare const ContextCloseRequestParamsSchema: z.ZodObject<{ stateContextId: z.ZodString; }, z.z.core.$strip>; export declare const EventSubscribeRequestParamsSchema: z.ZodObject<{ eventName: z.ZodString; params: z.ZodOptional; subscriptionNamespace: z.ZodOptional; target: z.ZodOptional; targetPackageName: z.ZodOptional; callerStateContextId: z.ZodOptional; stateContextId: z.ZodOptional; contextNamespace: z.ZodOptional; }, z.z.core.$strip>; export declare const EventUnsubscribeRequestParamsSchema: z.ZodObject<{ subscriptionId: z.ZodString; }, z.z.core.$strip>; export declare const SubscriptionReadyRequestParamsSchema: z.ZodObject<{ subscriptionId: z.ZodString; }, z.z.core.$strip>; export declare const ValueGetRequestParamsSchema: z.ZodObject<{ valueName: z.ZodString; params: z.ZodOptional; target: z.ZodOptional; targetPackageName: z.ZodOptional; callerStateContextId: z.ZodOptional; stateContextId: z.ZodOptional; contextNamespace: z.ZodOptional; }, z.z.core.$strip>; export declare const ValueWatchRequestParamsSchema: z.ZodObject<{ valueName: z.ZodString; params: z.ZodOptional; subscriptionNamespace: z.ZodOptional; target: z.ZodOptional; targetPackageName: z.ZodOptional; callerStateContextId: z.ZodOptional; stateContextId: z.ZodOptional; contextNamespace: z.ZodOptional; }, z.z.core.$strip>; export declare const ValueUnwatchRequestParamsSchema: z.ZodObject<{ subscriptionId: z.ZodString; }, z.z.core.$strip>; export declare const SubscriptionPublishRequestParamsSchema: z.ZodObject<{ subscriptionId: z.ZodString; data: z.ZodUnknown; }, z.z.core.$strip>; export declare const SubscriptionResponseSchema: z.ZodObject<{ subscriptionId: z.ZodString; }, z.z.core.$strip>; export declare const SubscriptionDataMessageSchema: z.ZodObject<{ type: z.ZodLiteral<"subscription-data">; subscriptionId: z.ZodString; data: z.ZodUnknown; }, z.z.core.$strip>; export declare const ResponseOkMessageSchema: z.ZodObject<{ type: z.ZodLiteral<"response">; requestId: z.ZodString; ok: z.ZodLiteral; result: z.ZodOptional; }, z.z.core.$strip>; export declare const ResponseErrorMessageSchema: z.ZodObject<{ type: z.ZodLiteral<"response">; requestId: z.ZodString; ok: z.ZodLiteral; error: z.ZodString; }, z.z.core.$strip>; export declare const ResponseMessageSchema: z.ZodUnion; requestId: z.ZodString; ok: z.ZodLiteral; result: z.ZodOptional; }, z.z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"response">; requestId: z.ZodString; ok: z.ZodLiteral; error: z.ZodString; }, z.z.core.$strip>]>; export declare const ServerMessageSchema: z.ZodUnion; }, z.z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"request">; requestId: z.ZodString; method: z.ZodEnum<{ stop: "stop"; call: "call"; boot: "boot"; "target-context-open": "target-context-open"; "runtime-error": "runtime-error"; "context-open": "context-open"; "context-close": "context-close"; "event-subscribe": "event-subscribe"; "subscription-ready": "subscription-ready"; "event-unsubscribe": "event-unsubscribe"; "value-get": "value-get"; "value-watch": "value-watch"; "value-unwatch": "value-unwatch"; "subscription-publish": "subscription-publish"; }>; params: z.ZodRecord; }, z.z.core.$strip>, z.ZodUnion; requestId: z.ZodString; ok: z.ZodLiteral; result: z.ZodOptional; }, z.z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"response">; requestId: z.ZodString; ok: z.ZodLiteral; error: z.ZodString; }, z.z.core.$strip>]>, z.ZodObject<{ type: z.ZodLiteral<"subscription-data">; subscriptionId: z.ZodString; data: z.ZodUnknown; }, z.z.core.$strip>]>; export declare const ClientMessageSchema: z.ZodUnion; secret: z.ZodString; pid: z.ZodOptional; }, z.z.core.$strip>, z.ZodUnion; requestId: z.ZodString; ok: z.ZodLiteral; result: z.ZodOptional; }, z.z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"response">; requestId: z.ZodString; ok: z.ZodLiteral; error: z.ZodString; }, z.z.core.$strip>]>, z.ZodObject<{ type: z.ZodLiteral<"request">; requestId: z.ZodString; method: z.ZodEnum<{ stop: "stop"; call: "call"; boot: "boot"; "target-context-open": "target-context-open"; "runtime-error": "runtime-error"; "context-open": "context-open"; "context-close": "context-close"; "event-subscribe": "event-subscribe"; "subscription-ready": "subscription-ready"; "event-unsubscribe": "event-unsubscribe"; "value-get": "value-get"; "value-watch": "value-watch"; "value-unwatch": "value-unwatch"; "subscription-publish": "subscription-publish"; }>; params: z.ZodRecord; }, z.z.core.$strip>]>; export type AuthMessage = z.infer; export type AuthAckMessage = z.infer; export type RequestMessage = z.infer; export type CallRequestParams = z.infer; export type BootRequestParams = z.infer; export type TargetContextOpenRequestParams = z.infer; export type RuntimeErrorRequestParams = z.infer; export type ContextOpenRequestParams = z.infer; export type ContextCloseRequestParams = z.infer; export type EventSubscribeRequestParams = z.infer; export type EventUnsubscribeRequestParams = z.infer; export type SubscriptionReadyRequestParams = z.infer; export type ValueGetRequestParams = z.infer; export type ValueWatchRequestParams = z.infer; export type ValueUnwatchRequestParams = z.infer; export type SubscriptionPublishRequestParams = z.infer; export type SubscriptionResponse = z.infer; export type SubscriptionDataMessage = z.infer; export type ResponseMessage = z.infer; export type ClientMessage = z.infer; export type ServerMessage = z.infer; type SocketLike = { send: (data: string) => void; }; export declare const sendMessage: (socket: SocketLike, message: Message) => void; export declare const sendClientMessage: (socket: SocketLike, message: ClientMessage) => void; export declare const sendServerMessage: (socket: SocketLike, message: ServerMessage) => void; export declare const parseJson: (value: string) => { ok: true; value: any; } | { ok: false; value?: undefined; }; export {}; //# sourceMappingURL=rpc.d.ts.map