/** * Three distinct situations, never collapsed: * - `configured` / `missing` are authoritative answers from the status routes. * - `unknown` (first check in flight) and `unavailable` (the check failed, a * retry is scheduled) both mean *we do not know*. Neither is evidence that * no provider is configured, so neither may gate the composer. */ export type AgentEngineConfiguredState = "unknown" | "configured" | "missing" | "unavailable"; export interface UseAgentEngineConfiguredResult { /** True once we know nothing can run the agent (no key / Builder / BYOK). */ missing: boolean; state: AgentEngineConfiguredState; } export interface FetchAgentEngineConfiguredStateOptions { /** * Legacy hint from explicit missing-key stream events. Kept for API * compatibility, but missing state still requires authoritative status * responses so transient endpoint failures do not clobber connected state. */ missingFallback?: boolean; timeoutMs?: number; } export interface UseAgentEngineConfiguredOptions { tabId?: string | null; threadId?: string | null; } export declare function fetchAgentEngineConfiguredState(enabled?: boolean, options?: FetchAgentEngineConfiguredStateOptions): Promise; /** * Shared "can the agent run?" gate — the single source of truth for the sidebar * composer and app prompt boxes. Checks the env-key / Builder / BYOK status * endpoints on mount, re-checks on `agent-engine:configured-changed`, and folds * in the adapter's `agent-chat:missing-api-key` signal. Pass `enabled = false` * to short-circuit to configured. A check that cannot reach an authoritative * answer retries on a backoff until it does, so the gate can never latch. */ export declare function useAgentEngineConfigured(enabled?: boolean, options?: UseAgentEngineConfiguredOptions): UseAgentEngineConfiguredResult; //# sourceMappingURL=use-agent-engine-configured.d.ts.map