@modelcontextprotocol/server-wiki-explorer 1.2.2 → 1.3.1

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/server.js CHANGED
@@ -149,22 +149,22 @@ var require_code = __commonJS((exports) => {
149
149
  i2++;
150
150
  }
151
151
  }
152
- function mergeExprItems(a2, b2) {
153
- if (b2 === '""')
152
+ function mergeExprItems(a2, b) {
153
+ if (b === '""')
154
154
  return a2;
155
155
  if (a2 === '""')
156
- return b2;
156
+ return b;
157
157
  if (typeof a2 == "string") {
158
- if (b2 instanceof Name || a2[a2.length - 1] !== '"')
158
+ if (b instanceof Name || a2[a2.length - 1] !== '"')
159
159
  return;
160
- if (typeof b2 != "string")
161
- return `${a2.slice(0, -1)}${b2}"`;
162
- if (b2[0] === '"')
163
- return a2.slice(0, -1) + b2.slice(1);
160
+ if (typeof b != "string")
161
+ return `${a2.slice(0, -1)}${b}"`;
162
+ if (b[0] === '"')
163
+ return a2.slice(0, -1) + b.slice(1);
164
164
  return;
165
165
  }
166
- if (typeof b2 == "string" && b2[0] === '"' && !(a2 instanceof Name))
167
- return `"${a2}${b2.slice(1)}`;
166
+ if (typeof b == "string" && b[0] === '"' && !(a2 instanceof Name))
167
+ return `"${a2}${b.slice(1)}`;
168
168
  return;
169
169
  }
170
170
  function strConcat(c1, c2) {
@@ -1999,43 +1999,43 @@ var require_subschema = __commonJS((exports) => {
1999
1999
 
2000
2000
  // ../../node_modules/fast-deep-equal/index.js
2001
2001
  var require_fast_deep_equal = __commonJS((exports, module) => {
2002
- module.exports = function equal(a2, b2) {
2003
- if (a2 === b2)
2002
+ module.exports = function equal(a2, b) {
2003
+ if (a2 === b)
2004
2004
  return true;
2005
- if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
2006
- if (a2.constructor !== b2.constructor)
2005
+ if (a2 && b && typeof a2 == "object" && typeof b == "object") {
2006
+ if (a2.constructor !== b.constructor)
2007
2007
  return false;
2008
2008
  var length, i2, keys;
2009
2009
  if (Array.isArray(a2)) {
2010
2010
  length = a2.length;
2011
- if (length != b2.length)
2011
+ if (length != b.length)
2012
2012
  return false;
2013
2013
  for (i2 = length;i2-- !== 0; )
2014
- if (!equal(a2[i2], b2[i2]))
2014
+ if (!equal(a2[i2], b[i2]))
2015
2015
  return false;
2016
2016
  return true;
2017
2017
  }
2018
2018
  if (a2.constructor === RegExp)
2019
- return a2.source === b2.source && a2.flags === b2.flags;
2019
+ return a2.source === b.source && a2.flags === b.flags;
2020
2020
  if (a2.valueOf !== Object.prototype.valueOf)
2021
- return a2.valueOf() === b2.valueOf();
2021
+ return a2.valueOf() === b.valueOf();
2022
2022
  if (a2.toString !== Object.prototype.toString)
2023
- return a2.toString() === b2.toString();
2023
+ return a2.toString() === b.toString();
2024
2024
  keys = Object.keys(a2);
2025
2025
  length = keys.length;
2026
- if (length !== Object.keys(b2).length)
2026
+ if (length !== Object.keys(b).length)
2027
2027
  return false;
2028
2028
  for (i2 = length;i2-- !== 0; )
2029
- if (!Object.prototype.hasOwnProperty.call(b2, keys[i2]))
2029
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i2]))
2030
2030
  return false;
2031
2031
  for (i2 = length;i2-- !== 0; ) {
2032
2032
  var key = keys[i2];
2033
- if (!equal(a2[key], b2[key]))
2033
+ if (!equal(a2[key], b[key]))
2034
2034
  return false;
2035
2035
  }
2036
2036
  return true;
2037
2037
  }
2038
- return a2 !== a2 && b2 !== b2;
2038
+ return a2 !== a2 && b !== b;
2039
2039
  };
2040
2040
  });
2041
2041
 
@@ -7493,7 +7493,7 @@ var require_utf32 = __commonJS((exports) => {
7493
7493
  return this.decoder.end();
7494
7494
  };
7495
7495
  function detectEncoding(bufs, defaultEncoding) {
7496
- var b2 = [];
7496
+ var b = [];
7497
7497
  var charsProcessed = 0;
7498
7498
  var invalidLE = 0, invalidBE = 0;
7499
7499
  var bmpCharsLE = 0, bmpCharsBE = 0;
@@ -7501,25 +7501,25 @@ var require_utf32 = __commonJS((exports) => {
7501
7501
  for (var i2 = 0;i2 < bufs.length; i2++) {
7502
7502
  var buf = bufs[i2];
7503
7503
  for (var j2 = 0;j2 < buf.length; j2++) {
7504
- b2.push(buf[j2]);
7505
- if (b2.length === 4) {
7504
+ b.push(buf[j2]);
7505
+ if (b.length === 4) {
7506
7506
  if (charsProcessed === 0) {
7507
- if (b2[0] === 255 && b2[1] === 254 && b2[2] === 0 && b2[3] === 0) {
7507
+ if (b[0] === 255 && b[1] === 254 && b[2] === 0 && b[3] === 0) {
7508
7508
  return "utf-32le";
7509
7509
  }
7510
- if (b2[0] === 0 && b2[1] === 0 && b2[2] === 254 && b2[3] === 255) {
7510
+ if (b[0] === 0 && b[1] === 0 && b[2] === 254 && b[3] === 255) {
7511
7511
  return "utf-32be";
7512
7512
  }
7513
7513
  }
7514
- if (b2[0] !== 0 || b2[1] > 16)
7514
+ if (b[0] !== 0 || b[1] > 16)
7515
7515
  invalidBE++;
7516
- if (b2[3] !== 0 || b2[2] > 16)
7516
+ if (b[3] !== 0 || b[2] > 16)
7517
7517
  invalidLE++;
7518
- if (b2[0] === 0 && b2[1] === 0 && (b2[2] !== 0 || b2[3] !== 0))
7518
+ if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0))
7519
7519
  bmpCharsBE++;
7520
- if ((b2[0] !== 0 || b2[1] !== 0) && b2[2] === 0 && b2[3] === 0)
7520
+ if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0)
7521
7521
  bmpCharsLE++;
7522
- b2.length = 0;
7522
+ b.length = 0;
7523
7523
  charsProcessed++;
7524
7524
  if (charsProcessed >= 100) {
7525
7525
  break outer_loop;
@@ -7634,26 +7634,26 @@ var require_utf16 = __commonJS((exports) => {
7634
7634
  return this.decoder.end();
7635
7635
  };
7636
7636
  function detectEncoding(bufs, defaultEncoding) {
7637
- var b2 = [];
7637
+ var b = [];
7638
7638
  var charsProcessed = 0;
7639
7639
  var asciiCharsLE = 0, asciiCharsBE = 0;
7640
7640
  outer_loop:
7641
7641
  for (var i2 = 0;i2 < bufs.length; i2++) {
7642
7642
  var buf = bufs[i2];
7643
7643
  for (var j2 = 0;j2 < buf.length; j2++) {
7644
- b2.push(buf[j2]);
7645
- if (b2.length === 2) {
7644
+ b.push(buf[j2]);
7645
+ if (b.length === 2) {
7646
7646
  if (charsProcessed === 0) {
7647
- if (b2[0] === 255 && b2[1] === 254)
7647
+ if (b[0] === 255 && b[1] === 254)
7648
7648
  return "utf-16le";
7649
- if (b2[0] === 254 && b2[1] === 255)
7649
+ if (b[0] === 254 && b[1] === 255)
7650
7650
  return "utf-16be";
7651
7651
  }
7652
- if (b2[0] === 0 && b2[1] !== 0)
7652
+ if (b[0] === 0 && b[1] !== 0)
7653
7653
  asciiCharsBE++;
7654
- if (b2[0] !== 0 && b2[1] === 0)
7654
+ if (b[0] !== 0 && b[1] === 0)
7655
7655
  asciiCharsLE++;
7656
- b2.length = 0;
7656
+ b.length = 0;
7657
7657
  charsProcessed++;
7658
7658
  if (charsProcessed >= 100) {
7659
7659
  break outer_loop;
@@ -16046,15 +16046,15 @@ var require_formdata = __commonJS((exports, module) => {
16046
16046
  }
16047
16047
  }
16048
16048
  [nodeUtil.inspect.custom](depth, options) {
16049
- const state = this.#state.reduce((a2, b2) => {
16050
- if (a2[b2.name]) {
16051
- if (Array.isArray(a2[b2.name])) {
16052
- a2[b2.name].push(b2.value);
16049
+ const state = this.#state.reduce((a2, b) => {
16050
+ if (a2[b.name]) {
16051
+ if (Array.isArray(a2[b.name])) {
16052
+ a2[b.name].push(b.value);
16053
16053
  } else {
16054
- a2[b2.name] = [a2[b2.name], b2.value];
16054
+ a2[b.name] = [a2[b.name], b.value];
16055
16055
  }
16056
16056
  } else {
16057
- a2[b2.name] = b2.value;
16057
+ a2[b.name] = b.value;
16058
16058
  }
16059
16059
  return a2;
16060
16060
  }, { __proto__: null });
@@ -19132,12 +19132,12 @@ var require_balanced_pool = __commonJS((exports, module) => {
19132
19132
  var kWeight = Symbol("kWeight");
19133
19133
  var kMaxWeightPerServer = Symbol("kMaxWeightPerServer");
19134
19134
  var kErrorPenalty = Symbol("kErrorPenalty");
19135
- function getGreatestCommonDivisor(a2, b2) {
19135
+ function getGreatestCommonDivisor(a2, b) {
19136
19136
  if (a2 === 0)
19137
- return b2;
19138
- while (b2 !== 0) {
19139
- const t2 = b2;
19140
- b2 = a2 % b2;
19137
+ return b;
19138
+ while (b !== 0) {
19139
+ const t2 = b;
19140
+ b = a2 % b;
19141
19141
  a2 = t2;
19142
19142
  }
19143
19143
  return a2;
@@ -19223,7 +19223,7 @@ var require_balanced_pool = __commonJS((exports, module) => {
19223
19223
  if (!dispatcher) {
19224
19224
  return;
19225
19225
  }
19226
- const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a2, b2) => a2 && b2, true);
19226
+ const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a2, b) => a2 && b, true);
19227
19227
  if (allClientsBusy) {
19228
19228
  return;
19229
19229
  }
@@ -25898,8 +25898,8 @@ var require_headers = __commonJS((exports, module) => {
25898
25898
  }
25899
25899
  return headersList.sortedMap = headers;
25900
25900
  }
25901
- function compareHeaderName(a2, b2) {
25902
- return a2[0] < b2[0] ? -1 : 1;
25901
+ function compareHeaderName(a2, b) {
25902
+ return a2[0] < b[0] ? -1 : 1;
25903
25903
  }
25904
25904
 
25905
25905
  class HeadersList {
@@ -52627,8 +52627,8 @@ class j {
52627
52627
  sessionId;
52628
52628
  setProtocolVersion;
52629
52629
  }
52630
- var b = exports_external.union([exports_external.literal("light"), exports_external.literal("dark")]).describe("Color theme preference for the host environment.");
52631
- var L = exports_external.union([exports_external.literal("inline"), exports_external.literal("fullscreen"), exports_external.literal("pip")]).describe("Display mode for UI presentation.");
52630
+ var g = exports_external.union([exports_external.literal("light"), exports_external.literal("dark")]).describe("Color theme preference for the host environment.");
52631
+ var G = exports_external.union([exports_external.literal("inline"), exports_external.literal("fullscreen"), exports_external.literal("pip")]).describe("Display mode for UI presentation.");
52632
52632
  var i = exports_external.union([exports_external.literal("--color-background-primary"), exports_external.literal("--color-background-secondary"), exports_external.literal("--color-background-tertiary"), exports_external.literal("--color-background-inverse"), exports_external.literal("--color-background-ghost"), exports_external.literal("--color-background-info"), exports_external.literal("--color-background-danger"), exports_external.literal("--color-background-success"), exports_external.literal("--color-background-warning"), exports_external.literal("--color-background-disabled"), exports_external.literal("--color-text-primary"), exports_external.literal("--color-text-secondary"), exports_external.literal("--color-text-tertiary"), exports_external.literal("--color-text-inverse"), exports_external.literal("--color-text-ghost"), exports_external.literal("--color-text-info"), exports_external.literal("--color-text-danger"), exports_external.literal("--color-text-success"), exports_external.literal("--color-text-warning"), exports_external.literal("--color-text-disabled"), exports_external.literal("--color-border-primary"), exports_external.literal("--color-border-secondary"), exports_external.literal("--color-border-tertiary"), exports_external.literal("--color-border-inverse"), exports_external.literal("--color-border-ghost"), exports_external.literal("--color-border-info"), exports_external.literal("--color-border-danger"), exports_external.literal("--color-border-success"), exports_external.literal("--color-border-warning"), exports_external.literal("--color-border-disabled"), exports_external.literal("--color-ring-primary"), exports_external.literal("--color-ring-secondary"), exports_external.literal("--color-ring-inverse"), exports_external.literal("--color-ring-info"), exports_external.literal("--color-ring-danger"), exports_external.literal("--color-ring-success"), exports_external.literal("--color-ring-warning"), exports_external.literal("--font-sans"), exports_external.literal("--font-mono"), exports_external.literal("--font-weight-normal"), exports_external.literal("--font-weight-medium"), exports_external.literal("--font-weight-semibold"), exports_external.literal("--font-weight-bold"), exports_external.literal("--font-text-xs-size"), exports_external.literal("--font-text-sm-size"), exports_external.literal("--font-text-md-size"), exports_external.literal("--font-text-lg-size"), exports_external.literal("--font-heading-xs-size"), exports_external.literal("--font-heading-sm-size"), exports_external.literal("--font-heading-md-size"), exports_external.literal("--font-heading-lg-size"), exports_external.literal("--font-heading-xl-size"), exports_external.literal("--font-heading-2xl-size"), exports_external.literal("--font-heading-3xl-size"), exports_external.literal("--font-text-xs-line-height"), exports_external.literal("--font-text-sm-line-height"), exports_external.literal("--font-text-md-line-height"), exports_external.literal("--font-text-lg-line-height"), exports_external.literal("--font-heading-xs-line-height"), exports_external.literal("--font-heading-sm-line-height"), exports_external.literal("--font-heading-md-line-height"), exports_external.literal("--font-heading-lg-line-height"), exports_external.literal("--font-heading-xl-line-height"), exports_external.literal("--font-heading-2xl-line-height"), exports_external.literal("--font-heading-3xl-line-height"), exports_external.literal("--border-radius-xs"), exports_external.literal("--border-radius-sm"), exports_external.literal("--border-radius-md"), exports_external.literal("--border-radius-lg"), exports_external.literal("--border-radius-xl"), exports_external.literal("--border-radius-full"), exports_external.literal("--border-width-regular"), exports_external.literal("--shadow-hairline"), exports_external.literal("--shadow-sm"), exports_external.literal("--shadow-md"), exports_external.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming.");
52633
52633
  var o = exports_external.record(i.describe(`Style variables for theming MCP apps.
52634
52634
 
@@ -52663,15 +52663,16 @@ var t = exports_external.object({ method: exports_external.literal("ui/notificat
52663
52663
  var A = exports_external.object({ method: exports_external.literal("ui/notifications/tool-input"), params: exports_external.object({ arguments: exports_external.record(exports_external.string(), exports_external.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.") }) });
52664
52664
  var P = exports_external.object({ method: exports_external.literal("ui/notifications/tool-input-partial"), params: exports_external.object({ arguments: exports_external.record(exports_external.string(), exports_external.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).") }) });
52665
52665
  var H = exports_external.object({ method: exports_external.literal("ui/notifications/tool-cancelled"), params: exports_external.object({ reason: exports_external.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").') }) });
52666
- var g = exports_external.object({ fonts: exports_external.string().optional() });
52667
- var C = exports_external.object({ variables: o.optional().describe("CSS variables for theming the app."), css: g.optional().describe("CSS blocks that apps can inject.") });
52666
+ var S = exports_external.object({ fonts: exports_external.string().optional() });
52667
+ var y = exports_external.object({ variables: o.optional().describe("CSS variables for theming the app."), css: S.optional().describe("CSS blocks that apps can inject.") });
52668
52668
  var _ = exports_external.object({ method: exports_external.literal("ui/resource-teardown"), params: exports_external.object({}) });
52669
52669
  var e = exports_external.record(exports_external.string(), exports_external.unknown());
52670
52670
  var q = exports_external.object({ text: exports_external.object({}).optional().describe("Host supports text content blocks."), image: exports_external.object({}).optional().describe("Host supports image content blocks."), audio: exports_external.object({}).optional().describe("Host supports audio content blocks."), resource: exports_external.object({}).optional().describe("Host supports resource content blocks."), resourceLink: exports_external.object({}).optional().describe("Host supports resource link content blocks."), structuredContent: exports_external.object({}).optional().describe("Host supports structured content.") });
52671
- var y = exports_external.object({ experimental: exports_external.object({}).optional().describe("Experimental features (structure TBD)."), openLinks: exports_external.object({}).optional().describe("Host supports opening external URLs."), downloadFile: exports_external.object({}).optional().describe("Host supports file downloads via ui/download-file."), serverTools: exports_external.object({ listChanged: exports_external.boolean().optional().describe("Host supports tools/list_changed notifications.") }).optional().describe("Host can proxy tool calls to the MCP server."), serverResources: exports_external.object({ listChanged: exports_external.boolean().optional().describe("Host supports resources/list_changed notifications.") }).optional().describe("Host can proxy resource reads to the MCP server."), logging: exports_external.object({}).optional().describe("Host accepts log messages."), sandbox: exports_external.object({ permissions: K.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."), csp: B.optional().describe("CSP domains approved by the host.") }).optional().describe("Sandbox configuration applied by the host."), updateModelContext: q.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."), message: q.optional().describe("Host supports receiving content messages (ui/message) from the view.") });
52672
- var u = exports_external.object({ experimental: exports_external.object({}).optional().describe("Experimental features (structure TBD)."), tools: exports_external.object({ listChanged: exports_external.boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."), availableDisplayModes: exports_external.array(L).optional().describe("Display modes the app supports.") });
52673
- var QQ = exports_external.object({ method: exports_external.literal("ui/notifications/initialized"), params: exports_external.object({}).optional() });
52674
- var ZQ = exports_external.object({ csp: B.optional().describe("Content Security Policy configuration for UI resources."), permissions: K.optional().describe("Sandbox permissions requested by the UI resource."), domain: exports_external.string().optional().describe(`Dedicated origin for view sandbox.
52671
+ var QQ = exports_external.object({ method: exports_external.literal("ui/notifications/request-teardown"), params: exports_external.object({}).optional() });
52672
+ var C = exports_external.object({ experimental: exports_external.object({}).optional().describe("Experimental features (structure TBD)."), openLinks: exports_external.object({}).optional().describe("Host supports opening external URLs."), downloadFile: exports_external.object({}).optional().describe("Host supports file downloads via ui/download-file."), serverTools: exports_external.object({ listChanged: exports_external.boolean().optional().describe("Host supports tools/list_changed notifications.") }).optional().describe("Host can proxy tool calls to the MCP server."), serverResources: exports_external.object({ listChanged: exports_external.boolean().optional().describe("Host supports resources/list_changed notifications.") }).optional().describe("Host can proxy resource reads to the MCP server."), logging: exports_external.object({}).optional().describe("Host accepts log messages."), sandbox: exports_external.object({ permissions: K.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."), csp: B.optional().describe("CSP domains approved by the host.") }).optional().describe("Sandbox configuration applied by the host."), updateModelContext: q.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."), message: q.optional().describe("Host supports receiving content messages (ui/message) from the view.") });
52673
+ var f = exports_external.object({ experimental: exports_external.object({}).optional().describe("Experimental features (structure TBD)."), tools: exports_external.object({ listChanged: exports_external.boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."), availableDisplayModes: exports_external.array(G).optional().describe("Display modes the app supports.") });
52674
+ var ZQ = exports_external.object({ method: exports_external.literal("ui/notifications/initialized"), params: exports_external.object({}).optional() });
52675
+ var $Q = exports_external.object({ csp: B.optional().describe("Content Security Policy configuration for UI resources."), permissions: K.optional().describe("Sandbox permissions requested by the UI resource."), domain: exports_external.string().optional().describe(`Dedicated origin for view sandbox.
52675
52676
 
52676
52677
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
52677
52678
 
@@ -52686,27 +52687,27 @@ Boolean requesting whether a visible border and background is provided by the ho
52686
52687
  - \`true\`: request visible border + background
52687
52688
  - \`false\`: request no visible border + background
52688
52689
  - omitted: host decides border`) });
52689
- var $Q = exports_external.object({ method: exports_external.literal("ui/request-display-mode"), params: exports_external.object({ mode: L.describe("The display mode being requested.") }) });
52690
- var T = exports_external.object({ mode: L.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
52691
- var f = exports_external.union([exports_external.literal("model"), exports_external.literal("app")]).describe("Tool visibility scope - who can access the tool.");
52692
- var JQ = exports_external.object({ resourceUri: exports_external.string().optional(), visibility: exports_external.array(f).optional().describe(`Who can access this tool. Default: ["model", "app"]
52690
+ var JQ = exports_external.object({ method: exports_external.literal("ui/request-display-mode"), params: exports_external.object({ mode: G.describe("The display mode being requested.") }) });
52691
+ var T = exports_external.object({ mode: G.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
52692
+ var u = exports_external.union([exports_external.literal("model"), exports_external.literal("app")]).describe("Tool visibility scope - who can access the tool.");
52693
+ var XQ = exports_external.object({ resourceUri: exports_external.string().optional(), visibility: exports_external.array(u).optional().describe(`Who can access this tool. Default: ["model", "app"]
52693
52694
  - "model": Tool visible to and callable by the agent
52694
52695
  - "app": Tool callable by the app from this server only`) });
52695
- var kQ = exports_external.object({ mimeTypes: exports_external.array(exports_external.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.') });
52696
- var XQ = exports_external.object({ method: exports_external.literal("ui/download-file"), params: exports_external.object({ contents: exports_external.array(exports_external.union([EmbeddedResourceSchema, ResourceLinkSchema])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.") }) });
52697
- var VQ = exports_external.object({ method: exports_external.literal("ui/message"), params: exports_external.object({ role: exports_external.literal("user").describe('Message role, currently only "user" is supported.'), content: exports_external.array(ContentBlockSchema).describe("Message content blocks (text, image, etc.).") }) });
52698
- var DQ = exports_external.object({ method: exports_external.literal("ui/notifications/sandbox-resource-ready"), params: exports_external.object({ html: exports_external.string().describe("HTML content to load into the inner iframe."), sandbox: exports_external.string().optional().describe("Optional override for the inner iframe's sandbox attribute."), csp: B.optional().describe("CSP configuration from resource metadata."), permissions: K.optional().describe("Sandbox permissions from resource metadata.") }) });
52699
- var U = exports_external.object({ method: exports_external.literal("ui/notifications/tool-result"), params: CallToolResultSchema.describe("Standard MCP tool execution result.") });
52700
- var k = exports_external.object({ toolInfo: exports_external.object({ id: RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."), tool: ToolSchema.describe("Tool definition including name, inputSchema, etc.") }).optional().describe("Metadata of the tool call that instantiated this App."), theme: b.optional().describe("Current color theme preference."), styles: C.optional().describe("Style configuration for theming the app."), displayMode: L.optional().describe("How the UI is currently displayed."), availableDisplayModes: exports_external.array(L).optional().describe("Display modes the host supports."), containerDimensions: exports_external.union([exports_external.object({ height: exports_external.number().describe("Fixed container height in pixels.") }), exports_external.object({ maxHeight: exports_external.union([exports_external.number(), exports_external.undefined()]).optional().describe("Maximum container height in pixels.") })]).and(exports_external.union([exports_external.object({ width: exports_external.number().describe("Fixed container width in pixels.") }), exports_external.object({ maxWidth: exports_external.union([exports_external.number(), exports_external.undefined()]).optional().describe("Maximum container width in pixels.") })])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
52696
+ var RQ = exports_external.object({ mimeTypes: exports_external.array(exports_external.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.') });
52697
+ var VQ = exports_external.object({ method: exports_external.literal("ui/download-file"), params: exports_external.object({ contents: exports_external.array(exports_external.union([EmbeddedResourceSchema, ResourceLinkSchema])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.") }) });
52698
+ var DQ = exports_external.object({ method: exports_external.literal("ui/message"), params: exports_external.object({ role: exports_external.literal("user").describe('Message role, currently only "user" is supported.'), content: exports_external.array(ContentBlockSchema).describe("Message content blocks (text, image, etc.).") }) });
52699
+ var GQ = exports_external.object({ method: exports_external.literal("ui/notifications/sandbox-resource-ready"), params: exports_external.object({ html: exports_external.string().describe("HTML content to load into the inner iframe."), sandbox: exports_external.string().optional().describe("Optional override for the inner iframe's sandbox attribute."), csp: B.optional().describe("CSP configuration from resource metadata."), permissions: K.optional().describe("Sandbox permissions from resource metadata.") }) });
52700
+ var E = exports_external.object({ method: exports_external.literal("ui/notifications/tool-result"), params: CallToolResultSchema.describe("Standard MCP tool execution result.") });
52701
+ var k = exports_external.object({ toolInfo: exports_external.object({ id: RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."), tool: ToolSchema.describe("Tool definition including name, inputSchema, etc.") }).optional().describe("Metadata of the tool call that instantiated this App."), theme: g.optional().describe("Current color theme preference."), styles: y.optional().describe("Style configuration for theming the app."), displayMode: G.optional().describe("How the UI is currently displayed."), availableDisplayModes: exports_external.array(G).optional().describe("Display modes the host supports."), containerDimensions: exports_external.union([exports_external.object({ height: exports_external.number().describe("Fixed container height in pixels.") }), exports_external.object({ maxHeight: exports_external.union([exports_external.number(), exports_external.undefined()]).optional().describe("Maximum container height in pixels.") })]).and(exports_external.union([exports_external.object({ width: exports_external.number().describe("Fixed container width in pixels.") }), exports_external.object({ maxWidth: exports_external.union([exports_external.number(), exports_external.undefined()]).optional().describe("Maximum container width in pixels.") })])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
52701
52702
  container holding the app. Specify either width or maxWidth, and either height or maxHeight.`), locale: exports_external.string().optional().describe("User's language and region preference in BCP 47 format."), timeZone: exports_external.string().optional().describe("User's timezone in IANA format."), userAgent: exports_external.string().optional().describe("Host application identifier."), platform: exports_external.union([exports_external.literal("web"), exports_external.literal("desktop"), exports_external.literal("mobile")]).optional().describe("Platform type for responsive design decisions."), deviceCapabilities: exports_external.object({ touch: exports_external.boolean().optional().describe("Whether the device supports touch input."), hover: exports_external.boolean().optional().describe("Whether the device supports hover interactions.") }).optional().describe("Device input capabilities."), safeAreaInsets: exports_external.object({ top: exports_external.number().describe("Top safe area inset in pixels."), right: exports_external.number().describe("Right safe area inset in pixels."), bottom: exports_external.number().describe("Bottom safe area inset in pixels."), left: exports_external.number().describe("Left safe area inset in pixels.") }).optional().describe("Mobile safe area boundaries in pixels.") }).passthrough();
52702
- var E = exports_external.object({ method: exports_external.literal("ui/notifications/host-context-changed"), params: k.describe("Partial context update containing only changed fields.") });
52703
+ var R = exports_external.object({ method: exports_external.literal("ui/notifications/host-context-changed"), params: k.describe("Partial context update containing only changed fields.") });
52703
52704
  var LQ = exports_external.object({ method: exports_external.literal("ui/update-model-context"), params: exports_external.object({ content: exports_external.array(ContentBlockSchema).optional().describe("Context content blocks (text, image, etc.)."), structuredContent: exports_external.record(exports_external.string(), exports_external.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.") }) });
52704
- var GQ = exports_external.object({ method: exports_external.literal("ui/initialize"), params: exports_external.object({ appInfo: ImplementationSchema.describe("App identification (name and version)."), appCapabilities: u.describe("Features and capabilities this app provides."), protocolVersion: exports_external.string().describe("Protocol version this app supports.") }) });
52705
- var R = exports_external.object({ protocolVersion: exports_external.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'), hostInfo: ImplementationSchema.describe("Host application identification and version."), hostCapabilities: y.describe("Features and capabilities provided by the host."), hostContext: k.describe("Rich context about the host environment.") }).passthrough();
52705
+ var WQ = exports_external.object({ method: exports_external.literal("ui/initialize"), params: exports_external.object({ appInfo: ImplementationSchema.describe("App identification (name and version)."), appCapabilities: f.describe("Features and capabilities this app provides."), protocolVersion: exports_external.string().describe("Protocol version this app supports.") }) });
52706
+ var U = exports_external.object({ protocolVersion: exports_external.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'), hostInfo: ImplementationSchema.describe("Host application identification and version."), hostCapabilities: C.describe("Features and capabilities provided by the host."), hostContext: k.describe("Rich context about the host environment.") }).passthrough();
52706
52707
  var v = "ui/resourceUri";
52707
52708
  var d = "text/html;profile=mcp-app";
52708
52709
 
52709
- class qQ extends Protocol {
52710
+ class OQ extends Protocol {
52710
52711
  _appInfo;
52711
52712
  _capabilities;
52712
52713
  options;
@@ -52738,13 +52739,13 @@ class qQ extends Protocol {
52738
52739
  this.setNotificationHandler(P, ($) => Z($.params));
52739
52740
  }
52740
52741
  set ontoolresult(Z) {
52741
- this.setNotificationHandler(U, ($) => Z($.params));
52742
+ this.setNotificationHandler(E, ($) => Z($.params));
52742
52743
  }
52743
52744
  set ontoolcancelled(Z) {
52744
52745
  this.setNotificationHandler(H, ($) => Z($.params));
52745
52746
  }
52746
52747
  set onhostcontextchanged(Z) {
52747
- this.setNotificationHandler(E, ($) => {
52748
+ this.setNotificationHandler(R, ($) => {
52748
52749
  this._hostContext = { ...this._hostContext, ...$.params }, Z($.params);
52749
52750
  });
52750
52751
  }
@@ -52806,6 +52807,9 @@ class qQ extends Protocol {
52806
52807
  downloadFile(Z, $) {
52807
52808
  return this.request({ method: "ui/download-file", params: Z }, I, $);
52808
52809
  }
52810
+ requestTeardown(Z = {}) {
52811
+ return this.notification({ method: "ui/notifications/request-teardown", params: Z });
52812
+ }
52809
52813
  requestDisplayMode(Z, $) {
52810
52814
  return this.request({ method: "ui/request-display-mode", params: Z }, T, $);
52811
52815
  }
@@ -52818,11 +52822,11 @@ class qQ extends Protocol {
52818
52822
  return;
52819
52823
  Z = true, requestAnimationFrame(() => {
52820
52824
  Z = false;
52821
- let V = document.documentElement, G = V.style.width, W = V.style.height;
52825
+ let V = document.documentElement, L = V.style.width, W = V.style.height;
52822
52826
  V.style.width = "fit-content", V.style.height = "max-content";
52823
- let M = V.getBoundingClientRect();
52824
- V.style.width = G, V.style.height = W;
52825
- let h = window.innerWidth - V.clientWidth, N = Math.ceil(M.width + h), Y = Math.ceil(M.height);
52827
+ let x = V.getBoundingClientRect();
52828
+ V.style.width = L, V.style.height = W;
52829
+ let h = window.innerWidth - V.clientWidth, N = Math.ceil(x.width + h), Y = Math.ceil(x.height);
52826
52830
  if (N !== $ || Y !== J)
52827
52831
  $ = N, J = Y, this.sendSizeChanged({ width: N, height: Y });
52828
52832
  });
@@ -52836,7 +52840,7 @@ class qQ extends Protocol {
52836
52840
  throw Error("App is already connected. Call close() before connecting again.");
52837
52841
  await super.connect(Z);
52838
52842
  try {
52839
- let J = await this.request({ method: "ui/initialize", params: { appCapabilities: this._capabilities, appInfo: this._appInfo, protocolVersion: F } }, R, $);
52843
+ let J = await this.request({ method: "ui/initialize", params: { appCapabilities: this._capabilities, appInfo: this._appInfo, protocolVersion: F } }, U, $);
52840
52844
  if (J === undefined)
52841
52845
  throw Error(`Server sent invalid initialize result: ${J}`);
52842
52846
  if (this._hostCapabilities = J.hostCapabilities, this._hostInfo = J.hostInfo, this._hostContext = J.hostContext, await this.notification({ method: "ui/notifications/initialized" }), this.options?.autoResize)
@@ -52846,15 +52850,15 @@ class qQ extends Protocol {
52846
52850
  }
52847
52851
  }
52848
52852
  }
52849
- function uZ(Z, $, J, X) {
52850
- let D = J._meta, V = D.ui, G = D[v], W = D;
52851
- if (V?.resourceUri && !G)
52853
+ function hZ(Z, $, J, X) {
52854
+ let D = J._meta, V = D.ui, L = D[v], W = D;
52855
+ if (V?.resourceUri && !L)
52852
52856
  W = { ...D, [v]: V.resourceUri };
52853
- else if (G && !V?.resourceUri)
52854
- W = { ...D, ui: { ...V, resourceUri: G } };
52857
+ else if (L && !V?.resourceUri)
52858
+ W = { ...D, ui: { ...V, resourceUri: L } };
52855
52859
  return Z.registerTool($, { ...J, _meta: W }, X);
52856
52860
  }
52857
- function fZ(Z, $, J, X, D) {
52861
+ function mZ(Z, $, J, X, D) {
52858
52862
  return Z.registerResource($, J, { mimeType: d, ...X }, D);
52859
52863
  }
52860
52864
 
@@ -55160,8 +55164,8 @@ function getAttribCheck(attrib, value) {
55160
55164
  }
55161
55165
  return (elem) => isTag2(elem) && elem.attribs[attrib] === value;
55162
55166
  }
55163
- function combineFuncs(a2, b2) {
55164
- return (elem) => a2(elem) || b2(elem);
55167
+ function combineFuncs(a2, b) {
55168
+ return (elem) => a2(elem) || b(elem);
55165
55169
  }
55166
55170
  function compileTest(options) {
55167
55171
  const funcs = Object.keys(options).map((key) => {
@@ -55259,8 +55263,8 @@ function compareDocumentPosition(nodeA, nodeB) {
55259
55263
  }
55260
55264
  function uniqueSort(nodes) {
55261
55265
  nodes = nodes.filter((node2, i2, arr) => !arr.includes(node2, i2 + 1));
55262
- nodes.sort((a2, b2) => {
55263
- const relative = compareDocumentPosition(a2, b2);
55266
+ nodes.sort((a2, b) => {
55267
+ const relative = compareDocumentPosition(a2, b);
55264
55268
  if (relative & DocumentPosition.PRECEDING) {
55265
55269
  return -1;
55266
55270
  } else if (relative & DocumentPosition.FOLLOWING) {
@@ -57619,18 +57623,18 @@ function parse6(formula) {
57619
57623
  var import_boolbase2 = __toESM(require_boolbase(), 1);
57620
57624
  function compile(parsed) {
57621
57625
  const a2 = parsed[0];
57622
- const b2 = parsed[1] - 1;
57623
- if (b2 < 0 && a2 <= 0)
57626
+ const b = parsed[1] - 1;
57627
+ if (b < 0 && a2 <= 0)
57624
57628
  return import_boolbase2.default.falseFunc;
57625
57629
  if (a2 === -1)
57626
- return (index) => index <= b2;
57630
+ return (index) => index <= b;
57627
57631
  if (a2 === 0)
57628
- return (index) => index === b2;
57632
+ return (index) => index === b;
57629
57633
  if (a2 === 1)
57630
- return b2 < 0 ? import_boolbase2.default.trueFunc : (index) => index >= b2;
57634
+ return b < 0 ? import_boolbase2.default.trueFunc : (index) => index >= b;
57631
57635
  const absA = Math.abs(a2);
57632
- const bMod = (b2 % absA + absA) % absA;
57633
- return a2 > 1 ? (index) => index >= b2 && index % absA === bMod : (index) => index <= b2 && index % absA === bMod;
57636
+ const bMod = (b % absA + absA) % absA;
57637
+ return a2 > 1 ? (index) => index >= b && index % absA === bMod : (index) => index <= b && index % absA === bMod;
57634
57638
  }
57635
57639
 
57636
57640
  // ../../node_modules/nth-check/lib/esm/index.js
@@ -58159,20 +58163,20 @@ function compileRules(rules, options, context) {
58159
58163
  var _a4;
58160
58164
  return rules.reduce((previous, rule) => previous === import_boolbase5.default.falseFunc ? import_boolbase5.default.falseFunc : compileGeneralSelector(previous, rule, options, context, compileToken), (_a4 = options.rootFunc) !== null && _a4 !== undefined ? _a4 : import_boolbase5.default.trueFunc);
58161
58165
  }
58162
- function reduceRules(a2, b2) {
58163
- if (b2 === import_boolbase5.default.falseFunc || a2 === import_boolbase5.default.trueFunc) {
58166
+ function reduceRules(a2, b) {
58167
+ if (b === import_boolbase5.default.falseFunc || a2 === import_boolbase5.default.trueFunc) {
58164
58168
  return a2;
58165
58169
  }
58166
- if (a2 === import_boolbase5.default.falseFunc || b2 === import_boolbase5.default.trueFunc) {
58167
- return b2;
58170
+ if (a2 === import_boolbase5.default.falseFunc || b === import_boolbase5.default.trueFunc) {
58171
+ return b;
58168
58172
  }
58169
58173
  return function combine(elem) {
58170
- return a2(elem) || b2(elem);
58174
+ return a2(elem) || b(elem);
58171
58175
  };
58172
58176
  }
58173
58177
 
58174
58178
  // ../../node_modules/css-select/lib/esm/index.js
58175
- var defaultEquals = (a2, b2) => a2 === b2;
58179
+ var defaultEquals = (a2, b) => a2 === b;
58176
58180
  var defaultOptions2 = {
58177
58181
  adapter: exports_esm2,
58178
58182
  equals: defaultEquals
@@ -58389,7 +58393,7 @@ function select(selector, root2, options = {}, limit = Infinity) {
58389
58393
  if (results.length === 1) {
58390
58394
  return results[0];
58391
58395
  }
58392
- return uniqueSort(results.reduce((a2, b2) => [...a2, ...b2]));
58396
+ return uniqueSort(results.reduce((a2, b) => [...a2, ...b]));
58393
58397
  }
58394
58398
  function findFilterElements(root2, selector, options, queryForSelector, totalLimit) {
58395
58399
  const filterIndex = selector.findIndex(isFilter);
@@ -67442,7 +67446,7 @@ function createServer() {
67442
67446
  version: "1.0.0"
67443
67447
  });
67444
67448
  const resourceUri = "ui://wiki-explorer/mcp-app.html";
67445
- uZ(server, "get-first-degree-links", {
67449
+ hZ(server, "get-first-degree-links", {
67446
67450
  title: "Get First-Degree Links",
67447
67451
  description: "Returns all Wikipedia pages that the given page links to directly.",
67448
67452
  inputSchema: exports_external.object({
@@ -67487,7 +67491,7 @@ function createServer() {
67487
67491
  };
67488
67492
  }
67489
67493
  });
67490
- fZ(server, resourceUri, resourceUri, { mimeType: d }, async () => {
67494
+ mZ(server, resourceUri, resourceUri, { mimeType: d }, async () => {
67491
67495
  const html3 = await fs.readFile(path.join(DIST_DIR, "mcp-app.html"), "utf-8");
67492
67496
  return {
67493
67497
  contents: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/server-wiki-explorer",
3
- "version": "1.2.2",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "description": "Wikipedia link explorer MCP App Server with graph visualization",
6
6
  "repository": {