import type { MastraTUIOptions, TUIState } from './state.js'; export type { MastraTUIOptions } from './state.js'; export declare function syncInitialThreadState(state: TUIState): Promise; export declare function consumePendingImages(text: string, pendingImages: TUIState['pendingImages']): { content: string; images?: TUIState['pendingImages']; }; export declare class MastraTUI { private state; private updateCheckTimer; private statusTimingTimer; private hasShownUpdateBanner; private caffeinateProcess; private cleanupKeyHandlers?; private cleanupPluginReloadListener?; private cleanupPluginUpdateListener?; private lastStreamError; /** * Text submitted while the main loop was busy (running a slash command or a * shell passthrough) and so was not waiting on `getUserInput`. The editor's * submit handler stays installed across loop iterations, so without this the * submission would resolve an already-settled promise and be silently lost. */ private queuedUserInput; private pendingUserInputResolve; private static readonly DOUBLE_CTRL_C_MS; constructor(options: MastraTUIOptions); /** * Run the TUI. This is the main entry point. */ run(): Promise; /** * Fire off a message without blocking the main loop. * Errors are handled via controller events. */ private fireMessage; private createUserSignalMessage; private createUserSignalContent; private renderOptimisticUserMessage; private removeOptimisticUserMessage; private remapOptimisticUserMessage; private createPendingNewThread; private sendOptimisticSignal; private signalMessage; private queueFollowUpMessage; /** * Stop the TUI and clean up. */ stop(): void; private refreshPluginRuntimeState; private init; private refreshModelAuthStatus; private updateIdleStatusLine; private updateActiveStatusTiming; private startActiveStatusTimingTicker; private startIdleStatusTimingTicker; private renderExistingMessagesAndSeedIdleCounter; private clearStatusTimingTicker; /** Cached event context – built once, reused for every event. */ private _ectx; private getEventContext; private handleEvent; private captureAgentControllerAnalytics; private emitErrorFeedback; private startCaffeinate; private stopCaffeinate; private buildProviderAccess; private syncThreadActivePackMetadata; private showHookWarnings; private beginLifecycleRun; private fireLifecycleHooksForEvent; private runAgentEndHook; private endLifecycleRun; private runStopHook; private runUserPromptHook; /** * Insert a child into the chat container before any follow-up user messages. * If no follow-ups are pending, appends to end. */ private addChildBeforeFollowUps; private getUserInput; /** * Get the workspace, preferring controller-owned workspace over the direct option. */ private getResolvedWorkspace; private buildCommandContext; private buildEventContext; private handleSlashCommand; performLogin(providerId: string): Promise; showOnboarding(): Promise; private applyOnboardingResult; private shouldShowOnboarding; private applyQuietModePreference; private parseQuietPreviewLineAnswer; showQuietModePreferencePromptIfNeeded(): Promise; /** * Check npm for a newer version and prompt the user to update. * - If the user previously dismissed this version, show a passive note instead. * - If the fetch fails or we're already up-to-date, silently return. * @param passive When true, only show an info message (used for periodic rechecks). */ private checkForUpdate; /** * Show a Y/N prompt offering to auto-update (inline in the chat flow). */ private showUpdatePrompt; } //# sourceMappingURL=mastra-tui.d.ts.map