import { T as ToolHost } from '../tool-host-BqJRPr_T.js'; import { B as Bridge } from '../types-D_TzdBsK.js'; import { DocAdapter } from './doc.js'; import { DocNode, StagePolicy, TreeOp } from '@particle-academy/fancy-doc-commons'; import '../types-ITRQFAir.js'; /** * Reserved node type for a literal string child. Must match fancy-screens' * `TEXT_NODE_TYPE`; duplicated rather than imported to keep this bridge free of * a fancy-screens dependency. */ declare const SCREEN_TEXT_NODE_TYPE = "#text"; /** A screen document node — a `DocNode` plus the minted-id flag. */ interface ScreenDocNode extends DocNode { /** * True when fancy-screens minted this id because the author supplied none. * A synthetic id is derived from position, so it is not a durable handle. */ synthetic?: boolean; } type ScreenDocOp = TreeOp; interface ScreenDocBridgeOptions { adapter: DocAdapter; /** * Tool-name prefix. Default `"screen"` → `screen_add`, `screen_set_text`, … * * Tool names are global, so a host wiring more than one doc-driven screen at * once must give each a distinct prefix (`"screen_checkout"`). */ surface?: string; agent?: { id: string; name?: string; color?: string; }; /** Auto-apply vs. confirm per op (trust-but-verify). Default: auto. */ stagePolicy?: StagePolicy; onPending?: (staged: { id: string; op: ScreenDocOp; label: string; }) => void; } /** Register the screen-content bridge (prefix `screen_`) over a screen's `DocTree`. */ declare function registerScreenDocBridge(host: ToolHost, options: ScreenDocBridgeOptions): Bridge; export { DocAdapter, SCREEN_TEXT_NODE_TYPE, type ScreenDocBridgeOptions, type ScreenDocNode, type ScreenDocOp, registerScreenDocBridge };