/** * Read `[value, setter]` for a declared `contextSpec` slot. The * iframe runtime owns the underlying `useState` and seeds each * Provider; the boilerplate auto-generates one `useGguiContext` * call per declared slot at the top of the component body, so the LLM * has `slotName` + `setSlotName` in scope without writing any * `useState` or `` itself. * * Direction: client → agent (one-way). Every value change is mirrored * to the host LLM's context (debounced) by the runtime. * * **Throws synchronously** when the slot isn't registered. This is a * fail-loud signal: the boilerplate destructure drifted from the * contract, OR `contextSpec` doesn't declare the slot, OR the runtime * hasn't installed the Context registry yet. Authors should see the * error message and fix one of those three sites — silent fallback * would mask an architectural bug. * * @example * ```tsx * // boilerplate auto-prepends: * const [currentStep, setCurrentStep] = * useGguiContext('currentStep'); * * // LLM body: * * ``` * * @public */ export declare function useGguiContext(slotName: string): readonly [T, (next: T | ((prev: T) => T)) => void]; //# sourceMappingURL=useGguiContext.d.ts.map