UNPKG

mcp-use

Version:

Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.

27 lines 1.39 kB
/** * Production mode widget mounting * * This module handles serving pre-built widgets from the dist/resources/widgets/ directory. * Widgets are built using the 'mcp-use build' command and served as static files in production. */ import type { Hono as HonoType } from "hono"; import type { ServerConfig, MountWidgetsOptions, RegisterWidgetCallback } from "./widget-types.js"; /** * Configuration for production widget mounting */ export type MountWidgetsProductionOptions = MountWidgetsOptions; /** * Mount pre-built widgets from dist/resources/widgets/ directory in production mode * * Serves static widget bundles that were built using the build command. * Reads the manifest file to discover available widgets and their metadata, * then registers each widget as both a tool and resource. * * @param app - Hono app instance (not used directly, kept for consistency) * @param serverConfig - Server configuration (baseUrl, CSP URLs, buildId) * @param registerWidget - Callback to register each discovered widget * @param options - Optional configuration (baseRoute) * @returns Promise that resolves when all widgets are mounted */ export declare function mountWidgetsProduction(app: HonoType, serverConfig: ServerConfig, registerWidget: RegisterWidgetCallback, options?: MountWidgetsProductionOptions): Promise<void>; //# sourceMappingURL=mount-widgets-production.d.ts.map