import { z } from "zod"; import { PROTOCOL_VERSION } from "./health.js"; export declare const POSTBOX_PROTOCOL_VERSION_HEADER = "X-Postbox-Protocol-Version"; export declare const POSTBOX_CLIENT_PROTOCOL_VERSION_HEADER = "X-Postbox-Client-Protocol-Version"; export declare const ProtocolMessageMetadataSchema: z.ZodObject<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, "strip", z.ZodTypeAny, { protocolVersion: "0.1.12"; }, { protocolVersion: "0.1.12"; }>; export declare const VersionedStateSnapshotSchema: z.ZodObject<{ sessions: z.ZodArray; machineId: z.ZodString; machineName: z.ZodString; hostname: z.ZodString; projectId: z.ZodString; projectName: z.ZodString; projectDetectedName: z.ZodOptional; projectDescription: z.ZodOptional; projectIcon: z.ZodOptional>; sizeBytes: z.ZodOptional; }, "strip", z.ZodTypeAny, { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; }, { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; }>>; cwd: z.ZodString; gitRoot: z.ZodOptional; repoName: z.ZodOptional; branch: z.ZodOptional; headSha: z.ZodOptional; isDirty: z.ZodOptional; worktreePath: z.ZodOptional; semanticState: z.ZodEnum<["working", "blocked", "waiting_for_postbox", "idle", "unknown"]>; presence: z.ZodEnum<["live", "stale", "offline"]>; lastHeartbeatAt: z.ZodOptional; connectedAt: z.ZodOptional; disconnectedAt: z.ZodOptional; updatedAt: z.ZodString; repository: z.ZodOptional; machineId: z.ZodOptional; commonDirectory: z.ZodOptional; }, "strict", z.ZodTypeAny, { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; }, { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; }>>; worktree: z.ZodOptional>; feature: z.ZodOptional; }, "strict", z.ZodTypeAny, { featureId: string; name?: string | undefined; }, { featureId: string; name?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { machineId: string; cwd: string; sessionId: string; updatedAt: string; presence: "stale" | "offline" | "live"; hostname: string; projectId: string; semanticState: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle"; machineName: string; projectName: string; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; title?: string | undefined; projectDetectedName?: string | undefined; projectDescription?: string | undefined; projectIcon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; lastHeartbeatAt?: string | undefined; connectedAt?: string | undefined; disconnectedAt?: string | undefined; }, { machineId: string; cwd: string; sessionId: string; updatedAt: string; presence: "stale" | "offline" | "live"; hostname: string; projectId: string; semanticState: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle"; machineName: string; projectName: string; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; title?: string | undefined; projectDetectedName?: string | undefined; projectDescription?: string | undefined; projectIcon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; lastHeartbeatAt?: string | undefined; connectedAt?: string | undefined; disconnectedAt?: string | undefined; }>, "many">; requests: z.ZodDefault; creator: z.ZodObject<{ harness: z.ZodEnum<["pi", "codex", "claude-code", "legacy"]>; ownerId: z.ZodString; }, "strict", z.ZodTypeAny, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }>; owner: z.ZodObject<{ harness: z.ZodEnum<["pi", "codex", "claude-code", "legacy"]>; ownerId: z.ZodString; }, "strict", z.ZodTypeAny, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }>; mode: z.ZodEnum<["single", "multi"]>; question: z.ZodObject<{ prompt: z.ZodString; ambiguity: z.ZodOptional; }, "strip", z.ZodTypeAny, { prompt: string; ambiguity?: string | undefined; }, { prompt: string; ambiguity?: string | undefined; }>; options: z.ZodArray; impact: z.ZodOptional; } & { provenance: z.ZodOptional>; }, "strict", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }, { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }>, "many">; images: z.ZodDefault; caption: z.ZodOptional; imageId: z.ZodString; mediaType: z.ZodEnum<["image/jpeg", "image/png", "image/webp"]>; byteSize: z.ZodNumber; width: z.ZodNumber; height: z.ZodNumber; }, "strict", z.ZodTypeAny, { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }, { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }>, { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }, { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }>, "many">>; forkReference: z.ZodOptional; agentSessionPath: z.ZodOptional; leafId: z.ZodOptional; cwd: z.ZodOptional; model: z.ZodOptional; }, "strip", z.ZodTypeAny, { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; }, { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; }>>; status: z.ZodEnum<["pending", "answered", "cancelled", "expired", "superseded"]>; createdAt: z.ZodString; expiresAt: z.ZodOptional; resolvedAt: z.ZodOptional; result: z.ZodOptional; requestId: z.ZodString; selectedValues: z.ZodArray; note: z.ZodOptional; affectedDescendantIds: z.ZodOptional>; descendantGuidance: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; }, { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"cancelled">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"expired">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"unavailable">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; }>]>>; answerId: z.ZodOptional; answerRead: z.ZodOptional; parentQuestionId: z.ZodOptional; repository: z.ZodOptional; machineId: z.ZodOptional; commonDirectory: z.ZodOptional; }, "strict", z.ZodTypeAny, { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; }, { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; }>>; worktree: z.ZodOptional>; feature: z.ZodOptional; }, "strict", z.ZodTypeAny, { featureId: string; name?: string | undefined; }, { featureId: string; name?: string | undefined; }>>; }, "strict", z.ZodTypeAny, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; images: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[]; revision: number; ownerRevision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; revision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; images?: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[] | undefined; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; ownerRevision?: number | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }>, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; images: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[]; revision: number; ownerRevision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; revision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; images?: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[] | undefined; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; ownerRevision?: number | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }>, "many">>; timestamp: z.ZodString; } & { protocolVersion: z.ZodLiteral<"0.1.12">; }, "strip", z.ZodTypeAny, { protocolVersion: "0.1.12"; timestamp: string; sessions: { machineId: string; cwd: string; sessionId: string; updatedAt: string; presence: "stale" | "offline" | "live"; hostname: string; projectId: string; semanticState: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle"; machineName: string; projectName: string; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; title?: string | undefined; projectDetectedName?: string | undefined; projectDescription?: string | undefined; projectIcon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; lastHeartbeatAt?: string | undefined; connectedAt?: string | undefined; disconnectedAt?: string | undefined; }[]; requests: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; images: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[]; revision: number; ownerRevision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }[]; }, { protocolVersion: "0.1.12"; timestamp: string; sessions: { machineId: string; cwd: string; sessionId: string; updatedAt: string; presence: "stale" | "offline" | "live"; hostname: string; projectId: string; semanticState: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle"; machineName: string; projectName: string; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; title?: string | undefined; projectDetectedName?: string | undefined; projectDescription?: string | undefined; projectIcon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; lastHeartbeatAt?: string | undefined; connectedAt?: string | undefined; disconnectedAt?: string | undefined; }[]; requests?: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; revision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; images?: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[] | undefined; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; ownerRevision?: number | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }[] | undefined; }>; export declare const VersionedAskMutationResponseSchema: z.ZodObject<{ protocolVersion: z.ZodLiteral<"0.1.12">; result: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{ status: z.ZodLiteral<"answered">; requestId: z.ZodString; selectedValues: z.ZodArray; note: z.ZodOptional; affectedDescendantIds: z.ZodOptional>; descendantGuidance: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; }, { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"cancelled">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"expired">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"unavailable">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; }>]>; request: z.ZodEffects; creator: z.ZodObject<{ harness: z.ZodEnum<["pi", "codex", "claude-code", "legacy"]>; ownerId: z.ZodString; }, "strict", z.ZodTypeAny, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }>; owner: z.ZodObject<{ harness: z.ZodEnum<["pi", "codex", "claude-code", "legacy"]>; ownerId: z.ZodString; }, "strict", z.ZodTypeAny, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }>; mode: z.ZodEnum<["single", "multi"]>; question: z.ZodObject<{ prompt: z.ZodString; ambiguity: z.ZodOptional; }, "strip", z.ZodTypeAny, { prompt: string; ambiguity?: string | undefined; }, { prompt: string; ambiguity?: string | undefined; }>; options: z.ZodArray; impact: z.ZodOptional; } & { provenance: z.ZodOptional>; }, "strict", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }, { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }>, "many">; images: z.ZodDefault; caption: z.ZodOptional; imageId: z.ZodString; mediaType: z.ZodEnum<["image/jpeg", "image/png", "image/webp"]>; byteSize: z.ZodNumber; width: z.ZodNumber; height: z.ZodNumber; }, "strict", z.ZodTypeAny, { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }, { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }>, { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }, { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }>, "many">>; forkReference: z.ZodOptional; agentSessionPath: z.ZodOptional; leafId: z.ZodOptional; cwd: z.ZodOptional; model: z.ZodOptional; }, "strip", z.ZodTypeAny, { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; }, { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; }>>; status: z.ZodEnum<["pending", "answered", "cancelled", "expired", "superseded"]>; createdAt: z.ZodString; expiresAt: z.ZodOptional; resolvedAt: z.ZodOptional; result: z.ZodOptional; requestId: z.ZodString; selectedValues: z.ZodArray; note: z.ZodOptional; affectedDescendantIds: z.ZodOptional>; descendantGuidance: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; }, { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"cancelled">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"expired">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; }>, z.ZodObject<{ status: z.ZodLiteral<"unavailable">; requestId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; }, "strip", z.ZodTypeAny, { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; }, { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; }>]>>; answerId: z.ZodOptional; answerRead: z.ZodOptional; parentQuestionId: z.ZodOptional; repository: z.ZodOptional; machineId: z.ZodOptional; commonDirectory: z.ZodOptional; }, "strict", z.ZodTypeAny, { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; }, { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; }>>; worktree: z.ZodOptional>; feature: z.ZodOptional; }, "strict", z.ZodTypeAny, { featureId: string; name?: string | undefined; }, { featureId: string; name?: string | undefined; }>>; }, "strict", z.ZodTypeAny, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; images: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[]; revision: number; ownerRevision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; revision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; images?: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[] | undefined; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; ownerRevision?: number | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }>, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; images: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[]; revision: number; ownerRevision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; revision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; images?: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[] | undefined; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; ownerRevision?: number | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }>; }, "strip", z.ZodTypeAny, { result: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; }; protocolVersion: "0.1.12"; request: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; images: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[]; revision: number; ownerRevision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }; }, { result: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; }; protocolVersion: "0.1.12"; request: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity?: string | undefined; }; revision: number; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; creator: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; createdAt: string; images?: { alt: string; imageId: string; mediaType: "image/jpeg" | "image/png" | "image/webp"; byteSize: number; width: number; height: number; caption?: string | undefined; }[] | undefined; forkReference?: { agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; model?: string | undefined; } | undefined; expiresAt?: string | undefined; parentQuestionId?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; feature?: { featureId: string; name?: string | undefined; } | undefined; ownerRevision?: number | undefined; answerId?: string | undefined; resolvedAt?: string | undefined; result?: { status: "answered"; requestId: string; selectedValues: string[]; resolvedAt: string; affectedDescendantIds?: string[] | undefined; note?: string | undefined; descendantGuidance?: string | undefined; } | { status: "cancelled"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "expired"; requestId: string; resolvedAt: string; note?: string | undefined; } | { status: "unavailable"; requestId: string; resolvedAt: string; note?: string | undefined; } | undefined; answerRead?: boolean | undefined; }; }>; export declare const VersionedRequestErrorResponseSchema: z.ZodObject<{ protocolVersion: z.ZodLiteral<"0.1.12">; error: z.ZodString; message: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; error: z.ZodString; message: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; error: z.ZodString; message: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>; export declare const VersionedQuestionChatActivationResponseSchema: z.ZodEffects; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">>; export declare const VersionedQuestionChatSnapshotHttpResponseSchema: z.ZodEffects; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">>; export declare const VersionedQuestionChatSendHttpResponseSchema: z.ZodEffects; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">>; export declare const VersionedQuestionChatStopHttpResponseSchema: z.ZodEffects; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ protocolVersion: z.ZodLiteral<"0.1.12">; }, z.ZodTypeAny, "passthrough">>; export declare const VersionedQuestionChatStreamEventSchema: z.ZodUnion<[z.ZodTypeAny, z.ZodTypeAny, ...z.ZodTypeAny[], z.ZodObject<{ requestId: z.ZodString; type: z.ZodLiteral<"transport">; state: z.ZodEnum<["online", "offline"]>; } & { protocolVersion: z.ZodLiteral<"0.1.12">; }, "strict", z.ZodTypeAny, { type: "transport"; requestId: string; protocolVersion: "0.1.12"; state: "online" | "offline"; }, { type: "transport"; requestId: string; protocolVersion: "0.1.12"; state: "online" | "offline"; }>]>; export declare const IncompatibleProtocolResponseSchema: z.ZodObject<{ protocolVersion: z.ZodLiteral<"0.1.12">; error: z.ZodLiteral<"incompatible_protocol">; supportedProtocolVersion: z.ZodLiteral<"0.1.12">; receivedProtocolVersion: z.ZodString; }, "strip", z.ZodTypeAny, { error: "incompatible_protocol"; protocolVersion: "0.1.12"; supportedProtocolVersion: "0.1.12"; receivedProtocolVersion: string; }, { error: "incompatible_protocol"; protocolVersion: "0.1.12"; supportedProtocolVersion: "0.1.12"; receivedProtocolVersion: string; }>; export type VersionedStateSnapshot = z.infer; export type IncompatibleProtocolResponse = z.infer; export declare function withProtocolVersion>(payload: T): T & { protocolVersion: typeof PROTOCOL_VERSION; }; //# sourceMappingURL=versioning.d.ts.map