sealed class StreamEvent {}

class ThinkingEvent extends StreamEvent {
  final String content;
  ThinkingEvent(this.content);
}

class TextEvent extends StreamEvent {
  final String content;
  TextEvent(this.content);
}

class ToolUseEvent extends StreamEvent {
  final String toolName;
  final Map<String, dynamic> input;
  ToolUseEvent(this.toolName, this.input);
}

class ToolResultEvent extends StreamEvent {
  final String toolName;
  final String output;
  final bool isError;
  ToolResultEvent(this.toolName, this.output, this.isError);
}

class ApprovalRequiredEvent extends StreamEvent {
  final String taskId;
  final String command;
  final int riskLevel;
  ApprovalRequiredEvent(this.taskId, this.command, this.riskLevel);
}

class CompletedEvent extends StreamEvent {
  final String summary;
  CompletedEvent(this.summary);
}

class ErrorEvent extends StreamEvent {
  final String message;
  ErrorEvent(this.message);
}

class StandingOrderDraftEvent extends StreamEvent {
  final Map<String, dynamic> draft;
  StandingOrderDraftEvent(this.draft);
}

class StandingOrderConfirmedEvent extends StreamEvent {
  final String orderId;
  final String orderName;
  StandingOrderConfirmedEvent(this.orderId, this.orderName);
}
