@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,84 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { t as McpPluginApi } from "../../io-DPYvBqET.cjs";
|
|
2
|
+
import { Plugin } from "vite";
|
|
3
|
+
//#region src/stacks/tanstack/vite.d.ts
|
|
4
4
|
interface McpPluginOptions {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Path to the MCP entry file (default export = `defineMcp(...)` result),
|
|
7
|
+
* relative to the project root.
|
|
8
|
+
* @default "src/lib/mcp/index.ts"
|
|
9
|
+
*/
|
|
10
|
+
mcpEntry?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Where TanStack route files live, relative to the project root.
|
|
13
|
+
* The plugin emits `<routesDir>/<routeFileName>` plus the REST companion
|
|
14
|
+
* routes here.
|
|
15
|
+
* @default "src/routes"
|
|
16
|
+
*/
|
|
17
|
+
routesDir?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Public URL path for the MCP-protocol route.
|
|
20
|
+
*
|
|
21
|
+
* The REST companion routes co-locate with this path under a `.mcp`
|
|
22
|
+
* sub-segment of the same parent prefix: `/mcp` keeps them at
|
|
23
|
+
* `/.mcp/list-tools` and `/.mcp/invoke-tool/$tool`, while
|
|
24
|
+
* `/api/public/mcp` moves them to `/api/public/.mcp/*`. The `.mcp`
|
|
25
|
+
* namespace keeps them from colliding with user-defined URLs without
|
|
26
|
+
* anchoring them at the root. Set `restRoutes: false` to drop the
|
|
27
|
+
* companions entirely.
|
|
28
|
+
*
|
|
29
|
+
* Must start with `/` and use only `/mcp`-style segments; anything more
|
|
30
|
+
* exotic doesn't map cleanly to a TanStack file name.
|
|
31
|
+
* @default "/mcp"
|
|
32
|
+
*/
|
|
33
|
+
path?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Filename to emit for the main MCP route, relative to `routesDir`.
|
|
36
|
+
* Defaults to a name derived from `path` (e.g. `/mcp` → `mcp.ts`,
|
|
37
|
+
* `/api/mcp` → `api/mcp.ts`).
|
|
38
|
+
*/
|
|
39
|
+
routeFileName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Set to `false` to skip emitting the REST companion routes at
|
|
42
|
+
* `<path-parent>/.mcp/list-tools` and `<path-parent>/.mcp/<tool>`. Set
|
|
43
|
+
* `protectedResourceMetadataRoute: false` as well if you want the MCP
|
|
44
|
+
* protocol route to be the only emitted surface.
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
restRoutes?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Set to `false` to skip emitting the OAuth protected-resource metadata
|
|
50
|
+
* route at `/.well-known/oauth-protected-resource`.
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
protectedResourceMetadataRoute?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Public URL path for the OAuth protected-resource metadata route (RFC 9728).
|
|
56
|
+
* Both the emitted route file and the runtime `WWW-Authenticate` challenge use
|
|
57
|
+
* this path, so they can't drift. Use it when a host gate exposes only a
|
|
58
|
+
* sub-prefix (e.g. workspace-private projects where only `/api/public/*` is
|
|
59
|
+
* anonymously reachable) and the default well-known path is blocked.
|
|
60
|
+
*
|
|
61
|
+
* Leading-dot segments are bracket-escaped for TanStack file routing
|
|
62
|
+
* (`.well-known` → `[.well-known]`); the final segment becomes the route file.
|
|
63
|
+
* Mutually exclusive with `auth.protectedResourceMetadataUrl` (that option
|
|
64
|
+
* advertises an externally hosted document instead of serving one), and
|
|
65
|
+
* cannot be combined with `protectedResourceMetadataRoute: false`.
|
|
66
|
+
* @default "/.well-known/oauth-protected-resource"
|
|
67
|
+
*/
|
|
68
|
+
metadataPath?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Derive the public origin of the advertised OAuth `resource`/metadata URLs
|
|
71
|
+
* from `X-Forwarded-Host` instead of the rewritten `Host`. Lovable's web-proxy
|
|
72
|
+
* serves a custom domain by rewriting `Host` to the internal backend and
|
|
73
|
+
* overwriting `X-Forwarded-Host` with the real public host, so the default is
|
|
74
|
+
* `true` to make custom domains work out of the box. Set `false` only when
|
|
75
|
+
* deploying behind a proxy that does not overwrite the header (a client could
|
|
76
|
+
* then spoof it to redirect the advertised resource).
|
|
77
|
+
* @default true
|
|
78
|
+
*/
|
|
79
|
+
trustForwardedHost?: boolean;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
81
|
declare function assertUrlPathShape(urlPath: string): string;
|
|
83
82
|
declare function deriveRouteFileName(urlPath: string): string;
|
|
84
83
|
declare function assertMetadataPathShape(metadataPath: string): void;
|
|
@@ -95,5 +94,5 @@ declare function assertMetadataPathShape(metadataPath: string): void;
|
|
|
95
94
|
* time) — not by this plugin.
|
|
96
95
|
*/
|
|
97
96
|
declare function mcpPlugin(options?: McpPluginOptions): Plugin;
|
|
98
|
-
|
|
99
|
-
export { type McpPluginOptions, assertMetadataPathShape, assertUrlPathShape, mcpPlugin as default,
|
|
97
|
+
//#endregion
|
|
98
|
+
export { type McpPluginApi, McpPluginOptions, assertMetadataPathShape, assertUrlPathShape, mcpPlugin as default, mcpPlugin, deriveRouteFileName };
|
|
@@ -1,84 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { t as McpPluginApi } from "../../io-CfSPxeBN.js";
|
|
2
|
+
import { Plugin } from "vite";
|
|
3
|
+
//#region src/stacks/tanstack/vite.d.ts
|
|
4
4
|
interface McpPluginOptions {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Path to the MCP entry file (default export = `defineMcp(...)` result),
|
|
7
|
+
* relative to the project root.
|
|
8
|
+
* @default "src/lib/mcp/index.ts"
|
|
9
|
+
*/
|
|
10
|
+
mcpEntry?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Where TanStack route files live, relative to the project root.
|
|
13
|
+
* The plugin emits `<routesDir>/<routeFileName>` plus the REST companion
|
|
14
|
+
* routes here.
|
|
15
|
+
* @default "src/routes"
|
|
16
|
+
*/
|
|
17
|
+
routesDir?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Public URL path for the MCP-protocol route.
|
|
20
|
+
*
|
|
21
|
+
* The REST companion routes co-locate with this path under a `.mcp`
|
|
22
|
+
* sub-segment of the same parent prefix: `/mcp` keeps them at
|
|
23
|
+
* `/.mcp/list-tools` and `/.mcp/invoke-tool/$tool`, while
|
|
24
|
+
* `/api/public/mcp` moves them to `/api/public/.mcp/*`. The `.mcp`
|
|
25
|
+
* namespace keeps them from colliding with user-defined URLs without
|
|
26
|
+
* anchoring them at the root. Set `restRoutes: false` to drop the
|
|
27
|
+
* companions entirely.
|
|
28
|
+
*
|
|
29
|
+
* Must start with `/` and use only `/mcp`-style segments; anything more
|
|
30
|
+
* exotic doesn't map cleanly to a TanStack file name.
|
|
31
|
+
* @default "/mcp"
|
|
32
|
+
*/
|
|
33
|
+
path?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Filename to emit for the main MCP route, relative to `routesDir`.
|
|
36
|
+
* Defaults to a name derived from `path` (e.g. `/mcp` → `mcp.ts`,
|
|
37
|
+
* `/api/mcp` → `api/mcp.ts`).
|
|
38
|
+
*/
|
|
39
|
+
routeFileName?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Set to `false` to skip emitting the REST companion routes at
|
|
42
|
+
* `<path-parent>/.mcp/list-tools` and `<path-parent>/.mcp/<tool>`. Set
|
|
43
|
+
* `protectedResourceMetadataRoute: false` as well if you want the MCP
|
|
44
|
+
* protocol route to be the only emitted surface.
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
restRoutes?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Set to `false` to skip emitting the OAuth protected-resource metadata
|
|
50
|
+
* route at `/.well-known/oauth-protected-resource`.
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
protectedResourceMetadataRoute?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Public URL path for the OAuth protected-resource metadata route (RFC 9728).
|
|
56
|
+
* Both the emitted route file and the runtime `WWW-Authenticate` challenge use
|
|
57
|
+
* this path, so they can't drift. Use it when a host gate exposes only a
|
|
58
|
+
* sub-prefix (e.g. workspace-private projects where only `/api/public/*` is
|
|
59
|
+
* anonymously reachable) and the default well-known path is blocked.
|
|
60
|
+
*
|
|
61
|
+
* Leading-dot segments are bracket-escaped for TanStack file routing
|
|
62
|
+
* (`.well-known` → `[.well-known]`); the final segment becomes the route file.
|
|
63
|
+
* Mutually exclusive with `auth.protectedResourceMetadataUrl` (that option
|
|
64
|
+
* advertises an externally hosted document instead of serving one), and
|
|
65
|
+
* cannot be combined with `protectedResourceMetadataRoute: false`.
|
|
66
|
+
* @default "/.well-known/oauth-protected-resource"
|
|
67
|
+
*/
|
|
68
|
+
metadataPath?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Derive the public origin of the advertised OAuth `resource`/metadata URLs
|
|
71
|
+
* from `X-Forwarded-Host` instead of the rewritten `Host`. Lovable's web-proxy
|
|
72
|
+
* serves a custom domain by rewriting `Host` to the internal backend and
|
|
73
|
+
* overwriting `X-Forwarded-Host` with the real public host, so the default is
|
|
74
|
+
* `true` to make custom domains work out of the box. Set `false` only when
|
|
75
|
+
* deploying behind a proxy that does not overwrite the header (a client could
|
|
76
|
+
* then spoof it to redirect the advertised resource).
|
|
77
|
+
* @default true
|
|
78
|
+
*/
|
|
79
|
+
trustForwardedHost?: boolean;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
81
|
declare function assertUrlPathShape(urlPath: string): string;
|
|
83
82
|
declare function deriveRouteFileName(urlPath: string): string;
|
|
84
83
|
declare function assertMetadataPathShape(metadataPath: string): void;
|
|
@@ -95,5 +94,5 @@ declare function assertMetadataPathShape(metadataPath: string): void;
|
|
|
95
94
|
* time) — not by this plugin.
|
|
96
95
|
*/
|
|
97
96
|
declare function mcpPlugin(options?: McpPluginOptions): Plugin;
|
|
98
|
-
|
|
99
|
-
export { type McpPluginOptions, assertMetadataPathShape, assertUrlPathShape, mcpPlugin as default,
|
|
97
|
+
//#endregion
|
|
98
|
+
export { type McpPluginApi, McpPluginOptions, assertMetadataPathShape, assertUrlPathShape, mcpPlugin as default, mcpPlugin, deriveRouteFileName };
|