import type { EventEmitter } from 'node:events'; import { type ChatActivity } from '../../core/chat-activity.js'; import type { TuiApprovalBridge } from './approval-bridge.js'; export interface ChatMessage { id?: string; role: 'user' | 'assistant' | 'system'; content: string; pending?: boolean; elapsedMs?: number; agentName?: string; /** In-thread tool / approval / A2A accordion (web ChatActivity parity). */ activity?: ChatActivity; } interface AppProps { initialAgent?: string; /** Resume from disk; overrides initial empty state. */ resumed?: { id: string; agent?: string; messages: ChatMessage[]; createdAt?: string; agentSessions?: Record; }; /** Stable session id — generated upstream and printed on exit so * user can `agim tui --resume ` next time. */ sessionId: string; /** Notify entry so exit hint prints the latest in-app session id. */ onSessionIdChange?: (id: string) => void; /** In-process approval surface used by `agim tui` for tool-call approvals. */ approvalBridge?: TuiApprovalBridge; /** Emits 'wheel' (-1 up / +1 down) per mouse-wheel notch; wired by the * stdin proxy in index.ts. Absent when mouse support is off. */ wheel?: EventEmitter; /** Drop/re-arm xterm mouse reporting around handing the terminal to an * external $EDITOR. Absent when mouse support is off. */ mouseControl?: { disable(): void; enable(): void; }; } export declare function TuiApp({ initialAgent, resumed, sessionId, onSessionIdChange, approvalBridge, wheel, mouseControl }: AppProps): JSX.Element; export {}; //# sourceMappingURL=app.d.ts.map