import { z } from "zod"; /** The `DebuggerIO` methods that expect an answer. */ export declare const REQUEST_METHODS: readonly ["render", "waitForCommand", "showRewindSelector", "answerGuardTrip", "showCheckpointsPanel", "promptForNodeArgs", "promptForInput"]; /** The `DebuggerIO` methods that return at once. */ export declare const NOTICE_METHODS: readonly ["log", "setMode", "setPending", "setBusy", "appendStdout", "renderActivityOnly", "startSpinner", "stopSpinner"]; export type RequestMethod = (typeof REQUEST_METHODS)[number]; export type NoticeMethod = (typeof NOTICE_METHODS)[number]; /** What a connection says it is, in its first message. A `terminal` is * a person's debugger, whose connection is its session; a `cli` is one * visit of `agency debug session`, whose session the run holds between * visits; a `probe` wants the session's state and nothing else. */ export declare const CLIENT_KINDS: readonly ["terminal", "cli", "probe"]; export type ClientKind = (typeof CLIENT_KINDS)[number]; /** The kinds that stay on the session, and so can answer a request. */ export declare const PARTY_KINDS: readonly ["terminal", "cli"]; export type PartyKind = (typeof PARTY_KINDS)[number]; export declare const HelloSchema: z.ZodObject<{ type: z.ZodLiteral<"hello">; program: z.ZodString; node: z.ZodString; pid: z.ZodNumber; }, z.core.$strict>; export declare const AttachMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"hello">; program: z.ZodString; node: z.ZodString; pid: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"finished">; value: z.ZodOptional; error: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"refused">; reason: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"client">; kind: z.ZodEnum<{ terminal: "terminal"; cli: "cli"; probe: "probe"; }>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"answered">; id: z.ZodNumber; by: z.ZodEnum<{ terminal: "terminal"; cli: "cli"; }>; command: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"parties">; terminal: z.ZodBoolean; cli: z.ZodBoolean; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"status">; terminal: z.ZodBoolean; cli: z.ZodNullable; }, z.core.$strict>>; stopped: z.ZodBoolean; finished: z.ZodBoolean; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"pause">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"detach">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"request">; id: z.ZodNumber; method: z.ZodEnum<{ render: "render"; waitForCommand: "waitForCommand"; showRewindSelector: "showRewindSelector"; answerGuardTrip: "answerGuardTrip"; showCheckpointsPanel: "showCheckpointsPanel"; promptForNodeArgs: "promptForNodeArgs"; promptForInput: "promptForInput"; }>; args: z.ZodArray; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reply">; id: z.ZodNumber; result: z.ZodOptional; error: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"notice">; method: z.ZodEnum<{ log: "log"; setMode: "setMode"; setPending: "setPending"; setBusy: "setBusy"; appendStdout: "appendStdout"; renderActivityOnly: "renderActivityOnly"; startSpinner: "startSpinner"; stopSpinner: "stopSpinner"; }>; args: z.ZodArray; }, z.core.$strict>], "type">; export type AttachMessage = z.infer; export type Hello = z.infer; export type RequestMessage = Extract; export type NoticeMessage = Extract; export type FinishedMessage = Extract; export type StatusMessage = Extract; export type AnsweredMessage = Extract; export type PartiesMessage = Extract; /** A parsed JSON value as one of our messages, or null when it is not * one. The sender is the other half of this package, so a bad message is * a bug; the run side drops it and the UI side reports it through its * `malformed` event. Neither throws across the channel. */ export declare function parseAttachMessage(message: unknown): AttachMessage | null; /** What each request's reply must carry. The run side checks a reply * against this before handing it to the driver, so a UI that answers * with the wrong shape ends the session instead of crashing the * program. */ export declare const REPLY_SCHEMAS: { render: z.ZodVoid; waitForCommand: z.ZodUnion; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"checkpoint">; label: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"set">; varName: z.ZodString; value: z.ZodUnknown; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"edit">; edits: z.ZodArray; thread: z.ZodOptional, z.ZodObject<{ label: z.ZodString; }, z.core.$strict>, z.ZodObject<{ active: z.ZodLiteral; }, z.core.$strict>]>>; role: z.ZodOptional>; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"removeTool">; loop: z.ZodOptional>; }, z.core.$strict>>; tool: z.ZodString; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"setGuard">; guard: z.ZodUnion, z.ZodObject<{ index: z.ZodNumber; }, z.core.$strict>]>; branchPath: z.ZodOptional>; limit: z.ZodOptional; disarmed: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"setLocal">; frame: z.ZodOptional>; depth: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ branchPath: z.ZodOptional>; scope: z.ZodString; }, z.core.$strict>]>>; name: z.ZodString; value: z.ZodUnknown; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"setBranchResult">; branch: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ key: z.ZodString; }, z.core.$strict>]>; value: z.ZodUnknown; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"setArg">; frame: z.ZodOptional>; depth: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ branchPath: z.ZodOptional>; scope: z.ZodString; }, z.core.$strict>]>>; name: z.ZodString; value: z.ZodUnknown; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"setGlobal">; module: z.ZodOptional; branchPath: z.ZodOptional>; name: z.ZodString; value: z.ZodUnknown; }, z.core.$strict>], "op">>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"dropEdits">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"approve">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"reject">; value: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"resolve">; value: z.ZodUnknown; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"modify">; overrides: z.ZodRecord; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"stepBack">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"showCheckpoints">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"save">; path: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"load">; path: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"quit">; }, z.core.$strip>]>; showRewindSelector: z.ZodNullable; answerGuardTrip: z.ZodUnion; value: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"reject">; value: z.ZodOptional; }, z.core.$strip>]>; showCheckpointsPanel: z.ZodVoid; promptForNodeArgs: z.ZodArray; promptForInput: z.ZodString; };