export type AgentEventType = 'connected' | 'session:created' | 'session:updated' | 'session:terminated' | 'session:output' | 'tunnel:started' | 'tunnel:stopped' | 'tunnel:error' | 'notification:new' | 'notification:read' | 'file:changed' | 'task:started' | 'task:completed' | 'task:failed' | 'plugin:installed' | 'plugin:removed' | 'plugin:reloaded' | 'agent:heartbeat' | 'log:entry' | 'pong'; export interface AiToolNotification { id: string; source: string; eventType: string; title: string; message: string; timestamp: string; properties?: Record; } export interface AgentEvent { type: AgentEventType; payload: T; timestamp: string; } export type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error'; export interface UseAgentEventsOptions { agentId: string | null; enabled?: boolean; /** Cap on most-recent events the server replays on subscribe. */ limit?: number; /** * Retained for API compatibility with the polling implementation but * no longer drives a timer — Apollo's link-level retry handles * transport reconnect. Kept on the type so existing consumers * compile unchanged. */ reconnectDelay?: number; maxReconnectAttempts?: number; onNotification?: (notification: AiToolNotification) => void; onEvent?: (event: AgentEvent) => void; onStatusChange?: (status: ConnectionStatus) => void; } export interface UseAgentEventsReturn { status: ConnectionStatus; error: string | null; notifications: AiToolNotification[]; reconnect: () => void; disconnect: () => void; clearNotifications: () => void; dismissNotification: (id: string) => void; } export declare function useAgentEvents(options: UseAgentEventsOptions): UseAgentEventsReturn;