import { type Json, type ToolOutcome, type UIPayload } from "../../../core/index.js"; import type { TreeQuery } from "../../../core/apps/index.js"; export interface BridgeContentBlock { type: string; text?: string; [key: string]: unknown; } export interface BridgeCallResult { content: BridgeContentBlock[]; structuredContent?: unknown; isError?: boolean; } export type ServerToolCaller = (request: { name: string; arguments: { appId: string; ref: string; args: Json; }; }) => Promise; export type RenderPayload = (id: string, payload: UIPayload, data?: Record, queryErrors?: string[]) => void; export type RenderNotice = (label: string, message: string) => void; export declare const OPEN_IN_PRODUCT_KIND: "vendo/open-in-product@1"; /** MCP-only link-out envelope for rung-4 apps. It deliberately lives outside * core's frozen UIPayload union: full HTTP rendering is deferred, and the shim * only needs enough trusted metadata to render a safe open-in-product card. */ export interface OpenInProductPayload { kind: typeof OPEN_IN_PRODUCT_KIND; url: string; productName: string; appName?: string; } export declare function isOpenInProductPayload(value: unknown): value is OpenInProductPayload; export declare function callApp(callServerTool: ServerToolCaller, id: string, ref: string, args: Json): Promise; export declare function setQueryData(data: Record, query: TreeQuery, output: Json): Record; interface ResolveQueriesOptions { call: (id: string, ref: string, args: Json) => Promise; currentVersion: () => number; renderPayload: RenderPayload; } export declare function resolveQueries(id: string, payload: UIPayload, version: number, options: ResolveQueriesOptions): Promise; export interface ShimRuntime { callApp(id: string, ref: string, args: Json): Promise; onToolInput(args: unknown): void; onToolResult(result: { structuredContent?: unknown; }): void; } export declare function createShimRuntime(options: { callServerTool: ServerToolCaller; renderPayload: RenderPayload; renderOpenInProduct: (open: OpenInProductPayload) => void; renderNotice: RenderNotice; }): ShimRuntime; export {};