import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { z } from 'zod'; import { CplaceApiClient } from '../api.js'; export declare const WIDGET_SIMULATION_TOOL_DEFINITIONS: { readonly cplace_simulate_widget_script: { readonly description: "Execute a widget script under the production widget engine context for pre-embed verification.\n\nThis tool mirrors the engine row used by the real widget runtime\n(`evaluateShowAttributeScript` in cplace platform). The bindings, allowed type\nclasses, and read-only posture come from the platform source row — see\n`script-context-cards/widget.md` and `best-practices/low-code/script-contexts.md`.\n\n**Mode**: Read-only — widgets cannot modify data\n**Timeout**: 30 seconds maximum execution time\n\n**Injected bindings** (in addition to the baseline cplace API):\n- `embeddingPage` — WrappedPage hosting the layout this widget renders into\n- `targetEntity` — WrappedPage of the entity the widget is rendered for\n\n**No `pages` binding.** The widget runtime does not inject a pages iterable.\nIf your script needs an iterable of pages, construct one explicitly:\n\n new Search()\n .setEmbeddingEntity(embeddingPage)\n .add(Filters.embeddingSpace())\n .add(Filters.type('cf.myapp.task'))\n .findAllPages()\n .forEach(p => /* ... */)\n\n**Allowed type classes**: `Search`, `Filters` (lowcode wrapper classes).\n\n**Return Value Restrictions**: Same as cplace_execute_script (primitives and nested arrays/objects up to 3 levels; use JSON.stringify for deeper data).\n\n**When to use**: Before embedding any widget script (scriptingHighcharts, scriptingLineChart,\nlowCodeText, lowCodeButton row variants, dynamicCodeBlockWidget). For other contexts (page\nactions, change listeners, validators, jobs, wizards, button widgets) use the matching\n`cplace_simulate_*` tool — never `cplace_execute_script_write` for context-specific scripts."; readonly inputSchema: { readonly script: z.ZodString; readonly embeddingPageUID: z.ZodString; readonly targetEntityUID: z.ZodString; }; readonly annotations: { readonly title: "Simulate Widget Script"; }; }; }; export declare function registerWidgetSimulationTools(server: McpServer, client: CplaceApiClient): void; //# sourceMappingURL=widget-simulation.d.ts.map