import { grackle } from "@grackle-ai/common"; import type { ToolDefinition, ToolResult } from "../tool-registry.js"; /** * Validate render-time `props` against a component's stored JSON-Schema * `propsSchema` by converting it to a zod schema and parsing. Returns an error * message on mismatch, or `undefined` when valid (or when there is no schema). */ export declare function propsValidationError(propsSchema: string, props: Record): string | undefined; /** * Build the render result for a stored component: the SAME `WidgetRenderDescriptor` * the broker captures, reused by both `component_render` and the dynamic * `render_` dispatcher ("many tools, one resource"). Props are NOT validated * here — callers validate against `propsSchema` (via {@link propsValidationError}) first. */ export declare function buildComponentRenderResult(c: grackle.Component, props: Record, dependencies?: readonly grackle.Component[]): ToolResult; /** * MCP Apps component registry + render tools. * * - `component_register` / `component_update` / `component_list` — the * agent-authored registry (#1239 widgets → #1269 components): persist a reusable * component (`grackle-react` JSX by default, or `mcp-app-html`) in the workspace. * - `component_render` — render a registered component by id/name with props; the * broker captures the result `_meta` descriptor and emits the widget event. * - `component_show` — render a one-off React/JSX component (render-by-source, #1268). * - `widget_show` — render a one-off raw-HTML body. `show_hello_widget` — demo. * * `show_hello_widget` carries a static `uiResourceUri` (gated to ui-capable hosts * in `mcp-server.ts`); the registry tools are plain tools (always listed to scoped * agents) and produce widgets dynamically via `_meta`. */ export declare const componentTools: ToolDefinition[]; //# sourceMappingURL=component.d.ts.map