mcp-use 1.9.0-canary.3 → 1.9.1-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/chunk-2EYAMIT3.js +76 -0
- package/dist/chunk-362PI25Z.js +110 -0
- package/dist/chunk-5URNFWCQ.js +25 -0
- package/dist/chunk-KHTTBIRP.js +280 -0
- package/dist/context-storage-TXQ4DVSS.js +11 -0
- package/dist/conversion-5MA4VY3B.js +7 -0
- package/dist/conversion-OTRZZBUU.js +7 -0
- package/dist/src/server/endpoints/index.d.ts +7 -0
- package/dist/src/server/endpoints/index.d.ts.map +1 -0
- package/dist/src/server/endpoints/mount-mcp.d.ts +21 -0
- package/dist/src/server/endpoints/mount-mcp.d.ts.map +1 -0
- package/dist/src/server/index.cjs +3738 -3940
- package/dist/src/server/index.d.ts +4 -3
- package/dist/src/server/index.d.ts.map +1 -1
- package/dist/src/server/index.js +3223 -3039
- package/dist/src/server/inspector/index.d.ts +5 -0
- package/dist/src/server/inspector/index.d.ts.map +1 -0
- package/dist/src/server/inspector/mount.d.ts +33 -0
- package/dist/src/server/inspector/mount.d.ts.map +1 -0
- package/dist/src/server/logging.d.ts.map +1 -1
- package/dist/src/server/mcp-server.d.ts +71 -780
- package/dist/src/server/mcp-server.d.ts.map +1 -1
- package/dist/src/server/notifications/index.d.ts +7 -0
- package/dist/src/server/notifications/index.d.ts.map +1 -0
- package/dist/src/server/notifications/notification-registration.d.ts +82 -0
- package/dist/src/server/notifications/notification-registration.d.ts.map +1 -0
- package/dist/src/server/oauth/index.d.ts +1 -0
- package/dist/src/server/oauth/index.d.ts.map +1 -1
- package/dist/src/server/oauth/setup.d.ts +28 -0
- package/dist/src/server/oauth/setup.d.ts.map +1 -0
- package/dist/src/server/prompts/conversion.d.ts +22 -0
- package/dist/src/server/prompts/conversion.d.ts.map +1 -0
- package/dist/src/server/prompts/index.d.ts +60 -0
- package/dist/src/server/prompts/index.d.ts.map +1 -0
- package/dist/src/server/resources/conversion.d.ts +20 -0
- package/dist/src/server/resources/conversion.d.ts.map +1 -0
- package/dist/src/server/resources/index.d.ts +116 -0
- package/dist/src/server/resources/index.d.ts.map +1 -0
- package/dist/src/server/roots/index.d.ts +7 -0
- package/dist/src/server/roots/index.d.ts.map +1 -0
- package/dist/src/server/roots/roots-registration.d.ts +56 -0
- package/dist/src/server/roots/roots-registration.d.ts.map +1 -0
- package/dist/src/server/sessions/index.d.ts +6 -0
- package/dist/src/server/sessions/index.d.ts.map +1 -0
- package/dist/src/server/sessions/notifications.d.ts +25 -0
- package/dist/src/server/sessions/notifications.d.ts.map +1 -0
- package/dist/src/server/sessions/session-manager.d.ts +41 -0
- package/dist/src/server/sessions/session-manager.d.ts.map +1 -0
- package/dist/src/server/tools/index.d.ts +10 -0
- package/dist/src/server/tools/index.d.ts.map +1 -0
- package/dist/src/server/tools/schema-helpers.d.ts +54 -0
- package/dist/src/server/tools/schema-helpers.d.ts.map +1 -0
- package/dist/src/server/tools/tool-execution-helpers.d.ts +97 -0
- package/dist/src/server/tools/tool-execution-helpers.d.ts.map +1 -0
- package/dist/src/server/tools/tool-registration.d.ts +85 -0
- package/dist/src/server/tools/tool-registration.d.ts.map +1 -0
- package/dist/src/server/types/common.d.ts +24 -0
- package/dist/src/server/types/common.d.ts.map +1 -1
- package/dist/src/server/types/index.d.ts +5 -4
- package/dist/src/server/types/index.d.ts.map +1 -1
- package/dist/src/server/types/prompt.d.ts +61 -6
- package/dist/src/server/types/prompt.d.ts.map +1 -1
- package/dist/src/server/types/resource.d.ts +83 -8
- package/dist/src/server/types/resource.d.ts.map +1 -1
- package/dist/src/server/types/tool-context.d.ts +236 -0
- package/dist/src/server/types/tool-context.d.ts.map +1 -0
- package/dist/src/server/types/tool.d.ts +62 -5
- package/dist/src/server/types/tool.d.ts.map +1 -1
- package/dist/src/server/utils/hono-proxy.d.ts +21 -0
- package/dist/src/server/utils/hono-proxy.d.ts.map +1 -0
- package/dist/src/server/utils/index.d.ts +3 -0
- package/dist/src/server/utils/index.d.ts.map +1 -1
- package/dist/src/server/utils/jsonrpc-helpers.d.ts +94 -0
- package/dist/src/server/utils/jsonrpc-helpers.d.ts.map +1 -0
- package/dist/src/server/utils/response-helpers.d.ts +115 -3
- package/dist/src/server/utils/response-helpers.d.ts.map +1 -1
- package/dist/src/server/utils/server-helpers.d.ts +78 -0
- package/dist/src/server/utils/server-helpers.d.ts.map +1 -0
- package/dist/src/server/utils/server-lifecycle.d.ts +52 -0
- package/dist/src/server/utils/server-lifecycle.d.ts.map +1 -0
- package/dist/src/server/utils/session-helpers.d.ts +55 -0
- package/dist/src/server/utils/session-helpers.d.ts.map +1 -0
- package/dist/src/server/widgets/index.d.ts +30 -0
- package/dist/src/server/widgets/index.d.ts.map +1 -0
- package/dist/src/server/widgets/mcp-ui-adapter.d.ts.map +1 -0
- package/dist/src/server/widgets/mount-widgets-dev.d.ts +28 -0
- package/dist/src/server/widgets/mount-widgets-dev.d.ts.map +1 -0
- package/dist/src/server/widgets/mount-widgets-production.d.ts +27 -0
- package/dist/src/server/widgets/mount-widgets-production.d.ts.map +1 -0
- package/dist/src/server/widgets/setup-widget-routes.d.ts +23 -0
- package/dist/src/server/widgets/setup-widget-routes.d.ts.map +1 -0
- package/dist/src/server/widgets/ui-resource-registration.d.ts +75 -0
- package/dist/src/server/widgets/ui-resource-registration.d.ts.map +1 -0
- package/dist/src/server/widgets/widget-helpers.d.ts +277 -0
- package/dist/src/server/widgets/widget-helpers.d.ts.map +1 -0
- package/dist/src/server/widgets/widget-types.d.ts +49 -0
- package/dist/src/server/widgets/widget-types.d.ts.map +1 -0
- package/dist/tool-execution-helpers-IVUDHXMK.js +23 -0
- package/package.json +6 -5
- package/dist/chunk-F4UHAA5L.js +0 -854
- package/dist/oauth-U4NNKN4B.js +0 -30
- package/dist/src/server/adapters/mcp-ui-adapter.d.ts.map +0 -1
- /package/dist/src/server/{adapters → widgets}/mcp-ui-adapter.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-helpers.d.ts","sourceRoot":"","sources":["../../../../src/server/utils/response-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB,CAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC3D,SAAQ,IAAI,CAAC,cAAc,EAAE,mBAAmB,CAAC;IACjD,iBAAiB,CAAC,EAAE,CAAC,CAAC;CACvB;AAED
|
|
1
|
+
{"version":3,"file":"response-helpers.d.ts","sourceRoot":"","sources":["../../../../src/server/utils/response-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB,CAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC3D,SAAQ,IAAI,CAAC,cAAc,EAAE,mBAAmB,CAAC;IACjD,iBAAiB,CAAC,EAAE,CAAC,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAYpD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAAoB,GAC7B,cAAc,CAchB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,GACZ,cAAc,CAahB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAUrD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClD,IAAI,EAAE,CAAC,GACN,mBAAmB,CAAC,CAAC,CAAC,CAexB;AAED,wBAAgB,KAAK,CAAC,CAAC,SAAS,GAAG,EAAE,EACnC,IAAI,EAAE,CAAC,GACN,mBAAmB,CAAC;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAUlC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAYpD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAYxD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAYnD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAYnD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAY1D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc,CAa3E;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uEAAuE;IACvE,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CA+CnE;AAED,wBAAgB,GAAG,CAAC,GAAG,OAAO,EAAE,cAAc,EAAE,GAAG,cAAc,CA4BhE"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server Helper Utilities
|
|
3
|
+
*
|
|
4
|
+
* General utility functions for the MCP server.
|
|
5
|
+
*/
|
|
6
|
+
import { type Hono as HonoType } from "hono";
|
|
7
|
+
import { cors } from "hono/cors";
|
|
8
|
+
/**
|
|
9
|
+
* Get default CORS configuration for MCP server
|
|
10
|
+
*
|
|
11
|
+
* @returns CORS options object for Hono cors middleware
|
|
12
|
+
*/
|
|
13
|
+
export declare function getDefaultCorsOptions(): Parameters<typeof cors>[0];
|
|
14
|
+
/**
|
|
15
|
+
* Create and configure a new Hono app instance with default middleware
|
|
16
|
+
*
|
|
17
|
+
* Sets up CORS and request logging middleware for the MCP server.
|
|
18
|
+
*
|
|
19
|
+
* @param requestLogger - Request logging middleware function
|
|
20
|
+
* @returns Configured Hono app instance
|
|
21
|
+
*/
|
|
22
|
+
export declare function createHonoApp(requestLogger: any): HonoType;
|
|
23
|
+
/**
|
|
24
|
+
* Get the server base URL with fallback to host:port if not configured
|
|
25
|
+
*
|
|
26
|
+
* @param serverBaseUrl - Explicitly configured base URL
|
|
27
|
+
* @param serverHost - Server hostname
|
|
28
|
+
* @param serverPort - Server port
|
|
29
|
+
* @returns The complete base URL for the server
|
|
30
|
+
*/
|
|
31
|
+
export declare function getServerBaseUrl(serverBaseUrl: string | undefined, serverHost: string, serverPort: number | undefined): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get additional CSP URLs from environment variable
|
|
34
|
+
* Supports comma-separated list or single URL
|
|
35
|
+
*
|
|
36
|
+
* @returns Array of URLs to add to CSP resource_domains
|
|
37
|
+
*/
|
|
38
|
+
export declare function getCSPUrls(): string[];
|
|
39
|
+
/**
|
|
40
|
+
* Wait for transport.handleRequest to complete and response to be written
|
|
41
|
+
*
|
|
42
|
+
* Wraps the transport.handleRequest call in a Promise that only resolves when
|
|
43
|
+
* expressRes.end() is called, ensuring all async operations complete before
|
|
44
|
+
* we attempt to read the response.
|
|
45
|
+
*
|
|
46
|
+
* @param transport - The transport instance
|
|
47
|
+
* @param expressReq - Express-like request object
|
|
48
|
+
* @param expressRes - Express-like response object
|
|
49
|
+
* @param body - Optional request body
|
|
50
|
+
* @returns Promise that resolves when the request is complete
|
|
51
|
+
*/
|
|
52
|
+
export declare function waitForRequestComplete(transport: any, expressReq: any, expressRes: any, body?: any): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Log registered tools, prompts, and resources to console
|
|
55
|
+
*
|
|
56
|
+
* @param registeredTools - Array of registered tool names
|
|
57
|
+
* @param registeredPrompts - Array of registered prompt names
|
|
58
|
+
* @param registeredResources - Array of registered resource names
|
|
59
|
+
*/
|
|
60
|
+
export declare function logRegisteredItems(registeredTools: string[], registeredPrompts: string[], registeredResources: string[]): void;
|
|
61
|
+
/**
|
|
62
|
+
* Parse parameter values from a URI based on a template
|
|
63
|
+
*
|
|
64
|
+
* Extracts parameter values from an actual URI by matching it against a URI template.
|
|
65
|
+
* The template contains placeholders like {param} which are extracted as key-value pairs.
|
|
66
|
+
*
|
|
67
|
+
* @param template - URI template with placeholders (e.g., "user://{userId}/posts/{postId}")
|
|
68
|
+
* @param uri - Actual URI to parse (e.g., "user://123/posts/456")
|
|
69
|
+
* @returns Object mapping parameter names to their values
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* const params = parseTemplateUri("user://{userId}/posts/{postId}", "user://123/posts/456")
|
|
74
|
+
* // Returns: { userId: "123", postId: "456" }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare function parseTemplateUri(template: string, uri: string): Record<string, string>;
|
|
78
|
+
//# sourceMappingURL=server-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-helpers.d.ts","sourceRoot":"","sources":["../../../../src/server/utils/server-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,KAAK,IAAI,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAgBlE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,GAAG,GAAG,QAAQ,CAU1D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,MAAM,CAYR;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAerC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,GAAG,EACd,UAAU,EAAE,GAAG,EACf,UAAU,EAAE,GAAG,EACf,IAAI,CAAC,EAAE,GAAG,GACT,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,MAAM,EAAE,EACzB,iBAAiB,EAAE,MAAM,EAAE,EAC3B,mBAAmB,EAAE,MAAM,EAAE,GAC5B,IAAI,CAqBN;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAwBxB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server Lifecycle Utilities
|
|
3
|
+
*
|
|
4
|
+
* Runtime-aware helpers for server startup, path rewriting, and CORS handling.
|
|
5
|
+
*/
|
|
6
|
+
import type { Hono as HonoType } from "hono";
|
|
7
|
+
export declare function isProductionMode(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Get Deno-specific CORS headers
|
|
10
|
+
*
|
|
11
|
+
* @returns CORS headers object for Deno responses
|
|
12
|
+
*/
|
|
13
|
+
export declare function getDenoCorsHeaders(): Record<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* Apply CORS headers to a response
|
|
16
|
+
*
|
|
17
|
+
* @param response - The response to add CORS headers to
|
|
18
|
+
* @returns New response with CORS headers applied
|
|
19
|
+
*/
|
|
20
|
+
export declare function applyDenoCorsHeaders(response: Response): Response;
|
|
21
|
+
/**
|
|
22
|
+
* Create a Supabase path rewriter function
|
|
23
|
+
*
|
|
24
|
+
* Supabase includes the function name in the path (e.g., /functions/v1/mcp-server/mcp or /mcp-server/mcp)
|
|
25
|
+
* This function strips the function name prefix to get the actual route path.
|
|
26
|
+
*
|
|
27
|
+
* @returns Function that rewrites Supabase paths to actual route paths
|
|
28
|
+
*/
|
|
29
|
+
export declare function createSupabasePathRewriter(): (pathname: string) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Rewrite request path for Supabase environment
|
|
32
|
+
*
|
|
33
|
+
* @param req - The original request
|
|
34
|
+
* @returns New request with rewritten path if needed
|
|
35
|
+
*/
|
|
36
|
+
export declare function rewriteSupabaseRequest(req: Request): Request;
|
|
37
|
+
/**
|
|
38
|
+
* Start the server based on runtime environment
|
|
39
|
+
*
|
|
40
|
+
* @param app - Hono application instance
|
|
41
|
+
* @param port - Port number to listen on
|
|
42
|
+
* @param host - Hostname to bind to
|
|
43
|
+
* @param options - Additional options for server startup
|
|
44
|
+
* @param options.onDenoRequest - Optional callback to transform requests in Deno (e.g., for path rewriting)
|
|
45
|
+
* @param options.onDenoResponse - Optional callback to transform responses in Deno (e.g., for CORS)
|
|
46
|
+
* @returns Promise that resolves when server is started
|
|
47
|
+
*/
|
|
48
|
+
export declare function startServer(app: HonoType, port: number, host: string, options?: {
|
|
49
|
+
onDenoRequest?: (req: Request) => Request | Promise<Request>;
|
|
50
|
+
onDenoResponse?: (res: Response) => Response | Promise<Response>;
|
|
51
|
+
}): Promise<void>;
|
|
52
|
+
//# sourceMappingURL=server-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/server/utils/server-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,gBAAgB,IAAI,OAAO,CAK1C;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM3D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAYjE;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,IAAI,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAkBzE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAkB5D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IACR,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7D,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CAClE,GACA,OAAO,CAAC,IAAI,CAAC,CAmDf"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Helper Utilities
|
|
3
|
+
*
|
|
4
|
+
* Common utilities for working with MCP sessions.
|
|
5
|
+
*/
|
|
6
|
+
import type { SessionData } from "../sessions/session-manager.js";
|
|
7
|
+
/**
|
|
8
|
+
* Get a session from the sessions map, or return null if not found
|
|
9
|
+
*
|
|
10
|
+
* This is a safe session lookup helper that ensures consistent handling
|
|
11
|
+
* of missing sessions across the codebase.
|
|
12
|
+
*
|
|
13
|
+
* @param sessions - Map of active sessions
|
|
14
|
+
* @param sessionId - The session ID to look up
|
|
15
|
+
* @returns The session data if found, null otherwise
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const session = getSessionOrNull(sessions, sessionId);
|
|
20
|
+
* if (!session) {
|
|
21
|
+
* return createSessionNotFoundError();
|
|
22
|
+
* }
|
|
23
|
+
* // Use session safely
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function getSessionOrNull(sessions: Map<string, SessionData>, sessionId: string): SessionData | null;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a session exists
|
|
29
|
+
*
|
|
30
|
+
* @param sessions - Map of active sessions
|
|
31
|
+
* @param sessionId - The session ID to check
|
|
32
|
+
* @returns true if the session exists, false otherwise
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* if (hasSession(sessions, sessionId)) {
|
|
37
|
+
* console.log('Session exists');
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function hasSession(sessions: Map<string, SessionData>, sessionId: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Get all active session IDs
|
|
44
|
+
*
|
|
45
|
+
* @param sessions - Map of active sessions
|
|
46
|
+
* @returns Array of session IDs
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const sessionIds = getAllSessionIds(sessions);
|
|
51
|
+
* console.log(`${sessionIds.length} active sessions`);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function getAllSessionIds(sessions: Map<string, SessionData>): string[];
|
|
55
|
+
//# sourceMappingURL=session-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-helpers.d.ts","sourceRoot":"","sources":["../../../../src/server/utils/session-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAClC,SAAS,EAAE,MAAM,GAChB,WAAW,GAAG,IAAI,CAEpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAClC,SAAS,EAAE,MAAM,GAChB,OAAO,CAET;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,MAAM,EAAE,CAE7E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Widget mounting and serving utilities
|
|
3
|
+
*
|
|
4
|
+
* This module provides functions for mounting and serving MCP widgets in both
|
|
5
|
+
* development and production modes.
|
|
6
|
+
*/
|
|
7
|
+
import type { McpServer } from "../mcp-server.js";
|
|
8
|
+
export { mountWidgetsDev, type MountWidgetsDevOptions, } from "./mount-widgets-dev.js";
|
|
9
|
+
export { mountWidgetsProduction, type MountWidgetsProductionOptions, } from "./mount-widgets-production.js";
|
|
10
|
+
export { setupWidgetRoutes } from "./setup-widget-routes.js";
|
|
11
|
+
export { createUIResourceFromDefinition, buildWidgetUrl, createExternalUrlResource, createRawHtmlResource, createRemoteDomResource, createAppsSdkResource, type UrlConfig, } from "./mcp-ui-adapter.js";
|
|
12
|
+
export { generateWidgetUri, convertPropsToInputs, applyDefaultProps, readBuildManifest, createWidgetUIResource, getContentType, processWidgetHtml, createWidgetRegistration, ensureWidgetMetadata, readWidgetHtml, registerWidgetFromTemplate, setupPublicRoutes, type WidgetServerConfig, } from "./widget-helpers.js";
|
|
13
|
+
export { uiResourceRegistration, type UIResourceServerContext, } from "./ui-resource-registration.js";
|
|
14
|
+
export { type ServerConfig, type MountWidgetsOptions, type RegisterWidgetCallback, } from "./widget-types.js";
|
|
15
|
+
/**
|
|
16
|
+
* Mount widget files - automatically chooses between dev and production mode
|
|
17
|
+
*
|
|
18
|
+
* In development mode: creates Vite dev servers with HMR support
|
|
19
|
+
* In production mode: serves pre-built static widgets
|
|
20
|
+
*
|
|
21
|
+
* @param options - Configuration options
|
|
22
|
+
* @param options.baseRoute - Base route for widgets (defaults to '/mcp-use/widgets')
|
|
23
|
+
* @param options.resourcesDir - Directory containing widget files (defaults to 'resources')
|
|
24
|
+
* @returns Promise that resolves when all widgets are mounted
|
|
25
|
+
*/
|
|
26
|
+
export declare function mountWidgets(server: McpServer, options?: {
|
|
27
|
+
baseRoute?: string;
|
|
28
|
+
resourcesDir?: string;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAOlD,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EACL,8BAA8B,EAC9B,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,KAAK,SAAS,GACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACd,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,kBAAkB,GACxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,GAC5B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GACA,OAAO,CAAC,IAAI,CAAC,CAyBf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-ui-adapter.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/mcp-ui-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,UAAU,EACV,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,EACtC,MAAM,EAAE,SAAS,GAChB,MAAM,CAYR;AAED;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAC7C,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,QAAQ,GAAE,UAAmB,EAC7B,QAAQ,CAAC,EAAE,cAAc,EACzB,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,iBAAiB,CAAC,CAQ5B;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,UAAmB,EAC7B,QAAQ,CAAC,EAAE,cAAc,EACzB,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,iBAAiB,CAAC,CAQ5B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,OAAO,GAAG,eAAyB,EAC9C,QAAQ,GAAE,UAAmB,EAC7B,QAAQ,CAAC,EAAE,cAAc,EACzB,QAAQ,CAAC,EAAE,eAAe,GACzB,OAAO,CAAC,iBAAiB,CAAC,CAQ5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,eAAe,GACzB,iBAAiB,CAkBnB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,8BAA8B,CAClD,UAAU,EAAE,oBAAoB,EAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,iBAAiB,CAAC,CAyD5B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Development mode widget mounting with Vite HMR
|
|
3
|
+
*
|
|
4
|
+
* This module handles serving widgets from the resources/ directory in development mode
|
|
5
|
+
* with hot module replacement (HMR) support. It uses Vite to transform and serve
|
|
6
|
+
* React/TSX widget files with live reloading during development.
|
|
7
|
+
*/
|
|
8
|
+
import type { Hono as HonoType } from "hono";
|
|
9
|
+
import type { ServerConfig, MountWidgetsOptions, RegisterWidgetCallback } from "./widget-types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Configuration for development widget mounting
|
|
12
|
+
*/
|
|
13
|
+
export type MountWidgetsDevOptions = MountWidgetsOptions;
|
|
14
|
+
/**
|
|
15
|
+
* Mount widgets from resources/ directory in development mode with Vite HMR
|
|
16
|
+
*
|
|
17
|
+
* Discovers TSX widget files and folders with widget.tsx, creates temporary entry files,
|
|
18
|
+
* and sets up a shared Vite dev server with hot module replacement. Each widget is
|
|
19
|
+
* registered as both a tool and resource for MCP-UI compatibility.
|
|
20
|
+
*
|
|
21
|
+
* @param app - Hono app instance to mount routes on
|
|
22
|
+
* @param serverConfig - Server configuration (baseUrl, port, CSP URLs)
|
|
23
|
+
* @param registerWidget - Callback to register each discovered widget
|
|
24
|
+
* @param options - Optional configuration (baseRoute, resourcesDir)
|
|
25
|
+
* @returns Promise that resolves when all widgets are mounted
|
|
26
|
+
*/
|
|
27
|
+
export declare function mountWidgetsDev(app: HonoType, serverConfig: ServerConfig, registerWidget: RegisterWidgetCallback, options?: MountWidgetsDevOptions): Promise<void>;
|
|
28
|
+
//# sourceMappingURL=mount-widgets-dev.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mount-widgets-dev.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/mount-widgets-dev.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAiB,MAAM,MAAM,CAAC;AAQ5D,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAI3B;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,QAAQ,EACb,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,sBAAsB,EACtC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAyXf"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Production mode widget mounting
|
|
3
|
+
*
|
|
4
|
+
* This module handles serving pre-built widgets from the dist/resources/widgets/ directory.
|
|
5
|
+
* Widgets are built using the 'mcp-use build' command and served as static files in production.
|
|
6
|
+
*/
|
|
7
|
+
import type { Hono as HonoType } from "hono";
|
|
8
|
+
import type { ServerConfig, MountWidgetsOptions, RegisterWidgetCallback } from "./widget-types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for production widget mounting
|
|
11
|
+
*/
|
|
12
|
+
export type MountWidgetsProductionOptions = MountWidgetsOptions;
|
|
13
|
+
/**
|
|
14
|
+
* Mount pre-built widgets from dist/resources/widgets/ directory in production mode
|
|
15
|
+
*
|
|
16
|
+
* Serves static widget bundles that were built using the build command.
|
|
17
|
+
* Reads the manifest file to discover available widgets and their metadata,
|
|
18
|
+
* then registers each widget as both a tool and resource.
|
|
19
|
+
*
|
|
20
|
+
* @param app - Hono app instance (not used directly, kept for consistency)
|
|
21
|
+
* @param serverConfig - Server configuration (baseUrl, CSP URLs, buildId)
|
|
22
|
+
* @param registerWidget - Callback to register each discovered widget
|
|
23
|
+
* @param options - Optional configuration (baseRoute)
|
|
24
|
+
* @returns Promise that resolves when all widgets are mounted
|
|
25
|
+
*/
|
|
26
|
+
export declare function mountWidgetsProduction(app: HonoType, serverConfig: ServerConfig, registerWidget: RegisterWidgetCallback, options?: MountWidgetsProductionOptions): Promise<void>;
|
|
27
|
+
//# sourceMappingURL=mount-widgets-production.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mount-widgets-production.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/mount-widgets-production.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAC;AAI7C,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,mBAAmB,CAAC;AAEhE;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,QAAQ,EACb,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,sBAAsB,EACtC,OAAO,CAAC,EAAE,6BAA6B,GACtC,OAAO,CAAC,IAAI,CAAC,CAuGf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static widget route handlers
|
|
3
|
+
*
|
|
4
|
+
* This module sets up HTTP routes for serving widget assets, HTML files,
|
|
5
|
+
* and public resources in production mode.
|
|
6
|
+
*/
|
|
7
|
+
import type { Hono as HonoType } from "hono";
|
|
8
|
+
import type { ServerConfig } from "./widget-types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Setup static file serving routes for widgets
|
|
11
|
+
*
|
|
12
|
+
* Creates HTTP routes to serve:
|
|
13
|
+
* - Widget assets (JS, CSS, images) from dist/resources/widgets/{widget}/assets/
|
|
14
|
+
* - Widget HTML files from dist/resources/widgets/{widget}/index.html
|
|
15
|
+
* - Public files from dist/public/ or public/ directories
|
|
16
|
+
*
|
|
17
|
+
* These routes are used in production mode to serve pre-built widget bundles.
|
|
18
|
+
*
|
|
19
|
+
* @param app - Hono app instance to mount routes on
|
|
20
|
+
* @param serverConfig - Server configuration (baseUrl)
|
|
21
|
+
*/
|
|
22
|
+
export declare function setupWidgetRoutes(app: HonoType, serverConfig: ServerConfig): void;
|
|
23
|
+
//# sourceMappingURL=setup-widget-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-widget-routes.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/setup-widget-routes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAW,MAAM,MAAM,CAAC;AAOtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,QAAQ,EACb,YAAY,EAAE,YAAY,GACzB,IAAI,CA0FN"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Resource Registration
|
|
3
|
+
*
|
|
4
|
+
* This module handles the registration of UI widgets as both tools and resources
|
|
5
|
+
* in the MCP server. It creates a unified interface for MCP-UI compatible widgets.
|
|
6
|
+
*/
|
|
7
|
+
import type { UIResourceDefinition } from "../types/index.js";
|
|
8
|
+
/**
|
|
9
|
+
* Interface representing the server context needed for UI resource registration
|
|
10
|
+
*
|
|
11
|
+
* Note: Properties can be private/protected in the implementing class since they're
|
|
12
|
+
* accessed through the `this` context.
|
|
13
|
+
*/
|
|
14
|
+
export interface UIResourceServerContext {
|
|
15
|
+
/** Build ID for cache busting (can be private/protected) */
|
|
16
|
+
readonly buildId?: string;
|
|
17
|
+
/** Server host (can be private/protected) */
|
|
18
|
+
readonly serverHost: string;
|
|
19
|
+
/** Server port (can be private/protected) */
|
|
20
|
+
readonly serverPort?: number;
|
|
21
|
+
/** Server base URL (can be private/protected) */
|
|
22
|
+
readonly serverBaseUrl?: string;
|
|
23
|
+
/** Method to register a resource */
|
|
24
|
+
resource(definition: any): void;
|
|
25
|
+
/** Method to register a resource template */
|
|
26
|
+
resourceTemplate(definition: any): void;
|
|
27
|
+
/** Method to register a tool */
|
|
28
|
+
tool(definition: any): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Register a UI widget as both a tool and a resource
|
|
32
|
+
*
|
|
33
|
+
* Creates a unified interface for MCP-UI compatible widgets that can be accessed
|
|
34
|
+
* either as tools (with parameters) or as resources (static access). The tool
|
|
35
|
+
* allows dynamic parameter passing while the resource provides discoverable access.
|
|
36
|
+
*
|
|
37
|
+
* Supports multiple UI resource types:
|
|
38
|
+
* - externalUrl: Legacy MCP-UI iframe-based widgets
|
|
39
|
+
* - rawHtml: Legacy MCP-UI raw HTML content
|
|
40
|
+
* - remoteDom: Legacy MCP-UI Remote DOM scripting
|
|
41
|
+
* - appsSdk: OpenAI Apps SDK compatible widgets (text/html+skybridge)
|
|
42
|
+
*
|
|
43
|
+
* @param this - Server context with registration methods
|
|
44
|
+
* @param definition - Widget configuration object
|
|
45
|
+
* @param definition.name - Unique identifier for the resource
|
|
46
|
+
* @param definition.type - Type of UI resource (externalUrl, rawHtml, remoteDom, appsSdk)
|
|
47
|
+
* @param definition.title - Human-readable title for the widget
|
|
48
|
+
* @param definition.description - Description of the widget's functionality
|
|
49
|
+
* @param definition.props - Widget properties configuration with types and defaults
|
|
50
|
+
* @param definition.size - Preferred iframe size [width, height] (e.g., ['900px', '600px'])
|
|
51
|
+
* @param definition.annotations - Resource annotations for discovery
|
|
52
|
+
* @param definition.appsSdkMetadata - Apps SDK specific metadata (CSP, widget description, etc.)
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* // Usage in McpServer class
|
|
57
|
+
* class McpServer {
|
|
58
|
+
* public uiResource = uiResourceRegistration;
|
|
59
|
+
*
|
|
60
|
+
* // ... other methods
|
|
61
|
+
* }
|
|
62
|
+
*
|
|
63
|
+
* // Then call it normally
|
|
64
|
+
* server.uiResource({
|
|
65
|
+
* type: 'appsSdk',
|
|
66
|
+
* name: 'kanban-board',
|
|
67
|
+
* title: 'Kanban Board',
|
|
68
|
+
* description: 'Interactive task management board',
|
|
69
|
+
* htmlTemplate: '<div>...</div>',
|
|
70
|
+
* appsSdkMetadata: { ... }
|
|
71
|
+
* })
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function uiResourceRegistration(this: UIResourceServerContext, definition: UIResourceDefinition): UIResourceServerContext;
|
|
75
|
+
//# sourceMappingURL=ui-resource-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-resource-registration.d.ts","sourceRoot":"","sources":["../../../../src/server/widgets/ui-resource-registration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAS9D;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,oCAAoC;IACpC,QAAQ,CAAC,UAAU,EAAE,GAAG,GAAG,IAAI,CAAC;IAChC,6CAA6C;IAC7C,gBAAgB,CAAC,UAAU,EAAE,GAAG,GAAG,IAAI,CAAC;IACxC,gCAAgC;IAChC,IAAI,CAAC,UAAU,EAAE,GAAG,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,uBAAuB,EAC7B,UAAU,EAAE,oBAAoB,GAC/B,uBAAuB,CA2LzB"}
|