@lovable.dev/mcp-js 0.22.1-rc.1 → 0.22.1-rc.10
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-BMeXd_Sh.d.ts +25 -0
- package/dist/base-CM-KCpp6.d.ts +28 -0
- package/dist/chunk-5QA2Y5GJ.js +6 -0
- package/dist/chunk-6DX4YSMI.js +741 -0
- package/dist/chunk-6DXGZZA4.js +6 -0
- package/dist/chunk-6QFZYYUV.js +11 -0
- package/dist/chunk-CLZSDU6Y.js +58 -0
- package/dist/chunk-F7XJX6JF.js +114 -0
- package/dist/chunk-H37EB22A.js +125 -0
- package/dist/chunk-J4T6X3KV.js +141 -0
- package/dist/chunk-MA5H6PSF.js +46 -0
- package/dist/chunk-UB57JOEI.js +79 -0
- package/dist/chunk-UQK5UO6C.js +26 -0
- package/dist/chunk-XQWJN6DC.js +14 -0
- package/dist/chunk-Y3ZFPEQH.js +8 -0
- package/dist/cli/extract-manifest.cjs +201 -116
- package/dist/cli/extract-manifest.d.cts +1 -1
- package/dist/cli/extract-manifest.d.ts +1 -1
- package/dist/cli/extract-manifest.js +156 -117
- package/dist/index.cjs +329 -129
- package/dist/index.d.cts +26 -26
- package/dist/index.d.ts +26 -26
- package/dist/index.js +177 -118
- package/dist/{io-CfSPxeBN.d.ts → io-D4srzRKc.d.ts} +4 -6
- package/dist/protocols/mcp/index.cjs +750 -3
- package/dist/protocols/mcp/index.d.cts +7 -6
- package/dist/protocols/mcp/index.d.ts +7 -6
- package/dist/protocols/mcp/index.js +12 -2
- package/dist/protocols/oauth-metadata.cjs +539 -48
- package/dist/protocols/oauth-metadata.d.cts +6 -5
- package/dist/protocols/oauth-metadata.d.ts +6 -5
- package/dist/protocols/oauth-metadata.js +10 -52
- package/dist/protocols/rest/index.cjs +843 -5
- package/dist/protocols/rest/index.d.cts +10 -7
- package/dist/protocols/rest/index.d.ts +10 -7
- package/dist/protocols/rest/index.js +16 -3
- package/dist/stacks/supabase/index.cjs +1318 -76
- package/dist/stacks/supabase/index.d.cts +30 -29
- package/dist/stacks/supabase/index.d.ts +30 -29
- package/dist/stacks/supabase/index.js +89 -73
- package/dist/stacks/supabase/vite.cjs +287 -258
- 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 +1272 -42
- package/dist/stacks/tanstack/index.d.cts +9 -8
- package/dist/stacks/tanstack/index.d.ts +9 -8
- package/dist/stacks/tanstack/index.js +41 -36
- package/dist/stacks/tanstack/vite.cjs +312 -223
- package/dist/stacks/tanstack/vite.d.cts +81 -80
- package/dist/stacks/tanstack/vite.d.ts +81 -80
- package/dist/stacks/tanstack/vite.js +282 -216
- package/dist/types-qqrmJ736.d.ts +321 -0
- package/package.json +4 -4
- package/dist/authorize-CumVyk7p.d.cts +0 -27
- package/dist/authorize-D6p4-9_D.d.ts +0 -27
- package/dist/base-DCe0kP79.d.cts +0 -29
- package/dist/base-DCe0kP79.d.ts +0 -29
- package/dist/content-D5LJAHyM.js +0 -12
- package/dist/content-NCYIGgOb.cjs +0 -17
- package/dist/context-BweeEcoA.cjs +0 -56
- package/dist/context-CIpPzN7P.js +0 -51
- package/dist/cors-BxwVxCm3.cjs +0 -913
- package/dist/cors-CJRL7tyh.js +0 -830
- package/dist/forwarded--h4efJy-.js +0 -43
- package/dist/forwarded-Pi8Hs5Ps.cjs +0 -48
- package/dist/fs-errors-CWNzOV75.cjs +0 -11
- package/dist/fs-errors-PA2t1TIp.js +0 -6
- package/dist/io-DPYvBqET.d.cts +0 -15
- package/dist/list-tools-B4TTPEl1.d.cts +0 -8
- package/dist/list-tools-Duj1zT0T.js +0 -46
- package/dist/list-tools-_Hh_o_mD.cjs +0 -57
- package/dist/list-tools-bh6-eqZM.d.ts +0 -8
- package/dist/logger-2OXtfiIW.js +0 -141
- package/dist/logger-BqPOa_E1.cjs +0 -194
- package/dist/mcp--iewDKrV.cjs +0 -128
- package/dist/mcp-CALHyhDi.js +0 -123
- package/dist/metadata-path-CAkNcfyY.js +0 -12
- package/dist/metadata-path-zd7NSNoa.cjs +0 -17
- package/dist/package-CLTXgGyU.cjs +0 -9
- package/dist/package-g7-GHkOW.js +0 -4
- package/dist/paths-IS65L6TA.js +0 -7
- package/dist/paths-OP318a6c.cjs +0 -18
- package/dist/rest-BcS3SYjx.cjs +0 -122
- package/dist/rest-Dv9Xq9cV.js +0 -117
- package/dist/types-BYdYYTjk.d.cts +0 -321
- package/dist/types-BYdYYTjk.d.ts +0 -321
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface McpRuntimeOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Public MCP protocol path. REST companion handlers pass this so OAuth
|
|
4
|
+
* resource/audience checks bind to `/mcp`, not internal `/.mcp/*` RPC URLs.
|
|
5
|
+
*/
|
|
6
|
+
resourcePath?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Host-relative path of the SDK-served protected-resource metadata document.
|
|
9
|
+
* The Vite plugin injects it into every emitted handler when it generates the
|
|
10
|
+
* PRM route, so the 401 challenge advertises the same path the route serves.
|
|
11
|
+
* Its presence is the signal that the SDK owns the PRM document, so it is
|
|
12
|
+
* mutually exclusive with `auth.protectedResourceMetadataUrl` (which points at
|
|
13
|
+
* an externally hosted document). Defaults to the well-known path when absent.
|
|
14
|
+
*/
|
|
15
|
+
metadataPath?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Derive the request origin (and thus the advertised `resource`/metadata URLs)
|
|
18
|
+
* from `X-Forwarded-Host` rather than the rewritten `Host`. Stack adapters read
|
|
19
|
+
* this before invoking the handler, so the OAuth runtime never sees it; safe
|
|
20
|
+
* only behind a proxy that overwrites the header (see `core/forwarded.ts`).
|
|
21
|
+
*/
|
|
22
|
+
trustForwardedHost?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type { McpRuntimeOptions as M };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type InvocationOutcome = "ok" | "tool_error" | "handler_error" | "transport_error" | "auth_config_error";
|
|
2
|
+
/** One recorded MCP call. Carries no arguments or response payloads — only the
|
|
3
|
+
* tool name, the JSON-RPC method, the result class, timing, and byte sizes.
|
|
4
|
+
* `errorText` is the sole exception: it is logged locally for debugging and
|
|
5
|
+
* deliberately never included in the OTLP payload (see `emit` / `buildLogsPayload`). */
|
|
6
|
+
interface InvocationRecord {
|
|
7
|
+
/** Tool name for `tools/call`; `null` for list/initialize, transport faults, and auth-config failures. */
|
|
8
|
+
tool: string | null;
|
|
9
|
+
/** JSON-RPC method, e.g. `tools/call`; `authorize` for auth-config failures. */
|
|
10
|
+
method: string;
|
|
11
|
+
outcome: InvocationOutcome;
|
|
12
|
+
durationMs: number;
|
|
13
|
+
reqBytes?: number;
|
|
14
|
+
resBytes?: number;
|
|
15
|
+
/** The app end-user that made the call (the access token `sub`), or
|
|
16
|
+
* `undefined` when the request is unauthenticated. Not a Lovable identity. */
|
|
17
|
+
endUserId?: string;
|
|
18
|
+
/** The `tool_error` message (text content of an `isError` result). Local log
|
|
19
|
+
* only — never sent to the collector, so it stays on-box for the operator. */
|
|
20
|
+
errorText?: string;
|
|
21
|
+
}
|
|
22
|
+
/** A per-request telemetry recorder. `emit` logs the invocation and sends it as a
|
|
23
|
+
* single OTLP POST, awaited so it lands before the request ends. */
|
|
24
|
+
interface MetricsRecorder {
|
|
25
|
+
emit(ev: InvocationRecord): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type { MetricsRecorder as M };
|