import { RateLimitDetector } from '../../rateLimit'; import type { ProviderId } from '../../providers'; /** True while a grok turn is running for the given workspace root. */ export declare function isGrokTuiBusy(root: string): boolean; /** Epoch-ms of the most recent streamed pane activity, or 0 if none. */ export declare function getGrokTuiLastActivity(root: string): number; /** Force-clear the busy flag for a root whose turn appears hung. */ export declare function forceIdleGrokTui(root: string): void; /** True if tmux is installed and runnable. Cached after first probe. */ export declare function tmuxAvailable(): boolean; interface GrokRunOptions { model?: string; showOutput?: () => void; /** grok-tui: resume/continue a session so context accumulates across tasks. */ persist?: boolean; sessionId?: string; providerId?: ProviderId; } export declare function sendGrokPrompt(root: string, promptFilePath: string, stdoutFile: string, exitFile: string, log: (msg: string) => void, opts?: GrokRunOptions): void; /** grok-cli: stateless — a fresh HEADLESS grok process every task. */ export declare function sendGrokCliPrompt(root: string, promptFilePath: string, stdoutFile: string, exitFile: string, log: (msg: string) => void, model?: string, showOutput?: () => void): void; /** * grok-tui: persistent — run the turn in the per-workspace tmux session so * grok's in-process context accumulates across tasks. Falls back to the old * headless spawn (with --resume) when tmux is unavailable so nothing regresses. */ export declare function sendGrokTuiPrompt(root: string, promptFilePath: string, resolvedSessionId: string | undefined, stdoutFile: string, exitFile: string, log: (msg: string) => void, model?: string, showOutput?: () => void): void; export declare function steerGrokTui(root: string, text: string, log: (msg: string) => void): Promise; /** * Called by taskLoop reset interval / provider close. Kills any live grok for * this root — the tmux session AND any headless child — while PRESERVING the * persisted session id so a later task relaunches with --resume (context intact). */ export declare function closeGrokTuiSession(root: string, _log: (msg: string) => void): void; /** Kill all live grok sessions — called on SDK/extension shutdown. */ export declare function closeAllGrokTuiSessions(): void; export declare function detectGrokTuiRateLimit(stdoutContent: string): ReturnType; export {};