/** * The INNER half of an embedded Vendo surface (blueprint §12.3) — every * surface that renders inside a host-owned iframe owes the host the same two * behaviours, so they share this module rather than each keeping a copy of the * protocol. * * Both jobs are RECEIVING or REPORTING, never negotiating: * * - `applyThemeVars` receives the host's brand tokens. Only `--vendo-*` custom * properties may cross into the surface (06 §5). * - `startFrameProtocol` reports the surface's natural content height to the * embedding frame, then announces `booted`. * * THE HOST'S BOUNDS WIN (founder ruling 2026-08-04). The host sized the slot * when it embedded Vendo; that is a constraint the app lives inside, never * overrides. This module only ever REPORTS a natural height — it holds no code * that sets or negotiates its own size against the host, and must never grow * any. An app taller than the host allows scrolls inside its own frame; it never * pushes the host's layout. The clamp is the host's, and so is the min/max the * host configured. */ import type { Json, ToolOutcome } from "../core/index.js"; /** Post one message to the embedding host. Every message is stamped `vendo: true` * — that stamp is how the host tells a Vendo surface's messages from any other * frame's, so it is part of the protocol and not an implementation detail. */ export declare function postToHost(message: Record): void; /** Host brand tokens: only --vendo-* custom properties may cross into an embedded surface, so generated code styled with the theme variables matches the host (06 §5). */ export declare function applyThemeVars(vars: unknown): void; /** * THE ONE DOOR to host data (FINAL SPEC v1). A sealed surface has an opaque * origin and no network at all, so this is the only thing it can reach — and * what it reaches is the host's guarded tool door, run with the VIEWER's own * permissions. Nothing here decides what is allowed; the guard does, and a call * the viewer may not make comes back as a refused outcome like any other. */ export declare function callHost(ref: string, args?: Json): Promise; /** * Start the frame protocol on `mount`: normalize viewport-relative block * constraints, report the content height on every content change, and announce * `booted` once the observers are live. * * Messages out: `{ vendo: true, kind: "resize", height }`, * `{ vendo: true, kind: "booted" }`, and one `{ kind: "call" }` per * {@link callHost}. In: `theme` and `result`. */ export declare function startFrameProtocol(mount: HTMLElement, post?: typeof postToHost): void;