import type { ChatModelAdapter } from "@assistant-ui/react"; import type { ReasoningEffort } from "../shared/reasoning-effort.js"; import { type ContentPart } from "./sse-event-processor.js"; import type { ChatThreadScope } from "./use-chat-threads.js"; export type AgentChatSurfaceKind = /** * Chat rendered by the app itself, including the normal AgentSidebar. This * surface must not receive code-editing dev tools because source edits can * reload the same React tree that is hosting the chat. */ "app" /** Chat rendered by the outer local dev frame, outside the app iframe. */ | "dev-frame" /** Chat hosted by Desktop for a local app with explicit code access. */ | "desktop"; export declare const BACKGROUND_FOLLOW_IDLE_TIMEOUT_MS = 150000; export declare const MAX_FOLLOWED_BACKGROUND_RUNS = 6; export declare const MAX_BACKGROUND_FOLLOW_WALL_TIME_MS: number; /** * Server truth for "does this run still look alive?", used to keep the client * from aborting a run the server believes is healthy — the destructive half of * the old client watchdog. Fails SAFE (true) when the lookup itself fails: an * unreachable server is not evidence that the run is dead. A local content * snapshot with an unresolved tool call is also treated as alive, matching the * server's own in-flight suspension. */ export declare function activeRunLooksAlive(args: { apiUrl: string; threadId: string | undefined; runId: string; content?: ContentPart[]; }): Promise; /** * The composer's exec mode is sent as explicit request metadata. The server * owns the plan-mode prompt and read-only tool filtering so the chat history * stays clean and Plan mode is enforced outside the model's goodwill. */ /** * Creates a ChatModelAdapter that connects to the agent-native * `/_agent-native/agent-chat` SSE endpoint. Supports reconnection via run-manager. */ export interface CreateAgentChatAdapterOptions { apiUrl?: string; tabId?: string; threadId?: string; modelRef?: { current: string | undefined; }; engineRef?: { current: string | undefined; }; effortRef?: { current: ReasoningEffort | undefined; }; execModeRef?: { current: "build" | "plan" | undefined; }; browserTabId?: string; scopeRef?: { current: ChatThreadScope | null | undefined; }; surface?: AgentChatSurfaceKind; } export declare function createAgentChatAdapter(options?: CreateAgentChatAdapterOptions): ChatModelAdapter; //# sourceMappingURL=agent-chat-adapter.d.ts.map