import type { AgentControllerEvent } from '@mastra/core/agent-controller'; import type { NotificationReason } from './notify.js'; import type { TUIState } from './state.js'; export declare function showError(state: TUIState, message: string): void; export declare function showInfo(state: TUIState, message: string): void; export declare function showFormattedError(state: TUIState, event: { error: Error; errorType?: string; retryable?: boolean; retryDelay?: number; retryAttempt?: number; maxRetries?: number; } | Error): void; export declare function notify(state: TUIState, reason: NotificationReason, message?: string): void; /** * Fire the user-facing notification for an event the moment it is received, * before the event enters the TUI's serialized dispatch queue. A pending prompt * blocks that queue until the user answers, so any notify call living inside a * queued handler is starved exactly when the user has walked away. This helper * runs synchronously in the controller subscription listener instead. * * Covers two kinds of pings: input-request events (prompts that need the * user's answer, #20398) and the agent_done lifecycle ping when a run * finishes (#20860). The name predates the agent_end mapping and is kept for * continuity with the #20857 call sites and tests. * * All other events are a no-op. Never throws: a notification failure must not * break event delivery. */ export declare function notifyForInputRequest(state: TUIState, event: AgentControllerEvent): void; /** * Dispatch PermissionRequest hooks for a permission-prompt event the moment it * is received, before the event enters the TUI's serialized dispatch queue. * A pending prompt blocks that queue until the user answers, so a hook * dispatched from inside a queued handler is starved exactly when its external * integration needs to hear about the new prompt (#20861). This helper runs * synchronously in the controller subscription listener instead — the sibling * of notifyForInputRequest for hook dispatch rather than user pings. * * runId semantics: HookManager.runPermissionRequest silently bails when no run * id is set, and setRunId/clearRunId both run inside the QUEUED agent_start/ * agent_end handling. To close the receipt-time gap — a permission event * arriving before its run's queued agent_start has been processed — agent_start * is handled here by setting the run id immediately (before the queued handler * runs). beginLifecycleRun() in the queued handler reuses an existing run id * instead of overwriting it, so the receipt-time id propagates to AgentStart * hooks and beyond. * * Never throws: a hook failure must not break event delivery. */ export declare function runPermissionHooksForEvent(state: TUIState, event: AgentControllerEvent): void; //# sourceMappingURL=display.d.ts.map