/** Canonical lifecycle values emitted by the MINT Python SDK job contract. */ export type JobStatus = | 'awaiting_input' | 'queued' | 'running' | 'completed' | 'failed' | 'cancelled' export interface JobProgress { current_file: number total_files: number current_filename: string | null percent: number message: string stage: string } /** Normalized job state used by SDK job UI. */ export interface JobState { id: string job_id: string kind: string name: string definition_id: string | null status: JobStatus progress: JobProgress queue_position: number warnings: string[] error: string | null output_path: string | null save_path: string | null session_id: string | null folders: string[] folder_path: string | null user_id: string | null owner_user_id: string | null experiment_id: string | null extraction_result_id: string | null metadata: Record created_at: string started_at: string | null completed_at: string | null can_cancel: boolean can_delete: boolean result_status: 'none' | 'available' | 'expired' result_expires_at: string | null } /** Backward-compatible transport shape accepted from pre-capability backends. */ export type JobStateInput = Omit< JobState, 'can_cancel' | 'can_delete' | 'definition_id' | 'result_status' | 'result_expires_at' > & { can_cancel?: boolean | null can_delete?: boolean | null definition_id?: string | null result_status?: 'none' | 'available' | 'expired' result_expires_at?: string | null } export interface JobListPayload { jobs: JobStateInput[] } export interface JobSnapshotPayload { jobs: JobStateInput[] } export type JobStreamData = JobStateInput | JobSnapshotPayload