export interface PiEvent {
  type: string;
  [key: string]: any;
}

export interface PiMessageUpdate extends PiEvent {
  type: "message_update";
  content: string;
}

export interface PiToolCall extends PiEvent {
  type: "tool_execution_start";
  tool_name: string;
  tool_input: any;
}

export interface PiAgentEnd extends PiEvent {
  type: "agent_end";
}

export interface PiMessageEnd extends PiEvent {
  type: "message_end";
  content: string;
}

export interface PiExecutionResult {
  success: boolean;
  output: string;
  toolCalls: number;
  durationMs: number;
  error?: string;
}
