@lovable.dev/mcp-js 0.22.1 → 0.22.2-rc.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/authorize-CumVyk7p.d.cts +27 -0
- package/dist/authorize-D6p4-9_D.d.ts +27 -0
- package/dist/base-DCe0kP79.d.cts +29 -0
- package/dist/base-DCe0kP79.d.ts +29 -0
- package/dist/cli/extract-manifest.cjs +116 -201
- package/dist/cli/extract-manifest.d.cts +1 -1
- package/dist/cli/extract-manifest.d.ts +1 -1
- package/dist/cli/extract-manifest.js +117 -156
- package/dist/content-D5LJAHyM.js +12 -0
- package/dist/content-NCYIGgOb.cjs +17 -0
- package/dist/context-BweeEcoA.cjs +56 -0
- package/dist/context-CIpPzN7P.js +51 -0
- package/dist/cors-CSDhBjFd.cjs +913 -0
- package/dist/cors-rWp_tbLZ.js +830 -0
- package/dist/forwarded--h4efJy-.js +43 -0
- package/dist/forwarded-Pi8Hs5Ps.cjs +48 -0
- package/dist/fs-errors-CWNzOV75.cjs +11 -0
- package/dist/fs-errors-PA2t1TIp.js +6 -0
- package/dist/index.cjs +129 -329
- package/dist/index.d.cts +26 -26
- package/dist/index.d.ts +26 -26
- package/dist/index.js +118 -177
- package/dist/{io-D4srzRKc.d.ts → io-CfSPxeBN.d.ts} +6 -4
- package/dist/io-DPYvBqET.d.cts +15 -0
- package/dist/list-tools-B4TTPEl1.d.cts +8 -0
- package/dist/list-tools-CFUX-uo-.cjs +57 -0
- package/dist/list-tools-DVJrjtmH.js +46 -0
- package/dist/list-tools-bh6-eqZM.d.ts +8 -0
- package/dist/logger-2OXtfiIW.js +141 -0
- package/dist/logger-BqPOa_E1.cjs +194 -0
- package/dist/mcp-BNcpj8o7.cjs +128 -0
- package/dist/mcp-Bx3bJHzH.js +123 -0
- package/dist/metadata-path-CAkNcfyY.js +12 -0
- package/dist/metadata-path-zd7NSNoa.cjs +17 -0
- package/dist/package-CgwD4Ywz.js +4 -0
- package/dist/package-DzstF8Ih.cjs +9 -0
- package/dist/paths-IS65L6TA.js +7 -0
- package/dist/paths-OP318a6c.cjs +18 -0
- package/dist/protocols/mcp/index.cjs +3 -750
- package/dist/protocols/mcp/index.d.cts +6 -7
- package/dist/protocols/mcp/index.d.ts +6 -7
- package/dist/protocols/mcp/index.js +2 -12
- package/dist/protocols/oauth-metadata.cjs +48 -539
- package/dist/protocols/oauth-metadata.d.cts +5 -6
- package/dist/protocols/oauth-metadata.d.ts +5 -6
- package/dist/protocols/oauth-metadata.js +52 -10
- package/dist/protocols/rest/index.cjs +5 -843
- package/dist/protocols/rest/index.d.cts +7 -10
- package/dist/protocols/rest/index.d.ts +7 -10
- package/dist/protocols/rest/index.js +3 -16
- package/dist/rest-BRshnow2.js +117 -0
- package/dist/rest-C4ZEGSIV.cjs +122 -0
- package/dist/stacks/supabase/index.cjs +76 -1318
- package/dist/stacks/supabase/index.d.cts +29 -30
- package/dist/stacks/supabase/index.d.ts +29 -30
- package/dist/stacks/supabase/index.js +73 -89
- package/dist/stacks/supabase/vite.cjs +258 -287
- package/dist/stacks/supabase/vite.d.cts +24 -24
- package/dist/stacks/supabase/vite.d.ts +24 -24
- package/dist/stacks/supabase/vite.js +252 -252
- package/dist/stacks/tanstack/index.cjs +42 -1272
- package/dist/stacks/tanstack/index.d.cts +8 -9
- package/dist/stacks/tanstack/index.d.ts +8 -9
- package/dist/stacks/tanstack/index.js +36 -41
- package/dist/stacks/tanstack/vite.cjs +223 -312
- package/dist/stacks/tanstack/vite.d.cts +80 -81
- package/dist/stacks/tanstack/vite.d.ts +80 -81
- package/dist/stacks/tanstack/vite.js +216 -282
- package/dist/types-BYdYYTjk.d.cts +321 -0
- package/dist/types-BYdYYTjk.d.ts +321 -0
- package/package.json +4 -4
- package/dist/authorize-BMeXd_Sh.d.ts +0 -25
- package/dist/base-CM-KCpp6.d.ts +0 -28
- package/dist/chunk-5HVSJCKE.js +0 -114
- package/dist/chunk-6DXGZZA4.js +0 -6
- package/dist/chunk-6QFZYYUV.js +0 -11
- package/dist/chunk-6SZOFKGH.js +0 -58
- package/dist/chunk-H37EB22A.js +0 -125
- package/dist/chunk-IFDWUM7L.js +0 -741
- package/dist/chunk-IXZIFYO6.js +0 -79
- package/dist/chunk-MA5H6PSF.js +0 -46
- package/dist/chunk-TJN33K5U.js +0 -141
- package/dist/chunk-UQK5UO6C.js +0 -26
- package/dist/chunk-XQWJN6DC.js +0 -14
- package/dist/chunk-Y3ZFPEQH.js +0 -8
- package/dist/chunk-ZQXSWTPU.js +0 -6
- package/dist/types-qqrmJ736.d.ts +0 -321
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { c as McpDefinition } from "../../types-BYdYYTjk.cjs";
|
|
2
|
+
import { t as McpRuntimeOptions } from "../../authorize-CumVyk7p.cjs";
|
|
3
|
+
//#region src/stacks/tanstack/handlers.d.ts
|
|
5
4
|
interface TanStackRouteCtx {
|
|
6
|
-
|
|
5
|
+
request: Request;
|
|
7
6
|
}
|
|
8
7
|
interface TanStackParamRouteCtx<TParam extends string> {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
request: Request;
|
|
9
|
+
params: Record<TParam, string>;
|
|
11
10
|
}
|
|
12
11
|
type TanStackMcpHandler = (ctx: TanStackRouteCtx) => Promise<Response>;
|
|
13
12
|
type TanStackListToolsHandler = (ctx: TanStackRouteCtx) => Promise<Response>;
|
|
@@ -34,5 +33,5 @@ declare function createTanStackInvokeToolHandler(mcp: McpDefinition, options?: M
|
|
|
34
33
|
* When the MCP definition has no OAuth auth config the handler returns 404.
|
|
35
34
|
*/
|
|
36
35
|
declare function createTanStackOAuthProtectedResourceMetadataHandler(mcp: McpDefinition, options?: McpRuntimeOptions): TanStackOAuthProtectedResourceMetadataHandler;
|
|
37
|
-
|
|
38
|
-
export { type TanStackInvokeToolHandler, type TanStackListToolsHandler, type TanStackMcpHandler, type TanStackOAuthProtectedResourceMetadataHandler, createTanStackInvokeToolHandler, createTanStackListToolsHandler, createTanStackMcpHandler, createTanStackOAuthProtectedResourceMetadataHandler };
|
|
36
|
+
//#endregion
|
|
37
|
+
export { type TanStackInvokeToolHandler, type TanStackListToolsHandler, type TanStackMcpHandler, type TanStackOAuthProtectedResourceMetadataHandler, createTanStackInvokeToolHandler, createTanStackListToolsHandler, createTanStackMcpHandler, createTanStackOAuthProtectedResourceMetadataHandler };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { c as McpDefinition } from "../../types-BYdYYTjk.js";
|
|
2
|
+
import { t as McpRuntimeOptions } from "../../authorize-D6p4-9_D.js";
|
|
3
|
+
//#region src/stacks/tanstack/handlers.d.ts
|
|
5
4
|
interface TanStackRouteCtx {
|
|
6
|
-
|
|
5
|
+
request: Request;
|
|
7
6
|
}
|
|
8
7
|
interface TanStackParamRouteCtx<TParam extends string> {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
request: Request;
|
|
9
|
+
params: Record<TParam, string>;
|
|
11
10
|
}
|
|
12
11
|
type TanStackMcpHandler = (ctx: TanStackRouteCtx) => Promise<Response>;
|
|
13
12
|
type TanStackListToolsHandler = (ctx: TanStackRouteCtx) => Promise<Response>;
|
|
@@ -34,5 +33,5 @@ declare function createTanStackInvokeToolHandler(mcp: McpDefinition, options?: M
|
|
|
34
33
|
* When the MCP definition has no OAuth auth config the handler returns 404.
|
|
35
34
|
*/
|
|
36
35
|
declare function createTanStackOAuthProtectedResourceMetadataHandler(mcp: McpDefinition, options?: McpRuntimeOptions): TanStackOAuthProtectedResourceMetadataHandler;
|
|
37
|
-
|
|
38
|
-
export { type TanStackInvokeToolHandler, type TanStackListToolsHandler, type TanStackMcpHandler, type TanStackOAuthProtectedResourceMetadataHandler, createTanStackInvokeToolHandler, createTanStackListToolsHandler, createTanStackMcpHandler, createTanStackOAuthProtectedResourceMetadataHandler };
|
|
36
|
+
//#endregion
|
|
37
|
+
export { type TanStackInvokeToolHandler, type TanStackListToolsHandler, type TanStackMcpHandler, type TanStackOAuthProtectedResourceMetadataHandler, createTanStackInvokeToolHandler, createTanStackListToolsHandler, createTanStackMcpHandler, createTanStackOAuthProtectedResourceMetadataHandler };
|
|
@@ -1,51 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "../../
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
} from "../../
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "../../chunk-IXZIFYO6.js";
|
|
10
|
-
import {
|
|
11
|
-
createInvokeToolHandler
|
|
12
|
-
} from "../../chunk-TJN33K5U.js";
|
|
13
|
-
import {
|
|
14
|
-
createListToolsHandler
|
|
15
|
-
} from "../../chunk-6SZOFKGH.js";
|
|
16
|
-
import "../../chunk-6QFZYYUV.js";
|
|
17
|
-
import "../../chunk-MA5H6PSF.js";
|
|
18
|
-
import {
|
|
19
|
-
createRecorderForRuntime
|
|
20
|
-
} from "../../chunk-IFDWUM7L.js";
|
|
21
|
-
import "../../chunk-H37EB22A.js";
|
|
22
|
-
import "../../chunk-6DXGZZA4.js";
|
|
23
|
-
import "../../chunk-ZQXSWTPU.js";
|
|
24
|
-
|
|
25
|
-
// src/stacks/tanstack/handlers.ts
|
|
26
|
-
var STACK = "tanstack";
|
|
1
|
+
import { l as createRecorderForRuntime } from "../../cors-rWp_tbLZ.js";
|
|
2
|
+
import { t as createMcpProtocolHandler } from "../../mcp-Bx3bJHzH.js";
|
|
3
|
+
import { createOAuthProtectedResourceMetadataHandler } from "../../protocols/oauth-metadata.js";
|
|
4
|
+
import { n as createListToolsHandler } from "../../list-tools-DVJrjtmH.js";
|
|
5
|
+
import { t as createInvokeToolHandler } from "../../rest-BRshnow2.js";
|
|
6
|
+
import { t as applyForwardedOrigin } from "../../forwarded--h4efJy-.js";
|
|
7
|
+
//#region src/stacks/tanstack/handlers.ts
|
|
8
|
+
const STACK = "tanstack";
|
|
27
9
|
function forwarded(request, options) {
|
|
28
|
-
|
|
10
|
+
return applyForwardedOrigin(request, { trustForwardedHost: options.trustForwardedHost });
|
|
29
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Build a TanStack Start handler for the MCP protocol endpoint
|
|
14
|
+
* (`POST /mcp`). Assignable directly to a route's `ANY` handler.
|
|
15
|
+
*/
|
|
30
16
|
function createTanStackMcpHandler(mcp, options = {}) {
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
const handler = createMcpProtocolHandler(mcp, options);
|
|
18
|
+
return ({ request }) => handler(forwarded(request, options), createRecorderForRuntime(mcp, { stack: STACK }));
|
|
33
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Build a TanStack Start handler for `GET /.mcp/list-tools`. Returns the
|
|
22
|
+
* tool catalog (name, description, annotations, JSON Schemas) as JSON.
|
|
23
|
+
*/
|
|
34
24
|
function createTanStackListToolsHandler(mcp, options = {}) {
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
const handler = createListToolsHandler(mcp, options);
|
|
26
|
+
return ({ request }) => handler(forwarded(request, options), createRecorderForRuntime(mcp, { stack: STACK }));
|
|
37
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Build a TanStack Start handler for `POST /.mcp/invoke-tool/$tool`.
|
|
30
|
+
* Reads the tool name from `params.tool`, validates the JSON body, and
|
|
31
|
+
* dispatches to the matching `defineTool` handler.
|
|
32
|
+
*/
|
|
38
33
|
function createTanStackInvokeToolHandler(mcp, options = {}) {
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
const handler = createInvokeToolHandler(mcp, options);
|
|
35
|
+
return ({ request, params }) => handler(forwarded(request, options), params.tool, createRecorderForRuntime(mcp, { stack: STACK }));
|
|
41
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Build a TanStack Start handler for `GET /.well-known/oauth-protected-resource`.
|
|
39
|
+
* When the MCP definition has no OAuth auth config the handler returns 404.
|
|
40
|
+
*/
|
|
42
41
|
function createTanStackOAuthProtectedResourceMetadataHandler(mcp, options = {}) {
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
const handler = createOAuthProtectedResourceMetadataHandler(mcp, options);
|
|
43
|
+
return ({ request }) => handler(forwarded(request, options));
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
createTanStackListToolsHandler,
|
|
49
|
-
createTanStackMcpHandler,
|
|
50
|
-
createTanStackOAuthProtectedResourceMetadataHandler
|
|
51
|
-
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { createTanStackInvokeToolHandler, createTanStackListToolsHandler, createTanStackMcpHandler, createTanStackOAuthProtectedResourceMetadataHandler };
|