import { T as ToolHost } from '../tool-host-BBSaU7IJ.cjs'; import { B as Bridge } from '../types-D_H2f-wF.cjs'; import '../types-ITRQFAir.cjs'; /** * Adapter the host wires to a fancy-code CodeEditor (typically via the * useCodeEditor hook's context value). */ type CodeBridgeAdapter = { /** Stable id for this editor instance. */ id: string; /** Display label. */ title?: string; /** Optional fancy-screens screen id. */ screenId?: string; /** Read the current document text. */ getValue: () => string; /** Replace the document. */ setValue: (value: string) => void; /** Read the current selection text (empty string if none). */ getSelection?: () => string; /** Replace the current selection with text. */ replaceSelection?: (text: string) => void; /** Programmatic focus. */ focus?: () => void; /** Read / set the active language. */ getLanguage?: () => string; /** Set the active language. */ setLanguage?: (lang: string) => void; }; type CodeBridgeOptions = { adapter: CodeBridgeAdapter; agent?: { id: string; name?: string; color?: string; }; }; /** * registerCodeBridge — schema-aware MCP access to a single CodeEditor. * Tools cover read, full replace, append, selection replace, language * switch, and a streaming append helper for "type characters into the * editor over time" UX. */ declare function registerCodeBridge(host: ToolHost, options: CodeBridgeOptions): Bridge; export { type CodeBridgeAdapter, type CodeBridgeOptions, registerCodeBridge };