import type {
  AgentTask,
  AppConfig,
  AssistantChatRequest,
  AssistantChatResponse,
  AssistantIntentRequest,
  AssistantIntentResponse,
  AssistantRunRequest,
  AssistantRunResponse,
  CaptchaResult,
  DashboardSnapshot,
  LogEntry,
  LoginRequest,
  McpRuntimeConfigSnapshot,
  PriceComparisonExportRequest,
  PriceComparisonExportResult,
  SessionStatus,
  TableExportRequest,
  TableExportResult,
  TaskRunRequest,
  TaskRunResult
} from "./types";

export interface AgentBridge {
  getConfig(): Promise<AppConfig>;
  saveConfig(config: Partial<AppConfig>): Promise<AppConfig>;
  getDashboard(): Promise<DashboardSnapshot>;
  listTasks(): Promise<AgentTask[]>;
  runTask(request: TaskRunRequest): Promise<TaskRunResult>;
  listLogs(): Promise<LogEntry[]>;
  clearLogs(): Promise<void>;
  login(request: LoginRequest): Promise<SessionStatus>;
  logout(): Promise<SessionStatus>;
  getSession(): Promise<SessionStatus>;
  getCaptcha(): Promise<CaptchaResult>;
  getMcpConfig(): Promise<McpRuntimeConfigSnapshot>;
  chat(request: AssistantChatRequest): Promise<AssistantChatResponse>;
  extractIntent(request: AssistantIntentRequest): Promise<AssistantIntentResponse>;
  runAssistant(request: AssistantRunRequest): Promise<AssistantRunResponse>;
  exportPriceComparison(request: PriceComparisonExportRequest): Promise<PriceComparisonExportResult>;
  exportTables(request: TableExportRequest): Promise<TableExportResult>;
  openExportedFile(filePath: string): Promise<void>;
  showExportedFile(filePath: string): Promise<void>;
  onLog(callback: (entry: LogEntry) => void): () => void;
}
