@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.
Files changed (78) hide show
  1. package/README.internal.md +38 -12
  2. package/README.md +144 -12
  3. package/dist/THIRD_PARTY_NOTICES +75 -0
  4. package/dist/apps-CWG3rGhB.js +132 -0
  5. package/dist/apps-DyoDrwfi.cjs +185 -0
  6. package/dist/{authorize-r6jB-Gl2.d.cts → authorize--W1XtwdB.d.cts} +1 -1
  7. package/dist/{authorize-DxnyFNHv.d.ts → authorize-DpNYioXM.d.ts} +1 -1
  8. package/dist/{base-ff0LwIA2.d.ts → base-Ce9JYirF.d.ts} +1 -1
  9. package/dist/{base-CzPzbI3q.d.cts → base-qEX8YVcD.d.cts} +1 -1
  10. package/dist/cli/check-server.cjs +1 -1
  11. package/dist/cli/check-server.js +1 -1
  12. package/dist/cli/extract-manifest.cjs +1 -1
  13. package/dist/cli/extract-manifest.js +1 -1
  14. package/dist/{cors-Bjo6NPjV.cjs → cors-DcWb13LI.cjs} +1 -1
  15. package/dist/{cors-COjc9O73.js → cors-M68siADv.js} +1 -1
  16. package/dist/dist-CIu-UFye.js +6738 -0
  17. package/dist/dist-CqY2qXpc.cjs +6738 -0
  18. package/dist/{errors-D0UPHnG3.js → errors-CfaxXr2T.js} +25 -2
  19. package/dist/{errors-DSHt3Jqs.cjs → errors-xJ_7Su1K.cjs} +30 -1
  20. package/dist/index.cjs +2 -1
  21. package/dist/index.d.cts +6 -2
  22. package/dist/index.d.ts +6 -2
  23. package/dist/index.js +2 -2
  24. package/dist/{io-CQ60Nc2J.d.ts → io-BEpyfk4G.d.ts} +1 -1
  25. package/dist/{io-DTz7efSK.js → io-CICYQJSM.js} +13 -3
  26. package/dist/{io-Dzy5Bu6h.cjs → io-DGeqWc6m.cjs} +12 -2
  27. package/dist/{io-DnRCu_HX.d.cts → io-Di5ljvZY.d.cts} +1 -1
  28. package/dist/{mcp-DIR9MCwQ.js → mcp-BT9dcts8.js} +117 -51
  29. package/dist/{mcp-Buu1riaY.cjs → mcp-DAUFwQ80.cjs} +116 -50
  30. package/dist/mcp-app.d.ts +4 -0
  31. package/dist/{package-DL4uNmL0.cjs → package-Cu_ynl05.cjs} +1 -1
  32. package/dist/{package-DV8zBoEy.js → package-N4he-Z_i.js} +1 -1
  33. package/dist/protocols/mcp/index.cjs +1 -1
  34. package/dist/protocols/mcp/index.d.cts +3 -3
  35. package/dist/protocols/mcp/index.d.ts +3 -3
  36. package/dist/protocols/mcp/index.js +1 -1
  37. package/dist/protocols/oauth-metadata.cjs +1 -1
  38. package/dist/protocols/oauth-metadata.d.cts +3 -3
  39. package/dist/protocols/oauth-metadata.d.ts +3 -3
  40. package/dist/protocols/oauth-metadata.js +1 -1
  41. package/dist/src-D7RtXSV0.cjs +311 -0
  42. package/dist/src-sWQwyLwS.js +310 -0
  43. package/dist/stacks/supabase/index.cjs +2 -2
  44. package/dist/stacks/supabase/index.d.cts +1 -1
  45. package/dist/stacks/supabase/index.d.ts +1 -1
  46. package/dist/stacks/supabase/index.js +2 -2
  47. package/dist/stacks/supabase/vite.cjs +10 -1
  48. package/dist/stacks/supabase/vite.d.cts +1 -1
  49. package/dist/stacks/supabase/vite.d.ts +1 -1
  50. package/dist/stacks/supabase/vite.js +21 -12
  51. package/dist/stacks/tanstack/index.cjs +33 -2
  52. package/dist/stacks/tanstack/index.d.cts +7 -4
  53. package/dist/stacks/tanstack/index.d.ts +7 -4
  54. package/dist/stacks/tanstack/index.js +33 -2
  55. package/dist/stacks/tanstack/vite.cjs +995 -15
  56. package/dist/stacks/tanstack/vite.d.cts +1 -1
  57. package/dist/stacks/tanstack/vite.d.ts +1 -1
  58. package/dist/stacks/tanstack/vite.js +1001 -21
  59. package/dist/testing/browser/LICENSE.ext-apps +218 -0
  60. package/dist/testing/browser/host.ts +151 -0
  61. package/dist/testing/browser/sandbox.ts +137 -0
  62. package/dist/testing/browser.cjs +382 -0
  63. package/dist/testing/browser.d.cts +46 -0
  64. package/dist/testing/browser.d.ts +46 -0
  65. package/dist/testing/browser.js +381 -0
  66. package/dist/testing/index.cjs +2 -1
  67. package/dist/testing/index.d.cts +2 -1
  68. package/dist/testing/index.d.ts +2 -1
  69. package/dist/testing/index.js +2 -1
  70. package/dist/testing/server.cjs +36 -0
  71. package/dist/testing/server.d.cts +6 -2
  72. package/dist/testing/server.d.ts +6 -2
  73. package/dist/testing/server.js +36 -1
  74. package/dist/{tool-result-DcNioyiI.js → tool-result-BG-HsSQu.js} +8 -1
  75. package/dist/{tool-result-rU-PpNNi.cjs → tool-result-BQcr7VV-.cjs} +8 -1
  76. package/dist/{types-BtoYHhdt.d.cts → types-B_dVw-zM.d.cts} +59 -1
  77. package/dist/{types-BtoYHhdt.d.ts → types-B_dVw-zM.d.ts} +59 -1
  78. 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 require_errors = require("./errors-DSHt3Jqs.cjs");
4
- const require_cors = require("./cors-Bjo6NPjV.cjs");
5
- const require_tool_result = require("./tool-result-rU-PpNNi.cjs");
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, calledTools) {
123
+ function collectRequestOperations(value, operations) {
122
124
  if (Array.isArray(value)) {
123
- let listTools = false;
124
- for (const item of value) listTools = collectRequestOperations(item, calledTools) || listTools;
125
- return listTools;
125
+ for (const item of value) collectRequestOperations(item, operations);
126
+ return;
126
127
  }
127
- if (!isPlainObject(value)) return false;
128
- if (value.method === "tools/list") return true;
129
- if (value.method === "tools/call" && isPlainObject(value.params) && typeof value.params.name === "string") calledTools.add(value.params.name);
130
- return false;
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 parsedBody = await request.clone().json();
150
- const calledTools = /* @__PURE__ */ new Set();
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
- const SKILL_CACHE = {
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
- ...SKILL_CACHE
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: SKILL_CACHE
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 hasConditionalTools = mcp.tools.some((tool) => tool.enabled !== void 0);
392
- const needsAppContext = skills !== void 0 && skills.prepared === void 0 || operations?.listTools === true && hasConditionalTools || calledTools.some((tool) => tool.enabled !== void 0 || require_errors.toolRequiresAppContext(tool));
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: skills ? {
474
+ capabilities: {
419
475
  tools: { listChanged: false },
420
- resources: {
421
- listChanged: false,
422
- subscribe: false
423
- },
424
- extensions: { [SKILLS_EXTENSION_ID]: {} }
425
- } : { tools: { listChanged: false } },
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": SKILL_CACHE,
437
- "resources/read": SKILL_CACHE
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.enabled) {
444
- const { enabled } = tool;
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
- const classified = mcp.createAppContext || hasSkills ? await classifyRequest(request) : void 0;
495
- const operations = mcp.createAppContext ? classified?.operations : void 0;
496
- const skills = hasSkills ? {
497
- prepared: preparedSkills,
498
- declared: declaresSkillsSupport(classified?.parsedBody)
499
- } : void 0;
500
- const response = await (0, _modelcontextprotocol_server.createMcpHandler)(({ era, requestInfo }) => buildServer(mcp, authResult.auth, recorder, era, requestInfo?.signal ?? request.signal, operations, skills), {
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, classified?.parsedBody === void 0 ? void 0 : { parsedBody: classified.parsedBody });
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({
@@ -0,0 +1,4 @@
1
+ declare module "*.html?mcp-app" {
2
+ const html: string;
3
+ export default html;
4
+ }
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "3.3.0";
2
+ var version = "3.4.0";
3
3
  //#endregion
4
4
  Object.defineProperty(exports, "version", {
5
5
  enumerable: true,
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "3.3.0";
2
+ var version = "3.4.0";
3
3
  //#endregion
4
4
  export { version as t };
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_mcp = require("../../mcp-Buu1riaY.cjs");
2
+ const require_mcp = require("../../mcp-DAUFwQ80.cjs");
3
3
  exports.createMcpProtocolHandler = require_mcp.createMcpProtocolHandler;
@@ -1,6 +1,6 @@
1
- import { h as McpDefinition } from "../../types-BtoYHhdt.cjs";
2
- import { t as MetricsRecorder } from "../../base-CzPzbI3q.cjs";
3
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-r6jB-Gl2.cjs";
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 { h as McpDefinition } from "../../types-BtoYHhdt.js";
2
- import { t as MetricsRecorder } from "../../base-ff0LwIA2.js";
3
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-DxnyFNHv.js";
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-DIR9MCwQ.js";
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-Bjo6NPjV.cjs");
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 { h as McpDefinition } from "../types-BtoYHhdt.cjs";
2
- import { t as MetricsRecorder } from "../base-CzPzbI3q.cjs";
3
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize-r6jB-Gl2.cjs";
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 { h as McpDefinition } from "../types-BtoYHhdt.js";
2
- import { t as MetricsRecorder } from "../base-ff0LwIA2.js";
3
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize-DxnyFNHv.js";
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-COjc9O73.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-M68siADv.js";
3
3
  //#region src/protocols/oauth-metadata.ts
4
4
  function notFound() {
5
5
  return new Response(JSON.stringify({ error: "not found" }), {