export type AgentEngineConfiguredState = "unknown" | "configured" | "missing" | "unavailable"; export interface AgentEngineReadinessSource { /** The status route belonging to the chat transport being guarded. */ statusUrl?: string; fetch?: typeof fetch; headers?: HeadersInit | (() => HeadersInit | Promise); credentials?: RequestCredentials; } export interface FetchAgentEngineConfiguredStateOptions { /** Kept for API compatibility; readiness always comes from chatEligible. */ missingFallback?: boolean; /** Skips the recent-answer TTL; still joins any probe already in flight. */ fresh?: boolean; timeoutMs?: number; source?: AgentEngineReadinessSource; } export declare const AGENT_CHAT_AI_SETUP_REQUIRED_CODE: "AGENT_CHAT_AI_SETUP_REQUIRED"; export declare const LOCAL_RUNTIME_ENGINE_IDS: readonly ["codex-cli", "claude-cli", "pi-cli", "opencode-cli"]; export declare class AgentChatAiSetupRequiredError extends Error { readonly state: "missing" | "unavailable"; readonly code: "AGENT_CHAT_AI_SETUP_REQUIRED"; constructor(state: "missing" | "unavailable"); } export declare function agentEngineStatusUrlForChatApi(apiUrl?: string): string; export declare function getAgentEngineReadiness(source?: AgentEngineReadinessSource): AgentEngineConfiguredState; export declare function subscribeAgentEngineReadiness(listener: () => void, options?: { enabled?: boolean; tabId?: string | null; threadId?: string | null; source?: AgentEngineReadinessSource; }): () => void; /** A key save/connect/disconnect can make the cached authoritative answer stale. */ export declare function invalidateAgentEngineReadiness(source?: AgentEngineReadinessSource): void; export declare function ensureAgentEngineReadiness(options?: { fresh?: boolean; timeoutMs?: number; source?: AgentEngineReadinessSource; }): Promise; export declare function fetchAgentEngineConfiguredState(enabled?: boolean, options?: FetchAgentEngineConfiguredStateOptions): Promise; export declare function isLocalRuntimeEngine(engine?: string): boolean; export declare function requireAgentEngineConfiguredForDispatch(options?: { engine?: string; fresh?: boolean; timeoutMs?: number; source?: AgentEngineReadinessSource; }): Promise; /** @internal Test isolation for the shared module store. */ export declare function resetAgentEngineReadinessForTests(): void; /** @internal Test assertion for bounded, idle readiness-store retention. */ export declare function getAgentEngineReadinessStoreCountForTests(): number; export declare function isAgentChatAiSetupRequiredError(error: unknown): error is AgentChatAiSetupRequiredError;