import { z } from "zod"; export declare const ExtensionClientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"session.register">; requestId: z.ZodOptional; payload: z.ZodObject<{ machine: z.ZodObject<{ machineId: z.ZodString; hostname: z.ZodString; displayName: z.ZodOptional; }, "strip", z.ZodTypeAny, { machineId: string; hostname: string; displayName?: string | undefined; }, { machineId: string; hostname: string; displayName?: string | undefined; }>; project: z.ZodObject<{ projectId: z.ZodString; name: z.ZodString; displayName: z.ZodOptional; description: z.ZodOptional; cwd: z.ZodString; gitRoot: z.ZodOptional; repoName: z.ZodOptional; branch: z.ZodOptional; headSha: z.ZodOptional; isDirty: z.ZodOptional; worktreePath: z.ZodOptional; icon: 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; }>>; 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>; }, "strip", z.ZodTypeAny, { name: string; cwd: string; projectId: string; description?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; displayName?: string | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; icon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; }, { name: string; cwd: string; projectId: string; description?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; displayName?: string | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; icon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; }>; session: z.ZodObject<{ sessionId: z.ZodString; title: z.ZodOptional; cwd: z.ZodString; branch: z.ZodOptional; worktreePath: z.ZodOptional; semanticState: z.ZodDefault>; agentSessionId: z.ZodOptional; agentSessionPath: z.ZodOptional; leafId: z.ZodOptional; owner: z.ZodOptional; ownerId: z.ZodString; }, "strict", z.ZodTypeAny, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }>>; lineage: z.ZodOptional; rootOwnerId: z.ZodOptional; harnessSessionId: z.ZodOptional; depth: z.ZodOptional; path: z.ZodOptional; taskLabel: z.ZodOptional; }, "strict", z.ZodTypeAny, { path?: string | undefined; parentOwnerId?: string | undefined; rootOwnerId?: string | undefined; harnessSessionId?: string | undefined; depth?: number | undefined; taskLabel?: string | undefined; }, { path?: string | undefined; parentOwnerId?: string | undefined; rootOwnerId?: string | undefined; harnessSessionId?: string | undefined; depth?: number | undefined; taskLabel?: string | undefined; }>>; 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; }>, z.ZodDiscriminatedUnion<"action", [z.ZodObject<{ action: z.ZodLiteral<"start">; name: z.ZodString; }, "strict", z.ZodTypeAny, { name: string; action: "start"; }, { name: string; action: "start"; }>, z.ZodObject<{ action: z.ZodLiteral<"select">; featureId: z.ZodString; }, "strict", z.ZodTypeAny, { featureId: string; action: "select"; }, { featureId: string; action: "select"; }>, z.ZodObject<{ action: z.ZodLiteral<"inherit">; featureId: z.ZodString; }, "strict", z.ZodTypeAny, { featureId: string; action: "inherit"; }, { featureId: string; action: "inherit"; }>]>]>>; }, "strip", z.ZodTypeAny, { cwd: string; sessionId: string; semanticState: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle"; agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: 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; } | { name: string; action: "start"; } | { featureId: string; action: "select"; } | { featureId: string; action: "inherit"; } | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; lineage?: { path?: string | undefined; parentOwnerId?: string | undefined; rootOwnerId?: string | undefined; harnessSessionId?: string | undefined; depth?: number | undefined; taskLabel?: string | undefined; } | undefined; }, { cwd: string; sessionId: string; agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: 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; } | { name: string; action: "start"; } | { featureId: string; action: "select"; } | { featureId: string; action: "inherit"; } | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; lineage?: { path?: string | undefined; parentOwnerId?: string | undefined; rootOwnerId?: string | undefined; harnessSessionId?: string | undefined; depth?: number | undefined; taskLabel?: string | undefined; } | undefined; }>; }, "strip", z.ZodTypeAny, { machine: { machineId: string; hostname: string; displayName?: string | undefined; }; project: { name: string; cwd: string; projectId: string; description?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; displayName?: string | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; icon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; }; session: { cwd: string; sessionId: string; semanticState: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle"; agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: 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; } | { name: string; action: "start"; } | { featureId: string; action: "select"; } | { featureId: string; action: "inherit"; } | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; lineage?: { path?: string | undefined; parentOwnerId?: string | undefined; rootOwnerId?: string | undefined; harnessSessionId?: string | undefined; depth?: number | undefined; taskLabel?: string | undefined; } | undefined; }; }, { machine: { machineId: string; hostname: string; displayName?: string | undefined; }; project: { name: string; cwd: string; projectId: string; description?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; displayName?: string | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; icon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; }; session: { cwd: string; sessionId: string; agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: 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; } | { name: string; action: "start"; } | { featureId: string; action: "select"; } | { featureId: string; action: "inherit"; } | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; lineage?: { path?: string | undefined; parentOwnerId?: string | undefined; rootOwnerId?: string | undefined; harnessSessionId?: string | undefined; depth?: number | undefined; taskLabel?: string | undefined; } | undefined; }; }>; }, "strip", z.ZodTypeAny, { type: "session.register"; payload: { machine: { machineId: string; hostname: string; displayName?: string | undefined; }; project: { name: string; cwd: string; projectId: string; description?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; displayName?: string | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; icon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; }; session: { cwd: string; sessionId: string; semanticState: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle"; agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: 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; } | { name: string; action: "start"; } | { featureId: string; action: "select"; } | { featureId: string; action: "inherit"; } | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; lineage?: { path?: string | undefined; parentOwnerId?: string | undefined; rootOwnerId?: string | undefined; harnessSessionId?: string | undefined; depth?: number | undefined; taskLabel?: string | undefined; } | undefined; }; }; requestId?: string | undefined; }, { type: "session.register"; payload: { machine: { machineId: string; hostname: string; displayName?: string | undefined; }; project: { name: string; cwd: string; projectId: string; description?: string | undefined; repository?: { repositoryId: string; remote?: string | undefined; machineId?: string | undefined; commonDirectory?: string | undefined; } | undefined; worktree?: { path: string; machineId: string; worktreeId: string; } | undefined; displayName?: string | undefined; gitRoot?: string | undefined; repoName?: string | undefined; branch?: string | undefined; headSha?: string | undefined; isDirty?: boolean | undefined; worktreePath?: string | undefined; icon?: { hash: string; dataUrl: string; mediaType?: "image/jpeg" | "image/png" | "image/webp" | "image/svg+xml" | "image/gif" | undefined; sizeBytes?: number | undefined; } | undefined; }; session: { cwd: string; sessionId: string; agentSessionId?: string | undefined; agentSessionPath?: string | undefined; leafId?: 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; } | { name: string; action: "start"; } | { featureId: string; action: "select"; } | { featureId: string; action: "inherit"; } | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; lineage?: { path?: string | undefined; parentOwnerId?: string | undefined; rootOwnerId?: string | undefined; harnessSessionId?: string | undefined; depth?: number | undefined; taskLabel?: string | undefined; } | undefined; }; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"heartbeat">; requestId: z.ZodOptional; payload: z.ZodObject<{ sessionId: z.ZodString; semanticState: z.ZodOptional>; timestamp: z.ZodOptional; }, "strip", z.ZodTypeAny, { sessionId: string; timestamp?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; }, { sessionId: string; timestamp?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; }>; }, "strip", z.ZodTypeAny, { type: "heartbeat"; payload: { sessionId: string; timestamp?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; }; requestId?: string | undefined; }, { type: "heartbeat"; payload: { sessionId: string; timestamp?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"feature.action">; requestId: z.ZodString; payload: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{ sessionId: z.ZodString; action: z.ZodLiteral<"start">; name: z.ZodString; }, "strict", z.ZodTypeAny, { name: string; action: "start"; sessionId: string; }, { name: string; action: "start"; sessionId: string; }>, z.ZodObject<{ sessionId: z.ZodString; action: z.ZodLiteral<"select">; featureId: z.ZodString; }, "strict", z.ZodTypeAny, { featureId: string; action: "select"; sessionId: string; }, { featureId: string; action: "select"; sessionId: string; }>, z.ZodObject<{ sessionId: z.ZodString; action: z.ZodLiteral<"inherit">; featureId: z.ZodString; }, "strict", z.ZodTypeAny, { featureId: string; action: "inherit"; sessionId: string; }, { featureId: string; action: "inherit"; sessionId: string; }>]>; }, "strip", z.ZodTypeAny, { type: "feature.action"; requestId: string; payload: { name: string; action: "start"; sessionId: string; } | { featureId: string; action: "select"; sessionId: string; } | { featureId: string; action: "inherit"; sessionId: string; }; }, { type: "feature.action"; requestId: string; payload: { name: string; action: "start"; sessionId: string; } | { featureId: string; action: "select"; sessionId: string; } | { featureId: string; action: "inherit"; sessionId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"session.update">; requestId: z.ZodOptional; payload: z.ZodObject<{ sessionId: z.ZodString; title: z.ZodOptional; cwd: z.ZodOptional; branch: z.ZodOptional; worktreePath: z.ZodOptional; semanticState: z.ZodOptional>; agentSessionPath: z.ZodOptional; leafId: z.ZodOptional; }, "strip", z.ZodTypeAny, { sessionId: string; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; }, { sessionId: string; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; }>; }, "strip", z.ZodTypeAny, { type: "session.update"; payload: { sessionId: string; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; }; requestId?: string | undefined; }, { type: "session.update"; payload: { sessionId: string; agentSessionPath?: string | undefined; leafId?: string | undefined; cwd?: string | undefined; branch?: string | undefined; worktreePath?: string | undefined; title?: string | undefined; semanticState?: "unknown" | "working" | "blocked" | "waiting_for_postbox" | "idle" | undefined; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"session.shutdown">; requestId: z.ZodOptional; payload: z.ZodObject<{ sessionId: z.ZodString; reason: z.ZodOptional>; }, "strip", z.ZodTypeAny, { sessionId: string; reason?: "quit" | "reload" | "new" | "resume" | "fork" | undefined; }, { sessionId: string; reason?: "quit" | "reload" | "new" | "resume" | "fork" | undefined; }>; }, "strip", z.ZodTypeAny, { type: "session.shutdown"; payload: { sessionId: string; reason?: "quit" | "reload" | "new" | "resume" | "fork" | undefined; }; requestId?: string | undefined; }, { type: "session.shutdown"; payload: { sessionId: string; reason?: "quit" | "reload" | "new" | "resume" | "fork" | undefined; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"ask.create">; requestId: z.ZodOptional; payload: z.ZodObject<{ requestId: z.ZodString; sessionId: z.ZodString; mode: z.ZodEnum<["single", "multi"]>; question: z.ZodObject<{ prompt: z.ZodString; ambiguity: z.ZodEffects; }, "strict", z.ZodTypeAny, { prompt: string; ambiguity: string; }, { prompt: string; ambiguity: string; }>; options: z.ZodArray; impact: z.ZodOptional; }, "strict", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; impact?: string | undefined; }, { value: string; label: string; description?: string | undefined; impact?: string | undefined; }>, "many">; images: z.ZodOptional; caption: z.ZodOptional; uploadId: z.ZodString; }, "strict", z.ZodTypeAny, { alt: string; uploadId: string; caption?: string | undefined; }, { alt: string; uploadId: string; 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; }>>; expiresAt: 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; }[]; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity: string; }; images?: { alt: string; uploadId: string; 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; }, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity: string; }; images?: { alt: string; uploadId: string; 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; }>; }, "strip", z.ZodTypeAny, { type: "ask.create"; payload: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity: string; }; images?: { alt: string; uploadId: string; 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; }; requestId?: string | undefined; }, { type: "ask.create"; payload: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; sessionId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity: string; }; images?: { alt: string; uploadId: string; 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; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"ask.batch.create">; requestId: z.ZodString; payload: z.ZodObject<{ sessionId: z.ZodString; questions: z.ZodArray>; question: z.ZodObject<{ prompt: z.ZodString; ambiguity: z.ZodEffects; }, "strict", z.ZodTypeAny, { prompt: string; ambiguity: string; }, { prompt: string; ambiguity: string; }>; options: z.ZodArray; impact: z.ZodOptional; }, "strict", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; impact?: string | undefined; }, { value: string; label: string; description?: string | undefined; impact?: string | undefined; }>, "many">; images: z.ZodOptional; caption: z.ZodOptional; uploadId: z.ZodString; }, "strict", z.ZodTypeAny, { alt: string; uploadId: string; caption?: string | undefined; }, { alt: string; uploadId: string; 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; }>>; expiresAt: z.ZodOptional; parentQuestionId: z.ZodOptional; parentLocalRef: z.ZodOptional; }, "strict", z.ZodTypeAny, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity: string; }; localRef: string; images?: { alt: string; uploadId: string; 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; parentLocalRef?: string | undefined; }, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; question: { prompt: string; ambiguity: string; }; localRef: string; mode?: "single" | "multi" | undefined; images?: { alt: string; uploadId: string; 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; parentLocalRef?: string | undefined; }>, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity: string; }; localRef: string; images?: { alt: string; uploadId: string; 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; parentLocalRef?: string | undefined; }, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; question: { prompt: string; ambiguity: string; }; localRef: string; mode?: "single" | "multi" | undefined; images?: { alt: string; uploadId: string; 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; parentLocalRef?: string | undefined; }>, "many">; }, "strict", z.ZodTypeAny, { sessionId: string; questions: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity: string; }; localRef: string; images?: { alt: string; uploadId: string; 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; parentLocalRef?: string | undefined; }[]; }, { sessionId: string; questions: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; question: { prompt: string; ambiguity: string; }; localRef: string; mode?: "single" | "multi" | undefined; images?: { alt: string; uploadId: string; 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; parentLocalRef?: string | undefined; }[]; }>; }, "strip", z.ZodTypeAny, { type: "ask.batch.create"; requestId: string; payload: { sessionId: string; questions: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; mode: "single" | "multi"; question: { prompt: string; ambiguity: string; }; localRef: string; images?: { alt: string; uploadId: string; 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; parentLocalRef?: string | undefined; }[]; }; }, { type: "ask.batch.create"; requestId: string; payload: { sessionId: string; questions: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[]; requestId: string; question: { prompt: string; ambiguity: string; }; localRef: string; mode?: "single" | "multi" | undefined; images?: { alt: string; uploadId: string; 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; parentLocalRef?: string | undefined; }[]; }; }>, z.ZodObject<{ type: z.ZodLiteral<"ask.answer">; requestId: z.ZodOptional; payload: z.ZodObject<{ requestId: z.ZodString; answer: z.ZodObject<{ expectedRevision: z.ZodOptional; selectedValues: z.ZodArray; note: z.ZodOptional; }, "strict", z.ZodTypeAny, { selectedValues: string[]; expectedRevision?: number | undefined; note?: string | undefined; }, { selectedValues: string[]; expectedRevision?: number | undefined; note?: string | undefined; }>; }, "strip", z.ZodTypeAny, { requestId: string; answer: { selectedValues: string[]; expectedRevision?: number | undefined; note?: string | undefined; }; }, { requestId: string; answer: { selectedValues: string[]; expectedRevision?: number | undefined; note?: string | undefined; }; }>; }, "strip", z.ZodTypeAny, { type: "ask.answer"; payload: { requestId: string; answer: { selectedValues: string[]; expectedRevision?: number | undefined; note?: string | undefined; }; }; requestId?: string | undefined; }, { type: "ask.answer"; payload: { requestId: string; answer: { selectedValues: string[]; expectedRevision?: number | undefined; note?: string | undefined; }; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"ask.cancel">; requestId: z.ZodOptional; payload: z.ZodObject<{ requestId: z.ZodString; cancel: z.ZodDefault; }, "strict", z.ZodTypeAny, { note?: string | undefined; }, { note?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { requestId: string; cancel: { note?: string | undefined; }; }, { requestId: string; cancel?: { note?: string | undefined; } | undefined; }>; }, "strip", z.ZodTypeAny, { type: "ask.cancel"; payload: { requestId: string; cancel: { note?: string | undefined; }; }; requestId?: string | undefined; }, { type: "ask.cancel"; payload: { requestId: string; cancel?: { note?: string | undefined; } | undefined; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"answer.get">; requestId: z.ZodString; payload: z.ZodObject<{ questionId: z.ZodString; }, "strict", z.ZodTypeAny, { questionId: string; }, { questionId: string; }>; }, "strip", z.ZodTypeAny, { type: "answer.get"; requestId: string; payload: { questionId: string; }; }, { type: "answer.get"; requestId: string; payload: { questionId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"answer.available.ack">; requestId: z.ZodString; payload: z.ZodObject<{ answerId: z.ZodString; }, "strict", z.ZodTypeAny, { answerId: string; }, { answerId: string; }>; }, "strip", z.ZodTypeAny, { type: "answer.available.ack"; requestId: string; payload: { answerId: string; }; }, { type: "answer.available.ack"; requestId: string; payload: { answerId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"question.list">; requestId: z.ZodString; payload: z.ZodObject<{ sessionId: z.ZodString; scope: z.ZodOptional>; owner: z.ZodOptional; ownerId: z.ZodString; }, "strict", z.ZodTypeAny, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }>>; repository: z.ZodOptional; worktree: z.ZodOptional; feature: z.ZodOptional; status: z.ZodOptional>; global: z.ZodOptional; cursor: z.ZodOptional; pageSize: z.ZodOptional; }, "strict", z.ZodTypeAny, { sessionId: string; status?: "pending" | "answered" | "cancelled" | "expired" | "superseded" | undefined; repository?: string | undefined; worktree?: string | undefined; feature?: string | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; global?: boolean | undefined; scope?: "repository" | "worktree" | "feature" | "owner" | "global" | undefined; cursor?: string | undefined; pageSize?: number | undefined; }, { sessionId: string; status?: "pending" | "answered" | "cancelled" | "expired" | "superseded" | undefined; repository?: string | undefined; worktree?: string | undefined; feature?: string | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; global?: boolean | undefined; scope?: "repository" | "worktree" | "feature" | "owner" | "global" | undefined; cursor?: string | undefined; pageSize?: number | undefined; }>; }, "strip", z.ZodTypeAny, { type: "question.list"; requestId: string; payload: { sessionId: string; status?: "pending" | "answered" | "cancelled" | "expired" | "superseded" | undefined; repository?: string | undefined; worktree?: string | undefined; feature?: string | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; global?: boolean | undefined; scope?: "repository" | "worktree" | "feature" | "owner" | "global" | undefined; cursor?: string | undefined; pageSize?: number | undefined; }; }, { type: "question.list"; requestId: string; payload: { sessionId: string; status?: "pending" | "answered" | "cancelled" | "expired" | "superseded" | undefined; repository?: string | undefined; worktree?: string | undefined; feature?: string | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; global?: boolean | undefined; scope?: "repository" | "worktree" | "feature" | "owner" | "global" | undefined; cursor?: string | undefined; pageSize?: number | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"questions.get">; requestId: z.ZodString; payload: z.ZodObject<{ questionIds: z.ZodArray; view: z.ZodOptional>; }, "strict", z.ZodTypeAny, { questionIds: string[]; view?: "control" | "full" | undefined; }, { questionIds: string[]; view?: "control" | "full" | undefined; }>; }, "strip", z.ZodTypeAny, { type: "questions.get"; requestId: string; payload: { questionIds: string[]; view?: "control" | "full" | undefined; }; }, { type: "questions.get"; requestId: string; payload: { questionIds: string[]; view?: "control" | "full" | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"question.status.list">; requestId: z.ZodString; payload: z.ZodObject<{ sessionId: z.ZodString; scope: z.ZodOptional>; owner: z.ZodOptional; ownerId: z.ZodString; }, "strict", z.ZodTypeAny, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }>>; repository: z.ZodOptional; worktree: z.ZodOptional; feature: z.ZodOptional; status: z.ZodOptional>; global: z.ZodOptional; readState: z.ZodOptional>; includeTerminal: z.ZodOptional; cursor: z.ZodOptional; pageSize: z.ZodOptional; }, "strict", z.ZodTypeAny, { sessionId: string; status?: "pending" | "answered" | "cancelled" | "expired" | "superseded" | undefined; repository?: string | undefined; worktree?: string | undefined; feature?: string | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; global?: boolean | undefined; scope?: "repository" | "worktree" | "feature" | "owner" | "global" | undefined; cursor?: string | undefined; pageSize?: number | undefined; readState?: "read" | "unread" | undefined; includeTerminal?: boolean | undefined; }, { sessionId: string; status?: "pending" | "answered" | "cancelled" | "expired" | "superseded" | undefined; repository?: string | undefined; worktree?: string | undefined; feature?: string | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; global?: boolean | undefined; scope?: "repository" | "worktree" | "feature" | "owner" | "global" | undefined; cursor?: string | undefined; pageSize?: number | undefined; readState?: "read" | "unread" | undefined; includeTerminal?: boolean | undefined; }>; }, "strip", z.ZodTypeAny, { type: "question.status.list"; requestId: string; payload: { sessionId: string; status?: "pending" | "answered" | "cancelled" | "expired" | "superseded" | undefined; repository?: string | undefined; worktree?: string | undefined; feature?: string | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; global?: boolean | undefined; scope?: "repository" | "worktree" | "feature" | "owner" | "global" | undefined; cursor?: string | undefined; pageSize?: number | undefined; readState?: "read" | "unread" | undefined; includeTerminal?: boolean | undefined; }; }, { type: "question.status.list"; requestId: string; payload: { sessionId: string; status?: "pending" | "answered" | "cancelled" | "expired" | "superseded" | undefined; repository?: string | undefined; worktree?: string | undefined; feature?: string | undefined; owner?: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; } | undefined; global?: boolean | undefined; scope?: "repository" | "worktree" | "feature" | "owner" | "global" | undefined; cursor?: string | undefined; pageSize?: number | undefined; readState?: "read" | "unread" | undefined; includeTerminal?: boolean | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"owner.status.get">; requestId: z.ZodString; payload: z.ZodObject<{ owners: z.ZodArray; ownerId: z.ZodString; }, "strict", z.ZodTypeAny, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }, { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }>, "many">; }, "strict", z.ZodTypeAny, { owners: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }[]; }, { owners: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }[]; }>; }, "strip", z.ZodTypeAny, { type: "owner.status.get"; requestId: string; payload: { owners: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }[]; }; }, { type: "owner.status.get"; requestId: string; payload: { owners: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }[]; }; }>, z.ZodObject<{ type: z.ZodLiteral<"owner.list">; requestId: z.ZodString; payload: z.ZodObject<{ sessionId: z.ZodString; scope: z.ZodOptional>; includeInactive: z.ZodOptional; cursor: z.ZodOptional; pageSize: z.ZodOptional; }, "strict", z.ZodTypeAny, { sessionId: string; scope?: "repository" | "worktree" | "feature" | undefined; cursor?: string | undefined; pageSize?: number | undefined; includeInactive?: boolean | undefined; }, { sessionId: string; scope?: "repository" | "worktree" | "feature" | undefined; cursor?: string | undefined; pageSize?: number | undefined; includeInactive?: boolean | undefined; }>; }, "strip", z.ZodTypeAny, { type: "owner.list"; requestId: string; payload: { sessionId: string; scope?: "repository" | "worktree" | "feature" | undefined; cursor?: string | undefined; pageSize?: number | undefined; includeInactive?: boolean | undefined; }; }, { type: "owner.list"; requestId: string; payload: { sessionId: string; scope?: "repository" | "worktree" | "feature" | undefined; cursor?: string | undefined; pageSize?: number | undefined; includeInactive?: boolean | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"question.update">; requestId: z.ZodString; payload: z.ZodObject<{ sessionId: z.ZodString; questionId: z.ZodString; update: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{ action: z.ZodLiteral<"revise">; expectedRevision: z.ZodNumber; expectedOwnerRevision: z.ZodNumber; question: z.ZodObject<{ prompt: z.ZodString; ambiguity: z.ZodEffects; }, "strict", z.ZodTypeAny, { prompt: string; ambiguity: string; }, { prompt: string; ambiguity: string; }>; images: z.ZodOptional; caption: z.ZodOptional; uploadId: z.ZodString; }, "strict", z.ZodTypeAny, { alt: string; uploadId: string; caption?: string | undefined; }, { alt: string; uploadId: string; caption?: string | undefined; }>, "many">>; options: z.ZodOptional; impact: z.ZodOptional; }, "strict", z.ZodTypeAny, { value: string; label: string; description?: string | undefined; impact?: string | undefined; }, { value: string; label: string; description?: string | undefined; impact?: string | undefined; }>, "many">>; }, "strict", z.ZodTypeAny, { action: "revise"; question: { prompt: string; ambiguity: string; }; expectedRevision: number; expectedOwnerRevision: number; options?: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[] | undefined; images?: { alt: string; uploadId: string; caption?: string | undefined; }[] | undefined; }, { action: "revise"; question: { prompt: string; ambiguity: string; }; expectedRevision: number; expectedOwnerRevision: number; options?: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[] | undefined; images?: { alt: string; uploadId: string; caption?: string | undefined; }[] | undefined; }>, z.ZodObject<{ action: z.ZodLiteral<"cancel">; expectedRevision: z.ZodNumber; expectedOwnerRevision: z.ZodNumber; note: z.ZodOptional; }, "strict", z.ZodTypeAny, { action: "cancel"; expectedRevision: number; expectedOwnerRevision: number; note?: string | undefined; }, { action: "cancel"; expectedRevision: number; expectedOwnerRevision: number; note?: string | undefined; }>, z.ZodObject<{ action: z.ZodLiteral<"supersede">; expectedRevision: z.ZodNumber; expectedOwnerRevision: z.ZodNumber; replacementQuestionId: z.ZodString; }, "strict", z.ZodTypeAny, { action: "supersede"; expectedRevision: number; expectedOwnerRevision: number; replacementQuestionId: string; }, { action: "supersede"; expectedRevision: number; expectedOwnerRevision: number; replacementQuestionId: string; }>, z.ZodObject<{ action: z.ZodLiteral<"reparent">; expectedRevision: z.ZodNumber; expectedOwnerRevision: z.ZodNumber; parentQuestionId: z.ZodNullable; }, "strict", z.ZodTypeAny, { action: "reparent"; parentQuestionId: string | null; expectedRevision: number; expectedOwnerRevision: number; }, { action: "reparent"; parentQuestionId: string | null; expectedRevision: number; expectedOwnerRevision: number; }>, z.ZodObject<{ action: z.ZodLiteral<"transfer">; expectedRevision: z.ZodNumber; expectedOwnerRevision: z.ZodNumber; expectedOwner: 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; }>; }, "strict", z.ZodTypeAny, { action: "transfer"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; }, { action: "transfer"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; }>, z.ZodObject<{ action: z.ZodLiteral<"takeover">; expectedRevision: z.ZodNumber; expectedOwnerRevision: z.ZodNumber; expectedOwner: 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; }>; }, "strict", z.ZodTypeAny, { action: "takeover"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; }, { action: "takeover"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; }>]>; }, "strict", z.ZodTypeAny, { sessionId: string; questionId: string; update: { action: "revise"; question: { prompt: string; ambiguity: string; }; expectedRevision: number; expectedOwnerRevision: number; options?: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[] | undefined; images?: { alt: string; uploadId: string; caption?: string | undefined; }[] | undefined; } | { action: "cancel"; expectedRevision: number; expectedOwnerRevision: number; note?: string | undefined; } | { action: "supersede"; expectedRevision: number; expectedOwnerRevision: number; replacementQuestionId: string; } | { action: "reparent"; parentQuestionId: string | null; expectedRevision: number; expectedOwnerRevision: number; } | { action: "transfer"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; } | { action: "takeover"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; }; }, { sessionId: string; questionId: string; update: { action: "revise"; question: { prompt: string; ambiguity: string; }; expectedRevision: number; expectedOwnerRevision: number; options?: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[] | undefined; images?: { alt: string; uploadId: string; caption?: string | undefined; }[] | undefined; } | { action: "cancel"; expectedRevision: number; expectedOwnerRevision: number; note?: string | undefined; } | { action: "supersede"; expectedRevision: number; expectedOwnerRevision: number; replacementQuestionId: string; } | { action: "reparent"; parentQuestionId: string | null; expectedRevision: number; expectedOwnerRevision: number; } | { action: "transfer"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; } | { action: "takeover"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; }; }>; }, "strip", z.ZodTypeAny, { type: "question.update"; requestId: string; payload: { sessionId: string; questionId: string; update: { action: "revise"; question: { prompt: string; ambiguity: string; }; expectedRevision: number; expectedOwnerRevision: number; options?: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[] | undefined; images?: { alt: string; uploadId: string; caption?: string | undefined; }[] | undefined; } | { action: "cancel"; expectedRevision: number; expectedOwnerRevision: number; note?: string | undefined; } | { action: "supersede"; expectedRevision: number; expectedOwnerRevision: number; replacementQuestionId: string; } | { action: "reparent"; parentQuestionId: string | null; expectedRevision: number; expectedOwnerRevision: number; } | { action: "transfer"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; } | { action: "takeover"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; }; }; }, { type: "question.update"; requestId: string; payload: { sessionId: string; questionId: string; update: { action: "revise"; question: { prompt: string; ambiguity: string; }; expectedRevision: number; expectedOwnerRevision: number; options?: { value: string; label: string; description?: string | undefined; impact?: string | undefined; }[] | undefined; images?: { alt: string; uploadId: string; caption?: string | undefined; }[] | undefined; } | { action: "cancel"; expectedRevision: number; expectedOwnerRevision: number; note?: string | undefined; } | { action: "supersede"; expectedRevision: number; expectedOwnerRevision: number; replacementQuestionId: string; } | { action: "reparent"; parentQuestionId: string | null; expectedRevision: number; expectedOwnerRevision: number; } | { action: "transfer"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; owner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; } | { action: "takeover"; expectedRevision: number; expectedOwnerRevision: number; expectedOwner: { harness: "pi" | "codex" | "claude-code" | "legacy"; ownerId: string; }; }; }; }>, z.ZodObject<{ type: z.ZodLiteral<"question.history.get">; requestId: z.ZodString; payload: z.ZodObject<{ questionId: z.ZodString; view: z.ZodOptional>; cursor: z.ZodOptional; pageSize: z.ZodOptional; }, "strict", z.ZodTypeAny, { questionId: string; cursor?: string | undefined; pageSize?: number | undefined; view?: "events" | "full" | undefined; }, { questionId: string; cursor?: string | undefined; pageSize?: number | undefined; view?: "events" | "full" | undefined; }>; }, "strip", z.ZodTypeAny, { type: "question.history.get"; requestId: string; payload: { questionId: string; cursor?: string | undefined; pageSize?: number | undefined; view?: "events" | "full" | undefined; }; }, { type: "question.history.get"; requestId: string; payload: { questionId: string; cursor?: string | undefined; pageSize?: number | undefined; view?: "events" | "full" | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"question.answer.recover">; requestId: z.ZodString; payload: z.ZodObject<{ sessionId: z.ZodString; questionId: z.ZodString; view: z.ZodOptional>; }, "strict", z.ZodTypeAny, { sessionId: string; questionId: string; view?: "full" | "compact" | undefined; }, { sessionId: string; questionId: string; view?: "full" | "compact" | undefined; }>; }, "strip", z.ZodTypeAny, { type: "question.answer.recover"; requestId: string; payload: { sessionId: string; questionId: string; view?: "full" | "compact" | undefined; }; }, { type: "question.answer.recover"; requestId: string; payload: { sessionId: string; questionId: string; view?: "full" | "compact" | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"postbox.wait">; requestId: z.ZodString; payload: z.ZodObject<{ sessionId: z.ZodString; }, "strict", z.ZodTypeAny, { sessionId: string; }, { sessionId: string; }>; }, "strip", z.ZodTypeAny, { type: "postbox.wait"; requestId: string; payload: { sessionId: string; }; }, { type: "postbox.wait"; requestId: string; payload: { sessionId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"postbox.wait.cancel">; requestId: z.ZodString; payload: z.ZodObject<{ sessionId: z.ZodString; waitRequestId: z.ZodString; }, "strict", z.ZodTypeAny, { sessionId: string; waitRequestId: string; }, { sessionId: string; waitRequestId: string; }>; }, "strip", z.ZodTypeAny, { type: "postbox.wait.cancel"; requestId: string; payload: { sessionId: string; waitRequestId: string; }; }, { type: "postbox.wait.cancel"; requestId: string; payload: { sessionId: string; waitRequestId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.ready">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; state: z.ZodEnum<["ready", "generating", "stopping", "stopped", "interrupted"]>; forkKind: z.ZodLiteral<"fresh">; model: z.ZodObject<{ id: z.ZodString; source: z.ZodEnum<["postbox-settings", "pi-default"]>; effort: z.ZodOptional>; fallbackReason: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }, { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }>; sequence: z.ZodDefault; messages: z.ZodArray; text: z.ZodString; status: z.ZodLiteral<"final">; }, "strip", z.ZodTypeAny, { status: "final"; id: string; role: "user"; text: string; }, { status: "final"; id: string; role: "user"; text: string; }>, z.ZodObject<{ id: z.ZodString; role: z.ZodLiteral<"assistant">; text: z.ZodString; status: z.ZodEnum<["streaming", "final", "stopped", "interrupted"]>; }, "strip", z.ZodTypeAny, { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }, { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }>]>, "many">; tools: z.ZodDefault, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"running">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"success">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"error">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"stale">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>]>, "many">>; }, "strip", z.ZodTypeAny, { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; sequence: number; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; tools: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[]; }, { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; sequence?: number | undefined; tools?: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[] | undefined; }>; }, "strip", z.ZodTypeAny, { type: "chat.ready"; requestId: string; payload: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; sequence: number; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; tools: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[]; }; }, { type: "chat.ready"; requestId: string; payload: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; sequence?: number | undefined; tools?: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[] | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.error">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; error: z.ZodObject<{ code: z.ZodEnum<["request_missing", "request_not_pending", "extension_offline", "source_path_missing", "source_leaf_missing", "wrong_owner", "command_timeout", "runtime_failure", "chat_not_started", "invalid_command", "duplicate_command", "runtime_busy", "forbidden_origin", "rate_limited"]>; message: z.ZodString; retryAfterMs: z.ZodOptional; }, "strip", z.ZodTypeAny, { code: "wrong_owner" | "request_missing" | "request_not_pending" | "extension_offline" | "source_path_missing" | "source_leaf_missing" | "command_timeout" | "runtime_failure" | "chat_not_started" | "invalid_command" | "duplicate_command" | "runtime_busy" | "forbidden_origin" | "rate_limited"; message: string; retryAfterMs?: number | undefined; }, { code: "wrong_owner" | "request_missing" | "request_not_pending" | "extension_offline" | "source_path_missing" | "source_leaf_missing" | "command_timeout" | "runtime_failure" | "chat_not_started" | "invalid_command" | "duplicate_command" | "runtime_busy" | "forbidden_origin" | "rate_limited"; message: string; retryAfterMs?: number | undefined; }>; }, "strip", z.ZodTypeAny, { error: { code: "wrong_owner" | "request_missing" | "request_not_pending" | "extension_offline" | "source_path_missing" | "source_leaf_missing" | "command_timeout" | "runtime_failure" | "chat_not_started" | "invalid_command" | "duplicate_command" | "runtime_busy" | "forbidden_origin" | "rate_limited"; message: string; retryAfterMs?: number | undefined; }; requestId: string; }, { error: { code: "wrong_owner" | "request_missing" | "request_not_pending" | "extension_offline" | "source_path_missing" | "source_leaf_missing" | "command_timeout" | "runtime_failure" | "chat_not_started" | "invalid_command" | "duplicate_command" | "runtime_busy" | "forbidden_origin" | "rate_limited"; message: string; retryAfterMs?: number | undefined; }; requestId: string; }>; }, "strip", z.ZodTypeAny, { type: "chat.error"; requestId: string; payload: { error: { code: "wrong_owner" | "request_missing" | "request_not_pending" | "extension_offline" | "source_path_missing" | "source_leaf_missing" | "command_timeout" | "runtime_failure" | "chat_not_started" | "invalid_command" | "duplicate_command" | "runtime_busy" | "forbidden_origin" | "rate_limited"; message: string; retryAfterMs?: number | undefined; }; requestId: string; }; }, { type: "chat.error"; requestId: string; payload: { error: { code: "wrong_owner" | "request_missing" | "request_not_pending" | "extension_offline" | "source_path_missing" | "source_leaf_missing" | "command_timeout" | "runtime_failure" | "chat_not_started" | "invalid_command" | "duplicate_command" | "runtime_busy" | "forbidden_origin" | "rate_limited"; message: string; retryAfterMs?: number | undefined; }; requestId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.snapshot">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; state: z.ZodEnum<["ready", "generating", "stopping", "stopped", "interrupted"]>; forkKind: z.ZodLiteral<"fresh">; model: z.ZodObject<{ id: z.ZodString; source: z.ZodEnum<["postbox-settings", "pi-default"]>; effort: z.ZodOptional>; fallbackReason: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }, { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }>; sequence: z.ZodDefault; messages: z.ZodArray; text: z.ZodString; status: z.ZodLiteral<"final">; }, "strip", z.ZodTypeAny, { status: "final"; id: string; role: "user"; text: string; }, { status: "final"; id: string; role: "user"; text: string; }>, z.ZodObject<{ id: z.ZodString; role: z.ZodLiteral<"assistant">; text: z.ZodString; status: z.ZodEnum<["streaming", "final", "stopped", "interrupted"]>; }, "strip", z.ZodTypeAny, { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }, { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }>]>, "many">; tools: z.ZodDefault, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"running">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"success">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"error">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"stale">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>]>, "many">>; }, "strip", z.ZodTypeAny, { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; sequence: number; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; tools: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[]; }, { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; sequence?: number | undefined; tools?: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[] | undefined; }>; }, "strip", z.ZodTypeAny, { type: "chat.snapshot"; requestId: string; payload: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; sequence: number; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; tools: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[]; }; }, { type: "chat.snapshot"; requestId: string; payload: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; sequence?: number | undefined; tools?: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[] | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.send.accepted">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; response: z.ZodObject<{ status: z.ZodLiteral<"accepted">; clientCommandId: z.ZodString; mode: z.ZodOptional>; }, "strip", z.ZodTypeAny, { status: "accepted"; clientCommandId: string; mode?: "turn" | "steer" | undefined; }, { status: "accepted"; clientCommandId: string; mode?: "turn" | "steer" | undefined; }>; }, "strip", z.ZodTypeAny, { requestId: string; response: { status: "accepted"; clientCommandId: string; mode?: "turn" | "steer" | undefined; }; }, { requestId: string; response: { status: "accepted"; clientCommandId: string; mode?: "turn" | "steer" | undefined; }; }>; }, "strip", z.ZodTypeAny, { type: "chat.send.accepted"; requestId: string; payload: { requestId: string; response: { status: "accepted"; clientCommandId: string; mode?: "turn" | "steer" | undefined; }; }; }, { type: "chat.send.accepted"; requestId: string; payload: { requestId: string; response: { status: "accepted"; clientCommandId: string; mode?: "turn" | "steer" | undefined; }; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.event">; payload: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ requestId: z.ZodString; sequence: z.ZodNumber; } & { type: z.ZodLiteral<"lifecycle">; state: z.ZodEnum<["ready", "generating", "stopping", "stopped", "interrupted"]>; }, "strip", z.ZodTypeAny, { type: "lifecycle"; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; sequence: number; }, { type: "lifecycle"; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; sequence: number; }>, z.ZodObject<{ requestId: z.ZodString; sequence: z.ZodNumber; } & { type: z.ZodLiteral<"message.started">; message: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{ id: z.ZodString; role: z.ZodLiteral<"user">; text: z.ZodString; status: z.ZodLiteral<"final">; }, "strip", z.ZodTypeAny, { status: "final"; id: string; role: "user"; text: string; }, { status: "final"; id: string; role: "user"; text: string; }>, z.ZodObject<{ id: z.ZodString; role: z.ZodLiteral<"assistant">; text: z.ZodString; status: z.ZodEnum<["streaming", "final", "stopped", "interrupted"]>; }, "strip", z.ZodTypeAny, { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }, { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }>]>; }, "strip", z.ZodTypeAny, { message: { status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }; type: "message.started"; requestId: string; sequence: number; }, { message: { status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }; type: "message.started"; requestId: string; sequence: number; }>, z.ZodObject<{ requestId: z.ZodString; sequence: z.ZodNumber; } & { type: z.ZodLiteral<"assistant.text.delta">; messageId: z.ZodString; text: z.ZodString; }, "strip", z.ZodTypeAny, { type: "assistant.text.delta"; requestId: string; text: string; sequence: number; messageId: string; }, { type: "assistant.text.delta"; requestId: string; text: string; sequence: number; messageId: string; }>, z.ZodObject<{ requestId: z.ZodString; sequence: z.ZodNumber; } & { type: z.ZodLiteral<"message.finished">; messageId: z.ZodString; text: z.ZodString; status: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "message.finished"; status: "stopped" | "interrupted" | "final"; requestId: string; text: string; sequence: number; messageId: string; }, { type: "message.finished"; requestId: string; text: string; sequence: number; messageId: string; status?: "stopped" | "interrupted" | "final" | undefined; }>, z.ZodObject<{ requestId: z.ZodString; sequence: z.ZodNumber; } & { type: z.ZodLiteral<"tool.started">; activity: z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"running">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>; }, "strip", z.ZodTypeAny, { type: "tool.started"; requestId: string; sequence: number; activity: { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }; }, { type: "tool.started"; requestId: string; sequence: number; activity: { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }; }>, z.ZodObject<{ requestId: z.ZodString; sequence: z.ZodNumber; } & { type: z.ZodLiteral<"tool.finished">; activity: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"success">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"error">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"stale">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>]>; }, "strip", z.ZodTypeAny, { type: "tool.finished"; requestId: string; sequence: number; activity: { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }; }, { type: "tool.finished"; requestId: string; sequence: number; activity: { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }; }>]>; }, "strip", z.ZodTypeAny, { type: "chat.event"; payload: { type: "lifecycle"; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; sequence: number; } | { message: { status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }; type: "message.started"; requestId: string; sequence: number; } | { type: "assistant.text.delta"; requestId: string; text: string; sequence: number; messageId: string; } | { type: "message.finished"; status: "stopped" | "interrupted" | "final"; requestId: string; text: string; sequence: number; messageId: string; } | { type: "tool.started"; requestId: string; sequence: number; activity: { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }; } | { type: "tool.finished"; requestId: string; sequence: number; activity: { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }; }; }, { type: "chat.event"; payload: { type: "lifecycle"; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; sequence: number; } | { message: { status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }; type: "message.started"; requestId: string; sequence: number; } | { type: "assistant.text.delta"; requestId: string; text: string; sequence: number; messageId: string; } | { type: "message.finished"; requestId: string; text: string; sequence: number; messageId: string; status?: "stopped" | "interrupted" | "final" | undefined; } | { type: "tool.started"; requestId: string; sequence: number; activity: { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }; } | { type: "tool.finished"; requestId: string; sequence: number; activity: { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.propose-answer">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; proposal: z.ZodObject<{ label: z.ZodString; description: z.ZodOptional; impact: z.ZodOptional; }, "strict", z.ZodTypeAny, { label: string; description?: string | undefined; impact?: string | undefined; }, { label: string; description?: string | undefined; impact?: string | undefined; }>; }, "strict", z.ZodTypeAny, { requestId: string; proposal: { label: string; description?: string | undefined; impact?: string | undefined; }; }, { requestId: string; proposal: { label: string; description?: string | undefined; impact?: string | undefined; }; }>; }, "strip", z.ZodTypeAny, { type: "chat.propose-answer"; requestId: string; payload: { requestId: string; proposal: { label: string; description?: string | undefined; impact?: string | undefined; }; }; }, { type: "chat.propose-answer"; requestId: string; payload: { requestId: string; proposal: { label: string; description?: string | undefined; impact?: string | undefined; }; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.stop.accepted">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; response: z.ZodObject<{ status: z.ZodLiteral<"accepted">; clientCommandId: z.ZodString; }, "strip", z.ZodTypeAny, { status: "accepted"; clientCommandId: string; }, { status: "accepted"; clientCommandId: string; }>; }, "strip", z.ZodTypeAny, { requestId: string; response: { status: "accepted"; clientCommandId: string; }; }, { requestId: string; response: { status: "accepted"; clientCommandId: string; }; }>; }, "strip", z.ZodTypeAny, { type: "chat.stop.accepted"; requestId: string; payload: { requestId: string; response: { status: "accepted"; clientCommandId: string; }; }; }, { type: "chat.stop.accepted"; requestId: string; payload: { requestId: string; response: { status: "accepted"; clientCommandId: string; }; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.recover.offer">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; ownerSessionId: z.ZodString; forkKind: z.ZodLiteral<"fresh">; }, "strip", z.ZodTypeAny, { requestId: string; forkKind: "fresh"; ownerSessionId: string; }, { requestId: string; forkKind: "fresh"; ownerSessionId: string; }>; }, "strip", z.ZodTypeAny, { type: "chat.recover.offer"; requestId: string; payload: { requestId: string; forkKind: "fresh"; ownerSessionId: string; }; }, { type: "chat.recover.offer"; requestId: string; payload: { requestId: string; forkKind: "fresh"; ownerSessionId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.recover.complete">; requestId: z.ZodString; payload: z.ZodObject<{ ownerSessionId: z.ZodString; }, "strip", z.ZodTypeAny, { ownerSessionId: string; }, { ownerSessionId: string; }>; }, "strip", z.ZodTypeAny, { type: "chat.recover.complete"; requestId: string; payload: { ownerSessionId: string; }; }, { type: "chat.recover.complete"; requestId: string; payload: { ownerSessionId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.reconciled">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; forkKind: z.ZodLiteral<"fresh">; result: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{ status: z.ZodLiteral<"recovered">; snapshot: z.ZodObject<{ requestId: z.ZodString; state: z.ZodEnum<["ready", "generating", "stopping", "stopped", "interrupted"]>; forkKind: z.ZodLiteral<"fresh">; model: z.ZodObject<{ id: z.ZodString; source: z.ZodEnum<["postbox-settings", "pi-default"]>; effort: z.ZodOptional>; fallbackReason: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }, { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }>; sequence: z.ZodDefault; messages: z.ZodArray; text: z.ZodString; status: z.ZodLiteral<"final">; }, "strip", z.ZodTypeAny, { status: "final"; id: string; role: "user"; text: string; }, { status: "final"; id: string; role: "user"; text: string; }>, z.ZodObject<{ id: z.ZodString; role: z.ZodLiteral<"assistant">; text: z.ZodString; status: z.ZodEnum<["streaming", "final", "stopped", "interrupted"]>; }, "strip", z.ZodTypeAny, { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }, { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; }>]>, "many">; tools: z.ZodDefault, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"running">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"success">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"error">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; tool: z.ZodUnion<[z.ZodEnum<["repository_read", "repository_grep", "repository_find", "repository_list"]>, z.ZodLiteral<"propose_answer">]>; target: z.ZodString; details: z.ZodOptional; action: z.ZodOptional; optionValue: z.ZodString; }, "strict", z.ZodTypeAny, { type: "show-question"; optionValue: string; }, { type: "show-question"; optionValue: string; }>>; } & { state: z.ZodLiteral<"stale">; }, "strict", z.ZodTypeAny, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }, { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; }>]>, "many">>; }, "strip", z.ZodTypeAny, { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; sequence: number; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; tools: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[]; }, { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; sequence?: number | undefined; tools?: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[] | undefined; }>; }, "strip", z.ZodTypeAny, { status: "recovered"; snapshot: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; sequence: number; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; tools: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[]; }; }, { status: "recovered"; snapshot: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; sequence?: number | undefined; tools?: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[] | undefined; }; }>, z.ZodObject<{ status: z.ZodLiteral<"deleted">; }, "strip", z.ZodTypeAny, { status: "deleted"; }, { status: "deleted"; }>, z.ZodObject<{ status: z.ZodLiteral<"failed">; message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; status: "failed"; }, { message: string; status: "failed"; }>]>; }, "strip", z.ZodTypeAny, { requestId: string; result: { status: "recovered"; snapshot: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; sequence: number; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; tools: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[]; }; } | { status: "deleted"; } | { message: string; status: "failed"; }; forkKind: "fresh"; }, { requestId: string; result: { status: "recovered"; snapshot: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; sequence?: number | undefined; tools?: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[] | undefined; }; } | { status: "deleted"; } | { message: string; status: "failed"; }; forkKind: "fresh"; }>; }, "strip", z.ZodTypeAny, { type: "chat.reconciled"; requestId: string; payload: { requestId: string; result: { status: "recovered"; snapshot: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; sequence: number; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; tools: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[]; }; } | { status: "deleted"; } | { message: string; status: "failed"; }; forkKind: "fresh"; }; }, { type: "chat.reconciled"; requestId: string; payload: { requestId: string; result: { status: "recovered"; snapshot: { model: { id: string; source: "postbox-settings" | "pi-default"; effort?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined; fallbackReason?: string | undefined; }; requestId: string; state: "ready" | "generating" | "stopping" | "stopped" | "interrupted"; forkKind: "fresh"; messages: ({ status: "final"; id: string; role: "user"; text: string; } | { status: "stopped" | "interrupted" | "streaming" | "final"; id: string; role: "assistant"; text: string; })[]; sequence?: number | undefined; tools?: ({ id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "running"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "success"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "error"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; } | { id: string; tool: "repository_read" | "repository_grep" | "repository_find" | "repository_list" | "propose_answer"; target: string; state: "stale"; action?: { type: "show-question"; optionValue: string; } | undefined; details?: string | undefined; })[] | undefined; }; } | { status: "deleted"; } | { message: string; status: "failed"; }; forkKind: "fresh"; }; }>]>; export declare const ExtensionServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"registered">; requestId: z.ZodOptional; payload: z.ZodObject<{ sessionId: z.ZodString; presence: z.ZodLiteral<"live">; imageUploadToken: z.ZodOptional; feature: z.ZodOptional; }, "strict", z.ZodTypeAny, { featureId: string; name?: string | undefined; }, { featureId: string; name?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { sessionId: string; presence: "live"; feature?: { featureId: string; name?: string | undefined; } | undefined; imageUploadToken?: string | undefined; }, { sessionId: string; presence: "live"; feature?: { featureId: string; name?: string | undefined; } | undefined; imageUploadToken?: string | undefined; }>; }, "strip", z.ZodTypeAny, { type: "registered"; payload: { sessionId: string; presence: "live"; feature?: { featureId: string; name?: string | undefined; } | undefined; imageUploadToken?: string | undefined; }; requestId?: string | undefined; }, { type: "registered"; payload: { sessionId: string; presence: "live"; feature?: { featureId: string; name?: string | undefined; } | undefined; imageUploadToken?: string | undefined; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"ack">; requestId: z.ZodOptional; payload: z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>; }, "strip", z.ZodTypeAny, { type: "ack"; payload: { type: string; }; requestId?: string | undefined; }, { type: "ack"; payload: { type: string; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"ask.created">; requestId: z.ZodOptional; payload: z.ZodObject<{ requestId: z.ZodString; questionId: z.ZodString; revision: z.ZodNumber; ownerRevision: z.ZodNumber; status: z.ZodEnum<["pending", "answered", "cancelled", "expired", "superseded"]>; disposition: z.ZodEnum<["created", "idempotent"]>; }, "strip", z.ZodTypeAny, { status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; questionId: string; revision: number; ownerRevision: number; disposition: "created" | "idempotent"; }, { status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; questionId: string; revision: number; ownerRevision: number; disposition: "created" | "idempotent"; }>; }, "strip", z.ZodTypeAny, { type: "ask.created"; payload: { status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; questionId: string; revision: number; ownerRevision: number; disposition: "created" | "idempotent"; }; requestId?: string | undefined; }, { type: "ask.created"; payload: { status: "pending" | "answered" | "cancelled" | "expired" | "superseded"; requestId: string; questionId: string; revision: number; ownerRevision: number; disposition: "created" | "idempotent"; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"ask.batch.result">; requestId: z.ZodString; payload: z.ZodObject<{ status: z.ZodEnum<["created", "partial", "rejected"]>; items: z.ZodArray; questionId: z.ZodString; revision: z.ZodNumber; ownerRevision: z.ZodNumber; questionStatus: z.ZodEnum<["pending", "answered", "cancelled", "expired", "superseded"]>; disposition: z.ZodEnum<["created", "idempotent"]>; nudge: z.ZodOptional; }, "strict", z.ZodTypeAny, { status: "created"; localRef: string; questionId: string; revision: number; ownerRevision: number; questionStatus: "pending" | "answered" | "cancelled" | "expired" | "superseded"; disposition: "created" | "idempotent"; nudge?: string | undefined; }, { status: "created"; localRef: string; questionId: string; revision: number; ownerRevision: number; questionStatus: "pending" | "answered" | "cancelled" | "expired" | "superseded"; disposition: "created" | "idempotent"; nudge?: string | undefined; }>, z.ZodObject<{ localRef: z.ZodString; status: z.ZodLiteral<"rejected">; reason: z.ZodObject<{ code: z.ZodEnum<["forward_parent_reference", "parent_not_found", "child_limit_reached", "depth_limit_reached", "batch_aborted", "invalid_draft", "image_count_limit", "image_description", "image_format", "image_animated", "image_invalid", "image_dimension_limit", "image_byte_limit", "image_total_limit", "image_busy", "image_not_regular", "image_unreadable", "image_file_changed", "image_upload_failed", "image_target_unavailable", "image_target_changed", "image_claim_expired", "image_storage_unavailable", "image_unavailable"]>; message: z.ZodString; }, "strict", z.ZodTypeAny, { code: "image_count_limit" | "image_description" | "image_format" | "image_animated" | "image_invalid" | "image_dimension_limit" | "image_byte_limit" | "image_total_limit" | "image_busy" | "image_not_regular" | "image_unreadable" | "image_file_changed" | "image_upload_failed" | "image_target_unavailable" | "image_target_changed" | "image_claim_expired" | "image_storage_unavailable" | "image_unavailable" | "forward_parent_reference" | "parent_not_found" | "child_limit_reached" | "depth_limit_reached" | "batch_aborted" | "invalid_draft"; message: string; }, { code: "image_count_limit" | "image_description" | "image_format" | "image_animated" | "image_invalid" | "image_dimension_limit" | "image_byte_limit" | "image_total_limit" | "image_busy" | "image_not_regular" | "image_unreadable" | "image_file_changed" | "image_upload_failed" | "image_target_unavailable" | "image_target_changed" | "image_claim_expired" | "image_storage_unavailable" | "image_unavailable" | "forward_parent_reference" | "parent_not_found" | "child_limit_reached" | "depth_limit_reached" | "batch_aborted" | "invalid_draft"; message: string; }>; }, "strict", z.ZodTypeAny, { status: "rejected"; localRef: string; reason: { code: "image_count_limit" | "image_description" | "image_format" | "image_animated" | "image_invalid" | "image_dimension_limit" | "image_byte_limit" | "image_total_limit" | "image_busy" | "image_not_regular" | "image_unreadable" | "image_file_changed" | "image_upload_failed" | "image_target_unavailable" | "image_target_changed" | "image_claim_expired" | "image_storage_unavailable" | "image_unavailable" | "forward_parent_reference" | "parent_not_found" | "child_limit_reached" | "depth_limit_reached" | "batch_aborted" | "invalid_draft"; message: string; }; }, { status: "rejected"; localRef: string; reason: { code: "image_count_limit" | "image_description" | "image_format" | "image_animated" | "image_invalid" | "image_dimension_limit" | "image_byte_limit" | "image_total_limit" | "image_busy" | "image_not_regular" | "image_unreadable" | "image_file_changed" | "image_upload_failed" | "image_target_unavailable" | "image_target_changed" | "image_claim_expired" | "image_storage_unavailable" | "image_unavailable" | "forward_parent_reference" | "parent_not_found" | "child_limit_reached" | "depth_limit_reached" | "batch_aborted" | "invalid_draft"; message: string; }; }>]>, "many">; }, "strict", z.ZodTypeAny, { status: "created" | "rejected" | "partial"; items: ({ status: "created"; localRef: string; questionId: string; revision: number; ownerRevision: number; questionStatus: "pending" | "answered" | "cancelled" | "expired" | "superseded"; disposition: "created" | "idempotent"; nudge?: string | undefined; } | { status: "rejected"; localRef: string; reason: { code: "image_count_limit" | "image_description" | "image_format" | "image_animated" | "image_invalid" | "image_dimension_limit" | "image_byte_limit" | "image_total_limit" | "image_busy" | "image_not_regular" | "image_unreadable" | "image_file_changed" | "image_upload_failed" | "image_target_unavailable" | "image_target_changed" | "image_claim_expired" | "image_storage_unavailable" | "image_unavailable" | "forward_parent_reference" | "parent_not_found" | "child_limit_reached" | "depth_limit_reached" | "batch_aborted" | "invalid_draft"; message: string; }; })[]; }, { status: "created" | "rejected" | "partial"; items: ({ status: "created"; localRef: string; questionId: string; revision: number; ownerRevision: number; questionStatus: "pending" | "answered" | "cancelled" | "expired" | "superseded"; disposition: "created" | "idempotent"; nudge?: string | undefined; } | { status: "rejected"; localRef: string; reason: { code: "image_count_limit" | "image_description" | "image_format" | "image_animated" | "image_invalid" | "image_dimension_limit" | "image_byte_limit" | "image_total_limit" | "image_busy" | "image_not_regular" | "image_unreadable" | "image_file_changed" | "image_upload_failed" | "image_target_unavailable" | "image_target_changed" | "image_claim_expired" | "image_storage_unavailable" | "image_unavailable" | "forward_parent_reference" | "parent_not_found" | "child_limit_reached" | "depth_limit_reached" | "batch_aborted" | "invalid_draft"; message: string; }; })[]; }>; }, "strip", z.ZodTypeAny, { type: "ask.batch.result"; requestId: string; payload: { status: "created" | "rejected" | "partial"; items: ({ status: "created"; localRef: string; questionId: string; revision: number; ownerRevision: number; questionStatus: "pending" | "answered" | "cancelled" | "expired" | "superseded"; disposition: "created" | "idempotent"; nudge?: string | undefined; } | { status: "rejected"; localRef: string; reason: { code: "image_count_limit" | "image_description" | "image_format" | "image_animated" | "image_invalid" | "image_dimension_limit" | "image_byte_limit" | "image_total_limit" | "image_busy" | "image_not_regular" | "image_unreadable" | "image_file_changed" | "image_upload_failed" | "image_target_unavailable" | "image_target_changed" | "image_claim_expired" | "image_storage_unavailable" | "image_unavailable" | "forward_parent_reference" | "parent_not_found" | "child_limit_reached" | "depth_limit_reached" | "batch_aborted" | "invalid_draft"; message: string; }; })[]; }; }, { type: "ask.batch.result"; requestId: string; payload: { status: "created" | "rejected" | "partial"; items: ({ status: "created"; localRef: string; questionId: string; revision: number; ownerRevision: number; questionStatus: "pending" | "answered" | "cancelled" | "expired" | "superseded"; disposition: "created" | "idempotent"; nudge?: string | undefined; } | { status: "rejected"; localRef: string; reason: { code: "image_count_limit" | "image_description" | "image_format" | "image_animated" | "image_invalid" | "image_dimension_limit" | "image_byte_limit" | "image_total_limit" | "image_busy" | "image_not_regular" | "image_unreadable" | "image_file_changed" | "image_upload_failed" | "image_target_unavailable" | "image_target_changed" | "image_claim_expired" | "image_storage_unavailable" | "image_unavailable" | "forward_parent_reference" | "parent_not_found" | "child_limit_reached" | "depth_limit_reached" | "batch_aborted" | "invalid_draft"; message: string; }; })[]; }; }>, z.ZodObject<{ type: z.ZodLiteral<"answer.available">; requestId: z.ZodOptional; payload: z.ZodObject<{ questionId: z.ZodString; question: z.ZodString; answerId: z.ZodString; }, "strict", z.ZodTypeAny, { question: string; questionId: string; answerId: string; }, { question: string; questionId: string; answerId: string; }>; }, "strip", z.ZodTypeAny, { type: "answer.available"; payload: { question: string; questionId: string; answerId: string; }; requestId?: string | undefined; }, { type: "answer.available"; payload: { question: string; questionId: string; answerId: string; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"answer.result">; requestId: z.ZodString; payload: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"pending">; status: z.ZodLiteral<"pending">; questionId: z.ZodString; }, "strict", z.ZodTypeAny, { type: "pending"; status: "pending"; questionId: string; }, { type: "pending"; status: "pending"; questionId: string; }>, z.ZodObject<{ questionId: z.ZodString; answerId: z.ZodString; answer: z.ZodArray; note: z.ZodOptional; }, "strict", z.ZodTypeAny, { questionId: string; answer: string[]; answerId: string; note?: string | undefined; }, { questionId: string; answer: string[]; answerId: string; note?: string | undefined; }>, z.ZodDiscriminatedUnion<"status", [z.ZodObject<{ type: z.ZodLiteral<"lifecycle">; questionId: z.ZodString; resolvedAt: z.ZodString; } & { status: z.ZodLiteral<"cancelled">; note: z.ZodOptional; }, "strict", z.ZodTypeAny, { type: "lifecycle"; status: "cancelled"; questionId: string; resolvedAt: string; note?: string | undefined; }, { type: "lifecycle"; status: "cancelled"; questionId: string; resolvedAt: string; note?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"lifecycle">; questionId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; } & { status: z.ZodLiteral<"expired">; }, "strict", z.ZodTypeAny, { type: "lifecycle"; status: "expired"; questionId: string; resolvedAt: string; note?: string | undefined; }, { type: "lifecycle"; status: "expired"; questionId: string; resolvedAt: string; note?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"lifecycle">; questionId: z.ZodString; note: z.ZodOptional; resolvedAt: z.ZodString; } & { status: z.ZodLiteral<"superseded">; replacementQuestionId: z.ZodString; }, "strict", z.ZodTypeAny, { type: "lifecycle"; status: "superseded"; questionId: string; replacementQuestionId: string; resolvedAt: string; note?: string | undefined; }, { type: "lifecycle"; status: "superseded"; questionId: string; replacementQuestionId: string; resolvedAt: string; note?: string | undefined; }>]>]>; }, "strip", z.ZodTypeAny, { type: "answer.result"; requestId: string; payload: { questionId: string; answer: string[]; answerId: string; note?: string | undefined; } | { type: "lifecycle"; status: "cancelled"; questionId: string; resolvedAt: string; note?: string | undefined; } | { type: "lifecycle"; status: "expired"; questionId: string; resolvedAt: string; note?: string | undefined; } | { type: "lifecycle"; status: "superseded"; questionId: string; replacementQuestionId: string; resolvedAt: string; note?: string | undefined; } | { type: "pending"; status: "pending"; questionId: string; }; }, { type: "answer.result"; requestId: string; payload: { questionId: string; answer: string[]; answerId: string; note?: string | undefined; } | { type: "lifecycle"; status: "cancelled"; questionId: string; resolvedAt: string; note?: string | undefined; } | { type: "lifecycle"; status: "expired"; questionId: string; resolvedAt: string; note?: string | undefined; } | { type: "lifecycle"; status: "superseded"; questionId: string; replacementQuestionId: string; resolvedAt: string; note?: string | undefined; } | { type: "pending"; status: "pending"; questionId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"question.list.result">; requestId: z.ZodString; payload: z.ZodObject<{ scope: z.ZodObject<{ repositoryId: z.ZodString; worktreeId: z.ZodString; featureId: z.ZodString; level: z.ZodEnum<["owner", "feature", "worktree", "repository", "global"]>; }, "strict", z.ZodTypeAny, { repositoryId: string; worktreeId: string; featureId: string; level: "repository" | "worktree" | "feature" | "owner" | "global"; }, { repositoryId: string; worktreeId: string; featureId: string; level: "repository" | "worktree" | "feature" | "owner" | "global"; }>; questions: z.ZodArray, "many">; nextCursor: z.ZodOptional; }, "strict", z.ZodTypeAny, { questions: { question: string; questionId: string; }[]; scope: { repositoryId: string; worktreeId: string; featureId: string; level: "repository" | "worktree" | "feature" | "owner" | "global"; }; nextCursor?: string | undefined; }, { questions: { question: string; questionId: string; }[]; scope: { repositoryId: string; worktreeId: string; featureId: string; level: "repository" | "worktree" | "feature" | "owner" | "global"; }; nextCursor?: string | undefined; }>; }, "strip", z.ZodTypeAny, { type: "question.list.result"; requestId: string; payload: { questions: { question: string; questionId: string; }[]; scope: { repositoryId: string; worktreeId: string; featureId: string; level: "repository" | "worktree" | "feature" | "owner" | "global"; }; nextCursor?: string | undefined; }; }, { type: "question.list.result"; requestId: string; payload: { questions: { question: string; questionId: string; }[]; scope: { repositoryId: string; worktreeId: string; featureId: string; level: "repository" | "worktree" | "feature" | "owner" | "global"; }; nextCursor?: string | undefined; }; }>, z.ZodObject<{ type: z.ZodLiteral<"query.result">; requestId: z.ZodString; payload: z.ZodUnknown; }, "strip", z.ZodTypeAny, { type: "query.result"; requestId: string; payload?: unknown; }, { type: "query.result"; requestId: string; payload?: unknown; }>, z.ZodObject<{ type: z.ZodLiteral<"postbox.wait.result">; requestId: z.ZodString; payload: z.ZodRecord; }, "strip", z.ZodTypeAny, { type: "postbox.wait.result"; requestId: string; payload: Record; }, { type: "postbox.wait.result"; requestId: string; payload: Record; }>, z.ZodObject<{ type: z.ZodLiteral<"ask.resolved">; requestId: z.ZodOptional; payload: 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; }>]>; }, "strip", z.ZodTypeAny, { type: "ask.resolved"; payload: { 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; }; requestId?: string | undefined; }, { type: "ask.resolved"; payload: { 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; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.activate">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; ownerSessionId: z.ZodString; source: z.ZodObject<{ cwd: z.ZodString; question: z.ZodObject<{ revision: z.ZodNumber; question: z.ZodString; ambiguity: z.ZodString; 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">; mode: z.ZodEnum<["single", "multi"]>; }, "strip", z.ZodTypeAny, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; ambiguity: string; mode: "single" | "multi"; question: string; revision: number; }, { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; ambiguity: string; mode: "single" | "multi"; question: string; revision: number; }>; settings: z.ZodObject<{ model: z.ZodNullable; effort: z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>; }, "strict", z.ZodTypeAny, { model: string | null; effort: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }, { model: string | null; effort: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }>; }, "strip", z.ZodTypeAny, { cwd: string; question: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; ambiguity: string; mode: "single" | "multi"; question: string; revision: number; }; settings: { model: string | null; effort: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }; }, { cwd: string; question: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; ambiguity: string; mode: "single" | "multi"; question: string; revision: number; }; settings: { model: string | null; effort: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }; }>; }, "strip", z.ZodTypeAny, { requestId: string; source: { cwd: string; question: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; ambiguity: string; mode: "single" | "multi"; question: string; revision: number; }; settings: { model: string | null; effort: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }; }; ownerSessionId: string; }, { requestId: string; source: { cwd: string; question: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; ambiguity: string; mode: "single" | "multi"; question: string; revision: number; }; settings: { model: string | null; effort: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }; }; ownerSessionId: string; }>; }, "strip", z.ZodTypeAny, { type: "chat.activate"; requestId: string; payload: { requestId: string; source: { cwd: string; question: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; ambiguity: string; mode: "single" | "multi"; question: string; revision: number; }; settings: { model: string | null; effort: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }; }; ownerSessionId: string; }; }, { type: "chat.activate"; requestId: string; payload: { requestId: string; source: { cwd: string; question: { options: { value: string; label: string; description?: string | undefined; impact?: string | undefined; provenance?: "chat" | undefined; }[]; ambiguity: string; mode: "single" | "multi"; question: string; revision: number; }; settings: { model: string | null; effort: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }; }; ownerSessionId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.cleanup">; requestId: z.ZodOptional; payload: z.ZodObject<{ requestId: z.ZodString; reason: z.ZodEnum<["answered", "cancelled", "expired", "session_shutdown", "missing", "wrong_owner"]>; }, "strip", z.ZodTypeAny, { requestId: string; reason: "answered" | "cancelled" | "expired" | "wrong_owner" | "session_shutdown" | "missing"; }, { requestId: string; reason: "answered" | "cancelled" | "expired" | "wrong_owner" | "session_shutdown" | "missing"; }>; }, "strip", z.ZodTypeAny, { type: "chat.cleanup"; payload: { requestId: string; reason: "answered" | "cancelled" | "expired" | "wrong_owner" | "session_shutdown" | "missing"; }; requestId?: string | undefined; }, { type: "chat.cleanup"; payload: { requestId: string; reason: "answered" | "cancelled" | "expired" | "wrong_owner" | "session_shutdown" | "missing"; }; requestId?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.snapshot">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; ownerSessionId: z.ZodString; }, "strip", z.ZodTypeAny, { requestId: string; ownerSessionId: string; }, { requestId: string; ownerSessionId: string; }>; }, "strip", z.ZodTypeAny, { type: "chat.snapshot"; requestId: string; payload: { requestId: string; ownerSessionId: string; }; }, { type: "chat.snapshot"; requestId: string; payload: { requestId: string; ownerSessionId: string; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.send">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; ownerSessionId: z.ZodString; command: z.ZodObject<{ clientCommandId: z.ZodString; message: z.ZodString; }, "strict", z.ZodTypeAny, { message: string; clientCommandId: string; }, { message: string; clientCommandId: string; }>; }, "strip", z.ZodTypeAny, { requestId: string; ownerSessionId: string; command: { message: string; clientCommandId: string; }; }, { requestId: string; ownerSessionId: string; command: { message: string; clientCommandId: string; }; }>; }, "strip", z.ZodTypeAny, { type: "chat.send"; requestId: string; payload: { requestId: string; ownerSessionId: string; command: { message: string; clientCommandId: string; }; }; }, { type: "chat.send"; requestId: string; payload: { requestId: string; ownerSessionId: string; command: { message: string; clientCommandId: string; }; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.stop">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; ownerSessionId: z.ZodString; command: z.ZodObject<{ clientCommandId: z.ZodString; }, "strict", z.ZodTypeAny, { clientCommandId: string; }, { clientCommandId: string; }>; }, "strip", z.ZodTypeAny, { requestId: string; ownerSessionId: string; command: { clientCommandId: string; }; }, { requestId: string; ownerSessionId: string; command: { clientCommandId: string; }; }>; }, "strip", z.ZodTypeAny, { type: "chat.stop"; requestId: string; payload: { requestId: string; ownerSessionId: string; command: { clientCommandId: string; }; }; }, { type: "chat.stop"; requestId: string; payload: { requestId: string; ownerSessionId: string; command: { clientCommandId: string; }; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.propose-answer.result">; requestId: z.ZodString; payload: z.ZodObject<{ requestId: z.ZodString; result: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{ status: z.ZodLiteral<"appended">; option: z.ZodObject<{ value: z.ZodString; label: z.ZodString; description: z.ZodOptional; impact: z.ZodOptional; } & { provenance: z.ZodLiteral<"chat">; }, "strict", z.ZodTypeAny, { value: string; label: string; provenance: "chat"; description?: string | undefined; impact?: string | undefined; }, { value: string; label: string; provenance: "chat"; description?: string | undefined; impact?: string | undefined; }>; }, "strict", z.ZodTypeAny, { status: "appended"; option: { value: string; label: string; provenance: "chat"; description?: string | undefined; impact?: string | undefined; }; }, { status: "appended"; option: { value: string; label: string; provenance: "chat"; description?: string | undefined; impact?: string | undefined; }; }>, z.ZodObject<{ status: z.ZodLiteral<"error">; error: z.ZodObject<{ code: z.ZodEnum<["request_not_found", "request_terminal", "wrong_owner", "invalid_proposal", "duplicate_option", "option_value_collision", "option_limit_reached", "internal_error"]>; message: z.ZodString; }, "strict", z.ZodTypeAny, { code: "request_not_found" | "request_terminal" | "wrong_owner" | "invalid_proposal" | "duplicate_option" | "option_value_collision" | "option_limit_reached" | "internal_error"; message: string; }, { code: "request_not_found" | "request_terminal" | "wrong_owner" | "invalid_proposal" | "duplicate_option" | "option_value_collision" | "option_limit_reached" | "internal_error"; message: string; }>; }, "strict", z.ZodTypeAny, { status: "error"; error: { code: "request_not_found" | "request_terminal" | "wrong_owner" | "invalid_proposal" | "duplicate_option" | "option_value_collision" | "option_limit_reached" | "internal_error"; message: string; }; }, { status: "error"; error: { code: "request_not_found" | "request_terminal" | "wrong_owner" | "invalid_proposal" | "duplicate_option" | "option_value_collision" | "option_limit_reached" | "internal_error"; message: string; }; }>]>; }, "strict", z.ZodTypeAny, { requestId: string; result: { status: "appended"; option: { value: string; label: string; provenance: "chat"; description?: string | undefined; impact?: string | undefined; }; } | { status: "error"; error: { code: "request_not_found" | "request_terminal" | "wrong_owner" | "invalid_proposal" | "duplicate_option" | "option_value_collision" | "option_limit_reached" | "internal_error"; message: string; }; }; }, { requestId: string; result: { status: "appended"; option: { value: string; label: string; provenance: "chat"; description?: string | undefined; impact?: string | undefined; }; } | { status: "error"; error: { code: "request_not_found" | "request_terminal" | "wrong_owner" | "invalid_proposal" | "duplicate_option" | "option_value_collision" | "option_limit_reached" | "internal_error"; message: string; }; }; }>; }, "strip", z.ZodTypeAny, { type: "chat.propose-answer.result"; requestId: string; payload: { requestId: string; result: { status: "appended"; option: { value: string; label: string; provenance: "chat"; description?: string | undefined; impact?: string | undefined; }; } | { status: "error"; error: { code: "request_not_found" | "request_terminal" | "wrong_owner" | "invalid_proposal" | "duplicate_option" | "option_value_collision" | "option_limit_reached" | "internal_error"; message: string; }; }; }; }, { type: "chat.propose-answer.result"; requestId: string; payload: { requestId: string; result: { status: "appended"; option: { value: string; label: string; provenance: "chat"; description?: string | undefined; impact?: string | undefined; }; } | { status: "error"; error: { code: "request_not_found" | "request_terminal" | "wrong_owner" | "invalid_proposal" | "duplicate_option" | "option_value_collision" | "option_limit_reached" | "internal_error"; message: string; }; }; }; }>, z.ZodObject<{ type: z.ZodLiteral<"chat.reconcile">; requestId: z.ZodString; payload: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{ requestId: z.ZodString; forkKind: z.ZodLiteral<"fresh">; action: z.ZodLiteral<"recover">; reason: z.ZodLiteral<"pending">; }, "strip", z.ZodTypeAny, { action: "recover"; requestId: string; reason: "pending"; forkKind: "fresh"; }, { action: "recover"; requestId: string; reason: "pending"; forkKind: "fresh"; }>, z.ZodObject<{ requestId: z.ZodString; forkKind: z.ZodLiteral<"fresh">; action: z.ZodLiteral<"delete">; reason: z.ZodEnum<["missing", "terminal", "wrong_owner"]>; }, "strip", z.ZodTypeAny, { action: "delete"; requestId: string; reason: "wrong_owner" | "missing" | "terminal"; forkKind: "fresh"; }, { action: "delete"; requestId: string; reason: "wrong_owner" | "missing" | "terminal"; forkKind: "fresh"; }>]>; }, "strip", z.ZodTypeAny, { type: "chat.reconcile"; requestId: string; payload: { action: "recover"; requestId: string; reason: "pending"; forkKind: "fresh"; } | { action: "delete"; requestId: string; reason: "wrong_owner" | "missing" | "terminal"; forkKind: "fresh"; }; }, { type: "chat.reconcile"; requestId: string; payload: { action: "recover"; requestId: string; reason: "pending"; forkKind: "fresh"; } | { action: "delete"; requestId: string; reason: "wrong_owner" | "missing" | "terminal"; forkKind: "fresh"; }; }>, z.ZodObject<{ type: z.ZodLiteral<"error">; requestId: z.ZodOptional; error: z.ZodObject<{ code: z.ZodString; message: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; message: string; }, { code: string; message: string; }>; }, "strip", z.ZodTypeAny, { type: "error"; error: { code: string; message: string; }; requestId?: string | undefined; }, { type: "error"; error: { code: string; message: string; }; requestId?: string | undefined; }>]>; export type ExtensionClientMessage = z.infer; export type ExtensionServerMessage = z.infer; //# sourceMappingURL=ws.d.ts.map