@lovable.dev/mcp-js 3.3.0 → 3.4.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/README.internal.md +38 -12
- package/README.md +144 -12
- package/dist/THIRD_PARTY_NOTICES +75 -0
- package/dist/apps-CWG3rGhB.js +132 -0
- package/dist/apps-DyoDrwfi.cjs +185 -0
- package/dist/{authorize-r6jB-Gl2.d.cts → authorize--W1XtwdB.d.cts} +1 -1
- package/dist/{authorize-DxnyFNHv.d.ts → authorize-DpNYioXM.d.ts} +1 -1
- package/dist/{base-ff0LwIA2.d.ts → base-Ce9JYirF.d.ts} +1 -1
- package/dist/{base-CzPzbI3q.d.cts → base-qEX8YVcD.d.cts} +1 -1
- package/dist/cli/check-server.cjs +1 -1
- package/dist/cli/check-server.js +1 -1
- package/dist/cli/extract-manifest.cjs +1 -1
- package/dist/cli/extract-manifest.js +1 -1
- package/dist/{cors-Bjo6NPjV.cjs → cors-DcWb13LI.cjs} +1 -1
- package/dist/{cors-COjc9O73.js → cors-M68siADv.js} +1 -1
- package/dist/dist-CIu-UFye.js +6738 -0
- package/dist/dist-CqY2qXpc.cjs +6738 -0
- package/dist/{errors-D0UPHnG3.js → errors-CfaxXr2T.js} +25 -2
- package/dist/{errors-DSHt3Jqs.cjs → errors-xJ_7Su1K.cjs} +30 -1
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +2 -2
- package/dist/{io-CQ60Nc2J.d.ts → io-BEpyfk4G.d.ts} +1 -1
- package/dist/{io-DTz7efSK.js → io-CICYQJSM.js} +13 -3
- package/dist/{io-Dzy5Bu6h.cjs → io-DGeqWc6m.cjs} +12 -2
- package/dist/{io-DnRCu_HX.d.cts → io-Di5ljvZY.d.cts} +1 -1
- package/dist/{mcp-DIR9MCwQ.js → mcp-BT9dcts8.js} +117 -51
- package/dist/{mcp-Buu1riaY.cjs → mcp-DAUFwQ80.cjs} +116 -50
- package/dist/mcp-app.d.ts +4 -0
- package/dist/{package-DL4uNmL0.cjs → package-Cu_ynl05.cjs} +1 -1
- package/dist/{package-DV8zBoEy.js → package-N4he-Z_i.js} +1 -1
- package/dist/protocols/mcp/index.cjs +1 -1
- package/dist/protocols/mcp/index.d.cts +3 -3
- package/dist/protocols/mcp/index.d.ts +3 -3
- package/dist/protocols/mcp/index.js +1 -1
- package/dist/protocols/oauth-metadata.cjs +1 -1
- package/dist/protocols/oauth-metadata.d.cts +3 -3
- package/dist/protocols/oauth-metadata.d.ts +3 -3
- package/dist/protocols/oauth-metadata.js +1 -1
- package/dist/src-D7RtXSV0.cjs +311 -0
- package/dist/src-sWQwyLwS.js +310 -0
- package/dist/stacks/supabase/index.cjs +2 -2
- package/dist/stacks/supabase/index.d.cts +1 -1
- package/dist/stacks/supabase/index.d.ts +1 -1
- package/dist/stacks/supabase/index.js +2 -2
- package/dist/stacks/supabase/vite.cjs +10 -1
- package/dist/stacks/supabase/vite.d.cts +1 -1
- package/dist/stacks/supabase/vite.d.ts +1 -1
- package/dist/stacks/supabase/vite.js +21 -12
- package/dist/stacks/tanstack/index.cjs +33 -2
- package/dist/stacks/tanstack/index.d.cts +7 -4
- package/dist/stacks/tanstack/index.d.ts +7 -4
- package/dist/stacks/tanstack/index.js +33 -2
- package/dist/stacks/tanstack/vite.cjs +995 -15
- package/dist/stacks/tanstack/vite.d.cts +1 -1
- package/dist/stacks/tanstack/vite.d.ts +1 -1
- package/dist/stacks/tanstack/vite.js +1001 -21
- package/dist/testing/browser/LICENSE.ext-apps +218 -0
- package/dist/testing/browser/host.ts +151 -0
- package/dist/testing/browser/sandbox.ts +137 -0
- package/dist/testing/browser.cjs +382 -0
- package/dist/testing/browser.d.cts +46 -0
- package/dist/testing/browser.d.ts +46 -0
- package/dist/testing/browser.js +381 -0
- package/dist/testing/index.cjs +2 -1
- package/dist/testing/index.d.cts +2 -1
- package/dist/testing/index.d.ts +2 -1
- package/dist/testing/index.js +2 -1
- package/dist/testing/server.cjs +36 -0
- package/dist/testing/server.d.cts +6 -2
- package/dist/testing/server.d.ts +6 -2
- package/dist/testing/server.js +36 -1
- package/dist/{tool-result-DcNioyiI.js → tool-result-BG-HsSQu.js} +8 -1
- package/dist/{tool-result-rU-PpNNi.cjs → tool-result-BQcr7VV-.cjs} +8 -1
- package/dist/{types-BtoYHhdt.d.cts → types-B_dVw-zM.d.cts} +59 -1
- package/dist/{types-BtoYHhdt.d.ts → types-B_dVw-zM.d.ts} +59 -1
- package/package.json +67 -26
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
const require_schema = require("./schema-DNMsvJwE.cjs");
|
|
2
2
|
const require_logger = require("./logger-C-Hdu57K.cjs");
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const require_apps = require("./apps-DyoDrwfi.cjs");
|
|
4
|
+
const require_errors = require("./errors-xJ_7Su1K.cjs");
|
|
5
|
+
const require_cors = require("./cors-DcWb13LI.cjs");
|
|
6
|
+
const require_tool_result = require("./tool-result-BQcr7VV-.cjs");
|
|
6
7
|
let _modelcontextprotocol_sdk_server_zod_compat_js = require("@modelcontextprotocol/sdk/server/zod-compat.js");
|
|
7
8
|
let _modelcontextprotocol_server = require("@modelcontextprotocol/server");
|
|
8
9
|
//#region src/core/content.ts
|
|
@@ -116,18 +117,18 @@ function createGatedHandler(gate) {
|
|
|
116
117
|
const MODERN_PROTOCOL_VERSION = "2026-07-28";
|
|
117
118
|
const NO_OPERATIONS = {
|
|
118
119
|
listTools: false,
|
|
120
|
+
exposeApps: false,
|
|
119
121
|
calledTools: /* @__PURE__ */ new Set()
|
|
120
122
|
};
|
|
121
|
-
function collectRequestOperations(value,
|
|
123
|
+
function collectRequestOperations(value, operations) {
|
|
122
124
|
if (Array.isArray(value)) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return listTools;
|
|
125
|
+
for (const item of value) collectRequestOperations(item, operations);
|
|
126
|
+
return;
|
|
126
127
|
}
|
|
127
|
-
if (!isPlainObject(value)) return
|
|
128
|
-
if (value.method === "tools/list")
|
|
129
|
-
if (value.method === "
|
|
130
|
-
|
|
128
|
+
if (!isPlainObject(value)) return;
|
|
129
|
+
if (value.method === "tools/list") operations.listTools = true;
|
|
130
|
+
if (value.method === "initialize" || value.method === "server/discover" || value.method === "resources/list" || value.method === "resources/read" && isPlainObject(value.params) && typeof value.params.uri === "string" && URL.canParse(value.params.uri) && new URL(value.params.uri).protocol === "ui:") operations.exposeApps = true;
|
|
131
|
+
if (value.method === "tools/call" && isPlainObject(value.params) && typeof value.params.name === "string") operations.calledTools.add(value.params.name);
|
|
131
132
|
}
|
|
132
133
|
/** Marks a failure in app-owned `createAppContext` or `enabled` code so telemetry
|
|
133
134
|
* can attribute it to the author rather than to the transport. */
|
|
@@ -144,15 +145,19 @@ async function withAppContextError(run) {
|
|
|
144
145
|
throw new AppContextError(cause);
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
|
-
async function classifyRequest(request) {
|
|
148
|
+
async function classifyRequest(request, maxRequestBodySize) {
|
|
148
149
|
try {
|
|
149
|
-
const
|
|
150
|
-
|
|
150
|
+
const body = await (0, _modelcontextprotocol_server.readRequestBody)(request, maxRequestBodySize);
|
|
151
|
+
if (body.tooLarge) return { operations: NO_OPERATIONS };
|
|
152
|
+
const parsedBody = JSON.parse(body.text);
|
|
153
|
+
const operations = {
|
|
154
|
+
listTools: false,
|
|
155
|
+
exposeApps: false,
|
|
156
|
+
calledTools: /* @__PURE__ */ new Set()
|
|
157
|
+
};
|
|
158
|
+
collectRequestOperations(parsedBody, operations);
|
|
151
159
|
return {
|
|
152
|
-
operations
|
|
153
|
-
listTools: collectRequestOperations(parsedBody, calledTools),
|
|
154
|
-
calledTools
|
|
155
|
-
},
|
|
160
|
+
operations,
|
|
156
161
|
parsedBody
|
|
157
162
|
};
|
|
158
163
|
} catch {
|
|
@@ -322,11 +327,50 @@ function adaptToolCallback(tool, auth, recorder, protocol, appContext) {
|
|
|
322
327
|
return {
|
|
323
328
|
content: result.content ?? [],
|
|
324
329
|
structuredContent: result.structuredContent,
|
|
325
|
-
isError: result.isError
|
|
330
|
+
isError: result.isError,
|
|
331
|
+
_meta: result._meta
|
|
326
332
|
};
|
|
327
333
|
};
|
|
328
334
|
}
|
|
329
|
-
|
|
335
|
+
function appResourceMeta(app) {
|
|
336
|
+
const ui = {};
|
|
337
|
+
if (app.csp) ui.csp = app.csp;
|
|
338
|
+
if (app.permissions) ui.permissions = app.permissions;
|
|
339
|
+
if (app.domain !== void 0) ui.domain = app.domain;
|
|
340
|
+
if (app.prefersBorder !== void 0) ui.prefersBorder = app.prefersBorder;
|
|
341
|
+
return Object.keys(ui).length > 0 ? { ui } : void 0;
|
|
342
|
+
}
|
|
343
|
+
function registerApps(server, apps) {
|
|
344
|
+
for (const app of apps) {
|
|
345
|
+
const uri = require_apps.appResourceUri(app.name);
|
|
346
|
+
const meta = appResourceMeta(app);
|
|
347
|
+
const withMeta = meta ? { _meta: meta } : {};
|
|
348
|
+
server.registerResource(app.name, uri, {
|
|
349
|
+
title: app.title,
|
|
350
|
+
description: app.description,
|
|
351
|
+
mimeType: require_apps.APP_RESOURCE_MIME_TYPE,
|
|
352
|
+
cacheHint: PRIVATE_CACHE,
|
|
353
|
+
...withMeta
|
|
354
|
+
}, () => ({ contents: [{
|
|
355
|
+
uri,
|
|
356
|
+
mimeType: require_apps.APP_RESOURCE_MIME_TYPE,
|
|
357
|
+
text: app.html,
|
|
358
|
+
...withMeta
|
|
359
|
+
}] }));
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function toolUiMeta(tool) {
|
|
363
|
+
if (!tool.ui) return void 0;
|
|
364
|
+
const resourceUri = tool.ui.app ? require_apps.appResourceUri(tool.ui.app.name) : void 0;
|
|
365
|
+
return {
|
|
366
|
+
ui: {
|
|
367
|
+
...resourceUri ? { resourceUri } : {},
|
|
368
|
+
...tool.ui.visibility ? { visibility: tool.ui.visibility } : {}
|
|
369
|
+
},
|
|
370
|
+
...resourceUri ? { "ui/resourceUri": resourceUri } : {}
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
const PRIVATE_CACHE = {
|
|
330
374
|
ttlMs: 0,
|
|
331
375
|
cacheScope: "private"
|
|
332
376
|
};
|
|
@@ -358,14 +402,14 @@ function skillEntry(skill) {
|
|
|
358
402
|
function registerSkills(server, skills, era) {
|
|
359
403
|
const resultMetadata = era === "modern" ? {
|
|
360
404
|
resultType: "complete",
|
|
361
|
-
...
|
|
405
|
+
...PRIVATE_CACHE
|
|
362
406
|
} : {};
|
|
363
407
|
for (const file of skills.files.values()) {
|
|
364
408
|
const owner = skills.skillsByUri.get(file.uri);
|
|
365
409
|
server.registerResource(owner ? owner.frontmatter.name : file.uri, file.uri, {
|
|
366
410
|
mimeType: file.mimeType,
|
|
367
411
|
...owner ? { description: owner.frontmatter.description } : {},
|
|
368
|
-
cacheHint:
|
|
412
|
+
cacheHint: PRIVATE_CACHE
|
|
369
413
|
}, async () => ({ contents: [{
|
|
370
414
|
uri: file.uri,
|
|
371
415
|
mimeType: file.mimeType,
|
|
@@ -386,16 +430,27 @@ function registerSkills(server, skills, era) {
|
|
|
386
430
|
});
|
|
387
431
|
}
|
|
388
432
|
async function buildServer(mcp, auth, recorder, era, signal, operations, skills) {
|
|
433
|
+
const hasApps = mcp.tools.some((tool) => tool.ui?.app !== void 0);
|
|
389
434
|
const calledTools = operations ? mcp.tools.filter((tool) => operations.calledTools.has(tool.name)) : mcp.tools;
|
|
390
435
|
const selectedTools = !operations || operations.listTools ? mcp.tools : calledTools;
|
|
391
|
-
const
|
|
392
|
-
const needsAppContext = skills !== void 0 && skills.prepared === void 0 ||
|
|
436
|
+
const exposureTools = operations?.exposeApps ? mcp.tools.filter((tool) => tool.ui?.app !== void 0 || selectedTools.includes(tool)) : selectedTools;
|
|
437
|
+
const needsAppContext = skills !== void 0 && skills.prepared === void 0 || exposureTools.some((tool) => tool.enabled !== void 0) || calledTools.some(require_errors.toolRequiresAppContext);
|
|
393
438
|
const { createAppContext } = mcp;
|
|
394
439
|
const appContext = needsAppContext && createAppContext ? await withAppContextError(() => createAppContext({
|
|
395
440
|
auth: new require_errors.AuthContext(auth),
|
|
396
441
|
signal
|
|
397
442
|
})) : void 0;
|
|
398
443
|
const visibilityContext = Object.freeze({ appContext });
|
|
444
|
+
const enabledTools = /* @__PURE__ */ new Set();
|
|
445
|
+
for (const tool of exposureTools) if (await withAppContextError(() => {
|
|
446
|
+
const value = tool.enabled ? tool.enabled(visibilityContext) : true;
|
|
447
|
+
if (typeof value !== "boolean") {
|
|
448
|
+
Promise.resolve(value).catch(() => {});
|
|
449
|
+
throw new TypeError(`@lovable.dev/mcp-js: tool "${tool.name}" enabled must return a boolean synchronously`);
|
|
450
|
+
}
|
|
451
|
+
return value;
|
|
452
|
+
})) enabledTools.add(tool);
|
|
453
|
+
const apps = require_apps.collectApps([...enabledTools]);
|
|
399
454
|
let preparedSkills = skills?.prepared;
|
|
400
455
|
if (skills && !preparedSkills) {
|
|
401
456
|
const enabledSkills = await withAppContextError(() => mcp.skills.flatMap((entry) => {
|
|
@@ -414,15 +469,21 @@ async function buildServer(mcp, auth, recorder, era, signal, operations, skills)
|
|
|
414
469
|
version: mcp.version,
|
|
415
470
|
title: mcp.title
|
|
416
471
|
}, {
|
|
472
|
+
maxToolInputElements: mcp.limits?.maxToolInputElements ?? 1e4,
|
|
417
473
|
instructions: preparedSkills ? composeInstructions(mcp.instructions, preparedSkills, skills.declared) : mcp.instructions,
|
|
418
|
-
capabilities:
|
|
474
|
+
capabilities: {
|
|
419
475
|
tools: { listChanged: false },
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
476
|
+
...hasApps || skills ? {
|
|
477
|
+
resources: {
|
|
478
|
+
listChanged: false,
|
|
479
|
+
subscribe: false
|
|
480
|
+
},
|
|
481
|
+
extensions: {
|
|
482
|
+
...apps.length > 0 ? { [require_apps.UI_EXTENSION_ID]: { mimeTypes: [require_apps.APP_RESOURCE_MIME_TYPE] } } : {},
|
|
483
|
+
...skills ? { [SKILLS_EXTENSION_ID]: {} } : {}
|
|
484
|
+
}
|
|
485
|
+
} : {}
|
|
486
|
+
},
|
|
426
487
|
cacheHints: {
|
|
427
488
|
"tools/list": {
|
|
428
489
|
ttlMs: 0,
|
|
@@ -432,26 +493,22 @@ async function buildServer(mcp, auth, recorder, era, signal, operations, skills)
|
|
|
432
493
|
ttlMs: 0,
|
|
433
494
|
cacheScope: "private"
|
|
434
495
|
},
|
|
435
|
-
...skills ? {
|
|
436
|
-
"resources/list":
|
|
437
|
-
"resources/read":
|
|
496
|
+
...hasApps || skills ? {
|
|
497
|
+
"resources/list": PRIVATE_CACHE,
|
|
498
|
+
"resources/read": PRIVATE_CACHE
|
|
438
499
|
} : {}
|
|
439
500
|
}
|
|
440
501
|
});
|
|
502
|
+
registerApps(server, apps);
|
|
441
503
|
if (preparedSkills) registerSkills(server, preparedSkills, era);
|
|
442
504
|
for (const tool of selectedTools) {
|
|
443
|
-
if (tool
|
|
444
|
-
|
|
445
|
-
if (!await withAppContextError(() => {
|
|
446
|
-
const value = enabled(visibilityContext);
|
|
447
|
-
if (typeof value !== "boolean") throw new TypeError(`@lovable.dev/mcp-js: tool "${tool.name}" enabled must return a boolean synchronously`);
|
|
448
|
-
return value;
|
|
449
|
-
})) continue;
|
|
450
|
-
}
|
|
505
|
+
if (!enabledTools.has(tool)) continue;
|
|
506
|
+
const _meta = toolUiMeta(tool);
|
|
451
507
|
const config = {
|
|
452
508
|
title: tool.title,
|
|
453
509
|
description: tool.description,
|
|
454
510
|
annotations: tool.annotations,
|
|
511
|
+
..._meta ? { _meta } : {},
|
|
455
512
|
...tool.outputSchema ? { outputSchema: standardSchemaFromDefinition(tool.outputSchema, false) } : {}
|
|
456
513
|
};
|
|
457
514
|
const callback = adaptToolCallback(tool, auth, recorder, era === "legacy" ? "legacy" : MODERN_PROTOCOL_VERSION, appContext);
|
|
@@ -472,6 +529,7 @@ async function buildServer(mcp, auth, recorder, era, signal, operations, skills)
|
|
|
472
529
|
*/
|
|
473
530
|
function createMcpProtocolHandler(mcp, options = {}) {
|
|
474
531
|
const authorizer = require_cors.createRequestAuthorizer(mcp, options);
|
|
532
|
+
const maxRequestBodySize = mcp.limits?.maxRequestBodySize ?? 1024 * 1024;
|
|
475
533
|
const hasSkills = mcp.skills !== void 0 && mcp.skills.length > 0;
|
|
476
534
|
const preparedSkills = mcp.skills?.length && mcp.skills.every((entry) => !("skill" in entry)) ? prepareSkills(mcp.name, mcp.skills) : void 0;
|
|
477
535
|
const handle = async (request, authResult, recorder) => {
|
|
@@ -490,20 +548,26 @@ function createMcpProtocolHandler(mcp, options = {}) {
|
|
|
490
548
|
outcome: "500 internal error"
|
|
491
549
|
});
|
|
492
550
|
};
|
|
551
|
+
let classificationRequest;
|
|
493
552
|
try {
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
553
|
+
classificationRequest = mcp.createAppContext || hasSkills ? request.clone() : void 0;
|
|
554
|
+
const response = await (0, _modelcontextprotocol_server.createMcpHandler)(async ({ era, requestInfo }) => {
|
|
555
|
+
const classified = classificationRequest ? await classifyRequest(classificationRequest, maxRequestBodySize) : void 0;
|
|
556
|
+
const operations = mcp.createAppContext ? classified?.operations : void 0;
|
|
557
|
+
const skills = hasSkills ? {
|
|
558
|
+
prepared: preparedSkills,
|
|
559
|
+
declared: declaresSkillsSupport(classified?.parsedBody)
|
|
560
|
+
} : void 0;
|
|
561
|
+
return buildServer(mcp, authResult.auth, recorder, era, requestInfo?.signal ?? request.signal, operations, skills);
|
|
562
|
+
}, {
|
|
501
563
|
legacy: "stateless",
|
|
564
|
+
maxRequestBodySize,
|
|
502
565
|
maxSubscriptions: 0,
|
|
503
566
|
onerror: (error) => {
|
|
504
567
|
protocolError = error;
|
|
505
568
|
}
|
|
506
|
-
}).fetch(request
|
|
569
|
+
}).fetch(request);
|
|
570
|
+
response.headers.append("Cache-Control", "no-store");
|
|
507
571
|
if (response.status >= 500) await reportTransportError(protocolError);
|
|
508
572
|
return response;
|
|
509
573
|
} catch (err) {
|
|
@@ -516,6 +580,8 @@ function createMcpProtocolHandler(mcp, options = {}) {
|
|
|
516
580
|
message: "internal error"
|
|
517
581
|
}
|
|
518
582
|
}, { status: 500 });
|
|
583
|
+
} finally {
|
|
584
|
+
if (classificationRequest?.body && !classificationRequest.bodyUsed) classificationRequest.body.cancel().catch(() => {});
|
|
519
585
|
}
|
|
520
586
|
};
|
|
521
587
|
return createGatedHandler({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as MetricsRecorder } from "../../base-
|
|
3
|
-
import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize
|
|
1
|
+
import { y as McpDefinition } from "../../types-B_dVw-zM.cjs";
|
|
2
|
+
import { t as MetricsRecorder } from "../../base-qEX8YVcD.cjs";
|
|
3
|
+
import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize--W1XtwdB.cjs";
|
|
4
4
|
//#region src/protocols/mcp/protocol.d.ts
|
|
5
5
|
type McpProtocolHandler = (request: Request, recorder?: MetricsRecorder, scheduleBackground?: ScheduleBackground) => Promise<Response>;
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as MetricsRecorder } from "../../base-
|
|
3
|
-
import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-
|
|
1
|
+
import { y as McpDefinition } from "../../types-B_dVw-zM.js";
|
|
2
|
+
import { t as MetricsRecorder } from "../../base-Ce9JYirF.js";
|
|
3
|
+
import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-DpNYioXM.js";
|
|
4
4
|
//#region src/protocols/mcp/protocol.d.ts
|
|
5
5
|
type McpProtocolHandler = (request: Request, recorder?: MetricsRecorder, scheduleBackground?: ScheduleBackground) => Promise<Response>;
|
|
6
6
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createMcpProtocolHandler } from "../../mcp-
|
|
1
|
+
import { t as createMcpProtocolHandler } from "../../mcp-BT9dcts8.js";
|
|
2
2
|
export { createMcpProtocolHandler };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_logger = require("../logger-C-Hdu57K.cjs");
|
|
3
|
-
const require_cors = require("../cors-
|
|
3
|
+
const require_cors = require("../cors-DcWb13LI.cjs");
|
|
4
4
|
//#region src/protocols/oauth-metadata.ts
|
|
5
5
|
function notFound() {
|
|
6
6
|
return new Response(JSON.stringify({ error: "not found" }), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as MetricsRecorder } from "../base-
|
|
3
|
-
import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize
|
|
1
|
+
import { y as McpDefinition } from "../types-B_dVw-zM.cjs";
|
|
2
|
+
import { t as MetricsRecorder } from "../base-qEX8YVcD.cjs";
|
|
3
|
+
import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize--W1XtwdB.cjs";
|
|
4
4
|
//#region src/protocols/oauth-metadata.d.ts
|
|
5
5
|
type OAuthProtectedResourceMetadataHandler = (request: Request, recorder?: MetricsRecorder, scheduleBackground?: ScheduleBackground) => Promise<Response>;
|
|
6
6
|
declare function createOAuthProtectedResourceMetadataHandler(mcp: McpDefinition, options?: McpRuntimeOptions): OAuthProtectedResourceMetadataHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as MetricsRecorder } from "../base-
|
|
3
|
-
import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize-
|
|
1
|
+
import { y as McpDefinition } from "../types-B_dVw-zM.js";
|
|
2
|
+
import { t as MetricsRecorder } from "../base-Ce9JYirF.js";
|
|
3
|
+
import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize-DpNYioXM.js";
|
|
4
4
|
//#region src/protocols/oauth-metadata.d.ts
|
|
5
5
|
type OAuthProtectedResourceMetadataHandler = (request: Request, recorder?: MetricsRecorder, scheduleBackground?: ScheduleBackground) => Promise<Response>;
|
|
6
6
|
declare function createOAuthProtectedResourceMetadataHandler(mcp: McpDefinition, options?: McpRuntimeOptions): OAuthProtectedResourceMetadataHandler;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as log, r as describeError } from "../logger-CpLgYbCG.js";
|
|
2
|
-
import { a as oauthConfigurationErrorResponse, f as JSON_HEADERS, i as normalizeHttpMethod, l as emitBeforeResponse, m as methodNotAllowed, p as finalizeWireResponse, r as getOAuthRuntime, s as resolveProtectedResource, t as evaluateCors, u as createNoopRecorder } from "../cors-
|
|
2
|
+
import { a as oauthConfigurationErrorResponse, f as JSON_HEADERS, i as normalizeHttpMethod, l as emitBeforeResponse, m as methodNotAllowed, p as finalizeWireResponse, r as getOAuthRuntime, s as resolveProtectedResource, t as evaluateCors, u as createNoopRecorder } from "../cors-M68siADv.js";
|
|
3
3
|
//#region src/protocols/oauth-metadata.ts
|
|
4
4
|
function notFound() {
|
|
5
5
|
return new Response(JSON.stringify({ error: "not found" }), {
|