export interface ChunkEvent {
  type: 'chunk';
  content: string;
}

export interface ToolCallEvent {
  type: 'tool_call';
  toolName: string;
  label: string;
}

export interface ImageEvent {
  type: 'image';
  data: string;
  mimeType: string;
  caption?: string;
}

export interface DoneEvent {
  type: 'done';
  content: string;
}

export interface SubagentChunkEvent {
  type: 'subagent_chunk';
  agentName: string;
  content: string;
}

export interface SubagentThinkingEvent {
  type: 'subagent_thinking';
  agentName: string;
  content: string;
}

export interface SubagentToolCallEvent {
  type: 'subagent_tool_call';
  agentName: string;
  toolName: string;
  label: string;
}

export interface ErrorEvent {
  type: 'error';
  /** Name of the agent or tool where the error occurred */
  source: string;
  /** True if the error is unrecoverable and the chat session should end */
  fatal: boolean;
}

export type HarnessEvent = ChunkEvent | ToolCallEvent | ImageEvent | DoneEvent | SubagentChunkEvent | SubagentThinkingEvent | SubagentToolCallEvent | ErrorEvent;
