/**
 * TUI shared types
 * TUI imports ONLY contracts. No runtime imports.
 *
 * @module packages/tui/src/types
 */

import type { SessionID, ProjectID, TaskID, AgentID, ToolRunID, ISOTimeString } from '@aircoding/contracts'

export interface SessionProjection {
  session_id: SessionID
  project_id: ProjectID
  status: string
  title?: string
  tasks: TaskProjection[]
  agents: AgentProjection[]
}

export interface TaskProjection {
  id: TaskID
  type: string
  status: string
  title: string
  retry_count: number
  attempts: number
  created_at: string
}

export interface AgentProjection {
  id: AgentID
  type: string
  status: string
  task_id?: TaskID
  last_heartbeat?: string
}

export type ProjectionSubscriber = (projection: SessionProjection) => void
