/** * @name ui/ui-resources * @description MCP Apps UI resource registry and tool-result embedding helpers. * * Implements the MCP Apps extension (November 2025, spec 2026-07-28) for the * SAP MCP server. Each `ui://` resource is a self-contained HTML document * rendered by MCP clients inside a sandboxed iframe. * * @module ui/ui-resources */ export interface UiResourceDescriptor { uri: string; name: string; mimeType: 'text/html'; description: string; } export type UiCardContext = { kind: 'balance'; sol: number; usdc?: number; walletAddress: string; network: string; } | { kind: 'readiness'; status: 'ready' | 'degraded' | 'not-ready'; signerPublicKey?: string; sol?: number; usdc?: number; profile: string; canPayX402: boolean; canExecuteWriteTools: boolean; issues: readonly string[]; walletAddress?: string; } | { kind: 'position'; market: string; side: 'long' | 'short'; size: number; entryPrice: number; markPrice: number; leverage: number; pnlUsd: number; pnlPct: number; liquidationPrice?: number; walletAddress?: string; } | { kind: 'pricing'; toolName: string; tier: string; priceUsd: number; recommendedMaxPriceUsd: number; isFree: boolean; walletAddress?: string; } | { kind: 'transfer'; type: 'sol' | 'spl'; amount: number; symbol: string; from: string; to: string; signature?: string; status: 'confirmed' | 'pending' | 'failed'; walletAddress?: string; } | { kind: 'magicblock'; action: 'swap' | 'deposit' | 'withdraw' | 'transfer'; tokenIn?: string; tokenOut?: string; amountIn?: number; amountOut?: number; status: 'success' | 'pending' | 'failed'; visibility?: 'public' | 'private'; walletAddress?: string; } | { kind: 'metaplex'; action: 'mint' | 'deploy' | 'update' | 'verify'; collectionName?: string; nftName?: string; mintAddress?: string; status: 'success' | 'pending' | 'failed'; walletAddress?: string; } | { kind: 'jupiter'; tokenIn: string; tokenOut: string; amountIn: number; amountOut: number; priceImpactPct: number; route: string[]; status: 'success' | 'pending' | 'failed'; walletAddress?: string; } | { kind: 'agent'; agentName: string; agentId?: string; capabilities: string[]; protocols: string[]; isActive: boolean; registeredAt?: string; walletAddress?: string; }; export declare const UI_RESOURCES: readonly UiResourceDescriptor[]; export declare function renderUiCard(ctx: UiCardContext): string; export declare function createEmbeddedUiResource(uri: string, html: string): { type: 'resource'; resource: { uri: string; mimeType: 'text/html'; text: string; }; }; export declare function resolveUiResourceUri(kind: UiCardContext['kind']): string; export declare function buildUiCardResource(ctx: UiCardContext): { type: "resource"; resource: { uri: string; mimeType: "text/html"; text: string; }; }; //# sourceMappingURL=ui-resources.d.ts.map