import type { Goal, BranchContext } from "./goal";

export interface TraceListItem {
  trace_id: string;
  mode: string;
  task: string;
  status: string;
  total_messages: number;
  total_tokens: number;
  total_cost: number;
  current_goal_id: string;
  created_at: string;
}

export interface TraceListResponse {
  traces: TraceListItem[];
  total: number;
}

export interface TraceDetailResponse {
  trace_id: string;
  mode: string;
  task: string;
  status: string;
  total_messages: number;
  total_tokens: number;
  total_cost: number;
  created_at: string;
  completed_at: string | null;
  goal_tree: {
    mission: string;
    current_id: string | null;
    goals: Goal[];
  };
  branches: Record<string, BranchContext>;
}
