/**
 * Hook for managing agent event bus subscriptions for NON-STREAMING events.
 *
 * Streaming events (llm:thinking, llm:chunk, llm:response, llm:tool-call, llm:tool-result,
 * llm:error, run:complete, message:dequeued) are handled via agent.stream() iterator in processStream.
 *
 * This hook handles:
 * - approval:request - Tool/command approval requests
 * - llm:switched - Model change notifications
 * - session:reset - Conversation reset
 * - session:created - New session creation (e.g., from /clear)
 * - context:compacting - Context compaction starting (from /compact or auto)
 * - context:compacted - Context compaction finished
 * - message:queued - New message added to queue
 * - message:removed - Message removed from queue (e.g., up arrow edit)
 * - run:invoke - External trigger (scheduler, A2A, API) starting a run
 * - run:complete (for external triggers) - External run finished
 *
 * Uses AbortController pattern for cleanup.
 */
import type React from 'react';
import { type QueuedMessage } from '@dexto/core';
import type { Message, UIState, SessionState, InputState } from '../state/types.js';
import type { ApprovalRequest } from '../components/ApprovalPrompt.js';
import type { TextBuffer } from '../components/shared/text-buffer.js';
import type { TuiAgentBackend } from '../agent-backend.js';
interface UseAgentEventsProps {
    agent: TuiAgentBackend;
    setMessages: React.Dispatch<React.SetStateAction<Message[]>>;
    setPendingMessages: React.Dispatch<React.SetStateAction<Message[]>>;
    setUi: React.Dispatch<React.SetStateAction<UIState>>;
    setSession: React.Dispatch<React.SetStateAction<SessionState>>;
    setInput: React.Dispatch<React.SetStateAction<InputState>>;
    setApproval: React.Dispatch<React.SetStateAction<ApprovalRequest | null>>;
    setApprovalQueue: React.Dispatch<React.SetStateAction<ApprovalRequest[]>>;
    setSteerMessages: React.Dispatch<React.SetStateAction<QueuedMessage[]>>;
    setQueuedMessages: React.Dispatch<React.SetStateAction<QueuedMessage[]>>;
    /** Current session ID for filtering events */
    currentSessionId: string | null;
    /** Text buffer for input (source of truth) - needed to clear on session reset */
    buffer: TextBuffer;
}
/**
 * Subscribes to agent event bus for non-streaming events only.
 * Streaming events are handled via agent.stream() iterator.
 *
 * Also handles external triggers (run:invoke) from scheduler, A2A, etc.
 */
export declare function useAgentEvents({ agent, setMessages, setPendingMessages, setUi, setSession, setInput, setApproval, setApprovalQueue, setSteerMessages, setQueuedMessages, currentSessionId, buffer, }: UseAgentEventsProps): void;
export {};
//# sourceMappingURL=useAgentEvents.d.ts.map