SessionSnapshotSchema
View as Markdownconst SessionSnapshotSchema: ZodObject<{ lastSequence: ZodNumber; pendingApprovals: ZodArray<ZodObject<{ allowedScopes: ZodArray<ZodEnum<{ once: "once"; session: "session"; }>>; availableDecisions: ZodArray<ZodEnum<{ allow_once: "allow_once"; allow_session: "allow_session"; deny: "deny"; }>>; category: ZodEnum<{ file: "file"; mcp: "mcp"; network: "network"; other: "other"; shell: "shell"; }>; createdAt: ZodString; decision: ZodOptional<ZodEnum<{ allow: "allow"; deny: "deny"; }>>; description: ZodOptional<ZodString>; expiresAt: ZodString; id: ZodString; runId: ZodString; runtimeId: ZodString; sessionId: ZodString; state: ZodEnum<{ approved: "approved"; cancelled: "cancelled"; denied: "denied"; expired: "expired"; failed: "failed"; pending: "pending"; reconciling: "reconciling"; submitting: "submitting"; }>; target: ZodObject<{ command: ZodOptional<ZodString>; cwd: ZodOptional<ZodString>; host: ZodOptional<ZodString>; path: ZodOptional<ZodString>; }, $strip>; title: ZodString; toolId: ZodOptional<ZodString>; version: ZodNumber; }, $strip>>; runs: ZodArray<ZodObject<{ attachments: ZodOptional<ZodArray<ZodObject<{ createdAt: ZodString; id: ZodString; kind: ZodEnum<{ file: ...; image: ...; }>; mime: ZodString; name: ZodString; sessionId: ZodString; sha256: ZodString; size: ZodNumber; }, $strip>>>; createdAt: ZodString; endedAt: ZodOptional<ZodString>; error: ZodOptional<ZodObject<{ code: ZodEnum<{ approval_already_resolved: "approval_already_resolved"; approval_expired: "approval_expired"; attachment_too_large: "attachment_too_large"; attachment_type_unsupported: "attachment_type_unsupported"; auth_required: "auth_required"; device_code_expired: "device_code_expired"; event_replay_unavailable: "event_replay_unavailable"; forbidden_origin: "forbidden_origin"; internal_error: "internal_error"; invalid_request: "invalid_request"; invalid_workspace: "invalid_workspace"; machine_not_found: "machine_not_found"; machine_offline: "machine_offline"; not_found: "not_found"; policy_denied: "policy_denied"; rate_limited: "rate_limited"; runtime_disconnected: "runtime_disconnected"; runtime_unavailable: "runtime_unavailable"; session_busy: "session_busy"; session_read_only: "session_read_only"; store_locked: "store_locked"; tool_failed: "tool_failed"; unauthorized: "unauthorized"; unsupported_capability: "unsupported_capability"; upgrade_required: "upgrade_required"; }>; details: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; hint: ZodOptional<ZodString>; message: ZodString; requestId: ZodOptional<ZodString>; retryable: ZodBoolean; }, $strip>>; id: ZodString; prompt: ZodString; sessionId: ZodString; startedAt: ZodOptional<ZodString>; state: ZodEnum<{ cancelled: "cancelled"; completed: "completed"; failed: "failed"; interrupted: "interrupted"; queued: "queued"; running: "running"; waiting_approval: "waiting_approval"; }>; }, $strip>>; session: ZodObject<{ activeRunId: ZodOptional<ZodString>; capabilities: ZodObject<{ approval: ZodObject<{ once: ZodBoolean; session: ZodBoolean; types: ZodArray<ZodEnum<{ file: ...; mcp: ...; network: ...; other: ...; shell: ...; }>>; }, $strip>; attachments: ZodObject<{ files: ZodBoolean; images: ZodBoolean; maxBytes: ZodNumber; maxImageBytes: ZodOptional<ZodNumber>; }, $strip>; diffEvents: ZodBoolean; efforts: ZodArray<ZodEnum<{ high: "high"; low: "low"; max: "max"; medium: "medium"; xhigh: "xhigh"; }>>; mcp: ZodBoolean; models: ZodArray<ZodObject<{ description: ZodOptional<ZodString>; id: ZodString; label: ZodString; }, $strip>>; modelsAuthoritative: ZodOptional<ZodBoolean>; nativeResume: ZodBoolean; permissionModes: ZodArray<ZodEnum<{ acceptEdits: "acceptEdits"; auto: "auto"; bypassPermissions: "bypassPermissions"; default: "default"; plan: "plan"; }>>; siteTools: ZodBoolean; skills: ZodEnum<{ partial: "partial"; prompt: "prompt"; supported: "supported"; unknown: "unknown"; }>; streaming: ZodBoolean; }, $strip>; createdAt: ZodString; id: ZodString; machineId: ZodOptional<ZodString>; readOnly: ZodBoolean; runtimeId: ZodString; settings: ZodObject<{ effort: ZodOptional<ZodEnum<{ high: "high"; low: "low"; max: "max"; medium: "medium"; xhigh: "xhigh"; }>>; model: ZodOptional<ZodString>; permissionMode: ZodEnum<{ acceptEdits: "acceptEdits"; auto: "auto"; bypassPermissions: "bypassPermissions"; default: "default"; plan: "plan"; }>; }, $strip>; status: ZodEnum<{ busy: "busy"; closed: "closed"; ready: "ready"; unavailable: "unavailable"; }>; title: ZodString; workspace: ZodString; }, $strip>;}, $strip>;Defined in: api.ts:24