export interface LiveReviewStartData { readonly schemaVersion: 1; readonly reviewId: string; readonly callId: string | null; readonly toolName: string; readonly targetKind: string; readonly targetSummary: string; readonly trajectoryEnabled?: boolean; readonly startedAt: number; } export interface LiveReviewStatusData { readonly schemaVersion: 1; readonly reviewId: string; readonly phase: 'awaiting-manual-approval'; readonly changedAt: number; } export interface LiveReviewEndData { readonly schemaVersion: 1; readonly reviewId: string; readonly completedAt: number; readonly durationMs: number; readonly automatedOutcome: string; readonly finalOutcome: string; readonly decisionSource: string; readonly guardianStatus: string; readonly guardianReason?: string | null; readonly riskLevel: string | null; readonly userAuthorization: string | null; readonly failure: string | null; readonly manualOverrideStatus: string; readonly auditPersisted: boolean; readonly auditDisabled: boolean; readonly auditFailure: string | null; } export type LiveReviewUpdate = Readonly<{ kind: 'start'; sessionId: string; data: LiveReviewStartData; } | { kind: 'status'; sessionId: string; data: LiveReviewStatusData; } | { kind: 'end'; sessionId: string; data: LiveReviewEndData; }>; export interface LiveReviewPollResult { readonly status: 'ready' | 'missing'; readonly updates: readonly LiveReviewUpdate[]; }